https://mooseframework.inl.gov
ADTemperatureWall3EqnMaterial.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 
12 registerMooseObject("ThermalHydraulicsApp", ADTemperatureWall3EqnMaterial);
13 
16 {
18  params.addClassDescription("Computes the wall temperature from the fluid temperature, "
19  "the heat flux and the heat transfer coefficient");
20  params.addRequiredParam<MaterialPropertyName>("T", "Fluid temperature");
21  params.addRequiredParam<MaterialPropertyName>("Hw", "Heat transfer coefficient");
22  params.addRequiredParam<MaterialPropertyName>("q_wall", "Wall heat flux");
23 
24  return params;
25 }
26 
28  : Material(parameters),
29  _T_wall(declareADProperty<Real>("T_wall")),
30  _q_wall(getADMaterialProperty<Real>("q_wall")),
31  _Hw(getADMaterialProperty<Real>("Hw")),
32  _T(getADMaterialProperty<Real>("T"))
33 {
34 }
35 
36 void
38 {
39  if (_q_wall[_qp] == 0)
40  _T_wall[_qp] = _T[_qp];
41  else
42  {
43  mooseAssert(_Hw[_qp] != 0,
44  "The wall heat transfer coefficient is zero, yet the wall heat flux is nonzero.");
45  _T_wall[_qp] = _q_wall[_qp] / _Hw[_qp] + _T[_qp];
46  }
47 }
Computes T_wall from the constitutive model.
registerMooseObject("ThermalHydraulicsApp", ADTemperatureWall3EqnMaterial)
ADMaterialProperty< Real > & _T_wall
Wall temperature.
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _qp
static InputParameters validParams()
const ADMaterialProperty< Real > & _Hw
Heat transfer coefficient.
ADTemperatureWall3EqnMaterial(const InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
const ADMaterialProperty< Real > & _q_wall
Wall heat flux.
const ADMaterialProperty< Real > & _T
Fluid temperature.