Help with creating beam tube inside assembly geometry

Hello everyone, I am currently working on creating an LFR core model (based on Westinghouse’s DLFR) for my bachelor’s thesis and I need little help with creating assembly geometry. I’ve managed to create an assembly fully filled with pins, but what I actually need is an assembly with a central beam tube (images attached), which could be used for hosting a finger absorption rod or instrumentation. In my case, there is not going to be any equipment inside the beam tube, so it’s just filled with lead.

I tried different ways to create this type of geometry but I can’t figure out how to do it, as it is my first project using OpenMC or any Monte Carlo code. Below is the code that I created. I would be very grateful if someone could point me to create this type of geometry.

Best,
Rafal

import matplotlib
import openmc

#-----------------------------------------------------------#
# 1) Materials definitions
#-----------------------------------------------------------#

# UO2 fuel at 17.5% wt enrichment
uo2_inner = openmc.Material(1, name='UO2_17.5')
uo2_inner.set_density('g/cm3', 10.97)
uo2_inner.add_nuclide('U235', 0.1526, 'wo')
uo2_inner.add_nuclide('U238', 0.7286, 'wo')
uo2_inner.add_nuclide('O16', 0.1188, 'wo')

# Helium for gap
helium = openmc.Material(3, name='Helium')
helium.set_density('g/cm3', 0.178)
helium.add_element('He', 1)

# Cladding
clad = openmc.Material(4, name='Cladding')
clad.set_density('g/cm3', 6.55)
clad.add_element('Zr', 1.0)

# Lead
lead = openmc.Material(5, name='Lead')
lead.set_density('g/cm3', 10.68)
lead.add_nuclide('Pb208', 0.524, 'wo')
lead.add_nuclide('Pb207', 0.221, 'wo')
lead.add_nuclide('Pb206', 0.241, 'wo')
lead.add_nuclide('Pb204', 0.014, 'wo')

materials = openmc.Materials([uo2_inner, helium, clad, lead])
materials.export_to_xml()

#-----------------------------------------------------------#
# 2) Geometry definitions - inner assembly
#-----------------------------------------------------------#

# Boundries and outer universe
all_lead_out=openmc.Cell(cell_id=200, fill=lead)

# Top & bottom of the assembly 
core_height_z0 = openmc.ZPlane(surface_id=300, z0=-35, boundary_type='reflective')
core_height_z1 = openmc.ZPlane(surface_id=301, z0=35, boundary_type='reflective')
inner_assembly = openmc.model.hexagonal_prism(edge_length=17.09, orientation='x', boundary_type='transmission')

assembly_cell = openmc.Cell()
assembly_cell.region = inner_assembly & -core_height_z1 & +core_height_z0

# Create universes
all_lead_out_u=openmc.Universe(cells=[all_lead_out])
u_root = openmc.Universe()

# assembly cylinders
fuel_ir1 = openmc.ZCylinder(surface_id=410, r=0.3/2) 
fuel_or1 = openmc.ZCylinder(surface_id=411, r=1.0/2)
clad_ir1 = openmc.ZCylinder(surface_id=412, r=1.03/2)
clad_or1 = openmc.ZCylinder(surface_id=413, r=1.16/2)

# assembly regions
central_hole_region1 = -fuel_ir1 & -core_height_z1 & +core_height_z0
fuel_region1 = +fuel_ir1 & -fuel_or1 & -core_height_z1 & +core_height_z0
gap_region1 = +fuel_or1 & -clad_ir1 & -core_height_z1 & +core_height_z0
clad_region1 = +clad_ir1 & -clad_or1 & -core_height_z1 & +core_height_z0
lead_region1 = +clad_or1 & -core_height_z1 & +core_height_z0 

