Added missing safety factor paramet for time step controller

This commit is contained in:
Erik Hide Saeternes 2025-02-11 18:08:29 +01:00
parent d78cf2e32e
commit 2be953f73d
2 changed files with 7 additions and 1 deletions

View File

@ -136,6 +136,9 @@ void registerAdaptiveParameters()
Parameters::Register<Parameters::MinTimeStepBasedOnNewtonIterations>
("The minimum time step size (in days for field and metric unit and hours for lab unit) "
"can be reduced to based on newton iteration counts");
Parameters::Register<Parameters::TimeStepControlSafetyFactor>
("Value to be multiplied with the time step control tolerance to ensure that the target "
"relative change is lower than the tolerance");
}
std::tuple<TimeStepControlType, std::unique_ptr<TimeStepControlInterface>, bool>
@ -214,9 +217,11 @@ createController(const UnitSystem& unitSystem)
}},
{"general3rdorder",
[tol]() {
const double safetyFactor = Parameters::Get<Parameters::TimeStepControlSafetyFactor>(); // 0.8
return RetVal{
TimeStepControlType::General3rdOrder,
std::make_unique<General3rdOrderController>(tol),
std::make_unique<General3rdOrderController>(tol,
safetyFactor),
false
};
}},

View File

@ -57,6 +57,7 @@ struct TimeStepControlGrowthDampingFactor { static constexpr double value = 3.2;
struct TimeStepControlFileName { static constexpr auto value = "timesteps"; };
struct MinTimeStepBeforeShuttingProblematicWellsInDays { static constexpr double value = 0.01; };
struct MinTimeStepBasedOnNewtonIterations { static constexpr double value = 0.0; };
struct TimeStepControlSafetyFactor { static constexpr double value = 0.8; };
} // namespace Opm::Parameters