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

Material designed to calculate fluid-phase porepressure and saturation for the single-phase situation, using a Broadbridge-White capillary suction function P Broadbridge, I White ``Constant rate rainfall infiltration: A versatile nonlinear model, 1 Analytical solution''. More...

#include <PorousFlow1PhaseP_BW.h>

Inheritance diagram for PorousFlow1PhaseP_BW:
[legend]

Public Member Functions

 PorousFlow1PhaseP_BW (const InputParameters &parameters)
 

Protected Member Functions

Real effectiveSaturation (Real pressure) const override
 Effective saturation as a function of porepressure. More...
 
Real dEffectiveSaturation_dP (Real pressure) const override
 Derivative of effective saturation wrt to porepressure. More...
 
Real d2EffectiveSaturation_dP2 (Real pressure) const override
 Second derivative of effective saturation wrt to porepressure. More...
 
virtual void initQpStatefulProperties () override
 
virtual void computeQpProperties () override
 
void buildQpPPSS ()
 Assemble std::vectors of porepressure, saturation and temperature at the quadpoints. More...
 

Protected Attributes

const Real _sn
 BW's Sn parameter (initial saturation) More...
 
const Real _ss
 BW's Ss parameter. More...
 
const Real _c
 BW's C parameter (>1) More...
 
const Real _las
 BWs lambda_s parameter multiplied yb fluiddensity * gravity (>0) More...
 
const VariableValue & _porepressure_var
 Nodal or quadpoint value of porepressure of the fluid phase. More...
 
const VariableGradient & _gradp_qp_var
 Gradient(_porepressure at quadpoints) More...
 
const unsigned int _porepressure_varnum
 Moose variable number of the porepressure. More...
 
const unsigned int _p_var_num
 the PorousFlow variable number of the porepressure More...
 
const PorousFlowCapillaryPressure_pc_uo
 Capillary pressure UserObject Note: This pointer can be replaced with a reference once the deprecated PP materials have been removed. More...
 
const unsigned int _num_phases
 Number of phases. More...
 
const unsigned int _num_components
 Number of components. More...
 
const unsigned int _num_pf_vars
 Number of PorousFlow variables. More...
 
MaterialProperty< std::vector< Real > > & _porepressure
 Computed nodal or quadpoint values of porepressure of the phases. More...
 
MaterialProperty< std::vector< std::vector< Real > > > & _dporepressure_dvar
 d(porepressure)/d(PorousFlow variable) More...
 
MaterialProperty< std::vector< RealGradient > > *const _gradp_qp
 Grad(p) at the quadpoints. More...
 
MaterialProperty< std::vector< std::vector< Real > > > *const _dgradp_qp_dgradv
 d(grad porepressure)/d(grad PorousFlow variable) at the quadpoints More...
 
MaterialProperty< std::vector< std::vector< RealGradient > > > *const _dgradp_qp_dv
 d(grad porepressure)/d(PorousFlow variable) at the quadpoints More...
 
MaterialProperty< std::vector< Real > > & _saturation
 Computed nodal or qp saturation of the phases. More...
 
MaterialProperty< std::vector< std::vector< Real > > > & _dsaturation_dvar
 d(saturation)/d(PorousFlow variable) More...
 
MaterialProperty< std::vector< RealGradient > > *const _grads_qp
 Grad(s) at the quadpoints. More...
 
MaterialProperty< std::vector< std::vector< Real > > > *const _dgrads_qp_dgradv
 d(grad saturation)/d(grad PorousFlow variable) at the quadpoints More...
 
MaterialProperty< std::vector< std::vector< RealGradient > > > *const _dgrads_qp_dv
 d(grad saturation)/d(PorousFlow variable) at the quadpoints More...
 

Detailed Description

Material designed to calculate fluid-phase porepressure and saturation for the single-phase situation, using a Broadbridge-White capillary suction function P Broadbridge, I White ``Constant rate rainfall infiltration: A versatile nonlinear model, 1 Analytical solution''.

Water Resources Research 24 (1988) 145–154.

Definition at line 27 of file PorousFlow1PhaseP_BW.h.

Constructor & Destructor Documentation

PorousFlow1PhaseP_BW::PorousFlow1PhaseP_BW ( const InputParameters &  parameters)

