OGS
MaterialPropertyLib::VapourDiffusionDeVries Class Referencefinal

Detailed Description

DeVries type Vapour diffusion.

The model was presented in [12].

The vapour diffusion can be described by

\[ D_v=5.9\cdot 10^{-6} \left(\frac{T, \text{in K}}{p, \text{in Pa}}\right)^{2.3} D_{vr}, \]

where \(D_{vr}\) is the the relative diffusion coefficient, and \(T\) is the temperature.

Definition at line 32 of file VapourDiffusionDeVries.h.

#include <VapourDiffusionDeVries.h>

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

Public Member Functions

 VapourDiffusionDeVries (std::string name, double const base_diffusion_coefficient, double const exponent)
 
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

double const base_diffusion_coefficient_
 
double const exponent_
 

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

◆ VapourDiffusionDeVries()

MaterialPropertyLib::VapourDiffusionDeVries::VapourDiffusionDeVries ( std::string name,
double const base_diffusion_coefficient,
double const exponent )
inline

Member Function Documentation

◆ checkScale()

void MaterialPropertyLib::VapourDiffusionDeVries::checkScale ( ) const
inlineoverridevirtual

Reimplemented from MaterialPropertyLib::Property.

Definition at line 45 of file VapourDiffusionDeVries.h.

46 {
47 if (!(std::holds_alternative<Phase*>(scale_) ||
48 std::holds_alternative<Component*>(scale_)))
49 {
51 "The property 'VapourDiffusionDeVries' is "
52 "implemented on the 'phase' and 'component' scale only.");
53 }
54 }
#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::VapourDiffusionDeVries::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 34 of file VapourDiffusionDeVries.cpp.

38{
39 const double T = variable_array.temperature;
40 const double p_g = variable_array.gas_phase_pressure;
41
42 if (variable == Variable::temperature)
43 {
45 std::pow(T, exponent_ - 1.0) / p_g;
46 }
47 if (variable == Variable::gas_phase_pressure)
48 {
49 return -base_diffusion_coefficient_ * std::pow(T, exponent_) /
50 (p_g * p_g);
51 }
52 if (variable == Variable::liquid_saturation)
53 {
54 return 0.0;
55 }
56
58 "VapourDiffusionDeVries::dValue is implemented for derivatives with "
59 "respect to temperature or saturation only.");
60}

References base_diffusion_coefficient_, exponent_, MaterialPropertyLib::gas_phase_pressure, MaterialPropertyLib::VariableArray::gas_phase_pressure, MaterialPropertyLib::liquid_saturation, OGS_FATAL, MaterialPropertyLib::temperature, and MaterialPropertyLib::VariableArray::temperature.

◆ value()

PropertyDataType MaterialPropertyLib::VapourDiffusionDeVries::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 23 of file VapourDiffusionDeVries.cpp.

27{
28 const double T = variable_array.temperature;
29 const double p_g = variable_array.gas_phase_pressure;
30
31 return base_diffusion_coefficient_ * std::pow(T, exponent_) / p_g;
32}

References base_diffusion_coefficient_, exponent_, MaterialPropertyLib::VariableArray::gas_phase_pressure, and MaterialPropertyLib::VariableArray::temperature.

Member Data Documentation

◆ base_diffusion_coefficient_

double const MaterialPropertyLib::VapourDiffusionDeVries::base_diffusion_coefficient_
private

Definition at line 67 of file VapourDiffusionDeVries.h.

Referenced by dValue(), and value().

◆ exponent_

double const MaterialPropertyLib::VapourDiffusionDeVries::exponent_
private

Definition at line 68 of file VapourDiffusionDeVries.h.

Referenced by dValue(), and value().


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