20 params.
addClassDescription(
"Heat advection by a fluid. The fluid is assumed to have a single "
21 "phase, and the advection is fully upwinded");
29 _enthalpy(this->template getGenericMaterialProperty<
std::vector<Real>, is_ad>(
30 "PorousFlow_fluid_phase_enthalpy_nodal")),
31 _denthalpy_dvar(is_ad ? nullptr
32 : &this->template getMaterialProperty<
std::vector<
std::vector<Real>>>(
33 "dPorousFlow_fluid_phase_enthalpy_nodal_dvar"))
36 mooseError(
"PorousFlowFullySaturatedUpwindHeatAdvection should not be used for multi-phase "
37 "scenarios as it does not include relative-permeability effects");
45 return _enthalpy[nodenum][phase] * _fluid_density_node[nodenum][phase] /
46 _fluid_viscosity[nodenum][phase];
57 Real
dm = (*_denthalpy_dvar)[nodenum][phase][pvar] * _fluid_density_node[nodenum][phase] /
58 _fluid_viscosity[nodenum][phase];
59 dm += _enthalpy[nodenum][phase] * (*_dfluid_density_node_dvar)[nodenum][phase][pvar] /
60 _fluid_viscosity[nodenum][phase];
61 dm -= _enthalpy[nodenum][phase] * _fluid_density_node[nodenum][phase] *
62 (*_dfluid_viscosity_dvar)[nodenum][phase][pvar] /
63 Utility::pow<2>(_fluid_viscosity[nodenum][phase]);
67 libmesh_ignore(nodenum, phase, pvar);
Moose::GenericType< Real, is_ad > GenericReal
PetscErrorCode PetscOptionItems *PetscErrorCode DM dm
registerMooseObject("PorousFlowApp", PorousFlowFullySaturatedUpwindHeatAdvection)
void mooseError(Args &&... args) const
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
static InputParameters validParams()
unsigned int numPhases() const
The number of fluid phases.
Advection of heat via flux of a single-phase fluid.
virtual Real dmobility(unsigned nodenum, unsigned phase, unsigned pvar) const override
The derivative of mobility with respect to PorousFlow variable pvar – non-AD path only.
virtual GenericReal< is_ad > mobility(unsigned nodenum, unsigned phase) const override
The mobility of the fluid.
static InputParameters validParams()