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

This postprocessor computes the fluid flux to a RichardsPiecewiseLinearSink. More...

#include <RichardsPiecewiseLinearSinkFlux.h>

Inheritance diagram for RichardsPiecewiseLinearSinkFlux:
[legend]

Public Member Functions

 RichardsPiecewiseLinearSinkFlux (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpIntegral ()
 

Protected Attributes

LinearInterpolation _sink_func
 the sink function, which is a piecewise linear function of porepressure values More...
 
bool _use_mobility
 whether to include density*permeability_nn/viscosity in the flux More...
 
bool _use_relperm
 whether to include relative permeability in the flux More...
 
Function & _m_func
 the multiplier function More...
 
const RichardsVarNames_richards_name_UO
 holds info regarding the Richards variable names, and their values in the simulation More...
 
unsigned int _pvar
 the index into _richards_name_UO corresponding to this Postprocessor's variable eg, if the richards names are 'pwater pgas poil pplasma' and the variable of this Postprocessor is pgas, then _pvar=1 More...
 
const MaterialProperty< std::vector< Real > > & _pp
 porepressure values (only the _pvar component is used) More...
 
const MaterialProperty< std::vector< Real > > & _viscosity
 fluid viscosity More...
 
const MaterialProperty< RealTensorValue > & _permeability
 medium permeability More...
 
const MaterialProperty< std::vector< Real > > & _rel_perm
 fluid relative permeability More...
 
const MaterialProperty< std::vector< Real > > & _density
 fluid density More...
 

Detailed Description

This postprocessor computes the fluid flux to a RichardsPiecewiseLinearSink.

The flux is integral_over_boundary of _sink_func*_dt (here _sink_func is a function of porepressure) and if _use_relperm = true, this integrand is multiplied by _rel_perm and if _m_func is entered, this integrand is multiplied by _m_func at the quad point and if _use_mobility = true, this integrand is multiplied by density*knn/viscosity, where knn is n.permeability.n where n is the normal to the boundary

Definition at line 34 of file RichardsPiecewiseLinearSinkFlux.h.

Constructor & Destructor Documentation

◆ RichardsPiecewiseLinearSinkFlux()

RichardsPiecewiseLinearSinkFlux::RichardsPiecewiseLinearSinkFlux ( const InputParameters &  parameters)

Definition at line 55 of file RichardsPiecewiseLinearSinkFlux.C.

56  : SideIntegralVariablePostprocessor(parameters),
57  _sink_func(getParam<std::vector<Real>>("pressures"),
58  getParam<std::vector<Real>>("bare_fluxes")),
59 
60  _use_mobility(getParam<bool>("use_mobility")),
61  _use_relperm(getParam<bool>("use_relperm")),
62 
63  _m_func(getFunction("multiplying_fcn")),
64 
65  _richards_name_UO(getUserObject<RichardsVarNames>("richardsVarNames_UO")),
66  _pvar(_richards_name_UO.richards_var_num(coupled("variable"))),
67 
68  _pp(getMaterialProperty<std::vector<Real>>("porepressure")),
69 
70  _viscosity(getMaterialProperty<std::vector<Real>>("viscosity")),
71  _permeability(getMaterialProperty<RealTensorValue>("permeability")),
72  _rel_perm(getMaterialProperty<std::vector<Real>>("rel_perm")),
73  _density(getMaterialProperty<std::vector<Real>>("density"))
74 {
75 }
const MaterialProperty< std::vector< Real > > & _density
fluid density
LinearInterpolation _sink_func
the sink function, which is a piecewise linear function of porepressure values
const MaterialProperty< std::vector< Real > > & _pp
porepressure values (only the _pvar component is used)
bool _use_mobility
whether to include density*permeability_nn/viscosity in the flux
const MaterialProperty< RealTensorValue > & _permeability
medium permeability
unsigned int _pvar
the index into _richards_name_UO corresponding to this Postprocessor&#39;s variable eg, if the richards names are &#39;pwater pgas poil pplasma&#39; and the variable of this Postprocessor is pgas, then _pvar=1
const MaterialProperty< std::vector< Real > > & _rel_perm
fluid relative permeability
bool _use_relperm
whether to include relative permeability in the flux
Function & _m_func
the multiplier function
unsigned int richards_var_num(unsigned int moose_var_num) const
the richards variable number
const MaterialProperty< std::vector< Real > > & _viscosity
fluid viscosity
const RichardsVarNames & _richards_name_UO
holds info regarding the Richards variable names, and their values in the simulation ...

Member Function Documentation

◆ computeQpIntegral()

Real RichardsPiecewiseLinearSinkFlux::computeQpIntegral ( )
protectedvirtual

Definition at line 78 of file RichardsPiecewiseLinearSinkFlux.C.

79 {
80  Real flux = _sink_func.sample(_pp[_qp][_pvar]);
81 
82  flux *= _m_func.value(_t, _q_point[_qp]);
83 
84  if (_use_mobility)
85  {
86  Real k = (_permeability[_qp] * _normals[_qp]) * _normals[_qp];
87  flux *= _density[_qp][_pvar] * k / _viscosity[_qp][_pvar];
88  }
89  if (_use_relperm)
90  flux *= _rel_perm[_qp][_pvar];
91 
92  return flux * _dt;
93 }
const MaterialProperty< std::vector< Real > > & _density
fluid density
LinearInterpolation _sink_func
the sink function, which is a piecewise linear function of porepressure values
const MaterialProperty< std::vector< Real > > & _pp
porepressure values (only the _pvar component is used)
bool _use_mobility
whether to include density*permeability_nn/viscosity in the flux
const MaterialProperty< RealTensorValue > & _permeability
medium permeability
unsigned int _pvar
the index into _richards_name_UO corresponding to this Postprocessor&#39;s variable eg, if the richards names are &#39;pwater pgas poil pplasma&#39; and the variable of this Postprocessor is pgas, then _pvar=1
const MaterialProperty< std::vector< Real > > & _rel_perm
fluid relative permeability
bool _use_relperm
whether to include relative permeability in the flux
Function & _m_func
the multiplier function
const MaterialProperty< std::vector< Real > > & _viscosity
fluid viscosity

Member Data Documentation

◆ _density

const MaterialProperty<std::vector<Real> >& RichardsPiecewiseLinearSinkFlux::_density
protected

fluid density

Definition at line 77 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

◆ _m_func

Function& RichardsPiecewiseLinearSinkFlux::_m_func
protected

the multiplier function

Definition at line 52 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

◆ _permeability

const MaterialProperty<RealTensorValue>& RichardsPiecewiseLinearSinkFlux::_permeability
protected

medium permeability

Definition at line 71 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

◆ _pp

const MaterialProperty<std::vector<Real> >& RichardsPiecewiseLinearSinkFlux::_pp
protected

porepressure values (only the _pvar component is used)

Definition at line 65 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

◆ _pvar

unsigned int RichardsPiecewiseLinearSinkFlux::_pvar
protected

the index into _richards_name_UO corresponding to this Postprocessor's variable eg, if the richards names are 'pwater pgas poil pplasma' and the variable of this Postprocessor is pgas, then _pvar=1

Definition at line 62 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

◆ _rel_perm

const MaterialProperty<std::vector<Real> >& RichardsPiecewiseLinearSinkFlux::_rel_perm
protected

fluid relative permeability

Definition at line 74 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

◆ _richards_name_UO

const RichardsVarNames& RichardsPiecewiseLinearSinkFlux::_richards_name_UO
protected

holds info regarding the Richards variable names, and their values in the simulation

Definition at line 55 of file RichardsPiecewiseLinearSinkFlux.h.

◆ _sink_func

LinearInterpolation RichardsPiecewiseLinearSinkFlux::_sink_func
protected

the sink function, which is a piecewise linear function of porepressure values

Definition at line 43 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

◆ _use_mobility

bool RichardsPiecewiseLinearSinkFlux::_use_mobility
protected

whether to include density*permeability_nn/viscosity in the flux

Definition at line 46 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

◆ _use_relperm

bool RichardsPiecewiseLinearSinkFlux::_use_relperm
protected

whether to include relative permeability in the flux

Definition at line 49 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

◆ _viscosity

const MaterialProperty<std::vector<Real> >& RichardsPiecewiseLinearSinkFlux::_viscosity
protected

fluid viscosity

Definition at line 68 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().


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