Skip to content

Commit c44cbcf

Browse files
authored
Fix HIT IC z-extent: use problo[2] instead of problo[1] (#194)
In Tutorials/HIT/prob_init.cpp, Lz was computed as probhi[2]-problo[1], a copy-paste of the Ly line. When problo[1] != problo[2] the initial cos(2*pi*z/Lz) velocity field is not periodic in z, giving a discontinuity across the periodic z boundary at step 0, and disagrees with the forcing, which uses probhi[2]-problo[2] in TurbulentForcing::init_turbulent_forcing and explicitly permits Lz > Lx. No behavior change for the shipped inputs, which all use symmetric prob_lo. Fixes #180
1 parent 0771d54 commit c44cbcf

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-x‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ max_step = -1 # Max number of time steps
77
# SOLVER SETTINGS #
88
#.......................................#
99
ns.init_iter = 3 # How many initial pressure iterations
10-
ns.init_vel_iter = 5 # How many initial projeciton iterations to ensure velocity satisfies divergence constraint
10+
ns.init_vel_iter = 5 # How many initial projection iterations to ensure velocity satisfies divergence constraint
1111
ns.visc_tol = 1.0e-11 # tolerance for viscous solve
1212
#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
1313
# TIME STEP COMPUTATION #

‎Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-y‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ max_step = -1 # Max number of time steps
77
# SOLVER SETTINGS #
88
#.......................................#
99
ns.init_iter = 3 # How many initial pressure iterations
10-
ns.init_vel_iter = 5 # How many initial projeciton iterations to ensure velocity satisfies divergence constraint
10+
ns.init_vel_iter = 5 # How many initial projection iterations to ensure velocity satisfies divergence constraint
1111
ns.visc_tol = 1.0e-11 # tolerance for viscous solve
1212
#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
1313
# TIME STEP COMPUTATION #

‎Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-z‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ max_step = -1 # Max number of time steps
77
# SOLVER SETTINGS #
88
#.......................................#
99
ns.init_iter = 3 # How many initial pressure iterations
10-
ns.init_vel_iter = 5 # How many initial projeciton iterations to ensure velocity satisfies divergence constraint
10+
ns.init_vel_iter = 5 # How many initial projection iterations to ensure velocity satisfies divergence constraint
1111
ns.visc_tol = 1.0e-11 # tolerance for viscous solve
1212
#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
1313
# TIME STEP COMPUTATION #

‎Tutorials/HIT/prob_init.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void NavierStokes::init_forced (Box const& vbx,
109109
const Real Lx = (probhi[0] - problo[0]);
110110
const Real Ly = (probhi[1] - problo[1]);
111111
#if (AMREX_SPACEDIM == 3)
112-
const Real Lz = (probhi[2] - problo[1]);
112+
const Real Lz = (probhi[2] - problo[2]);
113113
#else
114114
const Real Lz = 1.0;
115115
#endif

0 commit comments

Comments
 (0)