https://mooseframework.inl.gov
ADOneD3EqnEnergyHeatFlux.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 
12 
13 registerMooseObject("ThermalHydraulicsApp", ADOneD3EqnEnergyHeatFlux);
14 
17 {
19  params.addClassDescription("Computes a heat flux term for the energy equation in a flow channel");
20  return params;
21 }
22 
24  : ADOneDHeatFluxBase(parameters)
25 {
26 }
27 
28 ADReal
30 {
31  const std::vector<ADReal> & q_wall = _q_uo.getHeatFlux(_current_elem->id());
32  const std::vector<ADReal> & P_hf = _q_uo.getHeatedPerimeter(_current_elem->id());
33  return -q_wall[_qp] * P_hf[_qp] * _test[_i][_qp];
34 }
virtual ADReal computeQpResidual() override
const std::vector< ADReal > & getHeatFlux(dof_id_type element_id) const
registerMooseObject("ThermalHydraulicsApp", ADOneD3EqnEnergyHeatFlux)
const ADTemplateVariableTestValue< T > & _test
DualNumber< Real, DNDerivativeType, true > ADReal
static InputParameters validParams()
const std::vector< ADReal > & getHeatedPerimeter(dof_id_type element_id) const
static InputParameters validParams()
unsigned int _i
ADOneD3EqnEnergyHeatFlux(const InputParameters &parameters)
void addClassDescription(const std::string &doc_string)
const ADHeatFluxFromHeatStructureBaseUserObject & _q_uo
User object that computes the heat flux.
const Elem *const & _current_elem
unsigned int _qp