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

Material to calculate Brooks-Corey relative permeability of an arbitrary phase given the effective saturation and exponent of that phase. More...

#include <PorousFlowRelativePermeabilityBC.h>

Inheritance diagram for PorousFlowRelativePermeabilityBC:
[legend]

Public Member Functions

 PorousFlowRelativePermeabilityBC (const InputParameters &parameters)
 

Protected Member Functions

virtual Real relativePermeability (Real seff) const override
 Relative permeability equation (must be overriden in derived class) More...
 
virtual Real dRelativePermeability (Real seff) const override
 Derivative of relative permeability with respect to effective saturation. More...
 
virtual void computeQpProperties () override
 
virtual Real effectiveSaturation (Real saturation) const
 Effective saturation of fluid phase. More...
 

Protected Attributes

const Real _lambda
 Brooks-Corey exponent lambda. More...
 
const bool _is_nonwetting
 Flag that is set to true if this is the non-wetting (gas) phase. More...
 
const Real _scaling
 Relative permeability is multiplied by this quantity. More...
 
const MaterialProperty< std::vector< Real > > & _saturation
 Saturation material property. More...
 
MaterialProperty< Real > & _relative_permeability
 Relative permeability material property. More...
 
MaterialProperty< Real > & _drelative_permeability_ds
 Derivative of relative permeability wrt phase saturation. More...
 
const Real _s_res
 Residual saturation of specified phase. More...
 
const Real _sum_s_res
 Sum of residual saturations over all phases. More...
 
const Real _dseff_ds
 Derivative of effective saturation with respect to saturation. More...
 
const unsigned int _phase_num
 Phase number of fluid. More...
 
const std::string _phase
 Stringified fluid phase number. More...
 

Detailed Description

Material to calculate Brooks-Corey relative permeability of an arbitrary phase given the effective saturation and exponent of that phase.

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

Definition at line 27 of file PorousFlowRelativePermeabilityBC.h.

Constructor & Destructor Documentation

◆ PorousFlowRelativePermeabilityBC()

PorousFlowRelativePermeabilityBC::PorousFlowRelativePermeabilityBC ( const InputParameters &  parameters)

Definition at line 26 of file PorousFlowRelativePermeabilityBC.C.

29  _lambda(getParam<Real>("lambda")),
30  _is_nonwetting(getParam<bool>("nw_phase"))
31 {
32 }
const Real _lambda
Brooks-Corey exponent lambda.
const bool _is_nonwetting
Flag that is set to true if this is the non-wetting (gas) phase.
PorousFlowRelativePermeabilityBase(const InputParameters &parameters)

Member Function Documentation

◆ computeQpProperties()

void PorousFlowRelativePermeabilityBase::computeQpProperties ( )
overrideprotectedvirtualinherited

Definition at line 59 of file PorousFlowRelativePermeabilityBase.C.

60 {
61  // Effective saturation
62  Real seff = effectiveSaturation(_saturation[_qp][_phase_num]);
63  Real relperm, drelperm;
64 
65  if (seff < 0.0)
66  {
67  // Relative permeability is 0 for saturation less than residual
68  relperm = 0.0;
69  drelperm = 0.0;
70  }
71  else if (seff >= 0.0 && seff <= 1)
72  {
73  relperm = relativePermeability(seff);
74  drelperm = dRelativePermeability(seff);
75  }
76  else // seff > 1
77  {
78  // Relative permeability is 1 when fully saturated
79  relperm = 1.0;
80  drelperm = 0.0;
81  }
82 
83  _relative_permeability[_qp] = relperm * _scaling;
84  _drelative_permeability_ds[_qp] = drelperm * _dseff_ds * _scaling;
85 }
const Real _scaling
Relative permeability is multiplied by this quantity.
MaterialProperty< Real > & _relative_permeability
Relative permeability material property.
const Real _dseff_ds
Derivative of effective saturation with respect to saturation.
const MaterialProperty< std::vector< Real > > & _saturation
Saturation material property.
virtual Real effectiveSaturation(Real saturation) const
Effective saturation of fluid phase.
const unsigned int _phase_num
Phase number of fluid.
virtual Real relativePermeability(Real seff) const =0
Relative permeability equation (must be overriden in derived class)
virtual Real dRelativePermeability(Real seff) const =0
Derivative of relative permeability with respect to effective saturation.
MaterialProperty< Real > & _drelative_permeability_ds
Derivative of relative permeability wrt phase saturation.

◆ dRelativePermeability()

Real PorousFlowRelativePermeabilityBC::dRelativePermeability ( Real  seff) const
overrideprotectedvirtual

Derivative of relative permeability with respect to effective saturation.

Parameters
seffeffective saturation
Returns
derivative of relative permeability wrt effective saturation

Implements PorousFlowRelativePermeabilityBase.

