OGS
MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation Class Referencefinal

Detailed Description

van Genuchten water retention model

\[p_c=p_b (S_e^{-1/m}-1)^{1-m}\]

with

\[S_e=\frac{S-S_r}{S_{\mbox{max}}-S_r}\]

where

\begin{eqnarray*} &p_b& \mbox{ entry pressure,}\\ &S_r& \mbox{ residual saturation,}\\ &S_{\mbox{max}}& \mbox{ maximum saturation,}\\ &m(<=1) & \mbox{ exponent.}\\ \end{eqnarray*}

Note:

\[n=1/(1-m)\]

.

If \(\alpha\) instead of \(p_b\) is available, \(p_b\) can be calculated as

\[p_b=\rho g/\alpha\]

The regularized van Genuchten model, please ref to Marchand E, Mueller T, Knabner P. Fully coupled generalized hybrid-mixed finite element approximation of two-phase two-component flow in porous media. Part I: formulation and properties of the mathematical model. Comput Geosci 2013;17(2):431-442.

Definition at line 53 of file VanGenuchtenCapillaryPressureSaturation.h.

#include <VanGenuchtenCapillaryPressureSaturation.h>

Inheritance diagram for MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation:
[legend]
Collaboration diagram for MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation:
[legend]

Public Member Functions

 VanGenuchtenCapillaryPressureSaturation (const double pb, const double Sr, const double Sg_r, const double Smax, const double m, const double Pc_max, const bool has_regularized)
 
std::string getName () const override
 Get model name.
 
double getCapillaryPressure (const double saturation) const override
 Get capillary pressure.
 
double getSaturation (const double capillary_pressure) const override
 Get saturation.
 
double getdPcdS (const double saturation) const override
 Get the derivative of the capillary pressure with respect to saturation.
 
double getd2PcdS2 (const double saturation) const override
 
- Public Member Functions inherited from MaterialLib::PorousMedium::CapillaryPressureSaturation
 CapillaryPressureSaturation (const double Sr, const double Sg_r, const double Smax, const double Pc_max)
 
virtual ~CapillaryPressureSaturation ()=default
 

Private Member Functions

double getPcBarvGSg (double Sg) const
 parameter in regularized van Genuchten model
 
double getSBar (double Sg) const
 Regularized van Genuchten capillary pressure-saturation Model.
 
double getPcvGSg (double Sg) const
 van Genuchten capillary pressure-saturation Model
 
double getdPcdSvGBar (double Sg) const
 
double getdPcdSvG (const double Sg) const
 

Private Attributes

const double _pb
 Entry pressure.
 
const double _m
 Exponent m, m in [0,1]. n=1/(1-m).
 
const bool _has_regularized
 
const double _xi = 1e-5
 using regularized van Genuchten model
 

Additional Inherited Members

- Protected Attributes inherited from MaterialLib::PorousMedium::CapillaryPressureSaturation
const double _saturation_r
 Residual saturation.
 
const double _saturation_nonwet_r
 
const double _saturation_max
 Maximum saturation.
 
const double _pc_max
 Maximum capillary pressure.
 
const double _minor_offset = std::numeric_limits<double>::epsilon()
 

Constructor & Destructor Documentation

◆ VanGenuchtenCapillaryPressureSaturation()

MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation::VanGenuchtenCapillaryPressureSaturation ( const double pb,
const double Sr,
const double Sg_r,
const double Smax,
const double m,
const double Pc_max,
const bool has_regularized )
inline
Parameters
pbEntry pressure, \( p_b \)
SrResidual saturation, \( S_r \)
Sg_rResidual saturation, \( S_g^{\mbox{r}} \)
SmaxMaximum saturation, \( S_{\mbox{max}} \)
mExponent, \( m \)
Pc_maxMaximum capillary pressure, \( P_c^{\mbox{max}}\)
has_regularizedwhether use the regularized van Genuchten model, \( m \)

Definition at line 67 of file VanGenuchtenCapillaryPressureSaturation.h.

Member Function Documentation

◆ getCapillaryPressure()

double MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation::getCapillaryPressure ( const double saturation) const
overridevirtual

Get capillary pressure.

Implements MaterialLib::PorousMedium::CapillaryPressureSaturation.

Definition at line 24 of file VanGenuchtenCapillaryPressureSaturation.cpp.

