LCOV - code coverage report
Current view: top level - src/scmclosures - SCMHTCSchadModified.C (source / functions) Hit Total Coverage
Test: idaholab/moose subchannel: #33359 (04c914) with base 7b3324 Lines: 21 26 80.8 %
Date: 2026-07-16 14:35:07 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 "SCMHTCSchadModified.h"
      11             : 
      12             : registerMooseObject("SubChannelApp", SCMHTCSchadModified);
      13             : 
      14             : InputParameters
      15          79 : SCMHTCSchadModified::validParams()
      16             : {
      17          79 :   InputParameters params = SCMHTCClosureBase::validParams();
      18          79 :   params.addClassDescription(
      19             :       "Class that computes the convective heat transfer coefficient using the "
      20             :       "Schad-Modified correlation. Only use for fuel-pins.");
      21          79 :   return params;
      22           0 : }
      23             : 
      24          44 : SCMHTCSchadModified::SCMHTCSchadModified(const InputParameters & parameters)
      25          44 :   : SCMHTCClosureBase(parameters)
      26             : {
      27             :   // Check that the correlation not used for the duct (not supported yet)
      28          44 :   if (const auto * duct_uo = _scm_problem.getDuctHTCClosure(); duct_uo && duct_uo == this)
      29           0 :     mooseError("'Schad-Modified' is not yet supported for the 'duct_htc_correlation'.");
      30          44 : }
      31             : 
      32             : Real
      33       57456 : SCMHTCSchadModified::computeNusseltNumber(const FrictionStruct & /*friction_args*/,
      34             :                                           const NusseltStruct & nusselt_args) const
      35             : {
      36       57456 :   const auto pre = computeNusseltNumberPreInfo(nusselt_args);
      37       57456 :   const auto Pe = pre.Re * pre.Pr;
      38       57456 :   const auto turbulent_Pe = turbulentReynoldsNumber(pre) * pre.Pr;
      39             : 
      40       57456 :   if (pre.poD < 1.1 || pre.poD > 1.5)
      41           0 :     flagSolutionWarning(
      42             :         "Pitch over pin diameter ratio out of range for the Schad-Modified correlation.");
      43             : 
      44       57456 :   if (Pe < 150)
      45       48724 :     flagSolutionWarning(
      46             :         "Peclet number (Pe) below recommended range for the Schad-Modified correlation.");
      47        8736 :   else if (Pe > 1000)
      48           0 :     flagSolutionWarning(
      49             :         "Peclet number (Pe) above recommended range for the Schad-Modified correlation.");
      50             : 
      51       57456 :   const Real poly = -16.15 + 24.96 * pre.poD - 8.55 * Utility::pow<2>(pre.poD);
      52             :   auto NuT = 0.0;
      53       57456 :   if (turbulent_Pe <= 1000 && turbulent_Pe >= 150)
      54             :   {
      55        8736 :     NuT = poly * std::pow(turbulent_Pe, 0.3);
      56             :   }
      57             :   else if (turbulent_Pe < 150)
      58             :   {
      59       48720 :     NuT = poly * 4.496;
      60             :   }
      61             :   else
      62             :   {
      63           0 :     NuT = poly * std::pow(turbulent_Pe, 0.3);
      64             :   }
      65             : 
      66       57456 :   return blendTurbulentNusseltNumber(pre, NuT);
      67             : }

Generated by: LCOV version 1.14