- inputsThe input MeshGenerators.
C++ Type:std::vector<MeshGeneratorName>
Controllable:No
Description:The input MeshGenerators.
FlexiblePatternGenerator
This FlexiblePatternGenerator object is designed to generate a mesh with a background region with dispersed unit meshes in it and distributed based on a series of flexible patterns.
Overview
FlexiblePatternGenerator
enhances the capabilities provided in PatternedHexMeshGenerator
and PatternedCartesianMeshGenerator
by providing more flexibility in both patterning and background shape. It can be used when the background shape is not a hexagon or square and/or when the pin pattern does not follow a hexagonal or cartesian grid.
Background Shape
Instead of the fixed hexagonal and cartesian background shapes provided respectively by PatternedHexMeshGenerator
and PatternedCartesianMeshGenerator
, FlexiblePatternGenerator
allows adoption of a closed curve of any type, provided by "boundary_mesh", to be used as the external boundary of the background region, with "boundary_type" set as CUSTOM
. The "boundary_mesh" needs to be a mesh containing a single closed curve that resides in the XY plane and consists of only EDGE2
elements. Examples of such curve meshes include polygon curves generated by PolyLineMeshGenerator
, more generalized curves generated by ParsedCurveGenerator
, and even externally generated curves through FileMeshGenerator
.
If a hexagonal, Cartesian, or circular external boundary are desired, "boundary_type" should be set as as HEXAGON
, CARTESIAN
, and CIRCLE
, respectively. In that case, "boundary_size" and "boundary_sectors" also need to be specified. By default, the external boundary will be assigned an ID of 10000
to be compatible with other Reactor Module tools. Users can also define a custom id for the external boundary using "external_boundary_id".
The background region is meshed by XYDelaunayGenerator
through MOOSE's sub-meshgenerator capability. Some key parameters of XYDelaunayGenerator
(e.g., "desired_area", "desired_area_func", "verify_holes") can be set here and then directly passed to XYDelaunayGenerator
. The block id and names can be optionally specified through "background_subdomain_id" and "background_subdomain_name".
Patterning
Within the interior region defined by "boundary_mesh", FlexiblePatternGenerator
can place single or multiple patterns of input unit meshes provided by "inputs". Supporting patterning mode includes hexagonal, rectangular, and circular geometry. In addition, free-style patterning is supported by directly providing positions of unit meshes. Styles of patterns can be combined as well when using multiple patterns. The details are discussed as follows.
Hexagonal Patterning
One or several hexagonal patterns of input unit meshes can be generated. These patterns are provided by a triple-indexed input parameter "hex_patterns". Each element of "hex_patterns" follows the same format as the "pattern" parameter in PatternedHexMeshGenerator
. The origin position of each pattern is defined through "hex_origins", while the patterning pitches are provided by "hex_pitches". Each hexagonal pattern can be rotated around its own origin independently, as directed by "hex_rotations". Here, a zero
rotation angle leads to a hexagonal pattern with its flat side parallel to x-axis (so that patterns in "hex_patterns" are intuitive).
Listing 1: Input example of hexagonal patterning.
[Mesh]
[fpg]
type = FlexiblePatternGenerator
inputs = 'accg reduced_accg'
boundary_type = HEXAGON
boundary_sectors = 10
boundary_size = '${fparse 12.0*sqrt(3.0)}'
hex_patterns = '0 0;
0 0 0;
0 0|
1 1;
1 1 1;
1 1'
hex_pitches = '6 6'
hex_origins = '0.0 0.0 0.0
2.0 2.0 0.0'
desired_area = 1.0
[]
[]
(modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/double_hex_pattern.i)
Figure 1: Output example of hexagonal patterning.
Rectangular Patterning
One or several rectangular patterns of input unit meshes can be generated. These patterns are provided by a triple-indexed input parameter "rect_patterns". Each element of "rect_patterns" follows the same format as the "pattern" parameter in PatternedCartesianMeshGenerator
but allows general rectangular patterning instead of restricted square patterning. The origin position of each pattern is defined through "rect_origins", while the patterning pitches in both directions are provided by "rect_pitches_x" and "rect_pitches_y", respectively. Each rectangular pattern can be rotated around its own origin independently, as directed by "rect_rotations".
Listing 2: Input example of rectangular patterning.
[Mesh]
[fpg]
type = FlexiblePatternGenerator
inputs = 'accg'
boundary_type = HEXAGON
boundary_size = '${fparse 16.0*sqrt(3.0)}'
boundary_sectors = 10
rect_pitches_x = 6
rect_pitches_y = 8
rect_patterns = '0 0 0;
0 0 0;
0 0 0'
desired_area = 1.0
[]
[]
(modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/single_rect_pattern.i)
Figure 2: Output example of rectangular patterning.
Circular Patterning
One or several circular patterns of input unit meshes can be generated. The patterns are provided by a double-indexed input parameter "circular_patterns". Each element of "circular_patterns" lists all the unit meshes uniformly distributed on a circle. The origin position of each pattern is defined through "circular_origins", while the radius of each pattern is provided by "circular_radii", respectively. Each circular pattern can be rotated around its own origin independently, as directed by "circular_rotations". The first unit mesh will be positioned at the azimuthal angle defined as in "circular_rotations", while the following unit meshes will be positioned uniformly on the circle counterclockwise.
Listing 3: Input example of circular patterning.
[Mesh]
[fpg]
type = FlexiblePatternGenerator
inputs = 'accg'
boundary_type = HEXAGON
boundary_size = '${fparse 12.0*sqrt(3.0)}'
boundary_sectors = 10
circular_patterns = '0 0 0 0 0 0 0 0'
circular_radii = '7'
desired_area = 1.0
[]
[]
(modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/single_circ_pattern.i)
Figure 3: Output example of circular patterning.
Custom Patterning
In addition to the hexagonal, rectangular and circular patterning, users can specify the positions of unit meshes freely using "extra_positions". Corresponding to each position provided in "extra_positions", an input unit mesh index needs to be provided in "extra_positions_mg_indices".
Listing 4: Input example of custom patterning.
[Mesh]
[fpg]
type = FlexiblePatternGenerator
inputs = 'accg'
boundary_type = HEXAGON
boundary_size = '${fparse 16.0*sqrt(3.0)}'
boundary_sectors = 10
extra_positions = '0.0 6.0 0.0
-3.0 0.0 0.0
3.0 0.0 0.0
-6.0 -6.0 0.0
0.0 -6.0 0.0
6.0 -6.0 0.0'
extra_positions_mg_indices = '0 0 0 0 0 0'
desired_area = 1.0
[]
[]
(modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/custom_pattern.i)
Figure 4: Output example of custom patterning.
Dummy Unit Meshes
In both "hex_patterns" and "rect_patterns", the use of an input unit mesh index greater than or equal to the size of "inputs" indicates that patterning position is a dummy and no input unit mesh will be assigned to that position. This feature allows creation of partial patterning.
Listing 5: Input example of mixed patterning with dummy unit meshes.
[Mesh]
[fpg]
type = FlexiblePatternGenerator
inputs = 'accg reduced_accg'
boundary_type = HEXAGON
boundary_size = '${fparse 12.0*sqrt(3.0)}'
boundary_sectors = 10
hex_patterns = '0 0;
0 2 0;
0 0'
hex_pitches = 7
rect_pitches_x = 3
rect_pitches_y = 5
rect_patterns = '1 1;
1 1'
extra_positions = '0.0 10.0 0.0
0.0 -10.0 0.0'
extra_positions_mg_indices = '1 1'
desired_area = 1.0
[]
[]
(modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/mixed_pattern.i)
Figure 5: Output example of mixed patterning with dummy unit meshes.
Input Parameters
- boundary_meshThe boundary mesh consisting of EDGE2 elements to be used as the 'CUSTOM' boundary.
C++ Type:MeshGeneratorName
Controllable:No
Description:The boundary mesh consisting of EDGE2 elements to be used as the 'CUSTOM' boundary.
- boundary_sectorsThe number of sectors on each side of the HEXAGON or CARTESIAN boundary mesh or on the circular boundary of the CIRCLE boundary mesh.
C++ Type:unsigned int
Controllable:No
Description:The number of sectors on each side of the HEXAGON or CARTESIAN boundary mesh or on the circular boundary of the CIRCLE boundary mesh.
- boundary_sizeThe pitch size of the HEXAGON or CARTESIAN boundary mesh; or the diameter of the CIRCLE boundary mesh.
C++ Type:double
Controllable:No
Description:The pitch size of the HEXAGON or CARTESIAN boundary mesh; or the diameter of the CIRCLE boundary mesh.
- boundary_typeCUSTOMwhat type of boundary is used as background for patterning.
Default:CUSTOM
C++ Type:MooseEnum
Controllable:No
Description:what type of boundary is used as background for patterning.
- external_boundary_idThe boundary id of the external boundary in addition to the default 10000.
C++ Type:short
Controllable:No
Description:The boundary id of the external boundary in addition to the default 10000.
Optional Parameters
- background_subdomain_idSubdomain id to set on the background area meshed by Delaunay algorithm.
C++ Type:unsigned short
Controllable:No
Description:Subdomain id to set on the background area meshed by Delaunay algorithm.
- background_subdomain_nameSubdomain name to set on the background area meshed by Delaunay algorithm.
C++ Type:SubdomainName
Controllable:No
Description:Subdomain name to set on the background area meshed by Delaunay algorithm.
- desired_area0Desired are for the background area meshing.
Default:0
C++ Type:double
Controllable:No
Description:Desired are for the background area meshing.
- desired_area_funcDesired area as a function of x,y; omit to skip non-uniform refinement
C++ Type:std::string
Controllable:No
Description:Desired area as a function of x,y; omit to skip non-uniform refinement
- verify_holesTrueWhether the holes are verified.
Default:True
C++ Type:bool
Controllable:No
Description:Whether the holes are verified.
Background Area Delaunay Parameters
- circular_originsthe origin positions of the circular patterns,
C++ Type:std::vector<libMesh::Point>
Controllable:No
Description:the origin positions of the circular patterns,
- circular_patternsCircular patterns set.
C++ Type:std::vector<std::vector<unsigned int>>
Controllable:No
Description:Circular patterns set.
- circular_radiithe radii of the circular patterns.
C++ Type:std::vector<double>
Controllable:No
Description:the radii of the circular patterns.
- circular_rotationsthe rotation angles of the circular patterns (the azimuthal angle of the first unit mesh).
C++ Type:std::vector<double>
Controllable:No
Description:the rotation angles of the circular patterns (the azimuthal angle of the first unit mesh).
Circular Pattern 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
- extra_positionsThe extra non-patterned positions to set the input MeshGenerators.
C++ Type:std::vector<libMesh::Point>
Controllable:No
Description:The extra non-patterned positions to set the input MeshGenerators.
- extra_positions_mg_indicesthe indices of the input mesh generators for the extra position.
C++ Type:std::vector<unsigned int>
Controllable:No
Description:the indices of the input mesh generators for the extra position.
Extra Positions (Free-Style Patterns) Parameters
- hex_originsthe origin positions of the hexagonal patterns,
C++ Type:std::vector<libMesh::Point>
Controllable:No
Description:the origin positions of the hexagonal patterns,
- hex_patternsHexagonal patterns set.
C++ Type:std::vector<std::vector<std::vector<unsigned int, std::allocator<unsigned int>>>>
Controllable:No
Description:Hexagonal patterns set.
- hex_pitchespitch sizes used to generate the hexagonal patterns.
C++ Type:std::vector<double>
Controllable:No
Description:pitch sizes used to generate the hexagonal patterns.
- hex_rotationsthe rotation angles of the hexagonal patterns,
C++ Type:std::vector<double>
Controllable:No
Description:the rotation angles of the hexagonal patterns,
Hexagonal Pattern 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
- rect_originsthe origin positions of the rectangular patterns,
C++ Type:std::vector<libMesh::Point>
Controllable:No
Description:the origin positions of the rectangular patterns,
- rect_patternsRectangular patterns set.
C++ Type:std::vector<std::vector<std::vector<unsigned int, std::allocator<unsigned int>>>>
Controllable:No
Description:Rectangular patterns set.
- rect_pitches_xpitch sizes in x direction used to generate the rectangular patterns.
C++ Type:std::vector<double>
Controllable:No
Description:pitch sizes in x direction used to generate the rectangular patterns.
- rect_pitches_ypitch sizes in y direction used to generate the rectangular patterns.
C++ Type:std::vector<double>
Controllable:No
Description:pitch sizes in y direction used to generate the rectangular patterns.
- rect_rotationsthe rotation angles of the rectangular patterns.
C++ Type:std::vector<double>
Controllable:No
Description:the rotation angles of the rectangular patterns.
Rectangular Pattern Parameters
Input Files
- (modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/single_rect_pattern.i)
- (modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/single_circ_pattern.i)
- (modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/double_circ_pattern.i)
- (modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/single_hex_pattern.i)
- (modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/double_hex_pattern.i)
- (modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/single_hex_pattern_custom.i)
- (modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/single_hex_pattern_err.i)
- (modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/custom_pattern.i)
- (modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/patterned_assm.i)
- (modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/mixed_pattern.i)