LCOV - code coverage report
Current view: top level - src/ics - SCMQuadWettedPerimIC.C (source / functions) Hit Total Coverage
Test: idaholab/moose subchannel: #31405 (292dce) with base fef103 Lines: 18 19 94.7 %
Date: 2025-09-04 07:58:06 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         282 : SCMQuadWettedPerimIC::validParams()
      21             : {
      22         282 :   InputParameters params = QuadSubChannelBaseIC::validParams();
      23         282 :   params.addClassDescription(
      24             :       "Computes wetted perimeter of subchannels in a square lattice arrangement");
      25         282 :   return params;
      26           0 : }
      27             : 
      28         149 : SCMQuadWettedPerimIC::SCMQuadWettedPerimIC(const InputParameters & params)
      29         149 :   : QuadSubChannelBaseIC(params)
      30             : {
      31         149 : }
      32             : 
      33             : Real
      34       98432 : SCMQuadWettedPerimIC::value(const Point & p)
      35             : {
      36       98432 :   auto pitch = _mesh.getPitch();
      37       98432 :   auto pin_diameter = _mesh.getPinDiameter();
      38       98432 :   auto side_gap = _mesh.getSideGap();
      39       98432 :   auto rod_circumference = M_PI * pin_diameter;
      40       98432 :   auto i = _mesh.getSubchannelIndexFromPoint(p);
      41       98432 :   auto subch_type = _mesh.getSubchannelType(i);
      42             : 
      43       98432 :   if (subch_type == EChannelType::CORNER)
      44       15560 :     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