GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/dumux/material/components/brine.hh
Date: 2024-05-04 19:09:25
Exec Total Coverage
Lines: 64 64 100.0%
Functions: 16 16 100.0%
Branches: 61 112 54.5%

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 Components
10 * \brief A class for the brine fluid properties,.
11 */
12 #ifndef DUMUX_BRINE_HH
13 #define DUMUX_BRINE_HH
14
15 #include <cmath>
16
17 #include <dune/common/math.hh>
18
19 #include <dumux/common/parameters.hh>
20 #include <dumux/material/components/h2o.hh>
21 #include <dumux/material/components/nacl.hh>
22 #include <dumux/material/components/tabulatedcomponent.hh>
23 #include <dumux/material/components/base.hh>
24 #include <dumux/material/components/liquid.hh>
25 #include <dumux/material/components/gas.hh>
26
27 namespace Dumux::Components {
28
29 /*!
30 * \ingroup Components
31 * \brief A class for the brine fluid properties.
32 *
33 * \tparam Scalar The type used for scalar values
34 * \tparam H2O Static polymorphism: the Brine class can access all properties of the H2O class
35 * \note This is an implementation of brine as a pseudo-component with a constant salinity.
36 * \note the salinity is read from the input file and is a mandatory parameter
37 */
38 template <class Scalar,
39 class H2O_Tabulated = Components::TabulatedComponent<Components::H2O<Scalar>>>
40 class Brine
41 : public Components::Base<Scalar, Brine<Scalar, H2O_Tabulated> >
42 , public Components::Liquid<Scalar, Brine<Scalar, H2O_Tabulated> >
43 , public Components::Gas<Scalar, Brine<Scalar, H2O_Tabulated> >
44 {
45 using ThisType = Brine<Scalar, H2O_Tabulated>;
46 public:
47 using H2O = Components::TabulatedComponent<Dumux::Components::H2O<Scalar>>;
48
49 //! The ideal gas constant \f$\mathrm{[J/mol/K]}\f$
50 static constexpr Scalar R = Constants<Scalar>::R;
51
52 /*!
53 * \brief A human readable name for the brine.
54 */
55 static std::string name()
56
36/72
✓ Branch 1 taken 16 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 16 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 16 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 16 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 2 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 2 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 2 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 2 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 2 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 2 times.
✗ Branch 29 not taken.
✓ Branch 31 taken 2 times.
✗ Branch 32 not taken.
✓ Branch 34 taken 2 times.
✗ Branch 35 not taken.
✓ Branch 37 taken 2 times.
✗ Branch 38 not taken.
✓ Branch 40 taken 2 times.
✗ Branch 41 not taken.
✓ Branch 43 taken 2 times.
✗ Branch 44 not taken.
✓ Branch 46 taken 2 times.
✗ Branch 47 not taken.
✓ Branch 49 taken 1 times.
✗ Branch 50 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✓ Branch 55 taken 1 times.
✗ Branch 56 not taken.
✓ Branch 58 taken 1 times.
✗ Branch 59 not taken.
✓ Branch 61 taken 1 times.
✗ Branch 62 not taken.
✓ Branch 64 taken 1 times.
✗ Branch 65 not taken.
✓ Branch 67 taken 1 times.
✗ Branch 68 not taken.
✓ Branch 70 taken 1 times.
✗ Branch 71 not taken.
✓ Branch 73 taken 1 times.
✗ Branch 74 not taken.
✓ Branch 76 taken 1 times.
✗ Branch 77 not taken.
✓ Branch 79 taken 1 times.
✗ Branch 80 not taken.
✓ Branch 82 taken 1 times.
✗ Branch 83 not taken.
✓ Branch 85 taken 1 times.
✗ Branch 86 not taken.
✓ Branch 88 taken 1 times.
✗ Branch 89 not taken.
✓ Branch 91 taken 1 times.
✗ Branch 92 not taken.
✓ Branch 94 taken 1 times.
✗ Branch 95 not taken.
✓ Branch 97 taken 1 times.
✗ Branch 98 not taken.
✓ Branch 100 taken 1 times.
✗ Branch 101 not taken.
✓ Branch 103 taken 1 times.
✗ Branch 104 not taken.
✓ Branch 106 taken 1 times.
✗ Branch 107 not taken.
54 { return "Brine"; }
57
58 /*!
59 * \brief Return the constant salinity
60 */
61 487561769 static Scalar salinity()
62 {
63
4/6
✓ Branch 0 taken 20 times.
✓ Branch 1 taken 487561701 times.
✓ Branch 3 taken 20 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 20 times.
✗ Branch 7 not taken.
487561769 static const Scalar salinity = getParam<Scalar>("Brine.Salinity");
64 487561769 return salinity;
65 }
66
67 /*!
68 * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of brine.
69 * This assumes that the salt is pure NaCl.
70 */
71 static Scalar molarMass()
72 {
73 18 const Scalar M1 = H2O::molarMass();
74 18 const Scalar M2 = Components::NaCl<Scalar>::molarMass(); // molar mass of NaCl [kg/mol]
75
4/8
✓ Branch 1 taken 15 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 1 times.
✗ Branch 6 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
18 return M1*M2/(M2 + ThisType::salinity()*(M1 - M2));
76 };
77
78 /*!
79 * \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of brine. Here, it is assumed to be equal to that of pure water.
80 * The critical temperature of brine is dependent on the salt concentration.
81 * With increasing NaCl mass fraction the critical point shifts to higher temperatures, see Bakker, 2018 (DOI: 10.1016/j.cageo.2018.03.003).
82 */
83 static Scalar criticalTemperature()
84 { return H2O::criticalTemperature(); }
85
86 /*!
87 * \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of brine. Here, it is assumed to be equal to that of pure water.
88 * The critical pressure of brine is dependent on the salt concentration.
89 * With increasing NaCl mass fraction the critical point shifts to higher pressures, see Bakker, 2018 (DOI: 10.1016/j.cageo.2018.03.003).
90 */
91 static Scalar criticalPressure()
92 { return H2O::criticalPressure(); }
93
94 /*!
95 * \brief Returns the temperature \f$\mathrm{[K]}\f$ at brine's triple point. Here, it is assumed to be equal to that of pure water.
96 * The triple temperature of brine is dependent on the salt concentration, see Bakker, 2018 (DOI: 10.1016/j.cageo.2018.03.003).
97 */
98 static Scalar tripleTemperature()
99 { return H2O::tripleTemperature(); }
100
101 /*!
102 * \brief Returns the pressure \f$\mathrm{[Pa]}\f$ at brine's triple point. Here, it is assumed to be equal to that of pure water.
103 * The triple pressure of brine is dependent on the salt concentration, see Bakker, 2018 (DOI: 10.1016/j.cageo.2018.03.003).
104 */
105 static Scalar triplePressure()
106 { return H2O::triplePressure(); }
107
108 /*!
109 * \brief The vapor pressure in \f$\mathrm{[Pa]}\f$ of pure brine
110 * at a given temperature.
111 * \note The vapor pressure of brine decreases with the mole fraction of water in the liquid phase.
112 * This is described by Raoult's law, see Thomas Fetzer's Dissertation Eq. 2.11.
113 * It is also the simplified version of the Kelvin equation, neglecting the influence of the capillary pressure here.
114 *
115 * \param temperature temperature of component in \f$\mathrm{[K]}\f$
116 */
117 static Scalar vaporPressure(Scalar temperature)
118 {
119 //calculate mole fraction
120 const Scalar M1 = H2O::molarMass();
121 const Scalar M2 = Components::NaCl<Scalar>::molarMass(); // molar mass of NaCl [kg/mol]
122 const Scalar xNaClLiquid = - M1 * ThisType::salinity() / ((M2-M1) * ThisType::salinity() - M2);
123
124 // Raoult's law, see Thomas Fetzer's Dissertation Eq. 2.11.
125 return H2O::vaporPressure(temperature) * (1 - xNaClLiquid);
126 }
127
128 /*!
129 * \brief Specific enthalpy of gaseous brine \f$\mathrm{[J/kg]}\f$.
130 * Only water volatile and salt is suppose to stay in the liquid phase.
131 * \param temperature temperature of component in \f$\mathrm{[K]}\f$
132 * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
133 */
134 static const Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
135
1/2
✓ Branch 1 taken 101 times.
✗ Branch 2 not taken.
101 { return H2O::gasEnthalpy(temperature, pressure); }
136
137 /*!
138 * \brief Specific enthalpy of liquid brine \f$\mathrm{[J/kg]}\f$.
139 *
140 * \param T temperature of component in \f$\mathrm{[K]}\f$
141 * \param p pressure of component in \f$\mathrm{[Pa]}\f$
142 *
143 * Equations given in:
144 * - Palliser & McKibbin (1998) \cite palliser1998 <BR>
145 * - Michaelides (1981) \cite michaelides1981 <BR>
146 * - Daubert & Danner (1989) \cite daubert1989
147 *
148 */
149 46662145 static const Scalar liquidEnthalpy(Scalar T, Scalar p)
150 {
151 /*Numerical coefficients from PALLISER*/
152 static const Scalar f[] = {
153 2.63500E-1, 7.48368E-6, 1.44611E-6, -3.80860E-10
154 };
155
156 /*Numerical coefficients from MICHAELIDES for the enthalpy of brine*/
157 static const Scalar a[4][3] = {
158 { +9633.6, -4080.0, +286.49 },
159 { +166.58, +68.577, -4.6856 },
160 { -0.90963, -0.36524, +0.249667E-1 },
161 { +0.17965E-2, +0.71924E-3, -0.4900E-4 }
162 };
163
164 46662145 const Scalar theta = T - 273.15;
165 46662145 const Scalar salSat = f[0] + f[1]*theta + f[2]*theta*theta + f[3]*theta*theta*theta;
166
167 /*Regularization*/
168 using std::min;
169 using std::max;
170
3/4
✗ Branch 1 not taken.
✓ Branch 2 taken 46662133 times.
✓ Branch 3 taken 12 times.
✓ Branch 4 taken 46662121 times.
46662145 const Scalar salinity = min(max(ThisType::salinity(),0.0), salSat);
171
172 46662145 const Scalar hw = H2O::liquidEnthalpy(T, p)/1E3; /* kJ/kg */
173
174 /*DAUBERT and DANNER*/
175 93324290 /*U=*/const Scalar h_NaCl = (3.6710E4*T + 0.5*(6.2770E1)*T*T - ((6.6670E-2)/3)*T*T*T
176 46662145 +((2.8000E-5)/4)*(T*T*T*T))/(58.44E3)- 2.045698e+02; /* kJ/kg */
177
178 46662145 const Scalar m = (1E3/58.44)*(salinity/(1-salinity));
179
180 using Dune::power;
181 46662145 Scalar d_h = 0;
182
2/2
✓ Branch 0 taken 186648532 times.
✓ Branch 1 taken 46662133 times.
233310725 for (int i = 0; i<=3; i++) {
183
2/2
✓ Branch 0 taken 559945596 times.
✓ Branch 1 taken 186648532 times.
746594320 for (int j=0; j<=2; j++) {
184 1679837220 d_h = d_h + a[i][j] * power(theta, i) * power(m, j);
185 }
186 }
187
188 /* heat of dissolution for halite according to Michaelides 1971 */
189 46662145 const Scalar delta_h = (4.184/(1E3 + (58.44 * m)))*d_h;
190
191 /* Enthalpy of brine without any dissolved gas */
192 46662145 const Scalar h_ls1 =(1-salinity)*hw + salinity*h_NaCl + salinity*delta_h; /* kJ/kg */
193 46662145 return h_ls1*1E3; /*J/kg*/
194 }
195
196 /*!
197 * \brief Specific isobaric heat capacity of brine \f$\mathrm{[J/kg]}\f$.
198 *
199 * \param temperature temperature of component in \f$\mathrm{[K]}\f$
200 * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
201 *
202 * See:
203 *
204 * IAPWS: "Revised Release on the IAPWS Industrial Formulation
205 * 1997 for the Thermodynamic Properties of Water and Steam",
206 * http://www.iapws.org/relguide/IF97-Rev.pdf \cite IAPWS1997
207 */
208 109 static const Scalar liquidHeatCapacity(Scalar temperature, Scalar pressure)
209 {
210 109 const Scalar eps = temperature*1e-8;
211 109 return (liquidEnthalpy(temperature + eps, pressure)- liquidEnthalpy(temperature, pressure))/eps;
212 }
213
214 /*!
215 * \brief Specific isobaric heat capacity of water steam \f$\mathrm{[J/kg]}\f$.
216 *
217 * \param temperature temperature of component in \f$\mathrm{[K]}\f$
218 * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
219 *
220 * See:
221 *
222 * IAPWS: "Revised Release on the IAPWS Industrial Formulation
223 * 1997 for the Thermodynamic Properties of Water and Steam",
224 * http://www.iapws.org/relguide/IF97-Rev.pdf \cite IAPWS1997
225 */
226 static const Scalar gasHeatCapacity(Scalar temperature,
227 Scalar pressure)
228 {
229
1/2
✓ Branch 1 taken 101 times.
✗ Branch 2 not taken.
101 return H2O::gasHeatCapacity(temperature, pressure);
230 }
231
232 /*!
233 * \brief Specific internal energy of steam \f$\mathrm{[J/kg]}\f$.
234 *
235 * \param temperature temperature of component in \f$\mathrm{[K]}\f$
236 * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
237 */
238 static const Scalar gasInternalEnergy(Scalar temperature,
239 Scalar pressure)
240 {
241 return H2O::gasInternalEnergy(temperature, pressure);
242 }
243
244 /*!
245 * \brief Specific internal energy of liquid brine \f$\mathrm{[J/kg]}\f$.
246 *
247 * \param temperature temperature of component in \f$\mathrm{[K]}\f$
248 * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
249 */
250 static const Scalar liquidInternalEnergy(Scalar temperature,
251 Scalar pressure)
252 {
253 return liquidEnthalpy(temperature, pressure) - pressure/liquidDensity(temperature, pressure);
254 }
255
256 /*!
257 * \brief The density of steam at a given pressure and temperature \f$\mathrm{[kg/m^3]}\f$.
258 *
259 * \param temperature temperature of component in \f$\mathrm{[K]}\f$
260 * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
261 */
262 static Scalar gasDensity(Scalar temperature, Scalar pressure)
263
1/2
✓ Branch 1 taken 101 times.
✗ Branch 2 not taken.
101 { return H2O::gasDensity(temperature, pressure); }
264
265 /*!
266 * \brief The molar density of steam in \f$\mathrm{[mol/m^3]}\f$ at a given pressure and temperature.
267 * We take the value of the H2O gas molar density here because salt is not in the gas phase.
268 *
269 * \param temperature temperature of component in \f$\mathrm{[K]}\f$
270 * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
271 *
272 */
273 static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
274 { return H2O::gasMolarDensity(temperature, pressure); }
275
276 /*!
277 * \brief Returns true if the gas phase is assumed to be ideal
278 */
279 static constexpr bool gasIsIdeal()
280 { return H2O::gasIsIdeal(); }
281
282 /*!
283 * \brief Returns true if the gas phase is assumed to be compressible
284 */
285 static constexpr bool gasIsCompressible()
286 { return H2O::gasIsCompressible(); }
287
288 /*!
289 * \brief Returns true if the liquid phase is assumed to be compressible
290 */
291 static constexpr bool liquidIsCompressible()
292 { return H2O::liquidIsCompressible(); }
293
294 /*!
295 * \brief The density of pure brine at a given pressure and temperature \f$\mathrm{[kg/m^3]}\f$.
296 *
297 * \param temperature temperature of component in \f$\mathrm{[K]}\f$
298 * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
299 *
300 * \note The density is computed as a function of the salt mass fraction, pressure and temperature.
301 * The used function is an empirical relationship fitted to experimental data.
302 * It is presented by Batzle and Wang, 1992 (DOI: 10.1190/1.1443207) \cite batzle1992,
303 * better description and comparison with other approaches in Adams and Bachu, 2002
304 * (DOI: 10.1046/j.1468-8123.2002.00041.x) \cite adams2002.
305 */
306 145933773 static Scalar liquidDensity(Scalar temperature, Scalar pressure)
307 {
308 using std::max;
309 145933773 const Scalar TempC = temperature - 273.15;
310 145933773 const Scalar pMPa = pressure/1.0E6;
311
1/2
✓ Branch 1 taken 145933765 times.
✗ Branch 2 not taken.
145933773 const Scalar salinity = max(0.0, ThisType::salinity());
312
313 145933773 const Scalar rhow = H2O::liquidDensity(temperature, pressure);
314
315 145933773 const Scalar density = rhow +
316 291867546 1000*salinity*(
317 145933773 0.668 +
318 291867546 0.44*salinity +
319 145933773 1.0E-6*(
320 291867546 300*pMPa -
321 291867546 2400*pMPa*salinity +
322 145933773 TempC*(
323 145933773 80.0 +
324 291867546 3*TempC -
325 291867546 3300*salinity -
326 291867546 13*pMPa +
327 145933773 47*pMPa*salinity)));
328
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 145933765 times.
145933773 assert(density > 0.0);
329 145933773 return density;
330 }
331
332 /*!
333 * \brief The molar density of brine in \f$\mathrm{[mol/m^3]}\f$ at a given pressure and temperature.
334 *
335 * \param temperature temperature of component in \f$\mathrm{[K]}\f$
336 * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
337 *
338 */
339 static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure)
340 { return liquidDensity(temperature, pressure)/molarMass(); }
341
342 /*!
343 * \brief The pressure of steam in \f$\mathrm{[Pa]}\f$ at a given density and temperature.
344 *
345 * \param temperature temperature of component in \f$\mathrm{[K]}\f$
346 * \param density density of component in \f$\mathrm{[kg/m^3]}\f$
347 */
348 static Scalar gasPressure(Scalar temperature, Scalar density)
349 { return H2O::gasPressure(temperature, density); }
350
351 /*!
352 * \brief The pressure of brine in \f$\mathrm{[Pa]}\f$ at a given density and
353 * temperature.
354 *
355 * \param temperature temperature of component in \f$\mathrm{[K]}\f$
356 * \param density density of component in \f$\mathrm{[kg/m^3]}\f$
357 */
358 static Scalar liquidPressure(Scalar temperature, Scalar density)
359 {
360 // We use the Newton method for this. For the initial value we
361 // assume the pressure to be 10% higher than the vapor
362 // pressure
363 Scalar pressure = 1.1*vaporPressure(temperature);
364 const Scalar eps = pressure*1e-7;
365
366 Scalar deltaP = pressure*2;
367
368 using std::abs;
369 for (int i = 0; i < 5 && abs(pressure*1e-9) < abs(deltaP); ++i) {
370 Scalar f = liquidDensity(temperature, pressure) - density;
371
372 Scalar df_dp;
373 df_dp = liquidDensity(temperature, pressure + eps);
374 df_dp -= liquidDensity(temperature, pressure - eps);
375 df_dp /= 2*eps;
376
377 deltaP = - f/df_dp;
378
379 pressure += deltaP;
380 }
381 assert(pressure > 0.0);
382 return pressure;
383 }
384
385 /*!
386 * \brief The dynamic viscosity \f$\mathrm{[Pa*s]}\f$ of steam.
387 *
388 * \param temperature temperature of component
389 * \param pressure pressure of component
390 */
391 static Scalar gasViscosity(Scalar temperature, Scalar pressure)
392
1/2
✓ Branch 1 taken 101 times.
✗ Branch 2 not taken.
101 { return H2O::gasViscosity(temperature, pressure); };
393
394 /*!
395 * \brief The dynamic viscosity \f$\mathrm{[Pa*s]}\f$ of pure brine.
396 *
397 * \param temperature temperature of component in \f$\mathrm{[K]}\f$
398 * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
399 *
400 * \note The viscosity is computed as a function of the salt mass fraction and temperature.
401 * The used function is an empirical relationship fitted to experimental data.
402 * It is presented by Batzle and Wang, 1992 (DOI: 10.1190/1.1443207) \cite batzle1992,
403 * better description and comparison with other approaches in Adams and Bachu, 2002 (DOI: 10.1046/j.1468-8123.2002.00041.x) \cite adams2002.
404 * However, the equation given in Adams and Bachu, 2002(DOI: 10.1046/j.1468-8123.2002.00041.x) \cite adams2002
405 * is obviously wrong when compared to the original by Batzle and Wang, 1992 (DOI: 10.1190/1.1443207) \cite batzle1992.
406 */
407 74165914 static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
408 {
409 // regularisation
410 using std::max;
411
2/2
✓ Branch 0 taken 4 times.
✓ Branch 1 taken 74165906 times.
74165914 temperature = max(temperature, 275.0);
412
1/2
✓ Branch 1 taken 74165910 times.
✗ Branch 2 not taken.
74165914 const Scalar salinity = max(0.0, ThisType::salinity());
413
414 using std::pow;
415 using Dune::power;
416 using std::exp;
417 74165914 const Scalar T_C = temperature - 273.15;
418 74165914 const Scalar A = (0.42*power((pow(salinity, 0.8)-0.17), 2) + 0.045)*pow(T_C, 0.8);
419 74165914 const Scalar mu_brine = 0.1 + 0.333*salinity + (1.65+91.9*salinity*salinity*salinity)*exp(-A); //[cP]
420
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 74165910 times.
74165914 assert(mu_brine > 0.0);
421 74165914 return mu_brine/1000.0; //[Pa s]
422 }
423
424 /*!
425 * \brief Thermal conductivity of a brine \f$\mathrm{[W/(m K)]}\f$.
426 * \param temperature temperature of component in \f$\mathrm{[K]}\f$
427 * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
428 *
429 * The thermal conductivity of brine is implemented based on the contribution of NaCl (\f$\lambda_{brine}\f$/\f$\lambda_{H_2O}\f$) of \cite Yusufova1975 https://link.springer.com/content/pdf/10.1007/BF00867119.pdf, also discussed in \cite Ozbek1980 https://docecity.com/thermal-conductivity-of-aqueous-sodium-chloride-acs-publicat-5f10766acba00.html
430 */
431 46661923 static Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure)
432 {
433 46661923 Scalar tempC = temperature-273.15;
434 46661923 Scalar xNaCl = ThisType::salinity() * H2O::molarMass() / (ThisType::salinity() * H2O::molarMass() + (1-ThisType::salinity() )*Components::NaCl<Scalar>::molarMass()); // mole fraction of NaCl
435 46661923 Scalar m = xNaCl/(H2O::molarMass()*(1- xNaCl)); // molality of NaCl
436 46661923 Scalar S = 5844.3 * m / (1000 + 58.443 *m);
437 46661923 Scalar contribNaClFactor = 1.0 - (2.3434e-3 - 7.924e-6*tempC + 3.924e-8*tempC*tempC)*S + (1.06e-5 - 2.0e-8*tempC + 1.2e-10*tempC*tempC)*S*S;
438 46661923 return contribNaClFactor * H2O::liquidThermalConductivity(temperature, pressure);
439 }
440 };
441
442 template <class Scalar, class H2O>
443 struct IsAqueous<Brine<Scalar, H2O>> : public std::true_type {};
444
445 } // end namespace Dumux::Components
446
447 #endif
448