From 8134de192db74df2af9f2b9a62f49fc83c967065 Mon Sep 17 00:00:00 2001 From: Ilker Topcuoglu Date: Mon, 14 Oct 2024 11:20:28 -0600 Subject: [PATCH] Changing the entire naming convention to fixed_point_iterations --- amr-wind/incflo.H | 4 +- amr-wind/incflo.cpp | 17 +++-- .../abl_godunov_wenoz_fixedpt.inp | 74 +++++++++++++++++++ 3 files changed, 85 insertions(+), 10 deletions(-) create mode 100644 test/test_files/abl_godunov_wenoz_fixedpt/abl_godunov_wenoz_fixedpt.inp diff --git a/amr-wind/incflo.H b/amr-wind/incflo.H index c35f15c307..e2ec8a54d2 100644 --- a/amr-wind/incflo.H +++ b/amr-wind/incflo.H @@ -174,8 +174,8 @@ private: // Prescribe advection velocity bool m_prescribe_vel = false; - // Advection iterations every timestep - int m_adv_iters{1}; + // Fixed point iterations every timestep + int m_fixed_pt_iters{1}; //! number of cells on all levels including covered cells amrex::Long m_cell_count{-1}; diff --git a/amr-wind/incflo.cpp b/amr-wind/incflo.cpp index 7f27c0687c..a71cfdfbdb 100644 --- a/amr-wind/incflo.cpp +++ b/amr-wind/incflo.cpp @@ -276,9 +276,10 @@ void incflo::Evolve() amrex::Real time1 = amrex::ParallelDescriptor::second(); // Advance to time t + dt - for (int iadvection_iteration = 0; iadvection_iteration < m_adv_iters; - ++iadvection_iteration) - do_advance(iadvection_iteration); + for (int ifixed_point_iteration = 0; + ifixed_point_iteration < m_fixed_pt_iters; + ++ifixed_point_iteration) + do_advance(ifixed_point_iteration); amrex::Print() << std::endl; amrex::Real time2 = amrex::ParallelDescriptor::second(); @@ -319,8 +320,8 @@ void incflo::do_advance(const int ifixed_point_iteration) if (m_prescribe_vel && ifixed_point_iteration == 0) { prescribe_advance(); } else { - amrex::Print() << "Iteration " << ifixed_point_iteration - << " in advection iteration loop" << std::endl; + amrex::Print() << "Fixed point iteration " << ifixed_point_iteration + << std::endl; advance(ifixed_point_iteration); } if (m_sim.has_overset()) { @@ -378,10 +379,10 @@ void incflo::init_physics_and_pde() } // Get number of advection iterations - pp.query("advection_iterations", m_adv_iters); + pp.query("fixed_point_iterations", m_fixed_pt_iters); AMREX_ALWAYS_ASSERT_WITH_MESSAGE( - m_adv_iters > 0, - "The number of advection iterations cannot be less than 1"); + m_fixed_pt_iters > 0, + "The number of fixed point iterations cannot be less than 1"); } auto& pde_mgr = m_sim.pde_manager(); diff --git a/test/test_files/abl_godunov_wenoz_fixedpt/abl_godunov_wenoz_fixedpt.inp b/test/test_files/abl_godunov_wenoz_fixedpt/abl_godunov_wenoz_fixedpt.inp new file mode 100644 index 0000000000..6e8ab161cf --- /dev/null +++ b/test/test_files/abl_godunov_wenoz_fixedpt/abl_godunov_wenoz_fixedpt.inp @@ -0,0 +1,74 @@ +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# SIMULATION STOP # +#.......................................# +#time.stop_time = 22000.0 # Max (simulated) time to evolve +time.stop_time = 50.0 # Max (simulated) time to evolve +time.max_step = 100 # Max number of time steps + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# TIME STEP COMPUTATION # +#.......................................# +time.fixed_dt = 0.5 # Use this constant dt if > 0 +time.cfl = 0.95 # CFL factor + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# INPUT AND OUTPUT # +#.......................................# +time.plot_interval = 10 # Steps between plot files +time.checkpoint_interval = -5 # Steps between checkpoint files + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# PHYSICS # +#.......................................# +incflo.gravity = 0. 0. -9.81 # Gravitational force (3D) +incflo.density = 1.0 # Reference density +incflo.use_godunov = 1 +incflo.godunov_type = "weno_z" +incflo.diffusion_type = 2 +incflo.fixed_point_iterations = 10 +transport.viscosity = 1.0e-5 +transport.laminar_prandtl = 0.7 +transport.turbulent_prandtl = 0.3333 +turbulence.model = Smagorinsky +Smagorinsky_coeffs.Cs = 0.135 + + +incflo.physics = ABL +ICNS.source_terms = BoussinesqBuoyancy CoriolisForcing ABLForcing +BoussinesqBuoyancy.reference_temperature = 300.0 +ABL.reference_temperature = 300.0 +CoriolisForcing.latitude = 41.3 +ABLForcing.abl_forcing_height = 90 + +incflo.velocity = 6.128355544951824 5.142300877492314 0.0 + +ABL.temperature_heights = 650.0 750.0 1000.0 +ABL.temperature_values = 300.0 308.0 308.75 + +ABL.kappa = .41 +ABL.surface_roughness_z0 = 0.15 + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# ADAPTIVE MESH REFINEMENT # +#.......................................# +amr.n_cell = 48 48 48 # Grid cells at coarsest AMRlevel +amr.max_level = 0 # Max AMR level in hierarchy + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# GEOMETRY # +#.......................................# +geometry.prob_lo = 0. 0. 0. # Lo corner coordinates +geometry.prob_hi = 1000. 1000. 1000. # Hi corner coordinates +geometry.is_periodic = 1 1 0 # Periodicity x y z (0/1) + +# Boundary conditions +zlo.type = "wall_model" + +zhi.type = "slip_wall" +zhi.temperature_type = "fixed_gradient" +zhi.temperature = 0.003 # tracer is used to specify potential temperature gradient + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# VERBOSITY # +#.......................................# +incflo.verbose = 0 # incflo_level