From c5e6a625c1535de4b917f19f7de89469c58dab9e Mon Sep 17 00:00:00 2001 From: Holger Class <holger.class@iws.uni-stuttgart.de> Date: Thu, 24 Oct 2013 14:41:59 +0000 Subject: [PATCH] the EffectiveDiffusivityModels should not be in 2p because they are more general git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11804 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- .../diffusivityconstanttau.hh | 71 ++++++++++++++++++ .../diffusivitymillingtonquirk.hh | 72 +++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 dumux/material/fluidmatrixinteractions/diffusivityconstanttau.hh create mode 100644 dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh diff --git a/dumux/material/fluidmatrixinteractions/diffusivityconstanttau.hh b/dumux/material/fluidmatrixinteractions/diffusivityconstanttau.hh new file mode 100644 index 0000000000..f63aac71e4 --- /dev/null +++ b/dumux/material/fluidmatrixinteractions/diffusivityconstanttau.hh @@ -0,0 +1,71 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + *****************************************************************************/ +/*! + * \file + * + * \brief Relation for the saturation-dependent effective diffusion coefficient + */ +#ifndef DIFFUSIVITY_CONSTANT_TAU_HH +#define DIFFUSIVITY_CONSTANT_TAU_HH + +#include <algorithm> + +namespace Dumux +{ +/*! + * \ingroup fluidmatrixinteractionslaws + * + * \brief Relation for the saturation-dependent effective diffusion coefficient + * + * + * The material law is: + * \f[ + \lambda_\text{eff} = \phi * S_w * \tau * D + \f] + * + * with + * \f[ + \tau = \frac{1}{\phi^2} * \left(\phi S_w\right)^{7/3} + \f] + * + */ +template<class TypeTag, class Scalar> +class DiffusivityConstantTau +{ +public: + /*! + * \brief Returns the effective diffusion coefficient \f$[m/s]\f$ based on a constant tortuosity value + * + * \param porosity The porosity + * \param saturation The saturation of the phase + * \param diffCoeff The diffusion coefficient of the phase + * + */ + static Scalar effectiveDiffusivity(const Scalar porosity, + const Scalar saturation, + const Scalar diffCoeff) + + { + Scalar tau = GET_RUNTIME_PARAM(TypeTag, Scalar, tau);; + + return porosity * saturation * tau * diffCoeff; + } +}; +} +#endif diff --git a/dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh b/dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh new file mode 100644 index 0000000000..0289bdd5b1 --- /dev/null +++ b/dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh @@ -0,0 +1,72 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + *****************************************************************************/ +/*! + * \file + * + * \brief Relation for the saturation-dependent effective diffusion coefficient + */ +#ifndef DIFFUSIVITY_MILLINGTON_QUIRK_HH +#define DIFFUSIVITY_MILLINGTON_QUIRK_HH + +#include <algorithm> + +namespace Dumux +{ +/*! + * \ingroup fluidmatrixinteractionslaws + * + * \brief Relation for the saturation-dependent effective diffusion coefficient + * + * + * The material law is: + * \f[ + \lambda_\text{eff} = \phi * S_w * \tau * D + \f] + * + * with + * \f[ + \tau = \frac{1}{\phi^2} * \left(\phi S_w\right)^{7/3} + \f] + * + */ +template<class Scalar> +class DiffusivityMillingtonQuirk +{ +public: + /*! + * \brief Returns the effective diffusion coefficient \f$[m/s]\f$ after Millington Quirk. + * + * \param porosity The porosity + * \param saturation The saturation of the phase + * \param diffCoeff The diffusion coefficient of the phase + * + */ + static Scalar effectiveDiffusivity(const Scalar porosity, + const Scalar saturation, + const Scalar diffCoeff) + + { + Scalar tau = 1.0/(porosity * porosity) * + pow(porosity * saturation, 7.0/3); + + return porosity * saturation * tau * diffCoeff; + } +}; +} +#endif -- GitLab