From a6d90e3b290e0285a56756bc85a5af057de9f4f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ove=20S=C3=A6vareid?= Date: Tue, 17 Nov 2020 18:10:21 +0100 Subject: [PATCH] Handle OnePhaseIndices --- .../blackoil/blackoilonephaseindices.hh | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/opm/models/blackoil/blackoilonephaseindices.hh b/opm/models/blackoil/blackoilonephaseindices.hh index 6e1233b05..16c7b1549 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 @@ -48,6 +48,9 @@ struct BlackOilOnePhaseIndices //! Are solvents involved? static const bool enableSolvent = numSolventsV > 0; + //! Is extbo invoked? + static const bool enableExtbo = numExtbosV > 0; + //! Are polymers involved? static const bool enablePolymer = numPolymersV > 0; @@ -57,6 +60,9 @@ struct BlackOilOnePhaseIndices //! Number of solvent components to be considered static const int numSolvents = enableSolvent ? numSolventsV : 0; + //! Number of components to be considered for extbo + static const int numExtbos = enableExtbo ? numExtbosV : 0; + //! Number of polymer components to be considered static const int numPolymers = enablePolymer ? numPolymersV : 0; @@ -73,7 +79,7 @@ struct BlackOilOnePhaseIndices static const int numPhases = 1; //! The number of equations - static const int numEq = numPhases + numSolvents + numPolymers + numEnergy + numFoam + numBrine; + static const int numEq = numPhases + numSolvents + numExtbos + numPolymers + numEnergy + numFoam + numBrine; ////////////////////////////// // Primary variable indices @@ -97,6 +103,10 @@ struct BlackOilOnePhaseIndices static const int solventSaturationIdx = enableSolvent ? PVOffset + numPhases : -1000; + //! Index of the primary variable for the first extbo component + static const int zFractionIdx = + enableExtbo ? PVOffset + numPhases + numSolvents : -1000; + //! Index of the primary variable for the first polymer static const int polymerConcentrationIdx = enablePolymer ? PVOffset + numPhases + numSolvents : -1000; @@ -111,11 +121,11 @@ struct BlackOilOnePhaseIndices //! Index of the primary variable for the salt static const int saltConcentrationIdx = - enableBrine ? PVOffset + numPhases + numSolvents + numPolymers + numFoam : -1000; + enableBrine ? PVOffset + numPhases + numSolvents + numExtbos + numPolymers + numFoam : -1000; //! Index of the primary variable for temperature static const int temperatureIdx = - enableEnergy ? PVOffset + numPhases + numSolvents + numPolymers + numFoam + numBrine: - 1000; + enableEnergy ? PVOffset + numPhases + numSolvents + numExtbos + numPolymers + numFoam + numBrine: - 1000; ////////////////////// // Equation indices @@ -148,6 +158,10 @@ struct BlackOilOnePhaseIndices static const int contiSolventEqIdx = enableSolvent ? PVOffset + numPhases : -1000; + //! Index of the continuity equation for the first extbo component + static const int contiZfracEqIdx = + enableExtbo ? PVOffset + numPhases + numSolvents : -1000; + //! Index of the continuity equation for the first polymer component static const int contiPolymerEqIdx = enablePolymer ? PVOffset + numPhases + numSolvents : -1000; @@ -162,11 +176,11 @@ struct BlackOilOnePhaseIndices //! Index of the continuity equation for the salt component static const int contiBrineEqIdx = - enableBrine ? PVOffset + numPhases + numSolvents + numPolymers + numFoam : -1000; + enableBrine ? PVOffset + numPhases + numSolvents + numExtbos + numPolymers + numFoam : -1000; //! Index of the continuity equation for energy static const int contiEnergyEqIdx = - enableEnergy ? PVOffset + numPhases + numSolvents + numPolymers + numFoam + numBrine: -1000; + enableEnergy ? PVOffset + numPhases + numSolvents + numExtbos + numPolymers + numFoam + numBrine: -1000; }; } // namespace Opm