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

Van-Genuchten form of relative permeability as a function of effective saturation. More...

#include <RichardsRelPermVG.h>

Inheritance diagram for RichardsRelPermVG:
[legend]

Public Member Functions

 RichardsRelPermVG (const InputParameters &parameters)
 
Real relperm (Real seff) const
 relative permeability as a function of effective saturation More...
 
Real drelperm (Real seff) const
 derivative of relative permeability wrt effective saturation More...
 
Real d2relperm (Real seff) const
 second derivative of relative permeability wrt effective saturation More...
 
void initialize ()
 
void execute ()
 
void finalize ()
 

Protected Attributes

Real _simm
 immobile saturation More...
 
Real _m
 van Genuchten m parameter More...
 

Detailed Description

Van-Genuchten form of relative permeability as a function of effective saturation.

Definition at line 24 of file RichardsRelPermVG.h.

Constructor & Destructor Documentation

◆ RichardsRelPermVG()

RichardsRelPermVG::RichardsRelPermVG ( const InputParameters &  parameters)

Definition at line 38 of file RichardsRelPermVG.C.

39  : RichardsRelPerm(parameters), _simm(getParam<Real>("simm")), _m(getParam<Real>("m"))
40 {
41 }
Real _simm
immobile saturation
RichardsRelPerm(const InputParameters &parameters)
Real _m
van Genuchten m parameter

Member Function Documentation

◆ d2relperm()

Real RichardsRelPermVG::d2relperm ( Real  seff) const
virtual

second derivative of relative permeability wrt effective saturation

Parameters
seffeffective saturation

Implements RichardsRelPerm.

Reimplemented in RichardsRelPermVG1.

Definition at line 86 of file RichardsRelPermVG.C.

Referenced by RichardsRelPermVG1::d2relperm(), and RichardsRelPermVG1::RichardsRelPermVG1().

87 {
88  if (seff >= 1.0)
89  return 0.0;
90 
91  if (seff <= _simm)
92  return 0.0;
93 
94  Real s_internal = (seff - _simm) / (1.0 - _simm);
95  Real tmp = 1.0 - std::pow(s_internal, 1.0 / _m);
96  Real tmpp = -1.0 / _m * std::pow(s_internal, 1.0 / _m - 1.0);
97  Real tmppp = -1.0 / _m * (1.0 / _m - 1.0) * std::pow(s_internal, 1.0 / _m - 2);
98  Real tmp2 = 1.0 - std::pow(tmp, _m);
99  Real tmp2p = -_m * std::pow(tmp, _m - 1.0) * tmpp;
100  Real tmp2pp = -_m * (_m - 1.0) * std::pow(tmp, _m - 2.0) * tmpp * tmpp -
101  _m * std::pow(tmp, _m - 1.0) * tmppp;
102  // Real krel = std::sqrt(s_internal)*std::pow(tmp2, 2);
103  // Real krelp = 0.5 * std::pow(s_internal, -0.5)*std::pow(tmp2, 2) +
104  // 2*std::sqrt(s_internal)*tmp2*tmp2p;
105  Real krelpp = -0.25 * std::pow(s_internal, -1.5) * tmp2 * tmp2 +
106  2.0 * 0.5 * std::pow(s_internal, -0.5) * 2.0 * tmp2 * tmp2p +
107  2.0 * std::sqrt(s_internal) * (tmp2p * tmp2p + tmp2 * tmp2pp);
108 
109  return krelpp / Utility::pow<2>(1.0 - _simm);
110 }
Real _simm
immobile saturation
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real _m
van Genuchten m parameter

◆ drelperm()

Real RichardsRelPermVG::drelperm ( Real  seff) const
virtual

derivative of relative permeability wrt effective saturation

Parameters
seffeffective saturation

Implements RichardsRelPerm.

Reimplemented in RichardsRelPermVG1.

Definition at line 66 of file RichardsRelPermVG.C.

Referenced by RichardsRelPermVG1::drelperm(), and RichardsRelPermVG1::RichardsRelPermVG1().

67 {
68  if (seff >= 1.0)
69  return 0.0;
70 
71  if (seff <= _simm)
72  return 0.0;
73 
74  Real s_internal = (seff - _simm) / (1.0 - _simm);
75  Real tmp = 1.0 - std::pow(s_internal, 1.0 / _m);
76  Real tmpp = -1.0 / _m * std::pow(s_internal, 1.0 / _m - 1.0);
77  Real tmp2 = 1.0 - std::pow(tmp, _m);
78  Real tmp2p = -_m * std::pow(tmp, _m - 1.0) * tmpp;
79  // Real krel = std::sqrt(s_internal)*std::pow(tmp2, 2);
80  Real krelp =
81  0.5 * std::pow(s_internal, -0.5) * tmp2 * tmp2 + 2.0 * std::sqrt(s_internal) * tmp2 * tmp2p;
82  return krelp / (1.0 - _simm);
83 }
Real _simm
immobile saturation
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real _m
van Genuchten m parameter

◆ execute()

void RichardsRelPerm::execute ( )
inherited

Definition at line 34 of file RichardsRelPerm.C.

35 {
36 }

◆ finalize()

void RichardsRelPerm::finalize ( )
inherited

Definition at line 39 of file RichardsRelPerm.C.

40 {
41 }

◆ initialize()

void RichardsRelPerm::initialize ( )
inherited

Definition at line 29 of file RichardsRelPerm.C.

30 {
31 }

◆ relperm()

Real RichardsRelPermVG::relperm ( Real  seff) const
virtual

relative permeability as a function of effective saturation

Parameters
seffeffective saturation

Implements RichardsRelPerm.

Reimplemented in RichardsRelPermVG1.

Definition at line 44 of file RichardsRelPermVG.C.

Referenced by RichardsRelPermVG1::relperm(), and RichardsRelPermVG1::RichardsRelPermVG1().

45 {
46  if (seff >= 1.0)
47  return 1.0;
48 
49  if (seff <= _simm)
50  return 0.0;
51 
52  Real s_internal = (seff - _simm) / (1.0 - _simm);
53  Real krel = std::sqrt(s_internal) *
54  Utility::pow<2>(1.0 - std::pow(1.0 - std::pow(s_internal, 1.0 / _m), _m));
55 
56  // bound, just in case
57  if (krel < 0.0)
58  krel = 0.0;
59  if (krel > 1.0)
60  krel = 1.0;
61 
62  return krel;
63 }
Real _simm
immobile saturation
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real _m
van Genuchten m parameter

Member Data Documentation

◆ _m

Real RichardsRelPermVG::_m
protected

van Genuchten m parameter

Definition at line 52 of file RichardsRelPermVG.h.

Referenced by d2relperm(), drelperm(), and relperm().

◆ _simm

Real RichardsRelPermVG::_simm
protected

immobile saturation

Definition at line 49 of file RichardsRelPermVG.h.

Referenced by d2relperm(), drelperm(), and relperm().


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