Skip to content

Commit

Permalink
Merge pull request #61 from jrgparkinson/min-dt
Browse files Browse the repository at this point in the history
Allow configuring the min dt for convergence
  • Loading branch information
jrgparkinson authored Aug 10, 2023
2 parents 696c38d + d95db29 commit dea44db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/mushyLayerOpt.h
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,9 @@ struct MushyLayerOptions
/// Minimum dt allowed
Real minDt;

// dt below which we don't consider the simulation to have converged
Real min_dt_convergence;

/// Maximum dt allowed
Real max_dt;

Expand Down
2 changes: 1 addition & 1 deletion srcSubcycle/AMRLevelMushyLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ bool AMRLevelMushyLayer::convergedToSteadyState()
// m_doAutomaticRestart = false;
// }

if (hasConverged && m_dt < 1e-10)
if (hasConverged && m_dt < m_opt.min_dt_convergence)
{
LOG_INFO("All fields converged but dt < 1e-10 so keep solving");
return false;
Expand Down
2 changes: 2 additions & 0 deletions srcSubcycle/MushyLayerSubcycleUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,8 @@ void getAMRFactory(RefCountedPtr<AMRLevelMushyLayerFactory> &a_fact)
// opt.maxEta = -1;
// ppMain.query("max_eta", opt.maxEta); // let user specify different max eta
// if they want
opt.min_dt_convergence = 1e-10;
ppMain.query("min_dt_convergence", opt.min_dt_convergence);

opt.minDt = 1e-7;
ppMain.query("min_dt", opt.minDt);
Expand Down

0 comments on commit dea44db

Please sign in to comment.