GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: dumux/dumux/material/binarycoefficients/h2o_ch4.hh
Date: 2025-04-12 19:19:20
Exec Total Coverage
Lines: 4 4 100.0%
Functions: 0 0 -%
Branches: 0 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-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 Binarycoefficients
10 * \brief Binary coefficients for water and methane.
11 */
12 #ifndef DUMUX_BINARY_COEFF_H2O_CH4_HH
13 #define DUMUX_BINARY_COEFF_H2O_CH4_HH
14
15 #include <dumux/material/binarycoefficients/henryiapws.hh>
16 #include <dumux/material/binarycoefficients/fullermethod.hh>
17
18 #include <dumux/material/components/ch4.hh>
19 #include <dumux/material/components/h2o.hh>
20
21 namespace Dumux::BinaryCoeff {
22
23 /*!
24 * \ingroup Binarycoefficients
25 * \brief Binary coefficients for water and methane.
26 */
27 class H2O_CH4
28 {
29 public:
30 /*!
31 * \brief Henry coefficient \f$[N/m^2]\f$ for molecular methane in liquid water.
32 *
33 * See:
34 *
35 * IAPWS: "Guideline on the Henry's Constant and Vapor-Liquid
36 * Distribution Constant for Gases in H2O and D2O at High
37 * Temperatures"
38 * http://www.iapws.org/relguide/HenGuide.pdf
39 */
40 template <class Scalar>
41 static Scalar henry(Scalar temperature)
42 {
43 const Scalar E = 2215.6977;
44 const Scalar F = -0.1089;
45 const Scalar G = -6.6240;
46 const Scalar H = 4.6789;
47
48 return henryIAPWS(E, F, G, H, temperature);
49 }
50
51 /*!
52 * \brief Binary diffusion coefficient \f$\mathrm{[m^2/s]}\f$ for molecular water in methane.
53 *
54 * \param temperature the temperature \f$\mathrm{[K]}\f$
55 * \param pressure the phase pressure \f$\mathrm{[Pa]}\f$
56 */
57 template <class Scalar>
58 1 static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure)
59 {
60 // DUNE_THROW(Dune::NotImplemented, "diffusion coefficient for gasous water and methane");
61
62 typedef Dumux::Components::H2O<Scalar> H2O;
63 typedef Dumux::Components::CH4<Scalar> CH4;
64
65 // atomic diffusion volumes
66 // Vch4 = sum(ni*Vi) = 15.9 + 4*2.31 = 25.14 (Tang et al., 2015)--> method, (Poling et al., 2001, p.11.11)--> values
67 1 const Scalar SigmaNu[2] = { 13.1 /* H2O */, 25.14 /* CH4 */ };
68 // molar masses [g/mol]
69 1 const Scalar M[2] = { H2O::molarMass()*Scalar(1e3), CH4::molarMass()*Scalar(1e3) };
70
71 1 return fullerMethod(M, SigmaNu, temperature, pressure);
72 }
73
74 /*!
75 * \brief Diffusion coefficient \f$\mathrm{[m^2/s]}\f$ for molecular methane in liquid water.
76 * \param temperature the temperature \f$\mathrm{[K]}\f$
77 * \param pressure the phase pressure \f$\mathrm{[Pa]}\f$
78 *
79 * The empirical equations for estimating the diffusion coefficient in
80 * infinite solution which are presented in Reid, 1987 \cite reid1987 all show a
81 * linear dependency on temperature. We thus simply scale the
82 * experimentally obtained diffusion coefficient of Ferrell and
83 * Himmelblau by the temperature.<br>
84 * This function use an interpolation of the data by \cite witherspoon1965
85 * http://dx.doi.org/10.1021/j100895a017
86 */
87 template <class Scalar>
88 static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
89 {
90 return 2.93856e-11 * temperature - 6.89402e-09;
91 }
92 };
93
94 } // end namespace Dumux::BinaryCoeff
95
96 #endif
97