H2O_Air.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  Copyright (C) 2010 by Felix Bode
6  Copyright (C) 2010 by Benjamin Faigle
7 
8  This file is part of the Open Porous Media project (OPM).
9 
10  OPM is free software: you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation, either version 2 of the License, or
13  (at your option) any later version.
14 
15  OPM is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with OPM. If not, see <http://www.gnu.org/licenses/>.
22 */
27 #ifndef OPM_BINARY_COEFF_H2O_AIR_HPP
28 #define OPM_BINARY_COEFF_H2O_AIR_HPP
29 
31 
32 #include <cmath>
33 
34 namespace Opm {
35 namespace BinaryCoeff {
36 
41 class H2O_Air
42 {
43 public:
54  template <class Evaluation>
55  static Evaluation henry(const Evaluation& temperature)
56  {
57  typedef Opm::MathToolbox<Evaluation> Toolbox;
58 
59  return 1.0/((0.8942+1.47*Toolbox::exp(-0.04394*(temperature-273.15)))*1.E-10);
60  }
61 
73  template <class Evaluation>
74  static Evaluation gasDiffCoeff(const Evaluation& temperature, const Evaluation& pressure)
75  {
76  typedef Opm::MathToolbox<Evaluation> Toolbox;
77 
78  double Theta=1.8;
79  double Daw=2.13e-5; /* reference value */
80  double pg0=1.e5; /* reference pressure */
81  double T0=273.15; /* reference temperature */
82 
83  return Daw*(pg0/pressure)*Toolbox::pow((temperature/T0),Theta);
84  }
85 
106  template <class Evaluation>
107  static Evaluation liquidDiffCoeff(const Evaluation& temperature, const Evaluation& /*pressure*/)
108  {
109  const double Texp = 273.15 + 25; // [K]
110  const double Dexp = 2.01e-9; // [m^2/s]
111  return Dexp/Texp*temperature;
112  }
113 };
114 
115 } // namespace BinaryCoeff
116 } // namespace Opm
117 
118 #endif
static Evaluation liquidDiffCoeff(const Evaluation &temperature, const Evaluation &)
Diffusion coefficent for molecular nitrogen in liquid water.
Definition: H2O_Air.hpp:107
Definition: MathToolbox.hpp:39
Definition: Air_Mesitylene.hpp:31
static Evaluation gasDiffCoeff(const Evaluation &temperature, const Evaluation &pressure)
Binary diffusion coefficent for molecular water and air.
Definition: H2O_Air.hpp:74
Binary coefficients for water and nitrogen.
Definition: H2O_Air.hpp:41
Evaluation< Scalar, VarSetTag, numVars > exp(const Evaluation< Scalar, VarSetTag, numVars > &x)
Definition: Math.hpp:295
static Evaluation henry(const Evaluation &temperature)
Henry coefficent for air in liquid water.
Definition: H2O_Air.hpp:55
Evaluation< Scalar, VarSetTag, numVars > pow(const Evaluation< Scalar, VarSetTag, numVars > &base, Scalar exp)
Definition: Math.hpp:312
A traits class which provides basic mathematical functions for arbitrary scalar floating point values...