mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
make explicit initialization for twophase cases work
if the initial solution is explicitly given by the deck using the PRESSURE, SWAT, etc. keywords, the specified state can be thermodynamically impossible. To avoid inconsistencies, we use a flash calculation to find a state that is in thermodynamic equilibrium and exhibits the same masses as the explicitly specified solution. Since the flash solver needs to compute quantities for all fluid phases, but two-phase blackoil simulations usually do not specify the properties of one phase, the flash solver crashed. This patch works around that issue by simply not using the flash solver in the twophase case, i.e., the explicit initial condition must be thermodynamically consistent in order to produce the stable results for a different choice of primary variables.
This commit is contained in:
@@ -1134,8 +1134,9 @@ private:
|
||||
const auto& eclState = gridManager.eclState();
|
||||
|
||||
// since the values specified in the deck do not need to be consistent, we use an
|
||||
// initial condition that conserves the total mass specified by these values.
|
||||
useMassConservativeInitialCondition_ = true;
|
||||
// initial condition that conserves the total mass specified by these values, but
|
||||
// for this to work all three phases must be active.
|
||||
useMassConservativeInitialCondition_ = (FluidSystem::numActivePhases() == 3);
|
||||
|
||||
// make sure all required quantities are enables
|
||||
if (FluidSystem::phaseIsActive(waterPhaseIdx) && !deck.hasKeyword("SWAT"))
|
||||
|
||||
Reference in New Issue
Block a user