- inputThe mesh we want to modify
C++ Type:MeshGeneratorName
Unit:(no unit assumed)
Controllable:No
Description:The mesh we want to modify
- source_extra_element_idThe extra element ID to be copied
C++ Type:std::string
Unit:(no unit assumed)
Controllable:No
Description:The extra element ID to be copied
- target_extra_element_idsThe target extra element IDs
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:The target extra element IDs
ExtraElementIDCopyGenerator
Copy an extra element ID to other extra element IDs.
Overview
The ExtraElementIDCopyGenerator
is used to copy an extra element ID to other extra element IDs. If the target extra element IDs do not exist in the input mesh, they will be added by this mesh generator before copying. The extra element ID name subdomain_id is reserved for the subdomain ID and can be used as the name of the source extra element ID, but not as the target extra element ID. The extra element ID name element_id is reserved for the element ID and can be used as the name of the source extra element ID, but not as the target extra element ID.
Input Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Set the enabled status of the MooseObject.
- save_with_nameKeep the mesh from this mesh generator in memory with the name specified
C++ Type:std::string
Unit:(no unit assumed)
Controllable:No
Description:Keep the mesh from this mesh generator in memory with the name specified
Advanced Parameters
- nemesisFalseWhether or not to output the mesh file in the nemesisformat (only if output = true)
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether or not to output the mesh file in the nemesisformat (only if output = true)
- outputFalseWhether or not to output the mesh file after generating the mesh
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether or not to output the mesh file after generating the mesh
- show_infoFalseWhether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Debugging Parameters
Input Files
(modules/reactor/test/tests/meshgenerators/extra_element_id_copy_generator/copy_elem_id_test.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1
extra_element_integers = test_id
subdomain_ids = '0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0
0 0 2 0 0 0 0 0 0 0
0 0 0 3 0 0 0 0 0 0
0 0 0 0 4 0 0 0 0 0
0 0 0 0 0 5 0 0 0 0
0 0 0 0 0 0 6 0 0 0
0 0 0 0 0 0 0 7 0 0
0 0 0 0 0 0 0 0 8 0
0 0 0 0 0 0 0 0 0 9'
[]
[subdomains]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
block_id = 1
top_right = '0.9 0.9 0'
integer_name = test_id
[]
[another_subdomains]
type = SubdomainBoundingBoxGenerator
input = subdomains
bottom_left = '0 0 0'
block_id = 2
top_right = '0.9 0.9 0'
location = OUTSIDE
integer_name = test_id
[]
[copy_test_id]
type = ExtraElementIDCopyGenerator
input = another_subdomains
source_extra_element_id = test_id
target_extra_element_ids = 'test_id1 test_id2'
[]
[copy_test_id1]
type = ExtraElementIDCopyGenerator
input = copy_test_id
source_extra_element_id = subdomain_id
target_extra_element_ids = 'test_id3'
[]
[copy_test_id2]
type = ExtraElementIDCopyGenerator
input = copy_test_id1
source_extra_element_id = element_id
target_extra_element_ids = 'test_id4'
[]
# element id could be renumbered with distributed mesh
# causing exodiff on test_id4 variable, thus we turn off
# this flag, normal calculations are fine with element IDs
# being renumbered.
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[AuxVariables]
[test_id]
family = MONOMIAL
order = CONSTANT
[]
[test_id1]
family = MONOMIAL
order = CONSTANT
[]
[test_id2]
family = MONOMIAL
order = CONSTANT
[]
[test_id3]
family = MONOMIAL
order = CONSTANT
[]
[test_id4]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[test_id]
type = ExtraElementIDAux
variable = test_id
extra_id_name = test_id
[]
[test_id1]
type = ExtraElementIDAux
variable = test_id1
extra_id_name = test_id1
[]
[test_id2]
type = ExtraElementIDAux
variable = test_id2
extra_id_name = test_id2
[]
[test_id3]
type = ExtraElementIDAux
variable = test_id3
extra_id_name = test_id3
[]
[test_id4]
type = ExtraElementIDAux
variable = test_id4
extra_id_name = test_id4
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(tutorials/tutorial04_meshing/app/test/tests/reactor_examples/rgmb_lfr/rgmb_lfr_assembly.i)
[Mesh]
################################# # This parameter allows us to execute the file but stop at this block so we can see intermediate output.
final_generator = abtr_mesh # User: Change this to 'pin1', 'assembly', or 'lfr_assy'
# Note: If `extrude = true` is not specified in PinMeshGenerator, a 2-D mesh is created. To visualize
# the 3-D PinMeshGenerator mesh, `extrude = true` needs to be moved from AssemblyMeshGenerator to
# PinMeshGenerator, as this parameter can be set to true only once in the input file. All subsequent
# lines after the PinMeshGenerator block also need to be commented out.
#################################
# step 1: lfr_pin
# step 2: lfr_assembly
# step 3: lfr_assembly mesh with `material_id` reporting IDs
### Step 0. Define global parameters for Reactor Geometry Mesh Builder workflow
# Note: This step does not produce any mesh
[rmp]
type = ReactorMeshParams
dim = 3 # Dimensionality of output mesh (2 or 3)
geom = "Hex" # Geometry type (Hex or Square)
assembly_pitch = 16.4165 # Size of assembly flat-to-flat pitch
axial_regions = '10.07 30.79 6.56 85.85 1.52
106.07 1.51 12.13 5.05 93.87' # Size of each axial zone
axial_mesh_intervals = '1 3 1 9 1 20 1 2 1 9' # Number of subintervals per axial zone
top_boundary_id = 201 # Boundary id assigned to top surface
bottom_boundary_id = 202 # Boundary id assigned to bottom surface
radial_boundary_id = 200 # Boundary id assigned to radial surface
[]
### Step 1. Define heterogeneous pin regions
# Note: There are 7 pin types, each with varying region ID distribution
[pin1]
type = PinMeshGenerator
reactor_params = rmp # Name of ReactorMeshParams object
pin_type = 1 # Unique identifier for each pin type
pitch = 1.3425 # Pin pitch
num_sectors = 2 # Number of azimuthal sectors per quadrant
mesh_intervals = '1 3 1 1 1' # Number of mesh intervals per radial region
# (4 ring regions followed by background region)
ring_radii = '0.2020 0.4319 0.4495 0.5404' # Radii of each ring region
region_ids='1 1 1 1 1;
2 2 2 2 2;
3 3 3 3 3;
4 4 4 5 6;
8 8 8 9 10;
20 19 20 13 21;
24 24 24 25 26;
28 28 28 29 30;
32 32 32 32 32;
33 33 33 33 33' # Region ID's, assigned radially outwards (4 rings + background) then
# axially from bottom to top
quad_center_elements = false # Whether to discretize central ring region into quad or tri elements
[]
[pin2]
type = PinMeshGenerator
reactor_params = rmp
pin_type = 2
pitch = 1.3425
num_sectors = 2
mesh_intervals = '1 3 1 1 1'
ring_radii = '0.2020 0.4319 0.4495 0.5404'
region_ids='1 1 1 1 1;
2 2 2 2 2;
3 3 3 3 3;
4 4 4 5 6;
8 8 8 9 10;
20 18 20 13 21;
24 24 24 25 26;
28 28 28 29 30;
32 32 32 32 32;
33 33 33 33 33'
quad_center_elements = false
[]
[pin3]
type = PinMeshGenerator
reactor_params = rmp
pin_type = 3
pitch = 1.3425
num_sectors = 2
mesh_intervals = '1 3 1 1 1'
ring_radii = '0.2020 0.4319 0.4495 0.5404'
region_ids='1 1 1 1 1;
2 2 2 2 2;
3 3 3 3 3;
4 4 4 5 6;
8 8 8 9 10;
20 17 20 13 21;
24 24 24 25 26;
28 28 28 29 30;
32 32 32 32 32;
33 33 33 33 33'
quad_center_elements = false
[]
[pin4]
type = PinMeshGenerator
reactor_params = rmp
pin_type = 4
pitch = 1.3425
num_sectors = 2
mesh_intervals = '1 3 1 1 1'
ring_radii = '0.2020 0.4319 0.4495 0.5404'
region_ids='1 1 1 1 1;
2 2 2 2 2;
3 3 3 3 3;
4 4 4 5 6;
8 8 8 9 10;
20 16 20 13 21;
24 24 24 25 26;
28 28 28 29 30;
32 32 32 32 32;
33 33 33 33 33'
quad_center_elements = false
[]
[pin5]
type = PinMeshGenerator
reactor_params = rmp
pin_type = 5
pitch = 1.3425
num_sectors = 2
mesh_intervals = '1 3 1 1 1'
ring_radii = '0.2020 0.4319 0.4495 0.5404'
region_ids='1 1 1 1 1;
2 2 2 2 2;
3 3 3 3 3;
4 4 4 5 6;
8 8 8 9 10;
20 15 20 13 21;
24 24 24 25 26;
28 28 28 29 30;
32 32 32 32 32;
33 33 33 33 33'
quad_center_elements = false
[]
[pin6]
type = PinMeshGenerator
reactor_params = rmp
pin_type = 6
pitch = 1.3425
num_sectors = 2
mesh_intervals = '1 3 1 1 1'
ring_radii = '0.2020 0.4319 0.4495 0.5404'
region_ids='1 1 1 1 1;
2 2 2 2 2;
3 3 3 3 3;
4 4 4 5 6;
8 8 8 9 10;
20 14 20 13 21;
24 24 24 25 26;
28 28 28 29 30;
32 32 32 32 32;
33 33 33 33 33'
quad_center_elements = false
[]
[pin7]
type = PinMeshGenerator
reactor_params = rmp
pin_type = 7
pitch = 1.3425
num_sectors = 2
mesh_intervals = '1 3 1 1 1'
ring_radii = '0.2020 0.4319 0.4495 0.5404'
region_ids='1 1 1 1 1;
2 2 2 2 2;
3 3 3 3 3;
4 4 4 5 6;
8 8 8 9 10;
20 12 20 13 21;
24 24 24 25 26;
28 28 28 29 30;
32 32 32 32 32;
33 33 33 33 33'
quad_center_elements = false
[]
### Step 2. Pattern heterogeneous pins into hexagonal assembly
[assembly]
type = AssemblyMeshGenerator
inputs = 'pin1 pin2 pin3 pin4 pin5 pin6 pin7' # Name of constituent pins
pattern = ' 0 0 0 0 0 0 0;
0 1 1 1 1 1 1 0;
0 1 2 2 2 2 2 1 0;
0 1 2 3 3 3 3 2 1 0;
0 1 2 3 4 4 4 3 2 1 0;
0 1 2 3 4 5 5 4 3 2 1 0;
0 1 2 3 4 5 6 5 4 3 2 1 0;
0 1 2 3 4 5 5 4 3 2 1 0;
0 1 2 3 4 4 4 3 2 1 0;
0 1 2 3 3 3 3 2 1 0;
0 1 2 2 2 2 2 1 0;
0 1 1 1 1 1 1 0;
0 0 0 0 0 0 0' # Lattice pattern of constituent pins
extrude = true # Extrude assembly to 3-D
assembly_type = 1 # Unique identifier for each assembly type
background_region_id = '1 2 3 6 10 21 26 30 32 33' # Region ID's of background region, defined axially from bottom to top
background_intervals = '1' # Number of mesh intervals per background region
duct_halfpitch = '7.6712 8.0245' # Half pitch of each duct region
duct_intervals = '1 1' # Number of mesh intervals per duct region
duct_region_ids = '1 1; 2 2; 3 3; 7 6;
11 10; 22 23; 27 26; 31 30;
32 32; 33 33' # Region ID's of duct region, assigned radially outwards then axially from bottom to top
[]
### Step 3. Copy "region_id" reporting IDs with name "material_id", for use with Griffin reactor physics code
[lfr_assy]
type = ExtraElementIDCopyGenerator
input = assembly
source_extra_element_id = region_id
target_extra_element_ids = 'material_id'
[]
[]
(tutorials/tutorial04_meshing/app/test/tests/reactor_examples/rgmb_abtr/rgmb_abtr.i)
[Mesh]
################################# # This parameter allows us to execute the file but stop at this block so we can see intermediate output.
final_generator = abtr_mesh # User: Change this to 'control', 'core', or 'abtr_mesh'
# Note: If `extrude = true` is not specified in PinMeshGenerator, a 2-D mesh is created. To visualize
# the 3-D PinMeshGenerator mesh, `extrude = true` needs to be moved from CoreMeshGenerator to
# PinMeshGenerator, as this parameter can be set to true only once in the input file. All subsequent
# lines after the PinMeshGenerator block also need to be commented out.
#################################
# step 1: control
# step 2: core
# step 3: abtr_mesh
### Step 0. Define global parameters for Reactor Geometry Mesh Builder workflow
# Note: This step does not produce any mesh
[rmp]
type = ReactorMeshParams
dim = 3 # Dimensionality of output mesh (2 or 3)
geom = "Hex" # Geometry type (Hex or Square)
assembly_pitch = 14.685 # Size of assembly flat-to-flat pitch
axial_regions = '50.24 42.32 17.98 16.88
16.88 16.88 16.89 16.88
19.76 65.66 31.14 30.15' # Size of each axial zone
axial_mesh_intervals = '3 2 1 1 1 1 1 1 1 4 2 2' # Number of subintervals per axial zone
top_boundary_id = 201 # Boundary id assigned to top surface
bottom_boundary_id = 202 # Boundary id assigned to bottom surface
radial_boundary_id = 203 # Boundary id assigned to radial surface
[]
### Step 1. Define homogenized assembly regions
[control]
type = PinMeshGenerator
reactor_params = rmp # Name of ReactorMeshParams object
pin_type = 1 # Unique identifier for each homogenized assembly type
pitch = 14.685 # Assembly pitch
region_ids= '12; 9; 4; 4;
4; 4; 4; 5;
6; 6; 7; 15' # Region ID's, assigned radially outwards then axially from bottom to top
quad_center_elements = true # Discretize homogenized assemblies into 2 quadrilaterals
homogenized = true # Use SimpleHexagonGenerator to define homogenized assemblies
use_as_assembly = true # Treat mesh as assembly for direct stitching into CoreMeshGenerator
[]
[inner_core]
type = PinMeshGenerator
reactor_params = rmp
pin_type = 2
pitch = 14.685
region_ids= '12; 9; 9; 1; 1; 1; 1; 1; 13; 14; 14; 15'
quad_center_elements = true
homogenized = true
use_as_assembly = true
[]
[test_fuel]
type = PinMeshGenerator
reactor_params = rmp
pin_type = 3
pitch = 14.685
region_ids= '12; 9; 9; 2; 2; 2; 2; 2; 13; 14; 14; 15'
quad_center_elements = true
homogenized = true
use_as_assembly = true
[]
[inner_reflector]
type = PinMeshGenerator
reactor_params = rmp
pin_type = 4
pitch = 14.685
region_ids= '12; 8; 8; 8; 8; 8; 8; 8; 8; 8; 8; 15'
quad_center_elements = true
homogenized = true
use_as_assembly = true
[]
[outer_core]
type = PinMeshGenerator
reactor_params = rmp
pin_type = 5
pitch = 14.685
region_ids= '12; 9; 9; 3; 3; 3; 3; 3; 13; 14; 14; 15'
quad_center_elements = true
homogenized = true
use_as_assembly = true
[]
[outer_reflector]
type = PinMeshGenerator
reactor_params = rmp
pin_type = 6
pitch = 14.685
region_ids= '12; 10; 10; 10; 10; 10; 10; 10; 10; 10; 10; 15'
quad_center_elements = true
homogenized = true
use_as_assembly = true
[]
[shield]
type = PinMeshGenerator
reactor_params = rmp
pin_type = 7
pitch = 14.685
region_ids= '11; 11; 11; 11; 11; 11; 11; 11; 11; 11; 11; 11'
quad_center_elements = true
homogenized = true
use_as_assembly = true
[]
### Step 2. Pattern homogenized assemblies into hexagonal grid with dummy assemblies deleted
[core]
type = CoreMeshGenerator
inputs = 'control inner_core test_fuel inner_reflector
outer_core outer_reflector shield dummy' # Name of constituent assemblies
dummy_assembly_name = dummy # Name of dummy assembly, does not need to be explicitly defined
pattern = ' 7 7 6 6 6 6 6 6 7 7;
7 6 6 5 5 5 5 5 6 6 7;
6 6 5 5 3 3 3 3 5 5 6 6;
6 5 5 3 3 3 3 3 3 3 5 5 6;
6 5 3 3 3 3 4 4 3 3 3 3 5 6;
6 5 3 3 3 4 4 0 4 4 3 3 3 5 6;
6 5 3 3 4 4 2 1 1 3 4 4 3 3 5 6;
6 5 3 3 4 0 1 1 2 1 1 0 4 3 3 5 6;
7 6 5 3 3 4 1 0 1 1 0 1 4 3 3 5 6 7;
7 6 5 3 3 4 3 1 1 0 1 1 2 4 3 3 5 6 7;
7 6 5 3 3 4 1 2 1 1 2 1 4 3 3 5 6 7;
6 5 3 3 4 0 1 1 0 1 1 0 4 3 3 5 6;
6 5 3 3 4 4 2 1 1 3 4 4 3 3 5 6;
6 5 3 3 3 4 4 0 4 4 3 3 3 5 6;
6 5 3 3 3 3 4 4 3 3 3 3 5 6;
6 5 5 3 3 3 3 3 3 3 5 5 6;
6 6 5 5 3 3 3 3 5 5 6 6;
7 6 6 5 5 5 5 5 6 6 7;
7 7 6 6 6 6 6 6 7 7' # Lattice pattern of constituent assemblies
extrude = true # Extrude core to 3-D
[]
### Step 3. Copy "region_id" reporting IDs with name "material_id", for use with Griffin reactor physics code
[abtr_mesh]
type = ExtraElementIDCopyGenerator
input = core
source_extra_element_id = region_id
target_extra_element_ids = 'material_id'
[]
[]