Line data Source code
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 : 10 : #include "HeatRateExternalAppConvectionRZ.h" 11 : #include "Function.h" 12 : 13 : registerMooseObject("ThermalHydraulicsApp", HeatRateExternalAppConvectionRZ); 14 : 15 : InputParameters 16 30 : HeatRateExternalAppConvectionRZ::validParams() 17 : { 18 30 : InputParameters params = SideIntegralPostprocessor::validParams(); 19 30 : params += RZSymmetry::validParams(); 20 : 21 60 : params.addRequiredCoupledVar("T", "Temperature"); 22 60 : params.addRequiredCoupledVar("T_ext", "Temperature from external application"); 23 60 : params.addRequiredCoupledVar("htc_ext", "Heat transfer coefficient from external application"); 24 60 : params.addParam<FunctionName>("scale", 1.0, "Function by which to scale the heat flux"); 25 : 26 30 : params.addClassDescription("Integrates a cylindrical heat structure boundary convective heat " 27 : "flux from an external application"); 28 : 29 30 : return params; 30 0 : } 31 : 32 12 : HeatRateExternalAppConvectionRZ::HeatRateExternalAppConvectionRZ(const InputParameters & parameters) 33 : : SideIntegralPostprocessor(parameters), 34 : RZSymmetry(this, parameters), 35 : 36 12 : _T(coupledValue("T")), 37 12 : _T_ext(coupledValue("T_ext")), 38 12 : _htc_ext(coupledValue("htc_ext")), 39 24 : _scale_fn(getFunction("scale")) 40 : { 41 12 : } 42 : 43 : Real 44 600 : HeatRateExternalAppConvectionRZ::computeQpIntegral() 45 : { 46 600 : const Real circumference = computeCircumference(_q_point[_qp]); 47 600 : return _scale_fn.value(_t, _q_point[_qp]) * circumference * _htc_ext[_qp] * 48 600 : (_T_ext[_qp] - _T[_qp]); 49 : }