BUGFIX Pass solution from flowEbos to ebos initially

The initial solution in ebos and  in flowebos are different in cases where
swatinit is present. Pass the initial solution and recalculate the
intensive quantities make sure that the flowEbos initial solution is
used.
This commit is contained in:
Tor Harald Sandve 2017-01-17 09:12:33 +01:00
parent 5955cb07ba
commit ce2aa77cbd
2 changed files with 2 additions and 7 deletions

View File

@ -1467,8 +1467,8 @@ namespace Opm {
ebosSimulator_.problem().beginTimeStep();
}
// if the last time step failed we need to update the solution varables in ebos
// and recalculate the IntesiveQuantities.
if ( timer.lastStepFailed() && iterationIdx == 0 ) {
// and recalculate the IntesiveQuantities. Also pass the solution initially.
if ( (timer.lastStepFailed() || timer.reportStepNum()==0) && iterationIdx == 0 ) {
convertInput( iterationIdx, reservoirState, ebosSimulator_ );
ebosSimulator_.model().invalidateIntensiveQuantitiesCache(/*timeIdx=*/0);
}

View File

@ -256,11 +256,6 @@ public:
auto solver = createSolver(well_model);
// make sure that the ebos side of the model is consistent with the reservoir
// state object.
solver->model().convertInput(/*iterationIdx=*/0, state, ebosSimulator_);
ebosSimulator_.model().invalidateIntensiveQuantitiesCache(/*timeIdx=*/0);
// Compute orignal FIP;
if (!ooip_computed) {
OOIP = solver->computeFluidInPlace(fipnum);