25#ifndef REGULARIZED_PARKERVANGEN_3P_HH
26#define REGULARIZED_PARKERVANGEN_3P_HH
60template <
class ScalarT,
class ParamsT = RegularizedParkerVanGen3PParams<ScalarT> >
67 using Scalar =
typename Params::Scalar;
96 if(params.constRegularization())
106 const Scalar swThLow = params.pcLowS();
107 const Scalar swThHigh = params.pcHighS();
119 else if (swe > swThHigh)
122 Scalar m1 = (0.0 - yTh)/(1.0 - swThHigh)*2;
134 return m1*(swe - 1.0) + 0.0;
151 if(params.constRegularization())
161 const Scalar swThLow = params.pcLowS();
162 const Scalar swThHigh = params.pcHighS();
174 else if (swe > swThHigh)
177 Scalar m1 = (0.0 - yTh)/(1.0 - swThHigh)*2;
189 return m1*(swe - 1.0) + 0.0;
206 if(params.constRegularization())
216 const Scalar swThLow = params.pcLowS();
217 const Scalar swThHigh = params.pcHighS();
229 else if (ste > swThHigh)
232 Scalar m1 = (0.0 - yTh)/(1.0 - swThHigh)*2;
244 return m1*(ste - 1.0) + 0.0;
311 if(swe > 1.0)
return 1.0;
312 if(swe < 0.0)
return 0.0;
338 swe = max(min(swe, 1.0), 0.0);
339 ste = max(min(ste, 1.0), 0.0);
370 const Scalar threshold = 1e-3;
375 return ySwr + mSwr*(ste - threshold);
385 const Scalar st = ste*(1 - params.swr()) + params.swr();
386 const Scalar sg = 1.0 - st;
388 const Scalar scalFact = (sg > 0.1) ? 1.0 : max(0.0,
389 (sg - params.sgr())/(0.1 - params.sgr()));
408 return krw(params, swe);
410 return krn(params, swe, sn, ste);
412 return krg(params, ste);
414 DUNE_THROW(Dune::InvalidStateException,
415 "Invalid phase index ");
Provides 3rd order polynomial splines.
Implementation of van Genuchten's capillary pressure-saturation relation for three phases.
Parameters that are necessary for the regularization of the Parker - Van Genuchten capillary pressure...
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
A 3rd order polynomial spline.
Definition: spline.hh:55
Scalar eval(Scalar x, bool extrapolate=false) const
Evaluate the spline at a given position.
Definition: splinecommon_.hh:142
Implementation of van Genuchten's capillary pressure <-> saturation relation. This class bundles the ...
Definition: parkervangen3p.hh:44
static Scalar pc(const Params ¶ms, const Scalar sw)
The capillary pressure-saturation curve.
Definition: parkervangen3p.hh:55
static Scalar krg(const Params ¶ms, const Scalar ste)
The relative permeability for the non-wetting phase of the medium implied by van Genuchten's paramete...
Definition: parkervangen3p.hh:265
static Scalar pcAlpha(const Params ¶ms, Scalar sne)
This function ensures a continuous transition from 2 to 3 phases and vice versa.
Definition: parkervangen3p.hh:98
static Scalar sw(const Params ¶ms, const Scalar pc)
The saturation-capillary pressure curve.
Definition: parkervangen3p.hh:124
static Scalar dpcgn_dste(const Params ¶ms, const Scalar seRegu)
Returns the partial derivative of the capillary pressure to the effective saturation.
Definition: parkervangen3p.hh:174
static Scalar krn(const Params ¶ms, const Scalar swe, const Scalar sn, const Scalar ste)
The relative permeability for the non-wetting phase after the Model of Parker et al....
Definition: parkervangen3p.hh:230
static Scalar dswe_dpc(const Params ¶ms, const Scalar pc)
Returns the partial derivative of the effective saturation to the capillary pressure.
Definition: parkervangen3p.hh:188
static Scalar bulkDensTimesAdsorpCoeff(const Params ¶ms)
the basis for calculating adsorbed NAPL in storage term
Definition: parkervangen3p.hh:323
static Scalar krw(const Params ¶ms, const Scalar swe)
The relative permeability for the wetting phase of the medium implied by van Genuchten's parameteriza...
Definition: parkervangen3p.hh:205
static Scalar dpc_dswe(const Params ¶ms, const Scalar swe)
Returns the partial derivative of the capillary pressure to the effective saturation.
Definition: parkervangen3p.hh:135
static Scalar dpcnw_dswe(const Params ¶ms, const Scalar seRegu)
Returns the partial derivative of the capillary pressure to the effective saturation.
Definition: parkervangen3p.hh:160
static Scalar pcgn(const Params ¶ms, const Scalar ste)
The capillary pressure-saturation curve for the gas and non-wetting phase.
Definition: parkervangen3p.hh:87
static Scalar pcgw(const Params ¶ms, const Scalar swe)
The capillary pressure-saturation curve for the gas and wetting phase.
Definition: parkervangen3p.hh:65
static Scalar pcnw(const Params ¶ms, const Scalar swe)
The capillary pressure-saturation curve for the non-wettigng and wetting phase.
Definition: parkervangen3p.hh:76
static Scalar dpcgw_dswe(const Params ¶ms, const Scalar seRegu)
Returns the partial derivative of the capillary pressure to the effective saturation.
Definition: parkervangen3p.hh:146
static Scalar dkrg_dste(const Params ¶ms, Scalar ste)
The derivative of the relative permeability for the gas phase in regard to the total liquid saturatio...
Definition: parkervangen3p.hh:284
Implementation of the regularized van Genuchten's capillary pressure <-> saturation relation....
Definition: regularizedparkervangen3p.hh:62
typename Params::Scalar Scalar
Definition: regularizedparkervangen3p.hh:67
static Scalar krg(const Params ¶ms, const Scalar ste)
The relative permeability for the non-wetting phase of the medium implied by van Genuchten's paramete...
Definition: regularizedparkervangen3p.hh:361
static Scalar pcAlpha(const Params ¶ms, Scalar sne)
This function ensures a continuous transition from 2 to 3 phases and vice versa.
Definition: regularizedparkervangen3p.hh:258
static Scalar pcgw(const Params ¶ms, Scalar swe)
The capillary pressure-saturation curve for the gas and wetting phase.
Definition: regularizedparkervangen3p.hh:93
static Scalar kr(const Params ¶ms, const int phaseIdx, const Scalar swe, const Scalar sn, const Scalar ste)
The relative permeability for a phase.
Definition: regularizedparkervangen3p.hh:403
static Scalar dpc_dswe(const Params ¶ms, Scalar swe)
Returns the partial derivative of the capillary pressure to the effective saturation.
Definition: regularizedparkervangen3p.hh:280
static Scalar krw(const Params ¶ms, const Scalar swe)
The relative permeability for the wetting phase of the medium implied by van Genuchten's parameteriza...
Definition: regularizedparkervangen3p.hh:308
static Scalar krn(const Params ¶ms, Scalar swe, Scalar sn, Scalar ste)
The relative permeability for the non-wetting phase after the Model of Parker et al....
Definition: regularizedparkervangen3p.hh:334
ParamsT Params
Definition: regularizedparkervangen3p.hh:66
static Scalar pcgn(const Params ¶ms, Scalar ste)
The capillary pressure-saturation curve for the gas and non-wetting phase.
Definition: regularizedparkervangen3p.hh:203
static Scalar sw(const Params ¶ms, Scalar pc)
The saturation-capillary pressure curve.
Definition: regularizedparkervangen3p.hh:269
static Scalar bulkDensTimesAdsorpCoeff(const Params ¶ms)
the basis for calculating adsorbed NAPL in storage term
Definition: regularizedparkervangen3p.hh:422
static Scalar pcnw(const Params ¶ms, Scalar swe)
The capillary pressure-saturation curve for the non-wettigng and wetting phase.
Definition: regularizedparkervangen3p.hh:148
static Scalar pc(const Params ¶ms, Scalar sw)
A regularized Parker- van Genuchten capillary pressure-saturation curve.
Definition: regularizedparkervangen3p.hh:82
static Scalar dswe_dpc(const Params ¶ms, Scalar pc)
Returns the partial derivative of the effective saturation to the capillary pressure.
Definition: regularizedparkervangen3p.hh:291