LCOV - code coverage report
Current view: top level - src/postprocessors - HeatRateExternalAppConvectionRZ.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #32971 (54bef8) with base c6cf66 Lines: 19 20 95.0 %
Date: 2026-05-29 20:41:18 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.14