Line | Branch | Exec | Source |
---|---|---|---|
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 | // SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder | ||
5 | // SPDX-License-Identifier: GPL-3.0-or-later | ||
6 | // | ||
7 | /*! | ||
8 | * \file | ||
9 | * \ingroup FluidStates | ||
10 | * \brief Represents all relevant thermodynamic quantities of a | ||
11 | * multi-phase fluid system assuming immiscibility and | ||
12 | * thermodynamic equilibrium. | ||
13 | */ | ||
14 | #ifndef DUMUX_IMMISCIBLE_FLUID_STATE_HH | ||
15 | #define DUMUX_IMMISCIBLE_FLUID_STATE_HH | ||
16 | |||
17 | #include <limits> | ||
18 | #include <type_traits> | ||
19 | |||
20 | namespace Dumux { | ||
21 | |||
22 | /*! | ||
23 | * \ingroup FluidStates | ||
24 | * \brief Represents all relevant thermodynamic quantities of a | ||
25 | * multi-phase fluid system assuming immiscibility and | ||
26 | * thermodynamic equilibrium. | ||
27 | */ | ||
28 | template <class ScalarType, class FluidSystem> | ||
29 | class ImmiscibleFluidState | ||
30 | { | ||
31 | public: | ||
32 | static constexpr int numPhases = FluidSystem::numPhases; | ||
33 | static constexpr int numComponents = FluidSystem::numComponents; | ||
34 | |||
35 | //! export the scalar type | ||
36 | using Scalar = ScalarType; | ||
37 | |||
38 | //! default constructor | ||
39 |
14/17✓ Branch 0 taken 5124 times.
✓ Branch 1 taken 736916 times.
✓ Branch 2 taken 13600 times.
✓ Branch 3 taken 168304 times.
✓ Branch 4 taken 38174 times.
✓ Branch 5 taken 63659 times.
✓ Branch 6 taken 2584 times.
✓ Branch 7 taken 165973 times.
✓ Branch 8 taken 486063 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 3984 times.
✓ Branch 11 taken 100760 times.
✓ Branch 12 taken 77648 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 1354 times.
✓ Branch 15 taken 608634 times.
✗ Branch 16 not taken.
|
137890216 | ImmiscibleFluidState() = default; |
40 | |||
41 | //! copy constructor from arbitrary fluid state | ||
42 | template <class FluidState, typename std::enable_if_t<!std::is_same<FluidState, ImmiscibleFluidState>::value, int> = 0> | ||
43 | ImmiscibleFluidState(const FluidState &fs) | ||
44 | { assign(fs); } | ||
45 | |||
46 | // copy and move constructor / assignment operator | ||
47 | ImmiscibleFluidState(const ImmiscibleFluidState &fs) = default; | ||
48 | ImmiscibleFluidState(ImmiscibleFluidState &&fs) = default; | ||
49 | ImmiscibleFluidState& operator=(const ImmiscibleFluidState &fs) = default; | ||
50 | ImmiscibleFluidState& operator=(ImmiscibleFluidState &&fs) = default; | ||
51 | |||
52 | /***************************************************** | ||
53 | * Generic access to fluid properties (No assumptions | ||
54 | * on thermodynamic equilibrium required) | ||
55 | *****************************************************/ | ||
56 | |||
57 | /*! | ||
58 | * \brief Returns the index of the most wetting phase in the | ||
59 | * fluid-solid configuration (for porous medium systems). | ||
60 | */ | ||
61 | ✗ | int wettingPhase() const { return wPhaseIdx_; } | |
62 | |||
63 | /*! | ||
64 | * \brief Returns the saturation \f$S_\alpha\f$ of a fluid phase \f$\alpha\f$ in \f$\mathrm{[-]}\f$. | ||
65 | * | ||
66 | * The saturation is defined as the pore space occupied by the fluid divided by the total pore space: | ||
67 | * \f[S_\alpha := \frac{\phi \mathcal{V}_\alpha}{\phi \mathcal{V}}\f] | ||
68 | * | ||
69 | * \param phaseIdx the index of the phase | ||
70 | */ | ||
71 | Scalar saturation(int phaseIdx) const | ||
72 |
12/16✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
✓ Branch 2 taken 7867250 times.
✓ Branch 3 taken 85365 times.
✓ Branch 4 taken 158582 times.
✓ Branch 5 taken 131522 times.
✓ Branch 6 taken 14800917 times.
✓ Branch 7 taken 1537712 times.
✓ Branch 8 taken 14800917 times.
✓ Branch 9 taken 1483589 times.
✓ Branch 10 taken 941464 times.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
✓ Branch 14 taken 8 times.
✓ Branch 15 taken 8 times.
|
752678636 | { return saturation_[phaseIdx]; } |
73 | |||
74 | /*! | ||
75 | * \brief Returns the molar fraction \f$x^\kappa_\alpha\f$ of the component \f$\kappa\f$ in fluid phase \f$\alpha\f$ in \f$\mathrm{[-]}\f$. | ||
76 | * | ||
77 | * The molar fraction \f$x^\kappa_\alpha\f$ is defined as the ratio of the number of molecules | ||
78 | * of component \f$\kappa\f$ and the total number of molecules of the phase \f$\alpha\f$. | ||
79 | * They are set either 1 or 0 in a phase since this is an immiscible fluidstate. | ||
80 | * \param phaseIdx the index of the phase | ||
81 | * \param compIdx the index of the component | ||
82 | */ | ||
83 | ✗ | Scalar moleFraction(int phaseIdx, int compIdx) const | |
84 |
4/6✗ Branch 0 not taken.
✗ Branch 1 not taken.
✓ Branch 2 taken 2979484 times.
✓ Branch 3 taken 2979484 times.
✓ Branch 4 taken 1489738 times.
✓ Branch 5 taken 1489738 times.
|
8938444 | { return (phaseIdx == compIdx) ? 1.0 : 0.0; } |
85 | |||
86 | /*! | ||
87 | * \brief Returns the mass fraction \f$X^\kappa_\alpha\f$ of component \f$\kappa\f$ in fluid phase \f$\alpha\f$ in \f$\mathrm{[-]}\f$. | ||
88 | * | ||
89 | * They are set either 1 or 0 in a phase since this is an immiscible fluidstate. | ||
90 | * | ||
91 | * \param phaseIdx the index of the phase | ||
92 | * \param compIdx the index of the component | ||
93 | */ | ||
94 | ✗ | Scalar massFraction(int phaseIdx, int compIdx) const | |
95 | ✗ | { return (phaseIdx == compIdx) ? 1.0 : 0.0; } | |
96 | |||
97 | /*! | ||
98 | * \brief The average molar mass \f$\overline M_\alpha\f$ of phase \f$\alpha\f$ in \f$\mathrm{[kg/mol]}\f$ | ||
99 | * | ||
100 | * The average molar mass is the mean mass of a mole of the | ||
101 | * fluid at current composition. It is defined as the sum of the | ||
102 | * component's molar masses weighted by the current mole fraction: | ||
103 | * \f[\mathrm{ \overline M_\alpha = \sum_\kappa M^\kappa x_\alpha^\kappa}\f] | ||
104 | * | ||
105 | * Since this is an immiscible fluidstate we simply consider the molarMass of the | ||
106 | * pure component/phase. | ||
107 | */ | ||
108 | ✗ | Scalar averageMolarMass(int phaseIdx) const | |
109 |
1/4✗ Branch 0 not taken.
✗ Branch 1 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
|
58060534 | { return FluidSystem::molarMass(/*compIdx=*/phaseIdx); } |
110 | |||
111 | /*! | ||
112 | * \brief The molar concentration \f$c^\kappa_\alpha\f$ of component \f$\kappa\f$ in fluid phase \f$\alpha\f$ in \f$\mathrm{[mol/m^3]}\f$ | ||
113 | * | ||
114 | * This quantity is usually called "molar concentration" or just | ||
115 | * "concentration", but there are many other (though less common) | ||
116 | * measures for concentration. | ||
117 | * | ||
118 | * http://en.wikipedia.org/wiki/Concentration | ||
119 | */ | ||
120 | Scalar molarity(int phaseIdx, int compIdx) const | ||
121 | 18 | { return molarDensity(phaseIdx)*moleFraction(phaseIdx, compIdx); } | |
122 | |||
123 | /*! | ||
124 | * \brief The fugacity \f$f^\kappa_\alpha\f$ of component \f$\kappa\f$ | ||
125 | * in fluid phase \f$\alpha\f$ in \f$\mathrm{[Pa]}\f$ | ||
126 | * | ||
127 | * The fugacity is defined as: | ||
128 | * \f$f_\alpha^\kappa := \Phi^\kappa_\alpha x^\kappa_\alpha p_\alpha \;,\f$ | ||
129 | * where \f$\Phi^\kappa_\alpha\f$ is the fugacity coefficient \cite reid1987 . | ||
130 | * The physical meaning of fugacity becomes clear from the equation: | ||
131 | * \f[f_\alpha^\kappa = p_\alpha \exp\left\{\frac{\zeta^\kappa_\alpha}{R T_\alpha} \right\} \;,\f] | ||
132 | * where \f$\zeta^\kappa_\alpha\f$ represents the \f$\kappa\f$'s chemical | ||
133 | * potential in phase \f$\alpha\f$, \f$R\f$ stands for the ideal gas constant, | ||
134 | * and \f$T_\alpha\f$ for the absolute temperature of phase \f$\alpha\f$. Assuming thermal equilibrium, | ||
135 | * there is a one-to-one mapping between a component's chemical potential | ||
136 | * \f$\zeta^\kappa_\alpha\f$ and its fugacity \f$f^\kappa_\alpha\f$. In this | ||
137 | * case chemical equilibrium can thus be expressed by: | ||
138 | * \f[f^\kappa := f^\kappa_\alpha = f^\kappa_\beta\quad\forall \alpha, \beta\f] | ||
139 | * | ||
140 | * To avoid numerical issues with code that assumes miscibility, | ||
141 | * we return a fugacity of 0 for components which do not mix with | ||
142 | * the specified phase. (Actually it is undefined, but for finite | ||
143 | * fugacity coefficients, the only way to get components | ||
144 | * completely out of a phase is 0 to feed it zero fugacity.) | ||
145 | */ | ||
146 | Scalar fugacity(int phaseIdx, int compIdx) const | ||
147 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | { return phaseIdx == compIdx ? pressure(phaseIdx) : 0.0; } |
148 | |||
149 | /*! | ||
150 | * \brief The fugacity coefficient \f$\Phi^\kappa_\alpha\f$ of component \f$\kappa\f$ in fluid phase \f$\alpha\f$ in \f$\mathrm{[-]}\f$ | ||
151 | * | ||
152 | * Since we assume immiscibility, the fugacity coefficients for | ||
153 | * the components which are not miscible with the phase is | ||
154 | * infinite. Beware that this will very likely break your code if | ||
155 | * you don't keep that in mind. | ||
156 | */ | ||
157 | ✗ | Scalar fugacityCoefficient(int phaseIdx, int compIdx) const | |
158 | ✗ | { return phaseIdx == compIdx ? 1.0 : std::numeric_limits<Scalar>::infinity(); } | |
159 | |||
160 | /*! | ||
161 | * \brief The partial pressure of a component in a phase \f$\mathrm{[Pa]}\f$ | ||
162 | * | ||
163 | * To avoid numerical issues with code that assumes miscibility, | ||
164 | * we return a partial pressure of 0 for components which do not mix with | ||
165 | * the specified phase. Actually it is undefined. | ||
166 | */ | ||
167 | Scalar partialPressure(int phaseIdx, int compIdx) const | ||
168 | 8298092 | { return phaseIdx == compIdx ? pressure(phaseIdx) : 0.0; } | |
169 | |||
170 | /*! | ||
171 | * \brief The molar volume \f$v_{mol,\alpha}\f$ of a fluid phase \f$\alpha\f$ in \f$\mathrm{[m^3/mol]}\f$ | ||
172 | * | ||
173 | * This quantity is the inverse of the molar density. | ||
174 | */ | ||
175 | Scalar molarVolume(int phaseIdx) const | ||
176 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | { return 1.0/molarDensity(phaseIdx); } |
177 | |||
178 | /*! | ||
179 | * \brief The mass density \f$\rho_\alpha\f$ of the fluid phase | ||
180 | * \f$\alpha\f$ in \f$\mathrm{[kg/m^3]}\f$ | ||
181 | */ | ||
182 | ✗ | Scalar density(int phaseIdx) const | |
183 |
11/15✓ Branch 0 taken 86640981 times.
✓ Branch 1 taken 2469148 times.
✓ Branch 2 taken 849907 times.
✓ Branch 3 taken 6614184 times.
✓ Branch 4 taken 1174963 times.
✓ Branch 5 taken 19047 times.
✓ Branch 6 taken 1135459 times.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✗ Branch 9 not taken.
✓ Branch 10 taken 931 times.
✓ Branch 11 taken 48 times.
✓ Branch 12 taken 44 times.
✓ Branch 13 taken 43 times.
✗ Branch 14 not taken.
|
2980154270 | { return density_[phaseIdx]; } |
184 | |||
185 | /*! | ||
186 | * \brief The molar density \f$\rho_{mol,\alpha}\f$ | ||
187 | * of a fluid phase \f$\alpha\f$ in \f$\mathrm{[mol/m^3]}\f$ | ||
188 | * | ||
189 | * The molar density is defined by the mass density \f$\rho_\alpha\f$ and the mean molar mass \f$\overline M_\alpha\f$: | ||
190 | * | ||
191 | * \f[\rho_{mol,\alpha} = \frac{\rho_\alpha}{\overline M_\alpha} \;.\f] | ||
192 | */ | ||
193 | Scalar molarDensity(int phaseIdx) const | ||
194 |
2/3✓ Branch 0 taken 8 times.
✓ Branch 1 taken 9 times.
✗ Branch 2 not taken.
|
269 | { return molarDensity_[phaseIdx]; } |
195 | |||
196 | /*! | ||
197 | * \brief The absolute temperature\f$T_\alpha\f$ of a fluid phase \f$\alpha\f$ in \f$\mathrm{[K]}\f$ | ||
198 | */ | ||
199 | ✗ | Scalar temperature(int phaseIdx) const | |
200 |
16/16✓ Branch 0 taken 8266754 times.
✓ Branch 1 taken 73813682 times.
✓ Branch 2 taken 74044156 times.
✓ Branch 3 taken 71747462 times.
✓ Branch 4 taken 6162167 times.
✓ Branch 5 taken 6173237 times.
✓ Branch 6 taken 10812964 times.
✓ Branch 7 taken 10021402 times.
✓ Branch 8 taken 67256908 times.
✓ Branch 9 taken 67257766 times.
✓ Branch 10 taken 57986184 times.
✓ Branch 11 taken 57986184 times.
✓ Branch 13 taken 321648 times.
✓ Branch 14 taken 643296 times.
✓ Branch 15 taken 109248 times.
✓ Branch 16 taken 218496 times.
|
469503588 | { return temperature_[phaseIdx]; } |
201 | |||
202 | /*! | ||
203 | * \brief The pressure \f$p_\alpha\f$ of a fluid phase \f$\alpha\f$ in \f$\mathrm{[Pa]}\f$ | ||
204 | */ | ||
205 | ✗ | Scalar pressure(int phaseIdx) const | |
206 |
32/34✓ Branch 0 taken 7228691 times.
✓ Branch 1 taken 39221348 times.
✓ Branch 2 taken 37374377 times.
✓ Branch 3 taken 38118045 times.
✓ Branch 4 taken 6815259 times.
✓ Branch 5 taken 4378645 times.
✓ Branch 6 taken 11335573 times.
✓ Branch 7 taken 10586498 times.
✓ Branch 8 taken 82403901 times.
✓ Branch 9 taken 63281147 times.
✓ Branch 10 taken 77385821 times.
✓ Branch 11 taken 58889891 times.
✓ Branch 12 taken 3677352 times.
✓ Branch 13 taken 4185040 times.
✓ Branch 14 taken 804592 times.
✓ Branch 15 taken 1717900 times.
✓ Branch 16 taken 14901213 times.
✓ Branch 17 taken 2552889 times.
✓ Branch 18 taken 14868213 times.
✓ Branch 19 taken 1483589 times.
✓ Branch 20 taken 14803989 times.
✓ Branch 21 taken 1483589 times.
✓ Branch 22 taken 14803989 times.
✓ Branch 23 taken 1483589 times.
✓ Branch 24 taken 7416120 times.
✓ Branch 25 taken 745180 times.
✓ Branch 26 taken 7416120 times.
✓ Branch 27 taken 745180 times.
✗ Branch 28 not taken.
✓ Branch 29 taken 33552406 times.
✓ Branch 30 taken 33552406 times.
✓ Branch 31 taken 33552406 times.
✓ Branch 32 taken 931 times.
✗ Branch 33 not taken.
|
2105159163 | { return pressure_[phaseIdx]; } |
207 | |||
208 | /*! | ||
209 | * \brief The specific enthalpy \f$h_\alpha\f$ of a fluid phase \f$\alpha\f$ in \f$\mathrm{[J/kg]}\f$ | ||
210 | */ | ||
211 | ✗ | Scalar enthalpy(int phaseIdx) const | |
212 |
3/4✓ Branch 0 taken 849821 times.
✓ Branch 1 taken 1 times.
✓ Branch 2 taken 1135459 times.
✗ Branch 3 not taken.
|
25984185 | { return enthalpy_[phaseIdx]; } |
213 | |||
214 | /*! | ||
215 | * \brief The specific internal energy \f$u_\alpha\f$ of a fluid phase \f$\alpha\f$ in \f$\mathrm{[J/kg]}\f$ | ||
216 | * | ||
217 | * The specific internal energy is defined by the relation: | ||
218 | * | ||
219 | * \f[u_\alpha = h_\alpha - \frac{p_\alpha}{\rho_\alpha}\f] | ||
220 | */ | ||
221 | Scalar internalEnergy(int phaseIdx) const | ||
222 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
43912665 | { return enthalpy_[phaseIdx] - pressure(phaseIdx)/density(phaseIdx); } |
223 | |||
224 | /*! | ||
225 | * \brief The dynamic viscosity \f$\mu_\alpha\f$ of fluid phase \f$\alpha\f$ in \f$\mathrm{[Pa s]}\f$ | ||
226 | */ | ||
227 | ✗ | Scalar viscosity(int phaseIdx) const | |
228 |
13/16✓ Branch 0 taken 14957 times.
✓ Branch 1 taken 33238733 times.
✓ Branch 2 taken 2887710 times.
✓ Branch 3 taken 142168 times.
✓ Branch 4 taken 1799564 times.
✓ Branch 5 taken 1184 times.
✓ Branch 6 taken 1135459 times.
✓ Branch 7 taken 1184 times.
✗ Branch 8 not taken.
✗ Branch 9 not taken.
✓ Branch 11 taken 14800917 times.
✓ Branch 12 taken 1483589 times.
✓ Branch 13 taken 14800917 times.
✓ Branch 14 taken 1483589 times.
✓ Branch 15 taken 931 times.
✗ Branch 16 not taken.
|
485180530 | { return viscosity_[phaseIdx]; } |
229 | |||
230 | /***************************************************** | ||
231 | * Access to fluid properties which only make sense | ||
232 | * if assuming thermodynamic equilibrium | ||
233 | *****************************************************/ | ||
234 | |||
235 | /*! | ||
236 | * \brief The temperature within the domain \f$\mathrm{[K]}\f$ | ||
237 | */ | ||
238 | ✗ | Scalar temperature() const | |
239 | ✗ | { return temperature_[0]; } | |
240 | |||
241 | /*! | ||
242 | * \brief The fugacity of a component \f$\mathrm{[Pa]}\f$ | ||
243 | * | ||
244 | * This assumes chemical equilibrium. | ||
245 | */ | ||
246 | Scalar fugacity(int compIdx) const | ||
247 | { return fugacity(0, compIdx); } | ||
248 | |||
249 | |||
250 | /***************************************************** | ||
251 | * Setter methods. Note that these are not part of the | ||
252 | * generic FluidState interface but specific for each | ||
253 | * implementation... | ||
254 | *****************************************************/ | ||
255 | |||
256 | /*! | ||
257 | * \brief Retrieve all parameters from an arbitrary fluid | ||
258 | * state. | ||
259 | * \param fs Fluidstate | ||
260 | * | ||
261 | * \note If the other fluid state object is inconsistent with the | ||
262 | * thermodynamic equilibrium, the result of this method is | ||
263 | * undefined. | ||
264 | */ | ||
265 | template <class FluidState> | ||
266 | void assign(const FluidState &fs) | ||
267 | { | ||
268 | for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) | ||
269 | { | ||
270 | pressure_[phaseIdx] = fs.pressure(phaseIdx); | ||
271 | saturation_[phaseIdx] = fs.saturation(phaseIdx); | ||
272 | density_[phaseIdx] = fs.density(phaseIdx); | ||
273 | molarDensity_[phaseIdx] = fs.molarDensity(phaseIdx); | ||
274 | enthalpy_[phaseIdx] = fs.enthalpy(phaseIdx); | ||
275 | viscosity_[phaseIdx] = fs.viscosity(phaseIdx); | ||
276 | temperature_[phaseIdx] = fs.temperature(0); | ||
277 | } | ||
278 | } | ||
279 | |||
280 | /*! | ||
281 | * \brief Set the temperature \f$\mathrm{[K]}\f$ of a fluid phase | ||
282 | */ | ||
283 | ✗ | void setTemperature(int phaseIdx, Scalar value) | |
284 |
3/7✓ Branch 1 taken 80 times.
✓ Branch 2 taken 2940 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 80 times.
✗ Branch 5 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
|
285869822 | { temperature_[phaseIdx] = value; } |
285 | |||
286 | /*! | ||
287 | * \brief Set the temperature \f$\mathrm{[K]}\f$ of a fluid phase | ||
288 | */ | ||
289 | ✗ | void setTemperature(Scalar value) | |
290 | { | ||
291 |
4/4✓ Branch 0 taken 4 times.
✓ Branch 1 taken 8 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 1 times.
|
102890 | for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) |
292 |
0/24✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
✗ Branch 34 not taken.
✗ Branch 35 not taken.
|
25 | temperature_[phaseIdx] = value; |
293 | ✗ | } | |
294 | |||
295 | /*! | ||
296 | * \brief Set the fluid pressure of a phase \f$\mathrm{[Pa]}\f$ | ||
297 | */ | ||
298 | ✗ | void setPressure(int phaseIdx, Scalar value) | |
299 |
5/26✓ Branch 0 taken 3649267 times.
✓ Branch 1 taken 75231787 times.
✓ Branch 2 taken 60432853 times.
✓ Branch 3 taken 3569961 times.
✓ Branch 4 taken 80 times.
✗ Branch 5 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
✗ Branch 34 not taken.
✗ Branch 35 not taken.
|
197750593 | { pressure_[phaseIdx] = value; } |
300 | |||
301 | /*! | ||
302 | * \brief Set the saturation of a phase \f$\mathrm{[-]}\f$ | ||
303 | */ | ||
304 | ✗ | void setSaturation(int phaseIdx, Scalar value) | |
305 |
3/25✓ Branch 1 taken 1489818 times.
✓ Branch 2 taken 2940 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 1489818 times.
✗ Branch 5 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
✗ Branch 34 not taken.
✗ Branch 35 not taken.
|
285860501 | { saturation_[phaseIdx] = value; } |
306 | |||
307 | /*! | ||
308 | * \brief Set the density of a phase \f$\mathrm{[kg/m^3]}\f$ | ||
309 | */ | ||
310 | ✗ | void setDensity(int phaseIdx, Scalar value) | |
311 |
3/25✓ Branch 1 taken 1883008 times.
✓ Branch 2 taken 2940 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 80 times.
✗ Branch 5 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 31 not taken.
✗ Branch 32 not taken.
✗ Branch 34 not taken.
✗ Branch 35 not taken.
|
221857177 | { density_[phaseIdx] = value; } |
312 | |||
313 | /*! | ||
314 | * \brief Set the molar density of a phase \f$\mathrm{[kg/m^3]}\f$ | ||
315 | */ | ||
316 | void setMolarDensity(int phaseIdx, Scalar value) | ||
317 | 268 | { molarDensity_[phaseIdx] = value; } | |
318 | |||
319 | /*! | ||
320 | * \brief Set the specific enthalpy of a phase \f$\mathrm{[J/kg]}\f$ | ||
321 | */ | ||
322 | ✗ | void setEnthalpy(int phaseIdx, Scalar value) | |
323 |
3/5✓ Branch 1 taken 80 times.
✓ Branch 2 taken 2940 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 80 times.
✗ Branch 5 not taken.
|
244584423 | { enthalpy_[phaseIdx] = value; } |
324 | |||
325 | /*! | ||
326 | * \brief Set the dynamic viscosity of a phase \f$\mathrm{[Pa s]}\f$ | ||
327 | */ | ||
328 | ✗ | void setViscosity(int phaseIdx, Scalar value) | |
329 |
4/14✓ Branch 0 taken 65295886 times.
✓ Branch 1 taken 65295966 times.
✓ Branch 2 taken 2940 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 80 times.
✗ Branch 5 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
✗ Branch 13 not taken.
✗ Branch 14 not taken.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
|
202597709 | { viscosity_[phaseIdx] = value; } |
330 | |||
331 | /*! | ||
332 | * \brief Set the index of the most wetting phase | ||
333 | */ | ||
334 | ✗ | void setWettingPhase(int phaseIdx) | |
335 |
2/3✓ Branch 0 taken 90794 times.
✓ Branch 1 taken 14790291 times.
✗ Branch 2 not taken.
|
74857634 | { wPhaseIdx_ = phaseIdx; } |
336 | protected: | ||
337 | //! zero-initialize all data members with braces syntax | ||
338 | Scalar pressure_[numPhases] = {}; | ||
339 | Scalar saturation_[numPhases] = {}; | ||
340 | Scalar density_[numPhases] = {}; | ||
341 | Scalar molarDensity_[numPhases] = {}; | ||
342 | Scalar enthalpy_[numPhases] = {}; | ||
343 | Scalar viscosity_[numPhases] = {}; | ||
344 | Scalar temperature_[numPhases] = {}; | ||
345 | |||
346 | int wPhaseIdx_{0}; | ||
347 | }; | ||
348 | |||
349 | } // end namespace Dumux | ||
350 | |||
351 | #endif | ||
352 |