00001 // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- 00002 // vi: set et ts=4 sw=4 sts=4: 00003 /* 00004 This file is part of the Open Porous Media project (OPM). 00005 00006 OPM is free software: you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation, either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 OPM is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with OPM. If not, see <http://www.gnu.org/licenses/>. 00018 00019 Consult the COPYING file in the top-level source directory of this 00020 module for the precise wording of the license and the list of 00021 copyright holders. 00022 */ 00027 #ifndef OPM_FULLERMETHOD_HPP 00028 #define OPM_FULLERMETHOD_HPP 00029 00030 #include <opm/material/common/Means.hpp> 00031 #include <opm/material/common/MathToolbox.hpp> 00032 00033 #include <cmath> 00034 00035 namespace Opm { 00036 namespace BinaryCoeff { 00037 00055 template <class Scalar, class Evaluation = Scalar> 00056 inline Evaluation fullerMethod(const Scalar* M, // molar masses [g/mol] 00057 const Scalar* SigmaNu, // atomic diffusion volume 00058 const Evaluation& temperature, // [K] 00059 const Evaluation& pressure) // [Pa] 00060 { 00061 // "effective" molar mass in [g/m^3] 00062 Scalar Mab = Opm::harmonicMean(M[0], M[1]); 00063 00064 // Fuller's method 00065 const Evaluation& tmp = std::pow(SigmaNu[0], 1./3) + std::pow(SigmaNu[1], 1./3); 00066 return 1e-4 * (143.0*Opm::pow(temperature, 1.75))/(pressure*std::sqrt(Mab)*tmp*tmp); 00067 } 00068 00069 } // namespace BinaryCoeff 00070 } // namespace Opm 00071 00072 #endif