https://mooseframework.inl.gov
Loading...
Searching...
No Matches
TemperatureWall3EqnMaterial.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.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(declareProperty<Real>("T_wall")),
30 _q_wall(getMaterialProperty<Real>("q_wall")),
31 _Hw(getMaterialProperty<Real>("Hw")),
32 _T(getMaterialProperty<Real>("T"))
33{
34}
35
36void
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}
registerMooseObject("ThermalHydraulicsApp", TemperatureWall3EqnMaterial)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
static InputParameters validParams()
Computes T_wall from the constitutive model.
const MaterialProperty< Real > & _T
Fluid temperature.
TemperatureWall3EqnMaterial(const InputParameters &parameters)
MaterialProperty< Real > & _T_wall
Wall temperature.
const MaterialProperty< Real > & _q_wall
Wall heat flux.
const MaterialProperty< Real > & _Hw
Heat transfer coefficient.