https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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"
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");
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(getUserObject<UserObject>("user_object")),
36 _Hw(getADMaterialProperty<Real>("Hw")),
37 _T(getADMaterialProperty<Real>("T")),
38 _P_hf(adCoupledValue("P_hf"))
39{
40}
41
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)
DualNumber< Real, DNDerivativeType, true > ADReal
const ADTemplateVariableTestValue< T > & _test
static InputParameters validParams()
Computes heat source term for 1-phase flow channel coupled with a 3D heat structure.
const ADMaterialProperty< Real > & _T
Fluid temperature.
const ADVariableValue & _P_hf
Coupled heated perimeter variable.
const ADMaterialProperty< Real > & _Hw
Heat transfer coefficient.
const UserObject & _user_object
User object to be queried for the average wall temperature.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
const Elem *const & _current_elem
unsigned int _i
virtual Real spatialValue(const Point &) const