Skip to content

Commit

Permalink
Base number of substeps on a theoretical max. (erf-model#2007)
Browse files Browse the repository at this point in the history
* Base number of substeps on a theoretical max.

* Update based upon slack convo.

* Make failing tests use 6 substeps.
  • Loading branch information
AMLattanzi authored Dec 9, 2024
1 parent e8c3bd5 commit fdb8336
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Source/TimeIntegration/ERF_ComputeTimestep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ ERF::estTimeStep (int level, long& dt_fast_ratio) const
if (fixed_dt[level] > 0. && fixed_fast_dt[level] > 0.) {
dt_fast_ratio = static_cast<long>( fixed_dt[level] / fixed_fast_dt[level] );
} else if (fixed_dt[level] > 0.) {
dt_fast_ratio = static_cast<long>( 6 );
// Max CFL_c = 1.0 for substeps, but we enforce a min of 4 substeps
auto dt_sub_max = (estdt_comp/cfl);
dt_fast_ratio = static_cast<long>( std::max(fixed_dt[level]/dt_sub_max,4.) );
}

// Force time step ratio to be an even value
Expand Down
1 change: 1 addition & 0 deletions Tests/test_files/ABL_InflowFile/ABL_InflowFile.i
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ zhi.type = "SlipWall"

# TIME STEP CONTROL
erf.fixed_dt = 0.1 # fixed time step depending on grid resolution
erf.fixed_mri_dt_ratio = 6

# DIAGNOSTICS & VERBOSITY
erf.sum_interval = 1 # timesteps between computing mass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ zhi.type = "SlipWall"
# TIME STEP CONTROL
erf.substepping_type = Implicit
erf.fixed_dt = 0.0003

erf.fixed_mri_dt_ratio = 6
# DIAGNOSTICS & VERBOSITY
erf.sum_interval = 1 # timesteps between computing mass
erf.v = 1 # verbosity in ERF.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ zhi.type = "SlipWall"

# TIME STEP CONTROL
erf.fixed_dt = 0.16 # fixed time step
erf.mri_fixed_dt_ratio = 4
erf.fixed_mri_dt_ratio = 6

# DIAGNOSTICS & VERBOSITY
erf.sum_interval = 1 # timesteps between computing mass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ zhi.type = "SlipWall"

# TIME STEP CONTROL
erf.fixed_dt = .16 # fixed time step
erf.mri_fixed_dt_ratio = 4
erf.fixed_mri_dt_ratio = 6

# DIAGNOSTICS & VERBOSITY
erf.sum_interval = 1 # timesteps between computing mass
Expand Down

0 comments on commit fdb8336

Please sign in to comment.