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

Constructor & Destructor Documentation

RichardsRelPermPower::RichardsRelPermPower ( const InputParameters &  parameters)

Definition at line 34 of file RichardsRelPermPower.C.

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

Member Function Documentation

Real RichardsRelPermPower::d2relperm ( Real  seff) const
virtual

second derivative of relative permeability wrt effective saturation

Parameters
seffeffective sasturation

Implements RichardsRelPerm.

Definition at line 79 of file RichardsRelPermPower.C.

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

derivative of relative permeability wrt effective saturation

Parameters
seffeffective sasturation

Implements RichardsRelPerm.

Definition at line 64 of file RichardsRelPermPower.C.

65 {
66  if (seff >= 1.0)
67  return 0.0;
68 
69  if (seff <= _simm)
70  return 0.0;
71 
72  Real s_internal = (seff - _simm) / (1.0 - _simm);
73  Real krelp =
74  (_n + 1) * _n * std::pow(s_internal, _n - 1) - _n * (_n + 1) * std::pow(s_internal, _n);
75  return krelp / (1.0 - _simm);
76 }
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real _n
exponent used in the power relationship
Real _simm
immobile saturation
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 RichardsRelPermPower::relperm ( Real  seff) const
virtual

relative permeability as a function of effective saturation

Parameters
seffeffective sasturation

Implements RichardsRelPerm.

Definition at line 40 of file RichardsRelPermPower.C.

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

Member Data Documentation

Real RichardsRelPermPower::_n
protected

exponent used in the power relationship

Definition at line 50 of file RichardsRelPermPower.h.

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

Real RichardsRelPermPower::_simm
protected

immobile saturation

Definition at line 47 of file RichardsRelPermPower.h.

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


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