Go to the documentation of this file.
20 InputParameters params = validParams<Kernel>();
21 params.addParam<Real>(
24 "Weight of the penalty. Penalty = a*(lower - variable) for variable<lower, "
25 "and zero otherwise. Care should be taken with this parameter choice. "
26 "Determine the typical size of your residual (usually rho*perm*(gradP - "
27 "rho*g)/visc), then typically you want the penalty to ensure p>lower*(1-1E-6), "
28 "so for the PPP formulation you typically Penalty = a*1E-6*|p|. I recommend "
29 "that Penalty = 1E-3*residual, yielding a = 1E3*residual/|P|. ");
30 params.addRequiredCoupledVar(
31 "lower_var",
"Your variable will be constrained to be greater than this lower_var variable.");
32 params.addClassDescription(
"This adds a term to the residual that attempts to enforce variable > "
33 "lower_var. The term is a*(lower - variable) for variable<lower, and "
40 _a(getParam<Real>(
"a")),
41 _lower(coupledValue(
"lower_var")),
42 _lower_var_num(coupled(
"lower_var"))
50 return _test[_i][_qp] *
_a * (
_lower[_qp] - _u[_qp]);
59 return -_test[_i][_qp] *
_a * _phi[_j][_qp];
69 return _test[_i][_qp] *
_a * _phi[_j][_qp];
unsigned int _lower_var_num
moose variable number of the _lower variable (needed for OffDiagJacobian)
InputParameters validParams< RichardsPPenalty >()
virtual Real computeQpResidual()
Kernel = a*(lower - variable) for variable<lower, and zero otherwise This is an attempt to enforce va...
const VariableValue & _lower
Kernel = a*(_lower - variable) for variable<lower and zero otherwise.
RichardsPPenalty(const InputParameters ¶meters)
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
registerMooseObject("RichardsApp", RichardsPPenalty)
Real _a
Kernel = a*(_lower - variable) for variable<lower and zero otherwise.
virtual Real computeQpJacobian()