https://mooseframework.inl.gov
ADHeatFluxFromHeatStructure3EqnUserObject.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 
13 
16 {
18  params.addRequiredParam<MaterialPropertyName>("T_wall", "Wall temperature");
19  params.addRequiredParam<MaterialPropertyName>("T", "Fluid temperature");
20  params.addRequiredParam<MaterialPropertyName>("Hw", "Convective heat transfer coefficient");
21  params.addParam<MooseFunctorName>("scale", 1.0, "Functor by which to scale the heat flux");
22  params.addClassDescription(
23  "Cache the heat flux between a single phase flow channel and a heat structure");
24  return params;
25 }
26 
28  const InputParameters & parameters)
30  _T_wall(getADMaterialProperty<Real>("T_wall")),
31  _Hw(getADMaterialProperty<Real>("Hw")),
32  _T(getADMaterialProperty<Real>("T")),
33  _scale(getFunctor<ADReal>("scale"))
34 {
35 }
36 
37 ADReal
39 {
40  const Moose::ElemQpArg space_arg = {_current_elem, _qp, _qrule, _q_point[_qp]};
41  return _Hw[_qp] * (_T_wall[_qp] - _T[_qp]) * _scale(space_arg, Moose::currentState());
42 }
const MooseArray< Point > & _q_point
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const Moose::Functor< ADReal > & _scale
Functor by which to scale the heat flux.
DualNumber< Real, DNDerivativeType, true > ADReal
unsigned int _qp
Flow channel quadrature point index.
void addRequiredParam(const std::string &name, const std::string &doc_string)
Base class for caching heat flux between a flow channel and a heat structure.
ADHeatFluxFromHeatStructure3EqnUserObject(const InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const QBase *const & _qrule
const Elem *const & _current_elem
void addClassDescription(const std::string &doc_string)
StateArg currentState()
registerMooseObject("ThermalHydraulicsApp", ADHeatFluxFromHeatStructure3EqnUserObject)
Cache the heat flux between a single phase flow channel and a heat structure.