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 22 of file RichardsRelPermVG.h.

Constructor & Destructor Documentation

RichardsRelPermVG::RichardsRelPermVG ( const InputParameters &  parameters)

Definition at line 34 of file RichardsRelPermVG.C.

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

Member Function Documentation

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 82 of file RichardsRelPermVG.C.

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

83 {
84  if (seff >= 1.0)
85  return 0.0;
86 
87  if (seff <= _simm)
88  return 0.0;
89 
90  Real s_internal = (seff - _simm) / (1.0 - _simm);
91  Real tmp = 1.0 - std::pow(s_internal, 1.0 / _m);
92  Real tmpp = -1.0 / _m * std::pow(s_internal, 1.0 / _m - 1.0);
93  Real tmppp = -1.0 / _m * (1.0 / _m - 1.0) * std::pow(s_internal, 1.0 / _m - 2);
94  Real tmp2 = 1.0 - std::pow(tmp, _m);
95  Real tmp2p = -_m * std::pow(tmp, _m - 1.0) * tmpp;
96  Real tmp2pp = -_m * (_m - 1.0) * std::pow(tmp, _m - 2.0) * tmpp * tmpp -
97  _m * std::pow(tmp, _m - 1.0) * tmppp;
98  // Real krel = std::sqrt(s_internal)*std::pow(tmp2, 2);
99  // Real krelp = 0.5 * std::pow(s_internal, -0.5)*std::pow(tmp2, 2) +
100  // 2*std::sqrt(s_internal)*tmp2*tmp2p;
101  Real krelpp = -0.25 * std::pow(s_internal, -1.5) * tmp2 * tmp2 +
102  2.0 * 0.5 * std::pow(s_internal, -0.5) * 2.0 * tmp2 * tmp2p +
103  2.0 * std::sqrt(s_internal) * (tmp2p * tmp2p + tmp2 * tmp2pp);
104 
105  return krelpp / Utility::pow<2>(1.0 - _simm);
106 }
Real _simm
immobile saturation
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real _m
van Genuchten m parameter
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 62 of file RichardsRelPermVG.C.

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

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

Definition at line 32 of file RichardsRelPerm.C.

33 {
34 }
void RichardsRelPerm::finalize ( )
inherited

Definition at line 37 of file RichardsRelPerm.C.

38 {
39 }
void RichardsRelPerm::initialize ( )
inherited

Definition at line 27 of file RichardsRelPerm.C.

28 {
29 }
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 40 of file RichardsRelPermVG.C.

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

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

Member Data Documentation

Real RichardsRelPermVG::_m
protected

van Genuchten m parameter

Definition at line 50 of file RichardsRelPermVG.h.

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

Real RichardsRelPermVG::_simm
protected

immobile saturation

Definition at line 47 of file RichardsRelPermVG.h.

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


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