Definition at line 45 of file PorousFlow1PhaseP_BW.C.

46  : PorousFlow1PhaseP(parameters),
47  _sn(getParam<Real>("Sn")),
48  _ss(getParam<Real>("Ss")),
49  _c(getParam<Real>("C")),
50  _las(getParam<Real>("las"))
51 {
52  mooseDeprecated("PorousFlow1PhaseP_BW is deprecated. Please use PorousFlow1PhaseP and a "
53  "PorousFlowCapillaryPressureBW UserObject instead");
54 
55  if (_ss <= _sn)
56  mooseError("In BW effective saturation Sn set to ",
57  _sn,
58  " and Ss set to ",
59  _ss,
60  " but these must obey Ss > Sn");
61 }
const Real _las
BWs lambda_s parameter multiplied yb fluiddensity * gravity (>0)
const Real _ss
BW&#39;s Ss parameter.
const Real _c
BW&#39;s C parameter (>1)
const Real _sn
BW&#39;s Sn parameter (initial saturation)
PorousFlow1PhaseP(const InputParameters &parameters)

Member Function Documentation

void PorousFlow1PhaseP::buildQpPPSS ( )
protectedinherited

Assemble std::vectors of porepressure, saturation and temperature at the quadpoints.

Definition at line 85 of file PorousFlow1PhaseP.C.

Referenced by PorousFlow1PhaseP::computeQpProperties(), and PorousFlow1PhaseP::initQpStatefulProperties().

86 {
87  _porepressure[_qp][0] = _porepressure_var[_qp];
89 }
MaterialProperty< std::vector< Real > > & _saturation
Computed nodal or qp saturation of the phases.
virtual Real effectiveSaturation(Real pressure) const
Effective saturation as a function of porepressure.
const VariableValue & _porepressure_var
Nodal or quadpoint value of porepressure of the fluid phase.
MaterialProperty< std::vector< Real > > & _porepressure
Computed nodal or quadpoint values of porepressure of the phases.
void PorousFlow1PhaseP::computeQpProperties ( )
overrideprotectedvirtualinherited

Reimplemented from PorousFlowVariableBase.

Definition at line 54 of file PorousFlow1PhaseP.C.

55 {
56  // size stuff correctly and prepare the derivative matrices with zeroes
58 
59  buildQpPPSS();
60  const Real dseff = dEffectiveSaturation_dP(_porepressure_var[_qp]);
61 
62  if (!_nodal_material)
63  {
64  (*_gradp_qp)[_qp][0] = _gradp_qp_var[_qp];
65  (*_grads_qp)[_qp][0] = dseff * _gradp_qp_var[_qp];
66  }
67 
68  // _porepressure is only dependent on _porepressure, and its derivative is 1
69  if (_dictator.isPorousFlowVariable(_porepressure_varnum))
70  {
71  // _porepressure is a PorousFlow variable
72  _dporepressure_dvar[_qp][0][_p_var_num] = 1.0;
73  _dsaturation_dvar[_qp][0][_p_var_num] = dseff;
74  if (!_nodal_material)
75  {
76  (*_dgradp_qp_dgradv)[_qp][0][_p_var_num] = 1.0;
77  (*_dgrads_qp_dgradv)[_qp][0][_p_var_num] = dseff;
78  (*_dgrads_qp_dv)[_qp][0][_p_var_num] =
80  }
81  }
82 }
virtual Real d2EffectiveSaturation_dP2(Real pressure) const
Second derivative of effective saturation wrt to porepressure.
const unsigned int _p_var_num
the PorousFlow variable number of the porepressure
MaterialProperty< std::vector< std::vector< Real > > > & _dporepressure_dvar
d(porepressure)/d(PorousFlow variable)
MaterialProperty< std::vector< std::vector< Real > > > & _dsaturation_dvar
d(saturation)/d(PorousFlow variable)
virtual Real dEffectiveSaturation_dP(Real pressure) const
Derivative of effective saturation wrt to porepressure.
virtual void computeQpProperties() override
const VariableValue & _porepressure_var
Nodal or quadpoint value of porepressure of the fluid phase.
const unsigned int _porepressure_varnum
Moose variable number of the porepressure.
const VariableGradient & _gradp_qp_var
Gradient(_porepressure at quadpoints)
void buildQpPPSS()
Assemble std::vectors of porepressure, saturation and temperature at the quadpoints.
Real PorousFlow1PhaseP_BW::d2EffectiveSaturation_dP2 ( Real  pressure) const
overrideprotectedvirtual

