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

PowerGas form of relative permeability Define s = seff/(1 - simm). More...

#include <Q2PRelPermPowerGas.h>

Inheritance diagram for Q2PRelPermPowerGas:
[legend]

Public Member Functions

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

Protected Attributes

Real _simm
 immobile saturation More...
 
Real _n
 exponent More...
 

Detailed Description

PowerGas form of relative permeability Define s = seff/(1 - simm).

Then relperm = 1 - (n+1)s^n + ns^(n+1) if s<simm, otherwise relperm=1 or 0 This is suitable for gas relative permeability as a function of water saturation in Q2P models

Definition at line 26 of file Q2PRelPermPowerGas.h.

Constructor & Destructor Documentation

◆ Q2PRelPermPowerGas()

Q2PRelPermPowerGas::Q2PRelPermPowerGas ( const InputParameters &  parameters)

Definition at line 38 of file Q2PRelPermPowerGas.C.

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

Member Function Documentation

◆ d2relperm()

Real Q2PRelPermPowerGas::d2relperm ( Real  seff) const
virtual

Second derivative of relative permeability wrt seff.

Parameters
seffeffective saturation

Implements RichardsRelPerm.

Definition at line 83 of file Q2PRelPermPowerGas.C.

84 {
85  if (seff >= 1.0 - _simm)
86  return 0.0;
87 
88  if (seff <= 0)
89  return 0.0;
90 
91  Real s_internal = seff / (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 _simm
immobile saturation

◆ drelperm()

Real Q2PRelPermPowerGas::drelperm ( Real  seff) const
virtual

Derivative of relative permeability wrt seff.

Parameters
seffeffective saturation

Implements RichardsRelPerm.

Definition at line 68 of file Q2PRelPermPowerGas.C.

69 {
70  if (seff >= 1.0 - _simm)
71  return 0.0;
72 
73  if (seff <= 0)
74  return 0.0;
75 
76  Real s_internal = seff / (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 _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 Q2PRelPermPowerGas::relperm ( Real  seff) const
virtual

Relative permeability.

Parameters
seffeffective saturation

Implements RichardsRelPerm.

Definition at line 44 of file Q2PRelPermPowerGas.C.

45 {
46  if (seff >= 1.0 - _simm)
47  return 0.0;
48 
49  if (seff <= 0)
50  return 1.0;
51 
52  Real s_internal = seff / (1.0 - _simm);
53  Real krel = 1 - (_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 _simm
immobile saturation

Member Data Documentation

◆ _n

Real Q2PRelPermPowerGas::_n
protected

exponent

Definition at line 54 of file Q2PRelPermPowerGas.h.

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

◆ _simm

Real Q2PRelPermPowerGas::_simm
protected

immobile saturation

Definition at line 51 of file Q2PRelPermPowerGas.h.

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


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