OGS
MaterialPropertyLib::SaturationLiakopoulos Class Referencefinal

Detailed Description

A well known soil characteristics function.

This property must be a medium property, it computes the saturation of the wetting phase as function of capillary pressure.

Wetting (liquid) phase saturation is given by the empirical relation

\[s^\mathrm{r}_\mathrm{L}=1 - 1.9722\cdot10^{-11}p_\mathrm{cap}^{2.4279}\]

Definition at line 36 of file SaturationLiakopoulos.h.

#include <SaturationLiakopoulos.h>

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

Public Member Functions

 SaturationLiakopoulos (std::string name)
 
void checkScale () const override
 
PropertyDataType value (VariableArray const &variable_array, ParameterLib::SpatialPosition const &, double const, double const) const override
 
PropertyDataType dValue (VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &, double const, double const) const override
 
PropertyDataType d2Value (VariableArray const &variable_array, Variable const variable1, Variable const variable2, ParameterLib::SpatialPosition const &, double const, double const) const override
 Default implementation: 2nd derivative of any constant property is zero.
 
- 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 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

const double residual_liquid_saturation_ = 0.2
 
const double parameter_a_ = 1.9722e-11
 
const double parameter_b_ = 2.4279
 
const double p_cap_max_
 

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

◆ SaturationLiakopoulos()

MaterialPropertyLib::SaturationLiakopoulos::SaturationLiakopoulos ( std::string name)
inlineexplicit

Definition at line 55 of file SaturationLiakopoulos.h.

56 {
57 name_ = std::move(name);
58 }

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

Member Function Documentation

◆ checkScale()

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

Reimplemented from MaterialPropertyLib::Property.

Definition at line 60 of file SaturationLiakopoulos.h.

61 {
62 if (!std::holds_alternative<Medium*>(scale_))
63 {
65 "The property 'SaturationLiakopoulos' is implemented on the "
66 "'media' scale only.");
67 }
68 }
#define OGS_FATAL(...)
Definition Error.h:26
std::variant< Medium *, Phase *, Component * > scale_
Definition Property.h:297

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

◆ d2Value()

PropertyDataType MaterialPropertyLib::SaturationLiakopoulos::d2Value ( VariableArray const & variable_array,
Variable const variable1,
Variable const variable2,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
overridevirtual

Default implementation: 2nd derivative of any constant property is zero.

This virtual method will compute the second derivative of a property with respect to the given variables pv1 and pv2.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 61 of file SaturationLiakopoulos.cpp.

65{
66 if ((variable1 != Variable::capillary_pressure) &&
67 (variable2 != Variable::capillary_pressure))
68 {
70 "SaturationLiakopoulos::d2Value is implemented for derivatives "
71 "with respect to capillary pressure only.");
72 }
73
74 const double p_cap = variable_array.capillary_pressure;
75
76 if (p_cap < 0.)
77 {
78 return 0.;
79 }
80 const double p_cap_restricted = std::min(p_cap, p_cap_max_);
81 return -parameter_a_ * (parameter_b_ - 1.) * parameter_b_ *
82 std::pow(p_cap_restricted, parameter_b_ - 2.);
83}

References MaterialPropertyLib::capillary_pressure, MaterialPropertyLib::VariableArray::capillary_pressure, OGS_FATAL, p_cap_max_, parameter_a_, and parameter_b_.

◆ dValue()

PropertyDataType MaterialPropertyLib::SaturationLiakopoulos::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 38 of file SaturationLiakopoulos.cpp.

42{
43 if (variable != Variable::capillary_pressure)
44 {
46 "SaturationLiakopoulos::dValue is implemented for derivatives with "
47 "respect to capillary pressure only.");
48 }
49
50 const double p_cap = variable_array.capillary_pressure;
51 if (p_cap <= 0.)
52 {
53 return 0.;
54 }
55 const double p_cap_restricted = std::min(p_cap, p_cap_max_);
56
57 return -parameter_a_ * parameter_b_ *
58 std::pow(p_cap_restricted, parameter_b_ - 1.);
59}

References MaterialPropertyLib::capillary_pressure, MaterialPropertyLib::VariableArray::capillary_pressure, OGS_FATAL, p_cap_max_, parameter_a_, and parameter_b_.

◆ value()

PropertyDataType MaterialPropertyLib::SaturationLiakopoulos::value ( VariableArray const & variable_array,
ParameterLib::SpatialPosition const & ,
double const ,
double const  ) 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 24 of file SaturationLiakopoulos.cpp.

28{
29 const double p_cap = variable_array.capillary_pressure;
30
31 if (p_cap < 0.)
32 return 1.;
33
34 return std::max(residual_liquid_saturation_,
35 1. - parameter_a_ * std::pow(p_cap, parameter_b_));
36}

References MaterialPropertyLib::VariableArray::capillary_pressure, parameter_a_, parameter_b_, and residual_liquid_saturation_.

Member Data Documentation

◆ p_cap_max_

const double MaterialPropertyLib::SaturationLiakopoulos::p_cap_max_
private
Initial value:

Definition at line 51 of file SaturationLiakopoulos.h.

Referenced by d2Value(), and dValue().

◆ parameter_a_

const double MaterialPropertyLib::SaturationLiakopoulos::parameter_a_ = 1.9722e-11
private

Definition at line 49 of file SaturationLiakopoulos.h.

Referenced by d2Value(), dValue(), and value().

◆ parameter_b_

const double MaterialPropertyLib::SaturationLiakopoulos::parameter_b_ = 2.4279
private

Definition at line 50 of file SaturationLiakopoulos.h.

Referenced by d2Value(), dValue(), and value().

◆ residual_liquid_saturation_

const double MaterialPropertyLib::SaturationLiakopoulos::residual_liquid_saturation_ = 0.2
private

Parameters for Liakopoulos saturation curve taken from: Asadi, R., Ataie-Ashtiani, B. (2015): A Comparison of finite volume formulations and coupling strategies for two-phase flow in deforming porous media. Comput. Geosci., p. 24ff.

Those parameters are fixed for that particular model, no need to change them.

Definition at line 48 of file SaturationLiakopoulos.h.

Referenced by value().


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