added saltwater module

This commit is contained in:
Trine S. Mykkeltvedt
2019-11-06 20:45:20 +01:00
committed by Tor Harald Sandve
parent 44aeebb7fe
commit 106c4e3616
10 changed files with 504 additions and 9 deletions

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 disabledCanonicalCompIdx>
template <unsigned numSolventsV, unsigned numPolymersV, unsigned numEnergyV, bool enableFoam, bool enableSaltWater, unsigned PVOffset, unsigned disabledCanonicalCompIdx>
struct BlackOilTwoPhaseIndices
{
//! Is phase enabled or not
@@ -66,11 +66,14 @@ struct BlackOilTwoPhaseIndices
//! Number of foam equations to be considered
static const int numFoam = enableFoam? 1 : 0;
//! Number of salt equations to be considered
static const int numSaltWater = enableSaltWater? 1 : 0;
//! The number of fluid phases
static const int numPhases = 2;
//! The number of equations
static const int numEq = numPhases + numSolvents + numPolymers + numEnergy + numFoam;
static const int numEq = numPhases + numSolvents + numPolymers + numEnergy + numFoam + numSaltWater;
//////////////////////////////
// Primary variable indices
@@ -106,9 +109,13 @@ struct BlackOilTwoPhaseIndices
static const int foamConcentrationIdx =
enableFoam ? PVOffset + numPhases + numSolvents + numPolymers : -1000;
//! Index of the primary variable for the salt
static const int saltConcentrationIdx =
enableSaltWater ? 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 + numSaltWater : - 1000;
//////////////////////
// Equation indices
@@ -171,9 +178,13 @@ struct BlackOilTwoPhaseIndices
static const int contiFoamEqIdx =
enableFoam ? PVOffset + numPhases + numSolvents + numPolymers : -1000;
//! Index of the continuity equation for the salt component
static const int contiSaltWaterEqIdx =
enableSaltWater ? 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 + numSaltWater : -1000;
};
} // namespace Opm