Fixed pressure equation for case where water is not pressent, often used for co2 simulations

This commit is contained in:
hnil 2019-04-01 12:55:06 +02:00
parent 076f18c5d5
commit 88beff7a9d

View File

@ -194,7 +194,9 @@ protected:
typedef typename GridView::template Codim<0>::Entity Element;
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
// Due to miscibility oil <-> gas the water eqn is the one we can replace with a pressure equation.
enum { pressureEqnIndex = BlackOilDefaultIndexTraits::waterCompIdx };
static const bool waterEnabled = Indices::waterEnabled;
static const int pindex = (waterEnabled) ? BlackOilDefaultIndexTraits::waterCompIdx : BlackOilDefaultIndexTraits::oilCompIdx;
enum { pressureEqnIndex = pindex };
enum { pressureVarIndex = Indices::pressureSwitchIdx };
static const int numEq = Indices::numEq;