o2.hh 7.51 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
21
 *****************************************************************************/
/*!
 * \file
 *
22
23
 * \ingroup Components
 *
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 * \brief Properties of pure molecular oxygen \f$O_2\f$.
 */
#ifndef DUMUX_O2_HH
#define DUMUX_O2_HH

#include <dumux/material/idealgas.hh>

#include "component.hh"

#include <cmath>

namespace Dumux
{

/*!
39
40
 * \ingroup Components
 *
41
 * \brief Properties of pure molecular oxygen \f$O_2\f$.
42
43
 *
 * \tparam Scalar The type used for scalar values
44
45
46
47
48
49
50
51
 */
template <class Scalar>
class O2 : public Component<Scalar, O2<Scalar> >
{
    typedef Dumux::IdealGas<Scalar> IdealGas;

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

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

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

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

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

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

    /*!
Felix Bode's avatar
Felix Bode committed
88
     * \brief The vapor pressure in \f$\mathrm{[Pa]}\f$ of pure molecular oxygen
89
90
     *        at a given temperature.
     *
Felix Bode's avatar
Felix Bode committed
91
     * \param T temperature of component in \f$\mathrm{[K]}\f$
92
     *
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
     * Taken from:
     *
     * R. Prydz: "An Improved Oxygen Vapor Pressure Representation",
     * Metrologia, Vol. 8, No. 1, pp. 1-4, 1972
     */
    static Scalar vaporPressure(Scalar T)
    {
        if (T > criticalTemperature())
            return criticalPressure();
        if (T < tripleTemperature())
            return 0; // O2 is solid: We don't take sublimation into account

        // vapor pressure between tripe and critical points.  See the
        // paper of Prydz for a discussion
        Scalar X =
            (1 - tripleTemperature()/T) /
            (1 - tripleTemperature()/criticalTemperature());
110
111
        const Scalar A = 7.568956;
        const Scalar B = 5.004836;
112
        const Scalar C = -2.137460;
113
        const Scalar D = 3.454481;
114
115
116
117
        const Scalar epsilon = 1.514;

        return
            triplePressure()*
118
119
            std::exp(X*(A +
                        X*(B + C*X) +
120
121
122
123
                        D*std::pow(1 - X,
                                   epsilon)));
    }

124
    /*!
125
     * \brief Returns true iff the gas phase is assumed to be compressible
126
     */
127
128
    static bool gasIsCompressible()
    { return true; }
129

130
    /*!
Felix Bode's avatar
Felix Bode committed
131
     * \brief The density in \f$\mathrm{[kg/m^3]}\f$ of pure \f$O_2\f$ at a given pressure and temperature.
132
     *
Felix Bode's avatar
Felix Bode committed
133
134
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
135
     *
136
     * \todo: density liquid oxygen
137
     */
Andreas Lauser's avatar
Andreas Lauser committed
138
    static Scalar gasDensity(Scalar temperature, Scalar pressure)
139
140
141
142
143
    {
        // Assume an ideal gas
        return IdealGas::density(molarMass(), temperature, pressure);
    }

144
145
146
147
148
149
    /*!
     * \brief Returns true iff the gas phase is assumed to be ideal
     */
    static bool gasIsIdeal()
    { return true; }

150
    /*!
Felix Bode's avatar
Felix Bode committed
151
     * \brief The pressure of gaseous \f$O_2\f$ in \f$\mathrm{[Pa]}\f$ at a given density and temperature.
152
     *
Felix Bode's avatar
Felix Bode committed
153
154
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param density density of component in \f$\mathrm{[kg/m^3]}\f$
155
156
157
158
159
160
161
162
     */
    static Scalar gasPressure(Scalar temperature, Scalar density)
    {
        // Assume an ideal gas
        return IdealGas::pressure(temperature, density/molarMass());
    }

    /*!
Felix Bode's avatar
Felix Bode committed
163
     * \brief Specific enthalpy \f$\mathrm{[J/kg]}\f$ of pure oxygen gas.
164
     *
Felix Bode's avatar
Felix Bode committed
165
166
     * \param T temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
167
     *
168
169
170
171
172
173
174
     * See: R. Reid, et al.: The Properties of Gases and Liquids, 4th
     * edition, McGraw-Hill, 1987, pp 154, 657, 665
     */
    static const Scalar gasEnthalpy(Scalar T,
                                    Scalar pressure)
    {
        // method of Joback
175
        const Scalar cpVapA = 28.11;
176
        const Scalar cpVapB = -3.680e-6;
177
        const Scalar cpVapC = 1.746e-5;
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
        const Scalar cpVapD = -1.065e-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
194
     * \brief The dynamic viscosity \f$\mathrm{[Pa*s]}\f$ of \f$O_2\f$ at a given pressure and temperature.
195
     *
Felix Bode's avatar
Felix Bode committed
196
197
     * \param temperature temperature of component in \f$\mathrm{[K]}\f$
     * \param pressure pressure of component in \f$\mathrm{[Pa]}\f$
198
     *
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
     * See:
     *
     * See: R. Reid, et al.: The Properties of Gases and Liquids, 4th
     * edition, McGraw-Hill, 1987, pp 396-397, 664
     */
    static Scalar gasViscosity(Scalar temperature, Scalar pressure)
    {
        const Scalar Tc = criticalTemperature();
        const Scalar Vc = 73.4; // critical specific volume [cm^3/mol]
        const Scalar omega = 0.025; // 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 =
219
220
            1.16145*std::pow(Tstar, -0.14874) +
            0.52487*std::exp(- 0.77320*Tstar) +
221
222
223
224
225
226
227
228
            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;
    }
};

229
} // end namespace
230
231

#endif