www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PorousFlowRelativePermeabilityVG Class Reference

Material to calculate van Genuchten-type relative permeability of an arbitrary phase given the saturation and exponent of that phase. More...

#include <PorousFlowRelativePermeabilityVG.h>

Inheritance diagram for PorousFlowRelativePermeabilityVG:
[legend]

Public Member Functions

 PorousFlowRelativePermeabilityVG (const InputParameters &parameters)
 

Protected Member Functions

virtual Real relativePermeability (Real seff) const override
 Relative permeability equation (must be overriden in derived class) More...
 
virtual Real dRelativePermeability (Real seff) const override
 Derivative of relative permeability with respect to effective saturation. More...
 
virtual void computeQpProperties () override
 
virtual Real effectiveSaturation (Real saturation) const
 Effective saturation of fluid phase. More...
 

Protected Attributes

const Real _m
 van Genuchten exponent m for the specified phase More...
 
const bool _wetting
 Whether to use the wetting or non-wetting van Genuchten expression. More...
 
const Real _cut
 Start of cubic smoothing. More...
 
const Real _cub0
 Parameter of the cubic. More...
 
const Real _cub1
 Parameter of the cubic. More...
 
const Real _cub2
 Parameter of the cubic. More...
 
const Real _cub3
 Parameter of the cubic. More...
 
const Real _scaling
 Relative permeability is multiplied by this quantity. More...
 
const MaterialProperty< std::vector< Real > > & _saturation
 Saturation material property. More...
 
MaterialProperty< Real > & _relative_permeability
 Relative permeability material property. More...
 
MaterialProperty< Real > & _drelative_permeability_ds
 Derivative of relative permeability wrt phase saturation. More...
 
const Real _s_res
 Residual saturation of specified phase. More...
 
const Real _sum_s_res
 Sum of residual saturations over all phases. More...
 
const Real _dseff_ds
 Derivative of effective saturation with respect to saturation. More...
 
const unsigned int _phase_num
 Phase number of fluid. More...
 
const std::string _phase
 Stringified fluid phase number. More...
 

Detailed Description

Material to calculate van Genuchten-type relative permeability of an arbitrary phase given the saturation and exponent of that phase.

From van Genuchten, M. Th., A closed for equation for predicting the hydraulic conductivity of unsaturated soils, Soil Sci. Soc., 44, 892-898 (1980)

Optionally this relative permeability may be smoothed with a cubic near seff=1 The relative permeability is a cubic for seff>_cut. The cubic is chosen so that the derivative is zero for seff=1, and that the derivative and value matches the van Genuchten expression for seff=_cut.

Definition at line 32 of file PorousFlowRelativePermeabilityVG.h.

Constructor & Destructor Documentation

◆ PorousFlowRelativePermeabilityVG()

PorousFlowRelativePermeabilityVG::PorousFlowRelativePermeabilityVG ( const InputParameters &  parameters)

Definition at line 40 of file PorousFlowRelativePermeabilityVG.C.