Second derivative of effective saturation wrt to porepressure.

Default = 0 for constant saturation. Over-ride in derived classes to implement other effective saturation forulations

Parameters
pressureporepressure (Pa)
Returns
second derivative of effective saturation wrt porepressure

Reimplemented from PorousFlow1PhaseP.

Definition at line 76 of file PorousFlow1PhaseP_BW.C.

77 {
79 }
const Real _las
BWs lambda_s parameter multiplied yb fluiddensity * gravity (>0)
const Real _ss
BW&#39;s Ss parameter.
const Real _c
BW&#39;s C parameter (>1)
Real d2EffectiveSaturation(Real pc, Real c, Real sn, Real ss, Real las)
Second derivative of effective saturation wrt capillary pressure.
const Real _sn
BW&#39;s Sn parameter (initial saturation)
const std::string pressure
Definition: NS.h:24
Real PorousFlow1PhaseP_BW::dEffectiveSaturation_dP ( Real  pressure) const
overrideprotectedvirtual

Derivative of effective saturation wrt to porepressure.

Default = 0 for constant saturation. Over-ride in derived classes to implement other effective saturation forulations

Parameters
pressureporepressure (Pa)
Returns
derivative of effective saturation wrt porepressure

Reimplemented from PorousFlow1PhaseP.

Definition at line 70 of file PorousFlow1PhaseP_BW.C.

71 {
73 }
const Real _las
BWs lambda_s parameter multiplied yb fluiddensity * gravity (>0)
Real dEffectiveSaturation(Real pc, Real c, Real sn, Real ss, Real las)
Derivative of effective saturation wrt capillary pressure.
const Real _ss
BW&#39;s Ss parameter.
const Real _c
BW&#39;s C parameter (>1)
const Real _sn
BW&#39;s Sn parameter (initial saturation)
const std::string pressure
Definition: NS.h:24
Real PorousFlow1PhaseP_BW::effectiveSaturation ( Real  pressure) const
overrideprotectedvirtual

Effective saturation as a function of porepressure.

Default is constant saturation = 1. If porepressure < 0 then saturation < 1. Over-ride in derived classes to implement other effective saturation forulations

Parameters
pressureporepressure (Pa)
Returns
effective saturation

Reimplemented from PorousFlow1PhaseP.

Definition at line 64 of file PorousFlow1PhaseP_BW.C.

65 {
67 }
const Real _las
BWs lambda_s parameter multiplied yb fluiddensity * gravity (>0)
const Real _ss
BW&#39;s Ss parameter.
const Real _c
BW&#39;s C parameter (>1)
Real effectiveSaturation(Real pc, Real c, Real sn, Real ss, Real las)
Effective saturation as a function of capillary pressure If pc>=0 this will yield 1...
const Real _sn
BW&#39;s Sn parameter (initial saturation)
const std::string pressure
Definition: NS.h:24
void PorousFlow1PhaseP::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Reimplemented from PorousFlowVariableBase.

Definition at line 47 of file PorousFlow1PhaseP.C.

48 {
50  buildQpPPSS();
51 }
virtual void initQpStatefulProperties() override
void buildQpPPSS()
Assemble std::vectors of porepressure, saturation and temperature at the quadpoints.

Member Data Documentation

const Real PorousFlow1PhaseP_BW::_c
protected

BW's C parameter (>1)

Definition at line 46 of file PorousFlow1PhaseP_BW.h.

Referenced by d2EffectiveSaturation_dP2(), dEffectiveSaturation_dP(), and effectiveSaturation().

MaterialProperty<std::vector<std::vector<Real> > >* const PorousFlowVariableBase::_dgradp_qp_dgradv
protectedinherited

d(grad porepressure)/d(grad PorousFlow variable) at the quadpoints

Definition at line 52 of file PorousFlowVariableBase.h.

MaterialProperty<std::vector<std::vector<RealGradient> > >* const PorousFlowVariableBase::_dgradp_qp_dv
protectedinherited

