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 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_H2O_AIR_HPP
28#define OPM_BINARY_COEFF_H2O_AIR_HPP
29
31
32#include <cmath>
33
34namespace Opm {
35namespace BinaryCoeff {
36
42{
43public:
54 template <class Evaluation>
55 static Evaluation henry(const Evaluation& temperature)
56 { return 1.0/((0.8942+1.47*exp(-0.04394*(temperature-273.15)))*1e-10); }
57
69 template <class Evaluation>
70 static Evaluation gasDiffCoeff(const Evaluation& temperature, const Evaluation& pressure)
71 {
72 double Theta=1.8;
73 double Daw=2.13e-5; /* reference value */
74 double pg0=1.e5; /* reference pressure */
75 double T0=273.15; /* reference temperature */
76
77 return Daw*(pg0/pressure)*pow((temperature/T0),Theta);
78 }
79
100 template <class Evaluation>
101 static Evaluation liquidDiffCoeff(const Evaluation& temperature, const Evaluation& /*pressure*/)
102 {
103 const double Texp = 273.15 + 25; // [K]
104 const double Dexp = 2.01e-9; // [m^2/s]
105 return Dexp/Texp*temperature;
106 }
107};
108
109} // namespace BinaryCoeff
110} // namespace Opm
111
112#endif
A traits class which provides basic mathematical functions for arbitrary scalar floating point values...
Binary coefficients for water and nitrogen.
Definition: H2O_Air.hpp:42
static Evaluation henry(const Evaluation &temperature)
Henry coefficent for air in liquid water.
Definition: H2O_Air.hpp:55
static Evaluation liquidDiffCoeff(const Evaluation &temperature, const Evaluation &)
Diffusion coefficent for molecular nitrogen in liquid water.
Definition: H2O_Air.hpp:101
static Evaluation gasDiffCoeff(const Evaluation &temperature, const Evaluation &pressure)
Binary diffusion coefficent for molecular water and air.
Definition: H2O_Air.hpp:70
Definition: Air_Mesitylene.hpp:34
Evaluation exp(const Evaluation &value)
Definition: MathToolbox.hpp:403
ReturnEval_< Evaluation1, Evaluation2 >::type pow(const Evaluation1 &base, const Evaluation2 &exp)
Definition: MathToolbox.hpp:416