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 2640 : HeatStructureCylindricalBase::validParams() 14 : { 15 2640 : InputParameters params = HeatStructureBase::validParams(); 16 5280 : params.addParam<bool>( 17 5280 : "offset_mesh_by_inner_radius", false, "Offset the mesh by the inner radius?"); 18 2640 : return params; 19 0 : } 20 : 21 1320 : HeatStructureCylindricalBase::HeatStructureCylindricalBase(const InputParameters & params) 22 1320 : : HeatStructureBase(params) 23 : { 24 1320 : } 25 : 26 : void 27 1320 : HeatStructureCylindricalBase::setupMesh() 28 : { 29 1320 : _axial_offset = _inner_radius; 30 : 31 1320 : HeatStructureBase::setupMesh(); 32 1320 : } 33 : 34 : Real 35 740 : HeatStructureCylindricalBase::getUnitPerimeter(const ExternalBoundaryType & side) const 36 : { 37 740 : switch (side) 38 : { 39 543 : case ExternalBoundaryType::OUTER: 40 543 : return 2 * M_PI * (_inner_radius + _total_width); 41 : 42 195 : case ExternalBoundaryType::INNER: 43 195 : 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 4356 : HeatStructureCylindricalBase::computeRadialBoundaryArea(const Real & length, const Real & y) const 55 : { 56 4356 : return length * 2 * libMesh::pi * (_inner_radius + y); 57 : } 58 : 59 : Real 60 4974 : HeatStructureCylindricalBase::computeAxialBoundaryArea(const Real & y_min, const Real & y_max) const 61 : { 62 4974 : return libMesh::pi * (std::pow(_inner_radius + y_max, 2) - std::pow(_inner_radius + y_min, 2)); 63 : }