mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-16 20:24:48 -06:00
ebos: make it possible to disable aquifiers
for now, disabling aquifers is an experimental feature...
This commit is contained in:
parent
ef74025523
commit
c315a9a473
@ -152,6 +152,9 @@ NEW_PROP_TAG(EnableApiTracking);
|
|||||||
// The class which deals with ECL aquifers
|
// The class which deals with ECL aquifers
|
||||||
NEW_PROP_TAG(EclAquiferModel);
|
NEW_PROP_TAG(EclAquiferModel);
|
||||||
|
|
||||||
|
// In experimental mode, decides if the aquifer model should be enabled or not
|
||||||
|
NEW_PROP_TAG(EclEnableAquifers);
|
||||||
|
|
||||||
// time stepping parameters
|
// time stepping parameters
|
||||||
NEW_PROP_TAG(EclMaxTimeStepSizeAfterWellEvent);
|
NEW_PROP_TAG(EclMaxTimeStepSizeAfterWellEvent);
|
||||||
NEW_PROP_TAG(EclRestartShrinkFactor);
|
NEW_PROP_TAG(EclRestartShrinkFactor);
|
||||||
@ -232,6 +235,9 @@ SET_TYPE_PROP(EclBaseProblem, EclAquiferModel, Ewoms::EclBaseAquiferModel<TypeTa
|
|||||||
// use the built-in proof of concept well model by default
|
// use the built-in proof of concept well model by default
|
||||||
SET_TYPE_PROP(EclBaseProblem, EclWellModel, EclWellManager<TypeTag>);
|
SET_TYPE_PROP(EclBaseProblem, EclWellModel, EclWellManager<TypeTag>);
|
||||||
|
|
||||||
|
// Enable aquifers by default in experimental mode
|
||||||
|
SET_BOOL_PROP(EclBaseProblem, EclEnableAquifers, true);
|
||||||
|
|
||||||
// Enable gravity
|
// Enable gravity
|
||||||
SET_BOOL_PROP(EclBaseProblem, EnableGravity, true);
|
SET_BOOL_PROP(EclBaseProblem, EnableGravity, true);
|
||||||
|
|
||||||
@ -475,6 +481,9 @@ public:
|
|||||||
if (enableExperiments)
|
if (enableExperiments)
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, bool, EclEnableDriftCompensation,
|
EWOMS_REGISTER_PARAM(TypeTag, bool, EclEnableDriftCompensation,
|
||||||
"Enable partial compensation of systematic mass losses via the source term of the next time step");
|
"Enable partial compensation of systematic mass losses via the source term of the next time step");
|
||||||
|
if (enableExperiments)
|
||||||
|
EWOMS_REGISTER_PARAM(TypeTag, bool, EclEnableAquifers,
|
||||||
|
"Enable analytic and numeric aquifer models");
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, Scalar, EclMaxTimeStepSizeAfterWellEvent,
|
EWOMS_REGISTER_PARAM(TypeTag, Scalar, EclMaxTimeStepSizeAfterWellEvent,
|
||||||
"Maximum time step size after an well event");
|
"Maximum time step size after an well event");
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, Scalar, EclRestartShrinkFactor,
|
EWOMS_REGISTER_PARAM(TypeTag, Scalar, EclRestartShrinkFactor,
|
||||||
@ -601,6 +610,11 @@ public:
|
|||||||
|
|
||||||
enableEclOutput_ = EWOMS_GET_PARAM(TypeTag, bool, EnableEclOutput);
|
enableEclOutput_ = EWOMS_GET_PARAM(TypeTag, bool, EnableEclOutput);
|
||||||
|
|
||||||
|
if (enableExperiments)
|
||||||
|
enableAquifers_ = EWOMS_GET_PARAM(TypeTag, bool, EclEnableAquifers);
|
||||||
|
else
|
||||||
|
enableAquifers_ = true;
|
||||||
|
|
||||||
enableTuning_ = EWOMS_GET_PARAM(TypeTag, bool, EclEnableTuning);
|
enableTuning_ = EWOMS_GET_PARAM(TypeTag, bool, EclEnableTuning);
|
||||||
initialTimeStepSize_ = EWOMS_GET_PARAM(TypeTag, Scalar, InitialTimeStepSize);
|
initialTimeStepSize_ = EWOMS_GET_PARAM(TypeTag, Scalar, InitialTimeStepSize);
|
||||||
minTimeStepSize_ = EWOMS_GET_PARAM(TypeTag, Scalar, MinTimeStepSize);
|
minTimeStepSize_ = EWOMS_GET_PARAM(TypeTag, Scalar, MinTimeStepSize);
|
||||||
@ -736,6 +750,7 @@ public:
|
|||||||
// deserialize the wells
|
// deserialize the wells
|
||||||
wellModel_.deserialize(res);
|
wellModel_.deserialize(res);
|
||||||
|
|
||||||
|
if (enableAquifers_)
|
||||||
// deserialize the aquifer
|
// deserialize the aquifer
|
||||||
aquiferModel_.deserialize(res);
|
aquiferModel_.deserialize(res);
|
||||||
}
|
}
|
||||||
@ -750,6 +765,8 @@ public:
|
|||||||
void serialize(Restarter& res)
|
void serialize(Restarter& res)
|
||||||
{
|
{
|
||||||
wellModel_.serialize(res);
|
wellModel_.serialize(res);
|
||||||
|
|
||||||
|
if (enableAquifers_)
|
||||||
aquiferModel_.serialize(res);
|
aquiferModel_.serialize(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -819,6 +836,8 @@ public:
|
|||||||
// set up the wells for the next episode.
|
// set up the wells for the next episode.
|
||||||
wellModel_.beginEpisode();
|
wellModel_.beginEpisode();
|
||||||
|
|
||||||
|
// set up the aquifers for the next episode.
|
||||||
|
if (enableAquifers_)
|
||||||
// set up the aquifers for the next episode.
|
// set up the aquifers for the next episode.
|
||||||
aquiferModel_.beginEpisode();
|
aquiferModel_.beginEpisode();
|
||||||
|
|
||||||
@ -865,6 +884,7 @@ public:
|
|||||||
this->model().invalidateIntensiveQuantitiesCache(/*timeIdx=*/0);
|
this->model().invalidateIntensiveQuantitiesCache(/*timeIdx=*/0);
|
||||||
|
|
||||||
wellModel_.beginTimeStep();
|
wellModel_.beginTimeStep();
|
||||||
|
if (enableAquifers_)
|
||||||
aquiferModel_.beginTimeStep();
|
aquiferModel_.beginTimeStep();
|
||||||
tracerModel_.beginTimeStep();
|
tracerModel_.beginTimeStep();
|
||||||
|
|
||||||
@ -887,6 +907,7 @@ public:
|
|||||||
void beginIteration()
|
void beginIteration()
|
||||||
{
|
{
|
||||||
wellModel_.beginIteration();
|
wellModel_.beginIteration();
|
||||||
|
if (enableAquifers_)
|
||||||
aquiferModel_.beginIteration();
|
aquiferModel_.beginIteration();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -896,6 +917,7 @@ public:
|
|||||||
void endIteration()
|
void endIteration()
|
||||||
{
|
{
|
||||||
wellModel_.endIteration();
|
wellModel_.endIteration();
|
||||||
|
if (enableAquifers_)
|
||||||
aquiferModel_.endIteration();
|
aquiferModel_.endIteration();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -921,6 +943,7 @@ public:
|
|||||||
|
|
||||||
const auto& simulator = this->simulator();
|
const auto& simulator = this->simulator();
|
||||||
wellModel_.endTimeStep();
|
wellModel_.endTimeStep();
|
||||||
|
if (enableAquifers_)
|
||||||
aquiferModel_.endTimeStep();
|
aquiferModel_.endTimeStep();
|
||||||
tracerModel_.endTimeStep();
|
tracerModel_.endTimeStep();
|
||||||
|
|
||||||
@ -1481,6 +1504,7 @@ public:
|
|||||||
|
|
||||||
updateCompositionChangeLimits_();
|
updateCompositionChangeLimits_();
|
||||||
|
|
||||||
|
if (enableAquifers_)
|
||||||
aquiferModel_.initialSolutionApplied();
|
aquiferModel_.initialSolutionApplied();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1509,6 +1533,7 @@ public:
|
|||||||
assert(Opm::isfinite(rate[eqIdx]));
|
assert(Opm::isfinite(rate[eqIdx]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (enableAquifers_)
|
||||||
aquiferModel_.addToSource(rate, context, spaceIdx, timeIdx);
|
aquiferModel_.addToSource(rate, context, spaceIdx, timeIdx);
|
||||||
|
|
||||||
// if requested, compensate systematic mass loss for cells which were "well
|
// if requested, compensate systematic mass loss for cells which were "well
|
||||||
@ -1827,7 +1852,8 @@ private:
|
|||||||
void checkDeckCompatibility_() const
|
void checkDeckCompatibility_() const
|
||||||
{
|
{
|
||||||
const auto& deck = this->simulator().vanguard().deck();
|
const auto& deck = this->simulator().vanguard().deck();
|
||||||
bool beVerbose = this->simulator().gridView().comm().rank() == 0;
|
const auto& comm = this->simulator().gridView().comm();
|
||||||
|
bool beVerbose = comm.rank() == 0;
|
||||||
|
|
||||||
if (enableApiTracking)
|
if (enableApiTracking)
|
||||||
throw std::logic_error("API tracking is not yet implemented but requested at compile time.");
|
throw std::logic_error("API tracking is not yet implemented but requested at compile time.");
|
||||||
@ -3133,6 +3159,7 @@ private:
|
|||||||
GlobalEqVector drift_;
|
GlobalEqVector drift_;
|
||||||
|
|
||||||
EclWellModel wellModel_;
|
EclWellModel wellModel_;
|
||||||
|
bool enableAquifers_;
|
||||||
EclAquiferModel aquiferModel_;
|
EclAquiferModel aquiferModel_;
|
||||||
|
|
||||||
bool enableEclOutput_;
|
bool enableEclOutput_;
|
||||||
|
Loading…
Reference in New Issue
Block a user