version 3.8
h2.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_H2_HH
13#define DUMUX_H2_HH
14
16
17#include <cmath>
18
21
22namespace Dumux {
23namespace Components {
24
31template <class Scalar>
32class H2
33: public Components::Base<Scalar, H2<Scalar> >
34, public Components::Gas<Scalar, H2<Scalar> >
35{
37
38public:
42 static std::string name()
43 { return "H2"; }
44
48 static constexpr Scalar molarMass()
49 { return 2.01588e-3; }
50
55 { return 33.2; /* [K] */ }
56
61 { return 13.0e5; /* [N/m^2] */ }
62
67 { return 14.0; /* [K] */ }
68
82 {
84 return criticalPressure();
86 return 0; // H2 is solid: We don't take sublimation into
87 // account
88
89 // antoine equatuion
90 const Scalar A = -7.76451;
91 const Scalar B = 1.45838;
92 const Scalar C = -2.77580;
93
94 using std::exp;
95 return 1e5 * exp(A - B/(temperature + C));
96 }
97
105 {
106 // Assume an ideal gas
108 }
109
118
122 static constexpr bool gasIsCompressible()
123 { return true; }
124
128 static constexpr bool gasIsIdeal()
129 { return true; }
130
138 {
139 // Assume an ideal gas
141 }
142
151 {
153 }
154
168 {
169 // method of Joback
170 const Scalar cpVapA = 27.14;
171 const Scalar cpVapB = 9.273e-3;
172 const Scalar cpVapC = -1.381e-5;
173 const Scalar cpVapD = 7.645e-9;
174
175 return
176 1/molarMass()* // conversion from [J/(mol*K)] to [J/(kg*K)]
177 (cpVapA + T*
178 (cpVapB/2 + T*
179 (cpVapC/3 + T*
180 (cpVapD/4))));
181 }
182
196 {
197 const Scalar Tc = criticalTemperature();
198 const Scalar Vc = 65.0; // critical specific volume [cm^3/mol]
199 const Scalar omega = -0.216; // accentric factor
200 const Scalar M = molarMass() * 1e3; // molar mas [g/mol]
201 const Scalar dipole = 0.0; // dipole moment [debye]
202
203 using std::sqrt;
204 Scalar mu_r4 = 131.3 * dipole / sqrt(Vc * Tc);
205 mu_r4 *= mu_r4;
206 mu_r4 *= mu_r4;
207
208 using std::pow;
209 using std::exp;
210 Scalar Fc = 1 - 0.2756*omega + 0.059035*mu_r4;
211 Scalar Tstar = 1.2593 * temperature/Tc;
212 Scalar Omega_v =
213 1.16145*pow(Tstar, -0.14874) +
214 0.52487*exp(- 0.77320*Tstar) +
215 2.16178*exp(- 2.43787*Tstar);
216 Scalar mu = 40.785*Fc*sqrt(M*temperature)/(pow(Vc, 2./3)*Omega_v);
217
218 // conversion from micro poise to Pa s
219 return mu/1e6 / 10;
220 }
221};
222
223} // end namespace Components
224
225} // end namespace Dumux
226
227#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 hydrogen .
Definition: h2.hh:35
static const Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of pure hydrogen gas.
Definition: h2.hh:149
static Scalar criticalTemperature()
Returns the critical temperature of molecular hydrogen.
Definition: h2.hh:54
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of in , depending on pressure and temperature.
Definition: h2.hh:116
static std::string name()
A human readable name for the .
Definition: h2.hh:42
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: h2.hh:122
static constexpr Scalar molarMass()
The molar mass in of molecular hydrogen.
Definition: h2.hh:48
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of at a given pressure and temperature.
Definition: h2.hh:104
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: h2.hh:128
static Scalar vaporPressure(Scalar temperature)
The vapor pressure in of pure molecular hydrogen at a given temperature.
Definition: h2.hh:81
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of at a given pressure and temperature.
Definition: h2.hh:195
static Scalar criticalPressure()
Returns the critical pressure of molecular hydrogen.
Definition: h2.hh:60
static Scalar tripleTemperature()
Returns the temperature at molecular hydrogen's triple point.
Definition: h2.hh:66
static Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of gaseous in at a given density and temperature.
Definition: h2.hh:137
static const Scalar gasHeatCapacity(Scalar T, Scalar pressure)
Specific isobaric heat capacity of pure hydrogen gas.
Definition: h2.hh:166
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