mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
ebos: fix the restart mechanism
This commit is contained in:
parent
cc76f3bedc
commit
12dc2c6447
@ -125,17 +125,15 @@ class EclPeacemanWell : public BaseAuxiliaryModule<TypeTag>
|
|||||||
DofVariables() = default;
|
DofVariables() = default;
|
||||||
DofVariables(const DofVariables&) = default;
|
DofVariables(const DofVariables&) = default;
|
||||||
|
|
||||||
// retrieve the solution dependent quantities from the IntensiveQuantities of the
|
// retrieve the solution dependent quantities that are only updated at the
|
||||||
// model
|
// beginning of a time step from the IntensiveQuantities of the model
|
||||||
void updateBeginTimestep(const IntensiveQuantities& intQuants)
|
void updateBeginTimestep(const IntensiveQuantities& intQuants)
|
||||||
{ }
|
{}
|
||||||
|
|
||||||
// retrieve the solution dependent quantities from the IntensiveQuantities of the
|
// retrieve the solution dependent quantities from the IntensiveQuantities of the
|
||||||
// model
|
// model
|
||||||
void update(const IntensiveQuantities& intQuants)
|
void update(const IntensiveQuantities& intQuants)
|
||||||
{
|
{
|
||||||
permeability = intQuants.intrinsicPermeability();
|
|
||||||
|
|
||||||
const auto& fs = intQuants.fluidState();
|
const auto& fs = intQuants.fluidState();
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||||
pressure[phaseIdx] = fs.pressure(phaseIdx);
|
pressure[phaseIdx] = fs.pressure(phaseIdx);
|
||||||
@ -598,7 +596,7 @@ public:
|
|||||||
// default skin factor: 0
|
// default skin factor: 0
|
||||||
dofVars.skinFactor = 0;
|
dofVars.skinFactor = 0;
|
||||||
|
|
||||||
// the permeability tensor of the DOF
|
// the intrinsic permeability tensor of the DOF
|
||||||
const auto& K = context.problem().intrinsicPermeability(context, dofIdx, /*timeIdx=*/0);
|
const auto& K = context.problem().intrinsicPermeability(context, dofIdx, /*timeIdx=*/0);
|
||||||
dofVars.permeability = K;
|
dofVars.permeability = K;
|
||||||
|
|
||||||
|
@ -314,7 +314,7 @@ public:
|
|||||||
void deserialize(Restarter &res)
|
void deserialize(Restarter &res)
|
||||||
{
|
{
|
||||||
// reload the current episode/report step from the deck
|
// reload the current episode/report step from the deck
|
||||||
beginEpisode();
|
beginEpisode(/*isOnRestart=*/true);
|
||||||
|
|
||||||
// deserialize the wells
|
// deserialize the wells
|
||||||
wellManager_.deserialize(res);
|
wellManager_.deserialize(res);
|
||||||
@ -331,7 +331,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Called by the simulator before an episode begins.
|
* \brief Called by the simulator before an episode begins.
|
||||||
*/
|
*/
|
||||||
void beginEpisode()
|
void beginEpisode(bool isOnRestart = false)
|
||||||
{
|
{
|
||||||
// Proceed to the next report step
|
// Proceed to the next report step
|
||||||
Simulator &simulator = this->simulator();
|
Simulator &simulator = this->simulator();
|
||||||
@ -357,7 +357,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// set up the wells
|
// set up the wells
|
||||||
wellManager_.beginEpisode(this->simulator().gridManager().eclState());
|
wellManager_.beginEpisode(this->simulator().gridManager().eclState(), isOnRestart);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
Reference in New Issue
Block a user