3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
ch4.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_CH4_HH
25#define DUMUX_CH4_HH
26
28
29#include <cmath>
30
33
34namespace Dumux {
35namespace Components {
36
42template <class Scalar>
43class CH4
44: public Components::Base<Scalar, CH4<Scalar> >
45, public Components::Gas<Scalar, CH4<Scalar> >
46{
48
49public:
53 static std::string name()
54 { return "CH4"; }
55
59 static constexpr Scalar molarMass()
60 { return 16.043e-3; /* [kg/mol] */}
61
66 { return 190.4; /* [K] */ }
67
72 { return 46e5; /* [Pa] */ }
73
78 { return 90.7; /* [K] */ }
79
84 { return 0; /* [Pa] */ }
85
93 { DUNE_THROW(Dune::NotImplemented, "vaporPressure for CH4"); }
94
98 static constexpr bool gasIsCompressible()
99 { return true; }
100
108 {
109 // Assume an ideal gas
111 }
112
121
125 static constexpr bool gasIsIdeal()
126 { return true; }
127
135 {
136 // Assume an ideal gas
138 }
139
148 {
150 }
151
163 {
164 // method of Joback
165 const Scalar cpVapA = 19.25;
166 const Scalar cpVapB = 0.05213;
167 const Scalar cpVapC = 1.197e-5;
168 const Scalar cpVapD = -1.132e-8;
169
170 return
171 1/molarMass()* // conversion from [J/(mol*K)] to [J/(kg*K)]
172 (cpVapA + T*
173 (cpVapB/2 + T*
174 (cpVapC/3 + T*
175 (cpVapD/4))));
176 }
177
194 {
195
196 return
198 1/molarMass()* // conversion from [J/(mol K)] to [J/(kg K)]
199 IdealGas::R*temperature; // = pressure * spec. volume for an ideal gas
200 }
201
216 {
217 const Scalar Tc = criticalTemperature();
218 const Scalar Vc = 98.6; // critical specific volume [cm^3/mol]
219 const Scalar omega = 0.011; // accentric factor
220 const Scalar M = molarMass() * 1e3; // molar mas [g/mol]
221 const Scalar dipole = 0.0; // dipole moment [debye]
222
223 using std::sqrt;
224 Scalar mu_r4 = 131.3 * dipole / sqrt(Vc * Tc);
225 mu_r4 *= mu_r4;
226 mu_r4 *= mu_r4;
227
228 using std::exp;
229 using std::pow;
230 Scalar Fc = 1 - 0.2756*omega + 0.059035*mu_r4;
231 Scalar Tstar = 1.2593 * temperature/Tc;
232 Scalar Omega_v =
233 1.16145*pow(Tstar, -0.14874) +
234 0.52487*exp(- 0.77320*Tstar) +
235 2.16178*exp(- 2.43787*Tstar);
236 Scalar mu = 40.785*Fc*sqrt(M*temperature)/(pow(Vc, 2./3)*Omega_v);
237
238 // conversion from micro poise to Pa s
239 return mu/1e6 / 10;
240 }
241};
242
243} // end namespace Components
244
245} // end namespace Dumux
246
247#endif
Interface for components that have a gas state.
Relations valid for an ideal gas.
make the local view function available whenever we use the grid geometry
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
Definition: components/base.hh:47
Scalar Scalar
export the scalar type used by the component
Definition: components/base.hh:51
Properties of pure molecular methane .
Definition: ch4.hh:46
static Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of gaseous in at a given density and temperature.
Definition: ch4.hh:134
static Scalar triplePressure()
Returns the pressure at molecular methane's triple point.
Definition: ch4.hh:83
static Scalar gasHeatCapacity(Scalar T, Scalar pressure)
Specific isobaric heat capacity of pure methane gas.
Definition: ch4.hh:161
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of at a given pressure and temperature.
Definition: ch4.hh:215
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of gas at a given pressure and temperature.
Definition: ch4.hh:107
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of gas in , depending on pressure and temperature.
Definition: ch4.hh:119
static Scalar vaporPressure(Scalar T)
The vapor pressure in of pure molecular methane at a given temperature.
Definition: ch4.hh:92
static const Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of pure methane gas.
Definition: ch4.hh:146
static Scalar criticalTemperature()
Returns the critical temperature of molecular methane.
Definition: ch4.hh:65
static std::string name()
A human readable name for methane.
Definition: ch4.hh:53
static Scalar criticalPressure()
Returns the critical pressure of molecular methane.
Definition: ch4.hh:71
static constexpr Scalar molarMass()
The molar mass in of molecular methane.
Definition: ch4.hh:59
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: ch4.hh:125
static Scalar tripleTemperature()
Returns the temperature at molecular methane's triple point.
Definition: ch4.hh:77
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: ch4.hh:98
static const Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
Specific enthalpy of pure methane gas.
Definition: ch4.hh:192
Interface for components that have a gas state.
Definition: gas.hh:41
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 R
The ideal gas constant .
Definition: idealgas.hh:40
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,...