Skip to content

Commit

Permalink
Bug fix for using flexible assembly patterning when AssemblyMeshGener…
Browse files Browse the repository at this point in the history
…ator is the final generator, refs idaholab#29826
  • Loading branch information
shikhar413 committed Feb 7, 2025
1 parent e5db198 commit a7db00e
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/reactor/src/meshgenerators/AssemblyMeshGenerator.C
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,8 @@ AssemblyMeshGenerator::generate()
elem_block_name += "_" + _background_block_name[z_id];
else if (!is_background_region && _has_duct_block_names)
elem_block_name += "_" + _duct_block_names[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);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
[Mesh]
[rmp]
type = ReactorMeshParams
dim = 2
geom = "Hex"
assembly_pitch = 7.10315
flexible_assembly_stitching = true
region_id_as_block_name = true
[]

[pin1]
type = PinMeshGenerator
reactor_params = rmp
pin_type = 1
pitch = 1.42063
num_sectors = 2
ring_radii = '0.2'
duct_halfpitch = '0.68'
mesh_intervals = '1 1 1'
quad_center_elements = true
region_ids='1 2 5'
[]

[pin2]
type = PinMeshGenerator
reactor_params = rmp
pin_type = 2
pitch = 1.42063
num_sectors = 2
mesh_intervals = '2'
region_ids='3'
quad_center_elements = true
[]

[amg]
type = AssemblyMeshGenerator
assembly_type = 1
inputs = 'pin1 pin2'
pattern = '1 1;
1 0 1;
1 1'
background_intervals = 1
background_region_id = '6'
duct_halfpitch = '3.5'
duct_region_ids = '7'
duct_intervals = '1'
[]
[]

[Problem]
solve = false
[]

[Executioner]
type = Steady
[]

[Postprocessors]
[area_reg1]
type = VolumePostprocessor
block = "RGMB_ASSEMBLY1_REG1"
[]
[area_reg2]
type = VolumePostprocessor
block = "RGMB_ASSEMBLY1_REG2"
[]
[area_reg3]
type = VolumePostprocessor
block = "RGMB_ASSEMBLY1_REG3"
[]
[area_reg5]
type = VolumePostprocessor
block = "RGMB_ASSEMBLY1_REG5"
[]
[area_reg6]
type = VolumePostprocessor
block = "RGMB_ASSEMBLY1_REG6"
[]
[area_reg7]
type = VolumePostprocessor
block = "RGMB_ASSEMBLY1_REG7_TRI"
[]
[]

[Outputs]
csv = true
execute_on = 'FINAL'
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
time,area_reg1,area_reg2,area_reg3,area_reg5,area_reg6,area_reg7
2,0.12566370614359,1.4761368806961,10.486820763413,0.14600287372918,30.200620561455,1.2598417287844
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@
exodiff = 'assembly_ductIDs_in.e'
recover = false
[]
[hex_flexible_stitching]
requirement = 'The system shall generate a 2D hexagonal assembly mesh with the outermost duct layer removed and re-meshed with FlexiblePatternGenerator'
type = 'CSVDiff'
input = 'assembly_hex_flexible.i'
csvdiff = 'assembly_hex_flexible_out.csv'
recover = false
mesh_mode = REPLICATED
[]
[hex_metadata_transfer]
requirement = 'The system shall generate a 2D hexagonal assembly mesh that transfers metadata correctly across RGMB mesh generators'
type = 'Exodiff'
Expand Down

0 comments on commit a7db00e

Please sign in to comment.