LCOV - code coverage report
Current view: top level - src/ics - SCMQuadWettedPerimIC.C (source / functions) Hit Total Coverage
Test: idaholab/moose subchannel: #31706 (f8ed4a) with base bb0a08 Lines: 18 19 94.7 %
Date: 2025-11-03 17:29:21 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 "SCMQuadWettedPerimIC.h"
      11             : #include "QuadSubChannelMesh.h"
      12             : 
      13             : registerMooseObject("SubChannelApp", SCMQuadWettedPerimIC);
      14             : registerMooseObjectRenamed("SubChannelApp",
      15             :                            QuadWettedPerimIC,
      16             :                            "06/30/2025 24:00",
      17             :                            SCMQuadWettedPerimIC);
      18             : 
      19             : InputParameters
      20         458 : SCMQuadWettedPerimIC::validParams()
      21             : {
      22         458 :   InputParameters params = QuadSubChannelBaseIC::validParams();
      23         458 :   params.addClassDescription(
      24             :       "Computes wetted perimeter of subchannels in a square lattice arrangement");
      25         458 :   return params;
      26           0 : }
      27             : 
      28         244 : SCMQuadWettedPerimIC::SCMQuadWettedPerimIC(const InputParameters & params)
      29         244 :   : QuadSubChannelBaseIC(params)
      30             : {
      31         244 : }
      32             : 
      33             : Real
      34      102032 : SCMQuadWettedPerimIC::value(const Point & p)
      35             : {
      36      102032 :   auto pitch = _mesh.getPitch();
      37      102032 :   auto pin_diameter = _mesh.getPinDiameter();
      38      102032 :   auto side_gap = _mesh.getSideGap();
      39      102032 :   auto rod_circumference = M_PI * pin_diameter;
      40      102032 :   auto i = _mesh.getSubchannelIndexFromPoint(p);
      41      102032 :   auto subch_type = _mesh.getSubchannelType(i);
      42             : 
      43      102032 :   if (subch_type == EChannelType::CORNER)
      44       19160 :     return 0.25 * rod_circumference + pitch + 2 * side_gap;
      45       82872 :   else if (subch_type == EChannelType::EDGE)
      46       44448 :     return 0.5 * rod_circumference + pitch;
      47             :   else
      48             :     return rod_circumference;
      49             : }

Generated by: LCOV version 1.14