Skip to content

Commit

Permalink
Changing the entire naming convention to fixed_point_iterations
Browse files Browse the repository at this point in the history
  • Loading branch information
itopcuoglu committed Oct 14, 2024
1 parent e00446a commit 8134de1
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 10 deletions.
4 changes: 2 additions & 2 deletions amr-wind/incflo.H
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
17 changes: 9 additions & 8 deletions amr-wind/incflo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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()) {
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8134de1

Please sign in to comment.