14#ifndef DUMUX_MATERIAL_FLUIDMATRIX_TWOP_EFF_TO_ABS_DEFAULT_POLICY_HH
15#define DUMUX_MATERIAL_FLUIDMATRIX_TWOP_EFF_TO_ABS_DEFAULT_POLICY_HH
17#include <dune/common/float_cmp.hh>
42 template<
class Scalar>
75 return Dune::FloatCmp::eq(
swr(), p.
swr(), 1e-6)
76 && Dune::FloatCmp::eq(
snr(), p.
snr(), 1e-6);
87 template<
class Scalar>
91 params.
setSwr(getParamFromGroup<Scalar>(paramGroup,
"Swr", 0.0));
92 params.
setSnr(getParamFromGroup<Scalar>(paramGroup,
"Snr", 0.0));
105 template<
class Scalar>
108 return (sw - params.
swr())/(1.0 - params.
swr() - params.
snr());
120 template<
class Scalar>
123 return swe*(1.0 - params.
swr() - params.
snr()) + params.
swr();
134 template<
class Scalar>
137 return 1.0/(1.0 - params.
swr() - params.
snr());
148 template<
class Scalar>
151 return 1.0 - params.
swr() - params.
snr();
This is a policy for 2p material laws how to convert absolute to relative saturations and vice versa.
Definition: efftoabsdefaultpolicy.hh:34
static Scalar swToSwe(const Scalar sw, const Params< Scalar > ¶ms)
Convert an absolute wetting saturation to an effective one.
Definition: efftoabsdefaultpolicy.hh:106
static Scalar sweToSw(const Scalar swe, const Params< Scalar > ¶ms)
Convert an effective wetting saturation to an absolute one.
Definition: efftoabsdefaultpolicy.hh:121
static Scalar dswe_dsw(const Params< Scalar > ¶ms)
Derivative of the effective saturation w.r.t. the absolute saturation.
Definition: efftoabsdefaultpolicy.hh:135
static Scalar dsw_dswe(const Params< Scalar > ¶ms)
Derivative of the absolute saturation w.r.t. the effective saturation.
Definition: efftoabsdefaultpolicy.hh:149
static Params< Scalar > makeParams(const std::string ¶mGroup)
Construct from a subgroup from the global parameter tree.
Definition: efftoabsdefaultpolicy.hh:88
Definition: brookscorey.hh:23
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
The parameter type.
Definition: efftoabsdefaultpolicy.hh:44
bool operator==(const Params &p) const
Definition: efftoabsdefaultpolicy.hh:73
void setSwr(Scalar v)
Set the residual wetting saturation.
Definition: efftoabsdefaultpolicy.hh:58
void setSnr(Scalar v)
Set the residual non-wetting saturation.
Definition: efftoabsdefaultpolicy.hh:70
Scalar snr() const
Return the residual non-wetting saturation.
Definition: efftoabsdefaultpolicy.hh:64
Params(const Scalar swr=0.0, const Scalar snr=0.0)
Definition: efftoabsdefaultpolicy.hh:45
Scalar swr() const
Return the residual wetting saturation.
Definition: efftoabsdefaultpolicy.hh:52