www.mooseframework.org
Functions
PorousFlowBrooksCorey Namespace Reference

Brooks-Corey effective saturation, capillary pressure and relative permeability functions. More...

Functions

Real effectiveSaturation (Real pc, Real pe, Real lambda)
 Effective saturation as a function of capillary pressure Note: seff = 1 for p >= 0. More...
 
Real dEffectiveSaturation (Real pc, Real pe, Real lambda)
 Derivative of effective saturation wrt porepressure. More...
 
Real d2EffectiveSaturation (Real pc, Real pe, Real lambda)
 Second derivative of effective saturation wrt porepressure. More...
 
Real capillaryPressure (Real seff, Real pe, Real lambda, Real pc_max)
 Capillary pressure as a function of effective saturation. More...
 
Real dCapillaryPressure (Real seff, Real pe, Real lambda, Real pc_max)
 Derivative of capillary pressure wrt effective saturation. More...
 
Real d2CapillaryPressure (Real seff, Real pe, Real lambda, Real pc_max)
 Second derivative of capillary pressure wrt effective saturation. More...
 
template<typename T >
relativePermeabilityW (const T &seff, Real lambda)
 Relative permeability of the wetting phase as a function of effective saturation. More...
 
Real dRelativePermeabilityW (Real seff, Real lambda)
 Derivative of relative permeability of the wetting phase wrt to effective saturation. More...
 
template<typename T >
relativePermeabilityNW (const T &seff, Real lambda)
 Relative permeability of the non-wetting phase as a function of effective saturation. More...
 
Real dRelativePermeabilityNW (Real seff, Real lambda)
 Derivative of relative permeability of the non-wetting phase wrt to effective saturation. More...
 

Detailed Description

Brooks-Corey effective saturation, capillary pressure and relative permeability functions.

Note: capillary pressure and relative permeability are functions of effective saturation. The derivatives are therefore given wrt effective saturation. These derivatives must be multiplied by the derivative of effective saturation wrt the true saturation in objects using these relations.

From Brooks, R. H. and A. T. Corey (1966), Properties of porous media affecting fluid flow, J. Irrig. Drain. Div., 92, 61-88

Function Documentation

◆ capillaryPressure()

Real PorousFlowBrooksCorey::capillaryPressure ( Real  seff,
Real  pe,
Real  lambda,
Real  pc_max 
)

Capillary pressure as a function of effective saturation.

Parameters
seffeffective saturation
pethreshold entry pressure
lambdaBrooks-Corey exponent
pc_maxmaximum capillary pressure (Pa)
Returns
capillary pressure (Pa)

Definition at line 42 of file PorousFlowBrooksCorey.C.

Referenced by PorousFlowCapillaryPressureBC::capillaryPressureCurve(), d2CapillaryPressure(), dCapillaryPressure(), and TEST().

43 {
44  if (seff >= 1.0)
45  return pe;
46  else if (seff <= 0.0)
47  return pc_max;
48  else
49  return std::min(pe * std::pow(seff, -1.0 / lambda), pc_max);
50 }
MooseUnits pow(const MooseUnits &, int)

◆ d2CapillaryPressure()

Real PorousFlowBrooksCorey::d2CapillaryPressure ( Real  seff,
Real  pe,
Real  lambda,
Real  pc_max 
)

Second derivative of capillary pressure wrt effective saturation.

Parameters
seffeffective saturation
pethreshold entry pressure
lambdaBrooks-Corey exponent
pc_maxmaximum capillary pressure (Pa)
Returns
second derivative of capillary pressure wrt effective saturation

Definition at line 68 of file PorousFlowBrooksCorey.C.

Referenced by PorousFlowCapillaryPressureBC::d2CapillaryPressureCurve(), and TEST().

69 {
70  if (seff <= 0.0 || seff > 1.0)
71  return 0.0;
72  else
73  {
74  // Return 0 if pc > pc_max
75  if (capillaryPressure(seff, pe, lambda, pc_max) >= pc_max)
76  return 0.0;
77  else
78  return (lambda + 1.0) * pe * std::pow(seff, -1.0 / lambda - 2.0) / lambda / lambda;
79  }
80 }
Real capillaryPressure(Real seff, Real pe, Real lambda, Real pc_max)
Capillary pressure as a function of effective saturation.
MooseUnits pow(const MooseUnits &, int)

◆ d2EffectiveSaturation()

Real PorousFlowBrooksCorey::d2EffectiveSaturation ( Real  pc,
Real  pe,
Real  lambda 
)

Second derivative of effective saturation wrt porepressure.

Parameters
pccapillary pressure
pethreshold entry pressure
lambdaBrooks-Corey exponent
Returns
second derivative of effective saturation wrt porepressure

Definition at line 33 of file PorousFlowBrooksCorey.C.

Referenced by PorousFlowCapillaryPressureBC::d2EffectiveSaturation(), and TEST().

34 {
35  if (pc < pe)
36  return 0.0;
37  else
38  return lambda * (lambda + 1.0) * std::pow(pc / pe, -lambda - 2.0) / pe / pe;
39 }
MooseUnits pow(const MooseUnits &, int)

◆ dCapillaryPressure()

Real PorousFlowBrooksCorey::dCapillaryPressure ( Real  seff,
Real  pe,
Real  lambda,
Real  pc_max 
)

Derivative of capillary pressure wrt effective saturation.

Parameters
seffeffective saturation
pethreshold entry pressure
lambdaBrooks-Corey exponent
pc_maxmaximum capillary pressure (Pa)
Returns
derivative of capillary pressure wrt effective saturation

Definition at line 53 of file PorousFlowBrooksCorey.C.

Referenced by PorousFlowCapillaryPressureBC::dCapillaryPressureCurve(), and TEST().

