Hexagonale forne

Hello everyone,

I am currently working on a reactor model and I need help to modify the reactor vessel geometry. The vessel is currently defined with a hexagonal shape, but I would like to change it to a cylindrical .

Here are the adjustments I would like to make:

Change from hexagonal to cylindrical geometry to better represent the reactor vessel shape.
i want to changer the coolant forme hexagonale to cylindrical

Hexagonal lattice with circular coolant

coolant_cell = openmc.Cell(fill=sodium)

Créer une surface cylindrique pour le cercle (rayon 6.3cm)

coolant_cylinder = -openmc.ZCylinder(r=6.3)

Définir la région comme l’intérieur du cylindre

coolant_boundary = coolant_cylinder

Appliquer cette géométrie à la cellule

coolant_cell.region = coolant_boundary

Créer l’univers de la cellule de refroidissement

coolant_u = openmc.Universe(cells=(coolant_cell,))
fastcore_lat = openmc.HexLattice(name=‘fast core’)
fastcore_lat.center = (0., 0.)
fastcore_lat.pitch = (6.1,)
fastcore_lat.outer = coolant_u

Définition des couches du réseau hexagonal

fc15 = [assembly_univers]*21 + [shielding]*21 + [shielding]*21 + [assembly_univers]*21
fc14 = [assembly_univers]*78
fc13 = [shielding]*72
fc12 = [shielding]*66
fc11 = [shielding]*60
fc10 = [assembly_univers]*3 + [stainless_steel12]*5 + [assembly_univers]*4 + [stainless_steel12]*5 + [assembly_univers]*4 + [stainless_steel12]*5 + [assembly_univers]*4 + [stainless_steel12]*5 + [assembly_univers]*4 + [stainless_steel12]*5 + [assembly_univers]*4 + [assembly_univers]*2 + [assembly_univers]*4
fc9 = [assembly_univers]*2 + [stainless_steel12]*1 + [assembly_univers]*2 + [stainless_steel12]*1 + [assembly_univers]*2 + [stainless_steel12]*1 + [assembly_univers]*2 + [stainless_steel12]*1 + [assembly_univers]*2 + [stainless_steel12]*1 + [assembly_univers]*2 + [stainless_steel12]*1 + [assembly_univers]*2 + [stainless_steel12]*1 + [assembly_univers]*2 + [stainless_steel12]*1 + [assembly_univers]*2 + [stainless_steel12]*1 + [assembly_univers]*2 + [stainless_steel12]*1 + [assembly_univers]*2 + [stainless_steel12]*1 + [assembly_univers]*2 + [stainless_steel12]*1 + [assembly_univers]*2 + [stainless_steel12]*1 + [assembly_univers]*2 + [stainless_steel12]*1 + [assembly_univers]*2 + [stainless_steel12]*1 + [assembly_univers]*2 + [stainless_steel12]*1
fc8 = [stainless_steel12]*42
fc7 = [stainless_steel12]*15 + [controle] + [stainless_steel12]*19 + [controle]
fc6 = [assembly_universe]*5 + [stainless_steel12] + [assembly_universe]*9 + [stainless_steel12] + [assembly_universe]*9 + [stainless_steel12] + [assembly_universe]*4
fc5 = [controle] + [assembly_universe]*5 + [assembly_universe]*5 + [stainless_steel12] + [assembly_universe] + [controle] + [assembly_universe]*7 + [stainless_steel12] + [assembly_universe]*2
fc4 = [assembly_universe]*18
fc3 = [assembly_universe]*3 + [controle] + [assembly_universe]*3 + [controle] + [assembly_universe]*3 + [controle]
fc2 = [assembly_universe]*6
fc1 = [controle]*1

fastcore_lat.universes = [fc15, fc14, fc13, fc12, fc11, fc10, fc9, fc8, fc7, fc6, fc5, fc4, fc3, fc2, fc1]

fastcore_boundary = openmc.model.hexagonal_prism(edge_length=300, boundary_type=‘vacuum’, orientation=‘y’)
fastcore = openmc.Cell(fill=fastcore_lat, region=fastcore_boundary)
fastcore_out = openmc.Cell(region=~fastcore_boundary)
fastcore_u = openmc.Universe(cells=[fastcore, fastcore_out])

Visualisation

img1 = fastcore_u.plot(origin=(0,0,0), pixels=(3000,3000), width=(700.,700.), color_by=‘material’, colors=mat_colors)
img2 = fastcore_u.plot(origin=(0,0,0), pixels=(1000,1000), width=(550.,600.), color_by=‘material’, colors=mat_colors, basis=‘xz’)

Export de la géométrie

model.geometry = openmc.Geometry(root=fastcore_u)
geometry.export_to_xml()

Hi Houssem, welcome to the openmc community.
Just to make sure, do you want to use your coolant material as an outer material filling your hexagonal lattice? So instead of creating infinite cylinder cell filled with coolant, maybe you just need to create a cell without boundaries.

fastcore_lat.outer = coolant_u
coolant_u = openmc.Universe(cells=openmc.Cell(fill=sodium))

That will automatically filled the outer lattice region later.

Regarding filling some cylidrical region with the hex lattice you made, I think its pretty straightforward,

fastcore = openmc.Cell(fill=fastcore_lat, region=some_cylindrical_boundary_region)
some_cylindrical_boundary_region= -cylinder_surf & -topZ_surface & +bottomZ_surf

But, I also noticed that your current input script might had some issue, since openmc hex prism surface for openmc version 0.14.0 has been updated to use a +/- for sensing the region outside/inside hex prism

So, you might want to add - in your fastcore.region

fastcore = openmc.Cell(fill=fastcore_lat, region= -fastcore_boundary)
1 Like