15#include "libmesh/mesh_generation.h"
16#include "libmesh/unstructured_mesh.h"
17#include "libmesh/replicated_mesh.h"
18#include "libmesh/point.h"
19#include "libmesh/elem.h"
20#include "libmesh/node.h"
34 params.
addRequiredParam<Real>(
"assembly_pitch",
"Center to center distance of assemblies");
35 params.
addParam<boundary_id_type>(
"top_boundary_id",
36 "The boundary ID to set on top boundary of the extruded mesh");
38 "bottom_boundary_id",
"The boundary ID to set on bottom boundary of the extruded mesh");
41 "The boundary ID to set on the outer radial boundary of a CoreMeshGenerator object");
42 params.
addParam<std::vector<Real>>(
"axial_regions",
"Length of each axial region");
43 params.
addParam<std::vector<unsigned int>>(
44 "axial_mesh_intervals",
"Number of elements in the Z direction for each axial region");
45 params.
addParam<
bool>(
"region_id_as_block_name",
false,
"Set block names based on region id");
47 "flexible_assembly_stitching",
49 "Use FlexiblePatternGenerator for stitching dissimilar assemblies together");
51 "num_sectors_at_flexible_boundary",
53 "num_sectors_at_flexible_boundary>2",
54 "Number of sectors to use at assembly boundary interface when flexible patterning is used "
57 "expand_units",
true,
"Whether to expand engineering units into CSG components");
59 "information about the reactor geometry.");
72 _assembly_pitch(getParam<Real>(
"assembly_pitch"))
74 if ((
unsigned int)(
_dim) == 2)
76 std::vector<std::string> invalid_params = {
77 "axial_regions",
"axial_mesh_intervals",
"top_boundary_id",
"bottom_boundary_id"};
78 for (
const auto & param : invalid_params)
80 paramError(param, param +
" should not be defined for 2-D meshes");
89 "The number of axial regions is not consistent with the number of axial intervals.");
102 if (flexible_assembly_stitching)
104 getParam<unsigned int>(
"num_sectors_at_flexible_boundary"));
106 !flexible_assembly_stitching)
108 "num_sectors_at_flexible_boundary",
109 "This parameter is only relevant when ReactorMeshParams/flexible_assembly_stitching is set "
110 "to true. This value will be ignored");
118 _top_boundary = getParam<boundary_id_type>(
"top_boundary_id");
131 mooseError(
"top_boundary_id and radial_boundary_id must be unique values");
133 mooseError(
"bottom_boundary_id and radial_boundary_id must be unique values");
137 mooseError(
"top_boundary_id and bottom_boundary_id must be unique values");
142 paramWarning(
"expand_units",
"This parameter is only active in --csg-only mode");
148std::unique_ptr<MeshBase>
155 auto null_mesh =
nullptr;
159 return dynamic_pointer_cast<MeshBase>(
mesh);
162std::unique_ptr<CSG::CSGBase>
166 return std::make_unique<CSG::CSGBase>();
registerMooseObject("ReactorApp", ReactorMeshParams)
static void setHasGenerateCSG(InputParameters ¶ms)
static InputParameters validParams()
std::unique_ptr< MeshBase > buildMeshBaseObject(unsigned int dim=libMesh::invalid_uint)
static void setHasGenerateData(InputParameters ¶ms)
T & declareMeshProperty(const std::string &data_name, Args &&... args)
MeshGeneratorSystem & getMeshGeneratorSystem()
const InputParameters & parameters() const
void paramWarning(const std::string ¶m, Args... args) const
void paramError(const std::string ¶m, Args... args) const
bool isParamSetByUser(const std::string &name) const
void mooseError(Args &&... args) const
bool isParamValid(const std::string &name) const
A class to store mesh information that is globally applicable to a reactor.
boundary_id_type _top_boundary
Boundary id assigned to top boundary of extruded mesh.
static InputParameters validParams()
std::vector< Real > _axial_regions
The heights of the axial regions.
ReactorMeshParams(const InputParameters ¶meters)
std::unique_ptr< CSG::CSGBase > generateCSG() override
std::vector< unsigned int > _axial_mesh_intervals
The number of mesh divisions in each axial region.
std::unique_ptr< MeshBase > generate() override
const Real _assembly_pitch
The the flat-to-flat size of assemblies in the reactor.
boundary_id_type _bottom_boundary
Boundary id assigned to bottom boundary of extruded mesh.
boundary_id_type _radial_boundary
Boundary id assigned to outer radial boundary of core mesh.
const MooseEnum _geom
The geometry type for the reactor.
const MooseEnum _dim
The number of dimension in the mesh.
static const std::string bottom_boundary_id
static const std::string radial_boundary_id
static const std::string expand_units
static const std::string bypass_meshgen
static const std::string top_boundary_id
static const std::string assembly_pitch
static const std::string mesh_dimensions
static const std::string num_sectors_flexible_stitching
static const std::string flexible_assembly_stitching
static const std::string axial_mesh_sizes
static const std::string region_id_as_block_name
static const std::string axial_mesh_intervals
static const std::string mesh_geometry