https://mooseframework.inl.gov
ADOneD3EqnEnergyHeatFluxFromHeatStructure3D.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 #include "THMIndicesVACE.h"
13 #include "FlowModelSinglePhase.h"
14 #include "HeatConductionModel.h"
15 
17 
20 {
22  params.addRequiredParam<UserObjectName>("user_object",
23  "Layered average wall temperature user object");
24  params.addRequiredParam<MaterialPropertyName>("T", "Fluid temperature");
25  params.addRequiredParam<MaterialPropertyName>("Hw", "Convective heat transfer coefficient");
26  params.addRequiredCoupledVar("P_hf", "Heat flux perimeter");
27  params.addClassDescription(
28  "Computes a heat flux term from a 3D heat structure in the energy equation for 1-phase flow");
29  return params;
30 }
31 
33  const InputParameters & parameters)
34  : ADKernel(parameters),
35  _user_object(getUserObjectBase("user_object")),
36  _Hw(getADMaterialProperty<Real>("Hw")),
37  _T(getADMaterialProperty<Real>("T")),
38  _P_hf(adCoupledValue("P_hf"))
39 {
40 }
41 
42 ADReal
44 {
45  const Real T_wall = _user_object.spatialValue(_current_elem->vertex_average());
46  return _Hw[_qp] * (_T[_qp] - T_wall) * _P_hf[_qp] * _test[_i][_qp];
47 }
registerMooseObject("ThermalHydraulicsApp", ADOneD3EqnEnergyHeatFluxFromHeatStructure3D)
const ADVariableValue & _P_hf
Coupled heated perimeter variable.
Computes heat source term for 1-phase flow channel coupled with a 3D heat structure.
const ADTemplateVariableTestValue< T > & _test
const UserObject & _user_object
User object to be queried for the average wall temperature.
DualNumber< Real, DNDerivativeType, true > ADReal
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _i
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
const ADMaterialProperty< Real > & _Hw
Heat transfer coefficient.
virtual Real spatialValue(const Point &) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const ADMaterialProperty< Real > & _T
Fluid temperature.
void addClassDescription(const std::string &doc_string)
const Elem *const & _current_elem
unsigned int _qp