11#include "libmesh/utility.h"
21 "Maximum of the cubic flux multiplier. Denote x = porepressure - center (or in the "
22 "case of a heat flux with no fluid, x = temperature - center). Then Flux out is "
23 "multiplied by (max/cutoff^3)*(2x + cutoff)(x - cutoff)^2 for cutoff < x < 0. Flux "
24 "out is multiplied by max for x >= 0. Flux out is multiplied by 0 for x <= cutoff.");
26 "Cutoff of the cubic (measured in Pa (or K for "
27 "temperature BCs)). This needs to be less than "
30 "center",
"Center of the cubic flux multiplier (measured in Pa (or K for temperature BCs)).");
32 "PorousFlowSink is multiplied by a cubic.");
38 _maximum(getParam<Real>(
"max")),
39 _cutoff(getFunction(
"cutoff")),
40 _center(getParam<Real>(
"center"))
57 Utility::pow<3>(cutoff);
73 _maximum * (2 *
x + cutoff) * (
x - cutoff) * (
x - cutoff) / Utility::pow<3>(cutoff);
74 const Real deriv =
_maximum * 6 *
x * (
x - cutoff) / Utility::pow<3>(cutoff);
const std::vector< double > x
registerMooseObject("PorousFlowApp", PorousFlowHalfCubicSink)
virtual Real value(Real t, const Point &p) const
const MooseArray< Point > & _q_point
Applies a flux sink to a boundary.
static InputParameters validParams()
virtual Real dmultiplier_dvar(unsigned int pvar) const override
d(multiplier)/d(Porous flow variable pvar)
const Real _maximum
Maximum of the cubic sink.
PorousFlowHalfCubicSink(const InputParameters ¶meters)
const Real _center
Center of the cubic sink.
const Function & _cutoff
Denote x = porepressure - center. Then Flux out = (max/cutoff^3)*(2x + cutoff)(x - cutoff)^2 for cuto...
virtual Real multiplier() const override
The flux gets multiplied by this quantity.
Provides either a porepressure or a temperature to derived classes, depending on _involves_fluid defi...
virtual Real ptVar() const
Provides the variable value (either porepressure, or temperature, depending on _involves_fluid)
static InputParameters validParams()
virtual Real dptVar(unsigned pvar) const
Provides the d(variable)/(d PorousFlow Variable pvar)
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.