OGS
MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain Class Referencefinal

Detailed Description

A strain dependent bimodal water retention model.

It is based on the van Genuchten model.

The equation is as follows

\[S_{e} = \left((e_{m}+a \Delta e) \left[\frac{1}{((\frac{p_{c}}{p_{b}})^{n}+1)}\right]^{m} + (e_{M} - a \Delta e) \left[\frac{1}{((\frac{p_{c}}{p_{{b,M}}})^{n} +1)}\right]^{n} \right) \frac{1}{e}\]

with effective saturation defined as \(S_{e}=\frac{S-S_r}{S_{max}-S_r}\), where \(S_r\) and \(S_{max}\) are the residual saturation and the maximum saturation, respectively. The exponent \(m \in (0,1)\) is the same as in the van Genuchten equation ( see SaturationVanGenuchten). In the original work another exponent \(n\) is used, but usually set to \(n = 1 / (1 - m)\), and also in this implementation. The pressure scaling parameter \(p_{b}\) is added by the user and is the scaling parameter of the micropores. The scaling parameter of the macropores can be calculated as follows \(p_{b,M} = p_{b} d_{diff}\) The total void ratio and the void ratio of the micropores are \(e_0\) and \(e_m\). Another scaling factor \(a\) scales the effect of the strain

The changing void ratio is calculated as \(\Delta e = -\frac{(1-e)\epsilon_{vol}}{e}\), with \(\epsilon_{vol}\) as the volumetric strain. The result is then clamped between the residual and maximum liquid saturations.

Definition at line 48 of file SaturationVanGenuchtenWithVolumetricStrain.h.

#include <SaturationVanGenuchtenWithVolumetricStrain.h>

Inheritance diagram for MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain:
[legend]
Collaboration diagram for MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain:
[legend]

Public Member Functions

 SaturationVanGenuchtenWithVolumetricStrain (std::string name, double const residual_liquid_saturation, double const residual_gas_saturation, double const exponent, double const p_b, double const e_0, double const e_m, double const a, double const d_diff)
 
void checkScale () const override
 
