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

Power form of relative permeability, usually used for water. More...

#include <RichardsRelPermPower.h>

Inheritance diagram for RichardsRelPermPower:
[legend]

Public Member Functions

 RichardsRelPermPower (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 _n
 exponent used in the power relationship More...
 

Detailed Description

Power form of relative permeability, usually used for water.

Definition at line 24 of file RichardsRelPermPower.h.

Constructor & Destructor Documentation

◆ RichardsRelPermPower()

RichardsRelPermPower::RichardsRelPermPower ( const InputParameters &  parameters)

Definition at line 38 of file RichardsRelPermPower.C.

39  : RichardsRelPerm(parameters), _simm(getParam<Real>("simm")), _n(getParam<Real>("n"))
40 {
41 }
RichardsRelPerm(const InputParameters &parameters)
Real _n
exponent used in the power relationship
Real _simm
immobile saturation

Member Function Documentation

◆ d2relperm()

Real RichardsRelPermPower::d2relperm ( Real  seff) const
virtual

second derivative of relative permeability wrt effective saturation

Parameters
seffeffective sasturation

Implements RichardsRelPerm.

Definition at line 83 of file RichardsRelPermPower.C.

84 {
85  if (seff >= 1.0)
86  return 0.0;
87 
88  if (seff <= _simm)
89  return 0.0;
90 
91  Real s_internal = (seff - _simm) / (1.0 - _simm);
92  Real krelpp = (_n + 1) * _n * (_n - 1) * std::pow(s_internal, _n - 2) -
93  _n * (_n + 1) * _n * std::pow(s_internal, _n - 1);
94  return krelpp / std::pow(1.0 - _simm, 2);
95 }
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real _n
exponent used in the power relationship
Real _simm
immobile saturation

◆ drelperm()

Real RichardsRelPermPower::drelperm ( Real  seff) const
virtual

derivative of relative permeability wrt effective saturation

Parameters
seffeffective sasturation

Implements RichardsRelPerm.

Definition at line 68 of file RichardsRelPermPower.C.

69 {
70  if (seff >= 1.0)
71  return 0.0;
72 
73  if (seff <= _simm)
74  return 0.0;
75 
76  Real s_internal = (seff - _simm) / (1.0 - _simm);
77  Real krelp =
78  (_n + 1) * _n * std::pow(s_internal, _n - 1) - _n * (_n + 1) * std::pow(s_internal, _n);
79  return krelp / (1.0 - _simm);
80 }
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real _n
exponent used in the power relationship
Real _simm
immobile saturation

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

relative permeability as a function of effective saturation

Parameters
seffeffective sasturation

Implements RichardsRelPerm.

Definition at line 44 of file RichardsRelPermPower.C.

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 = (_n + 1) * std::pow(s_internal, _n) - _n * std::pow(s_internal, _n + 1);
54 
55  // bound, just in case
56  if (krel < 0)
57  {
58  krel = 0;
59  }
60  if (krel > 1)
61  {
62  krel = 1;
63  }
64  return krel;
65 }
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real _n
exponent used in the power relationship
Real _simm
immobile saturation

Member Data Documentation

◆ _n

Real RichardsRelPermPower::_n
protected

exponent used in the power relationship

Definition at line 52 of file RichardsRelPermPower.h.

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

◆ _simm

Real RichardsRelPermPower::_simm
protected

immobile saturation

Definition at line 49 of file RichardsRelPermPower.h.

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


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