- inputsThe names of the meshes forming the pattern.
C++ Type:std::vector<MeshGeneratorName>
Controllable:No
Description:The names of the meshes forming the pattern.
- patternA two-dimensional cartesian (square-shaped) array starting with the upper-left corner.It is composed of indexes into the inputs vector
C++ Type:std::vector<std::vector<unsigned int>>
Controllable:No
Description:A two-dimensional cartesian (square-shaped) array starting with the upper-left corner.It is composed of indexes into the inputs vector
PatternedCartesianMeshGenerator
This PatternedCartesianMeshGenerator source code assembles square meshes into a square grid and optionally forces the outer boundary to be square and/or adds a duct.
Overview
The PatternedCartesianMeshGenerator
object generates a 2D mesh by stitching cartesian (square-shaped) meshes generated by PolygonConcentricCircleMeshGenerator
, CartesianConcentricCircleAdaptiveBoundaryMeshGenerator
, and itself, based on a user-defined square grid pattern. The generated 2D mesh can optionally contain an extra background region and/or external duct regions to form an expanded square external shape rather than a purely stacked square of squares.
Geometry Information
In order to generate the square 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
none
orexpanded
. Whennone
is selected, this object only stitches "inputs" meshes into a patterned mesh without extraneous geometry, resulting in a simply stacked square of unit squares. Whenexpanded
is selected, a background region is added so that the generated mesh has an expanded square shape instead of a simply stacked one. Concentric duct regions may also be optionally added to the square periphery when this parameter isexpanded
. The user can refer to Figure 1 for more details.

