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

Monomial form of relative permeability relperm = Seff^n for 0<Seff<=1, where S = (S - simm)/(1 - simm) relperm = 1 for Seff>1 relperm = 0 for Seff<0, except if n=0 then relperm = zero_to_the_zero. More...

#include <RichardsRelPermMonomial.h>

Inheritance diagram for RichardsRelPermMonomial:
[legend]

Public Member Functions

 RichardsRelPermMonomial (const InputParameters &parameters)
 
Real relperm (Real seff) const
 Relative permeability. More...
 
Real drelperm (Real seff) const
 Derivative of elative permeability wrt seff. More...
 
Real d2relperm (Real seff) const
 Second derivative of elative permeability wrt seff. More...
 
void initialize ()
 
void execute ()
 
void finalize ()
 

Protected Attributes

Real _simm
 immobile saturation More...
 
Real _n
 exponent, must be >= 0 More...
 
Real _zero_to_the_zero
 0^0, which is used if _n=0 More...
 

Detailed Description

Monomial form of relative permeability relperm = Seff^n for 0<Seff<=1, where S = (S - simm)/(1 - simm) relperm = 1 for Seff>1 relperm = 0 for Seff<0, except if n=0 then relperm = zero_to_the_zero.

Definition at line 24 of file RichardsRelPermMonomial.h.

Constructor & Destructor Documentation

RichardsRelPermMonomial::RichardsRelPermMonomial ( const InputParameters &  parameters)

Definition at line 33 of file RichardsRelPermMonomial.C.

34  : RichardsRelPerm(parameters),
35  _simm(getParam<Real>("simm")),
36  _n(getParam<Real>("n")),
37  _zero_to_the_zero(getParam<Real>("zero_to_the_zero"))
38 {
39 }
Real _n
exponent, must be >= 0
Real _simm
immobile saturation
Real _zero_to_the_zero
0^0, which is used if _n=0
RichardsRelPerm(const InputParameters &parameters)

Member Function Documentation

Real RichardsRelPermMonomial::d2relperm ( Real  seff) const
virtual

Second derivative of elative permeability wrt seff.

Parameters
seffeffective saturation

Implements RichardsRelPerm.

Definition at line 86 of file RichardsRelPermMonomial.C.

87 {
88  if (seff >= 1.0)
89  return 0.0;
90 
91  if (seff <= _simm)
92  return 0.0;
93 
94  if (_n == 0)
95  return 0.0;
96 
97  Real s_internal = (seff - _simm) / (1.0 - _simm);
98  Real krelpp = _n * (_n - 1) * std::pow(s_internal, _n - 2);
99  return krelpp / std::pow(1.0 - _simm, 2);
100 }
Real _n
exponent, must be >= 0
Real _simm
immobile saturation
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real RichardsRelPermMonomial::drelperm ( Real  seff) const
virtual

Derivative of elative permeability wrt seff.

Parameters
seffeffective saturation

Implements RichardsRelPerm.

Definition at line 69 of file RichardsRelPermMonomial.C.

70 {
71  if (seff >= 1.0)
72  return 0.0;
73 
74  if (seff <= _simm)
75  return 0.0;
76 
77  if (_n == 0)
78  return 0.0;
79 
80  Real s_internal = (seff - _simm) / (1.0 - _simm);
81  Real krelp = _n * std::pow(s_internal, _n - 1);
82  return krelp / (1.0 - _simm);
83 }
Real _n
exponent, must be >= 0
Real _simm
immobile saturation
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
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 RichardsRelPermMonomial::relperm ( Real  seff) const
virtual

Relative permeability.

Parameters
seffeffective saturation

Implements RichardsRelPerm.

Definition at line 42 of file RichardsRelPermMonomial.C.

43 {
44  if (seff >= 1.0)
45  return 1.0;
46 
47  if (_n == 0 && seff <= _simm)
48  return _zero_to_the_zero;
49 
50  if (seff <= _simm)
51  return 0.0;
52 
53  Real s_internal = (seff - _simm) / (1.0 - _simm);
54  Real krel = std::pow(s_internal, _n);
55 
56  // bound, just in case
57  if (krel < 0)
58  {
59  krel = 0;
60  }
61  if (krel > 1)
62  {
63  krel = 1;
64  }
65  return krel;
66 }
Real _n
exponent, must be >= 0
Real _simm
immobile saturation
Real _zero_to_the_zero
0^0, which is used if _n=0
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

Member Data Documentation

Real RichardsRelPermMonomial::_n
protected

exponent, must be >= 0

Definition at line 52 of file RichardsRelPermMonomial.h.

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

Real RichardsRelPermMonomial::_simm
protected

immobile saturation

Definition at line 49 of file RichardsRelPermMonomial.h.

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

Real RichardsRelPermMonomial::_zero_to_the_zero
protected

0^0, which is used if _n=0

Definition at line 55 of file RichardsRelPermMonomial.h.

Referenced by relperm().


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