https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
15template <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
25template <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
37template <bool is_ad>
40{
41 const unsigned ph = 0;
43}
44
45template <bool is_ad>
46Real
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
registerMooseObject("PorousFlowApp", PorousFlowFullySaturatedHeatAdvection)
void addClassDescription(const std::string &doc_string)
Darcy advective flux for a fully-saturated, single-phase, single-component fluid.
virtual GenericReal< is_ad > mobility() const
Fluid mobility = (density *) 1/viscosity. Virtual so DarcyFlow can multiply by mass frac.
virtual Real dmobility(unsigned int pvar) const
d(mobility)/d(PorousFlow variable pvar) – only used on the non-AD path
Advection of heat via flux via Darcy flow of a single phase fully-saturated fluid.
PorousFlowFullySaturatedHeatAdvectionTempl(const InputParameters &parameters)
virtual GenericReal< is_ad > mobility() const override
Fluid mobility = (density *) 1/viscosity. Virtual so DarcyFlow can multiply by mass frac.