d(grad porepressure)/d(PorousFlow variable) at the quadpoints

Definition at line 55 of file PorousFlowVariableBase.h.

MaterialProperty<std::vector<std::vector<Real> > >* const PorousFlowVariableBase::_dgrads_qp_dgradv
protectedinherited

d(grad saturation)/d(grad PorousFlow variable) at the quadpoints

Definition at line 67 of file PorousFlowVariableBase.h.

MaterialProperty<std::vector<std::vector<RealGradient> > >* const PorousFlowVariableBase::_dgrads_qp_dv
protectedinherited

d(grad saturation)/d(PorousFlow variable) at the quadpoints

Definition at line 70 of file PorousFlowVariableBase.h.

MaterialProperty<std::vector<std::vector<Real> > >& PorousFlowVariableBase::_dporepressure_dvar
protectedinherited
MaterialProperty<std::vector<std::vector<Real> > >& PorousFlowVariableBase::_dsaturation_dvar
protectedinherited
MaterialProperty<std::vector<RealGradient> >* const PorousFlowVariableBase::_gradp_qp
protectedinherited

Grad(p) at the quadpoints.

Definition at line 49 of file PorousFlowVariableBase.h.

const VariableGradient& PorousFlow1PhaseP::_gradp_qp_var
protectedinherited

Gradient(_porepressure at quadpoints)

Definition at line 75 of file PorousFlow1PhaseP.h.

Referenced by PorousFlow1PhaseP::computeQpProperties().

MaterialProperty<std::vector<RealGradient> >* const PorousFlowVariableBase::_grads_qp
protectedinherited

Grad(s) at the quadpoints.

Definition at line 64 of file PorousFlowVariableBase.h.

const Real PorousFlow1PhaseP_BW::_las
protected

BWs lambda_s parameter multiplied yb fluiddensity * gravity (>0)

Definition at line 49 of file PorousFlow1PhaseP_BW.h.

Referenced by d2EffectiveSaturation_dP2(), dEffectiveSaturation_dP(), and effectiveSaturation().

const unsigned int PorousFlowVariableBase::_num_components
protectedinherited
const unsigned int PorousFlowVariableBase::_num_pf_vars
protectedinherited
const unsigned int PorousFlowVariableBase::_num_phases
protectedinherited
const unsigned int PorousFlow1PhaseP::_p_var_num
protectedinherited

the PorousFlow variable number of the porepressure

Definition at line 79 of file PorousFlow1PhaseP.h.

Referenced by PorousFlow1PhaseP::computeQpProperties().

const PorousFlowCapillaryPressure* PorousFlow1PhaseP::_pc_uo
protectedinherited

Capillary pressure UserObject Note: This pointer can be replaced with a reference once the deprecated PP materials have been removed.

Definition at line 83 of file PorousFlow1PhaseP.h.

Referenced by PorousFlow1PhaseP::d2EffectiveSaturation_dP2(), PorousFlow1PhaseP::dEffectiveSaturation_dP(), and PorousFlow1PhaseP::effectiveSaturation().

MaterialProperty<std::vector<Real> >& PorousFlowVariableBase::_porepressure
protectedinherited
const VariableValue& PorousFlow1PhaseP::_porepressure_var
protectedinherited

Nodal or quadpoint value of porepressure of the fluid phase.

Definition at line 73 of file PorousFlow1PhaseP.h.

Referenced by PorousFlow1PhaseP::buildQpPPSS(), and PorousFlow1PhaseP::computeQpProperties().

const unsigned int PorousFlow1PhaseP::_porepressure_varnum
protectedinherited

Moose variable number of the porepressure.

Definition at line 77 of file PorousFlow1PhaseP.h.

Referenced by PorousFlow1PhaseP::computeQpProperties().

MaterialProperty<std::vector<Real> >& PorousFlowVariableBase::_saturation
protectedinherited
const Real PorousFlow1PhaseP_BW::_sn
protected

BW's Sn parameter (initial saturation)

Definition at line 40 of file PorousFlow1PhaseP_BW.h.

Referenced by d2EffectiveSaturation_dP2(), dEffectiveSaturation_dP(), effectiveSaturation(), and PorousFlow1PhaseP_BW().

const Real PorousFlow1PhaseP_BW::_ss
protected

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