From f66f11d04500b6e615fb0ebbc02886189c2a9e80 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Thu, 13 Aug 2026 08:53:43 -0700 Subject: [PATCH 1/2] Fix HIT IC z-extent: use problo[2] instead of problo[1] 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 --- Tutorials/HIT/prob_init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tutorials/HIT/prob_init.cpp b/Tutorials/HIT/prob_init.cpp index f421ce62b..2b8130ab9 100644 --- a/Tutorials/HIT/prob_init.cpp +++ b/Tutorials/HIT/prob_init.cpp @@ -109,7 +109,7 @@ void NavierStokes::init_forced (Box const& vbx, const Real Lx = (probhi[0] - problo[0]); const Real Ly = (probhi[1] - problo[1]); #if (AMREX_SPACEDIM == 3) - const Real Lz = (probhi[2] - problo[1]); + const Real Lz = (probhi[2] - problo[2]); #else const Real Lz = 1.0; #endif From c5e97c88b4e8b6429cb3ead261a402b645093c55 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Thu, 13 Aug 2026 08:57:21 -0700 Subject: [PATCH 2/2] Fix typos --- Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-x | 2 +- Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-y | 2 +- Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-z | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-x b/Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-x index 326b2d660..9b1a29203 100644 --- a/Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-x +++ b/Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-x @@ -7,7 +7,7 @@ max_step = -1 # Max number of time steps # SOLVER SETTINGS # #.......................................# ns.init_iter = 3 # How many initial pressure iterations -ns.init_vel_iter = 5 # How many initial projeciton iterations to ensure velocity satisfies divergence constraint +ns.init_vel_iter = 5 # How many initial projection iterations to ensure velocity satisfies divergence constraint ns.visc_tol = 1.0e-11 # tolerance for viscous solve #¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# # TIME STEP COMPUTATION # diff --git a/Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-y b/Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-y index 856615e05..ace7351ce 100644 --- a/Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-y +++ b/Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-y @@ -7,7 +7,7 @@ max_step = -1 # Max number of time steps # SOLVER SETTINGS # #.......................................# ns.init_iter = 3 # How many initial pressure iterations -ns.init_vel_iter = 5 # How many initial projeciton iterations to ensure velocity satisfies divergence constraint +ns.init_vel_iter = 5 # How many initial projection iterations to ensure velocity satisfies divergence constraint ns.visc_tol = 1.0e-11 # tolerance for viscous solve #¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# # TIME STEP COMPUTATION # diff --git a/Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-z b/Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-z index 6b1157b68..0adb6eaeb 100644 --- a/Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-z +++ b/Tutorials/FlowPastCylinder/inputs.3d.flow_past_cylinder-z @@ -7,7 +7,7 @@ max_step = -1 # Max number of time steps # SOLVER SETTINGS # #.......................................# ns.init_iter = 3 # How many initial pressure iterations -ns.init_vel_iter = 5 # How many initial projeciton iterations to ensure velocity satisfies divergence constraint +ns.init_vel_iter = 5 # How many initial projection iterations to ensure velocity satisfies divergence constraint ns.visc_tol = 1.0e-11 # tolerance for viscous solve #¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# # TIME STEP COMPUTATION #