diff --git a/opm/models/blackoil/blackoilonephaseindices.hh b/opm/models/blackoil/blackoilonephaseindices.hh index 531c501ff..58c2754a4 100644 --- a/opm/models/blackoil/blackoilonephaseindices.hh +++ b/opm/models/blackoil/blackoilonephaseindices.hh @@ -37,7 +37,7 @@ namespace Opm { * * \brief The primary variable and equation indices for the black-oil model. */ -template +template struct BlackOilOnePhaseIndices { //! Is phase enabled or not @@ -66,11 +66,14 @@ struct BlackOilOnePhaseIndices //! Number of foam equations to be considered static const int numFoam = enableFoam? 1 : 0; + //! Number of salt equations to be considered + static const int numBrine = enableBrine? 1 : 0; + //! The number of fluid phases static const int numPhases = 1; //! The number of equations - static const int numEq = numPhases + numSolvents + numPolymers + numEnergy + numFoam; + static const int numEq = numPhases + numSolvents + numPolymers + numEnergy + numFoam + numBrine; ////////////////////////////// // Primary variable indices @@ -106,9 +109,13 @@ struct BlackOilOnePhaseIndices static const int foamConcentrationIdx = enableFoam ? PVOffset + numPhases + numSolvents + numPolymers : -1000; + //! Index of the primary variable for the salt + static const int saltConcentrationIdx = + enableBrine ? PVOffset + numPhases + numSolvents + numPolymers + numFoam : -1000; + //! Index of the primary variable for temperature static const int temperatureIdx = - enableEnergy ? PVOffset + numPhases + numSolvents + numPolymers + numFoam: - 1000; + enableEnergy ? PVOffset + numPhases + numSolvents + numPolymers + numFoam + numBrine: - 1000; ////////////////////// // Equation indices @@ -153,9 +160,13 @@ struct BlackOilOnePhaseIndices static const int contiFoamEqIdx = enableFoam ? PVOffset + numPhases + numSolvents + numPolymers : -1000; + //! Index of the continuity equation for the salt component + static const int contiBrineEqIdx = + enableBrine ? PVOffset + numPhases + numSolvents + numPolymers + numFoam : -1000; + //! Index of the continuity equation for energy static const int contiEnergyEqIdx = - enableEnergy ? PVOffset + numPhases + numSolvents + numPolymers + numFoam : -1000; + enableEnergy ? PVOffset + numPhases + numSolvents + numPolymers + numFoam + numBrine: -1000; }; } // namespace Opm