diff --git a/dumux/material/fluidmatrixinteractions/2p/leverettlaw.hh b/dumux/material/fluidmatrixinteractions/2p/leverettlaw.hh new file mode 100644 index 0000000000000000000000000000000000000000..d0469a42c148885bd6432ce310bad84021c5ca27 --- /dev/null +++ b/dumux/material/fluidmatrixinteractions/2p/leverettlaw.hh @@ -0,0 +1,74 @@ +// -*- 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 . * + *****************************************************************************/ +/*! + * \file + * \ingroup Fluidmatrixinteractions + * \brief Implementation of the capillary pressure <-> saturation relation + * for the heatpipe problem. + */ +#ifndef LEVERETT_LAW_HH +#define LEVERETT_LAW_HH + +#include "leverettlawparams.hh" + +#include + +#include + +#include +#include + +namespace Dumux +{ +/*! + * \ingroup Fluidmatrixinteractions + * \brief Implementation of the capillary pressure <-> saturation + * relation for the heatpipe problem. + * + * This class bundles the "raw" curves as static members and doesn't concern itself + * converting absolute to effective saturations and vince versa. + */ +template > +class LeverettLaw : public BaseLaw +{ +public: + using Params = ParamsT; + using Scalar = typename Params::Scalar; + + /*! + * \brief The capillary pressure-saturation curve. + * + * \param params Array of parameters asd + * \param Sw Effective saturation of of the wetting phase \f$\mathrm{[\overline{S}_w]}\f$ + */ + static Scalar pc(const Params ¶ms, Scalar swe) + { + return BaseLaw::pc(params, swe) * params.leverettFactor(); + + } + + + +private: + +}; + +} + +#endif diff --git a/dumux/material/fluidmatrixinteractions/2p/leverettlawparams.hh b/dumux/material/fluidmatrixinteractions/2p/leverettlawparams.hh new file mode 100644 index 0000000000000000000000000000000000000000..7fc404cb1747bb597a96527b9d94b7ffd6dd6fae --- /dev/null +++ b/dumux/material/fluidmatrixinteractions/2p/leverettlawparams.hh @@ -0,0 +1,77 @@ +// -*- 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 . * + *****************************************************************************/ +/*! + * \file + * \ingroup Fluidmatrixinteractions + * \brief Specification of the material parameters + * for the van Genuchten constitutive relations. + */ +#ifndef LEVERETT_LAW_PARAMS_HH +#define LEVERETT_LAW_PARAMS_HH + +#include + +namespace Dumux +{ +/*! + * \ingroup Fluidmatrixinteractions + * \brief Specification of the material parameters + * for the van Genuchten constitutive relations. + * + * In this implementation setting either the \f$\mathrm{n}\f$ or \f$\mathrm{m}\f$ shape parameter + * automatically calculates the other. I.e. they cannot be set independently. + */ +template +class LeverettLawParams : public BaseParams +{ +public: + using Scalar = typename BaseParams::Scalar; + + LeverettLawParams() + { + referencePorosity_ = getParam("SpatialParams.referencePorosity", 0.11); + referencePermeability_ = getParam("SpatialParams.referencePermeability", 2.23e-14); + } + + LeverettLawParams(Scalar l) + { + setLeverettFactor(l); + } + + + void setLeverettFactor(Scalar l) + {leverettFactor_ = l;} + + void setLeverettFactor(Scalar porosity, Scalar permeability) + { + leverettFactor_ = pow(referencePermeability_/permeability*porosity/referencePorosity_, 0.5); + } + + + Scalar leverettFactor() const + {return leverettFactor_; } + +private: + Scalar referencePorosity_; + Scalar referencePermeability_; + Scalar leverettFactor_; +}; +} // namespace Dumux + +#endif