Skip to content
Snippets Groups Projects
Commit 242743c3 authored by Timo Koch's avatar Timo Koch
Browse files

[2p1c] Rename pri var index switch1Idx to switchIdx

parent d0d11732
No related branches found
No related tags found
1 merge request!892[pm][ff] Improve indices, move into model traits, [pm] free volume variables from type tag
......@@ -41,7 +41,7 @@ public:
// Primary variable indices
static const int pressureIdx = 0; //!< Index for phase pressure in a solution vector.
static const int switch1Idx = 1; //!< Index of saturation or temperature.
static const int switchIdx = 1; //!< Index of saturation or temperature.
// Equation indices
static const int conti0EqIdx = 0; //!< Index of the mass conservation equation for the water component.
......
......@@ -51,7 +51,7 @@ class TwoPOneCPrimaryVariableSwitch
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
enum {
switchIdx = Indices::switch1Idx,
switchIdx = Indices::switchIdx,
pressureIdx = Indices::pressureIdx,
......
......@@ -48,7 +48,7 @@ class TwoPOneCVolumeVariables
wPhaseIdx = FS::wPhaseIdx,
nPhaseIdx = FS::nPhaseIdx,
switch1Idx = Indices::switch1Idx,
switchIdx = Indices::switchIdx,
pressureIdx = Indices::pressureIdx
};
......@@ -133,7 +133,7 @@ public:
Scalar sg(0.0);
if (phasePresence == twoPhases)
{
sw = priVars[switch1Idx];
sw = priVars[switchIdx];
sg = 1.0 - sw;
}
else if (phasePresence == wPhaseOnly)
......@@ -169,7 +169,7 @@ public:
// get temperature
Scalar temperature;
if (phasePresence == wPhaseOnly || phasePresence == nPhaseOnly)
temperature = priVars[switch1Idx];
temperature = priVars[switchIdx];
else if (phasePresence == twoPhases)
temperature = FluidSystem::vaporTemperature(fluidState, wPhaseIdx);
else
......
......@@ -98,7 +98,7 @@ class InjectionProblem : public PorousMediumFlowProblem<TypeTag>
// copy some indices for convenience
enum {
pressureIdx = Indices::pressureIdx,
switch1Idx = Indices::switch1Idx,
switchIdx = Indices::switchIdx,
conti0EqIdx = Indices::conti0EqIdx,
energyEqIdx = Indices::energyEqIdx,
......@@ -229,7 +229,7 @@ public:
const Scalar densityW = 1000.0;
values[pressureIdx] = 101300.0 + (this->fvGridGeometry().bBoxMax()[1] - globalPos[1])*densityW*9.81; // hydrostatic pressure
values[switch1Idx] = 283.13;
values[switchIdx] = 283.13;
values.setState(wPhaseOnly);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment