3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
n2.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_N2_HH
25#define DUMUX_N2_HH
26
28
29#include <cmath>
30
33
34namespace Dumux {
35namespace Components {
36
43template <class Scalar>
44class N2
45: public Components::Base<Scalar, N2<Scalar> >
46, public Components::Gas<Scalar, N2<Scalar> >
47{
49
50public:
54 static std::string name()
55 { return "N2"; }
56
60 static constexpr Scalar molarMass()
61 { return 28.0134e-3;}
62
67 { return 126.192; /* [K] */ }
68
73 { return 3.39858e6; /* [N/m^2] */ }
74
79 { return 63.151; /* [K] */ }
80
85 { return 12.523e3; /* [N/m^2] */ }
86
98 {
99 if (T > criticalTemperature())
100 return criticalPressure();
101 if (T < tripleTemperature())
102 return 0; // N2 is solid: We don't take sublimation into
103 // account
104
105 // note: this is the ancillary equation given on page 1368
106 using std::sqrt;
107 Scalar sigma = Scalar(1.0) - T/criticalTemperature();
108 Scalar sqrtSigma = sqrt(sigma);
109 const Scalar N1 = -6.12445284;
110 const Scalar N2 = 1.26327220;
111 const Scalar N3 = -0.765910082;
112 const Scalar N4 = -1.77570564;
113
114 using std::exp;
115 return
117 exp(criticalTemperature()/T*
118 (sigma*(N1 +
119 sqrtSigma*N2 +
120 sigma*(sqrtSigma*N3 +
121 sigma*sigma*sigma*N4))));
122 }
123
131 {
132 // Assume an ideal gas
134 }
135
145
149 static constexpr bool gasIsCompressible()
150 { return true; }
151
155 static constexpr bool gasIsIdeal()
156 { return true; }
157
165 {
166 // Assume an ideal gas
168 }
169
178 {
180 }
181
197 {
198 return
200 1/molarMass()* // conversion from [J/(mol K)] to [J/(kg K)]
201 IdealGas::R*temperature; // = pressure * spec. volume for an ideal gas
202 }
203
215 {
216 // method of Joback
217 const Scalar cpVapA = 31.15;
218 const Scalar cpVapB = -0.01357;
219 const Scalar cpVapC = 2.680e-5;
220 const Scalar cpVapD = -1.168e-8;
221
222 return
223 1/molarMass()* // conversion from [J/(mol K)] to [J/(kg K)]
224 (cpVapA + T*
225 (cpVapB/2 + T*
226 (cpVapC/3 + T*
227 (cpVapD/4))));
228 }
229
244 {
245 const Scalar Tc = criticalTemperature();
246 const Scalar Vc = 90.1; // critical specific volume [cm^3/mol]
247 const Scalar omega = 0.037; // accentric factor
248 const Scalar M = molarMass() * 1e3; // molar mas [g/mol]
249 const Scalar dipole = 0.0; // dipole moment [debye]
250
251 using std::sqrt;
252 Scalar mu_r4 = 131.3 * dipole / sqrt(Vc * Tc);
253 mu_r4 *= mu_r4;
254 mu_r4 *= mu_r4;
255
256 using std::pow;
257 using std::exp;
258 Scalar Fc = 1 - 0.2756*omega + 0.059035*mu_r4;
259 Scalar Tstar = 1.2593 * temperature/Tc;
260 Scalar Omega_v =
261 1.16145*pow(Tstar, -0.14874) +
262 0.52487*exp(- 0.77320*Tstar) +
263 2.16178*exp(- 2.43787*Tstar);
264 Scalar mu = 40.785*Fc*sqrt(M*temperature)/(pow(Vc, 2./3)*Omega_v);
265
266 // convertion from micro poise to Pa s
267 return mu/1e6 / 10;
268 }
269
282 {
283 return 6.525e-5 * (temperature - 273.15) + 0.024031;
284 }
285};
286
287} // end namespace Components
288
289} // end namespace Dumux
290
291#endif
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
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 nitrogen .
Definition: n2.hh:47
static Scalar criticalTemperature()
Returns the critical temperature of molecular nitrogen.
Definition: n2.hh:66
static const Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
Specific enthalpy of pure nitrogen gas.
Definition: n2.hh:195
static Scalar criticalPressure()
Returns the critical pressure of molecular nitrogen.
Definition: n2.hh:72
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of at a given pressure and temperature.
Definition: n2.hh:243
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of gas in at a given pressure and temperature.
Definition: n2.hh:143
static std::string name()
A human readable name for nitrogen.
Definition: n2.hh:54
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of gas at a given pressure and temperature.
Definition: n2.hh:130
static constexpr Scalar molarMass()
The molar mass in of molecular nitrogen.
Definition: n2.hh:60
static Scalar vaporPressure(Scalar T)
The vapor pressure in of pure molecular nitrogen at a given temperature.
Definition: n2.hh:97
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of nitrogen.
Definition: n2.hh:281
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: n2.hh:155
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: n2.hh:149
static const Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of pure nitrogen gas.
Definition: n2.hh:176
static const Scalar gasHeatCapacity(Scalar T, Scalar pressure)
Specific isobaric heat capacity of pure nitrogen gas.
Definition: n2.hh:213
static Scalar tripleTemperature()
Returns the temperature at molecular nitrogen's triple point.
Definition: n2.hh:78
static Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of gaseous in at a given density and temperature.
Definition: n2.hh:164
static Scalar triplePressure()
Returns the pressure at molecular nitrogen's triple point.
Definition: n2.hh:84
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,...