Commit 14f7dc7e authored by Timo Koch's avatar Timo Koch
Browse files

[material] Introduce endPointPc method to material laws

The end point capillary pressure is the capillary pressure at sw=1.
For Brooks-Corey laws it is also called entry pressure.
parent da4f3e10
......@@ -107,6 +107,16 @@ public:
return pow(pc/params.pe(), -params.lambda());
}
/*!
* \brief The capillary pressure at Swe = 1.0 also called end point capillary pressure
*
* \param params A container object that is populated with the appropriate coefficients for the respective law.
* Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container
* is constructed accordingly. Afterwards the values are set there, too.
*/
static Scalar endPointPc(const Params &params)
{ return params.pe(); }
/*!
* \brief The partial derivative of the capillary
* pressure w.r.t. the effective saturation according to Brooks & Corey.
......
......@@ -101,6 +101,16 @@ public:
return sweToSw_(params, EffLaw::sw(params, pc));
}
/*!
* \brief The capillary pressure at Swe = 1.0 also called end point capillary pressure
*
* \param params A container object that is populated with the appropriate coefficients for the respective law.
* Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container
* is constructed accordingly. Afterwards the values are set there, too.
*/
static Scalar endPointPc(const Params &params)
{ return EffLaw::endPointPc(params); }
/*!
* \brief Returns the partial derivative of the capillary
* pressure w.r.t the absolute saturation.
......
......@@ -89,6 +89,16 @@ public:
return 1 - (pc - params.entryPc())/(params.maxPc() - params.entryPc());
}
/*!
* \brief The capillary pressure at Swe = 1.0 also called end point capillary pressure
*
* \param params A container object that is populated with the appropriate coefficients for the respective law.
* Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container
* is constructed accordingly. Afterwards the values are set there, too.
*/
static Scalar endPointPc(const Params &params)
{ return params.entryPc(); }
/*!
* \brief Returns the partial derivative of the capillary
* pressure w.r.t. the effective saturation.
......
......@@ -151,6 +151,16 @@ public:
return BrooksCorey::sw(params, pc);
}
/*!
* \brief The capillary pressure at Swe = 1.0 also called end point capillary pressure
*
* \param params A container object that is populated with the appropriate coefficients for the respective law.
* Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container
* is constructed accordingly. Afterwards the values are set there, too.
*/
static Scalar endPointPc(const Params &params)
{ return params.pe(); }
/*!
* \brief A regularized version of the partial derivative
* of the \f$\mathrm{p_c(\overline{S}_w)}\f$ w.r.t. effective saturation
......
......@@ -102,6 +102,16 @@ public:
return LinearMaterial::sw(params, pc);
}
/*!
* \brief The capillary pressure at Swe = 1.0 also called end point capillary pressure
*
* \param params A container object that is populated with the appropriate coefficients for the respective law.
* Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container
* is constructed accordingly. Afterwards the values are set there, too.
*/
static Scalar endPointPc(const Params &params)
{ return params.entryPc(); }
/*!
* \brief Returns the partial derivative of the capillary
* pressure to the effective saturation.
......
......@@ -156,6 +156,12 @@ public:
// Genuchten's law
Scalar sw;
if (pc <= 0) {
// for swThHigh = 1.0 the slope would get infinity
// swThHigh > 1.0 are not sensible threshold values
// setting swThHigh = 1.0 is a way to disable regularization
if (swThHigh > 1.0 - std::numeric_limits<Scalar>::epsilon())
return 1.0;
// invert straight line for swe > 1.0
Scalar yTh = VanGenuchten::pc(params, swThHigh);
Scalar m1 = (0.0 - yTh)/(1.0 - swThHigh)*2;
......@@ -187,6 +193,16 @@ public:
return sw;
}
/*!
* \brief The capillary pressure at Swe = 1.0 also called end point capillary pressure
*
* \param params A container object that is populated with the appropriate coefficients for the respective law.
* Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container
* is constructed accordingly. Afterwards the values are set there, too.
*/
static Scalar endPointPc(const Params &params)
{ return 0.0; }
/*!
* \brief A regularized version of the partial derivative
* of the \f$\mathrm{p_c(\overline{S}_w)}\f$ w.r.t. effective saturation
......@@ -277,7 +293,7 @@ public:
if (swe < 0)
return 0;
else if (swe > 1)
else if (swe > 1 - std::numeric_limits<Scalar>::epsilon())
return 1;
else if (swe > swThHigh) {
typedef Dumux::Spline<Scalar> Spline;
......@@ -357,6 +373,12 @@ private:
{
const Scalar swThHigh = params.pcHighSw();
// for swThHigh = 1.0 the slope would get infinity
// swThHigh > 1.0 are not sensible threshold values
// setting swThHigh = 1.0 is a way to disable regularization
if (swThHigh > 1.0 - std::numeric_limits<Scalar>::epsilon())
return 0.0;
Scalar pcswHigh = VanGenuchten::pc(params, swThHigh);
return (0 - pcswHigh)/(1.0 - swThHigh);
}
......
......@@ -106,6 +106,16 @@ public:
return sw;
}
/*!
* \brief The capillary pressure at Swe = 1.0 also called end point capillary pressure
*
* \param params A container object that is populated with the appropriate coefficients for the respective law.
* Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container
* is constructed accordingly. Afterwards the values are set there, too.
*/
static Scalar endPointPc(const Params &params)
{ return 0.0; }
/*!
* \brief The partial derivative of the capillary
* pressure w.r.t. the effective saturation according to van Genuchten.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment