3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
porousmediumflow/2p/sequential/indices.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*****************************************************************************
4 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_SEQUENTIAL_2P_INDICES_HH
25#define DUMUX_SEQUENTIAL_2P_INDICES_HH
26
27namespace Dumux {
33{
34 // Formulations
35 static const int pwsn = 0;
36 static const int pnsw = 1;
37 static const int pwsw = 2;
38 static const int pnsn = 3;
39
40 static const int pGlobalSw = 4;
41 static const int pGlobalSn = 5;
42
43 // Phase indices
44 static const int wPhaseIdx = 0;
45 static const int nPhaseIdx = 1;
46 static const int totalPhaseIdx = 2;
47
48 //saturation flags
49 static const int saturationW = 0;
50 static const int saturationN = 1;
51 static const int saturationNw = saturationN;
52
53 //pressure flags
54 static const int pressureW = 0;
55 static const int pressureN = 1;
56 static const int pressureNw = pressureN;
57 static const int pressureGlobal = 2;
58
59 //velocity flags
60 static const int velocityW = 0;
61 static const int velocityN = 1;
62 static const int velocityNw = velocityN;
63 static const int velocityTotal = 2;
64};
65
73template <int formulation = SequentialTwoPCommonIndices::pwsn, int PVOffset = 0>
75{
76 // Primary variable indices
77 static const int pressureIdx = PVOffset + 0;
78 static const int saturationIdx = PVOffset + 1;
79
80 // indices of the primary variables
81 static const int pwIdx = PVOffset + 0;
82 static const int snIdx = PVOffset + 1;
83
85 //Set the types of the single models depending on the formulation
86 static const int pressureType = pressureW;
87 static const int saturationType = saturationNw;
88
89 static const int velocityDefault = velocityNw;
91
92 // indices of the equations
93 static const int contiWEqIdx = PVOffset + 0;
94 static const int pressureEqIdx = contiWEqIdx;
95 static const int contiNEqIdx = PVOffset + 1;
96 static const int satEqIdx = contiNEqIdx;
97 static const int transportEqIdx = satEqIdx;
98};
99
106template <int PVOffset>
109{
110 // Primary variable indices
111 static const int pressureIdx = PVOffset + 0;
112 static const int saturationIdx = PVOffset + 1;
113
114 // indices of the primary variables
115 static const int pnIdx = PVOffset + 0;
116 static const int swIdx = PVOffset + 1;
117
119 //Set the types of the single models depending on the formulation
120 static const int pressureType = pressureNw;
121 static const int saturationType = saturationW;
122
123 static const int velocityDefault = velocityW;
125
126 // indices of the equations
127 static const int contiNEqIdx = PVOffset + 0;
128 static const int pressureEqIdx = contiNEqIdx;
129 static const int contiWEqIdx = PVOffset + 1;
130 static const int satEqIdx = contiWEqIdx;
131 static const int transportEqIdx = satEqIdx;
132};
133
134
141template <int PVOffset>
144{
145 // Primary variable indices
146 static const int pressureIdx = PVOffset + 0;
147 static const int saturationIdx = PVOffset + 1;
148
149 // indices of the primary variables
150 static const int pwIdx = PVOffset + 0;
151 static const int swIdx = PVOffset + 1;
152
154 //Set the types of the single models depending on the formulation
155 static const int pressureType = pressureW;
156 static const int saturationType = saturationW;
157
158 static const int velocityDefault = velocityW;
160
161 // indices of the equations
162 static const int contiWEqIdx = PVOffset + 0;
163 static const int pressureEqIdx = contiWEqIdx;
164 static const int contiNEqIdx = PVOffset + 1;
165 static const int satEqIdx = contiNEqIdx;
166 static const int transportEqIdx = satEqIdx;
167};
168
175template <int PVOffset>
178{
179 // Primary variable indices
180 static const int pressureIdx = PVOffset + 0;
181 static const int saturationIdx = PVOffset + 1;
182
183 // indices of the primary variables
184 static const int pnIdx = PVOffset + 0;
185 static const int snIdx = PVOffset + 1;
186
188 //Set the types of the single models depending on the formulation
189 static const int pressureType = pressureNw;
190 static const int saturationType = saturationNw;
191
192 static const int velocityDefault = velocityNw;
194
195 // indices of the equations
196 static const int contiNEqIdx = PVOffset + 0;
197 static const int pressureEqIdx = contiNEqIdx;
198 static const int contiWEqIdx = PVOffset + 1;
199 static const int satEqIdx = contiWEqIdx;
200 static const int transportEqIdx = satEqIdx;
201};
202
203
210template <int PVOffset>
212{
213 // Primary variable indices
214 static const int pressureIdx = PVOffset + 0;
215 static const int saturationIdx = PVOffset + 1;
216
217 // indices of the primary variables
218 static const int pGlobalIdx = PVOffset + 0;
219 static const int swIdx = PVOffset + 1;
220
222 //Set the types of the single models depending on the formulation
223 static const int pressureType = pressureGlobal;
224 static const int saturationType = saturationW;
225
226 static const int velocityDefault = velocityTotal;
228
229 // indices of the equations
230 static const int pressureEqIdx = PVOffset + 0;
231 static const int satEqIdx = PVOffset + 1;
232 static const int transportEqIdx = satEqIdx;
233};
234
241template <int PVOffset>
244{
245 // Primary variable indices
246 static const int pressureIdx = PVOffset + 0;
247 static const int saturationIdx = PVOffset + 1;
248
249 // indices of the primary variables
250 static const int pGlobalIdx = PVOffset + 0;
251 static const int snIdx = PVOffset + 1;
252
254 //Set the types of the single models depending on the formulation
255 static const int pressureType = pressureGlobal;
256 static const int saturationType = saturationNw;
257
258 static const int velocityDefault = velocityTotal;
260
261 // indices of the equations
262 static const int pressureEqIdx = PVOffset + 0;
263 static const int satEqIdx = PVOffset + 1;
264 static const int transportEqIdx = satEqIdx;
265};
266
267// \}
268} // namespace Dumux
269
270#endif
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
The common indices for the isothermal two-phase model.
Definition: porousmediumflow/2p/sequential/indices.hh:33
static const int pwsn
pw and sn as primary variables
Definition: porousmediumflow/2p/sequential/indices.hh:35
static const int pGlobalSw
pGlobal and sw as primary variables
Definition: porousmediumflow/2p/sequential/indices.hh:40
static const int pressureGlobal
Indicates global-pressure.
Definition: porousmediumflow/2p/sequential/indices.hh:57
static const int saturationNw
Indicates non-wetting phase saturation.
Definition: porousmediumflow/2p/sequential/indices.hh:51
static const int pressureNw
Indicates non-wetting phase pressure.
Definition: porousmediumflow/2p/sequential/indices.hh:56
static const int pnsw
pn and sw as primary variables
Definition: porousmediumflow/2p/sequential/indices.hh:36
static const int velocityN
Indicates non-wetting phase velocity.
Definition: porousmediumflow/2p/sequential/indices.hh:61
static const int velocityNw
Indicates non-wetting phase velocity.
Definition: porousmediumflow/2p/sequential/indices.hh:62
static const int nPhaseIdx
index of the non-wetting phase in a phase vector
Definition: porousmediumflow/2p/sequential/indices.hh:45
static const int pressureW
Indicates wetting phase pressure.
Definition: porousmediumflow/2p/sequential/indices.hh:54
static const int velocityTotal
Indicates total velocity.
Definition: porousmediumflow/2p/sequential/indices.hh:63
static const int totalPhaseIdx
index of the total phase (wetting + nonwetting)
Definition: porousmediumflow/2p/sequential/indices.hh:46
static const int pGlobalSn
pGlobal and sn as primary variables
Definition: porousmediumflow/2p/sequential/indices.hh:41
static const int pwsw
pw and sw as primary variables
Definition: porousmediumflow/2p/sequential/indices.hh:37
static const int saturationW
Indicates wetting phase saturation.
Definition: porousmediumflow/2p/sequential/indices.hh:49
static const int velocityW
Indicates wetting phase velocity.
Definition: porousmediumflow/2p/sequential/indices.hh:60
static const int wPhaseIdx
index of the wetting phase in a phase vector
Definition: porousmediumflow/2p/sequential/indices.hh:44
static const int saturationN
Indicates non-wetting phase saturation.
Definition: porousmediumflow/2p/sequential/indices.hh:50
static const int pnsn
pn and sn as primary variables
Definition: porousmediumflow/2p/sequential/indices.hh:38
static const int pressureN
Indicates non-wetting phase pressure.
Definition: porousmediumflow/2p/sequential/indices.hh:55
The indices for the formulation of the isothermal two-phase model.
Definition: porousmediumflow/2p/sequential/indices.hh:75
static const int contiNEqIdx
index of the continuity equation of the non-wetting phase
Definition: porousmediumflow/2p/sequential/indices.hh:95
static const int contiWEqIdx
index of the continuity equation of the wetting phase
Definition: porousmediumflow/2p/sequential/indices.hh:93
static const int saturationIdx
index for the primary saturation variable in a solution vector
Definition: porousmediumflow/2p/sequential/indices.hh:78
static const int transportEqIdx
index of the saturation transport equation
Definition: porousmediumflow/2p/sequential/indices.hh:97
static const int satEqIdx
index of the continuity equation of the non-wetting phase (saturation equation)
Definition: porousmediumflow/2p/sequential/indices.hh:96
static const int pressureEqIdx
index of the pressure equation (total mass balance)
Definition: porousmediumflow/2p/sequential/indices.hh:94
static const int pwIdx
index of the wetting phase pressure
Definition: porousmediumflow/2p/sequential/indices.hh:81
static const int snIdx
index of the nonwetting phase saturation
Definition: porousmediumflow/2p/sequential/indices.hh:82
static const int pressureIdx
index for the primary pressure variable in a solution vector
Definition: porousmediumflow/2p/sequential/indices.hh:77