EclProblem: simplify the saturation hysteresis and VAPPARS handling

now it is always updated at the beginning of an episode. the reason
why this works is that both features do not affect the value of the
residual for the initial solution but only its derivatives. (if
something affects the values of some quantities which are needed to
calculate some parameters, then the first update needs to happen right
after the initial solution is applied and *before* the parameter is
determined.)
This commit is contained in:
Andreas Lauser 2016-08-02 16:01:29 +02:00
parent c12eff0986
commit 64a2c9df51

View File

@ -403,11 +403,9 @@ public:
simulator.setTimeStepSize(dt);
}
if (this->simulator().episodeIndex() > 1) {
if (updateHysteresis_())
this->model().invalidateIntensiveQuantitiesCache(/*timeIdx=*/0);
this->model().updateMaxOilSaturations();
}
if (updateHysteresis_())
this->model().invalidateIntensiveQuantitiesCache(/*timeIdx=*/0);
this->model().updateMaxOilSaturations();
if (!GET_PROP_VALUE(TypeTag, DisableWells))
// set up the wells
@ -729,11 +727,6 @@ public:
wellManager_.init(this->simulator().gridManager().eclState());
}
// update the data required for capillary pressure hysteresis
if (updateHysteresis_())
this->model().invalidateIntensiveQuantitiesCache(/*timeIdx=*/0);
this->model().updateMaxOilSaturations();
// let the object for threshold pressures initialize itself. this is done only at
// this point, because determining the threshold pressures may require to access
// the initial solution.