h2.hh 8.05 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
Felix Bode's avatar
Felix Bode committed
22
 * \brief Properties of pure molecular hydrogen \f$H_2\f$.
23
24
25
26
27
28
29
30
 */
#ifndef DUMUX_H2_HH
#define DUMUX_H2_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 Components
39
 * \brief Properties of pure molecular hydrogen \f$H_2\f$.
40
41
 *
 * \tparam Scalar The type used for scalar values
42
43
 */
template <class Scalar>
44
45
46
class H2
: public Components::Base<Scalar, H2<Scalar> >
, public Components::Gas<Scalar, H2<Scalar> >
47
{
48
    using IdealGas = Dumux::IdealGas<Scalar>;
49
50
51

public:
    /*!
Felix Bode's avatar
Felix Bode committed
52
     * \brief A human readable name for the \f$H_2\f$.
53
     */
54
    static std::string name()
55
56
57
    { return "H2"; }

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

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

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

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

    /*!
Felix Bode's avatar
Felix Bode committed
82
     * \brief The vapor pressure in \f$\mathrm{[Pa]}\f$ of pure molecular hydrogen
83
84
     *        at a given temperature.
     *
Felix Bode's avatar
Felix Bode committed
85
     *\param temperature temperature of component in \f$\mathrm{[K]}\f$
86
     *
87
88
     * Taken from:
     *
89
     * See: R. Reid, et al. (1987, pp 208-209, 669) \cite reid1987
90
91
     *
     * \todo implement the Gomez-Thodos approach...
92
93
94
95
96
97
98
99
100
101
102
103
104
105
     */
    static Scalar vaporPressure(Scalar temperature)
    {
        if (temperature > criticalTemperature())
            return criticalPressure();
        if (temperature < tripleTemperature())
            return 0; // H2 is solid: We don't take sublimation into
                      // account

        // antoine equatuion
        const Scalar A = -7.76451;
        const Scalar B = 1.45838;
        const Scalar C = -2.77580;

106
107
        using std::exp;
        return 1e5 * exp(A - B/(temperature + C));
108
109
110
    }

    /*!
Felix Bode's avatar
Felix Bode committed
111
     * \brief The density \f$\mathrm{[kg/m^3]}\f$ of \f$H_2\f$ at a given pressure and temperature.
112
     *
Felix Bode's avatar
Felix Bode committed
113
114
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
115
     */
Andreas Lauser's avatar
Andreas Lauser committed
116
    static Scalar gasDensity(Scalar temperature, Scalar pressure)
117
118
119
120
121
    {
        // Assume an ideal gas
        return IdealGas::density(molarMass(), temperature, pressure);
    }

122
123
124
125
126
127
128
129
130
    /*!
     * \brief The molar density of \f$H_2\f$ in \f$\mathrm{[mol/m^3]}\f$,
     *   depending on pressure and temperature.
     * \param temperature The temperature of the gas
     * \param pressure The pressure of the gas
     */
    static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
    { return IdealGas::molarDensity(temperature, pressure); }

131
    /*!
132
     * \brief Returns true if the gas phase is assumed to be compressible
133
     */
134
    static constexpr bool gasIsCompressible()
135
    { return true; }
136

137
    /*!
138
     * \brief Returns true if the gas phase is assumed to be ideal
139
     */
140
    static constexpr bool gasIsIdeal()
141
142
    { return true; }

143
    /*!
Felix Bode's avatar
Felix Bode committed
144
     * \brief The pressure of gaseous \f$H_2\f$ in \f$\mathrm{[Pa]}\f$ at a given density and temperature.
145
     *
Felix Bode's avatar
Felix Bode committed
146
147
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param density density of component in \f$\mathrm{[kg/m^3]}\f$
148
149
150
151
152
153
154
155
     */
    static Scalar gasPressure(Scalar temperature, Scalar density)
    {
        // Assume an ideal gas
        return IdealGas::pressure(temperature, density/molarMass());
    }

    /*!
Felix Bode's avatar
Felix Bode committed
156
     * \brief Specific enthalpy \f$\mathrm{[J/kg]}\f$ of pure hydrogen gas.
157
     *
158
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
Felix Bode's avatar
Felix Bode committed
159
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
160
161
162
163
164
165
166
167
168
169
170
171
172
     */
    static const Scalar gasEnthalpy(Scalar temperature,
                                    Scalar pressure)
    {
        return gasHeatCapacity(temperature, pressure) * temperature;
    }

    /*!
     * \brief Specific isobaric heat capacity \f$\mathrm{[J/(kg*K)]}\f$ of pure
     *        hydrogen gas.
     *
     * This is equivalent to the partial derivative of the specific
     * enthalpy to the temperature.
173
174
     * \param T temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
175
     *
176
     * See: R. Reid, et al. (1987, pp 154, 657, 665) \cite reid1987
177
     */
178
179
    static const Scalar gasHeatCapacity(Scalar T,
                                        Scalar pressure)
180
181
    {
        // method of Joback
182
183
        const Scalar cpVapA = 27.14;
        const Scalar cpVapB = 9.273e-3;
184
        const Scalar cpVapC = -1.381e-5;
185
        const Scalar cpVapD = 7.645e-9;
186
187

        return
188
189
190
            1/molarMass()* // conversion from [J/(mol*K)] to [J/(kg*K)]
            (cpVapA + T*
              (cpVapB/2 + T*
191
192
193
194
195
                (cpVapC/3 + T*
                 (cpVapD/4))));
    }

    /*!
Felix Bode's avatar
Felix Bode committed
196
     * \brief The dynamic viscosity \f$\mathrm{[Pa*s]}\f$ of \f$H_2\f$ at a given pressure and temperature.
197
     *
198
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
Felix Bode's avatar
Felix Bode committed
199
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
200
     *
201
202
     * See:
     *
203
     * See: R. Reid, et al.: The Properties of Gases and Liquids,
204
205
     * 4th edition (1987, pp 396-397, 667) \cite reid1987 <BR>
     * 5th edition (2001, pp 9.7-9.8 (omega and V_c taken from p. A.19)) \cite poling2001
206
207
208
209
     */
    static Scalar gasViscosity(Scalar temperature, Scalar pressure)
    {
        const Scalar Tc = criticalTemperature();
210
211
        const Scalar Vc = 65.0; // critical specific volume [cm^3/mol]
        const Scalar omega = -0.216; // accentric factor
212
213
214
        const Scalar M = molarMass() * 1e3; // molar mas [g/mol]
        const Scalar dipole = 0.0; // dipole moment [debye]

215
216
        using std::sqrt;
        Scalar mu_r4 = 131.3 * dipole / sqrt(Vc * Tc);
217
218
219
        mu_r4 *= mu_r4;
        mu_r4 *= mu_r4;

220
221
        using std::pow;
        using std::exp;
222
223
224
        Scalar Fc = 1 - 0.2756*omega + 0.059035*mu_r4;
        Scalar Tstar = 1.2593 * temperature/Tc;
        Scalar Omega_v =
225
226
227
228
            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);
229
230
231
232
233
234

        // convertion from micro poise to Pa s
        return mu/1e6 / 10;
    }
};

235
236
237
} // end namespace Components

} // end namespace Dumux
238
239

#endif