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 51 : InfiniteCylinderRadiativeBCTempl<is_ad>::validParams() 19 : { 20 51 : InputParameters params = RadiativeHeatFluxBCBaseTempl<is_ad>::validParams(); 21 102 : params.addRequiredParam<Real>("boundary_emissivity", "Emissivity of the boundary."); 22 102 : params.addParam<Real>("cylinder_emissivity", 23 102 : 1, 24 : "Emissivity of the cylinder in radiative heat transfer with the boundary."); 25 102 : params.addRequiredParam<Real>("boundary_radius", 26 : "Radius of the boundary approximated as cylinder."); 27 102 : params.addRequiredParam<Real>("cylinder_radius", 28 : "Radius of the cylinder on the outside of the boundary."); 29 51 : params.addClassDescription("Boundary condition for radiative heat exchange with a cylinder" 30 : "where the boundary is approximated as a cylinder as well."); 31 51 : return params; 32 0 : } 33 : 34 : template <bool is_ad> 35 27 : InfiniteCylinderRadiativeBCTempl<is_ad>::InfiniteCylinderRadiativeBCTempl( 36 : const InputParameters & parameters) 37 : : RadiativeHeatFluxBCBaseTempl<is_ad>(parameters), 38 27 : _eps_boundary(this->template getParam<Real>("boundary_emissivity")), 39 54 : _eps_cylinder(this->template getParam<Real>("cylinder_emissivity")), 40 54 : _boundary_radius(this->template getParam<Real>("boundary_radius")), 41 81 : _cylinder_radius(this->template getParam<Real>("cylinder_radius")) 42 : { 43 27 : _coefficient = this->_eps_boundary * _eps_cylinder * _cylinder_radius / 44 27 : (_eps_cylinder * _cylinder_radius + 45 27 : this->_eps_boundary * _boundary_radius * (1 - _eps_cylinder)); 46 27 : } 47 : 48 : template <bool is_ad> 49 : GenericReal<is_ad> 50 6848 : InfiniteCylinderRadiativeBCTempl<is_ad>::coefficient() const 51 : { 52 6848 : return _coefficient; 53 : } 54 : 55 : template class InfiniteCylinderRadiativeBCTempl<false>; 56 : template class InfiniteCylinderRadiativeBCTempl<true>;