GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: dumux/dumux/material/fluidstates/immiscible.hh
Date: 2025-04-12 19:19:20
Exec Total Coverage
Lines: 49 49 100.0%
Functions: 0 0 -%
Branches: 158 219 72.1%

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-FileCopyrightText: 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/18
✗ Branch 0 not taken.
✓ Branch 1 taken 824395 times.
✓ Branch 2 taken 136 times.
✓ Branch 3 taken 93907 times.
✓ Branch 4 taken 256539 times.
✓ Branch 5 taken 92200 times.
✓ Branch 6 taken 1813 times.
✓ Branch 7 taken 226120 times.
✓ Branch 8 taken 8136 times.
✗ Branch 9 not taken.
✓ Branch 11 taken 97376 times.
✓ Branch 12 taken 2048 times.
✓ Branch 13 taken 3384 times.
✓ Branch 14 taken 79002 times.
✓ Branch 10 taken 481935 times.
✗ Branch 15 not taken.
✓ Branch 17 taken 608634 times.
✗ Branch 18 not taken.
133409075 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 explicit 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
1/2
✓ Branch 1 taken 941464 times.
✗ Branch 2 not taken.
70453090 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 715191325 Scalar saturation(int phaseIdx) const
72
9/12
✓ Branch 2 taken 8 times.
✓ Branch 3 taken 592777 times.
✓ Branch 5 taken 1519050 times.
✗ Branch 6 not taken.
✗ Branch 8 not taken.
✗ Branch 9 not taken.
✓ Branch 10 taken 8 times.
✓ Branch 11 taken 8 times.
✓ Branch 1 taken 7208299 times.
✓ Branch 0 taken 154444 times.
✓ Branch 7 taken 941464 times.
✓ Branch 4 taken 14800928 times.
685930664 { 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 8938460 Scalar moleFraction(int phaseIdx, int compIdx) const
84
4/4
✓ Branch 0 taken 2979484 times.
✓ Branch 1 taken 2979484 times.
✓ Branch 2 taken 1489738 times.
✓ Branch 3 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 69332706 Scalar averageMolarMass(int phaseIdx) const
109
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
71641470 { 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 268 Scalar molarity(int phaseIdx, int compIdx) const
121 17 { 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 4149046 Scalar partialPressure(int phaseIdx, int compIdx) const
168 4149046 { 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 4468851245 Scalar density(int phaseIdx) const
183
30/49
✓ Branch 10 taken 8986038 times.
✓ Branch 11 taken 55439 times.
✓ Branch 13 taken 36681 times.
✓ Branch 14 taken 37664 times.
✓ Branch 16 taken 27897 times.
✓ Branch 17 taken 30464 times.
✓ Branch 19 taken 25 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 25 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 25 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 25 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 25 times.
✗ Branch 32 not taken.
✓ Branch 33 taken 25 times.
✗ Branch 34 not taken.
✓ Branch 35 taken 25 times.
✗ Branch 36 not taken.
✗ Branch 37 not taken.
✗ Branch 38 not taken.
✗ Branch 39 not taken.
✗ Branch 40 not taken.
✗ Branch 41 not taken.
✗ Branch 42 not taken.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✓ Branch 45 taken 25 times.
✗ Branch 46 not taken.
✓ Branch 47 taken 25 times.
✗ Branch 48 not taken.
✓ Branch 49 taken 25 times.
✗ Branch 50 not taken.
✓ Branch 51 taken 25 times.
✗ Branch 52 not taken.
✓ Branch 3 taken 45419304 times.
✓ Branch 4 taken 38911505 times.
✓ Branch 12 taken 140 times.
✓ Branch 1 taken 6402572 times.
✓ Branch 2 taken 37352771 times.
✓ Branch 0 taken 88530278 times.
✓ Branch 7 taken 20583029 times.
✓ Branch 8 taken 127012318 times.
✓ Branch 15 taken 51840 times.
✓ Branch 6 taken 5035895 times.
✓ Branch 9 taken 27615043 times.
✓ Branch 5 taken 8646559 times.
✓ Branch 18 taken 8512 times.
3972171418 { 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 268 Scalar molarDensity(int phaseIdx) const
194
2/3
✓ Branch 1 taken 9 times.
✗ Branch 2 not taken.
✓ Branch 0 taken 8 times.
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 414272838 Scalar temperature(int phaseIdx) const
200
13/13
✓ Branch 0 taken 69158096 times.
✓ Branch 1 taken 148226375 times.
✓ Branch 2 taken 147958882 times.
✓ Branch 3 taken 146928032 times.
✓ Branch 4 taken 6162167 times.
✓ Branch 5 taken 6175187 times.
✓ Branch 6 taken 3250362 times.
✓ Branch 7 taken 2712550 times.
✓ Branch 8 taken 1961022 times.
✓ Branch 9 taken 2283528 times.
✓ Branch 10 taken 643296 times.
✓ Branch 11 taken 109248 times.
✓ Branch 12 taken 218496 times.
590083039 { 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 2145726754 Scalar pressure(int phaseIdx) const
206
20/22
✓ Branch 0 taken 64622400 times.
✓ Branch 1 taken 77373680 times.
✓ Branch 2 taken 78568780 times.
✓ Branch 3 taken 115827054 times.
✓ Branch 4 taken 42962099 times.
✓ Branch 5 taken 41806578 times.
✓ Branch 6 taken 22218303 times.
✓ Branch 7 taken 3400856 times.
✓ Branch 8 taken 2913648 times.
✓ Branch 9 taken 3019318 times.
✓ Branch 10 taken 14886133 times.
✓ Branch 11 taken 1483937 times.
✓ Branch 12 taken 15873289 times.
✓ Branch 13 taken 33542151 times.
✓ Branch 14 taken 7449120 times.
✓ Branch 15 taken 745237 times.
✗ Branch 16 not taken.
✓ Branch 17 taken 33552406 times.
✓ Branch 18 taken 33552406 times.
✓ Branch 19 taken 33552406 times.
✓ Branch 20 taken 931 times.
✗ Branch 21 not taken.
2356482200 { 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 59358308 Scalar enthalpy(int phaseIdx) const
212
4/4
✓ Branch 0 taken 852976 times.
✓ Branch 1 taken 146 times.
✓ Branch 2 taken 1135524 times.
✓ Branch 3 taken 1475 times.
59352259 { 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 36973474 Scalar internalEnergy(int phaseIdx) const
222
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
36970835 { 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 1525291237 Scalar viscosity(int phaseIdx) const
228
18/34
✓ Branch 2 taken 11615853 times.
✓ Branch 3 taken 16154417 times.
✓ Branch 4 taken 891542 times.
✓ Branch 5 taken 1184 times.
✓ Branch 6 taken 1155516 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 25 times.
✓ Branch 9 taken 14800917 times.
✓ Branch 10 taken 1483614 times.
✓ Branch 11 taken 931 times.
✓ Branch 12 taken 25 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 25 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 25 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 25 times.
✗ Branch 19 not taken.
✓ Branch 20 taken 25 times.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✓ Branch 30 taken 25 times.
✗ Branch 31 not taken.
✓ Branch 32 taken 25 times.
✗ Branch 33 not taken.
✓ Branch 0 taken 4705034 times.
✓ Branch 1 taken 126559525 times.
1199895409 { 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 65735616 Scalar temperature() const
239
1/2
✓ Branch 0 taken 7544764 times.
✗ Branch 1 not taken.
60262112 { 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 358344850 void setTemperature(int phaseIdx, Scalar value)
284
5/6
✓ Branch 1 taken 80 times.
✓ Branch 2 taken 3262 times.
✓ Branch 4 taken 80 times.
✓ Branch 5 taken 644 times.
✓ Branch 3 taken 3800 times.
✗ Branch 6 not taken.
357943066 { temperature_[phaseIdx] = value; }
285
286 /*!
287 * \brief Set the temperature \f$\mathrm{[K]}\f$ of a fluid phase
288 */
289 24864912 void setTemperature(Scalar value)
290 {
291
4/4
✓ Branch 0 taken 8 times.
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 1 times.
69018882 for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
292
2/4
✓ Branch 1 taken 7 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 7 times.
✗ Branch 5 not taken.
69018877 temperature_[phaseIdx] = value;
293 }
294
295 /*!
296 * \brief Set the fluid pressure of a phase \f$\mathrm{[Pa]}\f$
297 */
298 425433896 void setPressure(int phaseIdx, Scalar value)
299
6/7
✓ Branch 1 taken 88933148 times.
✓ Branch 2 taken 73962911 times.
✓ Branch 4 taken 89 times.
✓ Branch 5 taken 644 times.
✓ Branch 0 taken 3649267 times.
✓ Branch 3 taken 3569961 times.
✗ Branch 6 not taken.
247929355 { pressure_[phaseIdx] = value; }
300
301 /*!
302 * \brief Set the saturation of a phase \f$\mathrm{[-]}\f$
303 */
304 277446346 void setSaturation(int phaseIdx, Scalar value)
305
5/6
✓ Branch 1 taken 1489818 times.
✓ Branch 2 taken 3262 times.
✓ Branch 4 taken 80 times.
✓ Branch 5 taken 644 times.
✓ Branch 3 taken 3800 times.
✗ Branch 6 not taken.
277014482 { saturation_[phaseIdx] = value; }
306
307 /*!
308 * \brief Set the density of a phase \f$\mathrm{[kg/m^3]}\f$
309 */
310 427359218 void setDensity(int phaseIdx, Scalar value)
311
5/6
✓ Branch 1 taken 1883008 times.
✓ Branch 2 taken 3262 times.
✓ Branch 4 taken 80 times.
✓ Branch 5 taken 644 times.
✓ Branch 3 taken 3800 times.
✗ Branch 6 not taken.
349394173 { density_[phaseIdx] = value; }
312
313 /*!
314 * \brief Set the molar density of a phase \f$\mathrm{[kg/m^3]}\f$
315 */
316 268 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 350850850 void setEnthalpy(int phaseIdx, Scalar value)
323
3/5
✓ Branch 1 taken 80 times.
✓ Branch 2 taken 3800 times.
✓ Branch 4 taken 80 times.
✗ Branch 5 not taken.
✗ Branch 3 not taken.
314363799 { enthalpy_[phaseIdx] = value; }
324
325 /*!
326 * \brief Set the dynamic viscosity of a phase \f$\mathrm{[Pa s]}\f$
327 */
328 349825769 void setViscosity(int phaseIdx, Scalar value)
329
6/7
✓ Branch 0 taken 60891342 times.
✓ Branch 1 taken 60891422 times.
✓ Branch 3 taken 3800 times.
✓ Branch 4 taken 80 times.
✓ Branch 2 taken 3262 times.
✓ Branch 5 taken 644 times.
✗ Branch 6 not taken.
316046730 { viscosity_[phaseIdx] = value; }
330
331 /*!
332 * \brief Set the index of the most wetting phase
333 */
334 70453090 void setWettingPhase(int phaseIdx)
335
2/3
✓ Branch 1 taken 14961907 times.
✗ Branch 2 not taken.
✓ Branch 0 taken 90794 times.
70453090 { 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