26{
28 {
29 double Sg = 1 - saturation;
30 if (Sg <= 1 - _saturation_r && Sg >= _saturation_nonwet_r)
31 {
32 return getPcBarvGSg(Sg);
33 }
34 if (Sg < _saturation_nonwet_r)
35 {
39 }
40
41 return getPcBarvGSg(1 - _saturation_r) +
43 }
44 const double S = std::clamp(saturation, _saturation_r + _minor_offset,
46 const double Se = (S - _saturation_r) / (_saturation_max - _saturation_r);
47 const double pc = _pb * std::pow(std::pow(Se, (-1.0 / _m)) - 1.0, 1.0 - _m);
48 return std::clamp(pc, _minor_offset, _pc_max);
49}
double getPcBarvGSg(double Sg) const
parameter in regularized van Genuchten model

References _has_regularized, _m, MaterialLib::PorousMedium::CapillaryPressureSaturation::_minor_offset, _pb, MaterialLib::PorousMedium::CapillaryPressureSaturation::_pc_max, MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_max, MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_nonwet_r, MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_r, getdPcdSvGBar(), and getPcBarvGSg().

◆ getd2PcdS2()

double MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation::getd2PcdS2 ( const double saturation) const
overridevirtual

Get the second derivative of the capillary pressure with respect to saturation

Implements MaterialLib::PorousMedium::CapillaryPressureSaturation.

Definition at line 95 of file VanGenuchtenCapillaryPressureSaturation.cpp.

97{
99 {
100 OGS_FATAL(
101 "Second derivative of regularized van-Genuchten saturation "
102 "pressure relation is not implemented.");
103 }
104 if (saturation < _saturation_r)
105 {
106 return 0;
107 }
108 if (saturation > _saturation_max)
109 {
110 return 0;
111 }
112
113 const double S = std::clamp(saturation, _saturation_r + _minor_offset,
115 const double val1 = std::pow(
116 ((S - _saturation_r) / (_saturation_max - _saturation_r)), 1.0 / _m);
117 return -_pb / (_m * _m * (S - _saturation_r) * (S - _saturation_r)) *
118 std::pow(1 - val1, -_m - 1) * std::pow(val1, _m - 1) *
119 ((1 - _m * _m) * val1 + _m - 1);
120}
#define OGS_FATAL(...)
Definition Error.h:26

References _has_regularized, _m, MaterialLib::PorousMedium::CapillaryPressureSaturation::_minor_offset, _pb, MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_max, MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_r, and OGS_FATAL.

◆ getdPcdS()

double MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation::getdPcdS ( const double saturation) const
overridevirtual

Get the derivative of the capillary pressure with respect to saturation.

Implements MaterialLib::PorousMedium::CapillaryPressureSaturation.

Definition at line 61 of file VanGenuchtenCapillaryPressureSaturation.cpp.

63{
65 {
66 double const Sg = 1 - saturation;
67 if (Sg >= _saturation_nonwet_r && Sg <= 1 - _saturation_r)
68 {
69 return -getdPcdSvGBar(Sg);
70 }
71 if (Sg < _saturation_nonwet_r)
72 {
74 }
75
76 return -getdPcdSvGBar(1 - _saturation_r);
77 }
78 if (saturation < _saturation_r)
79 {
80 return 0;
81 }
82 if (saturation > _saturation_max)
83 {
84 return 0;
85 }
86
87 const double S = std::clamp(saturation, _saturation_r + _minor_offset,
89 const double val1 = std::pow(
90 ((S - _saturation_r) / (_saturation_max - _saturation_r)), -1.0 / _m);
91 const double val2 = std::pow(val1 - 1.0, -_m);
92 return _pb * (_m - 1.0) * val1 * val2 / (_m * (S - _saturation_r));
93}

References _has_regularized, _m, MaterialLib::PorousMedium::CapillaryPressureSaturation::_minor_offset, _pb, MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_max, MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_nonwet_r, MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_r, and getdPcdSvGBar().

◆ getdPcdSvG()

double MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation::getdPcdSvG ( const double Sg) const
private

derivative dPCdS based on standard van Genuchten capillary pressure-saturation Model

Definition at line 154 of file VanGenuchtenCapillaryPressureSaturation.cpp.

156{
159 double const nn = 1 / (1 - _m);
160 double const S_le = (1 - Sg - S_lr) / (1 - Sg_r - S_lr);
161 return _pb * (1 / (_m * nn)) * (1 / (1 - S_lr - Sg_r)) *
162 std::pow(std::pow(S_le, (-1 / _m)) - 1, (1 / nn) - 1) *
163 std::pow(S_le, (-1 / _m)) / S_le;
164}

References _m, _pb, MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_nonwet_r, and MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_r.

Referenced by getdPcdSvGBar().

◆ getdPcdSvGBar()

double MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation::getdPcdSvGBar ( double Sg) const
private

derivative dPCdS based on regularized van Genuchten capillary pressure-saturation Model

Definition at line 147 of file VanGenuchtenCapillaryPressureSaturation.cpp.

148{
149 double S_bar = getSBar(Sg);
150 return getdPcdSvG(S_bar) * (1 - _xi);
151}
double getSBar(double Sg) const
Regularized van Genuchten capillary pressure-saturation Model.

References _xi, getdPcdSvG(), and getSBar().

Referenced by getCapillaryPressure(), and getdPcdS().

◆ getName()

std::string MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation::getName ( ) const
inlineoverridevirtual

Get model name.

Implements MaterialLib::PorousMedium::CapillaryPressureSaturation.

Definition at line 80 of file VanGenuchtenCapillaryPressureSaturation.h.

81 {
82 return "van Genuchten water retention model.";
83 }

◆ getPcBarvGSg()

double MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation::getPcBarvGSg ( double Sg) const
private

parameter in regularized van Genuchten model

Regularized van Genuchten capillary pressure-saturation Model.

Regularized van Genuchten capillary pressure-saturation Model

Definition at line 122 of file VanGenuchtenCapillaryPressureSaturation.cpp.

123{
126 double const S_bar = getSBar(Sg);
127 return getPcvGSg(S_bar) - getPcvGSg(Sg_r + (1 - Sg_r - S_lr) * _xi / 2);
128}
double getPcvGSg(double Sg) const
van Genuchten capillary pressure-saturation Model

References MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_nonwet_r, MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_r, _xi, getPcvGSg(), and getSBar().

Referenced by getCapillaryPressure().

◆ getPcvGSg()

double MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation::getPcvGSg ( double Sg) const
private

van Genuchten capillary pressure-saturation Model

Definition at line 137 of file VanGenuchtenCapillaryPressureSaturation.cpp.

138{
141 double const S_le = (1 - Sg - S_lr) /
143 return _pb * std::pow(std::pow(S_le, (-1.0 / _m)) - 1.0, 1.0 - _m);
144}

References _m, _pb, MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_nonwet_r, and MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_r.

Referenced by getPcBarvGSg().

◆ getSaturation()

double MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation::getSaturation ( const double capillary_pressure) const
overridevirtual

Get saturation.

Implements MaterialLib::PorousMedium::CapillaryPressureSaturation.

Definition at line 51 of file VanGenuchtenCapillaryPressureSaturation.cpp.

53{
54 const double pc = std::max(_minor_offset, capillary_pressure);
55 const double Se = std::pow(std::pow(pc / _pb, 1.0 / (1.0 - _m)) + 1.0, -_m);
56 const double S = Se * (_saturation_max - _saturation_r) + _saturation_r;
57 return std::clamp(S, _saturation_r + _minor_offset,
59}

References _m, MaterialLib::PorousMedium::CapillaryPressureSaturation::_minor_offset, _pb, MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_max, and MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_r.

◆ getSBar()

double MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation::getSBar ( double Sg) const
private

Regularized van Genuchten capillary pressure-saturation Model.

Definition at line 130 of file VanGenuchtenCapillaryPressureSaturation.cpp.

131{
134 return Sg_r + (1 - _xi) * (Sg - Sg_r) + 0.5 * _xi * (1 - Sg_r - S_lr);
135}

References MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_nonwet_r, MaterialLib::PorousMedium::CapillaryPressureSaturation::_saturation_r, and _xi.

Referenced by getdPcdSvGBar(), and getPcBarvGSg().

Member Data Documentation

◆ _has_regularized

const bool MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation::_has_regularized
private

◆ _m

const double MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation::_m
private

Exponent m, m in [0,1]. n=1/(1-m).

Definition at line 98 of file VanGenuchtenCapillaryPressureSaturation.h.

Referenced by getCapillaryPressure(), getd2PcdS2(), getdPcdS(), getdPcdSvG(), getPcvGSg(), and getSaturation().

◆ _pb

const double MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation::_pb
private

◆ _xi

const double MaterialLib::PorousMedium::VanGenuchtenCapillaryPressureSaturation::_xi = 1e-5
private

using regularized van Genuchten model

Definition at line 100 of file VanGenuchtenCapillaryPressureSaturation.h.

Referenced by getdPcdSvGBar(), getPcBarvGSg(), and getSBar().


The documentation for this class was generated from the following files: