Go to the documentation of this file.
14 #include "MooseVariable.h"
25 InputParameters params = validParams<Kernel>();
26 params.addParam<
bool>(
29 "If you are using second-order Lagrange shape functions you need to set this to false.");
30 params.addRequiredParam<UserObjectName>(
31 "richardsVarNames_UO",
"The UserObject that holds the list of Richards variable names.");
38 _pvar(_richards_name_UO.richards_var_num(_var.number())),
41 _flux(getMaterialProperty<std::vector<RealVectorValue>>(
"flux")),
42 _dflux_dv(getMaterialProperty<std::vector<std::vector<RealVectorValue>>>(
"dflux_dv")),
43 _dflux_dgradv(getMaterialProperty<std::vector<std::vector<RealTensorValue>>>(
"dflux_dgradv")),
45 getMaterialProperty<std::vector<std::vector<std::vector<RealVectorValue>>>>(
"d2flux_dvdv")),
46 _d2flux_dgradvdv(getMaterialProperty<std::vector<std::vector<std::vector<RealTensorValue>>>>(
48 _d2flux_dvdgradv(getMaterialProperty<std::vector<std::vector<std::vector<RealTensorValue>>>>(
51 _second_u(getParam<bool>(
"linear_shape_fcns")
53 : (_is_implicit ? _var.secondSln() : _var.secondSlnOld())),
54 _second_phi(getParam<bool>(
"linear_shape_fcns") ? _second_phi_zero : secondPhi()),
56 _tauvel_SUPG(getMaterialProperty<std::vector<RealVectorValue>>(
"tauvel_SUPG")),
58 getMaterialProperty<std::vector<std::vector<RealTensorValue>>>(
"dtauvel_SUPG_dgradv")),
60 getMaterialProperty<std::vector<std::vector<RealVectorValue>>>(
"dtauvel_SUPG_dv"))
67 Real flux_part = _grad_test[_i][_qp] *
_flux[_qp][
_pvar];
70 Real supg_kernel = 0.0;
83 return flux_part + supg_test * supg_kernel;
89 Real flux_prime = _grad_test[_i][_qp] * (
_dflux_dgradv[_qp][
_pvar][wrt_num] * _grad_phi[_j][_qp] +
93 Real supg_test_prime =
96 Real supg_kernel = 0.0;
97 Real supg_kernel_prime = 0.0;
111 if (wrt_num ==
_pvar)
116 return flux_prime + supg_test_prime * supg_kernel + supg_test * supg_kernel_prime;
const MaterialProperty< std::vector< RealVectorValue > > & _tauvel_SUPG
SUPGtau*SUPGvel (a vector of these if multiphase)
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _dflux_dgradv
d(Richards flux_i)/d(grad(variable_j)), here flux_i is the i_th flux, which is itself a RealVectorVal...
Kernel = grad(permeability*relativepermeability/viscosity * (grad(pressure) - density*gravity)) This ...
const MaterialProperty< std::vector< std::vector< RealVectorValue > > > & _dtauvel_SUPG_dv
derivative of SUPGtau*SUPGvel_i wrt variable_j
const MaterialProperty< std::vector< std::vector< std::vector< RealTensorValue > > > > & _d2flux_dgradvdv
d^2(Richards flux_i)/d(grad(variable_j))/d(variable_k), here flux_i is the i_th flux,...
unsigned int richards_var_num(unsigned int moose_var_num) const
the richards variable number
const MaterialProperty< std::vector< std::vector< std::vector< RealTensorValue > > > > & _d2flux_dvdgradv
d^2(Richards flux_i)/d(variable_j)/d(grad(variable_k)), here flux_i is the i_th flux,...
virtual Real computeQpResidual()
const MaterialProperty< std::vector< std::vector< std::vector< RealVectorValue > > > > & _d2flux_dvdv
d^2(Richards flux_i)/d(variable_j)/d(variable_k), here flux_i is the i_th flux, which is itself a Rea...
This holds maps between pressure_var or pressure_var, sat_var used in RichardsMaterial and kernels,...
registerMooseObject("RichardsApp", RichardsFlux)
const RichardsVarNames & _richards_name_UO
holds info regarding the names of the Richards variables and methods for extracting values of these v...
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _dtauvel_SUPG_dgradv
derivative of SUPGtau*SUPGvel_i wrt grad(variable_j)
InputParameters validParams< RichardsFlux >()
RichardsFlux(const InputParameters ¶meters)
const VariablePhiSecond & _second_phi
interpolation function for the _second_u
Real computeQpJac(unsigned int wrt_num)
Computes diagonal and off-diagonal jacobian entries.
const VariableSecond & _second_u
grad_i grad_j porepressure. This is used in SUPG
const MaterialProperty< std::vector< std::vector< RealVectorValue > > > & _dflux_dv
d(Richards flux_i)/d(variable_j), here flux_i is the i_th flux, which is itself a RealVectorValue
const MaterialProperty< std::vector< RealVectorValue > > & _flux
Richards flux.
bool not_richards_var(unsigned int moose_var_num) const
returns true if moose_var_num is not a richards var
unsigned int _pvar
the index of this variable in the list of Richards variables held by _richards_name_UO.
virtual Real computeQpJacobian()