InitialTimeStepSize moved to TypeTag-free parameter system

This commit is contained in:
Arne Morten Kvarving 2024-07-06 10:22:47 +02:00
parent 3e8929b04f
commit a20cb10572
3 changed files with 6 additions and 14 deletions

View File

@ -129,7 +129,7 @@ namespace Opm {
Parameters::Hide<Parameters::EndTime<Scalar>>();
// time stepping is not done by the eWoms code in flow
Parameters::hideParam<TypeTag, Parameters::InitialTimeStepSize>();
Parameters::Hide<Parameters::InitialTimeStepSize<Scalar>>();
Parameters::hideParam<TypeTag, Parameters::MaxTimeStepDivisions>();
Parameters::hideParam<TypeTag, Parameters::MaxTimeStepSize>();
Parameters::hideParam<TypeTag, Parameters::MinTimeStepSize>();

View File

@ -252,6 +252,10 @@ public:
// to exist. (the ECL problem will finish the simulation explicitly
// after it simulated the last episode specified in the deck.)
Parameters::SetDefault<Parameters::EndTime<Scalar>>(1e100);
// The chosen value means that the size of the first time step is the
// one of the initial episode (if the length of the initial episode is
// not millions of trillions of years, that is...)
Parameters::SetDefault<Parameters::InitialTimeStepSize<Scalar>>(3600*24);
}
@ -325,7 +329,7 @@ public:
enableVtkOutput_ = Parameters::get<TypeTag, Parameters::EnableVtkOutput>();
this->enableTuning_ = Parameters::get<TypeTag, Parameters::EnableTuning>();
this->initialTimeStepSize_ = Parameters::get<TypeTag, Parameters::InitialTimeStepSize>();
this->initialTimeStepSize_ = Parameters::Get<Parameters::InitialTimeStepSize<Scalar>>();
this->maxTimeStepAfterWellEvent_ = Parameters::get<TypeTag, Parameters::TimeStepAfterEventInDays>() * 24 * 60 * 60;
// The value N for this parameter is defined in the following order of presedence:

View File

@ -414,18 +414,6 @@ template<class TypeTag>
struct ExplicitRockCompaction<TypeTag, Properties::TTag::FlowBaseProblem>
{ static constexpr bool value = false; };
// The default for the initial time step size of the simulation [s].
//
// The chosen value means that the size of the first time step is the
// one of the initial episode (if the length of the initial episode is
// not millions of trillions of years, that is...)
template<class TypeTag>
struct InitialTimeStepSize<TypeTag, Properties::TTag::FlowBaseProblem>
{
using type = GetPropType<TypeTag, Properties::Scalar>;
static constexpr type value = 3600*24;
};
// the default for the allowed volumetric error for oil per second
template<class TypeTag>
struct NewtonTolerance<TypeTag, Properties::TTag::FlowBaseProblem>