Go to the documentation of this file.
11 #include "libmesh/utility.h"
20 params.addRequiredParam<Real>(
22 "Maximum of the cubic flux multiplier. Denote x = porepressure - center (or in the "
23 "case of a heat flux with no fluid, x = temperature - center). Then Flux out is "
24 "multiplied by (max/cutoff^3)*(2x + cutoff)(x - cutoff)^2 for cutoff < x < 0. Flux "
25 "out is multiplied by max for x >= 0. Flux out is multiplied by 0 for x <= cutoff.");
26 params.addRequiredParam<FunctionName>(
"cutoff",
27 "Cutoff of the cubic (measured in Pa (or K for "
28 "temperature BCs)). This needs to be less than "
30 params.addRequiredParam<Real>(
31 "center",
"Center of the cubic flux multiplier (measured in Pa (or K for temperature BCs)).");
32 params.addClassDescription(
"Applies a flux sink to a boundary. The base flux defined by "
33 "PorousFlowSink is multiplied by a cubic.");
39 _maximum(getParam<Real>(
"max")),
40 _cutoff(getFunction(
"cutoff")),
41 _center(getParam<Real>(
"center"))
53 const Real cutoff =
_cutoff.value(_t, _q_point[_qp]);
58 Utility::pow<3>(cutoff);
69 const Real cutoff =
_cutoff.value(_t, _q_point[_qp]);
74 _maximum * (2 * x + cutoff) * (x - cutoff) * (x - cutoff) / Utility::pow<3>(cutoff);
75 const Real deriv =
_maximum * 6 * x * (x - cutoff) / Utility::pow<3>(cutoff);
Provides either a porepressure or a temperature to derived classes, depending on _involves_fluid defi...
const Real _maximum
Maximum of the cubic sink.
virtual Real dmultiplier_dvar(unsigned int pvar) const override
d(multiplier)/d(Porous flow variable pvar)
virtual Real ptVar() const
Provides the variable value (either porepressure, or temperature, depending on _involves_fluid)
const Real _center
Center of the cubic sink.
virtual Real dptVar(unsigned pvar) const
Provides the d(variable)/(d PorousFlow Variable pvar)
InputParameters validParams< PorousFlowHalfCubicSink >()
virtual Real multiplier() const override
The flux gets multiplied by this quantity.
InputParameters validParams< PorousFlowSinkPTDefiner >()
virtual Real dmultiplier_dvar(unsigned int pvar) const
d(multiplier)/d(Porous flow variable pvar)
virtual Real multiplier() const
The flux gets multiplied by this quantity.
registerMooseObject("PorousFlowApp", PorousFlowHalfCubicSink)
const Function & _cutoff
Denote x = porepressure - center. Then Flux out = (max/cutoff^3)*(2x + cutoff)(x - cutoff)^2 for cuto...
PorousFlowHalfCubicSink(const InputParameters ¶meters)
Applies a flux sink to a boundary.