GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: dumux/dumux/material/binarycoefficients/n2_o2.hh
Date: 2025-04-12 19:19:20
Exec Total Coverage
Lines: 6 6 100.0%
Functions: 1 1 100.0%
Branches: 10 20 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-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 nitrogen and oxygen.
11 */
12 #ifndef DUMUX_BINARY_COEFF_N2_O2_HH
13 #define DUMUX_BINARY_COEFF_N2_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/n2.hh>
20
21 namespace Dumux::BinaryCoeff {
22
23 /*!
24 * \ingroup Binarycoefficients
25 * \brief Binary coefficients for nitrogen and oxygen.
26 */
27 class N2_O2
28 {
29 public:
30 /*!
31 * \brief Henry coefficient \f$\mathrm{[Pa]}\f$ for molecular oxygen in liquid nitrogen.
32 * \param temperature the temperature \f$\mathrm{[K]}\f$
33 */
34 template <class Scalar>
35 static Scalar henry(Scalar temperature)
36 {
37 DUNE_THROW(Dune::NotImplemented, "henry coefficient for oxygen in liquid nitrogen");
38 }
39
40 /*!
41 * \brief Binary diffusion coefficient \f$\mathrm{[m^2/s]}\f$ for molecular oxygen in liquid nitrogen.
42 *
43 * Uses fullerMethod to determine the diffusion of water in nitrogen.
44 * \param temperature the temperature \f$\mathrm{[K]}\f$
45 * \param pressure the phase pressure \f$\mathrm{[Pa]}\f$
46 */
47 template <class Scalar>
48 301720 static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure)
49 {
50 using N2 = Dumux::Components::N2<Scalar>;
51 using O2 = Dumux::Components::O2<Scalar>;
52
53 // atomic diffusion volumes
54 301720 const Scalar SigmaNu[2] = { 18.1 /* N2 */, 16.3 /* O2 */ };
55 // molar masses [g/mol]
56 301720 const Scalar M[2] = { N2::molarMass()*1e3, O2::molarMass()*1e3 };
57 301720 return fullerMethod(M, SigmaNu, temperature, pressure);
58 }
59
60 /*!
61 * \brief Diffusion coefficient \f$\mathrm{[m^2/s]}\f$ for molecular oxygen in liquid nitrogen.
62 * \param temperature the temperature \f$\mathrm{[K]}\f$
63 * \param pressure the phase pressure \f$\mathrm{[Pa]}\f$
64 */
65 template <class Scalar>
66 1 static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
67 {
68
10/20
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✓ Branch 19 taken 1 times.
✗ Branch 20 not taken.
✓ Branch 22 taken 1 times.
✗ Branch 23 not taken.
✓ Branch 25 taken 1 times.
✗ Branch 26 not taken.
✓ Branch 28 taken 1 times.
✗ Branch 29 not taken.
4 DUNE_THROW(Dune::NotImplemented, "diffusion coefficient for liquid oxygen and nitrogen");
69 }
70 };
71
72 } // end namespace Dumux::BinaryCoeff
73
74 #endif
75