3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
air.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_AIR_HH
25#define DUMUX_AIR_HH
26
29
32
33namespace Dumux {
34namespace Components {
35
42template <class Scalar>
43class Air
44: public Components::Base<Scalar, Air<Scalar> >
45, public Components::Gas<Scalar, Air<Scalar> >
46{
48
49public:
53 static std::string name()
54 { return "Air"; }
55
61 static constexpr Scalar molarMass()
62 { return 0.02896; /* [kg/mol] */ }
63
68 { return 132.6312; /* [K] */ }
69
74 { return 37.86e5; /* [Pa] */ }
75
85 {
86 // Assume an ideal gas
88 }
89
98
102 static constexpr bool gasIsCompressible()
103 { return true; }
104
108 static constexpr bool gasIsIdeal()
109 { return true; }
110
120 {
121 // Assume an ideal gas
123 }
124
149 {
150 const Scalar Tc = criticalTemperature();
151 const Scalar Vc = 84.525138; // critical specific volume [cm^3/mol]
152 const Scalar omega = 0.078; // accentric factor
153 const Scalar M = molarMass() * 1e3; // molar mas [g/mol]
154
155 const Scalar Fc = 1.0 - 0.2756*omega;
156 const Scalar Tstar = 1.2593*temperature/Tc;
157
158 using std::exp;
159 using std::pow;
160 const Scalar Omega_v = 1.16145*pow(Tstar, -0.14874)
161 + 0.52487*exp(-0.77320*Tstar)
162 + 2.16178*exp(-2.43787*Tstar);
163
164 using std::cbrt;
165 using std::sqrt;
166 const Scalar mu = 40.785 * Fc * sqrt(M * temperature)/(cbrt(Vc * Vc) * Omega_v);
167
168 // convertion from micro poise to Pa s
169 return mu/1.0e6/10.0;
170 }
171
187 {
188 // above 1200 K, the function becomes inaccurate
189 // since this should realistically never happen, we can live with it
190 const Scalar tempCelsius = temperature - 273.15;
191 const Scalar pressureCorrectionFactor = 9.7115e-9*tempCelsius*tempCelsius - 5.5e-6*tempCelsius + 0.0010809;
192
193 using std::sqrt;
194 const Scalar mu = 1.496e-6 * sqrt(temperature * temperature * temperature) / (temperature + 120.0)
195 * (1.0 + (pressure/1.0e5 - 1.0)*pressureCorrectionFactor);
196 return mu;
197 }
198
211 {
212 // above 1200 K, the function becomes inaccurate
213 // since this should realistically never happen, we can live with it
214 using std::sqrt;
215 return 1.496e-6 * sqrt(temperature * temperature * temperature) / (temperature + 120.0);
216 }
217
230 {
231 const Scalar epsk = 103.3; // [K]
232
233 using std::log;
234 using std::exp;
235 using std::sqrt;
236 const Scalar logTstar = log(temperature/epsk);
237 const Scalar Omega = exp(0.431
238 - 0.4623*logTstar
239 + 0.08406*logTstar*logTstar
240 + 0.005341*logTstar*logTstar*logTstar
241 - 0.00331*logTstar*logTstar*logTstar*logTstar);
242
243 const Scalar sigma = 0.36; // [nm]
244 const Scalar eta0 = 0.0266958*sqrt(1000.0*molarMass()*temperature)/(sigma*sigma*Omega);
245
246 using std::pow;
248 const Scalar rhoc = 10.4477; // [mol/m^3]
249 const Scalar delta = 0.001*pressure/(temperature*8.3144598)/rhoc;
250 const Scalar etaR = 10.72 * pow(tau, 0.2) * delta
251 + 1.122 * pow(tau, 0.05) * pow(delta, 4)
252 + 0.002019 * pow(tau, 2.4) * pow(delta, 9)
253 - 8.876 * pow(tau, 0.6) * delta * exp(-delta)
254 - 0.02916 * pow(tau, 3.6) * pow(delta, 8) * exp(-delta);
255
256 return (eta0 + etaR)*1e-6;
257 }
258
269 {
271 }
272
286 {
288 - IdealGas::R * temperature // = pressure * molar volume for an ideal gas
289 / molarMass(); // conversion from [J/(mol K)] to [J/(kg K)]
290 }
291
307 {
308 // scale temperature with reference temp of 100K
309 Scalar phi = temperature/100;
310
311 using std::pow;
312 Scalar c_p = 0.661738E+01
313 -0.105885E+01 * phi
314 +0.201650E+00 * pow(phi,2)
315 -0.196930E-01 * pow(phi,3)
316 +0.106460E-02 * pow(phi,4)
317 -0.303284E-04 * pow(phi,5)
318 +0.355861E-06 * pow(phi,6);
319 c_p += -0.549169E+01 * pow(phi,-1)
320 +0.585171E+01 * pow(phi,-2)
321 -0.372865E+01 * pow(phi,-3)
322 +0.133981E+01 * pow(phi,-4)
323 -0.233758E+00 * pow(phi,-5)
324 +0.125718E-01 * pow(phi,-6);
325 c_p *= IdealGas::R / molarMass(); // in J/(mol*K) / (kg/mol)
326
327 return c_p;
328 }
329
343 {
344 return 0.0255535;
345 }
346};
347
348} // end namespace Components
349} // end namespace Dumux
350
351#endif
Some exceptions thrown in DuMux
Interface for components that have a gas state.
Relations valid for an ideal gas.
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
A class for the air fluid properties.
Definition: air.hh:46
static Scalar exactGasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of Air at a given pressure and temperature.
Definition: air.hh:229
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of Air at a given pressure and temperature.
Definition: air.hh:84
static constexpr Scalar molarMass()
The molar mass in of Air.
Definition: air.hh:61
static const Scalar gasHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of pure air.
Definition: air.hh:305
static Scalar criticalPressure()
Returns the critical pressure of Air.
Definition: air.hh:73
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of Air at a given pressure and temperature.
Definition: air.hh:186
static constexpr bool gasIsCompressible()
Returns true, the gas phase is assumed to be compressible.
Definition: air.hh:102
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of air.
Definition: air.hh:342
static constexpr bool gasIsIdeal()
Returns true, the gas phase is assumed to be ideal.
Definition: air.hh:108
static Scalar simpleGasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of Air at a given pressure and temperature.
Definition: air.hh:210
static Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of Air with 273.15 as basis.
Definition: air.hh:268
static Scalar criticalTemperature()
Returns the critical temperature of Air.
Definition: air.hh:67
static Scalar oldGasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of Air at a given pressure and temperature.
Definition: air.hh:148
static const Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of Air .
Definition: air.hh:284
static std::string name()
A human readable name for Air.
Definition: air.hh:53
static Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of gaseous Air at a given density and temperature.
Definition: air.hh:119
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of air in , depending on pressure and temperature.
Definition: air.hh:96
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
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,...