H2O_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  Copyright (C) 2009-2013 by Andreas Lauser
5 
6  This file is part of the Open Porous Media project (OPM).
7 
8  OPM is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 2 of the License, or
11  (at your option) any later version.
12 
13  OPM is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with OPM. If not, see <http://www.gnu.org/licenses/>.
20 */
25 #ifndef OPM_BINARY_COEFF_H2O_XYLENE_HPP
26 #define OPM_BINARY_COEFF_H2O_XYLENE_HPP
27 
30 
31 namespace Opm {
32 namespace BinaryCoeff {
33 
38 {
39 public:
48  template <class Evaluation>
49  static Evaluation henry(const Evaluation& /*temperature*/)
50  {
51  // after Sanders
52  double sanderH = 1.5e-1; //[M/atm]
53  //conversion to our Henry definition
54  double opmH = sanderH / 101.325; // has now [(mol/m^3)/Pa]
55  opmH *= 18.02e-6; //multiplied by molar volume of reference phase = water
56  return 1.0/opmH; // [Pa]
57  }
58 
63  template <class Evaluation>
64  static Evaluation gasDiffCoeff(Evaluation temperature, Evaluation pressure)
65  {
66  typedef Opm::MathToolbox<Evaluation> Toolbox;
67  typedef Opm::H2O<double> H2O;
69 
70  temperature = Toolbox::max(temperature, 1e-9); // regularization
71  temperature = Toolbox::min(temperature, 500.0); // regularization
72  pressure = Toolbox::max(pressure, 0.0); // regularization
73  pressure = Toolbox::min(pressure, 1e8); // regularization
74 
75  const double M_x = 1e3*Xylene::molarMass(); // [g/mol] molecular weight of xylene
76  const double M_w = 1e3*H2O::molarMass(); // [g/mol] molecular weight of water
77  const double Tb_x = 412.9; // [K] boiling temperature of xylene
78  const double Tb_w = 373.15; // [K] boiling temperature of water (at p_atm)
79  const double V_B_w = 18.0; // [cm^3/mol] LeBas molal volume of water
80  const double sigma_w = 1.18*std::pow(V_B_w, 0.333); // charact. length of air
81  const double T_scal_w = 1.15*Tb_w; // [K] (molec. energy of attraction/Boltzmann constant)
82  const double V_B_x = 140.4; // [cm^3/mol] LeBas molal volume of xylene
83  const double sigma_x = 1.18*std::pow(V_B_x, 0.333); // charact. length of xylene
84  const double sigma_wx = 0.5*(sigma_w + sigma_x);
85  const double T_scal_x = 1.15*Tb_x;
86  const double T_scal_wx = std::sqrt(T_scal_w*T_scal_x);
87 
88  const Evaluation& T_star = Toolbox::max(temperature/T_scal_wx, 1e-5);
89 
90  const Evaluation& Omega = 1.06036/Toolbox::pow(T_star, 0.1561) + 0.193/Toolbox::exp(T_star*0.47635)
91  + 1.03587/Toolbox::exp(T_star*1.52996) + 1.76474/Toolbox::exp(T_star*3.89411);
92  const double B_ = 0.00217 - 0.0005*std::sqrt(1.0/M_w + 1.0/M_x);
93  const double Mr = (M_w + M_x)/(M_w*M_x);
94  return 1e-4
95  *(B_*Toolbox::pow(temperature,1.6)*std::sqrt(Mr))
96  /(1e-5*pressure*std::pow(sigma_wx, 2.0)*Omega);
97  }
98 
104  template <class Evaluation>
105  static Evaluation liquidDiffCoeff(const Evaluation& /*temperature*/, const Evaluation& /*pressure*/)
106  {
107  return 1.e-9; // This is just an order of magnitude. Please improve it!
108  }
109 };
110 
111 } // namespace BinaryCoeff
112 } // namespace Opm
113 
114 #endif
static Evaluation liquidDiffCoeff(const Evaluation &, const Evaluation &)
Diffusion coefficent [m^2/s] for xylene in liquid water.
Definition: H2O_Xylene.hpp:105
Material properties of pure water .
Definition: H2O.hpp:60
Definition: MathToolbox.hpp:39
Definition: Air_Mesitylene.hpp:31
Evaluation< Scalar, VarSetTag, numVars > max(const Evaluation< Scalar, VarSetTag, numVars > &x1, const Evaluation< Scalar, VarSetTag, numVars > &x2)
Definition: Math.hpp:114
Evaluation< Scalar, VarSetTag, numVars > sqrt(const Evaluation< Scalar, VarSetTag, numVars > &x)
Definition: Math.hpp:278
static Evaluation henry(const Evaluation &)
Henry coefficent for xylene in liquid water.
Definition: H2O_Xylene.hpp:49
Material properties of pure water .
Evaluation< Scalar, VarSetTag, numVars > exp(const Evaluation< Scalar, VarSetTag, numVars > &x)
Definition: Math.hpp:295
Component for Xylene.
Evaluation< Scalar, VarSetTag, numVars > min(const Evaluation< Scalar, VarSetTag, numVars > &x1, const Evaluation< Scalar, VarSetTag, numVars > &x2)
Definition: Math.hpp:61
static Scalar molarMass()
The molar mass in of xylene.
Definition: Xylene.hpp:61
Binary coefficients for water and xylene.
Definition: H2O_Xylene.hpp:37
Component for Xylene.
Definition: Xylene.hpp:46
Evaluation< Scalar, VarSetTag, numVars > pow(const Evaluation< Scalar, VarSetTag, numVars > &base, Scalar exp)
Definition: Math.hpp:312
static Evaluation gasDiffCoeff(Evaluation temperature, Evaluation pressure)
Binary diffusion coefficent [m^2/s] for molecular water and xylene.
Definition: H2O_Xylene.hpp:64
static const Scalar molarMass()
The molar mass in of water.
Definition: H2O.hpp:79