22 "Fluid temperature variable. Note, the default is suitable if your " 23 "simulation is using Kelvin units, but probably not for Celsius");
25 params.
addClassDescription(
"Material to provide temperature at the quadpoints or nodes and " 26 "derivatives of it with respect to the PorousFlow variables");
34 _num_pf_vars(_dictator.numVariables()),
35 _is_temp_nodal(isCoupled(
"temperature") ? getFieldVar(
"temperature", 0)->isNodal() : false),
36 _temperature_var(_nodal_material && _is_temp_nodal
37 ? coupledGenericDofValue<is_ad>(
"temperature")
38 : coupledGenericValue<is_ad>(
"temperature")),
39 _grad_temperature_var(_nodal_material ? nullptr
40 : &coupledGenericGradient<is_ad>(
"temperature")),
41 _temperature_is_PF(_dictator.isPorousFlowVariable(coupled(
"temperature"))),
42 _t_var_num(_temperature_is_PF ? _dictator.porousFlowVariableNum(coupled(
"temperature")) : 0),
44 _temperature(_nodal_material
45 ? declareGenericProperty<
Real, is_ad>(
"PorousFlow_temperature_nodal")
46 : declareGenericProperty<
Real, is_ad>(
"PorousFlow_temperature_qp")),
50 ? &declareProperty<
std::vector<
Real>>(
"dPorousFlow_temperature_nodal_dvar")
51 : &declareProperty<
std::vector<
Real>>(
"dPorousFlow_temperature_qp_dvar")),
52 _grad_temperature((_nodal_material) ? nullptr
54 "PorousFlow_grad_temperature_qp")),
55 _dgrad_temperature_dgradv(
56 (_nodal_material || is_ad)
58 : &declareProperty<
std::vector<
Real>>(
"dPorousFlow_grad_temperature_qp_dgradvar")),
59 _dgrad_temperature_dv((_nodal_material || is_ad) ? nullptr
61 "dPorousFlow_grad_temperature_qp_dvar"))
69 computeQpProperties();
76 _temperature[_qp] = _temperature_var[_qp];
79 (*_grad_temperature)[_qp] = (*_grad_temperature_var)[_qp];
83 (*_dtemperature_dvar)[_qp].assign(_num_pf_vars, 0.0);
84 if (_temperature_is_PF)
86 (*_dtemperature_dvar)[_qp][_t_var_num] = 1.0;
90 (*_dgrad_temperature_dgradv)[_qp].assign(_num_pf_vars, 0.0);
91 (*_dgrad_temperature_dv)[_qp].assign(_num_pf_vars,
RealGradient());
92 if (_temperature_is_PF)
93 (*_dgrad_temperature_dgradv)[_qp][_t_var_num] = 1.0;
PorousFlowMaterial is the base class for all PorousFlow Materials It allows users to specify that the...
Creates temperature Materials.
PorousFlowTemperatureTempl(const InputParameters ¶meters)
registerMooseObject("PorousFlowApp", PorousFlowTemperature)
static InputParameters validParams()
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void computeQpProperties() override
virtual void initQpStatefulProperties() override