version 3.8
o2.hh
Go to the documentation of this file.
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//
12#ifndef DUMUX_O2_HH
13#define DUMUX_O2_HH
14
16
17#include <cmath>
18
21
22namespace Dumux {
23namespace Components {
24
31template <class Scalar>
32class O2
33: public Components::Base<Scalar, O2<Scalar> >
34, public Components::Gas<Scalar, O2<Scalar> >
35{
37
38public:
42 static std::string name()
43 { return "O2"; }
44
48 static constexpr Scalar molarMass()
49 { return 32e-3; }
50
54 static constexpr Scalar criticalTemperature()
55 { return 154.581; /* [K] */ }
56
60 static constexpr Scalar criticalPressure()
61 { return 5.0804e6; /* [N/m^2] */ }
62
66 static constexpr Scalar tripleTemperature()
67 { return 54.359; /* [K] */ }
68
72 static constexpr Scalar triplePressure()
73 { return 148.0; /* [N/m^2] */ }
74
86 {
87 if (T > criticalTemperature())
88 return criticalPressure();
89 if (T < tripleTemperature())
90 return 0; // O2 is solid: We don't take sublimation into account
91
92 // vapor pressure between tripe and critical points. See the
93 // paper of Prydz for a discussion
94 Scalar X =
95 (1 - tripleTemperature()/T) /
97 const Scalar A = 7.568956;
98 const Scalar B = 5.004836;
99 const Scalar C = -2.137460;
100 const Scalar D = 3.454481;
101 const Scalar epsilon = 1.514;
102
103 using std::exp;
104 using std::pow;
105 return triplePressure()*exp(X*(A + X*(B + C*X) + D*pow(1 - X, epsilon)));
106 }
107
111 static constexpr bool gasIsCompressible()
112 { return true; }
113
123 {
124 // Assume an ideal gas
126 }
127
136
140 static constexpr bool gasIsIdeal()
141 { return true; }
142
150 {
151 // Assume an ideal gas
153 }
154
163 {
165 }
166
180 {
181 // method of Joback
182 const Scalar cpVapA = 28.11;
183 const Scalar cpVapB = -3.680e-6;
184 const Scalar cpVapC = 1.746e-5;
185 const Scalar cpVapD = -1.065e-8;
186
187 return
188 1/molarMass()* // conversion from [J/(mol*K)] to [J/(kg*K)]
189 (cpVapA + T*
190 (cpVapB/2 + T*
191 (cpVapC/3 + T*
192 (cpVapD/4))));
193 }
194
206 {
207 const Scalar Tc = criticalTemperature();
208 const Scalar Vc = 73.4; // critical specific volume [cm^3/mol]
209 const Scalar omega = 0.025; // accentric factor
210 const Scalar M = molarMass() * 1e3; // molar mas [g/mol]
211 const Scalar dipole = 0.0; // dipole moment [debye]
212
213 using std::sqrt;
214 Scalar mu_r4 = 131.3 * dipole / sqrt(Vc * Tc);
215 mu_r4 *= mu_r4;
216 mu_r4 *= mu_r4;
217
218 Scalar Fc = 1 - 0.2756*omega + 0.059035*mu_r4;
219 Scalar Tstar = 1.2593 * temperature/Tc;
220
221 using std::pow;
222 using std::exp;
223 Scalar Omega_v =
224 1.16145*pow(Tstar, -0.14874) +
225 0.52487*exp(- 0.77320*Tstar) +
226 2.16178*exp(- 2.43787*Tstar);
227 Scalar mu = 40.785*Fc*sqrt(M*temperature)/(pow(Vc, 2./3)*Omega_v);
228
229 // conversion from micro poise to Pa s
230 return mu/1e6 / 10;
231 }
232
245 {
246 return 8.044e-5 * (temperature - 273.15) + 0.024486;
247 }
248};
249
250} // end namespace Components
251
252} // end namespace Dumux
253
254#endif
Base class for all components Components provide the thermodynamic relations for the liquid,...
Definition: components/base.hh:47
Scalar Scalar
export the scalar type used by the component
Definition: components/base.hh:51
Interface for components that have a gas state.
Definition: gas.hh:29
Properties of pure molecular oxygen .
Definition: o2.hh:35
static constexpr Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of gaseous in at a given density and temperature.
Definition: o2.hh:149
static Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of pure oxygen gas.
Definition: o2.hh:161
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of pure in , depending on pressure and temperature.
Definition: o2.hh:134
static constexpr Scalar criticalTemperature()
Returns the critical temperature in of molecular oxygen.
Definition: o2.hh:54
static std::string name()
A human readable name for the .
Definition: o2.hh:42
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: o2.hh:111
static constexpr Scalar molarMass()
The molar mass in of molecular oxygen.
Definition: o2.hh:48
static Scalar vaporPressure(Scalar T)
The vapor pressure in of pure molecular oxygen at a given temperature.
Definition: o2.hh:85
static Scalar gasHeatCapacity(Scalar T, Scalar pressure)
Specific isobaric heat capacity of pure oxygen gas.
Definition: o2.hh:178
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of at a given pressure and temperature.
Definition: o2.hh:205
static constexpr Scalar triplePressure()
Returns the pressure in at molecular oxygen's triple point.
Definition: o2.hh:72
static constexpr Scalar criticalPressure()
Returns the critical pressure in of molecular oxygen.
Definition: o2.hh:60
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: o2.hh:140
static constexpr Scalar gasDensity(Scalar temperature, Scalar pressure)
The density in of pure at a given pressure and temperature.
Definition: o2.hh:122
static constexpr Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of nitrogen.
Definition: o2.hh:244
static constexpr Scalar tripleTemperature()
Returns the temperature in at molecular oxygen's triple point.
Definition: o2.hh:66
Relations valid for an ideal gas.
Definition: idealgas.hh:25
static constexpr Scalar pressure(Scalar temperature, Scalar rhoMolar)
The pressure of the gas in , depending on the molar density and temperature.
Definition: idealgas.hh:48
static constexpr Scalar density(Scalar avgMolarMass, Scalar temperature, Scalar pressure)
The density of the gas in , depending on pressure, temperature and average molar mass of the gas.
Definition: idealgas.hh:37
static constexpr Scalar molarDensity(Scalar temperature, Scalar pressure)
The molar density of the gas , depending on pressure and temperature.
Definition: idealgas.hh:58
Base class for all components Components provide the thermodynamic relations for the liquid,...
Interface for components that have a gas state.
Relations valid for an ideal gas.
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:39
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:22
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:53
Definition: adapt.hh:17