54 {
55  if (seff <= 0.0 || seff > 1.0)
56  return 0.0;
57  else
58  {
59  // Return 0 if pc > pc_max
60  if (capillaryPressure(seff, pe, lambda, pc_max) >= pc_max)
61  return 0.0;
62  else
63  return -pe * std::pow(seff, -1.0 / lambda - 1.0) / lambda;
64  }
65 }
Real capillaryPressure(Real seff, Real pe, Real lambda, Real pc_max)
Capillary pressure as a function of effective saturation.
MooseUnits pow(const MooseUnits &, int)

◆ dEffectiveSaturation()

Real PorousFlowBrooksCorey::dEffectiveSaturation ( Real  pc,
Real  pe,
Real  lambda 
)

Derivative of effective saturation wrt porepressure.

Parameters
pccapillary pressure
pethreshold entry pressure
lambdaBrooks-Corey exponent
Returns
derivative of effective saturation wrt porepressure

Definition at line 24 of file PorousFlowBrooksCorey.C.

Referenced by PorousFlowCapillaryPressureBC::dEffectiveSaturation(), and TEST().

25 {
26  if (pc < pe)
27  return 0.0;
28  else
29  return -lambda * std::pow(pc / pe, -lambda - 1.0) / pe;
30 }
MooseUnits pow(const MooseUnits &, int)

◆ dRelativePermeabilityNW()

Real PorousFlowBrooksCorey::dRelativePermeabilityNW ( Real  seff,
Real  lambda 
)

Derivative of relative permeability of the non-wetting phase wrt to effective saturation.

Parameters
seffeffective saturation
lambdaBrooks-Corey exponent
Returns
derivative of relative permeability wrt effective saturation

Definition at line 93 of file PorousFlowBrooksCorey.C.

Referenced by PorousFlowRelativePermeabilityBCTempl< is_ad >::dRelativePermeability(), and TEST().

94 {
95  // Guard against division by zero
96  if (seff <= 0.0 || seff >= 1.0)
97  return 0.0;
98 
99  return seff * (2.0 + (seff * (2.0 + 3.0 * lambda) - 2.0 * lambda) *
100  std::pow(1.0 - seff, 2.0 / lambda) / lambda);
101 }
MooseUnits pow(const MooseUnits &, int)

◆ dRelativePermeabilityW()

Real PorousFlowBrooksCorey::dRelativePermeabilityW ( Real  seff,
Real  lambda 
)

Derivative of relative permeability of the wetting phase wrt to effective saturation.

Parameters
seffeffective saturation
lambdaBrooks-Corey exponent
Returns
derivative of relative permeability wrt effective saturation

Definition at line 83 of file PorousFlowBrooksCorey.C.

Referenced by PorousFlowRelativePermeabilityBCTempl< is_ad >::dRelativePermeability(), and TEST().

84 {
85  // Guard against division by zero
86  if (seff <= 0.0 || seff >= 1.0)
87  return 0.0;
88 
89  return (2.0 + 3.0 * lambda) * std::pow(seff, (2.0 + 2.0 * lambda) / lambda) / lambda;
90 }
MooseUnits pow(const MooseUnits &, int)

◆ effectiveSaturation()

Real PorousFlowBrooksCorey::effectiveSaturation ( Real  pc,
Real  pe,
Real  lambda 
)

Effective saturation as a function of capillary pressure Note: seff = 1 for p >= 0.

Parameters
pccapillary pressure
pethreshold entry pressure
lambdaBrooks-Corey exponent
Returns
effective saturation

Definition at line 15 of file PorousFlowBrooksCorey.C.

Referenced by PorousFlowCapillaryPressureBC::effectiveSaturation(), and TEST().

16 {
17  if (pc < pe)
18  return 1.0;
19  else
20  return std::pow(pc / pe, -lambda);
21 }
MooseUnits pow(const MooseUnits &, int)

◆ relativePermeabilityNW()

template<typename T >
T PorousFlowBrooksCorey::relativePermeabilityNW ( const T &  seff,
Real  lambda 
)

Relative permeability of the non-wetting phase as a function of effective saturation.

Parameters
seffeffective saturation
lambdaBrooks-Corey exponent
Returns
relative permeability

Definition at line 124 of file PorousFlowBrooksCorey.h.

Referenced by PorousFlowRelativePermeabilityBCTempl< is_ad >::relativePermeability(), and TEST().

125 {
126  if (MetaPhysicL::raw_value(seff) <= 0.0)
127  return 0.0;
128  else if (MetaPhysicL::raw_value(seff) >= 1.0)
129  return 1.0;
130 
131  return seff * seff * (1.0 - std::pow(1.0 - seff, (2.0 + lambda) / lambda));
132 }
auto raw_value(const Eigen::Map< T > &in)
MooseUnits pow(const MooseUnits &, int)

◆ relativePermeabilityW()

template<typename T >
T PorousFlowBrooksCorey::relativePermeabilityW ( const T &  seff,
Real  lambda 
)

Relative permeability of the wetting phase as a function of effective saturation.

Parameters
seffeffective saturation
lambdaBrooks-Corey exponent
Returns
relative permeability

Definition at line 98 of file PorousFlowBrooksCorey.h.

Referenced by PorousFlowRelativePermeabilityBCTempl< is_ad >::relativePermeability(), and TEST().

99 {
100  if (MetaPhysicL::raw_value(seff) <= 0.0)
101  return 0.0;
102  else if (MetaPhysicL::raw_value(seff) >= 1.0)
103  return 1.0;
104 
105  return std::pow(seff, (2.0 + 3.0 * lambda) / lambda);
106 }
auto raw_value(const Eigen::Map< T > &in)
MooseUnits pow(const MooseUnits &, int)