21 "PorousFlowDictator",
"The UserObject that holds the list of PorousFlow variable names.");
22 params.
addParam<
unsigned int>(
"phase", 0,
"Use the Darcy velocity of this fluid phase");
24 "Advective flux of a Variable using the Darcy velocity of the fluid phase");
33 _ph(this->template getParam<unsigned
int>(
"phase")),
34 _darcy_velocity(this->template getGenericMaterialProperty<
std::vector<
RealVectorValue>, is_ad>(
35 "PorousFlow_darcy_velocity_qp")),
36 _ddarcy_velocity_dvar(
39 "dPorousFlow_darcy_velocity_qp_dvar")),
40 _ddarcy_velocity_dgradvar(is_ad ? nullptr
41 : &this->template getMaterialProperty<
43 "dPorousFlow_darcy_velocity_qp_dgradvar"))
47 "The Dictator proclaims that the maximum phase index in this simulation is ",
49 " whereas you have used ",
51 ". Remember that indexing starts at 0. The Dictator is watching you, to " 52 "ensure your wellbeing.");
59 return -_grad_test[_i][_qp] * _darcy_velocity[_qp][_ph] * _u[_qp];
68 const Real result = -_grad_test[_i][_qp] * _darcy_velocity[_qp][_ph] * _phi[_j][_qp];
69 return result + computeQpOffDiagJacobian(_var.number());
80 if (_dictator.notPorousFlowVariable(jvar))
83 const unsigned pvar = _dictator.porousFlowVariableNum(jvar);
85 -_grad_test[_i][_qp] * (*_ddarcy_velocity_dvar)[_qp][_ph][pvar] * _phi[_j][_qp] * _u[_qp];
86 for (
unsigned j = 0;
j < LIBMESH_DIM; ++
j)
87 result -= _grad_test[_i][_qp] *
88 ((*_ddarcy_velocity_dgradvar)[_qp][_ph][
j][pvar] * _grad_phi[_j][_qp](
j)) * _u[_qp];
Moose::GenericType< Real, is_ad > GenericReal
void paramError(const std::string ¶m, Args... args) const
const PorousFlowDictator & _dictator
Holds info on the Porous Flow variables.
static InputParameters validParams()
virtual GenericReal< is_ad > computeQpResidual() override
virtual Real computeQpJacobian() override
registerMooseObject("PorousFlowApp", PorousFlowBasicAdvection)
static InputParameters validParams()
void libmesh_ignore(const Args &...)
unsigned int numPhases() const
The number of fluid phases.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const unsigned _ph
Phase of Darcy velocity.
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
Kernel = grad(test) * darcy_velocity * u.
PorousFlowBasicAdvectionTempl(const InputParameters ¶meters)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
void ErrorVector unsigned int