Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RGMB flexible patterning not working properly #29826

Open
shikhar413 opened this issue Feb 6, 2025 · 0 comments
Open

RGMB flexible patterning not working properly #29826

shikhar413 opened this issue Feb 6, 2025 · 0 comments
Labels
P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations.

Comments

@shikhar413
Copy link
Contributor

Bug Description

A user reported that RGMB was running into an error when flexible_assembly_patterning was used and AssemblyMeshGenerator was the final generator in the input file

Steps to Reproduce

The following input file, based on the ABTR het mesh on VTB, errors out because QUAD and TRI elements share the same block ID

fuel_pin_pitch = 0.8966
fuel_clad_r_i = 0.3236
fuel_clad_r_o = 0.3857
control_pin_pitch = 2.458
control_clad_r_i =   1.0977
control_clad_r_o = 1.1693
control_duct_pitch_inner = 11.7193
control_duct_pitch_outer =  12.5125
duct_pitch_inner = 15.0191
duct_pitch_outer = 15.8123
assembly_pitch = 16.2471

z_active_core_lower = 125.16
z_active_core_upper = 210.98
z_sodium_gp_upper = 231.04
z_gp_upper = 332.05

dz_active_core_lower = '${fparse z_active_core_lower - 0}'
dz_active_core_upper = '${fparse z_active_core_upper - z_active_core_lower}'
dz_sodium_gp_upper = '${fparse z_sodium_gp_upper - z_active_core_upper}'
dz_gp_upper = '${fparse z_gp_upper - z_sodium_gp_upper}'

max_axial_mesh_size = 8
naxial_active_core_lower = '${fparse ceil(dz_active_core_lower / max_axial_mesh_size)}'
naxial_active_core_upper = '${fparse ceil(dz_active_core_upper / max_axial_mesh_size)}'
naxial_sodium_gp_upper = '${fparse ceil(dz_sodium_gp_upper / max_axial_mesh_size)}'
naxial_gp_upper = '${fparse ceil(dz_gp_upper / max_axial_mesh_size)}'

# ==============================================================================
# Material IDs
# ==============================================================================
mid_fuel_1 = 1
mid_fuel_2 = 2
mid_fuel_3 = 3
mid_b4c = 4
mid_ht9 = 5
mid_sodium = 6
mid_rad_refl = 7
mid_rad_shld = 8
mid_lower_refl = 9
mid_upper_na_plen = 10
mid_upper_gas_plen = 11
mid_control_empty = 12

# ==============================================================================
# Mesh
# ==============================================================================
[Mesh]
  final_generator = fuel_assembly_1 #fuel_pin_1
  # Define global reactor mesh parameters
  [rmp]
    type = ReactorMeshParams
    dim = 3
    geom = "Hex"
    assembly_pitch = ${assembly_pitch}
    axial_regions = '${dz_active_core_lower} ${dz_active_core_upper} ${dz_sodium_gp_upper} ${dz_gp_upper}'
    axial_mesh_intervals = '${naxial_active_core_lower} ${naxial_active_core_upper}
                            ${naxial_sodium_gp_upper} ${naxial_gp_upper}'
    top_boundary_id = 201
    bottom_boundary_id = 202
    radial_boundary_id = 203
    flexible_assembly_stitching = true
  []
  # Define constituent pins of fuel assemblies
  [fuel_pin_1]
    type = PinMeshGenerator
    reactor_params = rmp
    pin_type = 1
    pitch = ${fuel_pin_pitch}
    num_sectors = 2
    ring_radii = '${fuel_clad_r_i} ${fuel_clad_r_o}'
    mesh_intervals = '1 1 1' # Fuel, cladding, background
    region_ids = '${mid_lower_refl}     ${mid_lower_refl}     ${mid_lower_refl};
                  ${mid_fuel_1}         ${mid_ht9}            ${mid_sodium};
                  ${mid_upper_na_plen}  ${mid_upper_na_plen}  ${mid_upper_na_plen};
                  ${mid_upper_gas_plen} ${mid_upper_gas_plen} ${mid_upper_gas_plen}' # Fuel, cladding, background
    quad_center_elements = true
  []
  # Define fuel assemblies
  [fuel_assembly_1]
    type = AssemblyMeshGenerator
    assembly_type = 1
    background_intervals = 2
    background_region_id = '${mid_lower_refl} ${mid_sodium} ${mid_upper_na_plen} ${mid_upper_gas_plen}'
    duct_halfpitch = '${fparse duct_pitch_inner / 2} ${fparse duct_pitch_outer / 2}'
    duct_intervals = '1 1'
    duct_region_ids = ' ${mid_lower_refl}     ${mid_lower_refl};
                        ${mid_ht9}            ${mid_sodium};
                        ${mid_upper_na_plen}  ${mid_upper_na_plen};
                        ${mid_upper_gas_plen} ${mid_upper_gas_plen}'
    inputs = 'fuel_pin_1'
   pattern =  '0 0 0 0 0 0 0 0 0 0;
              0 0 0 0 0 0 0 0 0 0 0;
             0 0 0 0 0 0 0 0 0 0 0 0;
            0 0 0 0 0 0 0 0 0 0 0 0 0;
           0 0 0 0 0 0 0 0 0 0 0 0 0 0;
          0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
        0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
       0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
       0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
        0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
          0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
           0 0 0 0 0 0 0 0 0 0 0 0 0 0;
            0 0 0 0 0 0 0 0 0 0 0 0 0;
             0 0 0 0 0 0 0 0 0 0 0 0;
              0 0 0 0 0 0 0 0 0 0 0;
               0 0 0 0 0 0 0 0 0 0'
  []
[]

Impact

Code is erroring out unexpectedly

[Optional] Diagnostics

No response

@shikhar413 shikhar413 added P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations. labels Feb 6, 2025
shikhar413 added a commit to shikhar413/moose that referenced this issue Feb 6, 2025
shikhar413 added a commit to shikhar413/moose that referenced this issue Feb 7, 2025
shikhar413 added a commit to shikhar413/moose that referenced this issue Feb 7, 2025
shikhar413 added a commit to shikhar413/moose that referenced this issue Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations.
Projects
None yet
Development

No branches or pull requests

1 participant