OGS
MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim > Class Template Referencefinal

Detailed Description

template<int DisplacementDim>
class MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >

Orthotropic permeability model based on power law dependency on porosity.

This property must be a solid phase property, it computes the permeability depending on the porosity. A local coordinate system can be given for orthotropy.

Definition at line 33 of file PermeabilityOrthotropicPowerLaw.h.

#include <PermeabilityOrthotropicPowerLaw.h>

Inheritance diagram for MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >:
[legend]
Collaboration diagram for MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >:
[legend]

Public Member Functions

 PermeabilityOrthotropicPowerLaw (std::string name, std::array< double, DisplacementDim > intrinsic_permeabilities, std::array< double, DisplacementDim > exponents, ParameterLib::CoordinateSystem const *const local_coordinate_system)
 
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

std::array< double, DisplacementDim > const k_
 Intrinsic permeabilities, one for each spatial dimension.
 
std::array< double, DisplacementDim > const lambda_
 Exponents, one for each spatial dimension.
 
ParameterLib::CoordinateSystem const *const local_coordinate_system_
 

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

◆ PermeabilityOrthotropicPowerLaw()

template<int DisplacementDim>
MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >::PermeabilityOrthotropicPowerLaw ( std::string name,
std::array< double, DisplacementDim > intrinsic_permeabilities,
std::array< double, DisplacementDim > exponents,
ParameterLib::CoordinateSystem const *const local_coordinate_system )

Definition at line 22 of file PermeabilityOrthotropicPowerLaw.cpp.

30 : k_(std::move(intrinsic_permeabilities)),
31 lambda_(std::move(exponents)),
32 local_coordinate_system_(local_coordinate_system)
33{
34 name_ = std::move(name);
35}
ParameterLib::CoordinateSystem const *const local_coordinate_system_
std::array< double, DisplacementDim > const lambda_
Exponents, one for each spatial dimension.
std::array< double, DisplacementDim > const k_
Intrinsic permeabilities, one for each spatial dimension.

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

Member Function Documentation

◆ checkScale()

template<int DisplacementDim>
void MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >::checkScale ( ) const
overridevirtual

Reimplemented from MaterialPropertyLib::Property.

Definition at line 38 of file PermeabilityOrthotropicPowerLaw.cpp.

39{
40 if (!std::holds_alternative<Medium*>(scale_))
41 {
43 "The property 'PermeabilityOrthotropicPowerLaw' is implemented on "
44 "the 'medium' scales only.");
45 }
46}
#define OGS_FATAL(...)
Definition Error.h:26
std::variant< Medium *, Phase *, Component * > scale_
Definition Property.h:297

References OGS_FATAL.

◆ dValue()

template<int DisplacementDim>
PropertyDataType MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >::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 88 of file PermeabilityOrthotropicPowerLaw.cpp.

92{
93 OGS_FATAL("PermeabilityOrthotropicPowerLaw::dValue is not implemented.");
94}

References OGS_FATAL.

◆ value()

template<int DisplacementDim>
PropertyDataType MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >::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 48 of file PermeabilityOrthotropicPowerLaw.cpp.

52{
53 auto const phi = variable_array.transport_porosity;
54 // TODO (naumov) The phi0 must be evaluated once upon
55 // creation/initialization and be stored in a local state.
56 // For now assume porosity's initial value does not change with time.
57 auto const medium = std::get<Medium*>(scale_);
58 auto const phi_0 =
59 medium->hasProperty(PropertyType::transport_porosity)
60 ? medium->property(PropertyType::transport_porosity)
61 .template initialValue<double>(
62 pos, std::numeric_limits<double>::quiet_NaN())
63 : medium->property(PropertyType::porosity)
64 .template initialValue<double>(
65 pos, std::numeric_limits<double>::quiet_NaN());
66
67 Eigen::Matrix<double, DisplacementDim, DisplacementDim> k =
68 Eigen::Matrix<double, DisplacementDim, DisplacementDim>::Zero();
69
70 Eigen::Matrix<double, DisplacementDim, DisplacementDim> const e =
72 ? Eigen::Matrix<double, DisplacementDim,
73 DisplacementDim>::Identity()
74 : local_coordinate_system_->transformation<DisplacementDim>(pos);
75
76 // k = \sum_i k_i (\phi / \phi_0)^{\lambda_i} e_i \otimes e_i
77 // e_i \otimes e_i = square matrix e_i,0^2 e_i,0*e_i,1 etc.
78 for (int i = 0; i < DisplacementDim; ++i)
79 {
80 Eigen::Matrix<double, DisplacementDim, DisplacementDim> const
81 ei_otimes_ei = e.col(i) * e.col(i).transpose();
82
83 k += k_[i] * std::pow(phi / phi_0, lambda_[i]) * ei_otimes_ei;
84 }
85 return k;
86}
virtual PropertyDataType initialValue(ParameterLib::SpatialPosition const &pos, double const t) const
Definition Property.cpp:69

References MaterialPropertyLib::porosity, MaterialPropertyLib::transport_porosity, and MaterialPropertyLib::VariableArray::transport_porosity.

Member Data Documentation

◆ k_

template<int DisplacementDim>
std::array<double, DisplacementDim> const MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >::k_
private

Intrinsic permeabilities, one for each spatial dimension.

Definition at line 37 of file PermeabilityOrthotropicPowerLaw.h.

◆ lambda_

template<int DisplacementDim>
std::array<double, DisplacementDim> const MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >::lambda_
private

Exponents, one for each spatial dimension.

Definition at line 39 of file PermeabilityOrthotropicPowerLaw.h.

◆ local_coordinate_system_

template<int DisplacementDim>
ParameterLib::CoordinateSystem const* const MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >::local_coordinate_system_
private

Definition at line 40 of file PermeabilityOrthotropicPowerLaw.h.


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