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 Components | ||
10 | * \brief A simple implementation of Trichloroethene (TCE), a DNAPL. | ||
11 | */ | ||
12 | #ifndef DUMUX_TRICHLOROETHENE_HH | ||
13 | #define DUMUX_TRICHLOROETHENE_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::Components { | ||
22 | |||
23 | /*! | ||
24 | * \ingroup Components | ||
25 | * \brief A simple implementation of TCE as exemplary component for a dense NAPL. | ||
26 | * | ||
27 | * \tparam Scalar The type used for scalar values | ||
28 | */ | ||
29 | template <class Scalar> | ||
30 | class Trichloroethene | ||
31 | : public Components::Base<Scalar, Trichloroethene<Scalar> > | ||
32 | , public Components::Liquid<Scalar, Trichloroethene<Scalar> > | ||
33 | , public Components::Gas<Scalar, Trichloroethene<Scalar> > | ||
34 | { | ||
35 | typedef Dumux::IdealGas<Scalar> IdealGas; | ||
36 | |||
37 | public: | ||
38 | /*! | ||
39 | * \brief A human readable name for the dense NAPL TCE. | ||
40 | */ | ||
41 |
3/6✓ 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.
|
4 | static std::string name() |
42 |
7/13✓ Branch 1 taken 1 times.
✓ Branch 2 taken 1 times.
✓ 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 3 not taken.
|
4 | { return "Trichloroethene"; } |
43 | |||
44 | /*! | ||
45 | * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of TCE. | ||
46 | */ | ||
47 | static constexpr Scalar molarMass() | ||
48 | { | ||
49 | return 131.39e-3; // [kg/mol] | ||
50 | } | ||
51 | |||
52 | /*! | ||
53 | * \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of TCE. | ||
54 | */ | ||
55 | static Scalar criticalTemperature() | ||
56 | { | ||
57 | DUNE_THROW(Dune::NotImplemented, "criticalTemperature for TCE"); | ||
58 | } | ||
59 | |||
60 | /*! | ||
61 | * \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of TCE. | ||
62 | */ | ||
63 | static Scalar criticalPressure() | ||
64 | { | ||
65 | DUNE_THROW(Dune::NotImplemented, "criticalPressure for TCE"); | ||
66 | } | ||
67 | |||
68 | /*! | ||
69 | * \brief Returns the temperature \f$\mathrm{[K]}\f$ at TCE's triple point. | ||
70 | */ | ||
71 | static Scalar tripleTemperature() | ||
72 | { | ||
73 | DUNE_THROW(Dune::NotImplemented, "tripleTemperature for TCE"); | ||
74 | } | ||
75 | |||
76 | /*! | ||
77 | * \brief Returns the pressure \f$\mathrm{[Pa]}\f$ at TCE's triple point. | ||
78 | */ | ||
79 | static Scalar triplePressure() | ||
80 | { | ||
81 | DUNE_THROW(Dune::NotImplemented, "triplePressure for TCE"); | ||
82 | } | ||
83 | |||
84 | /*! | ||
85 | * \brief The vapor pressure in \f$\mathrm{[Pa]}\f$ of pure TCE | ||
86 | * at a given temperature. | ||
87 | * | ||
88 | * \param T temperature of component in \f$\mathrm{[K]}\f$ | ||
89 | */ | ||
90 | static Scalar vaporPressure(Scalar T) | ||
91 | { | ||
92 | return 3900; // [Pa] (at 20C) | ||
93 | } | ||
94 | |||
95 | /*! | ||
96 | * \brief Returns true if the gas phase is assumed to be compressible | ||
97 | */ | ||
98 | static constexpr bool gasIsCompressible() | ||
99 | { return true; } | ||
100 | |||
101 | /*! | ||
102 | * \brief Returns true if the liquid phase is assumed to be compressible | ||
103 | */ | ||
104 | static constexpr bool liquidIsCompressible() | ||
105 | { return false; } | ||
106 | |||
107 | /*! | ||
108 | * \brief Returns true if the liquid phase viscostiy is constant | ||
109 | */ | ||
110 | static constexpr bool liquidViscosityIsConstant() | ||
111 | { return true; } | ||
112 | |||
113 | /*! | ||
114 | * \brief The density of steam at a given pressure and temperature \f$\mathrm{[kg/m^3]}\f$. | ||
115 | * | ||
116 | * \param temperature temperature of component in \f$\mathrm{[K]}\f$ | ||
117 | * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ | ||
118 | */ | ||
119 |
2/2✓ Branch 0 taken 1 times.
✓ Branch 1 taken 2 times.
|
113 | static Scalar gasDensity(Scalar temperature, Scalar pressure) |
120 | { | ||
121 |
2/2✓ Branch 0 taken 1 times.
✓ Branch 1 taken 2 times.
|
113 | return IdealGas::density(molarMass(), |
122 | temperature, | ||
123 | pressure); | ||
124 | } | ||
125 | |||
126 | /*! | ||
127 | * \brief The molar density of steam in \f$\mathrm{[mol/m^3]}\f$ at a given pressure and temperature. | ||
128 | * | ||
129 | * \param temperature temperature of component in \f$\mathrm{[K]}\f$ | ||
130 | * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ | ||
131 | * | ||
132 | */ | ||
133 | static Scalar gasMolarDensity(Scalar temperature, Scalar pressure) | ||
134 | { return IdealGas::molarDensity(temperature, pressure); } | ||
135 | |||
136 | /*! | ||
137 | * \brief Returns true if the gas phase is assumed to be ideal | ||
138 | */ | ||
139 | static constexpr bool gasIsIdeal() | ||
140 | { return true; } | ||
141 | |||
142 | /*! | ||
143 | * \brief The density of pure TCE at a given pressure and temperature \f$\mathrm{[kg/m^3]}\f$. | ||
144 | * | ||
145 | * \param temperature temperature of component in \f$\mathrm{[K]}\f$ | ||
146 | * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ | ||
147 | */ | ||
148 | static Scalar liquidDensity(Scalar temperature, Scalar pressure) | ||
149 | { | ||
150 | return 1460.0; // [kg/m^3] | ||
151 | } | ||
152 | |||
153 | /*! | ||
154 | * \brief The molar density of pure TCE in \f$\mathrm{[mol/m^3]}\f$ at a given pressure and temperature. | ||
155 | * | ||
156 | * \param temperature temperature of component in \f$\mathrm{[K]}\f$ | ||
157 | * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ | ||
158 | * | ||
159 | */ | ||
160 | static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure) | ||
161 | { return liquidDensity(temperature, pressure)/molarMass(); } | ||
162 | |||
163 | /*! | ||
164 | * \brief The dynamic viscosity \f$\mathrm{[Pa*s]}\f$ of pure TCE. | ||
165 | * | ||
166 | * \param temperature temperature of component in \f$\mathrm{[K]}\f$ | ||
167 | * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$ | ||
168 | */ | ||
169 | static Scalar liquidViscosity(Scalar temperature, Scalar pressure) | ||
170 | { | ||
171 | return 5.7e-4;// [Pa*s] | ||
172 | } | ||
173 | }; | ||
174 | |||
175 | } // end namespace Dumux::Components | ||
176 | |||
177 | #endif | ||
178 |