- inputThe input mesh that needs to be trimmed.
C++ Type:MeshGeneratorName
Unit:(no unit assumed)
Controllable:No
Description:The input mesh that needs to be trimmed.
HexagonMeshTrimmer
This HexagonMeshTrimmer object performs peripheral and/or across-center (0, 0, 0) trimming for assembly or core 2D meshes generated by PatternedHexMG.
Overview
The HexagonMeshTrimmer
object takes the hexagonal mesh generated by PatternedHexMeshGenerator
as "input" and trims off part of the mesh. The input mesh can also be PatternedHexMeshGenerator
's output processed by PeripheralRingMeshGenerator
or PatternedHexPeripheralModifier
.
Two types of trimming can be performed by HexagonMeshTrimmer
: Peripheral Trimming and Through-the-Center Trimming, which will be introduced separately as follows.

Figure 1: A schematic drawing showing different trimming schemes for a hexagonal mesh.
Peripheral Trimming
Peripheral trimming trims off peripheral region(s) of one or multiple sides of the input hexagonal assembly mesh. To be specific, for each side, half of the unit pin meshes are trimmed off, as shown by the purple lines in Figure 1. Each side of the hexagonal assembly is assigned an index as illustrated in Figure 1. Users can use "trim_peripheral_region" to set which sides need to be trimmed off (1
) and which need to be retained (0
). The setting "trim_peripheral_region" = "1 1 1 1 1 1" trims off all the sides (full peripheral trimming) to create a hexagonal assembly mesh with half-pins on each of the external 6 boundaries. Partial peripheral trimming may be employed for practical applications to create peripheral assemblies in a core whose normal interior assembly units contain half-pins on the boundary. The mesh metadata generated by PatternedHexMeshGenerator
are retained, with pattern_pitch_meta
updated to take trimming into consideration. The output of this object can be assembled into a patterned lattice using PatternedHexMeshGenerator
.
Center Trimming
Center trimming removes azimuthal sectors from the input hexagonal assembly or core mesh. The mesh may be trimmed along lines of symmetry in the input mesh. Only certain hexagonal meshes are eligible to be trimmed by this object due to imposed symmetries (see Trimmability). Valid hexagonal input meshes may be trimmed at twelve possible center trimming lines, indexed from 0 to 11 as the blue lines shown in Figure 1. Each unit azimuthal sector is 30. A practical application of center trimming is to reduce the domain size (and simulation scale) by leveraging symmetry through reflected boundary conditions. Therefore the largest possible output mesh after center trimming contains six consecutive azimuthal sectors (i.e., half of the input mesh), while the smallest possible output mesh has only one azimuthal sector (i.e., one twelfth of the input mesh). This mesh trimmer object RETAINS any sectors which are included between the trimming line defined by "center_trim_starting_index" to the trimming line defined by "center_trim_ending_index" swept out in a counterclockwise direction. Other sectors are discarded.
Trimmability
In general, HexagonMeshTrimmer
trims meshes generated by PatternedHexMeshGenerator
. An assembly mesh consisting of patterned pin meshes has both peripheral and center trimmability; whereas a core mesh consisting of patterned assembly meshes only has center trimmability. Two mesh metadata entries (peripheral_trimmability
and center_trimmability
) are created by PatternedHexMeshGenerator
to tell HexagonMeshTrimmer
which trimming options are valid. In the absence of these two meta data, HexagonMeshTrimmer
will throw an incompatible error message.
In addition, PeripheralRingMeshGenerator
, which applies quadrilateral peripheral cylinder mesh around an assembly or core, retain these two mesh meta data from the input mesh so that valid meshes generated by PeripheralRingMeshGenerator
may also be trimmed. Similarly, assembly meshes modified by PatternedHexPeripheralModifier
also have these meta data retained and are thus able to be trimmed by this generator.
Degenerate Quadrilateral Elements
When trimming a mesh, some elements may be located across the trimming line and thus need to be processed to ensure a smooth trimming boundary. Generic tools such as PlaneDeletionGenerator
is capable of trimming meshes but leaves a zigzag trimming boundary in the presence of across-trimming-line elements.
To avoid this zig-zag boundary, HexagonMeshTrimmer
adopts a post-trimming processing algorithm to smooth the trimming boundary. The algorithm moves the nodes of the across-trimming-line elements in the normal direction of the trimming line onto the trimming line. During this procedure, some elements may become zero volume and will be removed. More importantly, after node moving, some quadrilateral elements may have three co-linear vertices on the trimming line, which make the element degenerate. To fix this issue, these degenerate quadrilateral elements are converted into triangular elements. As triangular elements and quadrilateral elements cannot share a single subdomain id/name, new subdomains are created for any affected quadrilateral element subdomains. The subdomain ids of the new subdomains are decided by shifting the original subdomain ids by "tri_elem_subdomain_shift" (default shift value is the maximum subdomain id of the mesh), while the subdomain names of the new subdomains are created by appending "tri_elem_subdomain_name_suffix" after the original subdomain names.
Boundary Assignment
For peripheral trimming, the new boundary formed by the trimming operation is the new external boundary. Therefore, the boundary id defined by "external_boundary" is assigned to the new boundary. On the other hand, for center trimming, the new boundary formed by the trimming operation is a mirror boundary instead of an external boundary. Hence, the boundary id defined by "external_boundary" is NOT assigned to the new boundaries.
In addition, users can optionally use "peripheral_trimming_section_boundary" and "center_trimming_section_boundary" to assign additional boundary names to the new boundary.
Example Syntax
(contrib/moose/modules/reactor/test/tests/meshgenerators/hexagon_mesh_trimmer/patterned_trimmed.i)Input Parameters
- external_boundaryExternal boundary of the input mesh prior to the trimming.
C++ Type:BoundaryName
Unit:(no unit assumed)
Controllable:No
Description:External boundary of the input mesh prior to the trimming.
Optional Parameters
- center_trim_ending_indexIndex of the ending center trimming position.
C++ Type:short
Unit:(no unit assumed)
Controllable:No
Description:Index of the ending center trimming position.
- center_trim_starting_indexIndex of the starting center trimming position.
C++ Type:short
Unit:(no unit assumed)
Controllable:No
Description:Index of the starting center trimming position.
- center_trimming_section_boundaryBoundary formed by center trimming (external_boundary will be assigned if this parameter is not provided).
C++ Type:BoundaryName
Unit:(no unit assumed)
Controllable:No
Description:Boundary formed by center trimming (external_boundary will be assigned if this parameter is not provided).
Center Trimming 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
- 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
- peripheral_trimming_section_boundaryBoundary formed by peripheral trimming.
C++ Type:BoundaryName
Unit:(no unit assumed)
Controllable:No
Description:Boundary formed by peripheral trimming.
- trim_peripheral_region0 0 0 0 0 0 Whether the peripheral region on each of the six sides will be trimmed in an assembly mesh. See documentation for numbering convention.
Default:0 0 0 0 0 0
C++ Type:std::vector<unsigned short>
Unit:(no unit assumed)
Controllable:No
Description:Whether the peripheral region on each of the six sides will be trimmed in an assembly mesh. See documentation for numbering convention.
Peripheral Trimming Parameters
- tri_elem_subdomain_name_suffixtrimmer_triSuffix to the block name used for quad elements that are trimmed/converted into triangular elements to avert degenerate quad elements
Default:trimmer_tri
C++ Type:SubdomainName
Unit:(no unit assumed)
Controllable:No
Description:Suffix to the block name used for quad elements that are trimmed/converted into triangular elements to avert degenerate quad elements
- tri_elem_subdomain_shiftCustomized id shift to define subdomain ids of the converted triangular elements.
C++ Type:unsigned short
Unit:(no unit assumed)
Controllable:No
Description:Customized id shift to define subdomain ids of the converted triangular elements.