OGS
MaterialPropertyLib::TransportPorosityFromMassBalance Class Referencefinal

Detailed Description

Porosity depending on the volumetric strain rate and phase pressure rate.

This property must be a solid phase.

Definition at line 24 of file TransportPorosityFromMassBalance.h.

#include <TransportPorosityFromMassBalance.h>

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

Public Member Functions

 TransportPorosityFromMassBalance (std::string name, ParameterLib::Parameter< double > const &initial_porosity, double const phi_min, double const phi_max)
 
void checkScale () const override
 
PropertyDataType initialValue (ParameterLib::SpatialPosition const &pos, double const t) const override
 
PropertyDataType value (VariableArray const &variable_array, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
 
PropertyDataType value (VariableArray const &variable_array, VariableArray const &variable_array_prev, 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 value () 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

ParameterLib::Parameter< double > const & phi0_
 Parameter, which is used by FEM to set the initial porosity value.
 
double const phi_min_
 
double const phi_max_
 

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

◆ TransportPorosityFromMassBalance()

MaterialPropertyLib::TransportPorosityFromMassBalance::TransportPorosityFromMassBalance ( std::string name,
ParameterLib::Parameter< double > const & initial_porosity,
double const phi_min,
double const phi_max )
inline

Definition at line 33 of file TransportPorosityFromMassBalance.h.

37 : phi0_(initial_porosity), phi_min_(phi_min), phi_max_(phi_max)
38 {
39 name_ = std::move(name);
40 }
ParameterLib::Parameter< double > const & phi0_
Parameter, which is used by FEM to set the initial porosity value.

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

Member Function Documentation

◆ checkScale()

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

Reimplemented from MaterialPropertyLib::Property.

Definition at line 19 of file TransportPorosityFromMassBalance.cpp.

20{
21 if (!std::holds_alternative<Medium*>(scale_))
22 {
24 "The property 'TransportPorosityFromMassBalance' is "
25 "implemented on the 'medium' scales only.");
26 }
27}
#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::TransportPorosityFromMassBalance::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 67 of file TransportPorosityFromMassBalance.cpp.

71{
73 "TransportPorosityFromMassBalance derivatives are not implemented.");
74}

References OGS_FATAL.

◆ initialValue()

PropertyDataType MaterialPropertyLib::TransportPorosityFromMassBalance::initialValue ( ParameterLib::SpatialPosition const & pos,
double const t ) const
inlineoverridevirtual

Returns the initial (or reference) value of the property. The default implementation forwards to the value function.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 44 of file TransportPorosityFromMassBalance.h.

46 {
47 return fromVector(phi0_(t, pos));
48 }
PropertyDataType fromVector(std::vector< double > const &values)
Definition Property.cpp:23

References MaterialPropertyLib::fromVector(), and phi0_.

◆ value() [1/2]

PropertyDataType MaterialPropertyLib::TransportPorosityFromMassBalance::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 57 of file TransportPorosityFromMassBalance.cpp.

61{
63 "TransportPorosityFromMassBalance value call requires previous time "
64 "step values.");
65}

References OGS_FATAL.

◆ value() [2/2]

PropertyDataType MaterialPropertyLib::TransportPorosityFromMassBalance::value ( VariableArray const & variable_array,
VariableArray const & variable_array_prev,
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 and the variables from the previous time step.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 29 of file TransportPorosityFromMassBalance.cpp.

34{
35 double const beta_SR = variable_array.grain_compressibility;
36 auto const alpha_b =
37 std::get<Medium*>(scale_)
39 .template value<double>(variable_array, pos, t, dt);
40
41 double const e = variable_array.volumetric_strain;
42 double const e_prev = variable_array_prev.volumetric_strain;
43 double const delta_e = e - e_prev;
44
45 double const p_eff = variable_array.effective_pore_pressure;
46 double const p_eff_prev = variable_array_prev.effective_pore_pressure;
47 double const delta_p_eff = p_eff - p_eff_prev;
48
49 double const phi = variable_array.porosity;
50
51 double const phi_tr_prev = variable_array_prev.transport_porosity;
52
53 double const w = delta_e + delta_p_eff * beta_SR;
54 return std::clamp(phi_tr_prev + (alpha_b - phi) * w, phi_min_, phi_max_);
55}
virtual PropertyDataType value() const
Definition Property.cpp:76

References MaterialPropertyLib::biot_coefficient, MaterialPropertyLib::VariableArray::effective_pore_pressure, MaterialPropertyLib::VariableArray::grain_compressibility, phi_max_, phi_min_, MaterialPropertyLib::VariableArray::porosity, MaterialPropertyLib::Property::scale_, MaterialPropertyLib::VariableArray::transport_porosity, MaterialPropertyLib::Property::value(), and MaterialPropertyLib::VariableArray::volumetric_strain.

Member Data Documentation

◆ phi0_

ParameterLib::Parameter<double> const& MaterialPropertyLib::TransportPorosityFromMassBalance::phi0_
private

Parameter, which is used by FEM to set the initial porosity value.

Definition at line 28 of file TransportPorosityFromMassBalance.h.

Referenced by initialValue().

◆ phi_max_

double const MaterialPropertyLib::TransportPorosityFromMassBalance::phi_max_
private

Definition at line 30 of file TransportPorosityFromMassBalance.h.

Referenced by value().

◆ phi_min_

double const MaterialPropertyLib::TransportPorosityFromMassBalance::phi_min_
private

Definition at line 29 of file TransportPorosityFromMassBalance.h.

Referenced by value().


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