diff --git a/modules/reactor/doc/content/source/meshgenerators/AssemblyMeshGenerator.md b/modules/reactor/doc/content/source/meshgenerators/AssemblyMeshGenerator.md index 160c4432d0f8..3e8229df74dd 100644 --- a/modules/reactor/doc/content/source/meshgenerators/AssemblyMeshGenerator.md +++ b/modules/reactor/doc/content/source/meshgenerators/AssemblyMeshGenerator.md @@ -4,7 +4,7 @@ ## Overview -This object is designed to be used in the Reactor MeshGenerator workflow, which also consists of [`ReactorMeshParams`](ReactorMeshParams.md), [`PinMeshGenerator`](PinMeshGenerator.md), and [`CoreMeshGenerator`](CoreMeshGenerator.md). +This object is designed to be used in the Reactor MeshGenerator workflow, which also consists of [`ReactorMeshParams`](ReactorMeshParams.md), [`PinMeshGenerator`](PinMeshGenerator.md), [`ControlDrumMeshGenerator`](ControlDrumMeshGenerator.md), and [`CoreMeshGenerator`](CoreMeshGenerator.md). The `AssemblyMeshGenerator` object generates assembly reactor geometry structures in either square or hexagonal geometries using component pin cell meshes from the [`PinMeshGenerator`](PinMeshGenerator.md) in [!param](/Mesh/AssemblyMeshGenerator/inputs). The component pin cell meshes are tagged with pin cell `reporting ID` values according to their location in the assembly grid. Any newly created regions such as ducts are given block ID assignments. @@ -43,7 +43,7 @@ If the assembly is extruded to three dimensions the top-most boundary ID must be ## Metadata Information -Users may be interested in defining additional metadata to represent the reactor geometry and region IDs assigned to each geometry zone, which may be useful to users who want mesh geometry and composition information without having to inspect the generated mesh itself. [!param](/Mesh/AssemblyMeshGenerator/show_rgmb_metadata) can be set to true in order to see the values of these metadata entries as console output. The following metadata is defined on the assembly mesh: +Users may be interested in defining additional metadata to represent the reactor geometry and region IDs assigned to each geometry zone, which may be useful to users who want mesh geometry and composition information without having to inspect the generated mesh itself. The following metadata is defined on the assembly mesh: - `assembly_type`: Value of type_id associated with assembly, equivalent to the input parameter [!param](/Mesh/AssemblyMeshGenerator/assembly_type) - `pitch`: Assembly pitch, equivalent to the input parameter [!param](/Mesh/ReactorMeshParams/assembly_pitch) diff --git a/modules/reactor/doc/content/source/meshgenerators/ControlDrumMeshGenerator.md b/modules/reactor/doc/content/source/meshgenerators/ControlDrumMeshGenerator.md new file mode 100644 index 000000000000..704645a6b8b5 --- /dev/null +++ b/modules/reactor/doc/content/source/meshgenerators/ControlDrumMeshGenerator.md @@ -0,0 +1,73 @@ +# ControlDrumMeshGenerator + +!syntax description /Mesh/ControlDrumMeshGenerator + +## Overview + +This object is designed to be used in the Reactor MeshGenerator workflow, which also consists of [ReactorMeshParams](ReactorMeshParams.md), [PinMeshGenerator](PinMeshGenerator.md), [AssemblyMeshGenerator](AssemblyMeshGenerator.md), and [CoreMeshGenerator](CoreMeshGenerator.md). + +This object creates the target mesh by automating the use and functionality of the [AdvancedConcentricCircleGenerator](AdvancedConcentricCircleGenerator.md) and [FlexiblePatternGenerator](FlexiblePatternGenerator.md) mesh generators to build the 2-D geometry of the control drum region and, if extruding to three dimensions, the [AdvancedExtruderGenerator](AdvancedExtruderGenerator.md) through the use of the `MeshSubgenerator` functionality and supporting functionality from [PlaneIDMeshGenerator](PlaneIDMeshGenerator.md). In addition to the functionality of the `MeshGenerators` used, this object also automates block ID, boundary ID, and boundary name assignment for the output control drum mesh. + +The `ControlDrumMeshGenerator` object generates control drum reactor geometry structures in either square or hexagonal geometries. These drum structures are created by defining two concentric rings, which creates an annular area that will be referred to as the 'drum region'. The area within the inner radius will be referred to as the 'inner drum' region, while the area outside of the outer radius will be regarded as the 'background' region. Optionally, the drum region can be sub-divided into two azimuthal sectors to distinguish the placement of the 'drum pad' region, which is commonly used in microreactor-type designs as a control mechanism to regulate the neutron absorption rate within the reactor core. A figure showing the relevant regions defined in `ControlDrumMeshGenerator` is shown in [cd_regions], where the left diagram represents the case with a drum pad explicitly defined, while the right diagram represents the case without a drum pad (i.e., the control drum is defined as a single region). + +!media reactor/meshgenerators/cd_regions.png id=cd_regions style=width:70%; caption=Control drum mesh with explicit drum pad region (left) and no drum pad region (right). + +The inner and outer radius of the drum region are defined by setting [!param](/Mesh/ControlDrumMeshGenerator/drum_inner_radius) and [!param](/Mesh/ControlDrumMeshGenerator/drum_outer_radius), respectively. [!param](/Mesh/ControlDrumMeshGenerator/drum_inner_intervals) controls the number of radial mesh sub-intervals in the inner drum region, while [!param](/Mesh/ControlDrumMeshGenerator/drum_intervals) sets the number of radial mesh sub-intervals in the drum region. [!param](/Mesh/ControlDrumMeshGenerator/num_azimuthal_sectors) is used to define the number of azimuthal sectors to subdivide the drum region into, while [!param](/Mesh/ControlDrumMeshGenerator/pad_start_angle) and [!param](/Mesh/ControlDrumMeshGenerator/pad_end_angle) are used to set the start and end angles of the drum pad region, respectively. Here, angles start in the positive y direction and rotate clockwise, and the difference between the end and start angles cannot exceed 360 degrees. Additionally, the start angle needs to be defined between 0 and 360 degrees, and the end angle cannot exceed 720 degrees. Additionally, if the pad angles do not line up with the azimuthal discretization of the drum region, additional azimuthal nodes are defined to ensure that the pad region as defined by the pad start and end angles lines up exactly with the azimuthal discretization of the drum region. + +In order to facilitate stitching of `ControlDrumMeshGenerator` objects in downstream core lattice patterning with [CoreMeshGenerator](CoreMeshGenerator.md), users must set [ReactorMeshParams](ReactorMeshParams.md)/[!param](/Mesh/ReactorMeshParams/flexible_assembly_stitching) to true to ensure that a fixed number of sectors are created at the boundary surfaces of the control drum mesh. The resulting mesh will be tagged with the extra element IDs, block names, and outer boundaries in a similar manner to `AssemblyMeshGenerator`, and can be inputted directly to [CoreMeshGenerator](CoreMeshGenerator.md). + +## Region ID, Block ID, and Block Name Information + +The parameter [!param](/Mesh/ControlDrumMeshGenerator/region_ids) is used to identify regions within the control drum, and this functionality is intended for easy identification of regions within the mesh that will have the same properties, such as material assignments, and this region ID will be assigned as an extra element integer. + +[!param](/Mesh/ControlDrumMeshGenerator/region_ids) is given as an `A` by `R` vector, where `A` is the number of axial layer (equal to 1 for 2-D meshes) and `R` is the number of radial intervals per axial layer. Here, `R` is equal to 4 for control drum meshes with explicit drum pads defined, where the radial region ID ordering follows (drum inner, drum pad, drum ex-pad, background) according to the left image in [cd_regions]. Similarly, when the drum pad angles are not defined, `R` equals 3 and follows the ordering (drum inner, drum, background), based on the right image in [cd_regions]. + +For ease of use, block ids are generated automatically by the mesh generator, and for users who require element identification by block name, the optional parameter [!param](/Mesh/ControlDrumMeshGenerator/block_names) can be defined to set block names for the control drum regions. In this case, the ordering and size of the block names should match those of [!param](/Mesh/ControlDrumMeshGenerator/region_ids), and each block name will be prepended with the prefix `RGMB_DRUM_`, where `` is the assembly ID provided by the user through [!param](/Mesh/ControlDrumMeshGenerator/assembly_type). If not specified, the block names will be assigned automatically as `RGMB_DRUM` by default. If [ReactorMeshParams](ReactorMeshParams.md)/[!param](/Mesh/ReactorMeshParams/region_id_as_block_name) is set to `true`, the resulting elements will have the block name `RGMB_DRUM_REG`, where `` is the region ID of the element. Note that [!param](/Mesh/ReactorMeshParams/region_id_as_block_name) should not be used in conjunction with [!param](/Mesh/ControlDrumMeshGenerator/block_names). Regardless of whether block names are provided or not, the suffix `_TRI` is automatically added to the block name for all triangular elements in the central pin mesh elements when "quad_center_elements" is set to false. + +## Reporting ID Information + +As mentioned above, the `ControlDrumMeshGenerator` object will tag all elements (that do not belong to one of the constituent pins) with the extra integer reporting ID named "region_id" with the value equal to the drum region ID. + +The `ControlDrumMeshGenerator` object also automatically tags all elements in the mesh with the [!param](/Mesh/ControlDrumMeshGenerator/assembly_type) using the extra_integer name "assembly_type_id" and, if extruded, elements in each axial layer are tagged the axial layers using the name "plane_id". + +## Depletion ID Information + +The `ControlDrumMeshGenerator` object can optionally assign a depletion ID, with the extra integer name "depletion_id", only if is the final mesh generator. +The depletion ID generation option can be enabled by setting the [!param](/Mesh/ControlDrumMeshGenerator/generate_depletion_id) to true. +The level of detail needed for depletion zones is specified in the input parameter [!param](/Mesh/ControlDrumMeshGenerator/depletion_id_type) and must be set to `pin_type`, which will assign a unique depletion ID for each radial and axial zone of the drum. + +## Exterior Boundary ID Information + +The `ControlDrumMeshGenerator` objects automatically assigns boundary information derived from the [!param](/Mesh/ControlDrumMeshGenerator/assembly_type) parameter. The exterior assembly boundary is assigned the ID equal to + +!listing include/meshgenerators/ReactorGeometryMeshBuilderBase.h line=ASSEMBLY_BOUNDARY_ID_START = + ++ the assembly type ID and is named "outer_assembly_" (for example a control drum with an assembly type ID of 1 will have a boundary ID of 2001 and boundary name of "outer_assembly_1"). + +If the assembly is extruded to three dimensions the top-most boundary ID must be assigned using [!param](/Mesh/ReactorMeshParams/top_boundary_id) and will have the name "top", while the bottom-most boundary must be assigned using [!param](/Mesh/ReactorMeshParams/bottom_boundary_id) and will have the name "bottom". + +## Metadata Information + +Users may be interested in defining additional metadata to represent the reactor geometry and region IDs assigned to each geometry zone, which may be useful to users who want mesh geometry and composition information without having to inspect the generated mesh itself. The following metadata is defined on the control drum mesh: + +- `assembly_type`: Value of type_id associated with control drum, equivalent to the input parameter [!param](/Mesh/ControlDrumMeshGenerator/assembly_type) +- `pitch`: Assembly pitch, equivalent to the input parameter [!param](/Mesh/ReactorMeshParams/assembly_pitch) +- `is_control_drum`: Whether or not this mesh is a control drum, equal to true for all structures created by `ControlDrumMeshGenerator`. +- `drum_radii`: Vector of length two corresponding to the inner and outer radii of the drum region, controlled by [!param](/Mesh/ControlDrumMeshGenerator/drum_inner_radius) and [!param](/Mesh/ControlDrumMeshGenerator/drum_outer_radius), respectively. +- `drum_region_ids`: 2-D vector of region ids corresponding to radial and axial zones within control drum regions of assembly mesh, equivalent to the input parameter [!param](/Mesh/ControlDrumMeshGenerator/region_ids). Inner indexing is radial zones, while outer index is axial zones. + +In addition, the value of the `reactor_params_name` metadata can be used to retrieve global metadata defined by [ReactorMeshParams](ReactorMeshParams.md). Please refer to [ReactorMeshParams](ReactorMeshParams.md) to see a list of metadata defined by this mesh generator. + +For applications where an output mesh does not need to be created and meshing routines can consist entirely of defining reactor-based metadata, the parameter `[Mesh]`/[!param](/Mesh/MeshGeneratorMesh/data_driven_generator) can be set to the mesh generator that would generate an output mesh from RGMB metadata. + +## Example Syntax + +!listing modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/drum_pad.i block=Mesh + +If [!param](/Mesh/ControlDrumMeshGenerator/pad_start_angle) and [!param](/Mesh/ControlDrumMeshGenerator/pad_end_angle) are not provided, the drum region is discretized with the same region ID applied to all azimuthal drum elements. In this case, only 3 values per axial level should be provided in [!param](/Mesh/ControlDrumMeshGenerator/region_ids) (drum inner, drum, background). + +!syntax parameters /Mesh/ControlDrumMeshGenerator + +!syntax inputs /Mesh/ControlDrumMeshGenerator + +!syntax children /Mesh/ControlDrumMeshGenerator diff --git a/modules/reactor/doc/content/source/meshgenerators/CoreMeshGenerator.md b/modules/reactor/doc/content/source/meshgenerators/CoreMeshGenerator.md index a28985f638b6..5518596dcc2b 100644 --- a/modules/reactor/doc/content/source/meshgenerators/CoreMeshGenerator.md +++ b/modules/reactor/doc/content/source/meshgenerators/CoreMeshGenerator.md @@ -4,7 +4,7 @@ ## Overview -This object is designed to be used in the Reactor MeshGenerator workflow, which also consists of [`ReactorMeshParams`](ReactorMeshParams.md), [`PinMeshGenerator`](PinMeshGenerator.md), and [`AssemblyMeshGenerator`](AssemblyMeshGenerator.md). +This object is designed to be used in the Reactor MeshGenerator workflow, which also consists of [`ReactorMeshParams`](ReactorMeshParams.md), [`PinMeshGenerator`](PinMeshGenerator.md), [`AssemblyMeshGenerator`](AssemblyMeshGenerator.md), and [`ControlDrumMeshGenerator`](ControlDrumMeshGenerator.md). The `CoreMeshGenerator` object generates core-like reactor geometry structures in either square or hexagonal geometries with block ID assignments and reporting (extra integer) IDs, as described in [`PatternedCartesianMeshGenerator`](PatternedCartesianMeshGenerator.md) and [`PatternedHexMeshGenerator`](PatternedHexMeshGenerator.md). There is expected to only be a single `CoreMeshGenerator` in a Mesh definition. @@ -43,7 +43,7 @@ By default, `CoreMeshGenerator` will stitch assemblies created by [`AssemblyMesh 2. Two assemblies have the same pin lattice structure and geometry, but the constituent pins of each assembly are subdivided into a different number of sectors per side. 3. One assembly is defined as a heterogeneous mesh (contains one or more pins), and the other assembly is homogenized. -`CoreMeshGenerator` will throw a warning if it detects that assembly stitching may lead to hanging nodes. If this happens, the user can regenerate the core mesh by setting [ReactorMeshParams](ReactorMeshParams.md)/[!param](/Mesh/ReactorMeshParams/flexible_assembly_stitching) to `true` to enable flexible assembly stitching. This flexible assembly stitching algorithm deletes the outermost mesh interval and replaces it with a triangulated region using [`FlexiblePatternGenerator`](FlexiblePatternGenerator.md). For a homogeneous assembly, the entire assembly region is triangulated. By doing so, the number of nodes at the outer boundary of each input assembly will be identical and positioned at the same locations, thus enabling stitching of dissimilar assemblies. In order to control the number of sectors at the outer assembly boundary after the triangulation step, the user can set this parameter using [ReactorMeshParams](ReactorMeshParams.md)/[!param](/Mesh/ReactorMeshParams/num_sectors_at_flexible_boundary). The following three images describe how flexible assembly patterning can be used to address the issue of hanging nodes for the three cases listed above: +`CoreMeshGenerator` will throw a warning if it detects that assembly stitching may lead to hanging nodes. If this happens, the user can regenerate the core mesh by setting [ReactorMeshParams](ReactorMeshParams.md)/[!param](/Mesh/ReactorMeshParams/flexible_assembly_stitching) to `true` to enable flexible assembly stitching. This flexible assembly stitching algorithm deletes the outermost mesh interval and replaces it with a triangulated region using [`FlexiblePatternGenerator`](FlexiblePatternGenerator.md). For a homogeneous assembly, the entire assembly region is triangulated. By doing so, the number of nodes at the outer boundary of each input assembly will be identical and positioned at the same locations, thus enabling stitching of dissimilar assemblies. In order to control the number of sectors at the outer assembly boundary after the triangulation step, the user can set this parameter using [ReactorMeshParams](ReactorMeshParams.md)/[!param](/Mesh/ReactorMeshParams/num_sectors_at_flexible_boundary). If the core lattice consists of any structures created with [ControlDrumMeshGenerator](ControlDrumMeshGenerator.md), then [ReactorMeshParams](ReactorMeshParams.md)/[!param](/Mesh/ReactorMeshParams/flexible_assembly_stitching) must be set to `true`. The following three images describe how flexible assembly patterning can be used to address the issue of hanging nodes for the three cases listed above: !media reactor/meshgenerators/rgmb_flexible_stitching_case1.png style=width:70%; @@ -53,9 +53,7 @@ By default, `CoreMeshGenerator` will stitch assemblies created by [`AssemblyMesh ## Metadata Information -Users may be interested in defining metadata to represent the reactor geometry and region IDs assigned to each geometry zone, which may be useful to users who want mesh geometry and composition information without having to inspect the generated mesh itself. [!param](/Mesh/CoreMeshGenerator/show_rgmb_metadata) can be set to true in order to see the values of these metadata entries as console output. - -At the core level, the following metadata is defined on the output mesh: +Users may be interested in defining metadata to represent the reactor geometry and region IDs assigned to each geometry zone, which may be useful to users who want mesh geometry and composition information without having to inspect the generated mesh itself. At the core level, the following metadata is defined on the output mesh: - `assembly_names`: Mesh generator names of input assemblies in lattice, similar to input parameter (/Mesh/CoreMeshGenerator/inputs) but with the dummy assembly name excluded - `lattice`: 2-D lattice of assemblies in core, where each location represents the 0-based index of the assembly in the list of names under the `assembly_names` metadata entry. A -1 entry represents a dummy assembly. diff --git a/modules/reactor/doc/content/source/meshgenerators/PinMeshGenerator.md b/modules/reactor/doc/content/source/meshgenerators/PinMeshGenerator.md index 9481304d06ec..ec1c24f0107e 100644 --- a/modules/reactor/doc/content/source/meshgenerators/PinMeshGenerator.md +++ b/modules/reactor/doc/content/source/meshgenerators/PinMeshGenerator.md @@ -4,7 +4,7 @@ ## Overview -This object is designed to be used in the Reactor MeshGenerator workflow, which also consists of [`ReactorMeshParams`](ReactorMeshParams.md), [`AssemblyMeshGenerator`](AssemblyMeshGenerator.md), and [`CoreMeshGenerator`](CoreMeshGenerator.md). +This object is designed to be used in the Reactor MeshGenerator workflow, which also consists of [`ReactorMeshParams`](ReactorMeshParams.md), [`AssemblyMeshGenerator`](AssemblyMeshGenerator.md), [`ControlDrumMeshGenerator`](ControlDrumMeshGenerator.md), and [`CoreMeshGenerator`](CoreMeshGenerator.md). The `PinMeshGenerator` object generates square or hexagonal reactor geometry pin cell structures which may be combined into larger assembly structures using `AssemblyMeshGenerator`. The block IDs, external boundary ID, region IDs (e.g., materials), and reporting IDs (extra element integers identifying unique planes and pins, as described in [`PatternedCartesianMeshGenerator`](PatternedCartesianMeshGenerator.md) and [`PatternedHexMeshGenerator`](PatternedHexMeshGenerator.md) are automatically assigned once the user provides some basic information. @@ -21,7 +21,7 @@ The [!param](/Mesh/PinMeshGenerator/region_ids) parameter provides a map of "reg The region_ids parameter entries can conveniently be selected to match material ids to be assigned to each region of the problem. Using the same value in multiple entries of the [!param](/Mesh/PinMeshGenerator/region_ids) parameter will effectively assign elements in multiple zones to the same region_id. -Region IDs are mapped to the mesh as an extra element integer, where the integer value for each mesh element will match the information provided in [!param](/Mesh/PinMeshGenerator/region_ids). For ease of use, block ids are generated automatically by the mesh generator, and for users who require element identification by block name, the optional parameter [!param](/Mesh/PinMeshGenerator/block_names) can be defined to set block names in the same manner as [!param](/Mesh/PinMeshGenerator/region_ids). In the resulting mesh, each block name will be prepended with the prefix `RGMB_PIN_`, where `` is the pin ID provided by the user through [!param](/Mesh/PinMeshGenerator/pin_type). If block names are not provided by the user, block names will be assigned automatically to have the name `RGMB_PIN`. If [ReactorMeshParams](ReactorMeshParams.md)/[!param](/Mesh/ReactorMeshParams/region_id_as_block_name) is set to `true`, the resulting element will have the block name `RGMB_PIN_REG`, where `` is the region ID of the element. Note that [!param](/Mesh/ReactorMeshParams/region_id_as_block_name) should not be used in conjunction with [!param](/Mesh/PinMeshGenerator/block_names). Regardless of whether block names are provided are not, the suffix `_TRI` is automatically added to the block name for all triangular elements in the central pin mesh elements when [!param](/Mesh/PinMeshGenerator/quad_center_elements) is set to false. This is to ensure that quadrilateral elements and triangular elements that might otherwise share the same region ID are mapped to separate block names. If [!param](/Mesh/PinMeshGenerator/use_as_assembly) is set to true, the block name will have the prefix `RGMB_ASSEMBLY` instead of `RGMB_PIN`. +Region IDs are mapped to the mesh as an extra element integer, where the integer value for each mesh element will match the information provided in [!param](/Mesh/PinMeshGenerator/region_ids). For ease of use, block ids are generated automatically by the mesh generator, and for users who require element identification by block name, the optional parameter [!param](/Mesh/PinMeshGenerator/block_names) can be defined to set block names in the same manner as [!param](/Mesh/PinMeshGenerator/region_ids). In the resulting mesh, each block name will be prepended with the prefix `RGMB_PIN_`, where `` is the pin ID provided by the user through [!param](/Mesh/PinMeshGenerator/pin_type). If block names are not provided by the user, block names will be assigned automatically to have the name `RGMB_PIN`. If [ReactorMeshParams](ReactorMeshParams.md)/[!param](/Mesh/ReactorMeshParams/region_id_as_block_name) is set to `true`, the resulting element will have the block name `RGMB_PIN_REG`, where `` is the region ID of the element. Note that [!param](/Mesh/ReactorMeshParams/region_id_as_block_name) should not be used in conjunction with [!param](/Mesh/PinMeshGenerator/block_names). Regardless of whether block names are provided or not, the suffix `_TRI` is automatically added to the block name for all triangular elements in the central pin mesh elements when [!param](/Mesh/PinMeshGenerator/quad_center_elements) is set to false. This is to ensure that quadrilateral elements and triangular elements that might otherwise share the same region ID are mapped to separate block names. If [!param](/Mesh/PinMeshGenerator/use_as_assembly) is set to true, the block name will have the prefix `RGMB_ASSEMBLY` instead of `RGMB_PIN`. ## Reporting ID Information @@ -37,9 +37,7 @@ If the pin is extruded to three dimensions the top-most boundary ID must be assi ## Metadata Information -Users may be interested in defining metadata to represent the reactor geometry and region IDs assigned to each geometry zone, which may be useful to users who want mesh geometry and composition information without having to inspect the generated mesh itself. In order to see the values of these metadata entries as console output, [!param](/Mesh/PinMeshGenerator/show_rgmb_metadata) can be set to true. - -At the pin level, the following metadata is defined on the pin mesh: +Users may be interested in defining metadata to represent the reactor geometry and region IDs assigned to each geometry zone, which may be useful to users who want mesh geometry and composition information without having to inspect the generated mesh itself. At the pin level, the following metadata is defined on the pin mesh: - `pin_type`: pin_type id associated with pin mesh, equivalent to the input parameter [!param](/Mesh/PinMeshGenerator/pin_type) - `pitch`: Pitch of outermost boundary polygon, equivalent to the input parameter [!param](/Mesh/PinMeshGenerator/pitch) diff --git a/modules/reactor/doc/content/source/meshgenerators/ReactorMeshParams.md b/modules/reactor/doc/content/source/meshgenerators/ReactorMeshParams.md index a9a6a63b5357..976ea9c1d2aa 100644 --- a/modules/reactor/doc/content/source/meshgenerators/ReactorMeshParams.md +++ b/modules/reactor/doc/content/source/meshgenerators/ReactorMeshParams.md @@ -4,7 +4,7 @@ ## Overview -The `ReactorMeshParams` object stores persistent mesh information about a reactor's geometry for use with [PinMeshGenerator](/PinMeshGenerator.md), [AssemblyMeshGenerator](/AssemblyMeshGenerator.md), and [CoreMeshGenerator](/CoreMeshGenerator.md). This is where the geometry type ([!param](/Mesh/ReactorMeshParams/geom) as 'Square' or 'Hex' for cartesian and hexagonal definitions respectively) and the number of dimensions of the mesh ([!param](/Mesh/ReactorMeshParams/dim) either 2 for 2D or 3 for 3D) is declared and persistently enforced for the rest of the mesh definition. If the mesh is to be 3-dimensional, this is also where the axial information is declared ([!param](/Mesh/ReactorMeshParams/axial_regions) and [!param](/Mesh/ReactorMeshParams/axial_mesh_intervals)). In addition, the global option to automatically set block names for the output mesh based on the region IDs of the mesh can be selected in this mesh generator, by setting ([!param](/Mesh/ReactorMeshParams/region_id_as_block_name) to `true`. More information about this parameter can be found in the block naming sections of [PinMeshGenerator](/PinMeshGenerator.md), [AssemblyMeshGenerator](/AssemblyMeshGenerator.md), and [CoreMeshGenerator](/CoreMeshGenerator.md). In order to enable flexible assembly stitching between [AssemblyMeshGenerator](/AssemblyMeshGenerator.md) objects that do not share the same number of nodes at the outer assembly interface, [!param](/Mesh/ReactorMeshParams/flexible_assembly_stitching) can be set to `true`, and the number of sectors that are created at the flexible assembly boundary interface is controlled by ([!param](/Mesh/ReactorMeshParams/num_sectors_at_flexible_boundary). More information about flexible assembly stitching can be found in [CoreMeshGenerator](/CoreMeshGenerator.md). +The `ReactorMeshParams` object stores persistent mesh information about a reactor's geometry for use with [PinMeshGenerator](/PinMeshGenerator.md), [AssemblyMeshGenerator](/AssemblyMeshGenerator.md), [ControlDrumMeshGenerator](/ControlDrumMeshGenerator.md), and [CoreMeshGenerator](/CoreMeshGenerator.md). This is where the geometry type ([!param](/Mesh/ReactorMeshParams/geom) as 'Square' or 'Hex' for cartesian and hexagonal definitions respectively) and the number of dimensions of the mesh ([!param](/Mesh/ReactorMeshParams/dim) either 2 for 2D or 3 for 3D) is declared and persistently enforced for the rest of the mesh definition. If the mesh is to be 3-dimensional, this is also where the axial information is declared ([!param](/Mesh/ReactorMeshParams/axial_regions) and [!param](/Mesh/ReactorMeshParams/axial_mesh_intervals)). In addition, the global option to automatically set block names for the output mesh based on the region IDs of the mesh can be selected in this mesh generator, by setting ([!param](/Mesh/ReactorMeshParams/region_id_as_block_name) to `true`. More information about this parameter can be found in the block naming sections of [PinMeshGenerator](/PinMeshGenerator.md), [AssemblyMeshGenerator](/AssemblyMeshGenerator.md), [ControlDrumMeshGenerator](/ControlDrumMeshGenerator.md), and [CoreMeshGenerator](/CoreMeshGenerator.md). In order to enable flexible assembly stitching between [AssemblyMeshGenerator](/AssemblyMeshGenerator.md) and [ControlDrumMeshGenerator](/ControlDrumMeshGenerator.md) objects that do not share the same number of nodes at the outer assembly interface, [!param](/Mesh/ReactorMeshParams/flexible_assembly_stitching) can be set to `true`, and the number of sectors that are created at the flexible assembly boundary interface is controlled by ([!param](/Mesh/ReactorMeshParams/num_sectors_at_flexible_boundary). More information about flexible assembly stitching can be found in [CoreMeshGenerator](/CoreMeshGenerator.md). ## Metadata Information diff --git a/modules/reactor/include/meshgenerators/AssemblyMeshGenerator.h b/modules/reactor/include/meshgenerators/AssemblyMeshGenerator.h index 64c3c74b8d62..63f543fd5fc0 100644 --- a/modules/reactor/include/meshgenerators/AssemblyMeshGenerator.h +++ b/modules/reactor/include/meshgenerators/AssemblyMeshGenerator.h @@ -75,7 +75,7 @@ class AssemblyMeshGenerator : public ReactorGeometryMeshBuilderBase std::string _geom_type; ///The number of dimensions the mesh is ultimately going to have (2 or 3, declared in the ReactorMeshParams object) - int _mesh_dimensions; + unsigned int _mesh_dimensions; ///The heights of the axial regions that are stored on the ReactorMeshParams object std::vector _axial_boundaries; @@ -93,7 +93,7 @@ class AssemblyMeshGenerator : public ReactorGeometryMeshBuilderBase boundary_id_type _assembly_boundary_id; ///The name of the assembly outer boundary, equal to the concatenation of "outer_assembly_" and the assembly-type ID - std::string _assembly_boundary_name; + BoundaryName _assembly_boundary_name; /// The final mesh that is generated by the subgenerators; /// This mesh is generated by the subgenerators with only element and boundary IDs changed. diff --git a/modules/reactor/include/meshgenerators/ConcentricCircleGeneratorBase.h b/modules/reactor/include/meshgenerators/ConcentricCircleGeneratorBase.h index e6fd32751d64..a0f291647862 100644 --- a/modules/reactor/include/meshgenerators/ConcentricCircleGeneratorBase.h +++ b/modules/reactor/include/meshgenerators/ConcentricCircleGeneratorBase.h @@ -54,7 +54,7 @@ class ConcentricCircleGeneratorBase : public PolygonMeshGeneratorBase /// Boundary ID of the mesh's external boundary const boundary_id_type _external_boundary_id; /// Boundary Name of the mesh's external boundary - const std::string _external_boundary_name; + const BoundaryName _external_boundary_name; /// Boundary Names of the mesh's inward interface boundaries const std::vector _inward_interface_boundary_names; /// Boundary Names of the mesh's outward interface boundaries diff --git a/modules/reactor/include/meshgenerators/ControlDrumMeshGenerator.h b/modules/reactor/include/meshgenerators/ControlDrumMeshGenerator.h new file mode 100644 index 000000000000..803fd27cb84e --- /dev/null +++ b/modules/reactor/include/meshgenerators/ControlDrumMeshGenerator.h @@ -0,0 +1,74 @@ +//* This file is part of the MOOSE framework +//* https://www.mooseframework.org +//* +//* All rights reserved, see COPYRIGHT for full restrictions +//* https://github.com/idaholab/moose/blob/master/COPYRIGHT +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#pragma once + +#include "ReactorGeometryMeshBuilderBase.h" + +/** + * Mesh generator for defining a reactor control drum that can be used in a Cartesian or hexagonal + * lattice with the option to be 2-D or 3-D. + */ +class ControlDrumMeshGenerator : public ReactorGeometryMeshBuilderBase +{ +public: + static InputParameters validParams(); + + ControlDrumMeshGenerator(const InputParameters & parameters); + + std::unique_ptr generate() override; + +protected: + /// Define metadata associated with ControlDrumMeshGenerator + void generateMetadata(); + + /// Get drum index from radial index of mesh element, drum index is used to retrieve region ID and block names for each element + unsigned int + getDrumIdxFromRadialIdx(const unsigned int radial_idx, const Real elem_x, const Real elem_y); + + /// The type of geometry that is being described (Square or Hex, declared in the ReactorMeshParams object) + std::string _geom_type; + + /// The number of dimensions the mesh is ultimately going to have (2 or 3, declared in the ReactorMeshParams object) + unsigned int _mesh_dimensions; + + /// The id number for the type of the assembly + const subdomain_id_type _assembly_type; + + /// The inner radius of drum region + const Real _drum_inner_radius; + + /// The outer radius of drum region + const Real _drum_outer_radius; + + /// Whether this mesh should be extruded to 3-D, making it the final structure in the reactor mesh + const bool _extrude; + + /// 2-D vector (axial outer indexing, radial inner indexing) used to set "region_id" extra-element integer of the control drum mesh elements + std::vector> _region_ids; + + /// Whether block names have been provided by user + bool _has_block_names; + + /// 2-D vector (axial outer indexing, radial inner indexing) used to set block names of pin mesh elements + std::vector> _block_names; + + /// Starting angle of drum pad region + Real _pad_start_angle; + + /// Ending angle of drum pad region + Real _pad_end_angle; + + /// Whether pad start and end angles are provided by user + bool _has_pad_region; + + /// The final mesh that is generated by the subgenerators; + /// This mesh is generated by the subgenerators with only element and boundary IDs changed. + std::unique_ptr * _build_mesh; +}; diff --git a/modules/reactor/include/meshgenerators/CoreMeshGenerator.h b/modules/reactor/include/meshgenerators/CoreMeshGenerator.h index 07821211fe86..62f86017744d 100644 --- a/modules/reactor/include/meshgenerators/CoreMeshGenerator.h +++ b/modules/reactor/include/meshgenerators/CoreMeshGenerator.h @@ -71,7 +71,7 @@ class CoreMeshGenerator : public ReactorGeometryMeshBuilderBase std::string _desired_area_func; ///The number of dimensions the mesh is ultimately going to have (2 or 3, declared in the ReactorMeshParams object) - int _mesh_dimensions; + unsigned int _mesh_dimensions; ///A mapping from pin-type IDs to region IDs used when assigning region IDs during the assembly stitching stage std::map>> _pin_region_id_map; @@ -91,6 +91,12 @@ class CoreMeshGenerator : public ReactorGeometryMeshBuilderBase ///A mapping from assembly-type IDs to block names in the assembly background regions used when assigning block names during the assembly stitching stage std::map> _background_block_name_map; + ///A mapping from assembly-type IDs to region IDs in the drum regions used when assigning region IDs during the assembly stitching stage + std::map>> _drum_region_id_map; + + ///A mapping from assembly-type IDs to block names in the drum regions used when assigning block names during the assembly stitching stage + std::map>> _drum_block_name_map; + /// The final mesh that is generated by the subgenerators; /// This mesh is generated by the subgenerators with only element and boundary IDs changed. std::unique_ptr * _build_mesh; diff --git a/modules/reactor/include/meshgenerators/FlexiblePatternGenerator.h b/modules/reactor/include/meshgenerators/FlexiblePatternGenerator.h index f58b0266a440..189571c9f0b3 100644 --- a/modules/reactor/include/meshgenerators/FlexiblePatternGenerator.h +++ b/modules/reactor/include/meshgenerators/FlexiblePatternGenerator.h @@ -86,7 +86,7 @@ class FlexiblePatternGenerator : public PolygonMeshGeneratorBase /// Boundary ID of the external boundary const boundary_id_type _external_boundary_id; /// Boundary Name of the external boundary - const std::string _external_boundary_name; + const BoundaryName _external_boundary_name; /// The final mesh that is generated by the subgenerators; /// This mesh is generated by the subgenerators with only element and boundary IDs changed. diff --git a/modules/reactor/include/meshgenerators/PatternedCartesianMeshGenerator.h b/modules/reactor/include/meshgenerators/PatternedCartesianMeshGenerator.h index 18d140d45f9c..f67680d1273a 100644 --- a/modules/reactor/include/meshgenerators/PatternedCartesianMeshGenerator.h +++ b/modules/reactor/include/meshgenerators/PatternedCartesianMeshGenerator.h @@ -63,7 +63,7 @@ class PatternedCartesianMeshGenerator : public PolygonMeshGeneratorBase /// Boundary ID of mesh's external boundary const boundary_id_type _external_boundary_id; /// Boundary name of mesh's external boundary - const std::string _external_boundary_name; + const BoundaryName _external_boundary_name; /// Whether inward interface boundaries are created const bool _create_inward_interface_boundaries; /// Whether outward interface boundaries are created diff --git a/modules/reactor/include/meshgenerators/PatternedHexMeshGenerator.h b/modules/reactor/include/meshgenerators/PatternedHexMeshGenerator.h index 41ccd49b718c..19ea50f19be8 100644 --- a/modules/reactor/include/meshgenerators/PatternedHexMeshGenerator.h +++ b/modules/reactor/include/meshgenerators/PatternedHexMeshGenerator.h @@ -63,7 +63,7 @@ class PatternedHexMeshGenerator : public PolygonMeshGeneratorBase /// Boundary ID of mesh's external boundary const boundary_id_type _external_boundary_id; /// Boundary name of mesh's external boundary - const std::string _external_boundary_name; + const BoundaryName _external_boundary_name; /// Whether inward interface boundaries are created const bool _create_inward_interface_boundaries; /// Whether outward interface boundaries are created diff --git a/modules/reactor/include/meshgenerators/PinMeshGenerator.h b/modules/reactor/include/meshgenerators/PinMeshGenerator.h index c2e8bbd7ec5f..40e9057919af 100644 --- a/modules/reactor/include/meshgenerators/PinMeshGenerator.h +++ b/modules/reactor/include/meshgenerators/PinMeshGenerator.h @@ -63,7 +63,7 @@ class PinMeshGenerator : public ReactorGeometryMeshBuilderBase std::string _mesh_geometry; ///The number of dimensions the mesh is ultimately going to have (2 or 3, declared in the ReactorMeshParams object) - int _mesh_dimensions; + unsigned int _mesh_dimensions; ///Whether this mesh should be extruded to 3-D, making it the final structure in the reactor mesh const bool _extrude; diff --git a/modules/reactor/include/meshgenerators/PolygonMeshGeneratorBase.h b/modules/reactor/include/meshgenerators/PolygonMeshGeneratorBase.h index df3a97dcd874..2dab20709493 100644 --- a/modules/reactor/include/meshgenerators/PolygonMeshGeneratorBase.h +++ b/modules/reactor/include/meshgenerators/PolygonMeshGeneratorBase.h @@ -109,6 +109,21 @@ class PolygonMeshGeneratorBase : public MeshGenerator Real bias; }; + /** + * Makes radial correction to preserve ring area. + * @param azimuthal_list azimuthal angles (in degrees) of all the nodes on the circle + * @param full_circle whether the circle is a full or partial circle + * @param order order of mesh elements + * @param is_first_value_vertex whether the first value of the azimuthal_list belongs to a vertex + * instead of a midpoint + * @return a correction factor to preserve the area of the circle after polygonization during + * meshing + */ + static Real radiusCorrectionFactor(const std::vector & azimuthal_list, + const bool full_circle = true, + const unsigned int order = 1, + const bool is_first_value_vertex = true); + protected: /** * Creates a mesh of a slice that corresponds to a single side of the polygon to be generated. @@ -503,21 +518,6 @@ class PolygonMeshGeneratorBase : public MeshGenerator const bool generate_side_specific_boundaries = true, const QUAD_ELEM_TYPE quad_elem_type = QUAD_ELEM_TYPE::QUAD4) const; - /** - * Makes radial correction to preserve ring area. - * @param azimuthal_list azimuthal angles (in degrees) of all the nodes on the circle - * @param full_circle whether the circle is a full or partial circle - * @param order order of mesh elements - * @param is_first_value_vertex whether the first value of the azimuthal_list belongs to a vertex - * instead of a midpoint - * @return a correction factor to preserve the area of the circle after polygonization during - * meshing - */ - Real radiusCorrectionFactor(const std::vector & azimuthal_list, - const bool full_circle = true, - const unsigned int order = 1, - const bool is_first_value_vertex = true) const; - /** * Based on a pair of azimuthal angles, calculates the volume of a TRI6 element with one vertex at * the origin, the other two vertices on the unit circle. Here, the second vertex is on the @@ -527,7 +527,7 @@ class PolygonMeshGeneratorBase : public MeshGenerator * @param azi_pair a pair of the input azimuthal angles * @return the volume of the TRI6 element */ - Real dummyTRI6VolCalculator(const std::pair & azi_pair) const; + static Real dummyTRI6VolCalculator(const std::pair & azi_pair); /** * Creates peripheral area mesh for the patterned hexagon mesh. Note that the function create the diff --git a/modules/reactor/include/meshgenerators/ReactorGeometryMeshBuilderBase.h b/modules/reactor/include/meshgenerators/ReactorGeometryMeshBuilderBase.h index 422af947452b..81792d88afed 100644 --- a/modules/reactor/include/meshgenerators/ReactorGeometryMeshBuilderBase.h +++ b/modules/reactor/include/meshgenerators/ReactorGeometryMeshBuilderBase.h @@ -33,6 +33,9 @@ static const std::string pin_region_id_map = "pin_region_id_map"; static const std::string pin_block_name_map = "pin_block_name_map"; static const std::string flexible_assembly_stitching = "flexible_assembly_stitching"; static const std::string num_sectors_flexible_stitching = "num_sectors_flexible_stitching"; +static const std::string is_control_drum = "is_control_drum"; +static const std::string drum_region_ids = "drum_region_ids"; +static const std::string drum_block_names = "drum_block_names"; // Geometrical quantities static const std::string pitch = "pitch"; @@ -42,6 +45,8 @@ static const std::string duct_halfpitches = "duct_halfpitches"; static const std::string peripheral_ring_radius = "peripheral_ring_radius"; static const std::string pin_lattice = "pin_lattice"; static const std::string assembly_lattice = "assembly_lattice"; +static const std::string drum_pad_angles = "drum_pad_angles"; +static const std::string drum_radii = "drum_radii"; // Quantities related to region ids, type ids, and block names static const std::string pin_type = "pin_type"; @@ -60,12 +65,40 @@ static const std::string region_id_as_block_name = "region_id_as_block_name"; // only generating the mesh metadata static const std::string bypass_meshgen = "bypass_meshgen"; -// Default values for setting block IDs of RGMB regions -const subdomain_id_type PIN_BLOCK_ID_START = 10000; -const subdomain_id_type PIN_BLOCK_ID_TRI = 9999; +// Default values for setting block IDs and region IDs of RGMB regions const subdomain_id_type PIN_BLOCK_ID_TRI_FLEXIBLE = 9998; -const subdomain_id_type ASSEMBLY_BLOCK_ID_START = 20000; +const subdomain_id_type PIN_BLOCK_ID_TRI = 9999; +const subdomain_id_type PIN_BLOCK_ID_START = 10000; + +const subdomain_id_type CONTROL_DRUM_BLOCK_ID_INNER_TRI = 19995; +const subdomain_id_type CONTROL_DRUM_BLOCK_ID_INNER = 19996; +const subdomain_id_type CONTROL_DRUM_BLOCK_ID_PAD = 19997; +const subdomain_id_type CONTROL_DRUM_BLOCK_ID_OUTER = 19998; + const subdomain_id_type ASSEMBLY_BLOCK_ID_TRI_FLEXIBLE = 19999; +const subdomain_id_type ASSEMBLY_BLOCK_ID_START = 20000; + +const subdomain_id_type DUMMY_ASSEMBLY_BLOCK_ID = (UINT16_MAX / 2) - 1; +const subdomain_id_type PERIPHERAL_RING_BLOCK_ID = 25000; + +const subdomain_id_type MAX_PIN_TYPE_ID = (UINT16_MAX / 2) - 1; + +// Default values for setting block names of RGMB regions +const SubdomainName PIN_BLOCK_NAME_PREFIX = "RGMB_PIN"; +const SubdomainName ASSEMBLY_BLOCK_NAME_PREFIX = "RGMB_ASSEMBLY"; +const SubdomainName DRUM_BLOCK_NAME_PREFIX = "RGMB_DRUM"; +const SubdomainName CORE_BLOCK_NAME_PREFIX = "RGMB_CORE"; +const SubdomainName TRI_BLOCK_NAME_SUFFIX = "_TRI"; +const SubdomainName PERIPHERAL_RING_BLOCK_NAME = "PERIPHERY_GENERATED"; + +// Default values for setting boundary ids of RGMB regions +const boundary_id_type PIN_BOUNDARY_ID_START = 20000; +const boundary_id_type ASSEMBLY_BOUNDARY_ID_START = 2000; + +// Default values for setting boundary names of RGMB regions +const BoundaryName PIN_BOUNDARY_NAME_PREFIX = "outer_pin_"; +const BoundaryName ASSEMBLY_BOUNDARY_NAME_PREFIX = "outer_assembly_"; +const BoundaryName CORE_BOUNDARY_NAME = "outer_core"; } /** @@ -202,6 +235,14 @@ class ReactorGeometryMeshBuilderBase : public MeshGenerator std::string elem_block_name, SubdomainID & next_free_id); + /** + * Calls mesh subgenerators related to extrusion, renaming of top / bottom boundaries, and + * defining plane IDs + * @param input_mesh_name name of input 2D mesh generator to extrude + * @return name of final output 3D mesh generator + */ + MeshGeneratorName callExtrusionMeshSubgenerators(const MeshGeneratorName input_mesh_name); + ///The ReactorMeshParams object that is storing the reactor global information for this reactor geometry mesh MeshGeneratorName _reactor_params; /// specify the depletion id is generated at which reactor generation level @@ -209,6 +250,7 @@ class ReactorGeometryMeshBuilderBase : public MeshGenerator { Pin, Assembly, + Drum, Core }; diff --git a/modules/reactor/include/meshgenerators/ReactorMeshParams.h b/modules/reactor/include/meshgenerators/ReactorMeshParams.h index 89cdd6b11623..ff46c7f4f605 100644 --- a/modules/reactor/include/meshgenerators/ReactorMeshParams.h +++ b/modules/reactor/include/meshgenerators/ReactorMeshParams.h @@ -50,7 +50,4 @@ class ReactorMeshParams : public MeshGenerator ///Boundary id assigned to outer radial boundary of core mesh. boundary_id_type _radial_boundary; - - // Map between RGMB element block names, block ids, and region ids - std::map> _name_id_map; }; diff --git a/modules/reactor/include/meshgenerators/SimpleHexagonGenerator.h b/modules/reactor/include/meshgenerators/SimpleHexagonGenerator.h index d9e000c15de3..19f32e7619fc 100644 --- a/modules/reactor/include/meshgenerators/SimpleHexagonGenerator.h +++ b/modules/reactor/include/meshgenerators/SimpleHexagonGenerator.h @@ -43,5 +43,5 @@ class SimpleHexagonGenerator : public PolygonMeshGeneratorBase /// Boundary ID of the external boundary const boundary_id_type _external_boundary_id; /// Boundary Name of the external boundary - const std::string _external_boundary_name; + const BoundaryName _external_boundary_name; }; diff --git a/modules/reactor/src/meshgenerators/AssemblyMeshGenerator.C b/modules/reactor/src/meshgenerators/AssemblyMeshGenerator.C index 54f8b3e4f0a2..a4944b729a5c 100644 --- a/modules/reactor/src/meshgenerators/AssemblyMeshGenerator.C +++ b/modules/reactor/src/meshgenerators/AssemblyMeshGenerator.C @@ -76,7 +76,7 @@ AssemblyMeshGenerator::validParams() params.addClassDescription("This AssemblyMeshGenerator object is designed to generate " "assembly-like structures, with IDs, from a reactor geometry. " "The assembly-like structures must consist of a full pattern of equal " - "sized pins from PinMeshGenerator" + "sized pins from PinMeshGenerator. " "A hexagonal assembly will be placed inside of a bounding hexagon " "consisting of a background region and, optionally," " duct regions."); @@ -118,7 +118,7 @@ AssemblyMeshGenerator::AssemblyMeshGenerator(const InputParameters & parameters) initializeReactorMeshParams(reactor_params); _geom_type = getReactorParam(RGMB::mesh_geometry); - _mesh_dimensions = getReactorParam(RGMB::mesh_dimensions); + _mesh_dimensions = getReactorParam(RGMB::mesh_dimensions); if (_extrude && _mesh_dimensions != 3) paramError("extrude", @@ -257,8 +257,8 @@ AssemblyMeshGenerator::AssemblyMeshGenerator(const InputParameters & parameters) // Declare dependency of inputs to sub generator calls. If mesh generation declareMeshesForSub("inputs"); - _assembly_boundary_id = 2000 + _assembly_type; - _assembly_boundary_name = "outer_assembly_" + std::to_string(_assembly_type); + _assembly_boundary_id = RGMB::ASSEMBLY_BOUNDARY_ID_START + _assembly_type; + _assembly_boundary_name = RGMB::ASSEMBLY_BOUNDARY_NAME_PREFIX + std::to_string(_assembly_type); // Call PatternedHexMeshGenerator or PatternedCartesianMeshGenerator to stitch assembly { @@ -295,7 +295,8 @@ AssemblyMeshGenerator::AssemblyMeshGenerator(const InputParameters & parameters) params.set("background_intervals") = _background_intervals; // Initial block id used to define peripheral regions of assembly - const auto background_block_name = "RGMB_ASSEMBLY" + std::to_string(_assembly_type) + "_R0"; + const auto background_block_name = + RGMB::ASSEMBLY_BLOCK_NAME_PREFIX + std::to_string(_assembly_type) + "_R0"; const auto background_block_id = RGMB::ASSEMBLY_BLOCK_ID_START; params.set("background_block_id") = background_block_id; params.set("background_block_name") = background_block_name; @@ -307,8 +308,9 @@ AssemblyMeshGenerator::AssemblyMeshGenerator(const InputParameters & parameters) std::vector duct_block_names; for (const auto duct_it : index_range(_duct_region_ids[0])) { - const auto duct_block_name = - "RGMB_ASSEMBLY" + std::to_string(_assembly_type) + "_R" + std::to_string(duct_it + 1); + const auto duct_block_name = RGMB::ASSEMBLY_BLOCK_NAME_PREFIX + + std::to_string(_assembly_type) + "_R" + + std::to_string(duct_it + 1); const auto duct_block_id = RGMB::ASSEMBLY_BLOCK_ID_START + duct_it + 1; duct_block_ids.push_back(duct_block_id); duct_block_names.push_back(duct_block_name); @@ -321,7 +323,7 @@ AssemblyMeshGenerator::AssemblyMeshGenerator(const InputParameters & parameters) } params.set("external_boundary_id") = _assembly_boundary_id; - params.set("external_boundary_name") = _assembly_boundary_name; + params.set("external_boundary_name") = _assembly_boundary_name; addMeshSubgenerator(patterned_mg_name, name() + "_pattern", params); @@ -347,7 +349,8 @@ AssemblyMeshGenerator::AssemblyMeshGenerator(const InputParameters & parameters) { const auto pin_name = _inputs[pattern_idx]; const auto pin_id = getMeshProperty(RGMB::pin_type, pin_name); - const BoundaryName boundary_name = "outer_pin_" + std::to_string(pin_id); + const BoundaryName boundary_name = + RGMB::PIN_BOUNDARY_NAME_PREFIX + std::to_string(pin_id); if (!std::count(boundaries_to_delete.begin(), boundaries_to_delete.end(), boundary_name)) boundaries_to_delete.push_back(boundary_name); } @@ -385,55 +388,7 @@ AssemblyMeshGenerator::AssemblyMeshGenerator(const InputParameters & parameters) } if (_extrude && _mesh_dimensions == 3) - { - std::vector axial_boundaries = - getReactorParam>(RGMB::axial_mesh_sizes); - const auto top_boundary = getReactorParam(RGMB::top_boundary_id); - const auto bottom_boundary = getReactorParam(RGMB::bottom_boundary_id); - { - auto params = _app.getFactory().getValidParams("AdvancedExtruderGenerator"); - - params.set("input") = build_mesh_name; - params.set("direction") = Point(0, 0, 1); - params.set>("num_layers") = - getReactorParam>(RGMB::axial_mesh_intervals); - params.set>("heights") = axial_boundaries; - params.set("bottom_boundary") = bottom_boundary; - params.set("top_boundary") = top_boundary; - - addMeshSubgenerator("AdvancedExtruderGenerator", name() + "_extruded", params); - } - - { - auto params = _app.getFactory().getValidParams("RenameBoundaryGenerator"); - - params.set("input") = name() + "_extruded"; - params.set>("old_boundary") = { - std::to_string(top_boundary), - std::to_string(bottom_boundary)}; // hard coded boundary IDs in patterned mesh generator - params.set>("new_boundary") = {"top", "bottom"}; - - addMeshSubgenerator("RenameBoundaryGenerator", name() + "_change_plane_name", params); - } - - { - auto params = _app.getFactory().getValidParams("PlaneIDMeshGenerator"); - - params.set("input") = name() + "_change_plane_name"; - - std::vector plane_heights{0}; - for (Real z : axial_boundaries) - plane_heights.push_back(z + plane_heights.back()); - - params.set>("plane_coordinates") = plane_heights; - - std::string plane_id_name = "plane_id"; - params.set("id_name") = "plane_id"; - - build_mesh_name = name() + "_extrudedIDs"; - addMeshSubgenerator("PlaneIDMeshGenerator", build_mesh_name, params); - } - } + build_mesh_name = callExtrusionMeshSubgenerators(build_mesh_name); // Store final mesh subgenerator _build_mesh = &getMeshByName(build_mesh_name); @@ -460,6 +415,7 @@ AssemblyMeshGenerator::generateMetadata() declareMeshProperty(RGMB::is_homogenized, false); declareMeshProperty(RGMB::is_single_pin, false); declareMeshProperty(RGMB::extruded, _extrude && _mesh_dimensions == 3); + declareMeshProperty(RGMB::is_control_drum, false); // Following metadata is only relevant if an output mesh is generated by RGMB if (!getReactorParam(RGMB::bypass_meshgen)) { @@ -489,9 +445,6 @@ AssemblyMeshGenerator::generateMetadata() } declareMeshProperty(RGMB::pin_names, input_pin_names); declareMeshProperty(RGMB::pin_lattice, pin_name_lattice); - - if (getParam("show_rgmb_metadata")) - printReactorMetadata("assembly", name()); } void @@ -504,8 +457,8 @@ AssemblyMeshGenerator::generateFlexibleAssemblyBoundaries() mooseError("Attempting to use flexible stitching on assembly " + name() + " that does not have a background region. This is not yet supported."); const auto radial_index = _duct_region_ids.size() == 0 ? 0 : _duct_region_ids[0].size(); - block_to_delete = - "RGMB_ASSEMBLY" + std::to_string(_assembly_type) + "_R" + std::to_string(radial_index); + block_to_delete = RGMB::ASSEMBLY_BLOCK_NAME_PREFIX + std::to_string(_assembly_type) + "_R" + + std::to_string(radial_index); { // Invoke BlockDeletionGenerator to delete outermost mesh interval of assembly @@ -530,7 +483,8 @@ AssemblyMeshGenerator::generateFlexibleAssemblyBoundaries() params.set("boundary_size") = getReactorParam(RGMB::assembly_pitch); params.set("external_boundary_id") = _assembly_boundary_id; params.set("external_boundary_name") = _assembly_boundary_name; - params.set("background_subdomain_name") = block_to_delete + "_TRI"; + params.set("background_subdomain_name") = + block_to_delete + RGMB::TRI_BLOCK_NAME_SUFFIX; params.set("verify_holes") = false; params.set("background_subdomain_id") = RGMB::ASSEMBLY_BLOCK_ID_TRI_FLEXIBLE; @@ -582,7 +536,8 @@ AssemblyMeshGenerator::generate() std::string pin_type_id_name = "pin_type_id"; std::string assembly_type_id_name = "assembly_type_id"; std::string radial_id_name = "radial_id"; - const std::string default_block_name = "RGMB_ASSEMBLY" + std::to_string(_assembly_type); + const std::string default_block_name = + RGMB::ASSEMBLY_BLOCK_NAME_PREFIX + std::to_string(_assembly_type); auto pin_type_id_int = getElemIntegerFromMesh(*(*_build_mesh), pin_type_id_name, true); auto region_id_int = getElemIntegerFromMesh(*(*_build_mesh), region_id_name, true); @@ -622,20 +577,20 @@ AssemblyMeshGenerator::generate() else if (getReactorParam(RGMB::region_id_as_block_name)) elem_block_name += "_REG" + std::to_string(elem_rid); if (elem->type() == TRI3 || elem->type() == PRISM6) - elem_block_name += "_TRI"; + elem_block_name += RGMB::TRI_BLOCK_NAME_SUFFIX; updateElementBlockNameId( *(*_build_mesh), elem, rgmb_name_id_map, elem_block_name, next_block_id); } else { // Assembly peripheral element (background / duct), set subdomains according - // to user preferences and set pin type id to (UINT16_MAX/2) - 1 - peripheral index + // to user preferences and set pin type id to RGMB::MAX_PIN_TYPE_ID - peripheral index // Region id is inferred from z_id and peripheral_idx const auto base_block_id = elem->subdomain_id(); const auto base_block_name = (*_build_mesh)->subdomain_name(base_block_id); // Check if block name has correct prefix - std::string prefix = "RGMB_ASSEMBLY" + std::to_string(_assembly_type) + "_R"; + std::string prefix = RGMB::ASSEMBLY_BLOCK_NAME_PREFIX + std::to_string(_assembly_type) + "_R"; if (!(base_block_name.find(prefix, 0) == 0)) continue; // Peripheral index is integer value of substring after prefix @@ -643,7 +598,7 @@ AssemblyMeshGenerator::generate() bool is_background_region = peripheral_idx == 0; - subdomain_id_type pin_type = (UINT16_MAX / 2) - 1 - peripheral_idx; + subdomain_id_type pin_type = RGMB::MAX_PIN_TYPE_ID - peripheral_idx; elem->set_extra_integer(pin_type_id_int, pin_type); const auto elem_rid = (is_background_region ? _background_region_id[z_id] @@ -669,7 +624,8 @@ AssemblyMeshGenerator::generate() addDepletionId(*(*_build_mesh), option, DepletionIDGenerationLevel::Assembly, _extrude); } - (*_build_mesh)->find_neighbors(); + // Mark mesh as not prepared, as block ID's were re-assigned in this method + (*_build_mesh)->set_isnt_prepared(); return std::move(*_build_mesh); } diff --git a/modules/reactor/src/meshgenerators/ConcentricCircleGeneratorBase.C b/modules/reactor/src/meshgenerators/ConcentricCircleGeneratorBase.C index 1a77f006469f..ce2555479871 100644 --- a/modules/reactor/src/meshgenerators/ConcentricCircleGeneratorBase.C +++ b/modules/reactor/src/meshgenerators/ConcentricCircleGeneratorBase.C @@ -68,8 +68,8 @@ ConcentricCircleGeneratorBase::validParams() params.addRangeCheckedParam("external_boundary_id", "external_boundary_id>0", "Optional customized external boundary id."); - params.addParam("external_boundary_name", - "Optional customized external boundary name."); + params.addParam("external_boundary_name", + "Optional customized external boundary name."); MooseEnum tri_elem_type("TRI3 TRI6 TRI7", "TRI3"); params.addParam( @@ -151,8 +151,8 @@ ConcentricCircleGeneratorBase::ConcentricCircleGeneratorBase(const InputParamete ? getParam("external_boundary_id") : 0), _external_boundary_name(isParamValid("external_boundary_name") - ? getParam("external_boundary_name") - : std::string()), + ? getParam("external_boundary_name") + : BoundaryName()), _inward_interface_boundary_names( isParamValid("inward_interface_boundary_names") ? getParam>("inward_interface_boundary_names") diff --git a/modules/reactor/src/meshgenerators/ControlDrumMeshGenerator.C b/modules/reactor/src/meshgenerators/ControlDrumMeshGenerator.C new file mode 100644 index 000000000000..82383a2577f4 --- /dev/null +++ b/modules/reactor/src/meshgenerators/ControlDrumMeshGenerator.C @@ -0,0 +1,517 @@ +//* This file is part of the MOOSE framework +//* https://www.mooseframework.org +//* +//* All rights reserved, see COPYRIGHT for full restrictions +//* https://github.com/idaholab/moose/blob/master/COPYRIGHT +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#include "ControlDrumMeshGenerator.h" + +#include "ReactorGeometryMeshBuilderBase.h" +#include "MooseApp.h" +#include "Factory.h" +#include "libmesh/elem.h" +#include "MooseMeshUtils.h" +#include "PolygonMeshGeneratorBase.h" + +registerMooseObject("ReactorApp", ControlDrumMeshGenerator); + +InputParameters +ControlDrumMeshGenerator::validParams() +{ + auto params = ReactorGeometryMeshBuilderBase::validParams(); + + params.addRequiredParam( + "reactor_params", + "The ReactorMeshParams MeshGenerator that is the basis for this component mesh."); + params.addRequiredParam( + "assembly_type", + "The assembly type integer ID to use for this control drum definition. " + "This parameter should be uniquely defined for each ControlDrumMeshGenerator " + "and AssemblyMeshGenerator structure in the RGMB workflow."); + params.addParam("extrude", + false, + "Determines if this is the final step in the geometry construction" + " and extrudes the 2D geometry to 3D. If this is true then this mesh " + "cannot be used in further mesh building in the Reactor workflow"); + params.addRequiredRangeCheckedParam( + "drum_inner_radius", "drum_inner_radius>0", "Inner radius of drum region"); + params.addRequiredRangeCheckedParam( + "drum_outer_radius", "drum_outer_radius>0", "Outer radius of drum region"); + params.addRangeCheckedParam( + "drum_inner_intervals", + 1, + "drum_inner_intervals>0", + "Number of radial mesh intervals in region up to inner drum radius"); + params.addRangeCheckedParam( + "drum_intervals", 1, "drum_intervals>0", "Number of radial mesh intervals in drum region"); + params.addRangeCheckedParam("pad_start_angle", + "pad_start_angle>=0 & pad_start_angle < 360", + "Starting angle of drum pad region"); + params.addRangeCheckedParam( + "pad_end_angle", "pad_end_angle>0 & pad_end_angle < 720", "Ending angle of drum pad region"); + params.addRequiredRangeCheckedParam( + "num_azimuthal_sectors", + "num_azimuthal_sectors>2", + "Number of azimuthal sectors to sub-divide the drum region into"); + params.addParam>>( + "region_ids", + "IDs for each radial and axial zone for assignment of region_id extra element " + "id. " + "Inner indexing is radial zones (drum inner/drum/drum outer), outer indexing is axial"); + params.addParam>>( + "block_names", + "Block names for each radial and axial zone. " + "Inner indexing is radial zones (drum inner/drum/drum outer), outer indexing is axial"); + params.addParam("azimuthal_node_tolerance", + 0.1, + "(in degrees) The absolute tolerance for which to shift an azimuthal node " + "to match the pad start/end angles"); + + params.addParamNamesToGroup("region_ids assembly_type", "ID assigment"); + params.addParamNamesToGroup("drum_inner_radius drum_outer_radius drum_inner_intervals " + "drum_intervals num_azimuthal_sectors", + "Drum specifications"); + params.addParamNamesToGroup("pad_start_angle pad_end_angle azimuthal_node_tolerance", + "Control pad specifications"); + + params.addClassDescription( + "This ControlDrumMeshGenerator object is designed to generate " + "drum-like structures, with IDs, from a reactor geometry. " + "These structures can be used directly within CoreMeshGenerator to stitch" + "control drums into a core lattice alongside AssemblyMeshGenerator structures"); + // depletion id generation params are added + addDepletionIDParams(params); + + return params; +} + +ControlDrumMeshGenerator::ControlDrumMeshGenerator(const InputParameters & parameters) + : ReactorGeometryMeshBuilderBase(parameters), + _assembly_type(getParam("assembly_type")), + _drum_inner_radius(getParam("drum_inner_radius")), + _drum_outer_radius(getParam("drum_outer_radius")), + _extrude(getParam("extrude")), + _region_ids(isParamValid("region_ids") + ? getParam>>("region_ids") + : std::vector>()) +{ + // Initialize ReactorMeshParams object + initializeReactorMeshParams(getParam("reactor_params")); + + // Flexible stitching needs to be invoked in order to create control drum mesh + if (!getReactorParam(RGMB::flexible_assembly_stitching)) + mooseError("'flexible_assembly_stitching' needs to be set to true in ReactorMeshParams in " + "order to use ControlDrumMeshGenerator"); + + _geom_type = getReactorParam(RGMB::mesh_geometry); + _mesh_dimensions = getReactorParam(RGMB::mesh_dimensions); + + const auto drum_inner_intervals = getParam("drum_inner_intervals"); + const auto drum_intervals = getParam("drum_intervals"); + const auto num_sectors = getParam("num_azimuthal_sectors"); + const auto assembly_pitch = getReactorParam(RGMB::assembly_pitch); + + // Check drum pad parameters + if (isParamSetByUser("pad_start_angle")) + { + _pad_start_angle = getParam("pad_start_angle"); + if (!isParamSetByUser("pad_end_angle")) + paramError("pad_start_angle", + "If 'pad_start_angle' is set, 'pad_end_angle' needs to also be set."); + _pad_end_angle = getParam("pad_end_angle"); + + if ((_pad_end_angle - _pad_start_angle >= 360) || (_pad_end_angle - _pad_start_angle <= 0)) + paramError("pad_start_angle", + "The difference between 'pad_end_angle' and 'pad_start_angle' must be between 0 " + "and 360 exclusive."); + _has_pad_region = true; + } + else + { + if (isParamSetByUser("pad_end_angle")) + paramError("pad_end_angle", + "If 'pad_end_angle' is set, 'pad_start_angle' needs to also be set."); + _has_pad_region = false; + } + + // Error checking for azimuthal node tolerance + const auto azimuthal_node_tolerance = getParam("azimuthal_node_tolerance"); + if (!_has_pad_region && isParamSetByUser("azimuthal_node_tolerance")) + paramWarning("azimuthal_node_tolerance", + "This parameter is relevant only when pad start and end angles are defined"); + if (_has_pad_region && MooseUtils::absoluteFuzzyGreaterEqual(2. * azimuthal_node_tolerance, + 360. / (Real)num_sectors)) + paramError("azimuthal_node_tolerance", + "Azimuthal node tolerance should be smaller than half the azimuthal interval size " + "as defined by 'num_azimuthal_sectors'"); + if (_has_pad_region && MooseUtils::absoluteFuzzyGreaterEqual(2. * azimuthal_node_tolerance, + _pad_end_angle - _pad_start_angle)) + paramError("azimuthal_node_tolerance", + "Azimuthal node tolerance should be smaller than half the difference of the pad " + "angle range"); + + // Check region IDs have correct size + const unsigned int n_radial_regions = _has_pad_region ? 4 : 3; + if (isParamValid("region_ids")) + { + unsigned int n_axial_levels = + (_mesh_dimensions == 3) + ? getReactorParam>(RGMB::axial_mesh_intervals).size() + : 1; + if (_region_ids.size() != n_axial_levels) + mooseError("The size of region IDs must be equal to the number of axial levels as defined in " + "the ReactorMeshParams object"); + if (_region_ids[0].size() != n_radial_regions) + { + std::string err_msg = + "'region_ids' parameter does not have the correct number of elements per axial zone. "; + err_msg += _has_pad_region + ? "For control drums with a pad region, 4 radial IDs need to be provided per " + "axial zone (drum inner, drum pad, drum ex-pad, and drum outer)" + : "For control drums with no pad region, 3 radial IDs need to be provided per " + "axial zone (drum inner, drum, and drum outer)"; + paramError("region_ids", err_msg); + } + } + else + mooseError( + "Region IDs must be assigned for ControlDrumMeshGenerator using parameter 'region_ids'"); + + // Check block names have the correct size + if (isParamValid("block_names")) + { + if (getReactorParam(RGMB::region_id_as_block_name)) + paramError("block_names", + "If ReactorMeshParams/region_id_as_block_name is set, block_names should not be " + "specified in ControlDrumMeshGenerator"); + _has_block_names = true; + _block_names = getParam>>("block_names"); + if (_region_ids.size() != _block_names.size()) + mooseError("The size of block_names must match the size of region_ids"); + for (const auto i : index_range(_region_ids)) + if (_region_ids[i].size() != _block_names[i].size()) + mooseError("The size of block_names must match the size of region_ids"); + } + else + _has_block_names = false; + + // Check extrusion parameters + if (_extrude && _mesh_dimensions != 3) + paramError("extrude", + "This is a 2 dimensional mesh, you cannot extrude it. Check your ReactorMeshParams " + "inputs\n"); + if (_extrude && (!hasReactorParam(RGMB::top_boundary_id) || + !hasReactorParam(RGMB::bottom_boundary_id))) + mooseError("Both top_boundary_id and bottom_boundary_id must be provided in ReactorMeshParams " + "if using extruded geometry"); + + // Define azimuthal angles explicitly based on num_azimuthal_sectors and manually add pad start + // angle and end angle if they are not contained within these angle intervals + std::vector azimuthal_angles; + const auto custom_start_angle = _pad_start_angle; + const auto custom_end_angle = (_pad_end_angle > 360) ? _pad_end_angle - 360. : _pad_end_angle; + for (unsigned int i = 0; i < num_sectors; ++i) + { + Real current_azim_angle = (Real)i * 360. / (Real)num_sectors; + Real next_azim_angle = (Real)(i + 1) * 360. / (Real)num_sectors; + if (!_has_pad_region) + azimuthal_angles.push_back(current_azim_angle); + else + { + // When pad regions are involved, check if the current azimuthal node angle coincides with + // pad start/end angle to within tolerance. If it does, then shift the azimuthal node location + // to match the pad angle location. If it does not and the pad angle falls within the + // azimuthal sector, then create an additional node for the pad location + if (MooseUtils::absoluteFuzzyLessEqual(std::abs(current_azim_angle - custom_start_angle), + azimuthal_node_tolerance)) + { + azimuthal_angles.push_back(custom_start_angle); + } + else if (MooseUtils::absoluteFuzzyLessEqual(std::abs(current_azim_angle - custom_end_angle), + azimuthal_node_tolerance)) + { + azimuthal_angles.push_back(custom_end_angle); + } + else if (MooseUtils::absoluteFuzzyGreaterThan(custom_start_angle - current_azim_angle, + azimuthal_node_tolerance) && + MooseUtils::absoluteFuzzyGreaterThan(next_azim_angle - custom_start_angle, + azimuthal_node_tolerance)) + { + mooseWarning("pad_start_angle not contained within drum azimuthal discretization so " + "additional azimuthal nodes are created to align mesh with this angle"); + azimuthal_angles.push_back(current_azim_angle); + azimuthal_angles.push_back(custom_start_angle); + } + else if (MooseUtils::absoluteFuzzyGreaterThan(custom_end_angle - current_azim_angle, + azimuthal_node_tolerance) && + MooseUtils::absoluteFuzzyGreaterThan(next_azim_angle - custom_end_angle, + azimuthal_node_tolerance)) + { + mooseWarning("pad_end_angle not contained within drum azimuthal discretization so " + "additional azimuthal nodes are created to align mesh with this angle"); + azimuthal_angles.push_back(current_azim_angle); + azimuthal_angles.push_back(custom_end_angle); + } + else + azimuthal_angles.push_back(current_azim_angle); + } + } + + // Check drum radius parameters + if (_drum_inner_radius >= _drum_outer_radius) + paramError("drum_outer_radius", "Drum outer radius must be larger than the inner radius"); + // Check if volume preserved radius of outer radius exceeds assembly halfpitch. In data driven + // mode, radius is assumed not to need volume preservation + auto radius_corrfac = getReactorParam(RGMB::bypass_meshgen) + ? 1.0 + : PolygonMeshGeneratorBase::radiusCorrectionFactor(azimuthal_angles); + if (_drum_outer_radius * radius_corrfac >= assembly_pitch / 2.) + paramError("drum_outer_radius", + "Volume-corrected outer radius of drum region must be smaller than half the " + "assembly pitch as " + "defined by 'ReactorMeshParams/assembly_pitch'"); + + // No subgenerators will be called if option to bypass mesh generators is enabled + if (!getReactorParam(RGMB::bypass_meshgen)) + { + const std::string block_name_prefix = + RGMB::DRUM_BLOCK_NAME_PREFIX + std::to_string(_assembly_type); + + { + // Invoke AdvancedConcentricCircleGenerator to define drum mesh without background region + auto params = _app.getFactory().getValidParams("AdvancedConcentricCircleGenerator"); + + params.set>("customized_azimuthal_angles") = azimuthal_angles; + params.set>("ring_radii") = {_drum_inner_radius, _drum_outer_radius}; + params.set>("ring_intervals") = {drum_inner_intervals, + drum_intervals}; + if (drum_inner_intervals > 1) + { + params.set>("ring_block_ids") = { + RGMB::CONTROL_DRUM_BLOCK_ID_INNER_TRI, + RGMB::CONTROL_DRUM_BLOCK_ID_INNER, + RGMB::CONTROL_DRUM_BLOCK_ID_PAD}; + params.set>("ring_block_names") = { + block_name_prefix + "_R0_TRI", block_name_prefix + "_R0", block_name_prefix + "_R1"}; + } + else + { + params.set>("ring_block_ids") = { + RGMB::CONTROL_DRUM_BLOCK_ID_INNER, RGMB::CONTROL_DRUM_BLOCK_ID_PAD}; + params.set>("ring_block_names") = {block_name_prefix + "_R0", + block_name_prefix + "_R1"}; + } + params.set("create_outward_interface_boundaries") = false; + + addMeshSubgenerator("AdvancedConcentricCircleGenerator", name() + "_accg", params); + } + { + // Invoke FlexiblePatternGenerator to triangulate drum background region + auto params = _app.getFactory().getValidParams("FlexiblePatternGenerator"); + + params.set>("inputs") = {name() + "_accg"}; + params.set>("extra_positions") = {libMesh::Point(0, 0, 0)}; + params.set>("extra_positions_mg_indices") = {0}; + params.set("use_auto_area_func") = true; + // `verify_holes` is set to false to prevent false positive instances of points outside of + // defined holes, which can create test failures on certain dev environments + params.set("verify_holes") = false; + params.set("boundary_type") = (_geom_type == "Hex") ? "HEXAGON" : "CARTESIAN"; + params.set("boundary_sectors") = + getReactorParam(RGMB::num_sectors_flexible_stitching); + params.set("boundary_size") = assembly_pitch; + params.set("external_boundary_id") = + RGMB::ASSEMBLY_BOUNDARY_ID_START + _assembly_type; + params.set("external_boundary_name") = + RGMB::ASSEMBLY_BOUNDARY_NAME_PREFIX + std::to_string(_assembly_type); + params.set("background_subdomain_name") = block_name_prefix + "_R2_TRI"; + params.set("background_subdomain_id") = RGMB::CONTROL_DRUM_BLOCK_ID_OUTER; + + addMeshSubgenerator("FlexiblePatternGenerator", name() + "_fpg", params); + + // Pass mesh meta-data defined in subgenerator constructor to this MeshGenerator + copyMeshProperty("is_control_drum_meta", name() + "_fpg"); + copyMeshProperty("pattern_pitch_meta", name() + "_fpg"); + } + std::string build_mesh_name = name() + "_delbds"; + { + // Invoke BoundaryDeletionGenerator to delete extra sidesets created by + // AdvancedConcentricCircleGenerator + auto params = _app.getFactory().getValidParams("BoundaryDeletionGenerator"); + + params.set("input") = name() + "_fpg"; + params.set>("boundary_names") = {"0", "2"}; + + addMeshSubgenerator("BoundaryDeletionGenerator", build_mesh_name, params); + } + if (_extrude && _mesh_dimensions == 3) + build_mesh_name = callExtrusionMeshSubgenerators(build_mesh_name); + + // Store final mesh subgenerator + _build_mesh = &getMeshByName(build_mesh_name); + } + + generateMetadata(); +} + +void +ControlDrumMeshGenerator::generateMetadata() +{ + // Declare metadata for use in downstream mesh generators + declareMeshProperty(RGMB::assembly_type, _assembly_type); + declareMeshProperty(RGMB::pitch, getReactorParam(RGMB::assembly_pitch)); + declareMeshProperty(RGMB::extruded, _extrude && _mesh_dimensions == 3); + declareMeshProperty(RGMB::is_control_drum, true); + declareMeshProperty(RGMB::drum_region_ids, _region_ids); + declareMeshProperty(RGMB::drum_block_names, _block_names); + std::vector drum_pad_angles = + _has_pad_region ? std::vector({_pad_start_angle, _pad_end_angle}) : std::vector(); + declareMeshProperty(RGMB::drum_pad_angles, drum_pad_angles); + std::vector drum_radii = std::vector({_drum_inner_radius, _drum_outer_radius}); + declareMeshProperty(RGMB::drum_radii, drum_radii); + declareMeshProperty(RGMB::is_homogenized, false); + declareMeshProperty(RGMB::is_single_pin, false); +} + +std::unique_ptr +ControlDrumMeshGenerator::generate() +{ + // Must be called to free the ReactorMeshParams mesh + freeReactorMeshParams(); + + // If bypass_mesh is true, return a null mesh. In this mode, an output mesh is not + // generated and only metadata is defined on the generator, so logic related to + // generation of output mesh will not be called + if (getReactorParam(RGMB::bypass_meshgen)) + { + auto null_mesh = nullptr; + return null_mesh; + } + + // This generate() method will be called once the subgenerators that we depend on are + // called. This is where we reassign subdomain ids/name in case they were merged when + // stitching pins into an assembly. This is also where we set region_id and + // assembly_type_id element integers. + + // Define all extra element names and integers + std::string plane_id_name = "plane_id"; + std::string region_id_name = "region_id"; + std::string pin_type_id_name = "pin_type_id"; + std::string assembly_type_id_name = "assembly_type_id"; + const std::string default_block_name = + RGMB::DRUM_BLOCK_NAME_PREFIX + std::to_string(_assembly_type); + + auto pin_type_id_int = getElemIntegerFromMesh(*(*_build_mesh), pin_type_id_name); + auto region_id_int = getElemIntegerFromMesh(*(*_build_mesh), region_id_name); + auto assembly_type_id_int = getElemIntegerFromMesh(*(*_build_mesh), assembly_type_id_name); + + unsigned int plane_id_int = 0; + if (_extrude) + plane_id_int = getElemIntegerFromMesh(*(*_build_mesh), plane_id_name, true); + + // Get next free block ID in mesh in case subdomain ids need to be remapped + auto next_block_id = MooseMeshUtils::getNextFreeSubdomainID(*(*(_build_mesh))); + std::map rgmb_name_id_map; + + // Loop through all mesh elements and set region ids and reassign block IDs/names + // if they were merged during pin stitching + for (auto & elem : (*_build_mesh)->active_element_ptr_range()) + { + elem->set_extra_integer(assembly_type_id_int, _assembly_type); + const dof_id_type z_id = _extrude ? elem->get_extra_integer(plane_id_int) : 0; + + // Assembly peripheral element (background / duct), set subdomains according + // to user preferences and set pin type id to RGMB::MAX_PIN_TYPE_ID - peripheral index + // Region id is inferred from z_id and peripheral_idx + const auto base_block_id = elem->subdomain_id(); + const auto base_block_name = (*_build_mesh)->subdomain_name(base_block_id); + + // Check if block name has correct prefix + std::string prefix = RGMB::DRUM_BLOCK_NAME_PREFIX + std::to_string(_assembly_type) + "_R"; + if (!(base_block_name.find(prefix, 0) == 0)) + continue; + + // Radial index is integer value of substring after prefix + const unsigned int radial_idx = std::stoi(base_block_name.substr(prefix.length())); + + // Drum index distinguishes between elements in pad and ex-pad regions that have the same radial + // index + const unsigned int drum_idx = + getDrumIdxFromRadialIdx(radial_idx, elem->true_centroid()(0), elem->true_centroid()(1)); + subdomain_id_type pin_type = RGMB::MAX_PIN_TYPE_ID - drum_idx; + elem->set_extra_integer(pin_type_id_int, pin_type); + + const auto elem_rid = _region_ids[z_id][drum_idx]; + elem->set_extra_integer(region_id_int, elem_rid); + + // Set element block name and block id + auto elem_block_name = default_block_name; + if (getReactorParam(RGMB::region_id_as_block_name)) + elem_block_name += "_REG" + std::to_string(elem_rid); + else if (_has_block_names) + elem_block_name += "_" + _block_names[z_id][drum_idx]; + if (elem->type() == TRI3 || elem->type() == PRISM6) + elem_block_name += RGMB::TRI_BLOCK_NAME_SUFFIX; + updateElementBlockNameId( + *(*_build_mesh), elem, rgmb_name_id_map, elem_block_name, next_block_id); + } + + if (getParam("generate_depletion_id")) + { + const MooseEnum option = getParam("depletion_id_type"); + addDepletionId(*(*_build_mesh), option, DepletionIDGenerationLevel::Drum, _extrude); + } + + // Mark mesh as not prepared, as block ID's were re-assigned in this method + (*_build_mesh)->set_isnt_prepared(); + + return std::move(*_build_mesh); +} + +unsigned int +ControlDrumMeshGenerator::getDrumIdxFromRadialIdx(const unsigned int radial_idx, + const Real elem_x, + const Real elem_y) +{ + // By default, drum index will match radial index unless a pad region is defined + unsigned int drum_idx = radial_idx; + if (_has_pad_region) + { + if (radial_idx == 1) + { + // This is an element in the drum region, use drum angle to determine whether it belongs to + // pad or ex-pad region Note: drum angle of 0 degrees starts in positive y-direction and + // increments in clockwise direction, which is consistent + // with how AdvancedConcentricCircleMeshGenerator defines azimuthal angles + Real drum_angle = std::atan2(elem_x, elem_y) * 180. / M_PI; + if (drum_angle < 0) + drum_angle += 360; + + // If _pad_end_angle does not exceed 360 degrees, check if drum angle lies within + // _pad_start_angle and _pad_end_angle. Drum index needs to be incremented if element in + // ex-core region + if (_pad_end_angle <= 360) + { + if ((drum_angle < _pad_start_angle) || (drum_angle > _pad_end_angle)) + ++drum_idx; + } + else + { + // If _pad_end_angle exceeds 360 degrees, check two intervals - _pad_start_angle to 360, and + // 0 to _pad_end_angle - 360 Drum index needs to be incremented if element in ex-core region + if ((drum_angle < _pad_start_angle) && (drum_angle > _pad_end_angle - 360.)) + ++drum_idx; + } + } + else if (radial_idx == 2) + { + // Element is in outer drum region, drum index needs to be incremented to account for presence + // of ex-pad region + ++drum_idx; + } + } + return drum_idx; +} diff --git a/modules/reactor/src/meshgenerators/CoreMeshGenerator.C b/modules/reactor/src/meshgenerators/CoreMeshGenerator.C index 23b021060a1b..530d8732a1ab 100644 --- a/modules/reactor/src/meshgenerators/CoreMeshGenerator.C +++ b/modules/reactor/src/meshgenerators/CoreMeshGenerator.C @@ -22,7 +22,9 @@ CoreMeshGenerator::validParams() auto params = ReactorGeometryMeshBuilderBase::validParams(); params.addRequiredParam>( - "inputs", "The AssemblyMeshGenerators that form the components of the assembly."); + "inputs", + "The AssemblyMeshGenerator and ControlDrumMeshGenerator objects that form the components of " + "the assembly."); params.addParam( "dummy_assembly_name", @@ -54,7 +56,7 @@ CoreMeshGenerator::validParams() "periphery_num_layers>0", "Number of layers to subdivide the periphery boundary."); params.addParam( - "periphery_block_name", "RGMB_CORE", "Block name for periphery zone."); + "periphery_block_name", RGMB::CORE_BLOCK_NAME_PREFIX, "Block name for periphery zone."); params.addParam( "periphery_region_id", -1, @@ -82,13 +84,14 @@ CoreMeshGenerator::validParams() " and extrudes the 2D geometry to 3D. If this is true then this mesh " "cannot be used in further mesh building in the Reactor workflow"); - params.addClassDescription("This CoreMeshGenerator object is designed to generate a core-like " - "structure, with IDs, from a reactor geometry. " - "The core-like structure consists of a pattern of assembly-like " - "structures generated with AssemblyMeshGenerator " - "and is permitted to have \"empty\" locations. The size and spacing " - "of the assembly-like structures is defined, and " - "enforced by declaration in the ReactorMeshParams."); + params.addClassDescription( + "This CoreMeshGenerator object is designed to generate a core-like " + "structure, with IDs, from a reactor geometry. " + "The core-like structure consists of a pattern of assembly-like " + "structures generated with AssemblyMeshGenerator and/or ControlDrumMeshGenerator " + "and is permitted to have \"empty\" locations. The size and spacing " + "of the assembly-like structures is defined, and " + "enforced by declaration in the ReactorMeshParams."); // depletion id generation params are added addDepletionIDParams(params); @@ -231,7 +234,7 @@ CoreMeshGenerator::CoreMeshGenerator(const InputParameters & parameters) initializeReactorMeshParams(reactor_params); _geom_type = getReactorParam(RGMB::mesh_geometry); - _mesh_dimensions = getReactorParam(RGMB::mesh_dimensions); + _mesh_dimensions = getReactorParam(RGMB::mesh_dimensions); if (_extrude && _mesh_dimensions != 3) mooseError("This is a 2 dimensional mesh, you cannot extrude it. Check your ReactorMeshParams " @@ -303,7 +306,8 @@ CoreMeshGenerator::CoreMeshGenerator(const InputParameters & parameters) auto params = _app.getFactory().getValidParams("SimpleHexagonGenerator"); params.set("hexagon_size") = getReactorParam(RGMB::assembly_pitch) / 2.0; - params.set>("block_id") = {(UINT16_MAX / 2) - 1}; + params.set>("block_id") = { + RGMB::DUMMY_ASSEMBLY_BLOCK_ID}; addMeshSubgenerator("SimpleHexagonGenerator", std::string(_empty_key), params); } @@ -331,7 +335,7 @@ CoreMeshGenerator::CoreMeshGenerator(const InputParameters & parameters) params.set>("meshes_to_adapt_to") = std::vector{first_nondummy_assembly}; params.set>("background_block_ids") = - std::vector{(UINT16_MAX / 2) - 1}; + std::vector{RGMB::DUMMY_ASSEMBLY_BLOCK_ID}; addMeshSubgenerator(adaptive_mg_name, std::string(_empty_key), params); } @@ -358,7 +362,7 @@ CoreMeshGenerator::CoreMeshGenerator(const InputParameters & parameters) const auto radial_boundary = getReactorParam(RGMB::radial_boundary_id); params.set("external_boundary_id") = radial_boundary; - params.set("external_boundary_name") = "outer_core"; + params.set("external_boundary_name") = RGMB::CORE_BOUNDARY_NAME; params.set("rotate_angle") = 0.0; addMeshSubgenerator(patterned_mg_name, name() + "_pattern", params); @@ -368,9 +372,10 @@ CoreMeshGenerator::CoreMeshGenerator(const InputParameters & parameters) { auto params = _app.getFactory().getValidParams("BlockDeletionGenerator"); - params.set>("block") = {std::to_string((UINT16_MAX / 2) - 1)}; + params.set>("block") = { + std::to_string(RGMB::DUMMY_ASSEMBLY_BLOCK_ID)}; params.set("input") = name() + "_pattern"; - params.set("new_boundary") = "outer_core"; + params.set("new_boundary") = RGMB::CORE_BOUNDARY_NAME; addMeshSubgenerator("BlockDeletionGenerator", name() + "_deleted", params); } @@ -391,7 +396,8 @@ CoreMeshGenerator::CoreMeshGenerator(const InputParameters & parameters) continue; const auto assembly_id = getMeshProperty(RGMB::assembly_type, assembly_name); - const BoundaryName boundary_name = "outer_assembly_" + std::to_string(assembly_id); + const BoundaryName boundary_name = + RGMB::ASSEMBLY_BOUNDARY_NAME_PREFIX + std::to_string(assembly_id); if (!std::count(boundaries_to_delete.begin(), boundaries_to_delete.end(), boundary_name)) boundaries_to_delete.push_back(boundary_name); } @@ -410,55 +416,76 @@ CoreMeshGenerator::CoreMeshGenerator(const InputParameters & parameters) { if (assembly != _empty_key) { - std::map>> pin_region_id_map = - getMeshProperty< - std::map>>>( - RGMB::pin_region_id_map, assembly); - for (auto pin = pin_region_id_map.begin(); pin != pin_region_id_map.end(); ++pin) - if (_pin_region_id_map.find(pin->first) == _pin_region_id_map.end()) + subdomain_id_type assembly_type = + getMeshProperty(RGMB::assembly_type, assembly); + if (!getMeshProperty(RGMB::is_control_drum, assembly)) + { + // For assembly structures, store region ID and block names of assembly regions and + // constituent pins + std::map>> + pin_region_id_map = getMeshProperty< + std::map>>>( + RGMB::pin_region_id_map, assembly); + for (auto pin = pin_region_id_map.begin(); pin != pin_region_id_map.end(); ++pin) _pin_region_id_map.insert( std::pair>>( pin->first, pin->second)); - std::map>> pin_block_name_map = - getMeshProperty>>>( - RGMB::pin_block_name_map, assembly); - for (auto pin = pin_block_name_map.begin(); pin != pin_block_name_map.end(); ++pin) - if (_pin_block_name_map.find(pin->first) == _pin_block_name_map.end()) + std::map>> pin_block_name_map = + getMeshProperty>>>( + RGMB::pin_block_name_map, assembly); + for (auto pin = pin_block_name_map.begin(); pin != pin_block_name_map.end(); ++pin) _pin_block_name_map.insert( std::pair>>(pin->first, pin->second)); - // Define background and duct region ID map from constituent assemblies - subdomain_id_type assembly_type = - getMeshProperty(RGMB::assembly_type, assembly); - if (_background_region_id_map.find(assembly_type) == _background_region_id_map.end()) + // Define background and duct region ID map from constituent assemblies + if (_background_region_id_map.find(assembly_type) == _background_region_id_map.end()) + { + // Store region ids and block names associated with duct and background regions for each + // assembly, in case block names need to be recovered from region ids after + // multiple assemblies have been stitched together into a core + std::vector background_region_ids = + getMeshProperty>(RGMB::background_region_id, + assembly); + std::vector> duct_region_ids = + getMeshProperty>>(RGMB::duct_region_ids, + assembly); + _background_region_id_map.insert( + std::pair>( + assembly_type, background_region_ids)); + _duct_region_id_map.insert( + std::pair>>( + assembly_type, duct_region_ids)); + + std::vector background_block_names = + getMeshProperty>(RGMB::background_block_name, assembly); + std::vector> duct_block_names = + getMeshProperty>>(RGMB::duct_block_names, + assembly); + _background_block_name_map.insert( + std::pair>(assembly_type, + background_block_names)); + _duct_block_name_map.insert( + std::pair>>( + assembly_type, duct_block_names)); + } + } + else { - // Store region ids and block names associated with duct and background regions for each - // assembly, in case block names need to be recovered from region ids after - // multiple assemblies have been stitched together into a core - std::vector background_region_ids = - getMeshProperty>(RGMB::background_region_id, assembly); - std::vector> duct_region_ids = - getMeshProperty>>(RGMB::duct_region_ids, + // For control drum structures, store region ID and block name information of drum regions + std::vector> drum_region_ids = + getMeshProperty>>(RGMB::drum_region_ids, assembly); - _background_region_id_map.insert( - std::pair>(assembly_type, - background_region_ids)); - _duct_region_id_map.insert( + _drum_region_id_map.insert( std::pair>>( - assembly_type, duct_region_ids)); - - std::vector background_block_names = - getMeshProperty>(RGMB::background_block_name, assembly); - std::vector> duct_block_names = - getMeshProperty>>(RGMB::duct_block_names, + assembly_type, drum_region_ids)); + std::vector> drum_block_names = + getMeshProperty>>(RGMB::drum_block_names, assembly); - _background_block_name_map.insert(std::pair>( - assembly_type, background_block_names)); - _duct_block_name_map.insert( + _drum_block_name_map.insert( std::pair>>( - assembly_type, duct_block_names)); + assembly_type, drum_block_names)); } } } @@ -474,8 +501,8 @@ CoreMeshGenerator::CoreMeshGenerator(const InputParameters & parameters) auto params = _app.getFactory().getValidParams(periphery_mg_name); params.set("input") = name() + "_delbds"; params.set("peripheral_ring_radius") = _outer_circle_radius; - params.set("external_boundary_name") = "outside_periphery"; - params.set("peripheral_ring_block_name") = "RGMB_PERIPHERY_GENERATED"; + params.set("external_boundary_name") = "outside_periphery"; + params.set("peripheral_ring_block_name") = RGMB::PERIPHERAL_RING_BLOCK_NAME; // unique MG options if (_periphery_meshgenerator == "triangle") @@ -486,8 +513,8 @@ CoreMeshGenerator::CoreMeshGenerator(const InputParameters & parameters) } else if (_periphery_meshgenerator == "quad_ring") { - params.set("peripheral_ring_block_id") = 25000; - params.set("input_mesh_external_boundary") = (BoundaryName) "outer_core"; + params.set("peripheral_ring_block_id") = RGMB::PERIPHERAL_RING_BLOCK_ID; + params.set("input_mesh_external_boundary") = RGMB::CORE_BOUNDARY_NAME; params.set("peripheral_layer_num") = _periphery_num_layers; } @@ -497,60 +524,7 @@ CoreMeshGenerator::CoreMeshGenerator(const InputParameters & parameters) } if (_extrude && _mesh_dimensions == 3) - { - std::vector axial_boundaries = - getReactorParam>(RGMB::axial_mesh_sizes); - const auto top_boundary = getReactorParam(RGMB::top_boundary_id); - const auto bottom_boundary = getReactorParam(RGMB::bottom_boundary_id); - { - auto params = _app.getFactory().getValidParams("AdvancedExtruderGenerator"); - - if (_mesh_periphery) - params.set("input") = name() + "_periphery"; - else - params.set("input") = name() + "_delbds"; - - params.set("direction") = Point(0, 0, 1); - params.set>("num_layers") = - getReactorParam>(RGMB::axial_mesh_intervals); - params.set>("heights") = axial_boundaries; - params.set("bottom_boundary") = bottom_boundary; - params.set("top_boundary") = top_boundary; - - addMeshSubgenerator("AdvancedExtruderGenerator", name() + "_extruded", params); - } - - { - auto params = _app.getFactory().getValidParams("RenameBoundaryGenerator"); - - params.set("input") = name() + "_extruded"; - params.set>("old_boundary") = { - std::to_string(top_boundary), - std::to_string(bottom_boundary)}; // hard coded boundary IDs in patterned mesh generator - params.set>("new_boundary") = {"top", "bottom"}; - - addMeshSubgenerator("RenameBoundaryGenerator", name() + "_change_plane_name", params); - } - - { - auto params = _app.getFactory().getValidParams("PlaneIDMeshGenerator"); - - params.set("input") = name() + "_change_plane_name"; - - std::vector plane_heights{0}; - for (Real z : axial_boundaries) - { - plane_heights.push_back(z + plane_heights.back()); - } - params.set>("plane_coordinates") = plane_heights; - - std::string plane_id_name = "plane_id"; - params.set("id_name") = "plane_id"; - - build_mesh_name = name() + "_extrudedIDs"; - addMeshSubgenerator("PlaneIDMeshGenerator", build_mesh_name, params); - } - } + build_mesh_name = callExtrusionMeshSubgenerators(build_mesh_name); // Store final mesh subgenerator _build_mesh = &getMeshByName(build_mesh_name); @@ -585,7 +559,8 @@ CoreMeshGenerator::generateMetadata() if (input_assembly_name != _empty_key) { input_assembly_names.push_back(input_assembly_name); - if (!getMeshProperty(RGMB::is_single_pin, input_assembly_name)) + if (!getMeshProperty(RGMB::is_control_drum, input_assembly_name) && + !getMeshProperty(RGMB::is_single_pin, input_assembly_name)) { const auto pin_names = getMeshProperty>(RGMB::pin_names, input_assembly_name); @@ -622,9 +597,6 @@ CoreMeshGenerator::generateMetadata() declareMeshProperty(RGMB::assembly_names, input_assembly_names); declareMeshProperty(RGMB::assembly_lattice, assembly_name_lattice); declareMeshProperty(RGMB::extruded, _extrude && _mesh_dimensions == 3); - - if (getParam("show_rgmb_metadata")) - printReactorMetadata("core", name()); } bool @@ -738,7 +710,7 @@ CoreMeshGenerator::generate() std::string plane_id_name = "plane_id"; std::string region_id_name = "region_id"; std::string radial_id_name = "radial_id"; - const std::string default_block_name = "RGMB_CORE"; + const std::string default_block_name = RGMB::CORE_BLOCK_NAME_PREFIX; auto pin_type_id_int = getElemIntegerFromMesh(*(*_build_mesh), pin_type_id_name, true); auto assembly_type_id_int = getElemIntegerFromMesh(*(*_build_mesh), assembly_type_id_name, true); @@ -774,11 +746,12 @@ CoreMeshGenerator::generate() else if (getReactorParam(RGMB::region_id_as_block_name)) elem_block_name += "_REG" + std::to_string(elem_rid); if (elem->type() == TRI3 || elem->type() == PRISM6) - elem_block_name += "_TRI"; + elem_block_name += RGMB::TRI_BLOCK_NAME_SUFFIX; updateElementBlockNameId( *(*_build_mesh), elem, rgmb_name_id_map, elem_block_name, next_block_id); } - else if ((*_build_mesh)->subdomain_name(elem->subdomain_id()) == "RGMB_PERIPHERY_GENERATED") + else if ((*_build_mesh)->subdomain_name(elem->subdomain_id()) == + RGMB::PERIPHERAL_RING_BLOCK_NAME) // periphery type element { // set region ID of core periphery element @@ -788,56 +761,86 @@ CoreMeshGenerator::generate() if (getReactorParam(RGMB::region_id_as_block_name)) elem_block_name += "_REG" + std::to_string(_periphery_region_id); if (elem->type() == TRI3 || elem->type() == PRISM6) - elem_block_name += "_TRI"; + elem_block_name += RGMB::TRI_BLOCK_NAME_SUFFIX; updateElementBlockNameId( *(*_build_mesh), elem, rgmb_name_id_map, elem_block_name, next_block_id); } else { - // element is in an assembly duct or background region since it doesn't - // have a pin type id that matches one in the map. Infer peripheral index - // from pin_type and region id from assembly_type_id, z_id, and peripheral_index dof_id_type assembly_type_id = elem->get_extra_integer(assembly_type_id_int); - unsigned int peripheral_idx = ((UINT16_MAX / 2) - 1) - pin_type_id; - bool is_background_region = peripheral_idx == 0; - const auto elem_rid = - (is_background_region ? _background_region_id_map[assembly_type_id][z_id] - : _duct_region_id_map[assembly_type_id][z_id][peripheral_idx - 1]); - elem->set_extra_integer(region_id_int, elem_rid); + // Infer peripheral index of assembly background, assembly duct, or control drum regions from + // pin_type_id + unsigned int peripheral_idx = RGMB::MAX_PIN_TYPE_ID - pin_type_id; - // Set element block name and block id - auto elem_block_name = default_block_name; - if (getReactorParam(RGMB::region_id_as_block_name)) - elem_block_name += "_REG" + std::to_string(elem_rid); - else + // check if element is part of drum region + if (_drum_region_id_map.find(assembly_type_id) != _drum_region_id_map.end()) { - if (is_background_region) + // Element is in a control drum region. Infer region id from assembly_type_id, z_id, and + // peripheral_index + const auto elem_rid = _drum_region_id_map[assembly_type_id][z_id][peripheral_idx]; + elem->set_extra_integer(region_id_int, elem_rid); + + // Set element block name and block id + auto elem_block_name = default_block_name; + if (getReactorParam(RGMB::region_id_as_block_name)) + elem_block_name += "_REG" + std::to_string(elem_rid); + else { - bool has_background_block_name = !_background_block_name_map[assembly_type_id].empty(); - if (has_background_block_name) - elem_block_name += "_" + _background_block_name_map[assembly_type_id][z_id]; + bool has_drum_block_name = !_drum_block_name_map[assembly_type_id].empty(); + if (has_drum_block_name) + elem_block_name += "_" + _drum_block_name_map[assembly_type_id][z_id][peripheral_idx]; } + if (elem->type() == TRI3 || elem->type() == PRISM6) + elem_block_name += RGMB::TRI_BLOCK_NAME_SUFFIX; + updateElementBlockNameId( + *(*_build_mesh), elem, rgmb_name_id_map, elem_block_name, next_block_id); + } + else + { + // Element is in an assembly duct or background region since it doesn't + // have an assembly type id in the drum region map. Infer region id from + // assembly_type_id, z_id, and peripheral_index + bool is_background_region = peripheral_idx == 0; + const auto elem_rid = + (is_background_region + ? _background_region_id_map[assembly_type_id][z_id] + : _duct_region_id_map[assembly_type_id][z_id][peripheral_idx - 1]); + elem->set_extra_integer(region_id_int, elem_rid); + + // Set element block name and block id + auto elem_block_name = default_block_name; + if (getReactorParam(RGMB::region_id_as_block_name)) + elem_block_name += "_REG" + std::to_string(elem_rid); else { - bool has_duct_block_names = !_duct_block_name_map[assembly_type_id].empty(); - if (has_duct_block_names) - elem_block_name += - "_" + _duct_block_name_map[assembly_type_id][z_id][peripheral_idx - 1]; + if (is_background_region) + { + bool has_background_block_name = !_background_block_name_map[assembly_type_id].empty(); + if (has_background_block_name) + elem_block_name += "_" + _background_block_name_map[assembly_type_id][z_id]; + } + else + { + bool has_duct_block_names = !_duct_block_name_map[assembly_type_id].empty(); + if (has_duct_block_names) + elem_block_name += + "_" + _duct_block_name_map[assembly_type_id][z_id][peripheral_idx - 1]; + } } + if (elem->type() == TRI3 || elem->type() == PRISM6) + elem_block_name += RGMB::TRI_BLOCK_NAME_SUFFIX; + updateElementBlockNameId( + *(*_build_mesh), elem, rgmb_name_id_map, elem_block_name, next_block_id); } - if (elem->type() == TRI3 || elem->type() == PRISM6) - elem_block_name += "_TRI"; - updateElementBlockNameId( - *(*_build_mesh), elem, rgmb_name_id_map, elem_block_name, next_block_id); } } // Sideset 10000 does not get stitched properly when BlockDeletionGenerator // is used for deleting dummy assemblies. This block copies missing sides - // into sideset 10000 from sideset "outer_core" + // into sideset 10000 from sideset RGMB::CORE_BOUNDARY_NAME BoundaryInfo & boundary_info = (*_build_mesh)->get_boundary_info(); boundary_id_type source_id = - MooseMeshUtils::getBoundaryIDs(**_build_mesh, {"outer_core"}, true)[0]; + MooseMeshUtils::getBoundaryIDs(**_build_mesh, {RGMB::CORE_BOUNDARY_NAME}, true)[0]; boundary_id_type target_id = 10000; const auto sideset_map = boundary_info.get_sideset_map(); @@ -846,7 +849,7 @@ CoreMeshGenerator::generate() const auto side_id = id_pair.first; const auto sideset_id = id_pair.second; - // Filter all sides that belong to "outer_core" sideset + // Filter all sides that belong to RGMB::CORE_BOUNDARY_NAME sideset if (sideset_id == source_id) { auto mm_it = sideset_map.equal_range(elem); @@ -869,6 +872,7 @@ CoreMeshGenerator::generate() addDepletionId(*(*_build_mesh), option, DepletionIDGenerationLevel::Core, _extrude); } + // Mark mesh as not prepared, as block ID's were re-assigned in this method (*_build_mesh)->set_isnt_prepared(); return std::move(*_build_mesh); diff --git a/modules/reactor/src/meshgenerators/PatternedCartesianMeshGenerator.C b/modules/reactor/src/meshgenerators/PatternedCartesianMeshGenerator.C index 51e4062ecea5..2dbba203eb8c 100644 --- a/modules/reactor/src/meshgenerators/PatternedCartesianMeshGenerator.C +++ b/modules/reactor/src/meshgenerators/PatternedCartesianMeshGenerator.C @@ -99,8 +99,8 @@ PatternedCartesianMeshGenerator::validParams() params.addParam("create_outward_interface_boundaries", true, "Whether the outward interface boundary sidesets are created."); - params.addParam( - "external_boundary_name", std::string(), "Optional customized external boundary name."); + params.addParam( + "external_boundary_name", BoundaryName(), "Optional customized external boundary name."); params.addParam("deform_non_circular_region", true, "Whether the non-circular region (outside the rings) can be deformed."); @@ -168,7 +168,7 @@ PatternedCartesianMeshGenerator::PatternedCartesianMeshGenerator(const InputPara _external_boundary_id(isParamValid("external_boundary_id") ? getParam("external_boundary_id") : 0), - _external_boundary_name(getParam("external_boundary_name")), + _external_boundary_name(getParam("external_boundary_name")), _create_inward_interface_boundaries(getParam("create_inward_interface_boundaries")), _create_outward_interface_boundaries(getParam("create_outward_interface_boundaries")), _deform_non_circular_region(getParam("deform_non_circular_region")), diff --git a/modules/reactor/src/meshgenerators/PatternedHexMeshGenerator.C b/modules/reactor/src/meshgenerators/PatternedHexMeshGenerator.C index 4228856358eb..f7421af35de9 100644 --- a/modules/reactor/src/meshgenerators/PatternedHexMeshGenerator.C +++ b/modules/reactor/src/meshgenerators/PatternedHexMeshGenerator.C @@ -101,8 +101,8 @@ PatternedHexMeshGenerator::validParams() params.addParam("create_outward_interface_boundaries", true, "Whether the outward interface boundary sidesets are created."); - params.addParam( - "external_boundary_name", std::string(), "Optional customized external boundary name."); + params.addParam( + "external_boundary_name", BoundaryName(), "Optional customized external boundary name."); params.addParam("deform_non_circular_region", true, "Whether the non-circular region (outside the rings) can be deformed."); @@ -169,7 +169,7 @@ PatternedHexMeshGenerator::PatternedHexMeshGenerator(const InputParameters & par _external_boundary_id(isParamValid("external_boundary_id") ? getParam("external_boundary_id") : 0), - _external_boundary_name(getParam("external_boundary_name")), + _external_boundary_name(getParam("external_boundary_name")), _create_inward_interface_boundaries(getParam("create_inward_interface_boundaries")), _create_outward_interface_boundaries(getParam("create_outward_interface_boundaries")), _hexagon_size_style( diff --git a/modules/reactor/src/meshgenerators/PeripheralRingMeshGenerator.C b/modules/reactor/src/meshgenerators/PeripheralRingMeshGenerator.C index c21fd9d11c0f..39ca1a535c76 100644 --- a/modules/reactor/src/meshgenerators/PeripheralRingMeshGenerator.C +++ b/modules/reactor/src/meshgenerators/PeripheralRingMeshGenerator.C @@ -87,8 +87,8 @@ PeripheralRingMeshGenerator::validParams() params.addRangeCheckedParam("external_boundary_id", "external_boundary_id>0", "Optional customized external boundary id."); - params.addParam("external_boundary_name", - "Optional customized external boundary name."); + params.addParam("external_boundary_name", + "Optional customized external boundary name."); params.addParamNamesToGroup( "peripheral_radial_bias peripheral_inner_boundary_layer_width " "peripheral_inner_boundary_layer_intervals peripheral_inner_boundary_layer_bias " @@ -132,8 +132,8 @@ PeripheralRingMeshGenerator::PeripheralRingMeshGenerator(const InputParameters & ? getParam("external_boundary_id") : 0), _external_boundary_name(isParamValid("external_boundary_name") - ? getParam("external_boundary_name") - : std::string()), + ? getParam("external_boundary_name") + : BoundaryName()), _input(getMeshByName(_input_name)) { declareMeshProperty("hexagon_peripheral_trimmability", false); diff --git a/modules/reactor/src/meshgenerators/PeripheralTriangleMeshGenerator.C b/modules/reactor/src/meshgenerators/PeripheralTriangleMeshGenerator.C index 67201b3bd8a3..6144b86d81c2 100644 --- a/modules/reactor/src/meshgenerators/PeripheralTriangleMeshGenerator.C +++ b/modules/reactor/src/meshgenerators/PeripheralTriangleMeshGenerator.C @@ -61,8 +61,8 @@ PeripheralTriangleMeshGenerator::validParams() params.addParam("peripheral_ring_block_name", "The block name assigned to the created peripheral layer."); - params.addParam("external_boundary_name", - "Optional customized external boundary name."); + params.addParam("external_boundary_name", + "Optional customized external boundary name."); MooseEnum tri_elem_type("TRI3 TRI6 TRI7 DEFAULT", "DEFAULT"); params.addParam( "tri_element_type", tri_elem_type, "Type of the triangular elements to be generated."); @@ -87,8 +87,8 @@ PeripheralTriangleMeshGenerator::PeripheralTriangleMeshGenerator(const InputPara ? getParam("peripheral_ring_block_name") : (SubdomainName) ""), _external_boundary_name(isParamValid("external_boundary_name") - ? getParam("external_boundary_name") - : std::string()) + ? getParam("external_boundary_name") + : BoundaryName()) { // Calculate outer boundary points diff --git a/modules/reactor/src/meshgenerators/PinMeshGenerator.C b/modules/reactor/src/meshgenerators/PinMeshGenerator.C index 83329c25aee5..1676824ef5d0 100644 --- a/modules/reactor/src/meshgenerators/PinMeshGenerator.C +++ b/modules/reactor/src/meshgenerators/PinMeshGenerator.C @@ -114,7 +114,7 @@ PinMeshGenerator::PinMeshGenerator(const InputParameters & parameters) // Initialize ReactorMeshParams object initializeReactorMeshParams(getParam("reactor_params")); - _mesh_dimensions = getReactorParam(RGMB::mesh_dimensions); + _mesh_dimensions = getReactorParam(RGMB::mesh_dimensions); _mesh_geometry = getReactorParam(RGMB::mesh_geometry); if (_is_assembly) @@ -206,16 +206,18 @@ PinMeshGenerator::PinMeshGenerator(const InputParameters & parameters) auto params = _app.getFactory().getValidParams("SimpleHexagonGenerator"); params.set("hexagon_size") = _pitch / 2.0; - params.set("external_boundary_id") = 20000 + _pin_type; - const auto boundary_name = _is_assembly ? "outer_assembly_" + std::to_string(_pin_type) - : "outer_pin_" + std::to_string(_pin_type); - params.set("external_boundary_name") = boundary_name; + params.set("external_boundary_id") = + RGMB::PIN_BOUNDARY_ID_START + _pin_type; + const auto boundary_name = + (_is_assembly ? RGMB::ASSEMBLY_BOUNDARY_NAME_PREFIX : RGMB::PIN_BOUNDARY_NAME_PREFIX) + + std::to_string(_pin_type); + params.set("external_boundary_name") = boundary_name; params.set>("block_id") = { _quad_center ? RGMB::PIN_BLOCK_ID_START : RGMB::PIN_BLOCK_ID_TRI}; params.set("element_type") = _quad_center ? "QUAD" : "TRI"; - auto block_name = "RGMB_PIN" + std::to_string(_pin_type) + "_R0"; + auto block_name = RGMB::PIN_BLOCK_NAME_PREFIX + std::to_string(_pin_type) + "_R0"; if (!_quad_center) - block_name += "_TRI"; + block_name += RGMB::TRI_BLOCK_NAME_SUFFIX; params.set>("block_name") = {block_name}; if (!skip_assembly_generation) @@ -239,7 +241,8 @@ PinMeshGenerator::PinMeshGenerator(const InputParameters & parameters) for (const auto i : index_range(_intervals)) { - const auto block_name = "RGMB_PIN" + std::to_string(_pin_type) + "_R" + std::to_string(i); + const auto block_name = + RGMB::PIN_BLOCK_NAME_PREFIX + std::to_string(_pin_type) + "_R" + std::to_string(i); const auto block_id = RGMB::PIN_BLOCK_ID_START + i; if (i < _ring_radii.size()) @@ -266,7 +269,7 @@ PinMeshGenerator::PinMeshGenerator(const InputParameters & parameters) if (ring_intervals.front() != 1) { // If quad center elements, copy element at beginning of block names and - // block ids. Otherwise add "_TRI" suffix to block names and generate new + // block ids. Otherwise add RGMB::TRI_BLOCK_NAME_SUFFIX to block names and generate new // block id if (_quad_center) { @@ -275,17 +278,17 @@ PinMeshGenerator::PinMeshGenerator(const InputParameters & parameters) } else { - const auto block_name = ring_blk_names.front() + "_TRI"; + const auto block_name = ring_blk_names.front() + RGMB::TRI_BLOCK_NAME_SUFFIX; const auto block_id = RGMB::PIN_BLOCK_ID_TRI; ring_blk_ids.insert(ring_blk_ids.begin(), block_id); ring_blk_names.insert(ring_blk_names.begin(), block_name); } } - // Add _TRI suffix if only one radial region and tri center elements + // Add RGMB::TRI_BLOCK_NAME_SUFFIX if only one radial region and tri center elements else if (!_quad_center) { ring_blk_ids[0] = RGMB::PIN_BLOCK_ID_TRI; - ring_blk_names[0] += "_TRI"; + ring_blk_names[0] += RGMB::TRI_BLOCK_NAME_SUFFIX; } } else @@ -293,7 +296,7 @@ PinMeshGenerator::PinMeshGenerator(const InputParameters & parameters) if (background_intervals > 1) { // If quad center elements, copy element at beginning of block names and - // block ids. Otherwise add "_TRI" suffix to block names and generate new + // block ids. Otherwise add RGMB::TRI_BLOCK_NAME_SUFFIX to block names and generate new // block id if (_quad_center) { @@ -302,18 +305,18 @@ PinMeshGenerator::PinMeshGenerator(const InputParameters & parameters) } else { - const auto block_name = background_blk_names.front() + "_TRI"; + const auto block_name = background_blk_names.front() + RGMB::TRI_BLOCK_NAME_SUFFIX; const auto block_id = RGMB::PIN_BLOCK_ID_TRI; background_blk_ids.insert(background_blk_ids.begin(), block_id); background_blk_names.insert(background_blk_names.begin(), block_name); } } - // Add _TRI suffix if only one background region and tri center elements + // Add RGMB::TRI_BLOCK_NAME_SUFFIX if only one background region and tri center elements // and no ring regions else if (!_quad_center) { background_blk_ids[0] = RGMB::PIN_BLOCK_ID_TRI; - background_blk_names[0] += "_TRI"; + background_blk_names[0] += RGMB::TRI_BLOCK_NAME_SUFFIX; } } @@ -334,10 +337,12 @@ PinMeshGenerator::PinMeshGenerator(const InputParameters & parameters) params.set("quad_center_elements") = _quad_center; params.set("polygon_size_style") = "apothem"; params.set("polygon_size") = _pitch / 2.0; - params.set("external_boundary_id") = 20000 + _pin_type; - const auto boundary_name = _is_assembly ? "outer_assembly_" + std::to_string(_pin_type) - : "outer_pin_" + std::to_string(_pin_type); - params.set("external_boundary_name") = boundary_name; + params.set("external_boundary_id") = + RGMB::PIN_BOUNDARY_ID_START + _pin_type; + const auto boundary_name = (_is_assembly ? RGMB::ASSEMBLY_BOUNDARY_NAME_PREFIX + : RGMB::PIN_BOUNDARY_NAME_PREFIX) + + std::to_string(_pin_type); + params.set("external_boundary_name") = boundary_name; bool flat_side_up = (_mesh_geometry == "Square"); params.set("flat_side_up") = flat_side_up; params.set("create_outward_interface_boundaries") = false; @@ -417,53 +422,8 @@ PinMeshGenerator::PinMeshGenerator(const InputParameters & parameters) declareMeshProperty("is_control_drum_meta", false); if (_extrude && _mesh_dimensions == 3) - { - std::vector axial_boundaries = - getReactorParam>(RGMB::axial_mesh_sizes); - const auto top_boundary = getReactorParam(RGMB::top_boundary_id); - const auto bottom_boundary = getReactorParam(RGMB::bottom_boundary_id); - { - auto params = _app.getFactory().getValidParams("AdvancedExtruderGenerator"); - - params.set("input") = build_mesh_name; - params.set("direction") = Point(0, 0, 1); - params.set>("num_layers") = - getReactorParam>(RGMB::axial_mesh_intervals); - params.set>("heights") = axial_boundaries; - params.set("bottom_boundary") = bottom_boundary; - params.set("top_boundary") = top_boundary; - addMeshSubgenerator("AdvancedExtruderGenerator", name() + "_extruded", params); - } - - { - auto params = _app.getFactory().getValidParams("RenameBoundaryGenerator"); - - params.set("input") = name() + "_extruded"; - params.set>("old_boundary") = { - std::to_string(top_boundary), - std::to_string(bottom_boundary)}; // hard coded boundary IDs in patterned mesh generator - params.set>("new_boundary") = {"top", "bottom"}; - addMeshSubgenerator("RenameBoundaryGenerator", name() + "_change_plane_name", params); - } - - { - auto params = _app.getFactory().getValidParams("PlaneIDMeshGenerator"); - - params.set("input") = name() + "_change_plane_name"; + build_mesh_name = callExtrusionMeshSubgenerators(build_mesh_name); - std::vector plane_heights{0}; - for (Real z : axial_boundaries) - plane_heights.push_back(z + plane_heights.back()); - - params.set>("plane_coordinates") = plane_heights; - - std::string plane_id_name = "plane_id"; - params.set("id_name") = "plane_id"; - - build_mesh_name = name() + "_extrudedIDs"; - addMeshSubgenerator("PlaneIDMeshGenerator", build_mesh_name, params); - } - } // Store final mesh subgenerator _build_mesh = &getMeshByName(build_mesh_name); } @@ -481,13 +441,13 @@ PinMeshGenerator::generateFlexibleAssemblyBoundaries() // the assembly only has a single region. Otherwise, determine the outermost region for deletion if (_homogenized || (_intervals.size() == 1)) { - outermost_block_name = "RGMB_PIN" + std::to_string(_pin_type) + "_R0"; + outermost_block_name = RGMB::PIN_BLOCK_NAME_PREFIX + std::to_string(_pin_type) + "_R0"; has_single_mesh_interval = true; } else { - outermost_block_name = - "RGMB_PIN" + std::to_string(_pin_type) + "_R" + std::to_string(_intervals.size() - 1); + outermost_block_name = RGMB::PIN_BLOCK_NAME_PREFIX + std::to_string(_pin_type) + "_R" + + std::to_string(_intervals.size() - 1); has_single_mesh_interval = false; // Invoke BlockDeletionGenerator to delete outermost mesh interval of assembly @@ -517,10 +477,11 @@ PinMeshGenerator::generateFlexibleAssemblyBoundaries() params.set("boundary_sectors") = getReactorParam(RGMB::num_sectors_flexible_stitching); params.set("boundary_size") = getReactorParam(RGMB::assembly_pitch); - params.set("external_boundary_id") = 20000 + _pin_type; + params.set("external_boundary_id") = RGMB::PIN_BOUNDARY_ID_START + _pin_type; params.set("external_boundary_name") = - "outer_assembly_" + std::to_string(_pin_type); - params.set("background_subdomain_name") = outermost_block_name + "_TRI"; + RGMB::ASSEMBLY_BOUNDARY_NAME_PREFIX + std::to_string(_pin_type); + params.set("background_subdomain_name") = + outermost_block_name + RGMB::TRI_BLOCK_NAME_SUFFIX; params.set("background_subdomain_id") = RGMB::PIN_BLOCK_ID_TRI_FLEXIBLE; addMeshSubgenerator("FlexiblePatternGenerator", name() + "_fpg", params); @@ -554,6 +515,7 @@ PinMeshGenerator::generateMetadata() declareMeshProperty(RGMB::background_block_name, std::vector()); declareMeshProperty(RGMB::duct_block_names, std::vector>()); declareMeshProperty(RGMB::is_single_pin, _is_assembly); + declareMeshProperty(RGMB::is_control_drum, false); // Following metadata is only relevant if an output mesh is generated by RGMB // because it pertains to region & block ids of elements in the output mesh if (!getReactorParam(RGMB::bypass_meshgen)) @@ -612,12 +574,6 @@ PinMeshGenerator::generateMetadata() declareMeshProperty(RGMB::ring_region_ids, ring_region_ids); declareMeshProperty(RGMB::background_region_id, background_region_ids); declareMeshProperty(RGMB::duct_region_ids, duct_region_ids); - - if (getParam("show_rgmb_metadata")) - { - std::string mg_struct = _is_assembly ? "assembly" : "pin"; - printReactorMetadata(mg_struct, name()); - } } std::unique_ptr @@ -667,7 +623,7 @@ PinMeshGenerator::generate() std::string plane_id_name = "plane_id"; std::string radial_id_name = "radial_id"; const std::string default_block_name = - std::string("RGMB_") + (_is_assembly ? std::string("ASSEMBLY") : std::string("PIN")) + + (_is_assembly ? RGMB::ASSEMBLY_BLOCK_NAME_PREFIX : RGMB::PIN_BLOCK_NAME_PREFIX) + std::to_string(_pin_type); auto region_id_int = getElemIntegerFromMesh(*(*_build_mesh), region_id_name); @@ -693,14 +649,14 @@ PinMeshGenerator::generate() const auto base_block_name = (*_build_mesh)->subdomain_name(base_block_id); // Check if block name has correct prefix - std::string prefix = "RGMB_PIN" + std::to_string(_pin_type) + "_R"; + std::string prefix = RGMB::PIN_BLOCK_NAME_PREFIX + std::to_string(_pin_type) + "_R"; if (!(base_block_name.find(prefix, 0) == 0)) continue; // Radial index is integer value of substring after prefix std::string radial_str = base_block_name.substr(prefix.length()); - // Filter out _TRI suffix if needed - const std::string suffix = "_TRI"; + // Filter out RGMB::TRI_BLOCK_NAME_SUFFIX if needed + const std::string suffix = RGMB::TRI_BLOCK_NAME_SUFFIX; const std::size_t found = radial_str.find(suffix); if (found != std::string::npos) radial_str.replace(found, suffix.length(), ""); @@ -724,11 +680,13 @@ PinMeshGenerator::generate() else if (getReactorParam(RGMB::region_id_as_block_name)) elem_block_name += "_REG" + std::to_string(elem_region_id); if (elem->type() == TRI3 || elem->type() == PRISM6) - elem_block_name += "_TRI"; + elem_block_name += RGMB::TRI_BLOCK_NAME_SUFFIX; updateElementBlockNameId( *(*_build_mesh), elem, rgmb_name_id_map, elem_block_name, next_block_id); } + // Mark mesh as not prepared, as block ID's were re-assigned in this method (*_build_mesh)->set_isnt_prepared(); + return std::move(*_build_mesh); } diff --git a/modules/reactor/src/meshgenerators/PolygonMeshGeneratorBase.C b/modules/reactor/src/meshgenerators/PolygonMeshGeneratorBase.C index ee985af64662..a018ea130512 100644 --- a/modules/reactor/src/meshgenerators/PolygonMeshGeneratorBase.C +++ b/modules/reactor/src/meshgenerators/PolygonMeshGeneratorBase.C @@ -1142,7 +1142,7 @@ Real PolygonMeshGeneratorBase::radiusCorrectionFactor(const std::vector & azimuthal_list, const bool full_circle, const unsigned int order, - const bool is_first_value_vertex) const + const bool is_first_value_vertex) { Real tmp_acc = 0.0; Real tmp_acc_azi = 0.0; @@ -1197,7 +1197,7 @@ PolygonMeshGeneratorBase::radiusCorrectionFactor(const std::vector & azimu } Real -PolygonMeshGeneratorBase::dummyTRI6VolCalculator(const std::pair & azi_pair) const +PolygonMeshGeneratorBase::dummyTRI6VolCalculator(const std::pair & azi_pair) { // The algorithm is copied from libMesh's face_tri6.C // Original license is LGPL so it can be used here. diff --git a/modules/reactor/src/meshgenerators/ReactorGeometryMeshBuilderBase.C b/modules/reactor/src/meshgenerators/ReactorGeometryMeshBuilderBase.C index 6e7ec47dfb02..89a4d60a4d1a 100644 --- a/modules/reactor/src/meshgenerators/ReactorGeometryMeshBuilderBase.C +++ b/modules/reactor/src/meshgenerators/ReactorGeometryMeshBuilderBase.C @@ -16,8 +16,10 @@ ReactorGeometryMeshBuilderBase::validParams() { InputParameters params = MeshGenerator::validParams(); - params.addParam( - "show_rgmb_metadata", false, "Print out RGMB-related metadata to console output"); + params.addDeprecatedParam("show_rgmb_metadata", + "Print out RGMB-related metadata to console output", + "This parameter is deprecated. Please use MeshMetaDataReporter " + "system to print out mesh metadata to JSON output file instead"); params.addClassDescription("A base class that contains common members and methods for Reactor " "Geometry Mesh Builder mesh generators."); @@ -53,7 +55,7 @@ ReactorGeometryMeshBuilderBase::initializeReactorMeshParams(const std::string re if (*_reactor_params_mesh) mooseError("The reactor_params mesh is not of the correct type"); - if (!hasMeshProperty("mesh_dimensions", _reactor_params) || + if (!hasMeshProperty("mesh_dimensions", _reactor_params) || !hasMeshProperty("mesh_geometry", _reactor_params)) mooseError("The reactor_params input must be a ReactorMeshParams type MeshGenerator\n Please " "check that a valid definition and name of ReactorMeshParams has been provided."); @@ -109,168 +111,6 @@ ReactorGeometryMeshBuilderBase::updateElementBlockNameId( } } -void -ReactorGeometryMeshBuilderBase::printReactorMetadata(const std::string geometry_type, - const std::string mg_name, - bool first_function_call) -{ - if (first_function_call) - { - _console << "Global metadata defined using Reactor Geometry Mesh Builder:" << std::endl; - printGlobalReactorMetadata(); - } - if (geometry_type == "core") - { - _console << "Core-level metadata defined using Reactor Geometry Mesh Builder for " << mg_name - << ":" << std::endl; - printCoreMetadata(mg_name, first_function_call); - } - else if (geometry_type == "assembly") - { - _console << "Assembly-level metadata defined using Reactor Geometry Mesh Builder for " - << mg_name << ":" << std::endl; - printAssemblyMetadata(mg_name, first_function_call); - } - else if (geometry_type == "pin") - { - _console << "Pin-level metadata defined using Reactor Geometry Mesh Builder for " << mg_name - << ":" << std::endl; - printPinMetadata(mg_name); - } - if (first_function_call) - _console << std::endl; -} - -void -ReactorGeometryMeshBuilderBase::printCoreMetadata(const std::string mg_name, - bool first_function_call) -{ - bool has_mesh_periphery = hasMeshProperty(RGMB::peripheral_ring_radius, mg_name); - if (has_mesh_periphery) - { - printMetadataToConsole(RGMB::peripheral_ring_radius, mg_name); - printMetadataToConsole(RGMB::peripheral_ring_region_id, mg_name); - } - - printMetadataToConsole>(RGMB::assembly_names, mg_name); - print2dMetadataToConsole(RGMB::assembly_lattice, mg_name); - - if (first_function_call) - { - const auto core_assembly_names = - getMeshProperty>(RGMB::assembly_names, mg_name); - for (const auto & assembly_name : core_assembly_names) - printReactorMetadata("assembly", assembly_name, false); - - const auto core_pin_names = getMeshProperty>(RGMB::pin_names, mg_name); - for (const auto & pin_name : core_pin_names) - printReactorMetadata("pin", pin_name, false); - } -} - -void -ReactorGeometryMeshBuilderBase::printAssemblyMetadata(const std::string mg_name, - bool first_function_call) -{ - printMetadataToConsole(RGMB::assembly_type, mg_name); - printMetadataToConsole(RGMB::pitch, mg_name); - printMetadataToConsole(RGMB::is_homogenized, mg_name); - printMetadataToConsole(RGMB::is_single_pin, mg_name); - printMetadataToConsole>(RGMB::background_region_id, mg_name); - - const auto duct_halfpitch = getMeshProperty>(RGMB::duct_halfpitches, mg_name); - if (duct_halfpitch.size() > 0) - { - printMetadataToConsole>(RGMB::duct_halfpitches, mg_name); - print2dMetadataToConsole(RGMB::duct_region_ids, mg_name); - } - - const auto is_single_pin = getMeshProperty(RGMB::is_single_pin, mg_name); - const auto is_homogenized = getMeshProperty(RGMB::is_homogenized, mg_name); - - // Print metadata specific to assemblies defined as a lattice of pins - if (!is_single_pin) - { - printMetadataToConsole>(RGMB::pin_names, mg_name); - print2dMetadataToConsole(RGMB::pin_lattice, mg_name); - - // Print information about constituent pins if this is the first function call - if (first_function_call) - { - const auto assembly_pin_names = - getMeshProperty>(RGMB::pin_names, mg_name); - for (const auto & pin_name : assembly_pin_names) - printReactorMetadata("pin", pin_name, false); - } - } - // Print metadata specific to assemblies defined as a single pin - else if (!is_homogenized) - { - const auto ring_radii = getMeshProperty>(RGMB::ring_radii, mg_name); - if (ring_radii.size() > 0) - { - printMetadataToConsole>(RGMB::ring_radii, mg_name); - print2dMetadataToConsole(RGMB::ring_region_ids, mg_name); - } - } -} - -void -ReactorGeometryMeshBuilderBase::printPinMetadata(const std::string mg_name) -{ - printMetadataToConsole(RGMB::pin_type, mg_name); - printMetadataToConsole(RGMB::pitch, mg_name); - - const auto ring_radii = getMeshProperty>(RGMB::ring_radii, mg_name); - if (ring_radii.size() > 0) - { - printMetadataToConsole>(RGMB::ring_radii, mg_name); - print2dMetadataToConsole(RGMB::ring_region_ids, mg_name); - } - - printMetadataToConsole>(RGMB::background_region_id, mg_name); - - const auto duct_halfpitch = getMeshProperty>(RGMB::duct_halfpitches, mg_name); - if (duct_halfpitch.size() > 0) - { - printMetadataToConsole>(RGMB::duct_halfpitches, mg_name); - print2dMetadataToConsole(RGMB::duct_region_ids, mg_name); - } -} - -void -ReactorGeometryMeshBuilderBase::printGlobalReactorMetadata() -{ - printMetadataToConsole(RGMB::mesh_dimensions, _reactor_params); - printMetadataToConsole(RGMB::mesh_geometry, _reactor_params); - const auto mesh_dimensions = getReactorParam(RGMB::mesh_dimensions); - if (mesh_dimensions == 3) - { - printMetadataToConsole>(RGMB::axial_mesh_sizes, _reactor_params); - printMetadataToConsole>(RGMB::axial_mesh_intervals, _reactor_params); - } -} - -template -void -ReactorGeometryMeshBuilderBase::printMetadataToConsole(const std::string metadata_name, - const std::string mg_name) -{ - _console << " " << metadata_name << ": " - << Moose::stringify(getMeshProperty(metadata_name, mg_name)) << std::endl; -} - -template -void -ReactorGeometryMeshBuilderBase::print2dMetadataToConsole(const std::string metadata_name, - const std::string mg_name) -{ - const auto metadata_value = getMeshProperty>>(metadata_name, mg_name); - _console << " " << metadata_name << ":" << std::endl; - for (const auto & row : metadata_value) - _console << " " << Moose::stringify(row) << std::endl; -} - void ReactorGeometryMeshBuilderBase::addDepletionId(MeshBase & input_mesh, const MooseEnum & option, @@ -300,9 +140,18 @@ ReactorGeometryMeshBuilderBase::addDepletionId(MeshBase & input_mesh, id_names.push_back("pin_type_id"); else paramError("depletion_id_type", - "'assembly_id' or 'assembly_type_id' is not allowd in depletion ID generation at " + "'assembly_id' or 'assembly_type_id' is not allowed in depletion ID generation at " "assembly level"); } + else if (generation_level == DepletionIDGenerationLevel::Drum) + { + if (option == "pin_type") + id_names.push_back("pin_type_id"); + else + paramError("depletion_id_type", + "Only 'pin_type' is allowed in depletion ID generation at " + "drum level"); + } else if (generation_level == DepletionIDGenerationLevel::Pin) mooseError("Depletion ID generation is not supported at pin level yet in RGMB"); id_names.push_back("region_id"); @@ -318,3 +167,56 @@ ReactorGeometryMeshBuilderBase::addDepletionId(MeshBase & input_mesh, for (Elem * const elem : input_mesh.active_element_ptr_range()) elem->set_extra_integer(depl_id_index, depl_ids.at(elem->id())); } + +MeshGeneratorName +ReactorGeometryMeshBuilderBase::callExtrusionMeshSubgenerators( + const MeshGeneratorName input_mesh_name) +{ + std::vector axial_boundaries = getReactorParam>(RGMB::axial_mesh_sizes); + const auto top_boundary = getReactorParam(RGMB::top_boundary_id); + const auto bottom_boundary = getReactorParam(RGMB::bottom_boundary_id); + + { + auto params = _app.getFactory().getValidParams("AdvancedExtruderGenerator"); + + params.set("input") = input_mesh_name; + params.set("direction") = Point(0, 0, 1); + params.set>("num_layers") = + getReactorParam>(RGMB::axial_mesh_intervals); + params.set>("heights") = axial_boundaries; + params.set("bottom_boundary") = bottom_boundary; + params.set("top_boundary") = top_boundary; + addMeshSubgenerator("AdvancedExtruderGenerator", name() + "_extruded", params); + } + + { + auto params = _app.getFactory().getValidParams("RenameBoundaryGenerator"); + + params.set("input") = name() + "_extruded"; + params.set>("old_boundary") = { + std::to_string(top_boundary), + std::to_string(bottom_boundary)}; // hard coded boundary IDs in patterned mesh generator + params.set>("new_boundary") = {"top", "bottom"}; + addMeshSubgenerator("RenameBoundaryGenerator", name() + "_change_plane_name", params); + } + + const MeshGeneratorName output_mesh_name = name() + "_extrudedIDs"; + { + auto params = _app.getFactory().getValidParams("PlaneIDMeshGenerator"); + + params.set("input") = name() + "_change_plane_name"; + + std::vector plane_heights{0}; + for (Real z : axial_boundaries) + plane_heights.push_back(z + plane_heights.back()); + + params.set>("plane_coordinates") = plane_heights; + + std::string plane_id_name = "plane_id"; + params.set("id_name") = "plane_id"; + + addMeshSubgenerator("PlaneIDMeshGenerator", output_mesh_name, params); + } + + return output_mesh_name; +} diff --git a/modules/reactor/src/meshgenerators/ReactorMeshParams.C b/modules/reactor/src/meshgenerators/ReactorMeshParams.C index e9a106791e8d..37997b526995 100644 --- a/modules/reactor/src/meshgenerators/ReactorMeshParams.C +++ b/modules/reactor/src/meshgenerators/ReactorMeshParams.C @@ -68,7 +68,7 @@ ReactorMeshParams::ReactorMeshParams(const InputParameters & parameters) _geom(getParam("geom")), _assembly_pitch(getParam("assembly_pitch")) { - if (int(_dim) == 2) + if ((unsigned int)(_dim) == 2) { std::vector invalid_params = { "axial_regions", "axial_mesh_intervals", "top_boundary_id", "bottom_boundary_id"}; @@ -88,7 +88,7 @@ ReactorMeshParams::ReactorMeshParams(const InputParameters & parameters) this->declareMeshProperty(RGMB::axial_mesh_intervals, _axial_mesh_intervals); } - this->declareMeshProperty(RGMB::mesh_dimensions, int(_dim)); + this->declareMeshProperty(RGMB::mesh_dimensions, (unsigned int)std::stoul(_dim)); this->declareMeshProperty(RGMB::mesh_geometry, std::string(_geom)); this->declareMeshProperty(RGMB::assembly_pitch, _assembly_pitch); this->declareMeshProperty(RGMB::region_id_as_block_name, @@ -114,10 +114,6 @@ ReactorMeshParams::ReactorMeshParams(const InputParameters & parameters) bool bypass_meshgen = (data_driven_generator != "") && isDataOnly(); this->declareMeshProperty(RGMB::bypass_meshgen, bypass_meshgen); - // Declare name id map only if RGMB is outputting a mesh - if (!bypass_meshgen) - this->declareMeshProperty("name_id_map", _name_id_map); - if (isParamValid("top_boundary_id")) { _top_boundary = getParam("top_boundary_id"); diff --git a/modules/reactor/src/meshgenerators/SimpleHexagonGenerator.C b/modules/reactor/src/meshgenerators/SimpleHexagonGenerator.C index e1dad892077f..dd28fb2aa3f0 100644 --- a/modules/reactor/src/meshgenerators/SimpleHexagonGenerator.C +++ b/modules/reactor/src/meshgenerators/SimpleHexagonGenerator.C @@ -44,8 +44,8 @@ SimpleHexagonGenerator::validParams() params.addRangeCheckedParam("external_boundary_id", "external_boundary_id>=0", "Optional customized external boundary id."); - params.addParam("external_boundary_name", - "Optional customized external boundary name."); + params.addParam("external_boundary_name", + "Optional customized external boundary name."); params.addParamNamesToGroup("block_id block_name external_boundary_id external_boundary_name", "Customized Subdomain/Boundary"); params.addClassDescription( @@ -74,8 +74,8 @@ SimpleHexagonGenerator::SimpleHexagonGenerator(const InputParameters & parameter ? getParam("external_boundary_id") : 0), _external_boundary_name(isParamValid("external_boundary_name") - ? getParam("external_boundary_name") - : std::string()) + ? getParam("external_boundary_name") + : BoundaryName()) { if (_radial_intervals > 1 && _element_type != ElemType::HYBRID) paramError( diff --git a/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/drum_depletion_id.i b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/drum_depletion_id.i new file mode 100644 index 000000000000..732175210ccb --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/drum_depletion_id.i @@ -0,0 +1,56 @@ +[Mesh] + [rmp] + type = ReactorMeshParams + geom = "Hex" + assembly_pitch = 20 + flexible_assembly_stitching = true + radial_boundary_id = 200 + region_id_as_block_name = true + [] + [drum] + type = ControlDrumMeshGenerator + reactor_params = rmp + assembly_type = 1 + drum_inner_radius = 8 + drum_outer_radius = 9.1 + num_azimuthal_sectors = 180 + drum_inner_intervals = 10 + + pad_start_angle = 90 + pad_end_angle = 180 + region_ids = '1 2 3 4' + + generate_depletion_id = true + depletion_id_type = pin_type + [] +[] + +[Problem] + solve = false +[] + +[Executioner] + type = Transient + num_steps = 1 +[] + +[AuxVariables] + [volume] + family = MONOMIAL + order = CONSTANT + initial_condition = 1.0 + [] +[] + +[VectorPostprocessors] + [region_volumes] + type = ExtraIDIntegralVectorPostprocessor + variable = volume + id_name = depletion_id + [] +[] + +[Outputs] + csv = true + execute_on = 'FINAL' +[] diff --git a/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/drum_nopad.i b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/drum_nopad.i new file mode 100644 index 000000000000..1ef63274c394 --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/drum_nopad.i @@ -0,0 +1,50 @@ +[Mesh] + [rmp] + type = ReactorMeshParams + geom = "Hex" + assembly_pitch = 20 + flexible_assembly_stitching = true + radial_boundary_id = 200 + region_id_as_block_name = true + [] + [drum] + type = ControlDrumMeshGenerator + reactor_params = rmp + assembly_type = 1 + drum_inner_radius = 8 + drum_outer_radius = 9.1 + num_azimuthal_sectors = 180 + drum_inner_intervals = 10 + + region_ids = '1 2 3' + [] +[] + +[Problem] + solve = false +[] + +[Executioner] + type = Transient + num_steps = 1 +[] + +[Postprocessors] + [area_reg1] + type = VolumePostprocessor + block = "RGMB_DRUM1_REG1 RGMB_DRUM1_REG1_TRI" + [] + [area_reg2] + type = VolumePostprocessor + block = "RGMB_DRUM1_REG2" + [] + [area_reg3] + type = VolumePostprocessor + block = "RGMB_DRUM1_REG3_TRI" + [] +[] + +[Outputs] + csv = true + execute_on = 'FINAL' +[] diff --git a/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/drum_nopad_err.i b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/drum_nopad_err.i new file mode 100644 index 000000000000..e59de6bbde4d --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/drum_nopad_err.i @@ -0,0 +1,47 @@ +[Mesh] + [rmp] + type = ReactorMeshParams + geom = "Hex" + assembly_pitch = 20 + flexible_assembly_stitching = true + radial_boundary_id = 200 + [] + [drum] + type = ControlDrumMeshGenerator + reactor_params = rmp + assembly_type = 1 + drum_inner_radius = 8 + drum_outer_radius = 9.1 + num_azimuthal_sectors = 180 + drum_inner_intervals = 10 + [] +[] + +[Problem] + solve = false +[] + +[Executioner] + type = Transient + num_steps = 1 +[] + +[Postprocessors] + [area_reg1] + type = VolumePostprocessor + block = "RGMB_DRUM1_REG1 RGMB_DRUM1_REG1_TRI" + [] + [area_reg2] + type = VolumePostprocessor + block = "RGMB_DRUM1_REG2" + [] + [area_reg3] + type = VolumePostprocessor + block = "RGMB_DRUM1_REG3_TRI" + [] +[] + +[Outputs] + csv = true + execute_on = 'FINAL' +[] diff --git a/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/drum_pad.i b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/drum_pad.i new file mode 100644 index 000000000000..3bf8328f0085 --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/drum_pad.i @@ -0,0 +1,56 @@ +[Mesh] + [rmp] + type = ReactorMeshParams + geom = "Hex" + assembly_pitch = 20 + flexible_assembly_stitching = true + radial_boundary_id = 200 + region_id_as_block_name = true + [] + [drum] + type = ControlDrumMeshGenerator + reactor_params = rmp + assembly_type = 1 + drum_inner_radius = 8 + drum_outer_radius = 9.1 + num_azimuthal_sectors = 180 + drum_inner_intervals = 10 + + pad_start_angle = 90 + pad_end_angle = 180 + region_ids = '1 2 3 4' + [] +[] + +[Problem] + solve = false +[] + +[Executioner] + type = Transient + num_steps = 1 +[] + +[Postprocessors] + [area_reg1] + type = VolumePostprocessor + block = "RGMB_DRUM1_REG1 RGMB_DRUM1_REG1_TRI" + [] + [area_reg2] + type = VolumePostprocessor + block = "RGMB_DRUM1_REG2" + [] + [area_reg3] + type = VolumePostprocessor + block = "RGMB_DRUM1_REG3" + [] + [area_reg4] + type = VolumePostprocessor + block = "RGMB_DRUM1_REG4_TRI" + [] +[] + +[Outputs] + csv = true + execute_on = 'FINAL' +[] diff --git a/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_cart_nopad_out.csv b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_cart_nopad_out.csv new file mode 100644 index 000000000000..41a1ffde04ec --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_cart_nopad_out.csv @@ -0,0 +1,2 @@ +time,area_reg1,area_reg2,area_reg3 +1,201.06192982974,59.093357814024,139.84471235623 diff --git a/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_cart_pad_out.csv b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_cart_pad_out.csv new file mode 100644 index 000000000000..1842369cfc59 --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_cart_pad_out.csv @@ -0,0 +1,2 @@ +time,area_reg1,area_reg2,area_reg3,area_reg4 +1,201.06192982974,14.773339453506,44.320018360518,139.84471235623 diff --git a/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_depletion_id_out_region_volumes_0002.csv b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_depletion_id_out_region_volumes_0002.csv new file mode 100644 index 000000000000..aef8de0bb0fc --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_depletion_id_out_region_volumes_0002.csv @@ -0,0 +1,5 @@ +Level-0-depletion_id,volume +0,86.254873870005 +1,44.320018360518 +2,14.773339453506 +3,201.06192982974 diff --git a/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_hex_nopad_out.csv b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_hex_nopad_out.csv new file mode 100644 index 000000000000..7eab532e02f5 --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_hex_nopad_out.csv @@ -0,0 +1,2 @@ +time,area_reg1,area_reg2,area_reg3 +1,201.06192982974,59.093357814024,86.254873870005 diff --git a/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_hex_pad_out.csv b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_hex_pad_out.csv new file mode 100644 index 000000000000..408d7256ae44 --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_hex_pad_out.csv @@ -0,0 +1,2 @@ +time,area_reg1,area_reg2,area_reg3,area_reg4 +1,201.06192982975,14.773339453506,44.320018360518,86.254873870005 diff --git a/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_hex_pad_shift_nodes_out.csv b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_hex_pad_shift_nodes_out.csv new file mode 100644 index 000000000000..8a73adb9edec --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/gold/drum_hex_pad_shift_nodes_out.csv @@ -0,0 +1,2 @@ +time,area_reg1,area_reg2,area_reg3,area_reg4 +1,201.06192982975,14.74052266086,44.352835153164,86.254873870005 diff --git a/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/tests b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/tests new file mode 100755 index 000000000000..b242db7a9c27 --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/control_drum_mesh_generator/tests @@ -0,0 +1,229 @@ +[Tests] + design = 'meshgenerators/ControlDrumMeshGenerator.md' + issues = '#28457' + [regression_tests] + requirement = 'The system shall generate ' + [hex_with_pad] + detail = 'a 2D hexagonal control drum assembly mesh with an explicit drum pad region' + type = 'CSVDiff' + input = 'drum_pad.i' + cli_args = 'Outputs/file_base=drum_hex_pad_out' + csvdiff = 'drum_hex_pad_out.csv' + recover = false + mesh_mode = REPLICATED + [] + [hex_no_pad] + detail = 'a 2D hexagonal control drum assembly mesh without an explicit drum pad region' + type = 'CSVDiff' + input = 'drum_nopad.i' + cli_args = 'Outputs/file_base=drum_hex_nopad_out' + csvdiff = 'drum_hex_nopad_out.csv' + recover = false + mesh_mode = REPLICATED + [] + [cart_with_pad] + detail = 'a 2D Cartesian control drum assembly mesh with an explicit drum pad region' + type = 'CSVDiff' + input = 'drum_pad.i' + cli_args = 'Mesh/rmp/geom=Square + Outputs/file_base=drum_cart_pad_out' + csvdiff = 'drum_cart_pad_out.csv' + recover = false + mesh_mode = REPLICATED + [] + [cart_no_pad] + detail = 'a 2D Cartesian control drum assembly mesh without an explicit drum pad region' + type = 'CSVDiff' + input = 'drum_nopad.i' + cli_args = 'Mesh/rmp/geom=Square + Outputs/file_base=drum_cart_nopad_out' + csvdiff = 'drum_cart_nopad_out.csv' + recover = false + mesh_mode = REPLICATED + [] + [pad_azimuthal_sector_mismatch] + detail = 'additional azimuthal nodes for a control drum assembly mesh when the azimuthal discretization does not line up with the pad start and end angles' + type = 'CSVDiff' + input = 'drum_pad.i' + csvdiff = 'drum_hex_pad_out.csv' + cli_args = 'Mesh/drum/num_azimuthal_sectors=102 + Outputs/file_base=drum_hex_pad_out' + allow_warnings = true + recover = false + mesh_mode = REPLICATED + [] + [pad_azimuthal_sector_shift] + detail = 'shift azimuthal nodes for a control drum assembly mesh to match the drum pad locations when the azimuthal angles line up to within tolerance' + type = 'CSVDiff' + input = 'drum_pad.i' + csvdiff = 'drum_hex_pad_shift_nodes_out.csv' + cli_args = 'Mesh/drum/pad_start_angle=90.1 + Mesh/drum/pad_end_angle=179.9 + Mesh/drum/azimuthal_node_tolerance=0.2 + Outputs/file_base=drum_hex_pad_shift_nodes_out' + allow_warnings = true + recover = false + mesh_mode = REPLICATED + [] + [drum_depletion_id] + detail = 'depletion IDs for each region in a 2D control drum mesh' + type = 'CSVDiff' + input = 'drum_depletion_id.i' + csvdiff = 'drum_depletion_id_out_region_volumes_0002.csv' + recover = false + mesh_mode = REPLICATED + [] + [] + [error_tests] + requirement = 'The system shall throw an error ' + [no_flexible_stitching] + detail = 'if flexible assembly stitching is not used when generating a control drum mesh' + type = 'RunException' + input = 'drum_nopad.i' + cli_args = 'Mesh/rmp/flexible_assembly_stitching=false' + expect_err = "'flexible_assembly_stitching' needs to be set to true" + [] + [large_inner_radius] + detail = 'if the inner radius of the control drum exceeds the outer radius' + type = 'RunException' + input = 'drum_nopad.i' + cli_args = 'Mesh/drum/drum_inner_radius=9.2' + expect_err = "Drum outer radius must be larger than the inner radius" + [] + [large_outer_radius] + detail = 'if the outer radius of the control drum exceeds the radius of the inscribed circle of the assembly boundary' + type = 'RunException' + input = 'drum_nopad.i' + cli_args = 'Mesh/drum/drum_outer_radius=9.9 + Mesh/drum/num_azimuthal_sectors=6' + expect_err = "Volume-corrected outer radius of drum region must be smaller" + [] + [missing_pad_end_angle] + detail = 'if the user sets the start angle of the drum pad but not the end angle' + type = 'RunException' + input = 'drum_nopad.i' + cli_args = 'Mesh/drum/pad_start_angle=50' + expect_err = "If 'pad_start_angle' is set, 'pad_end_angle' needs to also be set" + [] + [missing_pad_start_angle] + detail = 'if the user sets the end angle of the drum pad but not the start angle' + type = 'RunException' + input = 'drum_nopad.i' + cli_args = 'Mesh/drum/pad_end_angle=50' + expect_err = "If 'pad_end_angle' is set, 'pad_start_angle' needs to also be set" + [] + [small_pad_angle_diff] + detail = 'if the difference between the end and start angle of the pad region is less than 0' + type = 'RunException' + input = 'drum_nopad.i' + cli_args = 'Mesh/drum/pad_start_angle=60 + Mesh/drum/pad_end_angle=50' + expect_err = "The difference between 'pad_end_angle' and 'pad_start_angle' must be between" + [] + [large_pad_angle_diff] + detail = 'if the difference between the end and start angle of the pad region exceeeds 360 inclusive' + type = 'RunException' + input = 'drum_nopad.i' + cli_args = 'Mesh/drum/pad_start_angle=0 + Mesh/drum/pad_end_angle=360' + expect_err = "The difference between 'pad_end_angle' and 'pad_start_angle' must be between" + [] + [node_tolerance_interval_size] + detail = 'if the azimuthal node tolerance is larger than half the azimuthal interval size' + type = 'RunException' + input = 'drum_pad.i' + cli_args = 'Mesh/drum/azimuthal_node_tolerance=1' + expect_err = "Azimuthal node tolerance should be smaller than half the azimuthal interval size" + [] + [node_tolerance_pad_angle_range] + detail = 'if the azimuthal node tolerance is larger than half the difference of the pad angle range' + type = 'RunException' + input = 'drum_pad.i' + cli_args = 'Mesh/drum/azimuthal_node_tolerance=1 + Mesh/drum/num_azimuthal_sectors=36 + Mesh/drum/pad_start_angle=90 + Mesh/drum/pad_end_angle=92' + expect_err = "Azimuthal node tolerance should be smaller than half the difference of the pad angle range" + [] + [no_region_ids] + detail = 'if region IDs are not provided for the control drum mesh' + type = 'RunException' + input = 'drum_nopad_err.i' + expect_err = "Region IDs must be assigned" + [] + [region_id_axial_mismatch] + detail = 'if the number of region IDs provided per radial level does not match the number of axial levels for a control drum mesh' + type = 'RunException' + input = 'drum_nopad_err.i' + cli_args = 'Mesh/drum/region_ids="1 2 3; 4 5 6"' + expect_err = "The size of region IDs must be equal to the number of axial levels" + [] + [region_id_radial_mismatch_nopad] + detail = 'if the number of radial region IDs provided per axial level does not equal 3 for a control drum mesh with no explicit pad region' + type = 'RunException' + input = 'drum_nopad_err.i' + cli_args = 'Mesh/drum/region_ids="1 2 3 4"' + expect_err = "3 radial IDs need to be provided per axial zone" + [] + [region_id_radial_mismatch_pad] + detail = 'if the number of radial region IDs provided per axial level does not equal 4 for a control drum mesh with ax explicit pad region' + type = 'RunException' + input = 'drum_nopad_err.i' + cli_args = 'Mesh/drum/region_ids="1 2 3" + Mesh/drum/pad_start_angle=0 + Mesh/drum/pad_end_angle=90' + expect_err = "4 radial IDs need to be provided per axial zone" + [] + [block_names_conflict] + detail = 'if block names are defined explicitly while also using auto-assigned block names for a control drum mesh' + type = 'RunException' + input = 'drum_nopad_err.i' + cli_args = 'Mesh/rmp/region_id_as_block_name=true + Mesh/drum/region_ids="1 2 3" + Mesh/drum/block_names="block1 block2 block3"' + expect_err = "block_names should not be specified in ControlDrumMeshGenerator" + [] + [block_names_size_mismatch_axial] + detail = 'if the size of block_names does not match the size of region_ids in the axial dimension for a control drum mesh' + type = 'RunException' + input = 'drum_nopad_err.i' + cli_args = 'Mesh/drum/region_ids="1 2 3" + Mesh/drum/block_names="block1 block2 block3; block4 block5 block6"' + expect_err = "The size of block_names must match the size of region_ids" + [] + [block_names_size_mismatch_radial] + detail = 'if the size of block_names does not match the size of region_ids in the radial dimension for a control drum mesh' + type = 'RunException' + input = 'drum_nopad_err.i' + cli_args = 'Mesh/drum/region_ids="1 2 3" + Mesh/drum/block_names="block1 block2 block3 block4"' + expect_err = "The size of block_names must match the size of region_ids" + [] + [extrude_2d] + detail = 'if a 2-D mesh with no axial information is extruded into 3-D for a control drum mesh' + type = 'RunException' + input = 'drum_nopad_err.i' + cli_args = 'Mesh/drum/region_ids="1 2 3" + Mesh/drum/extrude=true' + expect_err = "This is a 2 dimensional mesh, you cannot extrude it." + [] + [extrude_no_axial_boundary_ids] + detail = 'if a 3-D mesh is extruded but is missing top and bottom boundary id data' + type = 'RunException' + input = 'drum_nopad_err.i' + cli_args = 'Mesh/rmp/dim=3 + Mesh/rmp/axial_mesh_intervals=1 + Mesh/rmp/axial_regions=1.0 + Mesh/drum/region_ids="1 2 3" + Mesh/drum/extrude=true' + expect_err = "Both top_boundary_id and bottom_boundary_id must be provided" + [] + [depletion_id_incorrect_level] + detail = 'if a depletion id type other than pin type is used for a control drum mesh' + type = 'RunException' + input = 'drum_depletion_id.i' + cli_args = 'Mesh/drum/depletion_id_type=assembly_type' + expect_err = "Only 'pin_type' is allowed in depletion ID generation at drum level" + [] + [] +[] diff --git a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/core_flexible_assembly_stitching_with_drum_cart.i b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/core_flexible_assembly_stitching_with_drum_cart.i new file mode 100644 index 000000000000..ed0fe6d8b499 --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/core_flexible_assembly_stitching_with_drum_cart.i @@ -0,0 +1,118 @@ +[Mesh] + [rmp] + type = ReactorMeshParams + dim = 3 + geom = "Square" + assembly_pitch = 20 + flexible_assembly_stitching = true + radial_boundary_id = 200 + top_boundary_id = 201 + bottom_boundary_id = 202 + axial_regions = 1.0 + axial_mesh_intervals = 1 + region_id_as_block_name = true + [] + [het_pin] + type = PinMeshGenerator + reactor_params = rmp + pin_type = 1 + pitch = 1.0 + num_sectors = 2 + ring_radii = '0.4' + mesh_intervals = '1 1' # Fuel, background + region_ids = '1 2' + quad_center_elements = false + [] + [het_assembly] + type = AssemblyMeshGenerator + assembly_type = 1 + background_intervals = 1 + background_region_id = '3' + inputs = 'het_pin' + pattern = '0 0; + 0 0' + [] + [hom_assembly] + type = PinMeshGenerator + reactor_params = rmp + pin_type = 2 + pitch = 20 + num_sectors = 2 + mesh_intervals = '1' + region_ids = '4' + use_as_assembly = true + quad_center_elements = false + [] + [drum] + type = ControlDrumMeshGenerator + reactor_params = rmp + assembly_type = 3 + drum_inner_radius = 8 + drum_outer_radius = 9.1 + num_azimuthal_sectors = 36 + drum_inner_intervals = 10 + drum_intervals = 1 + + pad_start_angle = 90 + pad_end_angle = 180 + region_ids = '5 6 7 8' + [] + [core] + type = CoreMeshGenerator + inputs = 'het_assembly hom_assembly drum dummy' + dummy_assembly_name = dummy + pattern = '3 1 3; + 2 0 2; + 3 1 3' + extrude = true + [] +[] + +[Problem] + solve = false +[] + +[Executioner] + type = Transient + num_steps = 1 +[] + +[Postprocessors] + [area_reg1] + type = VolumePostprocessor + block = "RGMB_CORE_REG1_TRI" + [] + [area_reg2] + type = VolumePostprocessor + block = "RGMB_CORE_REG2" + [] + [area_reg3] + type = VolumePostprocessor + block = "RGMB_CORE_REG3_TRI" + [] + [area_reg4] + type = VolumePostprocessor + block = "RGMB_CORE_REG4_TRI" + [] + [area_reg5] + type = VolumePostprocessor + block = "RGMB_CORE_REG5 RGMB_CORE_REG5_TRI" + [] + [area_reg6] + type = VolumePostprocessor + block = "RGMB_CORE_REG6" + [] + [area_reg7] + type = VolumePostprocessor + block = "RGMB_CORE_REG7" + [] + [area_reg8] + type = VolumePostprocessor + block = "RGMB_CORE_REG8_TRI" + [] +[] + +[Outputs] + csv = true + execute_on = 'FINAL' +[] diff --git a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/core_flexible_assembly_stitching_with_drum_hex.i b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/core_flexible_assembly_stitching_with_drum_hex.i new file mode 100644 index 000000000000..84f298478943 --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/core_flexible_assembly_stitching_with_drum_hex.i @@ -0,0 +1,134 @@ +[Mesh] + [rmp] + type = ReactorMeshParams + dim = 3 + geom = "Hex" + assembly_pitch = 20 + flexible_assembly_stitching = true + radial_boundary_id = 200 + top_boundary_id = 201 + bottom_boundary_id = 202 + axial_regions = 1.0 + axial_mesh_intervals = 1 + region_id_as_block_name = true + [] + [het_pin] + type = PinMeshGenerator + reactor_params = rmp + pin_type = 1 + pitch = 1.0 + num_sectors = 2 + ring_radii = '0.4' + mesh_intervals = '1 1' # Fuel, background + region_ids = '1 2' + quad_center_elements = false + [] + [het_assembly] + type = AssemblyMeshGenerator + assembly_type = 1 + background_intervals = 1 + background_region_id = '3' + duct_halfpitch = '9' + duct_intervals = '1' + duct_region_ids = '4' + inputs = 'het_pin' + pattern = '0 0; + 0 0 0; + 0 0' + [] + [hom_assembly] + type = PinMeshGenerator + reactor_params = rmp + pin_type = 2 + pitch = 20 + region_ids = '5' + homogenized = true + use_as_assembly = true + quad_center_elements = false + [] + [drum] + type = ControlDrumMeshGenerator + reactor_params = rmp + assembly_type = 3 + drum_inner_radius = 8 + drum_outer_radius = 9.1 + num_azimuthal_sectors = 36 + drum_inner_intervals = 10 + drum_intervals = 1 + + pad_start_angle = 90 + pad_end_angle = 180 + region_ids = '6 7 8 9' + [] + [core] + type = CoreMeshGenerator + inputs = 'het_assembly hom_assembly drum dummy' + dummy_assembly_name = dummy + pattern = ' + 1 2; + 3 0 3; + 2 1' + extrude = true + [] +[] + +[Problem] + solve = false +[] + +[Executioner] + type = Transient + num_steps = 1 +[] + +[Postprocessors] + [area_reg1] + type = VolumePostprocessor + block = "RGMB_CORE_REG1_TRI" + [] + [area_reg2] + type = VolumePostprocessor + block = "RGMB_CORE_REG2" + [] + [area_reg3] + type = VolumePostprocessor + block = "RGMB_CORE_REG3" + [] + [area_reg4] + type = VolumePostprocessor + block = "RGMB_CORE_REG4_TRI" + [] + [area_reg5] + type = VolumePostprocessor + block = "RGMB_CORE_REG5_TRI" + [] + [area_reg6] + type = VolumePostprocessor + block = "RGMB_CORE_REG6 RGMB_CORE_REG6_TRI" + [] + [area_reg7] + type = VolumePostprocessor + block = "RGMB_CORE_REG7" + [] + [area_reg8] + type = VolumePostprocessor + block = "RGMB_CORE_REG8" + [] + [area_reg9] + type = VolumePostprocessor + block = "RGMB_CORE_REG9_TRI" + [] +[] + +[Reporters/metadata] + type = MeshMetaDataReporter +[] + +[Outputs] + csv = true + execute_on = 'FINAL' + [out] + type = JSON + execute_system_information_on = none + [] +[] diff --git a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/core_hex_extra_assemblies.i b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/core_hex_extra_assemblies.i index 81067f9b8436..746e7a4bd670 100644 --- a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/core_hex_extra_assemblies.i +++ b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/core_hex_extra_assemblies.i @@ -102,16 +102,8 @@ pattern = '2 1; 1 0 2; 2 1' - show_rgmb_metadata = true extrude = true [] - - [rotate90] - type = TransformGenerator - input = cmg - transform = ROTATE - vector_value = '0 0 90' - [] [] [Problem] @@ -122,12 +114,17 @@ type = Steady [] +[Reporters] + [metadata] + type = MeshMetaDataReporter + [] +[] + [Outputs] - [out] - type = Exodus - execute_on = timestep_end - output_extra_element_ids = true - extra_element_ids_to_output = 'assembly_id assembly_type_id plane_id pin_id pin_type_id region_id' + file_base = core_hex_extra_assemblies_out + [json_out] + type = JSON + execute_on = FINAL + execute_system_information_on = none [] - file_base = core_in [] diff --git a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/core_with_drum_depletion_id.i b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/core_with_drum_depletion_id.i new file mode 100644 index 000000000000..e8875fc1ed63 --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/core_with_drum_depletion_id.i @@ -0,0 +1,107 @@ +[Mesh] + [rmp] + type = ReactorMeshParams + dim = 3 + geom = "Hex" + assembly_pitch = 20 + flexible_assembly_stitching = true + radial_boundary_id = 200 + top_boundary_id = 201 + bottom_boundary_id = 202 + axial_regions = 1.0 + axial_mesh_intervals = 1 + region_id_as_block_name = true + [] + [het_pin] + type = PinMeshGenerator + reactor_params = rmp + pin_type = 1 + pitch = 1.0 + num_sectors = 2 + ring_radii = '0.4' + mesh_intervals = '1 1' # Fuel, background + region_ids = '1 2' + quad_center_elements = false + [] + [het_assembly] + type = AssemblyMeshGenerator + assembly_type = 1 + background_intervals = 1 + background_region_id = '3' + duct_halfpitch = '9' + duct_intervals = '1' + duct_region_ids = '4' + inputs = 'het_pin' + pattern = '0 0; + 0 0 0; + 0 0' + [] + [hom_assembly] + type = PinMeshGenerator + reactor_params = rmp + pin_type = 2 + pitch = 20 + region_ids = '5' + homogenized = true + use_as_assembly = true + quad_center_elements = false + [] + [drum] + type = ControlDrumMeshGenerator + reactor_params = rmp + assembly_type = 3 + drum_inner_radius = 8 + drum_outer_radius = 9.1 + num_azimuthal_sectors = 36 + drum_inner_intervals = 10 + drum_intervals = 1 + + pad_start_angle = 90 + pad_end_angle = 180 + region_ids = '6 7 8 9' + [] + [core] + type = CoreMeshGenerator + inputs = 'het_assembly hom_assembly drum dummy' + dummy_assembly_name = dummy + pattern = ' + 1 2; + 3 0 3; + 2 1' + extrude = true + + generate_depletion_id = true + depletion_id_type = pin + [] +[] + +[Problem] + solve = false +[] + +[Executioner] + type = Transient + num_steps = 1 +[] + + +[AuxVariables] + [volume] + family = MONOMIAL + order = CONSTANT + initial_condition = 1.0 + [] +[] + +[VectorPostprocessors] + [region_volumes] + type = ExtraIDIntegralVectorPostprocessor + variable = volume + id_name = depletion_id + [] +[] + +[Outputs] + csv = true + execute_on = 'FINAL' +[] diff --git a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_flexible_assembly_stitching_with_drum_cart_out.csv b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_flexible_assembly_stitching_with_drum_cart_out.csv new file mode 100644 index 000000000000..ad3a609228fb --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_flexible_assembly_stitching_with_drum_cart_out.csv @@ -0,0 +1,2 @@ +time,area_reg1,area_reg2,area_reg3,area_reg4,area_reg5,area_reg6,area_reg7,area_reg8 +1,2.0106192982975,1.9893807017025,396,800,402.12385965949,29.546678907012,88.640036721036,279.68942471246 diff --git a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_flexible_assembly_stitching_with_drum_hex_out.csv b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_flexible_assembly_stitching_with_drum_hex_out.csv new file mode 100644 index 000000000000..2180ee0eb1a6 --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_flexible_assembly_stitching_with_drum_hex_out.csv @@ -0,0 +1,2 @@ +time,area_reg1,area_reg2,area_reg3,area_reg4,area_reg5,area_reg6,area_reg7,area_reg8,area_reg9 +1,3.5185837720206,2.5435940544705,274.53005299967,65.817930687617,692.82032302755,402.12385965949,29.546678907012,88.640036721036,172.50974774001 diff --git a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_flexible_assembly_stitching_with_drum_hex_out.json b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_flexible_assembly_stitching_with_drum_hex_out.json new file mode 100644 index 000000000000..852d2284e924 --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_flexible_assembly_stitching_with_drum_hex_out.json @@ -0,0 +1,381 @@ +{ + "reporters": { + "metadata": { + "type": "MeshMetaDataReporter", + "values": { + "values": { + "type": "std::map, std::allocator>>" + } + } + } + }, + "time_steps": [ + { + "metadata": { + "values": { + "MeshMetaData/core/assembly_lattice": { + "type": "std::vector>", + "value": [ + [ + 1, + 2 + ], + [ + -1, + 0, + -1 + ], + [ + 2, + 1 + ] + ] + }, + "MeshMetaData/core/assembly_names": { + "type": "std::vector", + "value": [ + "het_assembly", + "hom_assembly", + "drum" + ] + }, + "MeshMetaData/core/extruded": { + "type": "bool", + "value": true + }, + "MeshMetaData/core/pin_names": { + "type": "std::vector", + "value": [ + "het_pin" + ] + }, + "MeshMetaData/core/reactor_params_name": { + "type": "std::string", + "value": "rmp" + }, + "MeshMetaData/drum/assembly_type": { + "type": "unsigned short", + "value": 3 + }, + "MeshMetaData/drum/drum_block_names": { + "type": "std::vector>", + "value": [] + }, + "MeshMetaData/drum/drum_pad_angles": { + "type": "std::vector", + "value": [ + 90.0, + 180.0 + ] + }, + "MeshMetaData/drum/drum_radii": { + "type": "std::vector", + "value": [ + 8.0, + 9.1 + ] + }, + "MeshMetaData/drum/drum_region_ids": { + "type": "std::vector>", + "value": [ + [ + 6, + 7, + 8, + 9 + ] + ] + }, + "MeshMetaData/drum/extruded": { + "type": "bool", + "value": false + }, + "MeshMetaData/drum/is_control_drum": { + "type": "bool", + "value": true + }, + "MeshMetaData/drum/is_homogenized": { + "type": "bool", + "value": false + }, + "MeshMetaData/drum/is_single_pin": { + "type": "bool", + "value": false + }, + "MeshMetaData/drum/pitch": { + "type": "double", + "value": 20.0 + }, + "MeshMetaData/drum/reactor_params_name": { + "type": "std::string", + "value": "rmp" + }, + "MeshMetaData/het_assembly/assembly_type": { + "type": "unsigned short", + "value": 1 + }, + "MeshMetaData/het_assembly/background_block_name": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/het_assembly/background_region_id": { + "type": "std::vector", + "value": [ + 3 + ] + }, + "MeshMetaData/het_assembly/duct_block_names": { + "type": "std::vector>", + "value": [] + }, + "MeshMetaData/het_assembly/duct_halfpitches": { + "type": "std::vector", + "value": [ + 9.0 + ] + }, + "MeshMetaData/het_assembly/duct_region_ids": { + "type": "std::vector>", + "value": [ + [ + 4 + ] + ] + }, + "MeshMetaData/het_assembly/extruded": { + "type": "bool", + "value": false + }, + "MeshMetaData/het_assembly/is_control_drum": { + "type": "bool", + "value": false + }, + "MeshMetaData/het_assembly/is_homogenized": { + "type": "bool", + "value": false + }, + "MeshMetaData/het_assembly/is_single_pin": { + "type": "bool", + "value": false + }, + "MeshMetaData/het_assembly/pin_lattice": { + "type": "std::vector>", + "value": [ + [ + 0, + 0 + ], + [ + 0, + 0, + 0 + ], + [ + 0, + 0 + ] + ] + }, + "MeshMetaData/het_assembly/pin_names": { + "type": "std::vector", + "value": [ + "het_pin" + ] + }, + "MeshMetaData/het_assembly/pitch": { + "type": "double", + "value": 20.0 + }, + "MeshMetaData/het_assembly/reactor_params_name": { + "type": "std::string", + "value": "rmp" + }, + "MeshMetaData/het_pin/background_region_id": { + "type": "std::vector", + "value": [ + 2 + ] + }, + "MeshMetaData/het_pin/duct_halfpitches": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/het_pin/duct_region_ids": { + "type": "std::vector>", + "value": [ + [] + ] + }, + "MeshMetaData/het_pin/extruded": { + "type": "bool", + "value": false + }, + "MeshMetaData/het_pin/is_homogenized": { + "type": "bool", + "value": false + }, + "MeshMetaData/het_pin/pin_block_names": { + "type": "std::vector>", + "value": [] + }, + "MeshMetaData/het_pin/pin_region_ids": { + "type": "std::map>, std::less, std::allocator>>>>", + "value": [ + [ + 1, + [ + [ + 1, + 2 + ] + ] + ] + ] + }, + "MeshMetaData/het_pin/pin_type": { + "type": "unsigned short", + "value": 1 + }, + "MeshMetaData/het_pin/pitch": { + "type": "double", + "value": 1.0 + }, + "MeshMetaData/het_pin/reactor_params_name": { + "type": "std::string", + "value": "rmp" + }, + "MeshMetaData/het_pin/ring_radii": { + "type": "std::vector", + "value": [ + 0.4 + ] + }, + "MeshMetaData/het_pin/ring_region_ids": { + "type": "std::vector>", + "value": [ + [ + 1 + ] + ] + }, + "MeshMetaData/hom_assembly/assembly_type": { + "type": "unsigned short", + "value": 2 + }, + "MeshMetaData/hom_assembly/background_block_name": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/hom_assembly/background_region_id": { + "type": "std::vector", + "value": [ + 5 + ] + }, + "MeshMetaData/hom_assembly/duct_block_names": { + "type": "std::vector>", + "value": [] + }, + "MeshMetaData/hom_assembly/duct_halfpitches": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/hom_assembly/duct_region_ids": { + "type": "std::vector>", + "value": [ + [] + ] + }, + "MeshMetaData/hom_assembly/extruded": { + "type": "bool", + "value": false + }, + "MeshMetaData/hom_assembly/is_control_drum": { + "type": "bool", + "value": false + }, + "MeshMetaData/hom_assembly/is_homogenized": { + "type": "bool", + "value": true + }, + "MeshMetaData/hom_assembly/is_single_pin": { + "type": "bool", + "value": true + }, + "MeshMetaData/hom_assembly/pitch": { + "type": "double", + "value": 20.0 + }, + "MeshMetaData/hom_assembly/reactor_params_name": { + "type": "std::string", + "value": "rmp" + }, + "MeshMetaData/hom_assembly/ring_radii": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/hom_assembly/ring_region_ids": { + "type": "std::vector>", + "value": [ + [] + ] + }, + "MeshMetaData/rmp/assembly_pitch": { + "type": "double", + "value": 20.0 + }, + "MeshMetaData/rmp/axial_mesh_intervals": { + "type": "std::vector", + "value": [ + 1 + ] + }, + "MeshMetaData/rmp/axial_mesh_sizes": { + "type": "std::vector", + "value": [ + 1.0 + ] + }, + "MeshMetaData/rmp/bottom_boundary_id": { + "type": "short", + "value": 202 + }, + "MeshMetaData/rmp/bypass_meshgen": { + "type": "bool", + "value": true + }, + "MeshMetaData/rmp/flexible_assembly_stitching": { + "type": "bool", + "value": true + }, + "MeshMetaData/rmp/mesh_dimensions": { + "type": "unsigned int", + "value": 3 + }, + "MeshMetaData/rmp/mesh_geometry": { + "type": "std::string", + "value": "Hex" + }, + "MeshMetaData/rmp/num_sectors_flexible_stitching": { + "type": "unsigned int", + "value": 6 + }, + "MeshMetaData/rmp/radial_boundary_id": { + "type": "short", + "value": 200 + }, + "MeshMetaData/rmp/region_id_as_block_name": { + "type": "bool", + "value": true + }, + "MeshMetaData/rmp/top_boundary_id": { + "type": "short", + "value": 201 + } + } + }, + "time": 1.0, + "time_step": 2 + } + ] +} diff --git a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_hex_2d_datadriven_out.json b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_hex_2d_datadriven_out.json index 0bd2b6aa10e9..79302eb5e059 100644 --- a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_hex_2d_datadriven_out.json +++ b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_hex_2d_datadriven_out.json @@ -49,6 +49,10 @@ "type": "bool", "value": false }, + "MeshMetaData/amg1/is_control_drum": { + "type": "bool", + "value": false + }, "MeshMetaData/amg1/is_homogenized": { "type": "bool", "value": false @@ -216,7 +220,7 @@ "value": false }, "MeshMetaData/rmp/mesh_dimensions": { - "type": "int", + "type": "unsigned int", "value": 2 }, "MeshMetaData/rmp/mesh_geometry": { diff --git a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_hex_datadriven_out.json b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_hex_datadriven_out.json index dcf804568440..365fe9b6869b 100644 --- a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_hex_datadriven_out.json +++ b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_hex_datadriven_out.json @@ -47,6 +47,10 @@ "type": "bool", "value": false }, + "MeshMetaData/amg1/is_control_drum": { + "type": "bool", + "value": false + }, "MeshMetaData/amg1/is_homogenized": { "type": "bool", "value": false @@ -137,6 +141,10 @@ "type": "bool", "value": false }, + "MeshMetaData/amg2/is_control_drum": { + "type": "bool", + "value": false + }, "MeshMetaData/amg2/is_homogenized": { "type": "bool", "value": false @@ -508,7 +516,7 @@ "value": false }, "MeshMetaData/rmp/mesh_dimensions": { - "type": "int", + "type": "unsigned int", "value": 3 }, "MeshMetaData/rmp/mesh_geometry": { diff --git a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_hex_extra_assemblies_out.json b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_hex_extra_assemblies_out.json new file mode 100644 index 000000000000..b682d3679016 --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_hex_extra_assemblies_out.json @@ -0,0 +1,1430 @@ +{ + "reporters": { + "metadata": { + "type": "MeshMetaDataReporter", + "values": { + "values": { + "type": "std::map, std::allocator>>" + } + } + } + }, + "time_steps": [ + { + "metadata": { + "values": { + "MeshMetaData/amg1/assembly_type": { + "type": "unsigned short", + "value": 1 + }, + "MeshMetaData/amg1/background_block_name": { + "type": "std::vector", + "value": [ + "A1_R41", + "A1_R141" + ] + }, + "MeshMetaData/amg1/background_region_id": { + "type": "std::vector", + "value": [ + 41, + 141 + ] + }, + "MeshMetaData/amg1/control_drum_angles": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/amg1/control_drum_positions": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/amg1/control_drums_azimuthal_meta": { + "type": "std::vector>", + "value": [] + }, + "MeshMetaData/amg1/duct_block_names": { + "type": "std::vector>", + "value": [] + }, + "MeshMetaData/amg1/duct_halfpitches": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/amg1/duct_region_ids": { + "type": "std::vector>", + "value": [] + }, + "MeshMetaData/amg1/extruded": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg1/is_control_drum": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg1/is_control_drum_meta": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg1/is_homogenized": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg1/is_single_pin": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg1/pattern_pitch_meta": { + "type": "double", + "value": 7.10315 + }, + "MeshMetaData/amg1/pin_block_name_map": { + "type": "std::map>, std::less, std::allocator>>>>", + "value": [ + [ + 2, + [ + [ + "P2_R21" + ], + [ + "P2_R121" + ] + ] + ] + ] + }, + "MeshMetaData/amg1/pin_lattice": { + "type": "std::vector>", + "value": [ + [ + 0, + 0 + ], + [ + 0, + 0, + 0 + ], + [ + 0, + 0 + ] + ] + }, + "MeshMetaData/amg1/pin_names": { + "type": "std::vector", + "value": [ + "pin2" + ] + }, + "MeshMetaData/amg1/pin_region_id_map": { + "type": "std::map>, std::less, std::allocator>>>>", + "value": [ + [ + 2, + [ + [ + 21 + ], + [ + 121 + ] + ] + ] + ] + }, + "MeshMetaData/amg1/pitch": { + "type": "double", + "value": 7.10315 + }, + "MeshMetaData/amg1/position_file_name": { + "type": "std::string", + "value": "positions_meta.data" + }, + "MeshMetaData/amg1/reactor_params_name": { + "type": "std::string", + "value": "rmp" + }, + "MeshMetaData/amg1_pattern/control_drum_angles": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/amg1_pattern/control_drum_positions": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/amg1_pattern/control_drums_azimuthal_meta": { + "type": "std::vector>", + "value": [] + }, + "MeshMetaData/amg1_pattern/hexagon_center_trimmability": { + "type": "bool", + "value": true + }, + "MeshMetaData/amg1_pattern/hexagon_peripheral_trimmability": { + "type": "bool", + "value": true + }, + "MeshMetaData/amg1_pattern/input_pitch_meta": { + "type": "double", + "value": 1.42063 + }, + "MeshMetaData/amg1_pattern/interface_boundaries": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg1_pattern/interface_boundary_ids": { + "type": "std::set, std::allocator>", + "value": [] + }, + "MeshMetaData/amg1_pattern/is_control_drum_meta": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg1_pattern/pattern_pitch_meta": { + "type": "double", + "value": 7.10315 + }, + "MeshMetaData/amg1_pattern/pattern_size": { + "type": "unsigned int", + "value": 3 + }, + "MeshMetaData/amg1_pattern/peripheral_modifier_compatible": { + "type": "bool", + "value": true + }, + "MeshMetaData/amg1_pattern/position_file_name": { + "type": "std::string", + "value": "positions_meta.data" + }, + "MeshMetaData/amg2/assembly_type": { + "type": "unsigned short", + "value": 2 + }, + "MeshMetaData/amg2/background_block_name": { + "type": "std::vector", + "value": [ + "A2_R51", + "A2_R151" + ] + }, + "MeshMetaData/amg2/background_region_id": { + "type": "std::vector", + "value": [ + 51, + 151 + ] + }, + "MeshMetaData/amg2/control_drum_angles": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/amg2/control_drum_positions": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/amg2/control_drums_azimuthal_meta": { + "type": "std::vector>", + "value": [] + }, + "MeshMetaData/amg2/duct_block_names": { + "type": "std::vector>", + "value": [ + [ + "A2_R52" + ], + [ + "A2_R152" + ] + ] + }, + "MeshMetaData/amg2/duct_halfpitches": { + "type": "std::vector", + "value": [ + 3.5 + ] + }, + "MeshMetaData/amg2/duct_region_ids": { + "type": "std::vector>", + "value": [ + [ + 52 + ], + [ + 152 + ] + ] + }, + "MeshMetaData/amg2/extruded": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg2/is_control_drum": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg2/is_control_drum_meta": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg2/is_homogenized": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg2/is_single_pin": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg2/pattern_pitch_meta": { + "type": "double", + "value": 7.10315 + }, + "MeshMetaData/amg2/pin_block_name_map": { + "type": "std::map>, std::less, std::allocator>>>>", + "value": [ + [ + 1, + [ + [ + "P1_R11", + "P1_R12", + "P1_R13" + ], + [ + "P1_R111", + "P1_R112", + "P1_R113" + ] + ] + ], + [ + 3, + [ + [ + "P3_R31", + "P3_R32" + ], + [ + "P3_R131", + "P3_R132" + ] + ] + ] + ] + }, + "MeshMetaData/amg2/pin_lattice": { + "type": "std::vector>", + "value": [ + [ + 0, + 0 + ], + [ + 0, + 1, + 0 + ], + [ + 0, + 0 + ] + ] + }, + "MeshMetaData/amg2/pin_names": { + "type": "std::vector", + "value": [ + "pin1", + "pin3" + ] + }, + "MeshMetaData/amg2/pin_region_id_map": { + "type": "std::map>, std::less, std::allocator>>>>", + "value": [ + [ + 1, + [ + [ + 11, + 12, + 13 + ], + [ + 111, + 112, + 113 + ] + ] + ], + [ + 3, + [ + [ + 31, + 32 + ], + [ + 131, + 132 + ] + ] + ] + ] + }, + "MeshMetaData/amg2/pitch": { + "type": "double", + "value": 7.10315 + }, + "MeshMetaData/amg2/position_file_name": { + "type": "std::string", + "value": "positions_meta.data" + }, + "MeshMetaData/amg2/reactor_params_name": { + "type": "std::string", + "value": "rmp" + }, + "MeshMetaData/amg2_pattern/control_drum_angles": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/amg2_pattern/control_drum_positions": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/amg2_pattern/control_drums_azimuthal_meta": { + "type": "std::vector>", + "value": [] + }, + "MeshMetaData/amg2_pattern/hexagon_center_trimmability": { + "type": "bool", + "value": true + }, + "MeshMetaData/amg2_pattern/hexagon_peripheral_trimmability": { + "type": "bool", + "value": true + }, + "MeshMetaData/amg2_pattern/input_pitch_meta": { + "type": "double", + "value": 1.42063 + }, + "MeshMetaData/amg2_pattern/interface_boundaries": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg2_pattern/interface_boundary_ids": { + "type": "std::set, std::allocator>", + "value": [] + }, + "MeshMetaData/amg2_pattern/is_control_drum_meta": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg2_pattern/pattern_pitch_meta": { + "type": "double", + "value": 7.10315 + }, + "MeshMetaData/amg2_pattern/pattern_size": { + "type": "unsigned int", + "value": 3 + }, + "MeshMetaData/amg2_pattern/peripheral_modifier_compatible": { + "type": "bool", + "value": true + }, + "MeshMetaData/amg2_pattern/position_file_name": { + "type": "std::string", + "value": "positions_meta.data" + }, + "MeshMetaData/amg3/assembly_type": { + "type": "unsigned short", + "value": 3 + }, + "MeshMetaData/amg3/background_block_name": { + "type": "std::vector", + "value": [ + "A2_R51", + "A2_R151" + ] + }, + "MeshMetaData/amg3/background_region_id": { + "type": "std::vector", + "value": [ + 51, + 151 + ] + }, + "MeshMetaData/amg3/control_drum_angles": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/amg3/control_drum_positions": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/amg3/control_drums_azimuthal_meta": { + "type": "std::vector>", + "value": [] + }, + "MeshMetaData/amg3/duct_block_names": { + "type": "std::vector>", + "value": [ + [ + "A2_R52" + ], + [ + "A2_R152" + ] + ] + }, + "MeshMetaData/amg3/duct_halfpitches": { + "type": "std::vector", + "value": [ + 3.5 + ] + }, + "MeshMetaData/amg3/duct_region_ids": { + "type": "std::vector>", + "value": [ + [ + 52 + ], + [ + 152 + ] + ] + }, + "MeshMetaData/amg3/extruded": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg3/is_control_drum": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg3/is_control_drum_meta": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg3/is_homogenized": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg3/is_single_pin": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg3/pattern_pitch_meta": { + "type": "double", + "value": 7.10315 + }, + "MeshMetaData/amg3/pin_block_name_map": { + "type": "std::map>, std::less, std::allocator>>>>", + "value": [ + [ + 1, + [ + [ + "P1_R11", + "P1_R12", + "P1_R13" + ], + [ + "P1_R111", + "P1_R112", + "P1_R113" + ] + ] + ], + [ + 3, + [ + [ + "P3_R31", + "P3_R32" + ], + [ + "P3_R131", + "P3_R132" + ] + ] + ] + ] + }, + "MeshMetaData/amg3/pin_lattice": { + "type": "std::vector>", + "value": [ + [ + 0, + 0 + ], + [ + 0, + 1, + 0 + ], + [ + 0, + 0 + ] + ] + }, + "MeshMetaData/amg3/pin_names": { + "type": "std::vector", + "value": [ + "pin1", + "pin3" + ] + }, + "MeshMetaData/amg3/pin_region_id_map": { + "type": "std::map>, std::less, std::allocator>>>>", + "value": [ + [ + 1, + [ + [ + 11, + 12, + 13 + ], + [ + 111, + 112, + 113 + ] + ] + ], + [ + 3, + [ + [ + 31, + 32 + ], + [ + 131, + 132 + ] + ] + ] + ] + }, + "MeshMetaData/amg3/pitch": { + "type": "double", + "value": 7.10315 + }, + "MeshMetaData/amg3/position_file_name": { + "type": "std::string", + "value": "positions_meta.data" + }, + "MeshMetaData/amg3/reactor_params_name": { + "type": "std::string", + "value": "rmp" + }, + "MeshMetaData/amg3_pattern/control_drum_angles": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/amg3_pattern/control_drum_positions": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/amg3_pattern/control_drums_azimuthal_meta": { + "type": "std::vector>", + "value": [] + }, + "MeshMetaData/amg3_pattern/hexagon_center_trimmability": { + "type": "bool", + "value": true + }, + "MeshMetaData/amg3_pattern/hexagon_peripheral_trimmability": { + "type": "bool", + "value": true + }, + "MeshMetaData/amg3_pattern/input_pitch_meta": { + "type": "double", + "value": 1.42063 + }, + "MeshMetaData/amg3_pattern/interface_boundaries": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg3_pattern/interface_boundary_ids": { + "type": "std::set, std::allocator>", + "value": [] + }, + "MeshMetaData/amg3_pattern/is_control_drum_meta": { + "type": "bool", + "value": false + }, + "MeshMetaData/amg3_pattern/pattern_pitch_meta": { + "type": "double", + "value": 7.10315 + }, + "MeshMetaData/amg3_pattern/pattern_size": { + "type": "unsigned int", + "value": 3 + }, + "MeshMetaData/amg3_pattern/peripheral_modifier_compatible": { + "type": "bool", + "value": true + }, + "MeshMetaData/amg3_pattern/position_file_name": { + "type": "std::string", + "value": "positions_meta.data" + }, + "MeshMetaData/cmg/assembly_lattice": { + "type": "std::vector>", + "value": [ + [ + -1, + 1 + ], + [ + 1, + 0, + -1 + ], + [ + -1, + 1 + ] + ] + }, + "MeshMetaData/cmg/assembly_names": { + "type": "std::vector", + "value": [ + "amg1", + "amg2", + "amg3" + ] + }, + "MeshMetaData/cmg/extruded": { + "type": "bool", + "value": true + }, + "MeshMetaData/cmg/pin_names": { + "type": "std::vector", + "value": [ + "pin2", + "pin1", + "pin3" + ] + }, + "MeshMetaData/cmg/reactor_params_name": { + "type": "std::string", + "value": "rmp" + }, + "MeshMetaData/cmg_pattern/control_drum_angles": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/cmg_pattern/control_drum_positions": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/cmg_pattern/control_drums_azimuthal_meta": { + "type": "std::vector>", + "value": [] + }, + "MeshMetaData/cmg_pattern/hexagon_center_trimmability": { + "type": "bool", + "value": true + }, + "MeshMetaData/cmg_pattern/hexagon_peripheral_trimmability": { + "type": "bool", + "value": false + }, + "MeshMetaData/cmg_pattern/input_pitch_meta": { + "type": "double", + "value": 7.10315 + }, + "MeshMetaData/cmg_pattern/interface_boundaries": { + "type": "bool", + "value": true + }, + "MeshMetaData/cmg_pattern/interface_boundary_ids": { + "type": "std::set, std::allocator>", + "value": [ + 1 + ] + }, + "MeshMetaData/cmg_pattern/is_control_drum_meta": { + "type": "bool", + "value": false + }, + "MeshMetaData/cmg_pattern/pattern_pitch_meta": { + "type": "double", + "value": 7.10315 + }, + "MeshMetaData/cmg_pattern/pattern_size": { + "type": "unsigned int", + "value": 3 + }, + "MeshMetaData/cmg_pattern/peripheral_modifier_compatible": { + "type": "bool", + "value": false + }, + "MeshMetaData/cmg_pattern/position_file_name": { + "type": "std::string", + "value": "positions_meta.data" + }, + "MeshMetaData/empty/azimuthal_angle_meta": { + "type": "std::vector", + "value": [ + -150.00000000000003, + -120.00000000000001, + -90.00000000000001, + -60.00000000000002, + -30.00000000000003, + 1.1853348412019195e-14, + 30.00000000000001, + 48.690067525979806, + 54.289406862500385, + 60.00000000000002, + 65.71059313749964, + 71.3099324740202, + 90.0, + 119.99999999999999, + 150.00000000000003, + 180.0 + ] + }, + "MeshMetaData/empty/background_intervals_meta": { + "type": "unsigned int", + "value": 1 + }, + "MeshMetaData/empty/flat_side_up": { + "type": "bool", + "value": false + }, + "MeshMetaData/empty/interface_boundaries": { + "type": "bool", + "value": true + }, + "MeshMetaData/empty/interface_boundary_ids": { + "type": "std::set, std::allocator>", + "value": [ + 1 + ] + }, + "MeshMetaData/empty/is_control_drum_meta": { + "type": "bool", + "value": false + }, + "MeshMetaData/empty/max_radius_meta": { + "type": "double", + "value": 0.0 + }, + "MeshMetaData/empty/node_id_background_meta": { + "type": "unsigned long long", + "value": 1 + }, + "MeshMetaData/empty/num_sectors_per_side_meta": { + "type": "std::vector", + "value": [ + 2, + 2, + 2, + 2, + 2, + 2 + ] + }, + "MeshMetaData/empty/pattern_pitch_meta": { + "type": "double", + "value": 7.10315 + }, + "MeshMetaData/empty/pitch_meta": { + "type": "double", + "value": 7.10315 + }, + "MeshMetaData/empty/quad_center_block_id": { + "type": "unsigned short", + "value": 65535 + }, + "MeshMetaData/pin1/background_intervals_meta": { + "type": "unsigned int", + "value": 1 + }, + "MeshMetaData/pin1/background_region_id": { + "type": "std::vector", + "value": [ + 12, + 112 + ] + }, + "MeshMetaData/pin1/duct_halfpitches": { + "type": "std::vector", + "value": [ + 0.68 + ] + }, + "MeshMetaData/pin1/duct_region_ids": { + "type": "std::vector>", + "value": [ + [ + 13 + ], + [ + 113 + ] + ] + }, + "MeshMetaData/pin1/extruded": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin1/is_control_drum_meta": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin1/is_homogenized": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin1/max_radius_meta": { + "type": "double", + "value": 0.20466534158929775 + }, + "MeshMetaData/pin1/node_id_background_meta": { + "type": "unsigned long long", + "value": 4 + }, + "MeshMetaData/pin1/num_sectors_per_side_meta": { + "type": "std::vector", + "value": [ + 2, + 2, + 2, + 2, + 2, + 2 + ] + }, + "MeshMetaData/pin1/pattern_pitch_meta": { + "type": "double", + "value": 0.0 + }, + "MeshMetaData/pin1/pin_block_names": { + "type": "std::vector>", + "value": [ + [ + "P1_R11", + "P1_R12", + "P1_R13" + ], + [ + "P1_R111", + "P1_R112", + "P1_R113" + ] + ] + }, + "MeshMetaData/pin1/pin_region_ids": { + "type": "std::map>, std::less, std::allocator>>>>", + "value": [ + [ + 1, + [ + [ + 11, + 12, + 13 + ], + [ + 111, + 112, + 113 + ] + ] + ] + ] + }, + "MeshMetaData/pin1/pin_type": { + "type": "unsigned short", + "value": 1 + }, + "MeshMetaData/pin1/pitch": { + "type": "double", + "value": 1.42063 + }, + "MeshMetaData/pin1/pitch_meta": { + "type": "double", + "value": 1.42063 + }, + "MeshMetaData/pin1/reactor_params_name": { + "type": "std::string", + "value": "rmp" + }, + "MeshMetaData/pin1/ring_radii": { + "type": "std::vector", + "value": [ + 0.2 + ] + }, + "MeshMetaData/pin1/ring_region_ids": { + "type": "std::vector>", + "value": [ + [ + 11 + ], + [ + 111 + ] + ] + }, + "MeshMetaData/pin1_2D/azimuthal_angle_meta": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/pin1_2D/background_intervals_meta": { + "type": "unsigned int", + "value": 1 + }, + "MeshMetaData/pin1_2D/flat_side_up": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin1_2D/interface_boundaries": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin1_2D/interface_boundary_ids": { + "type": "std::set, std::allocator>", + "value": [] + }, + "MeshMetaData/pin1_2D/is_control_drum_meta": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin1_2D/max_radius_meta": { + "type": "double", + "value": 0.20466534158929775 + }, + "MeshMetaData/pin1_2D/node_id_background_meta": { + "type": "unsigned long long", + "value": 4 + }, + "MeshMetaData/pin1_2D/num_sectors_per_side_meta": { + "type": "std::vector", + "value": [ + 2, + 2, + 2, + 2, + 2, + 2 + ] + }, + "MeshMetaData/pin1_2D/pattern_pitch_meta": { + "type": "double", + "value": 0.0 + }, + "MeshMetaData/pin1_2D/pitch_meta": { + "type": "double", + "value": 1.42063 + }, + "MeshMetaData/pin1_2D/quad_center_block_id": { + "type": "unsigned short", + "value": 65535 + }, + "MeshMetaData/pin2/background_intervals_meta": { + "type": "unsigned int", + "value": 1 + }, + "MeshMetaData/pin2/background_region_id": { + "type": "std::vector", + "value": [ + 21, + 121 + ] + }, + "MeshMetaData/pin2/duct_halfpitches": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/pin2/duct_region_ids": { + "type": "std::vector>", + "value": [ + [], + [] + ] + }, + "MeshMetaData/pin2/extruded": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin2/is_control_drum_meta": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin2/is_homogenized": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin2/max_radius_meta": { + "type": "double", + "value": 0.0 + }, + "MeshMetaData/pin2/node_id_background_meta": { + "type": "unsigned long long", + "value": 1 + }, + "MeshMetaData/pin2/num_sectors_per_side_meta": { + "type": "std::vector", + "value": [ + 2, + 2, + 2, + 2, + 2, + 2 + ] + }, + "MeshMetaData/pin2/pattern_pitch_meta": { + "type": "double", + "value": 0.0 + }, + "MeshMetaData/pin2/pin_block_names": { + "type": "std::vector>", + "value": [ + [ + "P2_R21" + ], + [ + "P2_R121" + ] + ] + }, + "MeshMetaData/pin2/pin_region_ids": { + "type": "std::map>, std::less, std::allocator>>>>", + "value": [ + [ + 2, + [ + [ + 21 + ], + [ + 121 + ] + ] + ] + ] + }, + "MeshMetaData/pin2/pin_type": { + "type": "unsigned short", + "value": 2 + }, + "MeshMetaData/pin2/pitch": { + "type": "double", + "value": 1.42063 + }, + "MeshMetaData/pin2/pitch_meta": { + "type": "double", + "value": 1.42063 + }, + "MeshMetaData/pin2/reactor_params_name": { + "type": "std::string", + "value": "rmp" + }, + "MeshMetaData/pin2/ring_radii": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/pin2/ring_region_ids": { + "type": "std::vector>", + "value": [ + [], + [] + ] + }, + "MeshMetaData/pin2_2D/azimuthal_angle_meta": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/pin2_2D/background_intervals_meta": { + "type": "unsigned int", + "value": 1 + }, + "MeshMetaData/pin2_2D/flat_side_up": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin2_2D/interface_boundaries": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin2_2D/interface_boundary_ids": { + "type": "std::set, std::allocator>", + "value": [] + }, + "MeshMetaData/pin2_2D/is_control_drum_meta": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin2_2D/max_radius_meta": { + "type": "double", + "value": 0.0 + }, + "MeshMetaData/pin2_2D/node_id_background_meta": { + "type": "unsigned long long", + "value": 1 + }, + "MeshMetaData/pin2_2D/num_sectors_per_side_meta": { + "type": "std::vector", + "value": [ + 2, + 2, + 2, + 2, + 2, + 2 + ] + }, + "MeshMetaData/pin2_2D/pattern_pitch_meta": { + "type": "double", + "value": 0.0 + }, + "MeshMetaData/pin2_2D/pitch_meta": { + "type": "double", + "value": 1.42063 + }, + "MeshMetaData/pin2_2D/quad_center_block_id": { + "type": "unsigned short", + "value": 65535 + }, + "MeshMetaData/pin3/background_intervals_meta": { + "type": "unsigned int", + "value": 1 + }, + "MeshMetaData/pin3/background_region_id": { + "type": "std::vector", + "value": [ + 32, + 132 + ] + }, + "MeshMetaData/pin3/duct_halfpitches": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/pin3/duct_region_ids": { + "type": "std::vector>", + "value": [ + [], + [] + ] + }, + "MeshMetaData/pin3/extruded": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin3/is_control_drum_meta": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin3/is_homogenized": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin3/max_radius_meta": { + "type": "double", + "value": 0.39070613709396934 + }, + "MeshMetaData/pin3/node_id_background_meta": { + "type": "unsigned long long", + "value": 4 + }, + "MeshMetaData/pin3/num_sectors_per_side_meta": { + "type": "std::vector", + "value": [ + 2, + 2, + 2, + 2, + 2, + 2 + ] + }, + "MeshMetaData/pin3/pattern_pitch_meta": { + "type": "double", + "value": 0.0 + }, + "MeshMetaData/pin3/pin_block_names": { + "type": "std::vector>", + "value": [ + [ + "P3_R31", + "P3_R32" + ], + [ + "P3_R131", + "P3_R132" + ] + ] + }, + "MeshMetaData/pin3/pin_region_ids": { + "type": "std::map>, std::less, std::allocator>>>>", + "value": [ + [ + 3, + [ + [ + 31, + 32 + ], + [ + 131, + 132 + ] + ] + ] + ] + }, + "MeshMetaData/pin3/pin_type": { + "type": "unsigned short", + "value": 3 + }, + "MeshMetaData/pin3/pitch": { + "type": "double", + "value": 1.42063 + }, + "MeshMetaData/pin3/pitch_meta": { + "type": "double", + "value": 1.42063 + }, + "MeshMetaData/pin3/reactor_params_name": { + "type": "std::string", + "value": "rmp" + }, + "MeshMetaData/pin3/ring_radii": { + "type": "std::vector", + "value": [ + 0.3818 + ] + }, + "MeshMetaData/pin3/ring_region_ids": { + "type": "std::vector>", + "value": [ + [ + 31 + ], + [ + 131 + ] + ] + }, + "MeshMetaData/pin3_2D/azimuthal_angle_meta": { + "type": "std::vector", + "value": [] + }, + "MeshMetaData/pin3_2D/background_intervals_meta": { + "type": "unsigned int", + "value": 1 + }, + "MeshMetaData/pin3_2D/flat_side_up": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin3_2D/interface_boundaries": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin3_2D/interface_boundary_ids": { + "type": "std::set, std::allocator>", + "value": [] + }, + "MeshMetaData/pin3_2D/is_control_drum_meta": { + "type": "bool", + "value": false + }, + "MeshMetaData/pin3_2D/max_radius_meta": { + "type": "double", + "value": 0.39070613709396934 + }, + "MeshMetaData/pin3_2D/node_id_background_meta": { + "type": "unsigned long long", + "value": 4 + }, + "MeshMetaData/pin3_2D/num_sectors_per_side_meta": { + "type": "std::vector", + "value": [ + 2, + 2, + 2, + 2, + 2, + 2 + ] + }, + "MeshMetaData/pin3_2D/pattern_pitch_meta": { + "type": "double", + "value": 0.0 + }, + "MeshMetaData/pin3_2D/pitch_meta": { + "type": "double", + "value": 1.42063 + }, + "MeshMetaData/pin3_2D/quad_center_block_id": { + "type": "unsigned short", + "value": 65535 + }, + "MeshMetaData/rmp/assembly_pitch": { + "type": "double", + "value": 7.10315 + }, + "MeshMetaData/rmp/axial_mesh_intervals": { + "type": "std::vector", + "value": [ + 1, + 1 + ] + }, + "MeshMetaData/rmp/axial_mesh_sizes": { + "type": "std::vector", + "value": [ + 1.0, + 1.0 + ] + }, + "MeshMetaData/rmp/bottom_boundary_id": { + "type": "short", + "value": 202 + }, + "MeshMetaData/rmp/bypass_meshgen": { + "type": "bool", + "value": false + }, + "MeshMetaData/rmp/flexible_assembly_stitching": { + "type": "bool", + "value": false + }, + "MeshMetaData/rmp/mesh_dimensions": { + "type": "unsigned int", + "value": 3 + }, + "MeshMetaData/rmp/mesh_geometry": { + "type": "std::string", + "value": "Hex" + }, + "MeshMetaData/rmp/radial_boundary_id": { + "type": "short", + "value": 200 + }, + "MeshMetaData/rmp/region_id_as_block_name": { + "type": "bool", + "value": false + }, + "MeshMetaData/rmp/top_boundary_id": { + "type": "short", + "value": 201 + } + } + }, + "time": 2.0, + "time_step": 2 + } + ] +} diff --git a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_square_datadriven_out.json b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_square_datadriven_out.json index 8abe8cbf885d..453ae9b6f4b7 100644 --- a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_square_datadriven_out.json +++ b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_square_datadriven_out.json @@ -41,6 +41,10 @@ "type": "bool", "value": false }, + "MeshMetaData/amg1/is_control_drum": { + "type": "bool", + "value": false + }, "MeshMetaData/amg1/is_homogenized": { "type": "bool", "value": false @@ -104,6 +108,10 @@ "type": "bool", "value": false }, + "MeshMetaData/amg2/is_control_drum": { + "type": "bool", + "value": false + }, "MeshMetaData/amg2/is_homogenized": { "type": "bool", "value": false @@ -410,7 +418,7 @@ "value": false }, "MeshMetaData/rmp/mesh_dimensions": { - "type": "int", + "type": "unsigned int", "value": 3 }, "MeshMetaData/rmp/mesh_geometry": { diff --git a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_with_drum_depletion_id_pin_out_region_volumes_0002.csv b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_with_drum_depletion_id_pin_out_region_volumes_0002.csv new file mode 100644 index 000000000000..116eaf8934b0 --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_with_drum_depletion_id_pin_out_region_volumes_0002.csv @@ -0,0 +1,32 @@ +Level-0-depletion_id,volume +0,346.41016151378 +1,201.06192982975 +2,14.773339453506 +3,44.320018360518 +4,86.254873870005 +5,0.50265482457437 +6,0.36337057921007 +7,45.755008833278 +8,0.50265482457437 +9,0.36337057921007 +10,45.755008833278 +11,0.50265482457437 +12,0.36337057921007 +13,45.755008833278 +14,0.50265482457437 +15,0.36337057921007 +16,0.50265482457437 +17,0.36337057921007 +18,45.755008833278 +19,0.50265482457437 +20,0.36337057921007 +21,45.755008833278 +22,0.50265482457437 +23,0.36337057921007 +24,45.755008833278 +25,65.817930687617 +26,201.06192982975 +27,14.773339453506 +28,44.320018360518 +29,86.254873870005 +30,346.41016151378 diff --git a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_with_drum_depletion_id_pin_type_out_region_volumes_0002.csv b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_with_drum_depletion_id_pin_type_out_region_volumes_0002.csv new file mode 100644 index 000000000000..9634fe9edf60 --- /dev/null +++ b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/gold/core_with_drum_depletion_id_pin_type_out_region_volumes_0002.csv @@ -0,0 +1,15 @@ +Level-0-depletion_id,volume +0,346.41016151378 +1,86.254873870005 +2,44.320018360518 +3,14.773339453506 +4,201.06192982975 +5,3.5185837720206 +6,2.5435940544705 +7,65.817930687617 +8,274.53005299967 +9,86.254873870005 +10,44.320018360518 +11,14.773339453506 +12,201.06192982975 +13,346.41016151378 diff --git a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/tests b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/tests index 2434f5fc56b6..f2e6d3019f1a 100755 --- a/modules/reactor/test/tests/meshgenerators/core_mesh_generator/tests +++ b/modules/reactor/test/tests/meshgenerators/core_mesh_generator/tests @@ -18,13 +18,6 @@ exodiff = 'core_rid_as_block_name.e' recover = false [] - [square_metadata] - requirement = 'The system shall print out reactor-related metadata to console output for a full 3D square core mesh with 3 pin types and 2 assembly types' - type = 'RunApp' - input = 'core_square.i' - cli_args = "Mesh/cmg/show_rgmb_metadata=true" - expect_out = 'Global metadata.+mesh_dimensions: 3.+mesh_geometry: Square.+axial_mesh_sizes: 1.+axial_mesh_intervals: 1.+Core-level metadata.+cmg.+assembly_names: amg2, amg1.+assembly_lattice:.+1, 0.+0, 1.+Assembly-level metadata.+amg2.+assembly_type: 2.+pin_names: pin3, pin1, pin2.+pin_lattice:.+0, 1.+1, 2.+Assembly-level metadata.+amg1.+assembly_type: 1.+pin_names: pin2.+pin_lattice:.+0, 0.+0, 0.+Pin-level metadata.+pin3.+pin_type: 3.+background_region_id: 4.+Pin-level metadata.+pin1.+pin_type: 1.+background_region_id: 2.+Pin-level metadata.+pin2.+pin_type: 2.+background_region_id: 2' - [] [square_metadata_jsondiff] requirement = 'The system shall output reactor-related metadata for a full 3D square core mesh in mesh generation mode' type = 'JSONDiff' @@ -36,7 +29,7 @@ Outputs/json_out/file_base=core_square_datadriven_out' jsondiff = 'core_square_datadriven_out.json' # Ignoring data that is only generated when the mesh is actually constructed, to compare with data-driven - ignored_regex_items = '.*/.*/.*_meta|flat_side_up|control_drum_angles|control_drum_positions|quad_center_block_id|pin_block_name_map|pin_region_id_map|position_file_name|peripheral_modifier_compatible|pattern_size|.*_trimmability|name_id_map|bypass_meshgen|interface_boundary_ids|interface_boundaries|flexible_assembly_stitching' + ignored_regex_items = '.*/.*/.*_meta|flat_side_up|control_drum_angles|control_drum_positions|quad_center_block_id|pin_block_name_map|pin_region_id_map|position_file_name|peripheral_modifier_compatible|pattern_size|.*_trimmability|bypass_meshgen|interface_boundary_ids|interface_boundaries|flexible_assembly_stitching' recover = false allow_test_objects = true [] @@ -136,14 +129,6 @@ exodiff = 'core_hex_in.e' recover = false [] - [hex_metadata] - requirement = 'The system shall print out reactor-related metadata to console output for a 3D hexagonal core mesh with empty lattice positions and explicit block name specification' - type = 'RunApp' - input = 'core_hex.i' - cli_args = "Mesh/cmg/show_rgmb_metadata=true - Outputs/file_base=core_hex_in" - expect_out = 'Global metadata.+mesh_dimensions: 3.+mesh_geometry: Hex.+axial_mesh_sizes: 1, 1.+axial_mesh_intervals: 1, 1.+Core-level metadata.+cmg.+assembly_names: amg1, amg2.+assembly_lattice:.+-1, 1.+1, 0, -1.+-1, 1.+Assembly-level metadata.+amg1.+assembly_type: 1.+pin_names: pin2.+pin_lattice:.+0, 0.+0, 0, 0.+0, 0.+Assembly-level metadata.+amg2.+assembly_type: 2.+pin_names: pin1, pin3.+pin_lattice:.+0, 0.+0, 1, 0.+0, 0.+Pin-level metadata.+pin2.+pin_type: 2.+background_region_id: 21, 121.+Pin-level metadata.+pin1.+pin_type: 1.+background_region_id: 12, 112.+Pin-level metadata.+pin3.+pin_type: 3.+background_region_id: 32, 132' - [] [hex_metadata_jsondiff] requirement = 'The system shall output reactor-related metadata for a full 3D hexagonal core mesh in mesh generation mode' type = 'JSONDiff' @@ -155,7 +140,7 @@ Outputs/json_out/file_base=core_hex_datadriven_out' jsondiff = 'core_hex_datadriven_out.json' # Ignoring data that is only generated when the mesh is actually constructed, to compare with data-driven - ignored_regex_items = '.*/.*/.*_meta|flat_side_up|control_drum_angles|control_drum_positions|quad_center_block_id|pin_block_name_map|pin_region_id_map|position_file_name|peripheral_modifier_compatible|pattern_size|.*_trimmability|name_id_map|bypass_meshgen|interface_boundary_ids|interface_boundaries|flexible_assembly_stitching' + ignored_regex_items = '.*/.*/.*_meta|flat_side_up|control_drum_angles|control_drum_positions|quad_center_block_id|pin_block_name_map|pin_region_id_map|position_file_name|peripheral_modifier_compatible|pattern_size|.*_trimmability|bypass_meshgen|interface_boundary_ids|interface_boundaries|flexible_assembly_stitching' recover = false allow_test_objects = true [] @@ -234,13 +219,6 @@ exodiff = 'core_metadata_transfer.e' recover = false [] - [hex_metadata_2d] - requirement = 'The system shall print out reactor-related metadata to console output for a 2D hexagonal core mesh' - type = 'RunApp' - input = 'core_hex_2d.i' - cli_args = "Mesh/cmg/show_rgmb_metadata=true" - expect_out = 'Global metadata.+mesh_dimensions: 2.+mesh_geometry: Hex.+Core-level metadata.+cmg.+peripheral_ring_radius: 7.+peripheral_ring_region_id: 5.+assembly_names: amg1.+assembly_lattice:.+0, 0.+0, 0, 0.+0, 0.+Assembly-level metadata.+amg1.+assembly_type: 1.+pin_names: pin1.+pin_lattice:.+0, 0.+0, 0, 0.+0, 0.+Pin-level metadata.+pin1.+pin_type: 1.+background_region_id: 2' - [] [hex_metadata_2d_jsondiff] requirement = 'The system shall output reactor-related metadata for a 2D hexagonal core mesh in mesh generation mode' type = 'JSONDiff' @@ -252,7 +230,7 @@ Outputs/json_out/file_base=core_hex_2d_datadriven_out' jsondiff = 'core_hex_2d_datadriven_out.json' # Ignoring data that is only generated when the mesh is actually constructed, to compare with data-driven - ignored_regex_items = '.*/.*/.*_meta|flat_side_up|control_drum_angles|control_drum_positions|quad_center_block_id|pin_block_name_map|pin_region_id_map|position_file_name|peripheral_modifier_compatible|pattern_size|.*_trimmability|name_id_map|bypass_meshgen|interface_boundary_ids|interface_boundaries|flexible_assembly_stitching' + ignored_regex_items = '.*/.*/.*_meta|flat_side_up|control_drum_angles|control_drum_positions|quad_center_block_id|pin_block_name_map|pin_region_id_map|position_file_name|peripheral_modifier_compatible|pattern_size|.*_trimmability|bypass_meshgen|interface_boundary_ids|interface_boundaries|flexible_assembly_stitching' recover = false allow_test_objects = true [] @@ -265,10 +243,12 @@ recover = false [] [hex_metadata_extra_assemblies] - requirement = 'The system shall print out reactor-related metadata to console output for a 3D hexagonal core mesh with extra assemblies not part of core lattice' - type = 'RunApp' + requirement = 'The system shall output reactor-related metadata for a 3D hexagonal core mesh with extra assemblies not part of core lattice' + type = 'JSONDiff' input = 'core_hex_extra_assemblies.i' - expect_out = 'Global metadata.+mesh_dimensions: 3.+mesh_geometry: Hex.+axial_mesh_sizes: 1, 1.+axial_mesh_intervals: 1, 1.+Core-level metadata.+cmg.+assembly_names: amg1, amg2, amg3.+assembly_lattice:.+-1, 1.+1, 0, -1.+-1, 1.+Assembly-level metadata.+amg1.+assembly_type: 1.+pin_names: pin2.+pin_lattice:.+0, 0.+0, 0, 0.+0, 0.+Assembly-level metadata.+amg2.+assembly_type: 2.+pin_names: pin1, pin3.+pin_lattice:.+0, 0.+0, 1, 0.+0, 0.+Assembly-level metadata.+amg3.+assembly_type: 3.+pin_names: pin1, pin3.+pin_lattice:.+0, 0.+0, 1, 0.+0, 0.+Pin-level metadata.+pin2.+pin_type: 2.+background_region_id: 21, 121.+Pin-level metadata.+pin1.+pin_type: 1.+background_region_id: 12, 112.+Pin-level metadata.+pin3.+pin_type: 3.+background_region_id: 32, 132' + jsondiff = core_hex_extra_assemblies_out.json + ignored_regex_items = '.*/.*/.*_meta' + recover = false [] [ptmg_periphery] requirement = 'The system shall generate a 2D hex core mesh with a reactor periphery meshed using a triangular mesh.' @@ -341,4 +321,63 @@ recover = false mesh_mode = REPLICATED [] + [core_stitching_drum_cart] + requirement = 'The system shall generate a 3D Cartesian core mesh with heterogeneous and homogeneous assemblies stitched alongside drum structures' + type = 'CSVDiff' + input = 'core_flexible_assembly_stitching_with_drum_cart.i' + csvdiff = 'core_flexible_assembly_stitching_with_drum_cart_out.csv' + recover = false + mesh_mode = REPLICATED + [] + [core_stitching_drum_hex] + requirement = 'The system shall generate a 3D hexagonal core mesh with heterogeneous and homogeneous assemblies stitched alongside drum structures' + type = 'CSVDiff' + input = 'core_flexible_assembly_stitching_with_drum_hex.i' + csvdiff = 'core_flexible_assembly_stitching_with_drum_hex_out.csv' + recover = false + mesh_mode = REPLICATED + [] + [core_drum_metadata_jsondiff] + requirement = 'The system shall output reactor-related metadata for a full 3D hexagonal core mesh with a drum assembly in mesh generation mode' + type = 'JSONDiff' + input = 'core_flexible_assembly_stitching_with_drum_hex.i' + jsondiff = 'core_flexible_assembly_stitching_with_drum_hex_out.json' + # Ignoring data that is only generated when the mesh is actually constructed, to compare with data-driven + ignored_regex_items = '.*/.*/.*_meta|flat_side_up|control_drum_angles|control_drum_positions|quad_center_block_id|pin_block_name_map|pin_region_id_map|position_file_name|peripheral_modifier_compatible|pattern_size|.*_trimmability|bypass_meshgen|interface_boundary_ids|interface_boundaries|flexible_assembly_stitching' + recover = false + allow_test_objects = true + mesh_mode = REPLICATED + [] + [core_drum_bypass_meshgen] + requirement = 'The system shall output reactor-related metadata for a full 3D hexagonal core mesh with a drum assembly in data driven mode' + type = 'JSONDiff' + input = 'core_flexible_assembly_stitching_with_drum_hex.i' + cli_args = "Mesh/test_rgmb/type=TestReactorGeometryMeshBuilderMeshGenerator + Mesh/test_rgmb/input=core + Mesh/data_driven_generator=test_rgmb + Postprocessors/inactive='area_reg1 area_reg2 area_reg3 area_reg4 area_reg5 + area_reg6 area_reg7 area_reg8 area_reg9'" + jsondiff = 'core_flexible_assembly_stitching_with_drum_hex_out.json' + allow_test_objects = true + recover = false + [] + [drum_depletion_id_pin] + requirement = 'The system shall generate pin-wise depletion IDs for a 3D hexagonal core mesh with a control drum' + type = 'CSVDiff' + input = 'core_with_drum_depletion_id.i' + cli_args = "Outputs/file_base=core_with_drum_depletion_id_pin_out" + csvdiff = 'core_with_drum_depletion_id_pin_out_region_volumes_0002.csv' + recover = false + mesh_mode = REPLICATED + [] + [drum_depletion_id_pin_type] + requirement = 'The system shall generate pin type-wise depletion IDs for a 3D hexagonal core mesh with a control drum' + type = 'CSVDiff' + input = 'core_with_drum_depletion_id.i' + cli_args = "Mesh/core/depletion_id_type=pin_type + Outputs/file_base=core_with_drum_depletion_id_pin_type_out" + csvdiff = 'core_with_drum_depletion_id_pin_type_out_region_volumes_0002.csv' + recover = false + mesh_mode = REPLICATED + [] []