23 "The fluid density as a RichardsDensity UserObject. If this and the " 24 "fluid_viscosity are given, then fluxes are multiplied by " 25 "(density*permeability_nn/viscosity), where the '_nn' indicates the " 26 "component normal to the boundary. In this case bare_flux is measured in " 27 "Pa.s^-1. This can be used in conjunction with fluid_relperm.");
28 params.
addParam<
Real>(
"fluid_viscosity",
"The fluid dynamic viscosity.");
31 "The fluid density as a RichardsRelPerm UserObject (eg RichardsRelPermPower " 32 "for water, or Q2PRelPermPostGas for gas). If this and the saturation " 33 "variable are defined then the flux will be motiplied by relative " 34 "permeability. This can be used in conjunction with fluid_density");
35 params.
addCoupledVar(
"saturation",
"The name of the water saturation variable");
38 "pressures",
"Tuple of pressure values. Must be monotonically increasing.");
41 "Tuple of flux values (measured in kg.m^-2.s^-1 if not using fluid_density, " 42 "otherwise in Pa.s^-1). This flux is OUT of the medium: hence positive " 43 "values of flux means this will be a SINK, while negative values indicate " 44 "this flux will be a SOURCE. A piecewise-linear fit is performed to the " 45 "(pressure,bare_fluxes) pairs to obtain the flux at any arbitrary pressure, " 46 "and the first or last bare_flux values are used if the quad-point pressure " 47 "falls outside this range.");
48 params.
addParam<FunctionName>(
"multiplying_fcn",
50 "The flux will be multiplied by this spatially-and-temporally " 51 "varying function. This is useful if the boundary is a moving " 52 "boundary controlled by RichardsExcav.");
53 params.
addClassDescription(
"Records the fluid flow into a sink (positive values indicate fluid " 54 "is flowing from porespace into the sink).");
60 _sink_func(getParam<
std::vector<
Real>>(
"pressures"),
61 getParam<
std::vector<
Real>>(
"bare_fluxes")),
62 _m_func(getFunction(
"multiplying_fcn")),
63 _pp(coupledValue(
"porepressure")),
64 _use_mobility(isParamValid(
"fluid_density") && isParamValid(
"fluid_viscosity")),
65 _use_relperm(isParamValid(
"fluid_relperm") && isCoupled(
"saturation")),
66 _density(isParamValid(
"fluid_density") ? &getUserObject<
RichardsDensity>(
"fluid_density")
68 _viscosity(isParamValid(
"fluid_viscosity") ? getParam<
Real>(
"fluid_viscosity") : 1),
69 _relperm(isParamValid(
"fluid_relperm") ? &getUserObject<
RichardsRelPerm>(
"fluid_relperm")
71 _sat(isCoupled(
"saturation") ? coupledValue(
"saturation") : _zero),
76 mooseError(
"Q2PPiecewiseLinearSink: you must supply both of fluid_density and fluid_viscosity " 77 "if you wish to multiply by the mobility");
80 mooseError(
"Q2PPiecewiseLinearSink: you must supply both of fluid_relperm and saturation if " 81 "you wish to multiply by the relative permeaility");
virtual bool isCoupled(const std::string &var_name, unsigned int i=0) const
Base class for Richards relative permeability classes that provide relative permeability as a functio...
static InputParameters validParams()
Real _viscosity
fluid viscosity, optional
T sample(const T &x) const
const MooseArray< Point > & _q_point
bool isParamValid(const std::string &name) const
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...
TensorValue< Real > RealTensorValue
const VariableValue & _pp
the porepressure variable
const Function & _m_func
the multiplier function
virtual Real relperm(Real seff) const =0
relative permeability as a function of effective saturation This must be over-ridden in your derived ...
Q2PPiecewiseLinearSinkFlux(const InputParameters ¶meters)
This postprocessor computes the fluid flux to a Q2PPiecewiseLinearSink.
virtual Real computeQpIntegral()
const MaterialProperty< RealTensorValue > & _permeability
medium permeability
const RichardsRelPerm *const _relperm
fluid relative permeaility, optional
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MooseArray< Point > & _normals
void mooseError(Args &&... args) const
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
Base class for fluid density as a function of porepressure The functions density, ddensity and d2dens...
const RichardsDensity *const _density
fluid density, optional
static InputParameters validParams()
bool _use_mobility
whether to include density*permeability_nn/viscosity in the flux
virtual Real value(Real t, const Point &p) const
static const std::string k
registerMooseObject("RichardsApp", Q2PPiecewiseLinearSinkFlux)
const VariableValue & _sat
saturation variable, optional