OGS
MaterialPropertyLib::DupuitPermeability Class Referencefinal

Detailed Description

Definition at line 18 of file DupuitPermeability.h.

#include <DupuitPermeability.h>

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

Public Member Functions

 DupuitPermeability (std::string name, ParameterLib::Parameter< double > const &parameter)
 This constructor accepts two parameters.
 
PropertyDataType value (MaterialPropertyLib::VariableArray const &variable_array, 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 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 & parameter_
 

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

◆ DupuitPermeability()

MaterialPropertyLib::DupuitPermeability::DupuitPermeability ( std::string name,
ParameterLib::Parameter< double > const & parameter )

This constructor accepts two parameters.

Definition at line 15 of file DupuitPermeability.cpp.

17 : parameter_(parameter)
18{
19 name_ = std::move(name);
20}
ParameterLib::Parameter< double > const & parameter_

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

Member Function Documentation

◆ value()

PropertyDataType MaterialPropertyLib::DupuitPermeability::value ( MaterialPropertyLib::VariableArray const & variable_array,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
overridevirtual

This method computes the value of a property depending linearly on the value of the given primary variable.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 22 of file DupuitPermeability.cpp.

26{
27 double const pressure = variable_array.liquid_phase_pressure;
28 auto const& permeability_values = parameter_(t, pos);
29
30 auto const& permeability_variant = fromVector(permeability_values);
31 PropertyDataType dupuit_permeability = std::visit(
32 [&pressure](auto const& permeability_variant) -> PropertyDataType
33 {
34 using T = std::decay_t<decltype(permeability_variant)>;
35 if constexpr (std::is_same_v<T, double>)
36 {
37 return pressure * permeability_variant;
38 }
39 else
40 {
41 return (pressure * permeability_variant).eval();
42 }
43 },
44 permeability_variant);
45
46 return dupuit_permeability;
47}
PropertyDataType fromVector(std::vector< double > const &values)
Definition Property.cpp:23
std::variant< double, Eigen::Matrix< double, 2, 1 >, Eigen::Matrix< double, 3, 1 >, Eigen::Matrix< double, 2, 2 >, Eigen::Matrix< double, 3, 3 >, Eigen::Matrix< double, 4, 1 >, Eigen::Matrix< double, 6, 1 >, Eigen::MatrixXd > PropertyDataType
Definition Property.h:31

References MaterialPropertyLib::fromVector(), MaterialPropertyLib::VariableArray::liquid_phase_pressure, and parameter_.

Member Data Documentation

◆ parameter_

ParameterLib::Parameter<double> const& MaterialPropertyLib::DupuitPermeability::parameter_
private

Definition at line 33 of file DupuitPermeability.h.

Referenced by value().


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