OGS
MaterialPropertyLib::RelPermUdell Class Referencefinal

Detailed Description

A simple relative permeability function proposed by Kent S Udell [31].

Definition:

\[ k_{\text{rel}}^{\alpha} =\left(S^{\text{eff}}_{\alpha}\right)^{3}\]

where

  • \(k_{\text{rel}}^{\alpha}\) is relative permeability of phase \(\alpha\)
  • \(S^{\text{eff}}_{\alpha}\) is the effective saturation of phase \(\alpha\)

This class handles the wetting (liquid) phase portion of this relative permeability property, i,e with \(\alpha=L\) for the relative permeability function.

This property must be a medium property, it computes the permeability reduction due to saturation as function of capillary pressure.

Definition at line 42 of file RelPermUdell.h.

#include <RelPermUdell.h>

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

Public Member Functions

 RelPermUdell (std::string name, const double residual_liquid_saturation, const double residual_gas_saturation, const double min_relative_permeability)
 
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. More...
 
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

const double residual_liquid_saturation_
 
const double residual_gas_saturation_
 
const double min_relative_permeability_
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ RelPermUdell()

MaterialPropertyLib::RelPermUdell::RelPermUdell ( std::string  name,
const double  residual_liquid_saturation,
const double  residual_gas_saturation,
const double  min_relative_permeability 
)

Member Function Documentation

◆ checkScale()

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

Reimplemented from MaterialPropertyLib::Property.

Definition at line 54 of file RelPermUdell.h.

55  {
56  if (!std::holds_alternative<Medium*>(scale_))
57  {
58  OGS_FATAL(
59  "The property 'RelativePermeabilityUdell' is implemented on "
60  "the 'media' scale only.");
61  }
62  }
#define OGS_FATAL(...)
Definition: Error.h:26
std::variant< Medium *, Phase *, Component * > scale_
Definition: Property.h:287

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

◆ dValue()

PropertyDataType MaterialPropertyLib::RelPermUdell::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 65 of file RelPermUdell.cpp.

69 {
70  if (variable != Variable::liquid_saturation)
71  {
72  OGS_FATAL(
73  "RelPermUdell::dValue is implemented for derivatives with respect "
74  "to liquid saturation only.");
75  }
76 
77  const double S_L = std::get<double>(
78  variable_array[static_cast<int>(Variable::liquid_saturation)]);
79 
80  auto const S_L_res = residual_liquid_saturation_;
81  auto const S_L_max = 1. - residual_gas_saturation_;
82  auto const S_e = (S_L - S_L_res) / (S_L_max - S_L_res);
83 
84  if ((S_e < 0.) || (S_e > 1.))
85  {
86  return 0.;
87  }
88 
89  auto const dS_e_dS_L = 1. / (S_L_max - S_L_res);
90 
91  auto const dk_rel_LR_dS_e = 3. * S_e * S_e;
92  return dk_rel_LR_dS_e * dS_e_dS_L;
93 }

References MaterialPropertyLib::liquid_saturation, OGS_FATAL, residual_gas_saturation_, and residual_liquid_saturation_.

◆ value()

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

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

Reimplemented from MaterialPropertyLib::Property.

Definition at line 34 of file RelPermUdell.cpp.

38 {
39  const double S_L = std::get<double>(
40  variable_array[static_cast<int>(Variable::liquid_saturation)]);
41 
42  if (std::isnan(S_L))
43  {
44  OGS_FATAL("Liquid saturation not set in RelPermUdell::value().");
45  }
46 
47  auto const S_L_res = residual_liquid_saturation_;
48  auto const S_L_max = 1. - residual_gas_saturation_;
49 
50  auto const S_e = (S_L - S_L_res) / (S_L_max - S_L_res);
51 
52  if (S_e >= 1.0)
53  {
54  // fully saturated medium
55  return 1.0;
56  }
57  if (S_e <= 0.0)
58  {
59  // dry medium
61  }
62 
63  return std::max(min_relative_permeability_, S_e * S_e * S_e);
64 }

References MaterialPropertyLib::liquid_saturation, min_relative_permeability_, OGS_FATAL, residual_gas_saturation_, and residual_liquid_saturation_.

Member Data Documentation

◆ min_relative_permeability_

const double MaterialPropertyLib::RelPermUdell::min_relative_permeability_
private

Definition at line 47 of file RelPermUdell.h.

Referenced by value().

◆ residual_gas_saturation_

const double MaterialPropertyLib::RelPermUdell::residual_gas_saturation_
private

Definition at line 46 of file RelPermUdell.h.

Referenced by dValue(), and value().

◆ residual_liquid_saturation_

const double MaterialPropertyLib::RelPermUdell::residual_liquid_saturation_
private

Definition at line 45 of file RelPermUdell.h.

Referenced by dValue(), and value().


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