n2.hh 10.1 KB
Newer Older
1
2
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// 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
9
 *   the Free Software Foundation, either version 2 of the License, or       *
 *   (at your option) any later version.                                     *
10
 *                                                                           *
11
12
 *   This program is distributed in the hope that it will be useful,         *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of          *
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the            *
14
15
16
17
 *   GNU General Public License for more details.                            *
 *                                                                           *
 *   You should have received a copy of the GNU General Public License       *
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.   *
18
19
20
 *****************************************************************************/
/*!
 * \file
21
 * \ingroup Components
22
23
24
25
26
27
28
29
30
 * \brief Properties of pure molecular nitrogen \f$N_2\f$.
 */
#ifndef DUMUX_N2_HH
#define DUMUX_N2_HH

#include <dumux/material/idealgas.hh>

#include <cmath>

31
32
#include <dumux/material/components/base.hh>
#include <dumux/material/components/gas.hh>
33
34
35

namespace Dumux {
namespace Components {
36
37

/*!
38
 * \ingroup Componentss
39
 * \brief Properties of pure molecular nitrogen \f$N_2\f$.
40
41
 *
 * \tparam Scalar The type used for scalar values
42
43
 */
template <class Scalar>
44
45
46
class N2
: public Components::Base<Scalar, N2<Scalar> >
, public Components::Gas<Scalar, N2<Scalar> >
47
{
48
    using IdealGas = Dumux::IdealGas<Scalar>;
49
50
51
52
53

public:
    /*!
     * \brief A human readable name for nitrogen.
     */
54
    static std::string name()
55
56
57
    { return "N2"; }

    /*!
Felix Bode's avatar
Felix Bode committed
58
     * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of molecular nitrogen.
59
     */
60
    static constexpr Scalar molarMass()
61
62
63
    { return 28.0134e-3;}

    /*!
Felix Bode's avatar
Felix Bode committed
64
     * \brief Returns the critical temperature \f$\mathrm{[K]}\f$ of molecular nitrogen
65
66
67
68
69
     */
    static Scalar criticalTemperature()
    { return 126.192; /* [K] */ }

    /*!
Felix Bode's avatar
Felix Bode committed
70
     * \brief Returns the critical pressure \f$\mathrm{[Pa]}\f$ of molecular nitrogen.
71
72
73
74
75
     */
    static Scalar criticalPressure()
    { return 3.39858e6; /* [N/m^2] */ }

    /*!
Felix Bode's avatar
Felix Bode committed
76
     * \brief Returns the temperature \f$\mathrm{[K]}\f$ at molecular nitrogen's triple point.
77
78
79
80
81
     */
    static Scalar tripleTemperature()
    { return 63.151; /* [K] */ }

    /*!
Felix Bode's avatar
Felix Bode committed
82
     * \brief Returns the pressure \f$\mathrm{[Pa]}\f$ at molecular nitrogen's triple point.
83
84
85
86
87
     */
    static Scalar triplePressure()
    { return 12.523e3; /* [N/m^2] */ }

    /*!
Felix Bode's avatar
Felix Bode committed
88
     * \brief The vapor pressure in \f$\mathrm{[Pa]}\f$ of pure molecular nitrogen
89
90
     *        at a given temperature.
     *
91
     * \param T temperature of component in \f$\mathrm{[K]}\f$
92
     *
93
94
     * Taken from:
     *
95
     * R. Span, E.W. Lemmon, et al. (2000 ,pp. 1361-1433) \cite span2000
96
97
98
99
100
101
102
103
104
105
     */
    static Scalar vaporPressure(Scalar T)
    {
        if (T > criticalTemperature())
            return criticalPressure();
        if (T < tripleTemperature())
            return 0; // N2 is solid: We don't take sublimation into
                      // account

        // 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
110
111
112
        const Scalar N1 = -6.12445284;
        const Scalar N2 = 1.26327220;
        const Scalar N3 = -0.765910082;
        const Scalar N4 = -1.77570564;
113
114

        using std::exp;
115
116
        return
            criticalPressure() *
117
            exp(criticalTemperature()/T*
118
119
120
                     (sigma*(N1 +
                             sqrtSigma*N2 +
                             sigma*(sqrtSigma*N3 +
121
122
123
124
                                    sigma*sigma*sigma*N4))));
    }

    /*!
Felix Bode's avatar
Felix Bode committed
125
     * \brief The density \f$\mathrm{[kg/m^3]}\f$ of \f$N_2\f$ gas at a given pressure and temperature.
126
     *
Felix Bode's avatar
Felix Bode committed
127
128
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
129
130
131
132
133
134
135
     */
    static Scalar gasDensity(Scalar temperature, Scalar pressure)
    {
        // Assume an ideal gas
        return IdealGas::density(molarMass(), temperature, pressure);
    }

136
137
138
139
140
141
142
143
144
145
    /*!
     *  \brief The molar density of \f$N_2\f$ gas in \f$\mathrm{[mol/m^3]}\f$ at a given pressure and temperature.
     *
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
     *
     */
    static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
    { return IdealGas::molarDensity(temperature, pressure); }

146
    /*!
147
     * \brief Returns true if the gas phase is assumed to be compressible
148
     */
149
    static constexpr bool gasIsCompressible()
150
    { return true; }
Andreas Lauser's avatar
Andreas Lauser committed
151

152
    /*!
153
     * \brief Returns true if the gas phase is assumed to be ideal
154
     */
155
    static constexpr bool gasIsIdeal()
156
157
    { return true; }

158
    /*!
Felix Bode's avatar
Felix Bode committed
159
     * \brief The pressure of gaseous \f$N_2\f$ in \f$\mathrm{[Pa]}\f$ at a given density and temperature.
160
     *
Felix Bode's avatar
Felix Bode committed
161
162
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param density density of component in \f$\mathrm{[kg/m^3]}\f$
163
164
165
166
167
168
169
170
     */
    static Scalar gasPressure(Scalar temperature, Scalar density)
    {
        // Assume an ideal gas
        return IdealGas::pressure(temperature, density/molarMass());
    }

    /*!
Felix Bode's avatar
Felix Bode committed
171
     * \brief Specific enthalpy \f$\mathrm{[J/kg]}\f$ of pure nitrogen gas.
172
     *
173
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
Felix Bode's avatar
Felix Bode committed
174
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
175
     */
176
    static const Scalar gasEnthalpy(Scalar temperature,
177
178
                                    Scalar pressure)
    {
179
        return gasHeatCapacity(temperature, pressure) * temperature;
180
181
182
    }

    /*!
Felix Bode's avatar
Felix Bode committed
183
     * \brief Specific enthalpy \f$\mathrm{[J/kg]}\f$ of pure nitrogen gas.
184
     *
185
186
187
188
     *        Definition of enthalpy: \f$h= u + pv = u + p / \rho\f$.
     *
     *        Rearranging for internal energy yields: \f$u = h - pv\f$.
     *
Andreas Lauser's avatar
Andreas Lauser committed
189
     *        Exploiting the Ideal Gas assumption (\f$pv = R_{\textnormal{specific}} T\f$)gives: \f$u = h - R / M T \f$.
190
     *
Andreas Lauser's avatar
Andreas Lauser committed
191
     *        The universal gas constant can only be used in the case of molar formulations.
Felix Bode's avatar
Felix Bode committed
192
193
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
194
195
196
197
198
199
     */
    static const Scalar gasInternalEnergy(Scalar temperature,
                                          Scalar pressure)
    {
        return
            gasEnthalpy(temperature, pressure) -
200
            1/molarMass()* // conversion from [J/(mol K)] to [J/(kg K)]
Andreas Lauser's avatar
Andreas Lauser committed
201
            IdealGas::R*temperature; // = pressure * spec. volume for an ideal gas
202
203
    }

204
    /*!
205
     * \brief Specific isobaric heat capacity \f$\mathrm{[J/(kg*K)]}\f$ of pure
206
207
208
209
     *        nitrogen gas.
     *
     * This is equivalent to the partial derivative of the specific
     * enthalpy to the temperature.
210
211
     *
     * See: R. Reid, et al. (1987, pp 154, 657, 665) \cite reid1987
212
213
214
215
216
217
218
219
220
221
222
223
     */
    static const Scalar gasHeatCapacity(Scalar T,
                                        Scalar pressure)
    {
        // method of Joback
        const Scalar cpVapA = 31.15;
        const Scalar cpVapB = -0.01357;
        const Scalar cpVapC = 2.680e-5;
        const Scalar cpVapD = -1.168e-8;

        return
            1/molarMass()* // conversion from [J/(mol K)] to [J/(kg K)]
224
225
226
227
            (cpVapA + T*
              (cpVapB/2 + T*
                (cpVapC/3 + T*
                  (cpVapD/4))));
228
229
    }

230
    /*!
Felix Bode's avatar
Felix Bode committed
231
     * \brief The dynamic viscosity \f$\mathrm{[Pa*s]}\f$ of \f$N_2\f$ at a given pressure and temperature.
232
     *
Felix Bode's avatar
Felix Bode committed
233
234
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
235
     *
236
237
     * See:
     *
238
     * See: R. Reid, et al.: The Properties of Gases and Liquids,
239
240
     * 4th edition (1987, pp 396-397) \cite reid1987 <BR>
     * 5th edition (2001, pp 9.7-9.8 (omega and V_c taken from p. A.19)) \cite poling2001
241
     *
242
243
244
245
     */
    static Scalar gasViscosity(Scalar temperature, Scalar pressure)
    {
        const Scalar Tc = criticalTemperature();
246
247
        const Scalar Vc = 90.1; // critical specific volume [cm^3/mol]
        const Scalar omega = 0.037; // accentric factor
248
249
250
        const Scalar M = molarMass() * 1e3; // molar mas [g/mol]
        const Scalar dipole = 0.0; // dipole moment [debye]

251
252
        using std::sqrt;
        Scalar mu_r4 = 131.3 * dipole / sqrt(Vc * Tc);
253
254
255
        mu_r4 *= mu_r4;
        mu_r4 *= mu_r4;

256
257
        using std::pow;
        using std::exp;
258
259
260
        Scalar Fc = 1 - 0.2756*omega + 0.059035*mu_r4;
        Scalar Tstar = 1.2593 * temperature/Tc;
        Scalar Omega_v =
261
262
263
264
            1.16145*pow(Tstar, -0.14874) +
            0.52487*exp(- 0.77320*Tstar) +
            2.16178*exp(- 2.43787*Tstar);
        Scalar mu = 40.785*Fc*sqrt(M*temperature)/(pow(Vc, 2./3)*Omega_v);
265
266
267
268

        // convertion from micro poise to Pa s
        return mu/1e6 / 10;
    }
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284

    /*!
     * \brief Thermal conductivity \f$\mathrm{[[W/(m*K)]}\f$ of nitrogen.
     *
     * Isobaric Properties for Nitrogen and Oxygen in: NIST Standard
     * Reference Database Number 69, Eds. P.J. Linstrom and
     * W.G. Mallard evaluated at p=.1 MPa, does not
     * change dramatically with p and can be interpolated linearly with temperature
     *
     * \param temperature absolute temperature in \f$\mathrm{[K]}\f$
     * \param pressure of the phase in \f$\mathrm{[Pa]}\f$
     */
    static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
    {
        return 6.525e-5 * (temperature - 273.15) + 0.024031;
    }
285
286
};

287
288
289
} // end namespace Components

} // end namespace Dumux
290
291

#endif