26#ifndef DUMUX_MATERIAL_FLUIDMATRIX_TWOP_EFF_TO_ABS_DEFAULT_POLICY_HH
27#define DUMUX_MATERIAL_FLUIDMATRIX_TWOP_EFF_TO_ABS_DEFAULT_POLICY_HH
29#include <dune/common/float_cmp.hh>
54 template<
class Scalar>
87 return Dune::FloatCmp::eq(
swr(), p.
swr(), 1e-6)
88 && Dune::FloatCmp::eq(
snr(), p.
snr(), 1e-6);
99 template<
class Scalar>
103 params.
setSwr(getParamFromGroup<Scalar>(paramGroup,
"Swr", 0.0));
104 params.
setSnr(getParamFromGroup<Scalar>(paramGroup,
"Snr", 0.0));
117 template<
class Scalar>
120 return (sw - params.
swr())/(1.0 - params.
swr() - params.
snr());
132 template<
class Scalar>
135 return swe*(1.0 - params.
swr() - params.
snr()) + params.
swr();
146 template<
class Scalar>
149 return 1.0/(1.0 - params.
swr() - params.
snr());
160 template<
class Scalar>
163 return 1.0 - params.
swr() - params.
snr();
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Definition: brookscorey.hh:35
This is a policy for 2p material laws how to convert absolute to relative saturations and vice versa.
Definition: efftoabsdefaultpolicy.hh:46
static Scalar swToSwe(const Scalar sw, const Params< Scalar > ¶ms)
Convert an absolute wetting saturation to an effective one.
Definition: efftoabsdefaultpolicy.hh:118
static Scalar sweToSw(const Scalar swe, const Params< Scalar > ¶ms)
Convert an effective wetting saturation to an absolute one.
Definition: efftoabsdefaultpolicy.hh:133
static Scalar dswe_dsw(const Params< Scalar > ¶ms)
Derivative of the effective saturation w.r.t. the absolute saturation.
Definition: efftoabsdefaultpolicy.hh:147
static Scalar dsw_dswe(const Params< Scalar > ¶ms)
Derivative of the absolute saturation w.r.t. the effective saturation.
Definition: efftoabsdefaultpolicy.hh:161
static Params< Scalar > makeParams(const std::string ¶mGroup)
Construct from a subgroup from the global parameter tree.
Definition: efftoabsdefaultpolicy.hh:100
The parameter type.
Definition: efftoabsdefaultpolicy.hh:56
bool operator==(const Params &p) const
Definition: efftoabsdefaultpolicy.hh:85
void setSwr(Scalar v)
Set the residual wetting saturation.
Definition: efftoabsdefaultpolicy.hh:70
void setSnr(Scalar v)
Set the residual non-wetting saturation.
Definition: efftoabsdefaultpolicy.hh:82
Scalar snr() const
Return the residual non-wetting saturation.
Definition: efftoabsdefaultpolicy.hh:76
Params(const Scalar swr=0.0, const Scalar snr=0.0)
Definition: efftoabsdefaultpolicy.hh:57
Scalar swr() const
Return the residual wetting saturation.
Definition: efftoabsdefaultpolicy.hh:64