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 43 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. 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_ = 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. More...
 
PropertyDataType dvalue_
 
std::variant< Medium *, Phase *, Component * > scale_
 

Constructor & Destructor Documentation

◆ RelPermLiakopoulos()

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

Definition at line 23 of file RelPermLiakopoulos.cpp.

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

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

Member Function Documentation

◆ checkScale()

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

Reimplemented from MaterialPropertyLib::Property.

Definition at line 63 of file RelPermLiakopoulos.h.

64  {
65  if (!std::holds_alternative<Medium*>(scale_))
66  {
67  OGS_FATAL(
68  "The property 'RelPermLiakopoulos' is implemented on the "
69  "'media' scale only.");
70  }
71  }
#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::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 64 of file RelPermLiakopoulos.cpp.

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

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

◆ 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 28 of file RelPermLiakopoulos.cpp.

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

References parameter_a_, parameter_b_, residual_liquid_saturation_, MaterialPropertyLib::saturation, MathLib::LinAlg::scale(), and MaterialPropertyLib::Property::scale_.

Member Data Documentation

◆ maximal_liquid_saturation_

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

Definition at line 56 of file RelPermLiakopoulos.h.

Referenced by dValue().

◆ parameter_a_

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

Definition at line 57 of file RelPermLiakopoulos.h.

Referenced by dValue(), and value().

◆ parameter_b_

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

Definition at line 58 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 55 of file RelPermLiakopoulos.h.

Referenced by dValue(), and value().


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