https://mooseframework.inl.gov
ADOneDEnergyWallHeating.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", ADOneDEnergyWallHeating);
13 
16 {
18  params.addRequiredCoupledVar("P_hf", "heat flux perimeter");
19  params.addCoupledVar("T_wall", "Wall temperature as a variable");
20  params.addRequiredParam<MaterialPropertyName>("Hw",
21  "Convective heat transfer coefficient, W/m^2-K");
22  params.addRequiredParam<MaterialPropertyName>("T", "Temperature material property");
23  params.addClassDescription(
24  "Computes a convective heat flux term for the energy equation for 1-phase flow");
25 
26  return params;
27 }
28 
30  : ADKernel(parameters),
31  _temperature(getADMaterialProperty<Real>("T")),
32  _Hw(getADMaterialProperty<Real>("Hw")),
33  _T_wall(adCoupledValue("T_wall")),
34  _P_hf(adCoupledValue("P_hf"))
35 {
36 }
37 
38 ADReal
40 {
41  return _Hw[_qp] * _P_hf[_qp] * (_temperature[_qp] - _T_wall[_qp]) * _test[_i][_qp];
42 }
static InputParameters validParams()
const ADVariableValue & _T_wall
ADOneDEnergyWallHeating(const InputParameters &parameters)
const ADTemplateVariableTestValue< T > & _test
DualNumber< Real, DNDerivativeType, true > ADReal
void addRequiredParam(const std::string &name, const std::string &doc_string)
registerMooseObject("ThermalHydraulicsApp", ADOneDEnergyWallHeating)
unsigned int _i
static InputParameters validParams()
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
const ADMaterialProperty< Real > & _temperature
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
const ADMaterialProperty< Real > & _Hw
const ADVariableValue & _P_hf
unsigned int _qp