LCOV - code coverage report
Current view: top level - src/components - HeatStructureCylindricalBase.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #32971 (54bef8) with base c6cf66 Lines: 22 24 91.7 %
Date: 2026-05-29 20:41:18 Functions: 6 6 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 "HeatStructureCylindricalBase.h"
      11             : 
      12             : InputParameters
      13        1452 : HeatStructureCylindricalBase::validParams()
      14             : {
      15        1452 :   InputParameters params = HeatStructureBase::validParams();
      16        2904 :   params.addParam<bool>(
      17        2904 :       "offset_mesh_by_inner_radius", false, "Offset the mesh by the inner radius?");
      18        1452 :   return params;
      19           0 : }
      20             : 
      21         726 : HeatStructureCylindricalBase::HeatStructureCylindricalBase(const InputParameters & params)
      22         726 :   : HeatStructureBase(params)
      23             : {
      24         726 : }
      25             : 
      26             : void
      27         726 : HeatStructureCylindricalBase::setupMesh()
      28             : {
      29         726 :   _axial_offset = _inner_radius;
      30             : 
      31         726 :   HeatStructureBase::setupMesh();
      32         726 : }
      33             : 
      34             : Real
      35         364 : HeatStructureCylindricalBase::getUnitPerimeter(const ExternalBoundaryType & side) const
      36             : {
      37         364 :   switch (side)
      38             :   {
      39         257 :     case ExternalBoundaryType::OUTER:
      40         257 :       return 2 * M_PI * (_inner_radius + _total_width);
      41             : 
      42         105 :     case ExternalBoundaryType::INNER:
      43         105 :       return 2 * M_PI * _inner_radius;
      44             : 
      45             :     case ExternalBoundaryType::START:
      46             :     case ExternalBoundaryType::END:
      47             :       return std::numeric_limits<Real>::quiet_NaN();
      48             :   }
      49             : 
      50           0 :   mooseError(name(), ": Unknown value of 'side' parameter.");
      51             : }
      52             : 
      53             : Real
      54        2492 : HeatStructureCylindricalBase::computeRadialBoundaryArea(const Real & length, const Real & y) const
      55             : {
      56        2492 :   return length * 2 * libMesh::pi * (_inner_radius + y);
      57             : }
      58             : 
      59             : Real
      60        2833 : HeatStructureCylindricalBase::computeAxialBoundaryArea(const Real & y_min, const Real & y_max) const
      61             : {
      62        2833 :   return libMesh::pi * (std::pow(_inner_radius + y_max, 2) - std::pow(_inner_radius + y_min, 2));
      63             : }

Generated by: LCOV version 1.14