- inputsThe input MeshGenerators.
C++ Type:std::vector<MeshGeneratorName>
Controllable:No
Description:The input MeshGenerators.
- patternA double-indexed hexagonal-shaped array starting with the upper-left corner.
C++ Type:std::vector<std::vector<unsigned int>>
Controllable:No
Description:A double-indexed hexagonal-shaped array starting with the upper-left corner.
PatternedHexMeshGenerator
This PatternedHexMeshGenerator source code assembles hexagonal meshes into a hexagonal grid and optionally forces the outer boundary to be hexagonal and/or adds a duct.
Overview
The PatternedHexMeshGenerator
object generates a 2D mesh by stitching hexagonal meshes generated by PolygonConcentricCircleMeshGenerator
, HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
, and itself, based on a user-defined hexagonal grid pattern. The generated 2D mesh can optionally contain an extra background region and/or external duct regions to form a hexagonal external shape rather than a jagged boundary edge.
Geometry Information
In order to generate the hexagonal patterned mesh, three fundamental parameters are needed:
"inputs": a vector of mesh generator names that will be used as elements to form the patterned mesh;
"pattern": a two-dimensional vector that represents the pattern of mesh to be generated. The elements must be integers from 0 to N-1, where N is the length of vector parameter "inputs".
"pattern_boundary": a MooseEnum parameter that can be either
hexagon
ornone
. Whennone
is selected, this object only stitches "inputs" meshes into a patterned mesh without extraneous geometry, resulting in an outer boundary with a zig-zag edge. Whenhexagon
is selected, a background region is added so that the generated mesh has a hexagonal shape instead of a zig-zag one. Concentric duct regions may also be optionally added to the hexagon periphery when this parameter ishexagon
. The user can refer to Figure 1 for more details.

Figure 1: A schematic showing the difference between none
and hexagon
pattern_boundary
.
When "pattern_boundary" is set as hexagon
, the user can also provide "duct_sizes" in either apothem
or radius
style to add external duct regions to the generated hexagon mesh. Also, "hexagon_size" must also be provided to define the external hexagon boundary size, which can be either apothem
or radius
of the hexagon, as determined by "hexagon_size_style". In some cases, if "hexagon_size" is small enough, the hexagon external boundary may cut off some of the stitched hexagonal meshes. As long as the concentric circular (rings
) regions are not cut off, the rest of the mesh is deformed to accommodate the limited external boundaries.
Control Drum Related MeshMetaData
One of the applications of this object is to generate meshes for prismatic reactor cores. In that case, by setting "generate_core_metadata" as true, control drum meshes can also be used as part of "inputs" to construct the core mesh. To facilitate the use of control drum rotation simulation objects, a series of MeshMetaData
can be generated, including:
control_drum_positions
: a vector of control drum center positions. ThisMeshMetaData
can also be outputted as an ASCII file by setting "generate_control_drum_positions_file" as true and providing "position_file";control_drum_angles
: a vector of the azimuthal angles of the control drum center positions to the center of the core.control_drums_azimuthal_meta
: a two-dimensional vector containing the sorted azimuthal angles of nodes to the corresponding control drum center for all the control drums.
In addition, "assign_control_drum_id" can be set as true so that the control drum "inputs" meshes can be indexed using an element extra integer called control_drum_id
. As illustrated in Figure 2, the control_drum_id
is indexed based on the azimuthal angles of the control drums.

