Go to the documentation of this file.
21 InputParameters params = validParams<SideIntegralPostprocessor>();
22 params.addParam<UserObjectName>(
24 "The fluid density as a RichardsDensity UserObject. If this and the "
25 "fluid_viscosity are given, then fluxes are multiplied by "
26 "(density*permeability_nn/viscosity), where the '_nn' indicates the "
27 "component normal to the boundary. In this case bare_flux is measured in "
28 "Pa.s^-1. This can be used in conjunction with fluid_relperm.");
29 params.addParam<Real>(
"fluid_viscosity",
"The fluid dynamic viscosity.");
30 params.addParam<UserObjectName>(
32 "The fluid density as a RichardsRelPerm UserObject (eg RichardsRelPermPower "
33 "for water, or Q2PRelPermPostGas for gas). If this and the saturation "
34 "variable are defined then the flux will be motiplied by relative "
35 "permeability. This can be used in conjunction with fluid_density");
36 params.addCoupledVar(
"saturation",
"The name of the water saturation variable");
37 params.addRequiredCoupledVar(
"porepressure",
"The name of the porepressure variable");
38 params.addRequiredParam<std::vector<Real>>(
39 "pressures",
"Tuple of pressure values. Must be monotonically increasing.");
40 params.addRequiredParam<std::vector<Real>>(
42 "Tuple of flux values (measured in kg.m^-2.s^-1 if not using fluid_density, "
43 "otherwise in Pa.s^-1). This flux is OUT of the medium: hence positive "
44 "values of flux means this will be a SINK, while negative values indicate "
45 "this flux will be a SOURCE. A piecewise-linear fit is performed to the "
46 "(pressure,bare_fluxes) pairs to obtain the flux at any arbitrary pressure, "
47 "and the first or last bare_flux values are used if the quad-point pressure "
48 "falls outside this range.");
49 params.addParam<FunctionName>(
"multiplying_fcn",
51 "The flux will be multiplied by this spatially-and-temporally "
52 "varying function. This is useful if the boundary is a moving "
53 "boundary controlled by RichardsExcav.");
54 params.addClassDescription(
"Records the fluid flow into a sink (positive values indicate fluid "
55 "is flowing from porespace into the sink).");
60 : SideIntegralPostprocessor(parameters),
61 _sink_func(getParam<std::vector<Real>>(
"pressures"),
62 getParam<std::vector<Real>>(
"bare_fluxes")),
63 _m_func(getFunction(
"multiplying_fcn")),
64 _pp(coupledValue(
"porepressure")),
65 _use_mobility(isParamValid(
"fluid_density") && isParamValid(
"fluid_viscosity")),
66 _use_relperm(isParamValid(
"fluid_relperm") && isCoupled(
"saturation")),
67 _density(isParamValid(
"fluid_density") ? &getUserObject<
RichardsDensity>(
"fluid_density")
69 _viscosity(isParamValid(
"fluid_viscosity") ? getParam<Real>(
"fluid_viscosity") : 1),
70 _relperm(isParamValid(
"fluid_relperm") ? &getUserObject<
RichardsRelPerm>(
"fluid_relperm")
72 _sat(isCoupled(
"saturation") ? coupledValue(
"saturation") : _zero),
73 _permeability(getMaterialProperty<RealTensorValue>(
"permeability"))
75 if ((isParamValid(
"fluid_density") && !isParamValid(
"fluid_viscosity")) ||
76 (!isParamValid(
"fluid_density") && isParamValid(
"fluid_viscosity")))
77 mooseError(
"Q2PPiecewiseLinearSink: you must supply both of fluid_density and fluid_viscosity "
78 "if you wish to multiply by the mobility");
79 if ((isParamValid(
"fluid_relperm") && !isCoupled(
"saturation")) ||
80 (!isParamValid(
"fluid_relperm") && isCoupled(
"saturation")))
81 mooseError(
"Q2PPiecewiseLinearSink: you must supply both of fluid_relperm and saturation if "
82 "you wish to multiply by the relative permeaility");
90 flux *=
_m_func.value(_t, _q_point[_qp]);
94 Real k = (
_permeability[_qp] * _normals[_qp]) * _normals[_qp];
LinearInterpolation _sink_func
the sink function, which is a piecewise linear function of porepressure values
Base class for Richards relative permeability classes that provide relative permeability as a functio...
bool _use_relperm
whether to include relative permeability in the flux
This postprocessor computes the fluid flux to a Q2PPiecewiseLinearSink.
virtual Real relperm(Real seff) const =0
relative permeability as a function of effective saturation This must be over-ridden in your derived ...
const RichardsRelPerm * _relperm
fluid relative permeaility, optional
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...
registerMooseObject("RichardsApp", Q2PPiecewiseLinearSinkFlux)
const Function & _m_func
the multiplier function
const VariableValue & _pp
the porepressure variable
InputParameters validParams< Q2PPiecewiseLinearSinkFlux >()
Q2PPiecewiseLinearSinkFlux(const InputParameters ¶meters)
Base class for fluid density as a function of porepressure The functions density, ddensity and d2dens...
const RichardsDensity * _density
fluid density, optional
const MaterialProperty< RealTensorValue > & _permeability
medium permeability
bool _use_mobility
whether to include density*permeability_nn/viscosity in the flux
virtual Real computeQpIntegral()
const VariableValue & _sat
saturation variable, optional