mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Avoid time step dependent jump in RS after restart
This commit is contained in:
parent
0b6dd93903
commit
eb869f211f
@ -601,7 +601,9 @@ public:
|
|||||||
|
|
||||||
// update maximum water saturation and minimum pressure
|
// update maximum water saturation and minimum pressure
|
||||||
// used when ROCKCOMP is activated
|
// used when ROCKCOMP is activated
|
||||||
asImp_().updateExplicitQuantities_(episodeIdx, timeStepSize);
|
// Do not update max RS first step after a restart
|
||||||
|
asImp_().updateExplicitQuantities_(episodeIdx, timeStepSize, first_step_ && (episodeIdx > 0));
|
||||||
|
first_step_ = false;
|
||||||
|
|
||||||
if (nonTrivialBoundaryConditions()) {
|
if (nonTrivialBoundaryConditions()) {
|
||||||
this->model().linearizer().updateBoundaryConditionData();
|
this->model().linearizer().updateBoundaryConditionData();
|
||||||
@ -1871,7 +1873,7 @@ private:
|
|||||||
Implementation& asImp_()
|
Implementation& asImp_()
|
||||||
{ return *static_cast<Implementation *>(this); }
|
{ return *static_cast<Implementation *>(this); }
|
||||||
protected:
|
protected:
|
||||||
void updateExplicitQuantities_(int episodeIdx, int timeStepSize)
|
void updateExplicitQuantities_(int episodeIdx, int timeStepSize, const bool first_step_after_restart = false)
|
||||||
{
|
{
|
||||||
OPM_TIMEBLOCK(updateExplicitQuantities);
|
OPM_TIMEBLOCK(updateExplicitQuantities);
|
||||||
const bool invalidateFromMaxWaterSat = updateMaxWaterSaturation_();
|
const bool invalidateFromMaxWaterSat = updateMaxWaterSaturation_();
|
||||||
@ -1883,7 +1885,7 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
// deal with DRSDT and DRVDT
|
// deal with DRSDT and DRVDT
|
||||||
const bool invalidateDRDT = this->asImp_().updateCompositionChangeLimits_();
|
const bool invalidateDRDT = !first_step_after_restart && this->asImp_().updateCompositionChangeLimits_();
|
||||||
|
|
||||||
// the derivatives may have change
|
// the derivatives may have change
|
||||||
bool invalidateIntensiveQuantities
|
bool invalidateIntensiveQuantities
|
||||||
@ -2888,7 +2890,7 @@ private:
|
|||||||
BCData<int> bcindex_;
|
BCData<int> bcindex_;
|
||||||
bool nonTrivialBoundaryConditions_ = false;
|
bool nonTrivialBoundaryConditions_ = false;
|
||||||
bool explicitRockCompaction_ = false;
|
bool explicitRockCompaction_ = false;
|
||||||
|
bool first_step_ = true;
|
||||||
ModuleParams moduleParams_;
|
ModuleParams moduleParams_;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user