ch4.hh 8.97 KB
Newer Older
1
2
3
4
5
6
/*****************************************************************************
 *   Copyright (C) 2010 by Andreas Lauser
 *   Institute of Hydraulic Engineering                                      *
 *   University of Stuttgart, Germany                                        *
 *   email: <givenname>.<name>@iws.uni-stuttgart.de                          *
 *                                                                           *
7
 *   This program is free software: you can redistribute it and/or modify    *
8
 *   it under the terms of the GNU General Public License as published by    *
9
10
 *   the Free Software Foundation, either version 2 of the License, or       *
 *   (at your option) any later version.                                     *
11
 *                                                                           *
12
13
14
15
16
17
18
 *   This program is distributed in the hope that it will be useful,         *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of          *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
 *   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/>.   *
19
20
21
22
 *****************************************************************************/
/*!
 * \file
 *
23
24
 * \ingroup Components
 *
25
 * \brief Properties of methane \f$CH_4\f$.
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 */
#ifndef DUMUX_CH4_HH
#define DUMUX_CH4_HH

#include <dumux/material/idealgas.hh>

#include "component.hh"

#include <cmath>

namespace Dumux
{

/*!
40
41
 * \ingroup Components
 *
42
 * \brief Properties of pure molecular methane \f$CH_4\f$.
43
44
 *
 * \tparam Scalar The type used for scalar values
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
 */
template <class Scalar>
class CH4 : public Component<Scalar, CH4<Scalar> >
{
    typedef Component<Scalar, CH4<Scalar> >  ParentType;
    typedef Dumux::IdealGas<Scalar> IdealGas;

public:
    /*!
     * \brief A human readable name for methane.
     */
    static const char *name()
    { return "CH4"; }

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

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

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

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

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

    /*!
Felix Bode's avatar
Felix Bode committed
90
     * \brief The vapor pressure in \f$\mathrm{[Pa]}\f$ of pure molecular methane
91
     *        at a given temperature.
92
     *
Felix Bode's avatar
Felix Bode committed
93
     *\param T temperature of component in \f$\mathrm{[K]}\f$
94
95
96
97
98
99
     */
    static Scalar vaporPressure(Scalar T)
    { DUNE_THROW(Dune::NotImplemented, "vaporPressure for CH4"); }


    /*!
Felix Bode's avatar
Felix Bode committed
100
     * \brief The density \f$\mathrm{[kg/m^3]}\f$ of \f$CH_4\f$ gas at a given pressure and temperature.
101
     *
Felix Bode's avatar
Felix Bode committed
102
103
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
104
105
106
107
108
109
110
     */
    static Scalar gasDensity(Scalar temperature, Scalar pressure)
    {
        // Assume an ideal gas
        return IdealGas::density(molarMass(), temperature, pressure);
    }

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

    /*!
Felix Bode's avatar
Felix Bode committed
124
     * \brief The density \f$\mathrm{[kg/m^3]}\f$ of \f$CH_4\f$ gas at a given pressure and temperature.
125
     *
Felix Bode's avatar
Felix Bode committed
126
127
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
128
129
130
131
     */
    static Scalar liquidDensity(Scalar temperature, Scalar pressure)
    { DUNE_THROW(Dune::NotImplemented, "liquidDensity for CH4"); }

132
    /*!
Felix Bode's avatar
Felix Bode committed
133
     * \brief The pressure of liquid methane in \f$\mathrm{[Pa]}\f$ at a given density and
134
135
     *        temperature.
    *
Felix Bode's avatar
Felix Bode committed
136
137
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param density density of component in \f$\mathrm{[kg/m^3]}\f$
138
139
140
141
142
     */
    static Scalar liquidPressure(Scalar temperature, Scalar density)
    { DUNE_THROW(Dune::NotImplemented, "liquidPressure for CH4"); }

    /*!
Felix Bode's avatar
Felix Bode committed
143
     * \brief Specific enthalpy \f$\mathrm{[J/kg]}\f$ of pure methane gas.
144
     *
Felix Bode's avatar
Felix Bode committed
145
146
     * \param T temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
147
     *
148
149
150
151
152
153
154
     * See: R. Reid, et al.: The Properties of Gases and Liquids, 4th
     * edition, McGraw-Hill, 1987, pp 154, 657, 671
     */
    static const Scalar gasEnthalpy(Scalar T,
                                    Scalar pressure)
    {
        // method of Joback
155
156
157
        const Scalar cpVapA = 19.25;
        const Scalar cpVapB = 0.05213;
        const Scalar cpVapC = 1.197e-5;
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
        const Scalar cpVapD = -1.132e-8;

        //Scalar cp =
        //    cpVapA + T*(cpVapB + T*(cpVapC + T*cpVapD));

        // calculate: \int_0^T c_p dT
        return
            1/molarMass()* // conversion from [J/mol] to [J/kg]

            T*(cpVapA + T*
               (cpVapB/2 + T*
                (cpVapC/3 + T*
                 (cpVapD/4))));
    }

