version 3.9
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
22
23namespace Dumux {
24namespace Components {
25
32template <class Scalar>
33class O2
34: public Components::Base<Scalar, O2<Scalar> >
35, public Components::Gas<Scalar, O2<Scalar> >
36{
38 using ShomateMethod = Dumux::ShomateMethod<Scalar, 3>; // three regions
39
40public:
42
46 static std::string name()
47 { return "O2"; }
48
52 static constexpr Scalar molarMass()
53 { return 32e-3; }
54
58 static constexpr Scalar criticalTemperature()
59 { return 154.581; /* [K] */ }
60
64 static constexpr Scalar criticalPressure()
65 { return 5.0804e6; /* [N/m^2] */ }
66
70 static constexpr Scalar tripleTemperature()
71 { return 54.359; /* [K] */ }
72
76 static constexpr Scalar triplePressure()
77 { return 148.0; /* [N/m^2] */ }
78
90 {
91 if (T > criticalTemperature())
92 return criticalPressure();
93 if (T < tripleTemperature())
94 return 0; // O2 is solid: We don't take sublimation into account
95
96 // vapor pressure between tripe and critical points. See the
97 // paper of Prydz for a discussion
98 Scalar X =
99 (1 - tripleTemperature()/T) /
101 const Scalar A = 7.568956;
102 const Scalar B = 5.004836;
103 const Scalar C = -2.137460;
104 const Scalar D = 3.454481;
105 const Scalar epsilon = 1.514;
106
107 using std::exp;
108 using std::pow;
109 return triplePressure()*exp(X*(A + X*(B + C*X) + D*pow(1 - X, epsilon)));
110 }
111
115 static constexpr bool gasIsCompressible()
116 { return true; }
117
127 {
128 // Assume an ideal gas
130 }
131
140
144 static constexpr bool gasIsIdeal()
145 { return true; }
146
154 {
155 // Assume an ideal gas
157 }
158
168 {
169 const auto h = shomateMethod.enthalpy(temperature); // KJ/mol
170 return h * 1e3 / molarMass(); // J/kg
171 }
172
184 {
185 const auto cp = shomateMethod.heatCapacity(T); // J/(mol K)
186 return cp / molarMass(); // J/(kg K)
187 }
188
200 {
201 const Scalar Tc = criticalTemperature();
202 const Scalar Vc = 73.4; // critical specific volume [cm^3/mol]
203 const Scalar omega = 0.025; // accentric factor
204 const Scalar M = molarMass() * 1e3; // molar mas [g/mol]
205 const Scalar dipole = 0.0; // dipole moment [debye]
206
207 using std::sqrt;
208 Scalar mu_r4 = 131.3 * dipole / sqrt(Vc * Tc);
209 mu_r4 *= mu_r4;
210 mu_r4 *= mu_r4;
211
212 Scalar Fc = 1 - 0.2756*omega + 0.059035*mu_r4;
213 Scalar Tstar = 1.2593 * temperature/Tc;
214
215 using std::pow;
216 using std::exp;
217 Scalar Omega_v =
218 1.16145*pow(Tstar, -0.14874) +
219 0.52487*exp(- 0.77320*Tstar) +
220 2.16178*exp(- 2.43787*Tstar);
221 Scalar mu = 40.785*Fc*sqrt(M*temperature)/(pow(Vc, 2./3)*Omega_v);
222
223 // conversion from micro poise to Pa s
224 return mu/1e6 / 10;
225 }
226
239 {
240 return 8.044e-5 * (temperature - 273.15) + 0.024486;
241 }
242};
243
249template <class Scalar>
250const typename O2<Scalar>::ShomateMethod O2<Scalar>::shomateMethod{
251 /*temperature*/{100.0, 700.0, 2000.0, 6000.0},
253 {31.32234, -20.23531, 57.86644, -36.50624, -0.007374, -8.903471, 246.7945, 0.0},
254 {30.03235, 8.772972, -3.988133, 0.788313, -0.741599, -11.32468, 236.1663, 0.0},
255 {20.91111, 10.72071, -2.020498, 0.146449, 9.245722, 5.337651, 237.6185, 0.0}
256 }}
257};
258
259} // end namespace Components
260} // end namespace Dumux
261
262#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:36
static constexpr Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of gaseous in at a given density and temperature.
Definition: o2.hh:153
static Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of pure oxygen gas. Shomate Equation is used for a temperature range of 100K to 60...
Definition: o2.hh:166
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of pure in , depending on pressure and temperature.
Definition: o2.hh:138
static constexpr Scalar criticalTemperature()
Returns the critical temperature in of molecular oxygen.
Definition: o2.hh:58
static std::string name()
A human readable name for the .
Definition: o2.hh:46
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: o2.hh:115
static constexpr Scalar molarMass()
The molar mass in of molecular oxygen.
Definition: o2.hh:52
static Scalar vaporPressure(Scalar T)
The vapor pressure in of pure molecular oxygen at a given temperature.
Definition: o2.hh:89
static Scalar gasHeatCapacity(Scalar T, Scalar pressure)
Specific isobaric heat capacity of pure oxygen gas. Shomate Equation is used for a temperature range...
Definition: o2.hh:182
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of at a given pressure and temperature.
Definition: o2.hh:199
static const ShomateMethod shomateMethod
Shomate parameters for oxygen published by NIST https://webbook.nist.gov/cgi/cbook....
Definition: o2.hh:41
static constexpr Scalar triplePressure()
Returns the pressure in at molecular oxygen's triple point.
Definition: o2.hh:76
static constexpr Scalar criticalPressure()
Returns the critical pressure in of molecular oxygen.
Definition: o2.hh:64
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: o2.hh:144
static constexpr Scalar gasDensity(Scalar temperature, Scalar pressure)
The density in of pure at a given pressure and temperature.
Definition: o2.hh:126
static constexpr Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of nitrogen.
Definition: o2.hh:238
static constexpr Scalar tripleTemperature()
Returns the temperature in at molecular oxygen's triple point.
Definition: o2.hh:70
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
The Shomate method to compute enthalpy and heat capacity.
Definition: shomate.hh:50
Scalar heatCapacity(const Scalar temperature) const
Return heat capacity in J/(mol*K)
Definition: shomate.hh:88
std::conditional_t< intervals==-1, std::vector< CoefficientSet >, std::array< CoefficientSet, std::size_t(intervals)> > Coefficients
Definition: shomate.hh:56
Scalar enthalpy(const Scalar temperature) const
Return enthalpy in kJ/mol.
Definition: shomate.hh:75
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
Shomate equations for enthalpy and heat capacity.