43  _m(getParam<Real>("m")),
44  _wetting(getParam<bool>("wetting")),
45  _cut(getParam<Real>("seff_turnover")),
50  _cub2(_cut < 1.0
51  ? (getParam<bool>("zero_derivative")
52  ? 3.0 * (1.0 - _cub0 - _cub1 * (1.0 - _cut)) / Utility::pow<2>(1.0 - _cut) +
53  _cub1 / (1.0 - _cut)
56  : 0.0),
57  _cub3(_cut < 1.0
58  ? (getParam<bool>("zero_derivative")
59  ? -2.0 * (1.0 - _cub0 - _cub1 * (1.0 - _cut)) / Utility::pow<3>(1.0 - _cut) -
60  _cub1 / Utility::pow<2>(1.0 - _cut)
61  : (1.0 - _cub0 - _cub1 * (1.0 - _cut) - _cub2 * Utility::pow<2>(1.0 - _cut)) /
62  Utility::pow<3>(1.0 - _cut))
63  : 0.0)
64 {
65 }

Member Function Documentation

◆ computeQpProperties()

void PorousFlowRelativePermeabilityBase::computeQpProperties ( )
overrideprotectedvirtualinherited

Definition at line 59 of file PorousFlowRelativePermeabilityBase.C.

60 {
61  // Effective saturation
62  Real seff = effectiveSaturation(_saturation[_qp][_phase_num]);
63  Real relperm, drelperm;
64 
65  if (seff < 0.0)
66  {
67  // Relative permeability is 0 for saturation less than residual
68  relperm = 0.0;
69  drelperm = 0.0;
70  }
71  else if (seff >= 0.0 && seff <= 1)
72  {
73  relperm = relativePermeability(seff);
74  drelperm = dRelativePermeability(seff);
75  }
76  else // seff > 1
77  {
78  // Relative permeability is 1 when fully saturated
79  relperm = 1.0;
80  drelperm = 0.0;
81  }
82 
83  _relative_permeability[_qp] = relperm * _scaling;
84  _drelative_permeability_ds[_qp] = drelperm * _dseff_ds * _scaling;
85 }

◆ dRelativePermeability()

Real PorousFlowRelativePermeabilityVG::dRelativePermeability ( Real  seff) const
overrideprotectedvirtual

Derivative of relative permeability with respect to effective saturation.

Parameters
seffeffective saturation
Returns
derivative of relative permeability wrt effective saturation

Implements PorousFlowRelativePermeabilityBase.

Definition at line 83 of file PorousFlowRelativePermeabilityVG.C.

84 {
85  if (seff < _cut)
86  {
87  if (_wetting)
89  else
91  }
92 
93  return _cub1 + 2.0 * _cub2 * (seff - _cut) + 3.0 * _cub3 * Utility::pow<2>(seff - _cut);
94 }

◆ effectiveSaturation()

Real PorousFlowRelativePermeabilityBase::effectiveSaturation ( Real  saturation) const
protectedvirtualinherited

Effective saturation of fluid phase.

Parameters
saturationtrue saturation
Returns
effective saturation

Definition at line 88 of file PorousFlowRelativePermeabilityBase.C.

89 {
90  return (saturation - _s_res) / (1.0 - _sum_s_res);
91 }

Referenced by PorousFlowRelativePermeabilityBase::computeQpProperties().

◆ relativePermeability()

Real PorousFlowRelativePermeabilityVG::relativePermeability ( Real  seff) const
overrideprotectedvirtual

Relative permeability equation (must be overriden in derived class)

Parameters
seffeffective saturation
Returns
relative permeability

Implements PorousFlowRelativePermeabilityBase.

Definition at line 68 of file PorousFlowRelativePermeabilityVG.C.

69 {
70  if (seff < _cut)
71  {
72  if (_wetting)
74  else
76  }
77 
78  return _cub0 + _cub1 * (seff - _cut) + _cub2 * Utility::pow<2>(seff - _cut) +
79  _cub3 * Utility::pow<3>(seff - _cut);
80 }

Member Data Documentation

◆ _cub0

const Real PorousFlowRelativePermeabilityVG::_cub0
protected

Parameter of the cubic.

Definition at line 51 of file PorousFlowRelativePermeabilityVG.h.

Referenced by relativePermeability().

◆ _cub1

const Real PorousFlowRelativePermeabilityVG::_cub1
protected

Parameter of the cubic.

Definition at line 53 of file PorousFlowRelativePermeabilityVG.h.

Referenced by dRelativePermeability(), and relativePermeability().

◆ _cub2

const Real PorousFlowRelativePermeabilityVG::_cub2
protected

Parameter of the cubic.

Definition at line 55 of file PorousFlowRelativePermeabilityVG.h.

Referenced by dRelativePermeability(), and relativePermeability().

◆ _cub3

const Real PorousFlowRelativePermeabilityVG::_cub3
protected

Parameter of the cubic.

Definition at line 57 of file PorousFlowRelativePermeabilityVG.h.

Referenced by dRelativePermeability(), and relativePermeability().

◆ _cut

const Real PorousFlowRelativePermeabilityVG::_cut
protected

Start of cubic smoothing.

Definition at line 48 of file PorousFlowRelativePermeabilityVG.h.

Referenced by dRelativePermeability(), and relativePermeability().

◆ _drelative_permeability_ds

MaterialProperty<Real>& PorousFlowRelativePermeabilityBase::_drelative_permeability_ds
protectedinherited

Derivative of relative permeability wrt phase saturation.

Definition at line 63 of file PorousFlowRelativePermeabilityBase.h.

Referenced by PorousFlowRelativePermeabilityBase::computeQpProperties().

◆ _dseff_ds

const Real PorousFlowRelativePermeabilityBase::_dseff_ds
protectedinherited

Derivative of effective saturation with respect to saturation.

Definition at line 72 of file PorousFlowRelativePermeabilityBase.h.

Referenced by PorousFlowRelativePermeabilityBase::computeQpProperties().

◆ _m

const Real PorousFlowRelativePermeabilityVG::_m
protected

van Genuchten exponent m for the specified phase

Definition at line 42 of file PorousFlowRelativePermeabilityVG.h.

Referenced by dRelativePermeability(), and relativePermeability().

◆ _phase

const std::string PorousFlowMaterialBase::_phase
protectedinherited

Stringified fluid phase number.

Definition at line 37 of file PorousFlowMaterialBase.h.

◆ _phase_num

const unsigned int PorousFlowMaterialBase::_phase_num
protectedinherited

◆ _relative_permeability

MaterialProperty<Real>& PorousFlowRelativePermeabilityBase::_relative_permeability
protectedinherited

Relative permeability material property.

Definition at line 60 of file PorousFlowRelativePermeabilityBase.h.

Referenced by PorousFlowRelativePermeabilityBase::computeQpProperties().

◆ _s_res

const Real PorousFlowRelativePermeabilityBase::_s_res
protectedinherited

◆ _saturation

const MaterialProperty<std::vector<Real> >& PorousFlowRelativePermeabilityBase::_saturation
protectedinherited

Saturation material property.

Definition at line 57 of file PorousFlowRelativePermeabilityBase.h.

Referenced by PorousFlowRelativePermeabilityBase::computeQpProperties().

◆ _scaling

const Real PorousFlowRelativePermeabilityBase::_scaling
protectedinherited

Relative permeability is multiplied by this quantity.

Definition at line 54 of file PorousFlowRelativePermeabilityBase.h.

Referenced by PorousFlowRelativePermeabilityBase::computeQpProperties().

◆ _sum_s_res

const Real PorousFlowRelativePermeabilityBase::_sum_s_res
protectedinherited

◆ _wetting

const bool PorousFlowRelativePermeabilityVG::_wetting
protected

Whether to use the wetting or non-wetting van Genuchten expression.

Definition at line 45 of file PorousFlowRelativePermeabilityVG.h.

Referenced by dRelativePermeability(), and relativePermeability().


The documentation for this class was generated from the following files:
PorousFlowVanGenuchten::relativePermeability
Real relativePermeability(Real seff, Real m)
Relative permeability as a function of effective saturation.
Definition: PorousFlowVanGenuchten.C:114
PorousFlowRelativePermeabilityBase::relativePermeability
virtual Real relativePermeability(Real seff) const =0
Relative permeability equation (must be overriden in derived class)
PorousFlowRelativePermeabilityBase::_s_res
const Real _s_res
Residual saturation of specified phase.
Definition: PorousFlowRelativePermeabilityBase.h:66
PorousFlowRelativePermeabilityVG::_cub2
const Real _cub2
Parameter of the cubic.
Definition: PorousFlowRelativePermeabilityVG.h:55
PorousFlowRelativePermeabilityVG::_wetting
const bool _wetting
Whether to use the wetting or non-wetting van Genuchten expression.
Definition: PorousFlowRelativePermeabilityVG.h:45
PorousFlowRelativePermeabilityBase::_drelative_permeability_ds
MaterialProperty< Real > & _drelative_permeability_ds
Derivative of relative permeability wrt phase saturation.
Definition: PorousFlowRelativePermeabilityBase.h:63
PorousFlowRelativePermeabilityBase::dRelativePermeability
virtual Real dRelativePermeability(Real seff) const =0
Derivative of relative permeability with respect to effective saturation.
PorousFlowRelativePermeabilityBase::_sum_s_res
const Real _sum_s_res
Sum of residual saturations over all phases.
Definition: PorousFlowRelativePermeabilityBase.h:69
PorousFlowVanGenuchten::relativePermeabilityNW
Real relativePermeabilityNW(Real seff, Real m)
Relative permeability for a non-wetting phase as a function of effective saturation.
Definition: PorousFlowVanGenuchten.C:161
PorousFlowVanGenuchten::d2RelativePermeabilityNW
Real d2RelativePermeabilityNW(Real seff, Real m)
Second derivative of relative permeability for a non-wetting phase with respect to effective saturati...
Definition: PorousFlowVanGenuchten.C:190
PorousFlowRelativePermeabilityBase::_dseff_ds
const Real _dseff_ds
Derivative of effective saturation with respect to saturation.
Definition: PorousFlowRelativePermeabilityBase.h:72
PorousFlowRelativePermeabilityBase::PorousFlowRelativePermeabilityBase
PorousFlowRelativePermeabilityBase(const InputParameters &parameters)
Definition: PorousFlowRelativePermeabilityBase.C:34
PorousFlowRelativePermeabilityVG::_m
const Real _m
van Genuchten exponent m for the specified phase
Definition: PorousFlowRelativePermeabilityVG.h:42
PorousFlowRelativePermeabilityBase::_saturation
const MaterialProperty< std::vector< Real > > & _saturation
Saturation material property.
Definition: PorousFlowRelativePermeabilityBase.h:57
PorousFlowRelativePermeabilityBase::_scaling
const Real _scaling
Relative permeability is multiplied by this quantity.
Definition: PorousFlowRelativePermeabilityBase.h:54
PorousFlowRelativePermeabilityVG::_cub0
const Real _cub0
Parameter of the cubic.
Definition: PorousFlowRelativePermeabilityVG.h:51
PorousFlowRelativePermeabilityVG::_cub1
const Real _cub1
Parameter of the cubic.
Definition: PorousFlowRelativePermeabilityVG.h:53
PorousFlowRelativePermeabilityBase::_relative_permeability
MaterialProperty< Real > & _relative_permeability
Relative permeability material property.
Definition: PorousFlowRelativePermeabilityBase.h:60
PorousFlowVanGenuchten::dRelativePermeability
Real dRelativePermeability(Real seff, Real m)
Derivative of relative permeability with respect to effective saturation.
Definition: PorousFlowVanGenuchten.C:128
PorousFlowVanGenuchten::d2RelativePermeability
Real d2RelativePermeability(Real seff, Real m)
Second derivative of relative permeability with respect to effective saturation.
Definition: PorousFlowVanGenuchten.C:143
PorousFlowRelativePermeabilityVG::_cut
const Real _cut
Start of cubic smoothing.
Definition: PorousFlowRelativePermeabilityVG.h:48
PorousFlowMaterialBase::_phase_num
const unsigned int _phase_num
Phase number of fluid.
Definition: PorousFlowMaterialBase.h:34
PorousFlowRelativePermeabilityBase::effectiveSaturation
virtual Real effectiveSaturation(Real saturation) const
Effective saturation of fluid phase.
Definition: PorousFlowRelativePermeabilityBase.C:88
PorousFlowRelativePermeabilityVG::_cub3
const Real _cub3
Parameter of the cubic.
Definition: PorousFlowRelativePermeabilityVG.h:57
PorousFlowVanGenuchten::dRelativePermeabilityNW
Real dRelativePermeabilityNW(Real seff, Real m)
Derivative of relative permeability for a non-wetting phase with respect to effective saturation.
Definition: PorousFlowVanGenuchten.C:175