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

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

#include <Q2PPiecewiseLinearSinkFlux.h>

Inheritance diagram for Q2PPiecewiseLinearSinkFlux:
[legend]

Public Member Functions

 Q2PPiecewiseLinearSinkFlux (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...
 
Function & _m_func
 the multiplier function More...
 
const VariableValue & _pp
 the porepressure variable 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...
 
const RichardsDensity_density
 fluid density, optional More...
 
Real _viscosity
 fluid viscosity, optional More...
 
const RichardsRelPerm_relperm
 fluid relative permeaility, optional More...
 
const VariableValue & _sat
 saturation variable, optional More...
 
const MaterialProperty< RealTensorValue > & _permeability
 medium permeability More...
 

Detailed Description

This postprocessor computes the fluid flux to a Q2PPiecewiseLinearSink.

The flux is integral_over_boundary of _sink_func*_dt (here _sink_func is a function of porepressure) and if relative permeaility and saturation are given, 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 density and viscosity are given, 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 33 of file Q2PPiecewiseLinearSinkFlux.h.

Constructor & Destructor Documentation

Q2PPiecewiseLinearSinkFlux::Q2PPiecewiseLinearSinkFlux ( const InputParameters &  parameters)

Definition at line 55 of file Q2PPiecewiseLinearSinkFlux.C.

56  : SideIntegralPostprocessor(parameters),
57  _sink_func(getParam<std::vector<Real>>("pressures"),
58  getParam<std::vector<Real>>("bare_fluxes")),
59  _m_func(getFunction("multiplying_fcn")),
60  _pp(coupledValue("porepressure")),
61  _use_mobility(isParamValid("fluid_density") && isParamValid("fluid_viscosity")),
62  _use_relperm(isParamValid("fluid_relperm") && isCoupled("saturation")),
63  _density(isParamValid("fluid_density") ? &getUserObject<RichardsDensity>("fluid_density")
64  : NULL),
65  _viscosity(isParamValid("fluid_viscosity") ? getParam<Real>("fluid_viscosity") : 1),
66  _relperm(isParamValid("fluid_relperm") ? &getUserObject<RichardsRelPerm>("fluid_relperm")
67  : NULL),
68  _sat(isCoupled("saturation") ? coupledValue("saturation") : _zero),
69  _permeability(getMaterialProperty<RealTensorValue>("permeability"))
70 {
71  if ((isParamValid("fluid_density") && !isParamValid("fluid_viscosity")) ||
72  (!isParamValid("fluid_density") && isParamValid("fluid_viscosity")))
73  mooseError("Q2PPiecewiseLinearSink: you must supply both of fluid_density and fluid_viscosity "
74  "if you wish to multiply by the mobility");
75  if ((isParamValid("fluid_relperm") && !isCoupled("saturation")) ||
76  (!isParamValid("fluid_relperm") && isCoupled("saturation")))
77  mooseError("Q2PPiecewiseLinearSink: you must supply both of fluid_relperm and saturation if "
78  "you wish to multiply by the relative permeaility");
79 }
Real _viscosity
fluid viscosity, optional
const VariableValue & _pp
the porepressure variable
const RichardsRelPerm * _relperm
fluid relative permeaility, optional
const MaterialProperty< RealTensorValue > & _permeability
medium permeability
const RichardsDensity * _density
fluid density, optional
bool _use_relperm
whether to include relative permeability in the flux
LinearInterpolation _sink_func
the sink function, which is a piecewise linear function of porepressure values
bool _use_mobility
whether to include density*permeability_nn/viscosity in the flux
Function & _m_func
the multiplier function
const VariableValue & _sat
saturation variable, optional

Member Function Documentation

Real Q2PPiecewiseLinearSinkFlux::computeQpIntegral ( )
protectedvirtual

Definition at line 82 of file Q2PPiecewiseLinearSinkFlux.C.

83 {
84  Real flux = _sink_func.sample(_pp[_qp]);
85 
86  flux *= _m_func.value(_t, _q_point[_qp]);
87 
88  if (_use_mobility)
89  {
90  Real k = (_permeability[_qp] * _normals[_qp]) * _normals[_qp];
91  flux *= _density->density(_pp[_qp]) * k / _viscosity;
92  }
93  if (_use_relperm)
94  flux *= _relperm->relperm(_sat[_qp]);
95 
96  return flux * _dt;
97 }
Real _viscosity
fluid viscosity, optional
virtual Real density(Real p) const =0
fluid density as a function of porepressure This must be over-ridden in derived classes to provide an...
const VariableValue & _pp
the porepressure variable
const RichardsRelPerm * _relperm
fluid relative permeaility, optional
const MaterialProperty< RealTensorValue > & _permeability
medium permeability
virtual Real relperm(Real seff) const =0
relative permeability as a function of effective saturation This must be over-ridden in your derived ...
const RichardsDensity * _density
fluid density, optional
bool _use_relperm
whether to include relative permeability in the flux
LinearInterpolation _sink_func
the sink function, which is a piecewise linear function of porepressure values
bool _use_mobility
whether to include density*permeability_nn/viscosity in the flux
Function & _m_func
the multiplier function
const VariableValue & _sat
saturation variable, optional

Member Data Documentation

const RichardsDensity* Q2PPiecewiseLinearSinkFlux::_density
protected

fluid density, optional

Definition at line 57 of file Q2PPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

Function& Q2PPiecewiseLinearSinkFlux::_m_func
protected

the multiplier function

Definition at line 45 of file Q2PPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

const MaterialProperty<RealTensorValue>& Q2PPiecewiseLinearSinkFlux::_permeability
protected

medium permeability

Definition at line 69 of file Q2PPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

const VariableValue& Q2PPiecewiseLinearSinkFlux::_pp
protected

the porepressure variable

Definition at line 48 of file Q2PPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

const RichardsRelPerm* Q2PPiecewiseLinearSinkFlux::_relperm
protected

fluid relative permeaility, optional

Definition at line 63 of file Q2PPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

const VariableValue& Q2PPiecewiseLinearSinkFlux::_sat
protected

saturation variable, optional

Definition at line 66 of file Q2PPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

LinearInterpolation Q2PPiecewiseLinearSinkFlux::_sink_func
protected

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

Definition at line 42 of file Q2PPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

bool Q2PPiecewiseLinearSinkFlux::_use_mobility
protected

whether to include density*permeability_nn/viscosity in the flux

Definition at line 51 of file Q2PPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

bool Q2PPiecewiseLinearSinkFlux::_use_relperm
protected

whether to include relative permeability in the flux

Definition at line 54 of file Q2PPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().

Real Q2PPiecewiseLinearSinkFlux::_viscosity
protected

fluid viscosity, optional

Definition at line 60 of file Q2PPiecewiseLinearSinkFlux.h.

Referenced by computeQpIntegral().


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