21 "Specific heat capacity of the rock grains (J/kg/K).");
23 params.
set<
bool>(
"at_nodes") = is_ad ?
false :
true;
24 params.
addPrivateParam<std::string>(
"pf_material_type",
"matrix_internal_energy");
25 params.
addClassDescription(
"This Material calculates the internal energy of solid rock grains, " 26 "which is specific_heat_capacity * density * temperature. Kernels " 27 "multiply this by (1 - porosity) to find the energy density of the " 28 "porous rock in a rock-fluid system");
36 _cp(getParam<
Real>(
"specific_heat_capacity")),
37 _density(getParam<
Real>(
"density")),
38 _heat_cap(_cp * _density),
39 _temperature(is_ad ? getGenericMaterialProperty<
Real, is_ad>(
"PorousFlow_temperature_qp")
40 : getGenericMaterialProperty<
Real, is_ad>(
"PorousFlow_temperature_nodal")),
43 : &getMaterialProperty<
std::vector<
Real>>(
"dPorousFlow_temperature_nodal_dvar")),
44 _energy(declareGenericProperty<
Real, is_ad>(
"PorousFlow_matrix_internal_energy_nodal")),
45 _denergy_dvar(is_ad ? nullptr
46 : &declareProperty<
std::vector<
Real>>(
47 "dPorousFlow_matrix_internal_energy_nodal_dvar"))
49 if (!is_ad && _nodal_material !=
true)
50 mooseError(
"PorousFlowMatrixInternalEnergy classes are only defined for at_nodes = true");
57 _energy[_qp] = _heat_cap * _temperature[_qp];
64 _energy[_qp] = _heat_cap * _temperature[_qp];
68 (*_denergy_dvar)[_qp].assign(_num_var, 0.0);
69 for (
unsigned v = 0;
v < _num_var; ++
v)
70 (*_denergy_dvar)[_qp][
v] = _heat_cap * (*_dtemperature_dvar)[_qp][
v];
This material computes internal energy (J/m^3) for a rock matrix assuming constant grain density...
PorousFlowMatrixInternalEnergyTempl(const InputParameters ¶meters)
void mooseError(Args &&... args)
static InputParameters validParams()
Base class for all PorousFlow vector materials.
virtual void initQpStatefulProperties() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string v
registerMooseObject("PorousFlowApp", PorousFlowMatrixInternalEnergy)
virtual void computeQpProperties() override
static InputParameters validParams()