https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
25
26void
33
34Real
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
53Real
54HeatStructureCylindricalBase::computeRadialBoundaryArea(const Real & length, const Real & y) const
55{
56 return length * 2 * libMesh::pi * (_inner_radius + y);
57}
58
59Real
60HeatStructureCylindricalBase::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}
const std::vector< double > y
const std::string name
Definition Setup.h:21
Real _total_width
Total width of all transverse regions.
ExternalBoundaryType
External boundary type.
Definition Component2D.h:19
Real _axial_offset
Distance by which to offset the mesh from the component axis.
virtual void setupMesh()
Performs mesh setup such as creating mesh or naming mesh sets.
Definition Component.h:421
Base class for 2D generated heat structures.
static InputParameters validParams()
HeatStructureCylindricalBase(const InputParameters &params)
virtual Real getUnitPerimeter(const ExternalBoundaryType &side) const override
Gets the perimeter of one unit of this heat structure on the specified side.
Real _inner_radius
Inner radius of the heat structure.
virtual void setupMesh() override
Performs mesh setup such as creating mesh or naming mesh sets.
virtual Real computeAxialBoundaryArea(const Real &y_min, const Real &y_max) const override
Computes the area of an axial boundary.
virtual Real computeRadialBoundaryArea(const Real &length, const Real &y) const override
Computes the area of a radial boundary.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void mooseError(Args &&... args) const
const Real pi