- inputsThe input MeshGenerators.
C++ Type:std::vector<MeshGeneratorName>
Unit:(no unit assumed)
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. Users can also define a custom id and name for the external boundary by using "external_boundary_id" and "external_boundary_name", respectively. By default, the external boundary will be assigned the following ID to be compatible with other Reactor Module tools:
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", "use_auto_area_func", "auto_area_func_default_size", "auto_area_func_default_size_dist", "auto_area_function_num_points", and "auto_area_function_power") 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.
(contrib/moose/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.
(contrib/moose/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.
(contrib/moose/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.
(contrib/moose/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.
(contrib/moose/modules/reactor/test/tests/meshgenerators/flexible_pattern_generator/mixed_pattern.i)
Figure 5: Output example of mixed patterning with dummy unit meshes.
Input Parameters
- tri_element_typeDEFAULTType of the triangular elements to be generated.
Default:DEFAULT
C++ Type:MooseEnum
Unit:(no unit assumed)
Controllable:No
Description:Type of the triangular elements to be generated.
Optional Parameters
- auto_area_func_default_size0Background size for automatic area function, or 0 to use non background size
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Background size for automatic area function, or 0 to use non background size
- auto_area_func_default_size_dist-1Effective distance of background size for automatic area function, or negative to use non background size
Default:-1
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Effective distance of background size for automatic area function, or negative to use non background size
- auto_area_function_num_points10Maximum number of nearest points used for the inverse distance interpolation algorithm for automatic area function calculation.
Default:10
C++ Type:unsigned int
Unit:(no unit assumed)
Controllable:No
Description:Maximum number of nearest points used for the inverse distance interpolation algorithm for automatic area function calculation.
- auto_area_function_power1Polynomial power of the inverse distance interpolation algorithm for automatic area function calculation.
Default:1
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Polynomial power of the inverse distance interpolation algorithm for automatic area function calculation.
- background_subdomain_idSubdomain id to set on the background area meshed by Delaunay algorithm.
C++ Type:unsigned short
Unit:(no unit assumed)
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
Unit:(no unit assumed)
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
Unit:(no unit assumed)
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
Unit:(no unit assumed)
Controllable:No
Description:Desired area as a function of x,y; omit to skip non-uniform refinement
- use_auto_area_funcFalseUse the automatic area function for triangle-meshing in the background.
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Use the automatic area function for triangle-meshing in the background.
- verify_holesTrueWhether the holes are verified.
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether the holes are verified.
Background Area Delaunay Parameters
- boundary_meshThe boundary mesh consisting of EDGE2 elements to be used as the 'CUSTOM' boundary.
C++ Type:MeshGeneratorName
Unit:(no unit assumed)
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
Unit:(no unit assumed)
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
Unit:(no unit assumed)
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
Unit:(no unit assumed)
Controllable:No
Description:what type of boundary is used as background for patterning.
- delete_default_external_boundary_from_inputsTrueWhether to delete the default external boundary from the input meshes.
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether to delete the default external boundary from the input meshes.
- external_boundary_idThe boundary id of the external boundary in addition to the default 10000.
C++ Type:short
Unit:(no unit assumed)
Controllable:No
Description:The boundary id of the external boundary in addition to the default 10000.
- external_boundary_nameOptional boundary name for the external boundary.
C++ Type:BoundaryName
Unit:(no unit assumed)
Controllable:No
Description:Optional boundary name for the external boundary.
Boundary Parameters
- circular_originsthe origin positions of the circular patterns,
C++ Type:std::vector<libMesh::Point>
Unit:(no unit assumed)
Controllable:No
Description:the origin positions of the circular patterns,
- circular_patternsCircular patterns set.
C++ Type:std::vector<std::vector<unsigned int>>
Unit:(no unit assumed)
Controllable:No
Description:Circular patterns set.
- circular_radiithe radii of the circular patterns.
C++ Type:std::vector<double>
Unit:(no unit assumed)
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>
Unit:(no unit assumed)
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>
Unit:(no unit assumed)
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
Unit:(no unit assumed)
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
Unit:(no unit assumed)
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>
Unit:(no unit assumed)
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>
Unit:(no unit assumed)
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>
Unit:(no unit assumed)
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>>>>
Unit:(no unit assumed)
Controllable:No
Description:Hexagonal patterns set.
- hex_pitchespitch sizes used to generate the hexagonal patterns.
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:pitch sizes used to generate the hexagonal patterns.
- hex_rotationsthe rotation angles of the hexagonal patterns,
C++ Type:std::vector<double>
Unit:(no unit assumed)
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
Unit:(no unit assumed)
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
Unit:(no unit assumed)
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
Unit:(no unit assumed)
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>
Unit:(no unit assumed)
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>>>>
Unit:(no unit assumed)
Controllable:No
Description:Rectangular patterns set.
- rect_pitches_xpitch sizes in x direction used to generate the rectangular patterns.
C++ Type:std::vector<double>
Unit:(no unit assumed)
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>
Unit:(no unit assumed)
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>
Unit:(no unit assumed)
Controllable:No
Description:the rotation angles of the rectangular patterns.