Figure 1: A schematic showing the difference between none
and expanded
pattern_boundary
.
When "pattern_boundary" is set as expanded
, the user can also provide "duct_sizes" in either apothem
(center-to-face) or radius
(center-to-vertex) style determined by "duct_sizes_style" to add external duct regions to the generated square mesh. Also, "square_size" must also be provided to define the external square boundary size. In some cases, if "square_size" is small enough, the square external boundary may cut off some of the stitched square 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. Users can also set "deform_non_circular_region" as false
to prevent the non-circular regions from being deformed.
Control Drum Related MeshMetaData
One of the applications of this object is to generate meshes for reactor cores with control drums. 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 PatternedCartesianMeshGenerator
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.
Interface Boundaries
The user can also decide whether the interface boundaries are generated or not in the peripheral region.
There are two types of interface boundaries, "inward interface boundaries" and "outward interface boundaries". The "inward" and "outward" here refer to the direction of the boundary's normal vector. As a sideset must be defined on the sides of elements, which belong to one or multiple subdomains, an interface boundary can be defined either on the subdomain immediately inside the interface (i.e., with an "outward" normal vector) or on the subdomain immediately outside the interface (i.e., with an "inward" normal vector).
The user can set "create_inward_interface_boundaries" and "create_outward_interface_boundaries" to control which interface boundaries will be created. If generated, the outward interface boundaries will be assigned ids using sequential odd numbers (i.e., 1, 3, 5, 7, ...) shifted by INTRINSIC_SIDESET_ID::SLICE_ALT
=30500 from center to periphery, while the inward interface boundaries will be assigned ids using sequential even numbers (i.e., 0, 2, 4, 6, ...) shifted by INTRINSIC_SIDESET_ID::SLICE_ALT
similarly.
Reporting ID Information
This object can generate a Cartesian lattice mesh with reporting ID
assignments. It can be used successively on another PatternedCartesianMeshGenerator
output mesh to add IDs on the pin and assembly levels, for example. The reporting ID option can be turned on by defining the name of the reporting ID variable is provided through "id_name".
Reporting IDs are assigned to all elements in each tile of the pattern following a per-tile assignment strategy. A user can select an ID assignment scheme using "assign_type", and the following schemes are currently available:
cell
(default): Assign unique IDs for each component/tile in the lattice in sequential order.pattern
: Assign IDs based on the ID of the input tiles.manual
: Assign IDs based on user-defined mapping defined in "id_pattern".
The default numbering scheme starts at 0 in the upper left hand corner of Cartesian grid (not including duct region) and increments by 1 as the grid is traversed left to right, top to bottom In presence of duct regions, separate reporting IDs are automatically generated for the elements in duct regions. For the pattern
scheme, all tiles in the pattern with the same input will bear the same reporting ID. The duct regions will be assigned reporting IDs starting from the next integer higher than the highest one used inside of the ducts.
The name of the reporting ID variable is provided through "id_name" depending on the hierarchical level of component. The ID values themselves are stored as extra element integers on the mesh. For example, the reporting IDs for individual pins (pin_id
) can be assigned when assemblies are built because the IDs for pin level are uniquely determined from the pin arrangement within each assembly type. Similarly, the assembly reporting IDs (assembly_id
) are assigned in the core construction process.
Certain regions can be excluded from being labeled with an ID, for example dummy regions that will later be deleted. This can be accommodated by listing mesh objects in the "exclude_id" input parameter. IDs will not be assigned to these mesh objects. Usage of this parameter is helpful to retain sequential numbering when dummy region are later deleted, or to only label areas of interest.
Example Syntax
[pattern]
type = PatternedCartesianMeshGenerator
inputs = 'square_1 square_2'
pattern = '0 0 0 0;
0 1 0 0;
0 0 1 0;
0 0 0 0'
square_size = 48
duct_sizes = '21 22 23'
duct_intervals = '2 2 2'
rotate_angle = 0
duct_block_ids = '2000 2100 2200'
background_block_id = 1500
[]
(modules/reactor/test/tests/meshgenerators/patterned_cartesian_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 square 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 square 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 such as 'MultiControlDrumFunction' 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 such as 'MultiControlDrumFunction' or not.
- rotate_angle0Rotate the entire patterned mesh by a certain degrees that is defined here.
Default:0
C++ Type:double
Controllable:No
Description:Rotate the entire patterned mesh by a certain degrees that is defined here.
- square_sizeSize (side length) of the outmost square boundary to be generated; this is required only when pattern type is 'expanded'.
C++ Type:double
Controllable:No
Description:Size (side length) of the outmost square boundary to be generated; this is required only when pattern type is 'expanded'.
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
- assign_typecellType of integer ID assignment
Default:cell
C++ Type:MooseEnum
Controllable:No
Description:Type of integer ID assignment
- exclude_idName of input meshes to be excluded in ID generation
C++ Type:std::vector<MeshGeneratorName>
Controllable:No
Description:Name of input meshes to be excluded in ID generation
- id_nameName of extra integer ID set
C++ Type:std::string
Controllable:No
Description:Name of extra integer ID set
- id_patternUser-defined element IDs. A double-indexed array starting with the upper-left corner
C++ Type:std::vector<std::vector<unsigned long>>
Controllable:No
Description:User-defined element IDs. A double-indexed array starting with the upper-left corner
Reporting Id 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.
- create_inward_interface_boundariesFalseWhether the inward interface boundary sidesets are created.
Default:False
C++ Type:bool
Controllable:No
Description:Whether the inward interface boundary sidesets are created.
- create_outward_interface_boundariesTrueWhether the outward interface boundary sidesets are created.
Default:True
C++ Type:bool
Controllable:No
Description:Whether the outward interface boundary sidesets are created.
- 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.
- pattern_boundaryexpandedThe boundary shape of the patterned mesh.
Default:expanded
C++ Type:MooseEnum
Controllable:No
Description:The boundary shape of the patterned mesh.
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.
- deform_non_circular_regionTrueWhether the non-circular region (outside the rings) can be deformed.
Default:True
C++ Type:bool
Controllable:No
Description:Whether the non-circular region (outside the rings) can be deformed.
- 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.
- save_with_nameKeep the mesh from this mesh generator in memory with the name specified
C++ Type:std::string
Controllable:No
Description:Keep the mesh from this mesh generator in memory with the name specified
Advanced Parameters
- nemesisFalseWhether or not to output the mesh file in the nemesisformat (only if output = true)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file in the nemesisformat (only if output = true)
- outputFalseWhether or not to output the mesh file after generating the mesh
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file after generating the mesh
- 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)
Debugging Parameters
Input Files
- (tutorials/tutorial04_meshing/app/test/tests/base_mesh_generators/depletion_id.i)
- (modules/reactor/test/tests/meshgenerators/cartesian_mesh_trimmer/patterned_trimmed.i)
- (tutorials/tutorial04_meshing/app/test/tests/base_mesh_generators/alternative_pattern_reporting_id.i)
- (modules/reactor/test/tests/meshgenerators/patterned_cartesian_mesh_generator/patterned_pattern_err2.i)
- (modules/reactor/test/tests/meshgenerators/reporting_id/depletion_id/sub_pin_depletion_id.i)
- (modules/reactor/test/tests/meshgenerators/patterned_cartesian_mesh_generator/patterned_pattern_err.i)
- (modules/reactor/test/tests/meshgenerators/reporting_id/cartesian_id/patterned_cartesian_core_reporting_id.i)
- (modules/reactor/test/tests/meshgenerators/cartesian_mesh_trimmer/assembly_trim.i)
- (modules/reactor/test/tests/meshgenerators/patterned_cartesian_peripheral_modifier/patterned.i)
- (modules/reactor/test/tests/meshgenerators/patterned_cartesian_mesh_generator/patterned_pattern_cd.i)
- (modules/reactor/test/tests/meshgenerators/reporting_id/cartesian_id/patterned_cartesian_assembly_reporting_id.i)
- (modules/reactor/test/tests/meshgenerators/patterned_cartesian_mesh_generator/patterned_pattern.i)
- (modules/reactor/test/tests/meshgenerators/patterned_cartesian_mesh_generator/patterned_2d.i)
- (modules/reactor/test/tests/meshgenerators/patterned_cartesian_peripheral_modifier/single_square.i)
- (modules/reactor/test/tests/meshgenerators/patterned_hex_peripheral_modifier/err_cart_input.i)