# assembly cells
central_hole_cell1 = openmc.Cell(cell_id=510, fill=helium, region=central_hole_region1)
fuel_cell1 = openmc.Cell(cell_id=511, fill=uo2_inner, region=fuel_region1)
gap_cell1 = openmc.Cell(cell_id=512, fill=helium, region=gap_region1)
clad_cell1 = openmc.Cell(cell_id=513, fill=clad, region=clad_region1)
lead_cell1 = openmc.Cell(cell_id=514, fill=lead, region=lead_region1)

u_inner = openmc.Universe(universe_id=3, cells=[central_hole_cell1, fuel_cell1, gap_cell1, clad_cell1, lead_cell1])

# Creating the hexagonal lattice
lat = openmc.HexLattice(name='assembly')
lat.center = (0., 0.)
lat.pitch = (1.36,)
lat.outer = all_lead_out_u

ring12 = [u_inner]*72
ring11 = [u_inner]*66
ring10 = [u_inner]*60
ring9 = [u_inner]*54
ring8 = [u_inner]*48
ring7 = [u_inner]*42
ring6 = [u_inner]*36
ring5 = [u_inner]*30
ring4 = [u_inner]*24
ring3 = [u_inner]*18
ring2 = [u_inner]*12
ring1 = [u_inner]*6
ring0 = [u_inner]*1
lat.universes = [ring12, ring11, ring10, ring9, ring8, ring7, ring6, ring5, ring4, ring3, ring2, ring1, ring0]
lat.orientation = 'x'
assembly_cell.fill = lat

out_assembly = openmc.Cell(fill=lead, region=~inner_assembly & -core_height_z1 & +core_height_z0)
#full_assembly = openmc.Universe(cells=[assembly_cell, out_assembly])

#-----------------------------------------------------------#
# 3) Geometry definitions - beam tube
#-----------------------------------------------------------#

beam_tube_prism = openmc.model.hexagonal_prism(edge_length=4.677, orientation='x', boundary_type='transmission')

beam_tube = openmc.ZCylinder(surface_id=414, r=7.6/2)
beam_tube_region1 = -beam_tube & -core_height_z1 & +core_height_z0 
beam_tube_prism_region1 = beam_tube_prism & -core_height_z1 & +core_height_z0 
beam_tube_cell1 = openmc.Cell(cell_id=515, fill=lead, region=beam_tube_region1)
beam_tube_prism_cell1 = openmc.Cell(cell_id=516, fill=clad, region=beam_tube_prism_region1)
out_beam_tube = openmc.Cell(fill=lead, region=~beam_tube_prism  & -core_height_z1 & +core_height_z0)

beam_tube_u = openmc.Universe(cells=[beam_tube_cell1, beam_tube_prism_cell1, out_beam_tube])

u_root.add_cells([assembly_cell, out_assembly, beam_tube_cell1,beam_tube_prism_cell1, out_beam_tube])
geom = openmc.Geometry(u_root)
geom.export_to_xml()

plot2 = openmc.Plot()
plot2.filename = 'materials-xy'
plot2.basis = 'xy'
plot2.origin = [0, 0, 0]
plot2.width = [50,50]
plot2.pixels = [1000,1000]
plot2.color_by = 'material'

plots = openmc.Plots(plots=[plot2, ])
plots.export_to_xml()
openmc.plot_geometry(( plot2))

# OpenMC simulation parameters
batches = 20
inactive = 10
particles = 1000

settings = openmc.Settings()
settings.batches = batches
settings.inactive = inactive
settings.particles = particles

uniform_dist = openmc.stats.Box([-10,-10,-10],[10,10,10],only_fissionable=True)
settings.source = openmc.source.Source(space=uniform_dist)
settings.export_to_xml()

openmc.run()

You need to ensure that the cell that is filled with the lattice has the inner region for the beam tube “cut out” of it in the region definition. That is, I think you’ll want to have:

assembly_cell.region = inner_assembly & -core_height_z1 & +core_height_z0 & ~beam_tube_prism

This will require that you move the definition of beam_tube_prism further up so that is not undefined when used in assembly_cell.region. Hope this helps!

1 Like

Hello, it worked just as intended. Thank you!

1 Like