OGS
MaterialPropertyLib::VapourDiffusionPMQ Class Referencefinal

Detailed Description

The Penman-Millington-Quirk (PMQ) Vapour diffusion model.

The vapour diffusion can be described by [28], [29],

\[ D_v=D_0 \left(\frac{T}{273.15}\right)^{n} D_{vr}, \]

where \(D_{0}\) is the base diffusion coefficient with default value \(2.16\cdot 10^{-5}\) \({\text m}^2 \text{Pa}/(\text{s}\text{K}^{n})\), \(n\) is the exponent with default value 1.8, \(D_{vr}\) is the the relative diffusion coefficient, and \(T\) is the temperature.

The Penman–Millington–Quirk (PMQ) model [28] is given as

\[ D_{vr}=0.66 \phi \left(\frac{\kappa}{\phi}\right)^{\frac{12-m}{3}}, \]

where \(\phi\) is the total porosity, \(\kappa\) is the air filled porosity, and \(m\) is a fitting parameter. The air filled porosity is defined as \( \kappa = \phi-\theta = \phi -S_L \phi \) with \(\theta\) the liquid content, and \(S_L\) the liquid saturation.

According to the study presented in [28], \(m=6\) is the best fitting parameter for the sieved, repacked soils that the authors tested. Therefore, \(m=6\) is used in the implementation, which gives

\[ D_{vr}=0.66 \phi (1 - S_L )^2. \]

Note: In order to maintain consistency with the implementation of the computations of other vapor-related parameters, \( \phi (1 - S_L )\) is removed from the implementation for this class and is multiplied back in the local assembler.

Definition at line 59 of file VapourDiffusionPMQ.h.

#include <VapourDiffusionPMQ.h>

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

Public Member Functions

 VapourDiffusionPMQ (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

◆ VapourDiffusionPMQ()

MaterialPropertyLib::VapourDiffusionPMQ::VapourDiffusionPMQ ( std::string name,
double const base_diffusion_coefficient,
double const exponent )
inlineexplicit

Definition at line 62 of file VapourDiffusionPMQ.h.

65 : base_diffusion_coefficient_(base_diffusion_coefficient),
66 exponent_(exponent)
67 {
68 name_ = std::move(name);
69 }

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

Member Function Documentation

◆ checkScale()

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

Reimplemented from MaterialPropertyLib::Property.

Definition at line 71 of file VapourDiffusionPMQ.h.

72 {
73 if (!(std::holds_alternative<Phase*>(scale_) ||
74 std::holds_alternative<Component*>(scale_)))
75 {
77 "The property 'VapourDiffusionPMQ' is "
78 "implemented on the 'phase' and 'component' scale only.");
79 }
80 }
#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::VapourDiffusionPMQ::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 41 of file VapourDiffusionPMQ.cpp.

45{
46 const double S_L = std::clamp(variable_array.liquid_saturation, 0.0, 1.0);
47
48 const double T = variable_array.temperature;
49
50 if (variable == Variable::temperature)
51 {
52 const double S_v = 1 - S_L;
53 const double D_vr = S_v;
54
57 exponent_ - 1.0) *
59 }
60
61 if (variable == Variable::liquid_saturation)
62 {
65 exponent_);
66 }
67
69 "VapourDiffusionPMQ::dValue is implemented for "
70 "derivatives with respect to temperature or saturation only.");
71}
constexpr double CelsiusZeroInKelvin
Zero degrees Celsius in Kelvin.

References base_diffusion_coefficient_, MaterialLib::PhysicalConstant::CelsiusZeroInKelvin, exponent_, MaterialPropertyLib::liquid_saturation, MaterialPropertyLib::VariableArray::liquid_saturation, OGS_FATAL, MaterialPropertyLib::temperature, and MaterialPropertyLib::VariableArray::temperature.

◆ value()

PropertyDataType MaterialPropertyLib::VapourDiffusionPMQ::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 VapourDiffusionPMQ.cpp.

27{
28 const double S_L = std::clamp(variable_array.liquid_saturation, 0.0, 1.0);
29
30 const double T = variable_array.temperature;
31
32 const double S_v = 1 - S_L;
33 const double D_vr = S_v;
34
37 exponent_) *
38 D_vr;
39}

References base_diffusion_coefficient_, MaterialLib::PhysicalConstant::CelsiusZeroInKelvin, exponent_, MaterialPropertyLib::VariableArray::liquid_saturation, and MaterialPropertyLib::VariableArray::temperature.

Member Data Documentation

◆ base_diffusion_coefficient_

double const MaterialPropertyLib::VapourDiffusionPMQ::base_diffusion_coefficient_
private

Definition at line 93 of file VapourDiffusionPMQ.h.

Referenced by dValue(), and value().

◆ exponent_

double const MaterialPropertyLib::VapourDiffusionPMQ::exponent_
private

Definition at line 94 of file VapourDiffusionPMQ.h.

Referenced by dValue(), and value().


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