    /*!
Felix Bode's avatar
Felix Bode committed
174
     * \brief Specific enthalpy \f$\mathrm{[J/kg]}\f$ of pure liquid \f$CH_4\f$.
175
     *
Felix Bode's avatar
Felix Bode committed
176
177
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
178
179
180
181
182
     */
    static Scalar liquidEnthalpy(Scalar temperature, Scalar pressure)
    { DUNE_THROW(Dune::NotImplemented, "liquidEnthalpy for CH4"); }

    /*!
Felix Bode's avatar
Felix Bode committed
183
     * \brief Specific enthalpy \f$\mathrm{[J/kg]}\f$ of pure methane gas.
184
     *
Felix Bode's avatar
Felix Bode committed
185
186
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
187
188
189
190
191
192
193
194
195
196
197
     */
    static const Scalar gasInternalEnergy(Scalar temperature,
                                          Scalar pressure)
    {

        return
            gasEnthalpy(temperature, pressure) -
            IdealGas::R*temperature; // = pressure * spec. volume for an ideal gas
    }

    /*!
Felix Bode's avatar
Felix Bode committed
198
     * \brief Specific enthalpy \f$\mathrm{[J/kg]}\f$ of pure liquid \f$CH_4\f$.
199
     *
Felix Bode's avatar
Felix Bode committed
200
201
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
202
203
204
205
206
     */
    static Scalar liquidInternalEnergy(Scalar temperature, Scalar pressure)
    { DUNE_THROW(Dune::NotImplemented, "liquidInternalEnergy of CH4"); }

    /*!
Felix Bode's avatar
Felix Bode committed
207
     * \brief The dynamic viscosity \f$\mathrm{[Pa*s]}\f$ of \f$CH_4\f$ at a given pressure and temperature.
208
     *
Felix Bode's avatar
Felix Bode committed
209
210
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
211
     *
212
213
     * See:
     *
214
215
216
217
     * See: R. Reid, et al.: The Properties of Gases and Liquids,
     * 4th edition, McGraw-Hill, 1987, pp 396-397, 670
     * 5th edition, McGraw-Hill, 2001  pp 9.7-9.8 (omega and V_c taken from p. A.5)
     *
218
219
220
221
     */
    static Scalar gasViscosity(Scalar temperature, Scalar pressure)
    {
        const Scalar Tc = criticalTemperature();
222
        const Scalar Vc = 98.6; // critical specific volume [cm^3/mol]
223
224
225
226
227
228
229
230
231
232
233
        const Scalar omega = 0.011; // accentric factor
        const Scalar M = molarMass() * 1e3; // molar mas [g/mol]
        const Scalar dipole = 0.0; // dipole moment [debye]

        Scalar mu_r4 = 131.3 * dipole / std::sqrt(Vc * Tc);
        mu_r4 *= mu_r4;
        mu_r4 *= mu_r4;

        Scalar Fc = 1 - 0.2756*omega + 0.059035*mu_r4;
        Scalar Tstar = 1.2593 * temperature/Tc;
        Scalar Omega_v =
234
235
            1.16145*std::pow(Tstar, -0.14874) +
            0.52487*std::exp(- 0.77320*Tstar) +
236
237
238
239
240
241
242
243
            2.16178*std::exp(- 2.43787*Tstar);
        Scalar mu = 40.785*Fc*std::sqrt(M*temperature)/(std::pow(Vc, 2./3)*Omega_v);

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

    /*!
Felix Bode's avatar
Felix Bode committed
244
     * \brief The dynamic liquid viscosity \f$\mathrm{[Pa*s]}\f$ of pure \f$CH_4\f$.
245
     *
Felix Bode's avatar
Felix Bode committed
246
247
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
248
249
250
251
252
253
254
255
     */
    static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
    { DUNE_THROW(Dune::NotImplemented, "liquidViscosity for CH4"); }
};

} // end namepace

#endif