OGS
MaterialPropertyLib::BishopsPowerLaw Class Referencefinal

Detailed Description

Bishop's power law for effective stress.

Definition at line 16 of file BishopsPowerLaw.h.

#include <BishopsPowerLaw.h>

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

Public Member Functions

 BishopsPowerLaw (std::string name, double const exponent)
 
void checkScale () const override
 
PropertyDataType value (VariableArray const &variable_array, ParameterLib::SpatialPosition const &, double const, double const) const override
 
PropertyDataType dValue (VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &, double const, 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 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

double const m_
 

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

◆ BishopsPowerLaw()

MaterialPropertyLib::BishopsPowerLaw::BishopsPowerLaw ( std::string name,
double const exponent )

Definition at line 14 of file BishopsPowerLaw.cpp.

15 : m_(exponent)
16{
17 name_ = std::move(name);
18}

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

Member Function Documentation

◆ checkScale()

void MaterialPropertyLib::BishopsPowerLaw::checkScale ( ) const
overridevirtual

Reimplemented from MaterialPropertyLib::Property.

Definition at line 20 of file BishopsPowerLaw.cpp.

21{
22 if (!std::holds_alternative<Medium*>(scale_))
23 {
25 "The property 'BishopsPowerLaw' is implemented on the 'media' "
26 "scale only.");
27 }
28}
#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::BishopsPowerLaw::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 40 of file BishopsPowerLaw.cpp.

44{
45 if (variable != Variable::liquid_saturation)
46 {
48 "BishopsPowerLaw::dValue is implemented for derivatives with "
49 "respect to liquid saturation only.");
50 }
51
52 auto const S_L = variable_array.liquid_saturation;
53
54 return m_ * std::pow(S_L, m_ - 1.);
55}

References MaterialPropertyLib::liquid_saturation, MaterialPropertyLib::VariableArray::liquid_saturation, m_, and OGS_FATAL.

◆ value()

PropertyDataType MaterialPropertyLib::BishopsPowerLaw::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 30 of file BishopsPowerLaw.cpp.

34{
35 auto const S_L = variable_array.liquid_saturation;
36
37 return std::pow(S_L, m_);
38}

References MaterialPropertyLib::VariableArray::liquid_saturation, and m_.

Member Data Documentation

◆ m_

double const MaterialPropertyLib::BishopsPowerLaw::m_
private

Definition at line 34 of file BishopsPowerLaw.h.

Referenced by dValue(), and value().


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