GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/dumux/material/binarycoefficients/h2o_o2.hh
Date: 2024-09-21 20:52:54
Exec Total Coverage
Lines: 11 12 91.7%
Functions: 0 1 0.0%
Branches: 1 2 50.0%

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 Binarycoefficients
10 * \brief Binary coefficients for water and oxygen.
11 */
12 #ifndef DUMUX_BINARY_COEFF_H2O_O2_HH
13 #define DUMUX_BINARY_COEFF_H2O_O2_HH
14
15 #include <dumux/material/binarycoefficients/henryiapws.hh>
16 #include <dumux/material/binarycoefficients/fullermethod.hh>
17
18 #include <dumux/material/components/o2.hh>
19 #include <dumux/material/components/h2o.hh>
20
21 namespace Dumux {
22 namespace BinaryCoeff {
23
24 /*!
25 * \ingroup Binarycoefficients
26 * \brief Binary coefficients for water and oxygen.
27 */
28 class H2O_O2
29 {
30 public:
31 /*!
32 * \brief Henry coefficient \f$\mathrm{[Pa]}\f$ for molecular oxygen in liquid water.
33 * \param temperature the temperature \f$\mathrm{[K]}\f$
34 */
35 template <class Scalar>
36 static Scalar henry(Scalar temperature)
37 {
38 2897487 const Scalar E = 2305.0674;
39 2897487 const Scalar F = -11.3240;
40 2897487 const Scalar G = 25.3224;
41 2897487 const Scalar H = -15.6449;
42
43 2897487 return henryIAPWS(E, F, G, H, temperature);
44 }
45
46 /*!
47 * \brief Binary diffusion coefficient \f$\mathrm{[m^2/s]}\f$ for molecular water and oxygen.
48 *
49 * Uses fullerMethod to determine the diffusion of water in nitrogen.
50 * \param temperature the temperature \f$\mathrm{[K]}\f$
51 * \param pressure the phase pressure \f$\mathrm{[Pa]}\f$
52 */
53 template <class Scalar>
54 static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure)
55 {
56 using H2O = Dumux::Components::H2O<Scalar>;
57 using O2 = Components::O2<Scalar>;
58
59 // atomic diffusion volumes
60 2595779 const Scalar SigmaNu[2] = { 13.1 /* H2O */, 16.3 /* O2 */ };
61 // molar masses [g/mol]
62 2595779 const Scalar M[2] = { H2O::molarMass()*1e3, O2::molarMass()*1e3 };
63
64 2595779 return fullerMethod(M, SigmaNu, temperature, pressure);
65 }
66
67 /*!
68 * \brief Diffusion coefficient \f$\mathrm{[m^2/s]}\f$ for molecular oxygen in liquid water.
69 * \param temperature the temperature \f$\mathrm{[K]}\f$
70 * \param pressure the phase pressure \f$\mathrm{[Pa]}\f$
71 *
72 * The empirical equations for estimating the diffusion coefficient in
73 * infinite solution which are presented in Reid, 1987 all show a
74 * linear dependency on temperature. We thus simply scale the
75 * experimentally obtained diffusion coefficient of Ferrell and
76 * Himmelblau by the temperature.
77 *
78 * See:
79 *
80 * R. Reid et al. (1987, pp. 599) \cite reid1987 <BR>
81 *
82 * R. Ferrell, D. Himmelblau (1967, pp. 111-115) \cite ferrell1967
83 */
84 template <class Scalar>
85 static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
86 {
87 2897490 const Scalar Texp = 273.15 + 25; // [K]
88
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2897490 const Scalar Dexp = 2.2e-9; // [m^2/s]
89 2897489 return Dexp * temperature/Texp;
90 }
91 };
92
93 } // end namespace BinaryCoeff
94 } // end namespace Dumux
95
96 #endif
97