LCOV - code coverage report
Current view: top level - src/bcs - InfiniteCylinderRadiativeBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose heat_transfer: #31405 (292dce) with base fef103 Lines: 20 21 95.2 %
Date: 2025-09-04 07:53:51 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 "InfiniteCylinderRadiativeBC.h"
      11             : #include "MathUtils.h"
      12             : 
      13             : registerMooseObject("HeatTransferApp", InfiniteCylinderRadiativeBC);
      14             : registerMooseObject("HeatTransferApp", ADInfiniteCylinderRadiativeBC);
      15             : 
      16             : template <bool is_ad>
      17             : InputParameters
      18         101 : InfiniteCylinderRadiativeBCTempl<is_ad>::validParams()
      19             : {
      20         101 :   InputParameters params = RadiativeHeatFluxBCBaseTempl<is_ad>::validParams();
      21         202 :   params.addRequiredParam<Real>("boundary_emissivity", "Emissivity of the boundary.");
      22         202 :   params.addParam<Real>("cylinder_emissivity",
      23         202 :                         1,
      24             :                         "Emissivity of the cylinder in radiative heat transfer with the boundary.");
      25         202 :   params.addRequiredParam<Real>("boundary_radius",
      26             :                                 "Radius of the boundary approximated as cylinder.");
      27         202 :   params.addRequiredParam<Real>("cylinder_radius",
      28             :                                 "Radius of the cylinder on the outside of the boundary.");
      29         101 :   params.addClassDescription("Boundary condition for radiative heat exchange with a cylinder"
      30             :                              "where the boundary is approximated as a cylinder as well.");
      31         101 :   return params;
      32           0 : }
      33             : 
      34             : template <bool is_ad>
      35          55 : InfiniteCylinderRadiativeBCTempl<is_ad>::InfiniteCylinderRadiativeBCTempl(
      36             :     const InputParameters & parameters)
      37             :   : RadiativeHeatFluxBCBaseTempl<is_ad>(parameters),
      38          55 :     _eps_boundary(this->template getParam<Real>("boundary_emissivity")),
      39         110 :     _eps_cylinder(this->template getParam<Real>("cylinder_emissivity")),
      40         110 :     _boundary_radius(this->template getParam<Real>("boundary_radius")),
      41         165 :     _cylinder_radius(this->template getParam<Real>("cylinder_radius"))
      42             : {
      43          55 :   _coefficient = this->_eps_boundary * _eps_cylinder * _cylinder_radius /
      44          55 :                  (_eps_cylinder * _cylinder_radius +
      45          55 :                   this->_eps_boundary * _boundary_radius * (1 - _eps_cylinder));
      46          55 : }
      47             : 
      48             : template <bool is_ad>
      49             : GenericReal<is_ad>
      50       10384 : InfiniteCylinderRadiativeBCTempl<is_ad>::coefficient() const
      51             : {
      52       10384 :   return _coefficient;
      53             : }
      54             : 
      55             : template class InfiniteCylinderRadiativeBCTempl<false>;
      56             : template class InfiniteCylinderRadiativeBCTempl<true>;

Generated by: LCOV version 1.14