www.mooseframework.org
ConvectiveHeatTransferSideIntegral.C
Go to the documentation of this file.
2 
4 
5 template <>
6 InputParameters
8 {
9  InputParameters params = validParams<SideIntegralPostprocessor>();
10  params.addClassDescription("Computes the total convective heat transfer across a boundary.");
11 
12  params.addRequiredCoupledVar("T_solid", "The solid temperature.");
13  params.addCoupledVar("T_fluid_var", "The fluid temperature.");
14  params.addCoupledVar("htc_var", "HTC variable");
15  params.addParam<MaterialPropertyName>("T_fluid",
16  "Name of the fluid temperature material property");
17  params.addParam<MaterialPropertyName>("htc", "Name of alpha_wall material property");
18  return params;
19 }
20 
22  const InputParameters & parameters)
23  : SideIntegralPostprocessor(parameters),
24  _T_wall(coupledValue("T_solid")),
25  _T_fluid(isCoupled("T_fluid_var") ? &coupledValue("T_fluid_var") : nullptr),
26  _T_fluid_mat(isParamValid("T_fluid") ? &getMaterialProperty<Real>("T_fluid") : nullptr),
27  _hw(isCoupled("htc_var") ? &coupledValue("htc_var") : nullptr),
28  _hw_mat(isParamValid("htc") ? &getMaterialProperty<Real>("htc") : nullptr)
29 {
30  if (isCoupled("htc_var") == isParamValid("htc"))
31  paramError("htc", "Either htc_var OR htc must be provided (exactly one, not both).");
32 
33  if (isCoupled("T_fluid_var") == isParamValid("T_fluid"))
34  paramError("T_fluid",
35  "Either ",
36  "T_fluid",
37  " OR ",
38  "T_fluid_var",
39  " must be provided (exactly one, not both).");
40 }
41 
42 Real
44 {
45  Real hw;
46  if (_hw)
47  hw = (*_hw)[_qp];
48  else
49  hw = (*_hw_mat)[_qp];
50 
51  Real Tf;
52  if (_T_fluid)
53  Tf = (*_T_fluid)[_qp];
54  else
55  Tf = (*_T_fluid_mat)[_qp];
56 
57  return hw * (_T_wall[_qp] - Tf);
58 }
ConvectiveHeatTransferSideIntegral::_T_wall
const VariableValue & _T_wall
wall temperature variable
Definition: ConvectiveHeatTransferSideIntegral.h:23
ConvectiveHeatTransferSideIntegral::_hw
const VariableValue * _hw
the heat transfer coefficient variable
Definition: ConvectiveHeatTransferSideIntegral.h:32
validParams< ConvectiveHeatTransferSideIntegral >
InputParameters validParams< ConvectiveHeatTransferSideIntegral >()
Definition: ConvectiveHeatTransferSideIntegral.C:7
ConvectiveHeatTransferSideIntegral::ConvectiveHeatTransferSideIntegral
ConvectiveHeatTransferSideIntegral(const InputParameters &parameters)
Definition: ConvectiveHeatTransferSideIntegral.C:21
ConvectiveHeatTransferSideIntegral
Computes the total convective heat transfer across a boundary.
Definition: ConvectiveHeatTransferSideIntegral.h:14
ConvectiveHeatTransferSideIntegral::computeQpIntegral
virtual Real computeQpIntegral() override
Definition: ConvectiveHeatTransferSideIntegral.C:43
ConvectiveHeatTransferSideIntegral.h
ConvectiveHeatTransferSideIntegral::_T_fluid
const VariableValue * _T_fluid
fluid temperature variable
Definition: ConvectiveHeatTransferSideIntegral.h:26
registerMooseObject
registerMooseObject("HeatConductionApp", ConvectiveHeatTransferSideIntegral)