PropertyDataType value (VariableArray const &variable_array, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
 
PropertyDataType dValue (VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
 
- Public Member Functions inherited from MaterialPropertyLib::Property
virtual ~Property ()
 
virtual PropertyDataType initialValue (ParameterLib::SpatialPosition const &pos, double const t) const
 
virtual PropertyDataType value () const
 
virtual PropertyDataType value (VariableArray const &variable_array, VariableArray const &variable_array_prev, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
virtual PropertyDataType dValue (VariableArray const &variable_array, VariableArray const &variable_array_prev, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
virtual PropertyDataType d2Value (VariableArray const &variable_array, Variable const variable1, Variable const variable2, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 Default implementation: 2nd derivative of any constant property is zero.
 
virtual void setProperties (std::vector< std::unique_ptr< Phase > > const &phases)
 Default implementation:
 
void setScale (std::variant< Medium *, Phase *, Component * > scale)
 
template<typename T >
initialValue (ParameterLib::SpatialPosition const &pos, double const t) const
 
template<typename T >
value () const
 
template<typename T >
value (VariableArray const &variable_array, VariableArray const &variable_array_prev, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
value (VariableArray const &variable_array, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
dValue (VariableArray const &variable_array, VariableArray const &variable_array_prev, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
dValue (VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
d2Value (VariableArray const &variable_array, Variable const &variable1, Variable const &variable2, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 

Private Attributes

double const S_L_res_
 
double const S_L_max_
 
double const m_
 
double const p_b_
 
double const e_0_
 
double const e_m_
 
double const a_
 
double const d_diff_
 

Additional Inherited Members

- Protected Attributes inherited from MaterialPropertyLib::Property
std::string name_
 
PropertyDataType value_
 The single value of a property.
 
PropertyDataType dvalue_
 
std::variant< Medium *, Phase *, Component * > scale_
 

Constructor & Destructor Documentation

◆ SaturationVanGenuchtenWithVolumetricStrain()

MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::SaturationVanGenuchtenWithVolumetricStrain ( std::string name,
double const residual_liquid_saturation,
double const residual_gas_saturation,
double const exponent,
double const p_b,
double const e_0,
double const e_m,
double const a,
double const d_diff )

Definition at line 22 of file SaturationVanGenuchtenWithVolumetricStrain.cpp.

35 m_(exponent),
36 p_b_(p_b),
37 e_0_(e_0),
38 e_m_(e_m),
39 a_(a),
40 d_diff_(d_diff)
41{
42 name_ = std::move(name);
43
44 if (!(m_ > 0 && m_ < 1))
45 {
46 OGS_FATAL("The exponent value m = {:g}, is out of its range of (0, 1)",
47 m_);
48 }
49}
#define OGS_FATAL(...)
Definition Error.h:26

References m_, MaterialPropertyLib::name, MaterialPropertyLib::Property::name_, and OGS_FATAL.

Member Function Documentation

◆ checkScale()

void MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::checkScale ( ) const
inlineoverridevirtual

Reimplemented from MaterialPropertyLib::Property.

Definition at line 62 of file SaturationVanGenuchtenWithVolumetricStrain.h.

63 {
64 if (!std::holds_alternative<Medium*>(scale_))
65 {
67 "The property 'SaturationVanGenuchtenWithVolumetricStrain' is "
68 "implemented on the 'media' scale only.");
69 }
70 }
std::variant< Medium *, Phase *, Component * > scale_
Definition Property.h:297

References OGS_FATAL, and MaterialPropertyLib::Property::scale_.

◆ dValue()

PropertyDataType MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::dValue ( VariableArray const & variable_array,
Variable const variable,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
overridevirtual

This virtual method will compute the property derivative value based on the variables that are passed as arguments with the default implementation using empty variables array for the previous time step.

The default implementation of this method only returns the property value derivative without altering it.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 82 of file SaturationVanGenuchtenWithVolumetricStrain.cpp.

86{
87 if (variable != Variable::capillary_pressure)
88 {
90 "SaturationVanGenuchtenWithVolumetricStrain::dValue is implemented "
91 "for derivatives with respect to capillary pressure only.");
92 }
93 const double p_cap = variable_array.capillary_pressure;
94
95 if (p_cap <= 0)
96 {
97 return 0.;
98 }
99
100 double const e_vol = variable_array.volumetric_strain;
101
102 double const n = 1. / (1. - m_);
103 double const d_e = -1 * (1 + e_0_) * e_vol / e_0_;
104 double const p_b_M = p_b_ * (1 / d_diff_);
105 double const p = p_cap / p_b_;
106 double const p_to_n = std::pow(p, n);
107 double const S_eff_mi = std::pow(p_to_n + 1., -m_);
108 double const p_M = p_cap / p_b_M;
109 double const p_to_n_M = std::pow(p_M, n);
110 double const S_eff_M = std::pow(p_to_n_M + 1., -m_);
111 double const S_eff =
112 (e_m_ * S_eff_mi + ((e_0_ - e_m_ - (a_ * d_e)) * S_eff_M)) /
113 (e_0_ - (a_ * d_e));
114 double const S = S_eff * S_L_max_ - S_eff * S_L_res_ + S_L_res_;
115
116 if (S < S_L_res_ || S > S_L_max_)
117 {
118 return 0.;
119 }
120
121 double const dS_eff_dp_cap =
122 (-(e_m_)*n * m_ * p_to_n * std::pow(p_to_n + 1., -m_ - 1) -
123 (e_0_ - e_m_ - (a_ * d_e)) * n * m_ * p_to_n_M *
124 std::pow(p_to_n_M + 1., -m_ - 1)) /
125 ((e_0_ - (a_ * d_e)) * p_cap);
126 return dS_eff_dp_cap * (S_L_max_ - S_L_res_);
127}

References a_, MaterialPropertyLib::capillary_pressure, MaterialPropertyLib::VariableArray::capillary_pressure, d_diff_, e_0_, e_m_, m_, OGS_FATAL, p_b_, S_L_max_, S_L_res_, and MaterialPropertyLib::VariableArray::volumetric_strain.

◆ value()

PropertyDataType MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::value ( VariableArray const & variable_array,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
overridevirtual

Those methods override the base class implementations and actually compute and set the property values_ and dValues_.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 51 of file SaturationVanGenuchtenWithVolumetricStrain.cpp.

55{
56 const double p_cap = variable_array.capillary_pressure;
57
58 if (p_cap <= 0)
59 {
60 return S_L_max_;
61 }
62
63 double const e_vol = variable_array.volumetric_strain;
64
65 double const n = 1. / (1. - m_);
66 double const d_e = -1 * (1 + e_0_) * e_vol / e_0_;
67 double const p_b_M = p_b_ * (1 / d_diff_);
68 double const p = p_cap / p_b_;
69 double const p_to_n = std::pow(p, n);
70 double const S_eff_mi = std::pow(p_to_n + 1., -m_);
71 double const p_M = p_cap / p_b_M;
72 double const p_to_n_M = std::pow(p_M, n);
73 double const S_eff_M = std::pow(p_to_n_M + 1., -m_);
74 double const S_eff =
75 (e_m_ * S_eff_mi + ((e_0_ - e_m_ - (a_ * d_e)) * S_eff_M)) /
76 (e_0_ - (a_ * d_e));
77 double const S = S_eff * S_L_max_ - S_eff * S_L_res_ + S_L_res_;
78
79 return std::clamp(S, S_L_res_, S_L_max_);
80}

References a_, MaterialPropertyLib::VariableArray::capillary_pressure, d_diff_, e_0_, e_m_, m_, p_b_, S_L_max_, S_L_res_, and MaterialPropertyLib::VariableArray::volumetric_strain.

Member Data Documentation

◆ a_

double const MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::a_
private

Definition at line 89 of file SaturationVanGenuchtenWithVolumetricStrain.h.

Referenced by dValue(), and value().

◆ d_diff_

double const MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::d_diff_
private

Definition at line 90 of file SaturationVanGenuchtenWithVolumetricStrain.h.

Referenced by dValue(), and value().

◆ e_0_

double const MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::e_0_
private

Definition at line 87 of file SaturationVanGenuchtenWithVolumetricStrain.h.

Referenced by dValue(), and value().

◆ e_m_

double const MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::e_m_
private

Definition at line 88 of file SaturationVanGenuchtenWithVolumetricStrain.h.

Referenced by dValue(), and value().

◆ m_

double const MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::m_
private

◆ p_b_

double const MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::p_b_
private

Definition at line 86 of file SaturationVanGenuchtenWithVolumetricStrain.h.

Referenced by dValue(), and value().

◆ S_L_max_

double const MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::S_L_max_
private

Definition at line 84 of file SaturationVanGenuchtenWithVolumetricStrain.h.

Referenced by dValue(), and value().

◆ S_L_res_

double const MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::S_L_res_
private

Definition at line 83 of file SaturationVanGenuchtenWithVolumetricStrain.h.

Referenced by dValue(), and value().


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