Definition at line 44 of file PorousFlowRelativePermeabilityBC.C.

45 {
46  if (_is_nonwetting)
48  else
50 }
const Real _lambda
Brooks-Corey exponent lambda.
Real dRelativePermeabilityNW(Real seff, Real lambda)
Derivative of relative permeability of the non-wetting phase wrt to effective saturation.
const bool _is_nonwetting
Flag that is set to true if this is the non-wetting (gas) phase.
Real dRelativePermeabilityW(Real seff, Real lambda)
Derivative of relative permeability of the wetting phase wrt to effective saturation.

◆ effectiveSaturation()

Real PorousFlowRelativePermeabilityBase::effectiveSaturation ( Real  saturation) const
protectedvirtualinherited

Effective saturation of fluid phase.

Parameters
saturationtrue saturation
Returns
effective saturation

Definition at line 88 of file PorousFlowRelativePermeabilityBase.C.

Referenced by PorousFlowRelativePermeabilityBase::computeQpProperties().

89 {
90  return (saturation - _s_res) / (1.0 - _sum_s_res);
91 }
const Real _sum_s_res
Sum of residual saturations over all phases.
const Real _s_res
Residual saturation of specified phase.

◆ relativePermeability()

Real PorousFlowRelativePermeabilityBC::relativePermeability ( Real  seff) const
overrideprotectedvirtual

Relative permeability equation (must be overriden in derived class)

Parameters
seffeffective saturation
Returns
relative permeability

Implements PorousFlowRelativePermeabilityBase.

Definition at line 35 of file PorousFlowRelativePermeabilityBC.C.

36 {
37  if (_is_nonwetting)
39  else
41 }
const Real _lambda
Brooks-Corey exponent lambda.
Real relativePermeabilityW(Real seff, Real lambda)
Relative permeability of the wetting phase as a function of effective saturation. ...
const bool _is_nonwetting
Flag that is set to true if this is the non-wetting (gas) phase.
Real relativePermeabilityNW(Real seff, Real lambda)
Relative permeability of the non-wetting phase as a function of effective saturation.

Member Data Documentation

◆ _drelative_permeability_ds

MaterialProperty<Real>& PorousFlowRelativePermeabilityBase::_drelative_permeability_ds
protectedinherited

Derivative of relative permeability wrt phase saturation.

Definition at line 64 of file PorousFlowRelativePermeabilityBase.h.

Referenced by PorousFlowRelativePermeabilityBase::computeQpProperties().

◆ _dseff_ds

const Real PorousFlowRelativePermeabilityBase::_dseff_ds
protectedinherited

Derivative of effective saturation with respect to saturation.

Definition at line 73 of file PorousFlowRelativePermeabilityBase.h.

Referenced by PorousFlowRelativePermeabilityBase::computeQpProperties().

◆ _is_nonwetting

const bool PorousFlowRelativePermeabilityBC::_is_nonwetting
protected

Flag that is set to true if this is the non-wetting (gas) phase.

Definition at line 39 of file PorousFlowRelativePermeabilityBC.h.

Referenced by dRelativePermeability(), and relativePermeability().

◆ _lambda

const Real PorousFlowRelativePermeabilityBC::_lambda
protected

Brooks-Corey exponent lambda.

Definition at line 37 of file PorousFlowRelativePermeabilityBC.h.

Referenced by dRelativePermeability(), and relativePermeability().

◆ _phase

const std::string PorousFlowMaterialBase::_phase
protectedinherited

Stringified fluid phase number.

Definition at line 38 of file PorousFlowMaterialBase.h.

◆ _phase_num

const unsigned int PorousFlowMaterialBase::_phase_num
protectedinherited

◆ _relative_permeability

MaterialProperty<Real>& PorousFlowRelativePermeabilityBase::_relative_permeability
protectedinherited

Relative permeability material property.

Definition at line 61 of file PorousFlowRelativePermeabilityBase.h.

Referenced by PorousFlowRelativePermeabilityBase::computeQpProperties().

◆ _s_res

const Real PorousFlowRelativePermeabilityBase::_s_res
protectedinherited

◆ _saturation

const MaterialProperty<std::vector<Real> >& PorousFlowRelativePermeabilityBase::_saturation
protectedinherited

Saturation material property.

Definition at line 58 of file PorousFlowRelativePermeabilityBase.h.

Referenced by PorousFlowRelativePermeabilityBase::computeQpProperties().

◆ _scaling

const Real PorousFlowRelativePermeabilityBase::_scaling
protectedinherited

Relative permeability is multiplied by this quantity.

Definition at line 55 of file PorousFlowRelativePermeabilityBase.h.

Referenced by PorousFlowRelativePermeabilityBase::computeQpProperties().

◆ _sum_s_res

const Real PorousFlowRelativePermeabilityBase::_sum_s_res
protectedinherited

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