OGS
MaterialPropertyLib::RelPermLiakopoulos Class Referencefinal

Detailed Description

Relative permeability function for the wetting phase of the Liakopoulos experiment.

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

The relative permeability is given by an empirical formula

\[k^{\mathrm{rel}}_{\mathrm{L}}=1 - 2.207(1 - s_L)^{1.0121}\]

with effective saturation

\[s_{\mathrm{e}}=\frac{s_{\mathrm{L}}-s^{\mathrm{r}}_{\mathrm{L}}}{1 - s^{\mathrm{r}}_{\mathrm{L}}}\]

where

\[\lambda=3.0\]

\[s^{\mathrm{r}}_{\mathrm{L}}=0.2\]

Definition at line 42 of file RelPermLiakopoulos.h.

#include <RelPermLiakopoulos.h>

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

Public Member Functions

 RelPermLiakopoulos (std::string name)
 
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

const double residual_liquid_saturation_ = 0.2
 
const double maximal_liquid_saturation_ = 1.
 
const double parameter_a_ = 2.207
 
const double parameter_b_ = 1.0121
 

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

◆ RelPermLiakopoulos()

MaterialPropertyLib::RelPermLiakopoulos::RelPermLiakopoulos ( std::string name)
explicit

Definition at line 22 of file RelPermLiakopoulos.cpp.

23{
24 name_ = std::move(name);
25}

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

Member Function Documentation

◆ checkScale()

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

Reimplemented from MaterialPropertyLib::Property.

Definition at line 62 of file RelPermLiakopoulos.h.

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

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

◆ dValue()

PropertyDataType MaterialPropertyLib::RelPermLiakopoulos::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.

here, an extra computation of saturation is forced, guaranteeing a correct value. In order to speed up the computing time, saturation could be inserted into the primary variable array after it is computed in the FEM assembly.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 63 of file RelPermLiakopoulos.cpp.

67{
68 if (variable != Variable::liquid_saturation)
69 {
71 "RelPermLiakopoulos::dValue is implemented for derivatives with "
72 "respect to liquid saturation only.");
73 }
78 auto const s_L = std::visit(
79 [&variable_array, &pos, t, dt](auto&& scale) -> double
80 {
81 return scale->property(PropertyType::saturation)
82 .template value<double>(variable_array, pos, t, dt);
83 },
84 scale_);
85 auto const s_L_res = residual_liquid_saturation_;
86 auto const s_L_max = maximal_liquid_saturation_;
87
88 const double s_L_within_range = std::min(std::max(s_L_res, s_L), s_L_max);
89
90 auto const a = parameter_a_;
91 auto const b = parameter_b_;
92
93 return a * b * std::pow(1. - s_L_within_range, b - 1.);
94}
virtual PropertyDataType value() const
Definition Property.cpp:76
void scale(PETScVector &x, PetscScalar const a)
Definition LinAlg.cpp:44

References MaterialPropertyLib::liquid_saturation, maximal_liquid_saturation_, OGS_FATAL, parameter_a_, parameter_b_, residual_liquid_saturation_, MaterialPropertyLib::saturation, MaterialPropertyLib::Property::scale_, and MaterialPropertyLib::Property::value().

◆ value()

PropertyDataType MaterialPropertyLib::RelPermLiakopoulos::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_.

here, an extra computation of saturation is forced, guaranteeing a correct value. In order to speed up the computing time, saturation could be inserted into the primary variable array after it is computed in the FEM assembly.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 27 of file RelPermLiakopoulos.cpp.

31{
36 auto const s_L = std::visit(
37 [&variable_array, &pos, t, dt](auto&& scale) -> double
38 {
39 return scale->property(PropertyType::saturation)
40 .template value<double>(variable_array, pos, t, dt);
41 },
42 scale_);
43 auto const s_L_res = residual_liquid_saturation_;
44
45 if (s_L <= s_L_res)
46 {
47 return 0.0;
48 }
49
50 if (s_L >= 1.)
51 {
52 return 1.0;
53 }
54
55 auto const a = parameter_a_;
56 auto const b = parameter_b_;
57
58 auto const k_rel_LR = 1. - a * std::pow(1. - s_L, b);
59
60 return std::max(k_rel_LR, 0.);
61}

References parameter_a_, parameter_b_, residual_liquid_saturation_, MaterialPropertyLib::saturation, MaterialPropertyLib::Property::scale_, and MaterialPropertyLib::Property::value().

Member Data Documentation

◆ maximal_liquid_saturation_

const double MaterialPropertyLib::RelPermLiakopoulos::maximal_liquid_saturation_ = 1.
private

Definition at line 55 of file RelPermLiakopoulos.h.

Referenced by dValue().

◆ parameter_a_

const double MaterialPropertyLib::RelPermLiakopoulos::parameter_a_ = 2.207
private

Definition at line 56 of file RelPermLiakopoulos.h.

Referenced by dValue(), and value().

◆ parameter_b_

const double MaterialPropertyLib::RelPermLiakopoulos::parameter_b_ = 1.0121
private

Definition at line 57 of file RelPermLiakopoulos.h.

Referenced by dValue(), and value().

◆ residual_liquid_saturation_

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

Parameters for Liakopoulos relative permeability: 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 54 of file RelPermLiakopoulos.h.

Referenced by dValue(), and value().


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