3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_H2_HH
25#define DUMUX_H2_HH
26
28
29#include <cmath>
30
33
34namespace Dumux {
35namespace Components {
36
43template <class Scalar>
44class H2
45: public Components::Base<Scalar, H2<Scalar> >
46, public Components::Gas<Scalar, H2<Scalar> >
47{
49
50public:
54 static std::string name()
55 { return "H2"; }
56
60 static constexpr Scalar molarMass()
61 { return 2.01588e-3; }
62
67 { return 33.2; /* [K] */ }
68
73 { return 13.0e5; /* [N/m^2] */ }
74
79 { return 14.0; /* [K] */ }
80
94 {
96 return criticalPressure();
98 return 0; // H2 is solid: We don't take sublimation into
99 // account
100
101 // antoine equatuion
102 const Scalar A = -7.76451;
103 const Scalar B = 1.45838;
104 const Scalar C = -2.77580;
105
106 using std::exp;
107 return 1e5 * exp(A - B/(temperature + C));
108 }
109
117 {
118 // Assume an ideal gas
120 }
121
130
134 static constexpr bool gasIsCompressible()
135 { return true; }
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 = 27.14;
183 const Scalar cpVapB = 9.273e-3;
184 const Scalar cpVapC = -1.381e-5;
185 const Scalar cpVapD = 7.645e-9;
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
208 {
209 const Scalar Tc = criticalTemperature();
210 const Scalar Vc = 65.0; // critical specific volume [cm^3/mol]
211 const Scalar omega = -0.216; // accentric factor
212 const Scalar M = molarMass() * 1e3; // molar mas [g/mol]
213 const Scalar dipole = 0.0; // dipole moment [debye]
214
215 using std::sqrt;
216 Scalar mu_r4 = 131.3 * dipole / sqrt(Vc * Tc);
217 mu_r4 *= mu_r4;
218 mu_r4 *= mu_r4;
219
220 using std::pow;
221 using std::exp;
222 Scalar Fc = 1 - 0.2756*omega + 0.059035*mu_r4;
223 Scalar Tstar = 1.2593 * temperature/Tc;
224 Scalar Omega_v =
225 1.16145*pow(Tstar, -0.14874) +
226 0.52487*exp(- 0.77320*Tstar) +
227 2.16178*exp(- 2.43787*Tstar);
228 Scalar mu = 40.785*Fc*sqrt(M*temperature)/(pow(Vc, 2./3)*Omega_v);
229
230 // conversion from micro poise to Pa s
231 return mu/1e6 / 10;
232 }
233};
234
235} // end namespace Components
236
237} // end namespace Dumux
238
239#endif
Interface for components that have a gas state.
Relations valid for an ideal gas.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:51
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:34
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:65
Base class for all components Components provide the thermodynamic relations for the liquid,...
Definition: components/base.hh:59
Scalar Scalar
export the scalar type used by the component
Definition: components/base.hh:63
Interface for components that have a gas state.
Definition: gas.hh:41
Properties of pure molecular hydrogen .
Definition: h2.hh:47
static const Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of pure hydrogen gas.
Definition: h2.hh:161
static Scalar criticalTemperature()
Returns the critical temperature of molecular hydrogen.
Definition: h2.hh:66
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of in , depending on pressure and temperature.
Definition: h2.hh:128
static std::string name()
A human readable name for the .
Definition: h2.hh:54
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: h2.hh:134
static constexpr Scalar molarMass()
The molar mass in of molecular hydrogen.
Definition: h2.hh:60
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of at a given pressure and temperature.
Definition: h2.hh:116
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: h2.hh:140
static Scalar vaporPressure(Scalar temperature)
The vapor pressure in of pure molecular hydrogen at a given temperature.
Definition: h2.hh:93
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of at a given pressure and temperature.
Definition: h2.hh:207
static Scalar criticalPressure()
Returns the critical pressure of molecular hydrogen.
Definition: h2.hh:72
static Scalar tripleTemperature()
Returns the temperature at molecular hydrogen's triple point.
Definition: h2.hh:78
static Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of gaseous in at a given density and temperature.
Definition: h2.hh:149
static const Scalar gasHeatCapacity(Scalar T, Scalar pressure)
Specific isobaric heat capacity of pure hydrogen gas.
Definition: h2.hh:178
Relations valid for an ideal gas.
Definition: idealgas.hh:37
static constexpr Scalar pressure(Scalar temperature, Scalar rhoMolar)
The pressure of the gas in , depending on the molar density and temperature.
Definition: idealgas.hh:60
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:49
static constexpr Scalar molarDensity(Scalar temperature, Scalar pressure)
The molar density of the gas , depending on pressure and temperature.
Definition: idealgas.hh:70
Base class for all components Components provide the thermodynamic relations for the liquid,...