Air_Xylene.hpp
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 This file is part of the Open Porous Media project (OPM).
5
6 OPM 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 2 of the License, or
9 (at your option) any later version.
10
11 OPM 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 OPM. If not, see <http://www.gnu.org/licenses/>.
18
19 Consult the COPYING file in the top-level source directory of this
20 module for the precise wording of the license and the list of
21 copyright holders.
22*/
27#ifndef OPM_BINARY_COEFF_AIR_XYLENE_HPP
28#define OPM_BINARY_COEFF_AIR_XYLENE_HPP
29
32
33namespace Opm {
34namespace BinaryCoeff {
35
40{
41public:
45 template <class Evaluation>
46 static Evaluation henry(const Evaluation& /*temperature*/)
47 { throw std::runtime_error("Not implemented: Henry coefficient of air in xylene"); }
48
56 template <class Evaluation>
57 static Evaluation gasDiffCoeff(Evaluation temperature, Evaluation pressure)
58 {
59 typedef Air<double> Air;
60 typedef Xylene<double> Xylene;
61
62 temperature = max(temperature, 1e-9); // regularization
63 temperature = min(temperature, 500.0); // regularization
64 pressure = max(pressure, 0.0); // regularization
65 pressure = min(pressure, 1e8); // regularization
66
67 const double M_x = 1e3*Xylene::molarMass(); // [g/mol] molecular weight of xylene
68 const double M_a = 1e3*Air::molarMass(); // [g/mol] molecular weight of air
69 const double Tb_x = 412.0; // [K] boiling temperature of xylene
70 const double sigma_a = 3.711; // charact. length of air
71 const double T_scal_a = 78.6; // [K] (molec. energy of attraction/Boltzmann constant)
72 const double V_B_x = 140.4; // [cm^3/mol] LeBas molal volume of xylene
73 const double sigma_x = 1.18*std::pow(V_B_x, 0.333); // charact. length of xylene
74 const double sigma_ax = 0.5*(sigma_a + sigma_x);
75 const double T_scal_x = 1.15*Tb_x;
76 const double T_scal_ax = std::sqrt(T_scal_a*T_scal_x);
77
78 const Evaluation& T_star = max(temperature/T_scal_ax, 1e-5);
79
80 const Evaluation& Omega = 1.06036/pow(T_star, 0.1561) + 0.193/exp(T_star*0.47635)
81 + 1.03587/exp(T_star*1.52996) + 1.76474/exp(T_star*3.89411);
82 const double B_ = 0.00217 - 0.0005*std::sqrt(1.0/M_a + 1.0/M_x);
83 const double Mr = (M_a + M_x)/(M_a*M_x);
84 return 1e-4
85 *(B_*pow(temperature,1.5)*std::sqrt(Mr))
86 /(1e-5*pressure*std::pow(sigma_ax, 2.0)*Omega);
87 }
88
94 template <class Evaluation>
95 static Evaluation liquidDiffCoeff(const Evaluation& /*temperature*/, const Evaluation& /*pressure*/)
96 { throw std::runtime_error("Not implemented: Binary liquid diffusion coefficients of air and xylene"); }
97};
98
99} // namespace BinaryCoeff
100} // namespace Opm
101
102#endif
A simple class implementing the fluid properties of air.
Definition: Air.hpp:47
static Scalar molarMass()
The molar mass in of .
Definition: Air.hpp:80
Binary coefficients for water and xylene.
Definition: Air_Xylene.hpp:40
static Evaluation liquidDiffCoeff(const Evaluation &, const Evaluation &)
Diffusion coefficent [m^2/s] for molecular xylene in liquid water.
Definition: Air_Xylene.hpp:95
static Evaluation henry(const Evaluation &)
Definition: Air_Xylene.hpp:46
static Evaluation gasDiffCoeff(Evaluation temperature, Evaluation pressure)
Binary diffusion coefficent [m^2/s] for air and xylene. method according to Wilke and Lee see Handboo...
Definition: Air_Xylene.hpp:57
Component for Xylene.
Definition: Xylene.hpp:47
static Scalar molarMass()
The molar mass in of xylene.
Definition: Xylene.hpp:61
Definition: Air_Mesitylene.hpp:34
Evaluation exp(const Evaluation &value)
Definition: MathToolbox.hpp:403
Evaluation sqrt(const Evaluation &value)
Definition: MathToolbox.hpp:399
ReturnEval_< Evaluation1, Evaluation2 >::type min(const Evaluation1 &arg1, const Evaluation2 &arg2)
Definition: MathToolbox.hpp:346
ReturnEval_< Evaluation1, Evaluation2 >::type max(const Evaluation1 &arg1, const Evaluation2 &arg2)
Definition: MathToolbox.hpp:341
ReturnEval_< Evaluation1, Evaluation2 >::type pow(const Evaluation1 &base, const Evaluation2 &exp)
Definition: MathToolbox.hpp:416