From 64a2c9df51862f31b8275948d5bb7b423e15edb1 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Tue, 2 Aug 2016 16:01:29 +0200 Subject: [PATCH] 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.) --- applications/ebos/eclproblem.hh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/applications/ebos/eclproblem.hh b/applications/ebos/eclproblem.hh index 5a1127ea2..9149c3347 100644 --- a/applications/ebos/eclproblem.hh +++ b/applications/ebos/eclproblem.hh @@ -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.