mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #4770 from akva2/eclproblem_cleanup_timestepping
EclProblem: cleanup time stepping related members
This commit is contained in:
@@ -263,19 +263,6 @@ public:
|
||||
*/
|
||||
Scalar porosity(unsigned globalSpaceIdx, unsigned timeIdx) const;
|
||||
|
||||
/*!
|
||||
* \brief Returns the minimum allowable size of a time step.
|
||||
*/
|
||||
Scalar minTimeStepSize() const
|
||||
{ return minTimeStepSize_; }
|
||||
|
||||
/*!
|
||||
* \brief Returns the maximum number of subsequent failures for the time integration
|
||||
* before giving up.
|
||||
*/
|
||||
unsigned maxTimeIntegrationFailures() const
|
||||
{ return maxFails_; }
|
||||
|
||||
bool vapparsActive(int episodeIdx) const;
|
||||
|
||||
int numPressurePointsEquil() const
|
||||
@@ -380,10 +367,6 @@ protected:
|
||||
bool enableTuning_;
|
||||
Scalar initialTimeStepSize_;
|
||||
Scalar maxTimeStepAfterWellEvent_;
|
||||
Scalar maxTimeStepSize_;
|
||||
Scalar restartShrinkFactor_;
|
||||
unsigned maxFails_;
|
||||
Scalar minTimeStepSize_;
|
||||
|
||||
// equilibration parameters
|
||||
int numPressurePointsEquil_;
|
||||
|
||||
@@ -471,9 +471,6 @@ beginEpisode_(bool enableExperiments,
|
||||
const auto& tuning = sched_state.tuning();
|
||||
initialTimeStepSize_ = sched_state.max_next_tstep();
|
||||
maxTimeStepAfterWellEvent_ = tuning.TMAXWC;
|
||||
maxTimeStepSize_ = tuning.TSMAXZ;
|
||||
restartShrinkFactor_ = 1./tuning.TSFCNV;
|
||||
minTimeStepSize_ = tuning.TSMINZ;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
#include <opm/output/eclipse/EclipseIO.hpp>
|
||||
|
||||
#include <opm/simulators/flow/EclActionHandler.hpp>
|
||||
#include <opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp>
|
||||
#include <opm/simulators/timestepping/SimulatorReport.hpp>
|
||||
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
||||
#include <opm/simulators/utils/ParallelSerialization.hpp>
|
||||
@@ -190,8 +191,6 @@ public:
|
||||
using EclGenericProblem<GridView,FluidSystem,Scalar>::helpPreamble;
|
||||
using EclGenericProblem<GridView,FluidSystem,Scalar>::shouldWriteOutput;
|
||||
using EclGenericProblem<GridView,FluidSystem,Scalar>::shouldWriteRestartFile;
|
||||
using EclGenericProblem<GridView,FluidSystem,Scalar>::maxTimeIntegrationFailures;
|
||||
using EclGenericProblem<GridView,FluidSystem,Scalar>::minTimeStepSize;
|
||||
using EclGenericProblem<GridView,FluidSystem,Scalar>::rockCompressibility;
|
||||
using EclGenericProblem<GridView,FluidSystem,Scalar>::rockReferencePressure;
|
||||
using EclGenericProblem<GridView,FluidSystem,Scalar>::porosity;
|
||||
@@ -224,10 +223,6 @@ public:
|
||||
if constexpr (enableExperiments)
|
||||
EWOMS_REGISTER_PARAM(TypeTag, bool, EclEnableAquifers,
|
||||
"Enable analytic and numeric aquifer models");
|
||||
EWOMS_REGISTER_PARAM(TypeTag, Scalar, EclMaxTimeStepSizeAfterWellEvent,
|
||||
"Maximum time step size after an well event");
|
||||
EWOMS_REGISTER_PARAM(TypeTag, Scalar, EclRestartShrinkFactor,
|
||||
"Factor by which the time step is reduced after convergence failure");
|
||||
EWOMS_REGISTER_PARAM(TypeTag, bool, EclEnableTuning,
|
||||
"Honor some aspects of the TUNING keyword from the ECL deck.");
|
||||
EWOMS_REGISTER_PARAM(TypeTag, std::string, OutputMode,
|
||||
@@ -235,7 +230,6 @@ public:
|
||||
EWOMS_REGISTER_PARAM(TypeTag, int, NumPressurePointsEquil,
|
||||
"Number of pressure points (in each direction) in tables used for equilibration");
|
||||
EWOMS_HIDE_PARAM(TypeTag, NumPressurePointsEquil); // Users will typically not need to modify this parameter..
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -309,11 +303,7 @@ public:
|
||||
|
||||
this->enableTuning_ = EWOMS_GET_PARAM(TypeTag, bool, EclEnableTuning);
|
||||
this->initialTimeStepSize_ = EWOMS_GET_PARAM(TypeTag, Scalar, InitialTimeStepSize);
|
||||
this->minTimeStepSize_ = EWOMS_GET_PARAM(TypeTag, Scalar, MinTimeStepSize);
|
||||
this->maxTimeStepSize_ = EWOMS_GET_PARAM(TypeTag, Scalar, MaxTimeStepSize);
|
||||
this->maxTimeStepAfterWellEvent_ = EWOMS_GET_PARAM(TypeTag, Scalar, EclMaxTimeStepSizeAfterWellEvent);
|
||||
this->restartShrinkFactor_ = EWOMS_GET_PARAM(TypeTag, Scalar, EclRestartShrinkFactor);
|
||||
this->maxFails_ = EWOMS_GET_PARAM(TypeTag, unsigned, MaxTimeStepDivisions);
|
||||
this->maxTimeStepAfterWellEvent_ = EWOMS_GET_PARAM(TypeTag, double, TimeStepAfterEventInDays)*24*60*60;
|
||||
|
||||
// The value N for this parameter is defined in the following order of presedence:
|
||||
// 1. Command line value (--num-pressure-points-equil=N)
|
||||
@@ -367,9 +357,6 @@ public:
|
||||
const auto& tuning = schedule[0].tuning();
|
||||
this->initialTimeStepSize_ = tuning.TSINIT;
|
||||
this->maxTimeStepAfterWellEvent_ = tuning.TMAXWC;
|
||||
this->maxTimeStepSize_ = tuning.TSMAXZ;
|
||||
this->restartShrinkFactor_ = 1./tuning.TSFCNV;
|
||||
this->minTimeStepSize_ = tuning.TSMINZ;
|
||||
}
|
||||
|
||||
this->initFluidSystem_();
|
||||
|
||||
@@ -124,14 +124,6 @@ struct EclEnableAquifers {
|
||||
|
||||
// time stepping parameters
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EclMaxTimeStepSizeAfterWellEvent {
|
||||
using type = UndefinedProperty;
|
||||
};
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EclRestartShrinkFactor {
|
||||
using type = UndefinedProperty;
|
||||
};
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct EclEnableTuning {
|
||||
using type = UndefinedProperty;
|
||||
};
|
||||
@@ -534,16 +526,6 @@ struct EnableExperiments<TypeTag, TTag::EclBaseProblem> {
|
||||
|
||||
// set defaults for the time stepping parameters
|
||||
template<class TypeTag>
|
||||
struct EclMaxTimeStepSizeAfterWellEvent<TypeTag, TTag::EclBaseProblem> {
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 3600*24*365.25;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct EclRestartShrinkFactor<TypeTag, TTag::EclBaseProblem> {
|
||||
using type = GetPropType<TypeTag, Scalar>;
|
||||
static constexpr type value = 3;
|
||||
};
|
||||
template<class TypeTag>
|
||||
struct EclEnableTuning<TypeTag, TTag::EclBaseProblem> {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user