Describing a pincell/lattice with rectangular instead of spherical fuel elements


Hi there,

Hope you all are doing well.

I am trying to design a pincell/lattice with rectangular elements (fuel rods) like box in box approach. where a box fuel pin is surrounded by clad, similarly its very next (all four adjacent) neighbour is a box water element surrounded by clad, somewhat like in the attachment.

I designed 3 rectangular prisms for each component, the water and fuel elements having identical dimensions while 1 outer box with larger dimension to encompass the four alternative boxes to create a pincell using the lattice approach. But I am having trouble in syntax for filling the inside and outside of these boxes as the geometry only shows the root universe being filled and not any other universes that I defined.

Can someone please point out where the syntax is wrong, and possibly share the link to any similar box geometry examples. With thanks.

Screenshot (158)
It is not considering anything other than the filled root universe. What is the error in filling or defining the box geometry?

# Fuel universe

fuel_box = openmc.model.rectangular_prism(width= 0.1, height=0.1)
clad_box = openmc.model.rectangular_prism(width= 0.2, height=0.2)

# cell
fuel_cell = openmc.Cell(name= 'fuel cell', region= fuel_box, fill= fuel_31)
clad_cell = openmc.Cell(name= 'clad cell', region= ~fuel_box & clad_box, fill= zircaloy)
water_out = openmc.Cell(name= 'water outside', region= ~clad_box, fill= water)

fuel_uni = openmc.Universe(cells= [fuel_cell, clad_cell, water_out])


# Water filled universe
water_box = openmc.model.rectangular_prism(width= 0.2, height=0.2)

#cell
water_filled = openmc.Cell(name= 'water filled cell', region= water_box, fill= water)
water_filled_out = openmc.Cell(name= 'water filled outside', region= ~water_box, fill= water)

water_uni = openmc.Universe(cells= [water_filled, water_filled_out])

Best
pranto

Thank you for the reply,
Can you please also tell me if I am to study the effect of altering the coolant channel width on keffective, I’ll be needing to a loop on the geometry applying a function on the width defined.
But I am not sure that doing, how will I get the results, because for a single thickness, openmc will show all those readings for keffective and everything but will it show that for all the thicknesses? or do I need to have another file be created to gather all the results? or it will actually run that many times successively, but then I won’t exactly be able to read all of them at once as the terminal has limited readability.
Can you please suggest me an approach or correct my approach if it is viable. Since doing this for multiple channel width would be quite a tedious task.

It sounds like you could put this in a loop to get the results for each coolant channel width. So, this would look something like:

widths = [...]
keffs = []
for width in widths:
    # change coolant channel width in model
    ...

    # Re-export XML files and run OpenMC
    geometry.export_to_xml()
    openmc.run()

    # get k-effective from statepoint file
    with openmc.StatePoint(filename) as sp:
        keffs.append(sp.k_combined)

    # optionally, move k-effective so that next run doesn't overwrite it
    ...
1 Like