OGS
MaterialPropertyLib::KozenyCarmanModel Class Referencefinal

Detailed Description

Kozeny-Carman equation.

\[ k = k_0 \left( \frac{1 - \phi_0}{1 - \phi} \right)^2 \left( \frac{\phi}{\phi_0} \right)^3, \]

where \(k\) is the permeability, \(k_0\) is the initial permeability, \(\phi\) is the porosity, and \(\phi_0\) is the initial porosity.

Definition at line 28 of file KozenyCarmanModel.h.

#include <KozenyCarmanModel.h>

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

Public Member Functions

 KozenyCarmanModel (ParameterLib::Parameter< double > const &k0, ParameterLib::Parameter< double > const &phi0)
 
PropertyDataType value (MaterialPropertyLib::VariableArray const &variable_array, ParameterLib::SpatialPosition const &pos, double const t, double const) 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 dValue (VariableArray const &variable_array, 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

ParameterLib::Parameter< double > const & _k0
 Initial medium permeability.
 
ParameterLib::Parameter< double > const & _phi0
 Initial porosity.
 

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

◆ KozenyCarmanModel()

MaterialPropertyLib::KozenyCarmanModel::KozenyCarmanModel ( ParameterLib::Parameter< double > const & k0,
ParameterLib::Parameter< double > const & phi0 )
inlineexplicit

Definition at line 31 of file KozenyCarmanModel.h.

33 : _k0(k0), _phi0(phi0)
34 {
35 }
ParameterLib::Parameter< double > const & _k0
Initial medium permeability.
ParameterLib::Parameter< double > const & _phi0
Initial porosity.

Member Function Documentation

◆ value()

PropertyDataType MaterialPropertyLib::KozenyCarmanModel::value ( MaterialPropertyLib::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 18 of file KozenyCarmanModel.cpp.

22{
23 double const phi = variable_array.porosity;
24 auto const& k0 = _k0(t, pos);
25
26 std::vector<double> k;
27 k.reserve(k0.size());
28 std::transform(k0.cbegin(), k0.cend(), std::back_inserter(k),
29 [&](auto const& k_component)
30 {
31 return k_component *
32 std::pow((1 - _phi0(t, pos)[0]) / (1 - phi), 2) *
33 std::pow(phi / _phi0(t, pos)[0], 3);
34 });
35
36 return fromVector(k);
37}
PropertyDataType fromVector(std::vector< double > const &values)
Definition Property.cpp:23

References _k0, MaterialPropertyLib::fromVector(), and MaterialPropertyLib::VariableArray::porosity.

Member Data Documentation

◆ _k0

ParameterLib::Parameter<double> const& MaterialPropertyLib::KozenyCarmanModel::_k0
private

Initial medium permeability.

Definition at line 44 of file KozenyCarmanModel.h.

Referenced by value().

◆ _phi0

ParameterLib::Parameter<double> const& MaterialPropertyLib::KozenyCarmanModel::_phi0
private

Initial porosity.

Definition at line 46 of file KozenyCarmanModel.h.


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