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 26 of file RichardsRelPermMonomial.h.

Constructor & Destructor Documentation

◆ RichardsRelPermMonomial()

RichardsRelPermMonomial::RichardsRelPermMonomial ( const InputParameters &  parameters)

Definition at line 37 of file RichardsRelPermMonomial.C.

38  : RichardsRelPerm(parameters),
39  _simm(getParam<Real>("simm")),
40  _n(getParam<Real>("n")),
41  _zero_to_the_zero(getParam<Real>("zero_to_the_zero"))
42 {
43 }
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

◆ d2relperm()

Real RichardsRelPermMonomial::d2relperm ( Real  seff) const
virtual

Second derivative of elative permeability wrt seff.

Parameters
seffeffective saturation

Implements RichardsRelPerm.

Definition at line 90 of file RichardsRelPermMonomial.C.

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

◆ drelperm()

Real RichardsRelPermMonomial::drelperm ( Real  seff) const
virtual

Derivative of elative permeability wrt seff.

Parameters
seffeffective saturation

Implements RichardsRelPerm.

Definition at line 73 of file RichardsRelPermMonomial.C.

74 {
75  if (seff >= 1.0)
76  return 0.0;
77 
78  if (seff <= _simm)
79  return 0.0;
80 
81  if (_n == 0)
82  return 0.0;
83 
84  Real s_internal = (seff - _simm) / (1.0 - _simm);
85  Real krelp = _n * std::pow(s_internal, _n - 1);
86  return krelp / (1.0 - _simm);
87 }
Real _n
exponent, must be >= 0
Real _simm
immobile saturation
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)

◆ 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 RichardsRelPermMonomial::relperm ( Real  seff) const
virtual

Relative permeability.

Parameters
seffeffective saturation

Implements RichardsRelPerm.

Definition at line 46 of file RichardsRelPermMonomial.C.

47 {
48  if (seff >= 1.0)
49  return 1.0;
50 
51  if (_n == 0 && seff <= _simm)
52  return _zero_to_the_zero;
53 
54  if (seff <= _simm)
55  return 0.0;
56 
57  Real s_internal = (seff - _simm) / (1.0 - _simm);
58  Real krel = std::pow(s_internal, _n);
59 
60  // bound, just in case
61  if (krel < 0)
62  {
63  krel = 0;
64  }
65  if (krel > 1)
66  {
67  krel = 1;
68  }
69  return krel;
70 }
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

◆ _n

Real RichardsRelPermMonomial::_n
protected

exponent, must be >= 0

Definition at line 54 of file RichardsRelPermMonomial.h.

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

◆ _simm

Real RichardsRelPermMonomial::_simm
protected

immobile saturation

Definition at line 51 of file RichardsRelPermMonomial.h.

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

◆ _zero_to_the_zero

Real RichardsRelPermMonomial::_zero_to_the_zero
protected

0^0, which is used if _n=0

Definition at line 57 of file RichardsRelPermMonomial.h.

Referenced by relperm().


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