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 simple benzene component (LNAPL). | ||
11 | */ | ||
12 | #ifndef DUMUX_BENZENE_HH | ||
13 | #define DUMUX_BENZENE_HH | ||
14 | |||
15 | #include <dumux/material/idealgas.hh> | ||
16 | |||
17 | #include <dumux/material/components/base.hh> | ||
18 | #include <dumux/material/components/liquid.hh> | ||
19 | #include <dumux/material/components/gas.hh> | ||
20 | |||
21 | namespace Dumux { | ||
22 | namespace Components { | ||
23 | |||
24 | /*! | ||
25 | * \ingroup Components | ||
26 | * \brief A simple benzene component (LNAPL). | ||
27 | * | ||
28 | * \tparam Scalar The type used for scalar values | ||
29 | */ | ||
30 | template <class Scalar> | ||
31 | class Benzene | ||
32 | : public Components::Base<Scalar, Benzene<Scalar> > | ||
33 | , public Components::Liquid<Scalar, Benzene<Scalar> > | ||
34 | , public Components::Gas<Scalar, Benzene<Scalar> > | ||
35 | { | ||
36 | using IdealGas = Dumux::IdealGas<Scalar>; | ||
37 | public: | ||
38 | /*! | ||
39 | * \brief A human readable name for the benzene | ||
40 | */ | ||
41 | static std::string name() | ||
42 |
14/26✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 times.
✓ 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.
✓ Branch 31 taken 1 times.
✗ Branch 32 not taken.
✓ Branch 34 taken 1 times.
✗ Branch 35 not taken.
|
8 | { return "benzene"; } |
43 | |||
44 | /*! | ||
45 | * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of benzene | ||
46 | */ | ||
47 | static constexpr Scalar molarMass() | ||
48 | { return 0.07811; } | ||
49 | |||
50 | /*! | ||
51 | * \brief Returns true if the gas phase is assumed to be compressible | ||
52 | */ | ||
53 | static constexpr bool gasIsCompressible() | ||
54 | { return true; } | ||
55 | |||
56 | /*! | ||
57 | * \brief Returns true if the liquid phase is assumed to be compressible | ||
58 | */ | ||
59 | static constexpr bool liquidIsCompressible() | ||
60 | { return false; } | ||
61 | |||
62 | /*! | ||
63 | * \brief Returns true if the gas phase viscosity is constant | ||
64 | */ | ||
65 | static constexpr bool gasViscosityIsConstant() | ||
66 | { return true; } | ||
67 | |||
68 | /*! | ||
69 | * \brief Returns true if the liquid phase viscosity is constant | ||
70 | */ | ||
71 | static constexpr bool liquidViscosityIsConstant() | ||
72 | { return true; } | ||
73 | |||
74 | /*! | ||
75 | * \brief The density of benzene steam at a given pressure and temperature \f$\mathrm{[kg/m^3]}\f$. | ||
76 | * | ||
77 | * \param temperature temperature of component in \f$\mathrm{[K]}\f$ | ||
78 | * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ | ||
79 | */ | ||
80 | static Scalar gasDensity(Scalar temperature, Scalar pressure) | ||
81 | { | ||
82 | 220 | return IdealGas::density(molarMass(), | |
83 | temperature, | ||
84 | pressure); | ||
85 | } | ||
86 | |||
87 | /*! | ||
88 | * \brief The molar density of steam in \f$\mathrm{[mol/m^3]}\f$, | ||
89 | * depending on pressure and temperature. | ||
90 | * \param temperature The temperature of the gas | ||
91 | * \param pressure The pressure of the gas | ||
92 | */ | ||
93 | static Scalar gasMolarDensity(Scalar temperature, Scalar pressure) | ||
94 | { return IdealGas::molarDensity(temperature, pressure); } | ||
95 | |||
96 | /*! | ||
97 | * \brief The density of pure benzene at a given pressure and temperature \f$\mathrm{[kg/m^3]}\f$. | ||
98 | * | ||
99 | * \param temperature temperature of component in \f$\mathrm{[K]}\f$ | ||
100 | * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ | ||
101 | */ | ||
102 | ✗ | static Scalar liquidDensity(Scalar temperature, Scalar pressure) | |
103 | { | ||
104 | ✗ | return 889.51; | |
105 | } | ||
106 | |||
107 | /*! | ||
108 | * \brief The molar density of pure benzene at a given pressure and temperature \f$\mathrm{[mol/m^3]}\f$. | ||
109 | * | ||
110 | * \param temperature temperature of component in \f$\mathrm{[K]}\f$ | ||
111 | * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ | ||
112 | */ | ||
113 | static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure) | ||
114 | { | ||
115 | return liquidDensity(temperature, pressure)/molarMass(); | ||
116 | } | ||
117 | |||
118 | /*! | ||
119 | * \brief The dynamic viscosity \f$\mathrm{[Pa*s]}\f$ of pure benzene. | ||
120 | * | ||
121 | * \param temperature temperature of component in \f$\mathrm{[K]}\f$ | ||
122 | * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ | ||
123 | */ | ||
124 | ✗ | static Scalar liquidViscosity(Scalar temperature, Scalar pressure) | |
125 | { | ||
126 | ✗ | return 1.12e-3;//[Pa s] | |
127 | } | ||
128 | }; | ||
129 | |||
130 | } // end namespace Components | ||
131 | |||
132 | } // end namespace Dumux | ||
133 | |||
134 | #endif | ||
135 |