25#ifndef REGULARIZED_VAN_GENUCHTEN_HH
26#define REGULARIZED_VAN_GENUCHTEN_HH
69template <
class ScalarT,
class ParamsT = RegularizedVanGenuchtenParams<ScalarT> >
76 using Scalar =
typename Params::Scalar;
95 const Scalar swThLow = params.pcLowSw();
96 const Scalar swThHigh = params.pcHighSw();
106 else if (swe > swThHigh)
109 Scalar m1 = (0.0 - yTh)/(1.0 - swThHigh)*2;
121 return m1*(swe - 1.0) + 0.0;
149 const Scalar swThLow = params.pcLowSw();
150 const Scalar swThHigh = params.pcHighSw();
160 if (swThHigh > 1.0 - std::numeric_limits<Scalar>::epsilon())
165 Scalar m1 = (0.0 - yTh)/(1.0 - swThHigh)*2;
175 return (
pc - pcswLow)/mLow_(params) + swThLow;
177 else if (
sw > swThHigh)
180 Scalar m1 = (0.0 - yTh)/(1.0 - swThHigh)*2;
222 const Scalar swThLow = params.pcLowSw();
223 const Scalar swThHigh = params.pcHighSw();
228 return mLow_(params);
230 else if (swe > swThHigh)
233 Scalar m1 = (0.0 - yTh)/(1.0 - swThHigh)*2;
267 const Scalar swThLow = params.pcLowSw();
268 const Scalar swThHigh = params.pcHighSw();
276 if (swThHigh > 1.0 - std::numeric_limits<Scalar>::epsilon())
277 return std::numeric_limits<Scalar>::max();
280 Scalar m1 = (0.0 - yTh)/(1.0 - swThHigh)*2;
288 return 1/mLow_(params);
293 const Scalar m1 = (0.0 - yTh)/(1.0 - swThHigh)*2;
328 const Scalar swThHigh = params.krwHighSw();
332 else if (swe > 1 - std::numeric_limits<Scalar>::epsilon())
334 else if (swe > swThHigh) {
357 const Scalar swThHigh = params.krwHighSw();
363 else if (swe > 1 - std::numeric_limits<Scalar>::epsilon())
367 else if (swe > swThHigh) {
397 const Scalar swThLow = params.krnLowSw();
403 else if (swe < swThLow) {
426 const Scalar swThLow = params.krnLowSw();
432 else if (swe < swThLow) {
457 const Scalar swThLow = params.pcLowSw();
472 const Scalar swThHigh = params.pcHighSw();
477 if (swThHigh > 1.0 - std::numeric_limits<Scalar>::epsilon())
481 return (0 - pcswHigh)/(1.0 - swThHigh);
Provides 3rd order polynomial splines.
Parameters that are necessary for the regularization of VanGenuchten "material law".
Implementation of the capillary pressure and relative permeability <-> saturation relations according...
A 3rd order polynomial spline.
Definition: spline.hh:55
Scalar evalDerivative(Scalar x, bool extrapolate=false) const
Evaluate the spline's derivative at a given position.
Definition: splinecommon_.hh:176
Scalar intersectInterval(Scalar x0, Scalar x1, Scalar a, Scalar b, Scalar c, Scalar d) const
Find the intersections of the spline with a cubic polynomial in a sub-intervall of the spline,...
Definition: splinecommon_.hh:206
Scalar eval(Scalar x, bool extrapolate=false) const
Evaluate the spline at a given position.
Definition: splinecommon_.hh:142
Implementation of the regularized van Genuchten's capillary pressure / relative permeability <-> satu...
Definition: regularizedvangenuchten.hh:71
static Scalar dpc_dswe(const Params ¶ms, Scalar swe)
A regularized version of the partial derivative of the w.r.t. effective saturation according to van ...
Definition: regularizedvangenuchten.hh:218
static Scalar dkrw_dswe(const Params ¶ms, Scalar swe)
A regularized version of the derivative of the relative permeability for the wetting phase in regard ...
Definition: regularizedvangenuchten.hh:352
static Scalar endPointPc(const Params ¶ms)
The capillary pressure at Swe = 1.0 also called end point capillary pressure.
Definition: regularizedvangenuchten.hh:201
typename Params::Scalar Scalar
Definition: regularizedvangenuchten.hh:76
static Scalar sw(const Params ¶ms, Scalar pc)
A regularized van Genuchten saturation-capillary pressure curve.
Definition: regularizedvangenuchten.hh:145
static Scalar pc(const Params ¶ms, Scalar swe)
A regularized van Genuchten capillary pressure-saturation curve.
Definition: regularizedvangenuchten.hh:91
static Scalar krn(const Params ¶ms, Scalar swe)
Regularized version of the relative permeability for the non-wetting phase of the medium implied by t...
Definition: regularizedvangenuchten.hh:392
static Scalar dswe_dpc(const Params ¶ms, Scalar pc)
A regularized version of the partial derivative of the w.r.t. cap.pressure according to van Genuchte...
Definition: regularizedvangenuchten.hh:265
ParamsT Params
Definition: regularizedvangenuchten.hh:75
static Scalar krw(const Params ¶ms, Scalar swe)
Regularized version of the relative permeability for the wetting phase of the medium implied by the v...
Definition: regularizedvangenuchten.hh:323
static Scalar dkrn_dswe(const Params ¶ms, Scalar swe)
A regularized version of the derivative of the relative permeability for the non-wetting phase in reg...
Definition: regularizedvangenuchten.hh:421
Implementation of the van Genuchten capillary pressure <-> saturation relation. This class bundles th...
Definition: vangenuchten.hh:52
static Scalar dkrw_dswe(const Params ¶ms, Scalar swe)
The derivative of the relative permeability for the wetting phase in regard to the wetting saturation...
Definition: vangenuchten.hh:219
static Scalar sw(const Params ¶ms, Scalar pc)
The saturation-capillary pressure curve according to van Genuchten.
Definition: vangenuchten.hh:100
static Scalar dpc_dswe(const Params ¶ms, Scalar swe)
The partial derivative of the capillary pressure w.r.t. the effective saturation according to van Gen...
Definition: vangenuchten.hh:142
static Scalar krw(const Params ¶ms, Scalar swe)
The relative permeability for the wetting phase of the medium implied by van Genuchten / Mualem param...
Definition: vangenuchten.hh:193
static Scalar dswe_dpc(const Params ¶ms, Scalar pc)
The partial derivative of the effective saturation to the capillary pressure according to van Genucht...
Definition: vangenuchten.hh:168
static Scalar krn(const Params ¶ms, Scalar swe)
The relative permeability for the non-wetting phase of the medium implied by van Genuchten's paramete...
Definition: vangenuchten.hh:247
static Scalar pc(const Params ¶ms, Scalar swe)
The capillary pressure-saturation curve according to van Genuchten.
Definition: vangenuchten.hh:72
static Scalar dkrn_dswe(const Params ¶ms, Scalar swe)
The derivative of the relative permeability for the non-wetting phase in regard to the wetting satura...
Definition: vangenuchten.hh:273