mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5407 from totto82/fix_drsdt
avoid mass creation with drsdt
This commit is contained in:
commit
a419390854
@ -677,9 +677,6 @@ public:
|
||||
// Compute flux for output
|
||||
this->model().linearizer().updateFlowsInfo();
|
||||
|
||||
// deal with DRSDT and DRVDT
|
||||
this->asImp_().updateCompositionChangeLimits_();
|
||||
|
||||
if (this->enableDriftCompensation_) {
|
||||
OPM_TIMEBLOCK(driftCompansation);
|
||||
|
||||
@ -1395,8 +1392,6 @@ public:
|
||||
// the initial solution.
|
||||
thresholdPressures_.finishInit();
|
||||
|
||||
updateCompositionChangeLimits_();
|
||||
|
||||
aquiferModel_.initialSolutionApplied();
|
||||
|
||||
if (this->simulator().episodeIndex() == 0) {
|
||||
@ -1879,9 +1874,13 @@ protected:
|
||||
const bool invalidateFromHyst = updateHysteresis_();
|
||||
const bool invalidateFromMaxOilSat = updateMaxOilSaturation_();
|
||||
|
||||
|
||||
// deal with DRSDT and DRVDT
|
||||
const bool invalidateDRDT = this->asImp_().updateCompositionChangeLimits_();
|
||||
|
||||
// the derivatives may have change
|
||||
bool invalidateIntensiveQuantities
|
||||
= invalidateFromMaxWaterSat || invalidateFromMinPressure || invalidateFromHyst || invalidateFromMaxOilSat;
|
||||
= invalidateFromMaxWaterSat || invalidateFromMinPressure || invalidateFromHyst || invalidateFromMaxOilSat || invalidateDRDT;
|
||||
if (invalidateIntensiveQuantities) {
|
||||
OPM_TIMEBLOCK(beginTimeStepInvalidateIntensiveQuantities);
|
||||
this->model().invalidateAndUpdateIntensiveQuantities(/*timeIdx=*/0);
|
||||
@ -1914,7 +1913,7 @@ protected:
|
||||
}
|
||||
|
||||
// update the parameters needed for DRSDT and DRVDT
|
||||
void updateCompositionChangeLimits_()
|
||||
bool updateCompositionChangeLimits_()
|
||||
{
|
||||
OPM_TIMEBLOCK(updateCompositionChangeLimits);
|
||||
// update the "last Rs" values for all elements, including the ones in the ghost
|
||||
@ -1924,7 +1923,7 @@ protected:
|
||||
this->mixControls_.drsdtActive(episodeIdx),
|
||||
this->mixControls_.drvdtActive(episodeIdx)};
|
||||
if (!active[0] && !active[1] && !active[2]) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
this->updateProperty_("FlowProblem::updateCompositionChangeLimits_()) failed:",
|
||||
@ -1944,6 +1943,8 @@ protected:
|
||||
active);
|
||||
}
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool updateMaxOilSaturation_()
|
||||
|
Loading…
Reference in New Issue
Block a user