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 32 of file RichardsPiecewiseLinearSinkFlux.h.

Constructor & Destructor Documentation

RichardsPiecewiseLinearSinkFlux::RichardsPiecewiseLinearSinkFlux ( const InputParameters &  parameters)

Definition at line 51 of file RichardsPiecewiseLinearSinkFlux.C.

52  : SideIntegralVariablePostprocessor(parameters),
53  _sink_func(getParam<std::vector<Real>>("pressures"),
54  getParam<std::vector<Real>>("bare_fluxes")),
55 
56  _use_mobility(getParam<bool>("use_mobility")),
57  _use_relperm(getParam<bool>("use_relperm")),
58 
59  _m_func(getFunction("multiplying_fcn")),
60 
61  _richards_name_UO(getUserObject<RichardsVarNames>("richardsVarNames_UO")),
62  _pvar(_richards_name_UO.richards_var_num(coupled("variable"))),
63 
64  _pp(getMaterialProperty<std::vector<Real>>("porepressure")),
65 
66  _viscosity(getMaterialProperty<std::vector<Real>>("viscosity")),
67  _permeability(getMaterialProperty<RealTensorValue>("permeability")),
68  _rel_perm(getMaterialProperty<std::vector<Real>>("rel_perm")),
69  _density(getMaterialProperty<std::vector<Real>>("density"))
70 {
71 }
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
unsigned int richards_var_num(unsigned int moose_var_num) const
the richards variable number
const RichardsVarNames & _richards_name_UO
holds info regarding the Richards variable names, and their values in the simulation ...

Member Function Documentation

Real RichardsPiecewiseLinearSinkFlux::computeQpIntegral ( )
protectedvirtual

Definition at line 74 of file RichardsPiecewiseLinearSinkFlux.C.

75 {
76  Real flux = _sink_func.sample(_pp[_qp][_pvar]);
77 
78  flux *= _m_func.value(_t, _q_point[_qp]);
79 
80  if (_use_mobility)
81  {
82  Real k = (_permeability[_qp] * _normals[_qp]) * _normals[_qp];
83  flux *= _density[_qp][_pvar] * k / _viscosity[_qp][_pvar];
84  }
85  if (_use_relperm)
86  flux *= _rel_perm[_qp][_pvar];
87 
88  return flux * _dt;
89 }
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

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

fluid density

Definition at line 75 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

Function& RichardsPiecewiseLinearSinkFlux::_m_func
protected

the multiplier function

Definition at line 50 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

const MaterialProperty<RealTensorValue>& RichardsPiecewiseLinearSinkFlux::_permeability
protected

medium permeability

Definition at line 69 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

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

porepressure values (only the _pvar component is used)

Definition at line 63 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

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 60 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

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

fluid relative permeability

Definition at line 72 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

const RichardsVarNames& RichardsPiecewiseLinearSinkFlux::_richards_name_UO
protected

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

Definition at line 53 of file RichardsPiecewiseLinearSinkFlux.h.

LinearInterpolation RichardsPiecewiseLinearSinkFlux::_sink_func
protected

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

Definition at line 41 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

bool RichardsPiecewiseLinearSinkFlux::_use_mobility
protected

whether to include density*permeability_nn/viscosity in the flux

Definition at line 44 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

bool RichardsPiecewiseLinearSinkFlux::_use_relperm
protected

whether to include relative permeability in the flux

Definition at line 47 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

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

fluid viscosity

Definition at line 66 of file RichardsPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().


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