GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/dumux/material/components/nacl.hh
Date: 2024-05-04 19:09:25
Exec Total Coverage
Lines: 1 7 14.3%
Functions: 0 3 0.0%
Branches: 31 44 70.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 Material properties of pure salt \f$NaCl\f$.
11 */
12 #ifndef DUMUX_NACL_HH
13 #define DUMUX_NACL_HH
14
15 #include <dumux/common/exceptions.hh>
16
17 #include <cmath>
18 #include <iostream>
19
20 #include <dumux/material/components/base.hh>
21 #include <dumux/material/components/liquid.hh>
22 #include <dumux/material/components/solid.hh>
23
24 namespace Dumux {
25 namespace Components {
26
27 /*!
28 * \ingroup Components
29 * \brief A class for the NaCl properties
30 */
31 template <class Scalar>
32 class NaCl
33 : public Components::Base<Scalar, NaCl<Scalar> >
34 , public Components::Solid<Scalar, NaCl<Scalar> >
35 {
36 public:
37 /*!
38 * \brief A human readable name for the NaCl.
39 */
40 static std::string name()
41 {
42
31/44
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✓ Branch 4 taken 1 times.
✓ Branch 5 taken 1 times.
✓ Branch 6 taken 1 times.
✓ Branch 7 taken 1 times.
✓ Branch 8 taken 1 times.
✓ Branch 9 taken 1 times.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 1 times.
✓ Branch 13 taken 2 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 1 times.
✓ Branch 16 taken 2 times.
✓ Branch 17 taken 1 times.
✓ Branch 19 taken 2 times.
✗ Branch 20 not taken.
✓ Branch 21 taken 1 times.
✓ Branch 22 taken 2 times.
✗ Branch 23 not taken.
✓ Branch 24 taken 1 times.
✓ Branch 25 taken 2 times.
✗ Branch 26 not taken.
✓ Branch 27 taken 1 times.
✓ Branch 28 taken 1 times.
✓ Branch 29 taken 2 times.
✗ Branch 30 not taken.
✓ Branch 31 taken 1 times.
✓ Branch 32 taken 2 times.
✗ Branch 33 not taken.
✓ Branch 34 taken 1 times.
✓ Branch 35 taken 1 times.
✗ Branch 36 not taken.
✓ Branch 37 taken 1 times.
✓ Branch 39 taken 1 times.
✗ Branch 40 not taken.
✓ Branch 42 taken 1 times.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✓ Branch 45 taken 1 times.
✗ Branch 46 not taken.
✓ Branch 47 taken 1 times.
96 return "NaCl";
43 }
44
45 /*!
46 * \brief The molar mass of NaCl in \f$\mathrm{[kg/mol]}\f$.
47 */
48 static constexpr Scalar molarMass()
49 {
50 return 58.4428e-3 ;
51 }
52
53 /*!
54 * \brief The mass density \f$\mathrm{[kg/m^3]}\f$ of NaCl.
55 */
56 static Scalar solidDensity(Scalar temperature)
57 {
58 return 2165.0;
59 }
60
61 /*!
62 * \brief The mass density \f$\mathrm{[kg/m^3]}\f$ of NaCl.
63 */
64 static Scalar solidMolarDensity(Scalar temperature)
65 {
66 return solidDensity(temperature)/molarMass();
67 }
68
69 /*!
70 * \brief The specific heat capacity \f$\mathrm{[J/kg K]}\f$ of NaCl.
71 */
72 static Scalar solidHeatCapacity(Scalar temperature)
73 {
74 return 50.50/molarMass();
75 }
76
77 /*!
78 * \brief Thermal conductivity of the component \f$\mathrm{[W/(m*K)]}\f$ as a solid.
79 * \param temperature temperature of component in \f$\mathrm{[K]}\f$
80 */
81 static Scalar solidThermalConductivity(Scalar temperature)
82 {
83 return 6.49;
84 }
85 };
86
87 } // end namespace Components
88
89 } // end namespace Dumux
90
91 #endif
92