adapt one-phase model for brine

This commit is contained in:
Tor Harald Sandve 2020-01-09 13:16:47 +01:00
parent 587fa71e04
commit fd023ddb74

View File

@ -37,7 +37,7 @@ namespace Opm {
*
* \brief The primary variable and equation indices for the black-oil model.
*/
template <unsigned numSolventsV, unsigned numPolymersV, unsigned numEnergyV, bool enableFoam, unsigned PVOffset, unsigned canonicalCompIdx>
template <unsigned numSolventsV, unsigned numPolymersV, unsigned numEnergyV, bool enableFoam, bool enableBrine, unsigned PVOffset, unsigned canonicalCompIdx>
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