https://mooseframework.inl.gov
PorousFlowFullySaturatedHeatAdvection.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
14 
15 template <bool is_ad>
18 {
20  params.addClassDescription("Heat flux that arises from the advection of a fully-saturated single "
21  "phase fluid. No upwinding is used");
22  return params;
23 }
24 
25 template <bool is_ad>
27  const InputParameters & parameters)
28  : PorousFlowFullySaturatedDarcyBaseTempl<is_ad>(parameters),
29  _enthalpy(this->template getGenericMaterialProperty<std::vector<Real>, is_ad>(
30  "PorousFlow_fluid_phase_enthalpy_qp")),
31  _denthalpy_dvar(is_ad ? nullptr
32  : &this->template getMaterialProperty<std::vector<std::vector<Real>>>(
33  "dPorousFlow_fluid_phase_enthalpy_qp_dvar"))
34 {
35 }
36 
37 template <bool is_ad>
40 {
41  const unsigned ph = 0;
42  return _enthalpy[_qp][ph] * PorousFlowFullySaturatedDarcyBaseTempl<is_ad>::mobility();
43 }
44 
45 template <bool is_ad>
46 Real
48 {
49  if constexpr (!is_ad)
50  {
51  const unsigned ph = 0;
54  return (*_denthalpy_dvar)[_qp][ph][pvar] * darcy_mob + _enthalpy[_qp][ph] * ddarcy_mob;
55  }
56  else
57  libmesh_ignore(pvar);
58  return 0.0;
59 }
60 
Moose::GenericType< Real, is_ad > GenericReal
virtual Real dmobility(unsigned int pvar) const
d(mobility)/d(PorousFlow variable pvar) – only used on the non-AD path
virtual GenericReal< is_ad > mobility() const
Fluid mobility = (density *) 1/viscosity. Virtual so DarcyFlow can multiply by mass frac...
void libmesh_ignore(const Args &...)
PorousFlowFullySaturatedHeatAdvectionTempl(const InputParameters &parameters)
virtual GenericReal< is_ad > mobility() const override
Fluid mobility = (density *) 1/viscosity. Virtual so DarcyFlow can multiply by mass frac...
Darcy advective flux for a fully-saturated, single-phase, single-component fluid. ...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
virtual Real dmobility(unsigned pvar) const override
registerMooseObject("PorousFlowApp", PorousFlowFullySaturatedHeatAdvection)
Advection of heat via flux via Darcy flow of a single phase fully-saturated fluid.