25#ifndef DUMUX_MATERIAL_FLUIDMATRIX_TWOP_SMOOTHED_LINEAR_LAW_HH
26#define DUMUX_MATERIAL_FLUIDMATRIX_TWOP_SMOOTHED_LINEAR_LAW_HH
54template<
class ScalarType,
class EffToAbsPolicy = TwoPEffToAbsDefaultPolicy>
93 return Dune::FloatCmp::eq(
pe(), p.
pe(), 1e-6)
94 && Dune::FloatCmp::eq(
pcMax(), p.
pcMax(), 1e-6)
100 Scalar pe_, pcMax_, krLowS_, krHighS_;
125 , splineM_((1.0 - ((1.0 - params_.krHighS()) + params_.krLowS())/2.0 )
126 / (1.0 - (1.0 - params_.krHighS()) - params_.krLowS()))
127 , splineLowS_(0.0, params_.krLowS(),
128 0.0, params_.krLowS()/2.0,
130 , splineHighS_(params_.krHighS(), 1.0,
131 1.0 - (1.0 - params_.krHighS())/2.0, 1.0,
141 const auto pe = getParamFromGroup<Scalar>(paramGroup,
"SmoothedLinearLawPe");
142 const auto pcMax = getParamFromGroup<Scalar>(paramGroup,
"SmoothedLinearLawPcMax");
143 const auto krLowS = getParamFromGroup<Scalar>(paramGroup,
"SmoothedLinearLawKrLowS");
144 const auto krHighS = getParamFromGroup<Scalar>(paramGroup,
"SmoothedLinearLawKrHighS");
145 return {pe, pcMax, krLowS, krHighS};
153 return (1.0 -
swe)*(params_.
pcMax() - params_.
pe()) + params_.
pe();
161 return 1.0 - (
pc - params_.
pe())/(params_.
pcMax() - params_.
pe());
168 {
return params_.
pe(); }
175 return params_.
pe() - params_.
pcMax();
183 return 1.0/(params_.
pe() - params_.
pcMax());
191 return relperm_(
swe);
200 return relperm_(sne);
208 return params_ == o.params_
209 && effToAbsParams_ == o.effToAbsParams_;
213 {
return effToAbsParams_; }
229 return splineLowS_.eval(S);
231 return splineHighS_.eval(S);
234 return lowS/2.0 + splineM_*(S - lowS);
Provides 3rd order polynomial splines.
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
This is a policy for 2p material laws how to convert absolute to relative saturations and vice versa.
Wrapper type to combine an arbitrary number of different laws for fluid-matrix interaction (e....
Definition: brookscorey.hh:286
A 3rd order polynomial spline.
Definition: spline.hh:55
Implements a linear saturation-capillary pressure relation.
Definition: smoothedlinearlaw.hh:56
Scalar krw(Scalar swe) const
The relative permeability for the wetting phase.
Definition: smoothedlinearlaw.hh:189
EffToAbsPolicy EffToAbs
Definition: smoothedlinearlaw.hh:61
Scalar endPointPc() const
The capillary pressure at Swe = 1.0 also called end point capillary pressure.
Definition: smoothedlinearlaw.hh:167
SmoothedLinearLaw(const std::string ¶mGroup)
Construct from a subgroup from the global parameter tree.
Definition: smoothedlinearlaw.hh:113
SmoothedLinearLaw()=delete
Deleted default constructor (so we are never in an undefined state)
static Params makeParams(const std::string ¶mGroup)
Construct from a subgroup from the global parameter tree.
Definition: smoothedlinearlaw.hh:139
SmoothedLinearLaw(const Params ¶ms, const EffToAbsParams &effToAbsParams={})
Construct from parameter structs.
Definition: smoothedlinearlaw.hh:121
Scalar swe(Scalar pc) const
The inverse saturation-capillary pressure curve.
Definition: smoothedlinearlaw.hh:159
typename EffToAbsPolicy::template Params< Scalar > EffToAbsParams
Definition: smoothedlinearlaw.hh:60
const EffToAbsParams & effToAbsParams() const
Definition: smoothedlinearlaw.hh:212
static constexpr bool isRegularized()
Return whether this law is regularized.
Definition: smoothedlinearlaw.hh:66
bool operator==(const SmoothedLinearLaw< Scalar, EffToAbs > &o) const
Equality comparison with another instance.
Definition: smoothedlinearlaw.hh:206
Scalar pc(Scalar swe) const
The capillary pressure-saturation curve.
Definition: smoothedlinearlaw.hh:151
ScalarType Scalar
Definition: smoothedlinearlaw.hh:59
Scalar dswe_dpc(Scalar pc) const
The partial derivative of the effective saturation w.r.t. the capillary pressure.
Definition: smoothedlinearlaw.hh:181
Scalar dpc_dswe(Scalar swe) const
The partial derivative of the capillary pressure w.r.t. the effective saturation.
Definition: smoothedlinearlaw.hh:173
Scalar krn(Scalar swe) const
The relative permeability for the non-wetting phase.
Definition: smoothedlinearlaw.hh:197
The parameter type.
Definition: smoothedlinearlaw.hh:74
void setKrLowS(Scalar krLowS)
Definition: smoothedlinearlaw.hh:86
void setPe(Scalar pe)
Definition: smoothedlinearlaw.hh:80
Scalar krHighS() const
Definition: smoothedlinearlaw.hh:88
Scalar pcMax() const
Definition: smoothedlinearlaw.hh:82
Scalar krLowS() const
Definition: smoothedlinearlaw.hh:85
Scalar pe() const
Definition: smoothedlinearlaw.hh:79
Params(Scalar pe, Scalar pcMax, Scalar krLowS, Scalar krHighS)
Definition: smoothedlinearlaw.hh:75
void setPcMax(Scalar pcMax)
Definition: smoothedlinearlaw.hh:83
void setKrHighS(Scalar krHighS)
Definition: smoothedlinearlaw.hh:89
bool operator==(const Params &p) const
Definition: smoothedlinearlaw.hh:91
Adapter to inherit from, allowing the inheriting class to be wrapped by the makeFluidMatrixInteractio...
Definition: fluidmatrixinteraction.hh:67