https://mooseframework.inl.gov
HeatStructureCylindricalBase.C
Go to the documentation of this file.
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 
11 
14 {
16  params.addParam<bool>(
17  "offset_mesh_by_inner_radius", false, "Offset the mesh by the inner radius?");
18  return params;
19 }
20 
22  : HeatStructureBase(params)
23 {
24 }
25 
26 void
28 {
30 
32 }
33 
34 Real
36 {
37  switch (side)
38  {
40  return 2 * M_PI * (_inner_radius + _total_width);
41 
43  return 2 * M_PI * _inner_radius;
44 
47  return std::numeric_limits<Real>::quiet_NaN();
48  }
49 
50  mooseError(name(), ": Unknown value of 'side' parameter.");
51 }
52 
53 Real
54 HeatStructureCylindricalBase::computeRadialBoundaryArea(const Real & length, const Real & y) const
55 {
56  return length * 2 * libMesh::pi * (_inner_radius + y);
57 }
58 
59 Real
60 HeatStructureCylindricalBase::computeAxialBoundaryArea(const Real & y_min, const Real & y_max) const
61 {
62  return libMesh::pi * (std::pow(_inner_radius + y_max, 2) - std::pow(_inner_radius + y_min, 2));
63 }
HeatStructureCylindricalBase(const InputParameters &params)
virtual Real computeAxialBoundaryArea(const Real &y_min, const Real &y_max) const override
Computes the area of an axial boundary.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
Real _inner_radius
Inner radius of the heat structure.
ExternalBoundaryType
External boundary type.
Definition: Component2D.h:18
const std::vector< double > y
Real _axial_offset
Distance by which to offset the mesh from the component axis.
Definition: Component2D.h:220
virtual const std::string & name() const
virtual Real computeRadialBoundaryArea(const Real &length, const Real &y) const override
Computes the area of a radial boundary.
Real _total_width
Total width of all transverse regions.
Definition: Component2D.h:163
virtual void setupMesh() override
Performs mesh setup such as creating mesh or naming mesh sets.
virtual Real getUnitPerimeter(const ExternalBoundaryType &side) const override
Gets the perimeter of one unit of this heat structure on the specified side.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
Base class for 2D generated heat structures.
void mooseError(Args &&... args) const
MooseUnits pow(const MooseUnits &, int)
const Real pi
virtual void setupMesh() override
Performs mesh setup such as creating mesh or naming mesh sets.