Figure 2: A schematic drawing the indexing rule of control_drum_id
in the PatternedHexMeshGenerator
object.
These MeshMetaData
as well as control_drum_id
can be used by other MOOSE objects such as MultiControlDrumFunction
to simulate control drums rotation during power transients.
Example Syntax
[pattern_1]
type = PatternedHexMeshGenerator
inputs = 'hex_1'
pattern = '0 0;
0 0 0;
0 0'
hexagon_size = 15
background_block_id = 80
background_block_name = hex_background
[]
(modules/reactor/test/tests/meshgenerators/patterned_hex_mesh_generator/patterned_pattern.i)Input Parameters
- duct_sizesDistance(s) from center to duct(s) inner boundaries.
C++ Type:std::vector<double>
Controllable:No
Description:Distance(s) from center to duct(s) inner boundaries.
- duct_sizes_styleapothemStyle in which hexagon center to duct distance(s) is given (apothem = center-to-face, radius = center-to-vertex).
Default:apothem
C++ Type:MooseEnum
Controllable:No
Description:Style in which hexagon center to duct distance(s) is given (apothem = center-to-face, radius = center-to-vertex).
- generate_core_metadataFalseA Boolean parameter that controls whether the core related metadata is generated for other MOOSE objects or not.
Default:False
C++ Type:bool
Controllable:No
Description:A Boolean parameter that controls whether the core related metadata is generated for other MOOSE objects or not.
- hexagon_sizeSize of the outmost hexagon boundary to be generated; this is required only when pattern type is 'hexagon'.
C++ Type:double
Controllable:No
Description:Size of the outmost hexagon boundary to be generated; this is required only when pattern type is 'hexagon'.
- hexagon_size_styleapothemStyle in which the hexagon size is given (default: apothem i.e. half-pitch).
Default:apothem
C++ Type:MooseEnum
Controllable:No
Description:Style in which the hexagon size is given (default: apothem i.e. half-pitch).
- pattern_boundaryhexagonThe boundary shape of the patterned mesh.
Default:hexagon
C++ Type:MooseEnum
Controllable:No
Description:The boundary shape of the patterned mesh.
- rotate_angle90Rotate the entire patterned mesh by a certain degrees that is defined here.
Default:90
C++ Type:double
Controllable:No
Description:Rotate the entire patterned mesh by a certain degrees that is defined here.
- show_infoFalseWhether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Optional Parameters
- assign_control_drum_idTrueWhether control drum id is assigned to the mesh as an extra integer.
Default:True
C++ Type:bool
Controllable:No
Description:Whether control drum id is assigned to the mesh as an extra integer.
- generate_control_drum_positions_fileFalseWhether a positions file is generated in the core mesh mode.
Default:False
C++ Type:bool
Controllable:No
Description:Whether a positions file is generated in the core mesh mode.
- position_filepositions_meta.dataData file name to store control drum positions.
Default:positions_meta.data
C++ Type:std::string
Controllable:No
Description:Data file name to store control drum positions.
Control Drum Parameters
- background_block_idOptional customized block id for the background block in 'assembly' mode; must be provided along with 'duct_block_ids' if 'duct_sizes' is provided.
C++ Type:unsigned short
Controllable:No
Description:Optional customized block id for the background block in 'assembly' mode; must be provided along with 'duct_block_ids' if 'duct_sizes' is provided.
- background_block_nameOptional customized block name for the background block in 'assembly' mode; must be provided along with 'duct_block_names' if 'duct_sizes' is provided.
C++ Type:SubdomainName
Controllable:No
Description:Optional customized block name for the background block in 'assembly' mode; must be provided along with 'duct_block_names' if 'duct_sizes' is provided.
- duct_block_idsOptional customized block ids for each duct geometry block in 'assembly' mode; must be provided along with 'background_block_id'.
C++ Type:std::vector<unsigned short>
Controllable:No
Description:Optional customized block ids for each duct geometry block in 'assembly' mode; must be provided along with 'background_block_id'.
- duct_block_namesOptional customized block names for each duct geometry block in 'assembly' mode; must be provided along with 'background_block_name'.
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:Optional customized block names for each duct geometry block in 'assembly' mode; must be provided along with 'background_block_name'.
- external_boundary_idOptional customized external boundary id.
C++ Type:short
Controllable:No
Description:Optional customized external boundary id.
- external_boundary_nameOptional customized external boundary name.
C++ Type:std::string
Controllable:No
Description:Optional customized external boundary name.
Customized Subdomain/Boundary Parameters
- background_intervals3Radial intervals in the assembly peripheral region.
Default:3
C++ Type:unsigned int
Controllable:No
Description:Radial intervals in the assembly peripheral region.
- duct_intervalsNumber of meshing intervals in each enclosing duct.
C++ Type:std::vector<unsigned int>
Controllable:No
Description:Number of meshing intervals in each enclosing duct.
- uniform_mesh_on_sidesFalseWhether the side elements are reorganized to have a uniform size.
Default:False
C++ Type:bool
Controllable:No
Description:Whether the side elements are reorganized to have a uniform size.
Mesh Density Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
Advanced Parameters
Input Files
- (modules/reactor/test/tests/meshgenerators/patterned_hex_mesh_generator/patterned_2d_err.i)
- (modules/reactor/test/tests/meshgenerators/patterned_hex_mesh_generator/patterned_2d.i)
- (modules/reactor/test/tests/meshgenerators/patterned_hex_mesh_generator/patterned_pattern.i)
- (modules/reactor/test/tests/functions/multi_control_drum_function/multi_cd_noid.i)
- (modules/reactor/test/tests/meshgenerators/patterned_hex_mesh_generator/patterned_pattern_err2.i)
- (modules/reactor/test/tests/meshgenerators/patterned_hex_mesh_generator/patterned_pattern_cd.i)
- (modules/reactor/test/tests/meshgenerators/patterned_hex_peripheral_modifier/single_hex.i)
- (modules/reactor/test/tests/functions/multi_control_drum_function/multi_cd.i)
- (modules/reactor/test/tests/meshgenerators/patterned_hex_mesh_generator/patterned_2d_block_name_conflict.i)
- (modules/reactor/test/tests/meshgenerators/patterned_hex_mesh_generator/patterned_pattern_err.i)
- (modules/reactor/test/tests/meshgenerators/patterned_hex_peripheral_modifier/patterned.i)