Piercing x-cylinder into multiple z-cylinder unto a point in x-axis, not all the way through.

Hello, Dr. I believe I need to clear my query a little more. Say, I have 2 z-cylinder surfaces. the first one radius is 1cm and the second one radius is 1.5cm. Also, the height of the cylinders is 10cm. So, I code them in python as.

zp1=openmc.ZPlane(surface_id=4, z0=5)
zp2=openmc.ZPlane(surface_id=5, z0=-5)
zc1=openmc.ZCylinder(surface_id=6, R=1)
zc2=openmc.ZCylinder(surface_id=7, R=1.5)

Now, I have one x-cylinder which radius is 0.3cm and length is 1.8cm. I wanted to put this x-cylinder inside z-cylinders from 0.271 to 2.071 in the x-axis. so I code them as

xp1=openmc.XPlane(surface_id=1, x0=2.071)
xp2=openmc.XPlane(surface_id=2, x0=0.271)
xc1=openmc.XCylinder(surface_id=3, R=0.3)

Now, I do the rest like cell initiation, material register and initiate universe. the first z-cylinder is “region1” and has the material “SS304”, the second z-cylinder is “region2” and has material “graphite”. The x-cylinder is “region3” and has material “water”. The rest of the code is.

region1 = openmc.Cell(cell_id=1, name=‘cell 3’)
region2 = openmc.Cell(cell_id=2, name=‘cell 2’)
region3 = openmc.Cell(cell_id=3, name=‘cell 3’)

region1.region=-zp1&+zp2&-zc1&+xc1
region2.region=-zp1&+zp2&+zc1&-zc2&+xc1
region3.region=-xc1&-xp1&+xp2

root = openmc.Universe(universe_id=0, name=‘root universe’)

Register Materials with Cells

region1.fill = SS304
region2.fill = graphite
region3.fill = water

Instantiate Universe

root.add_cells([region1, region2, region3])

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

Now, after exporting to xml, I create the material xml and tried the geometry plot “openmc -p” the below are the image I got. these are slice plot, plot-2 is xy slice in the origin and plot-3 is xz slice in the origin.

Now, as you can see, the z-cylinders are not filled on the right. The x-cylinder creates a hole all the way through the z-cylinders. this is the issue. How can I pierce the x-cylinder up to 0.271cm in the x-axis into the z-cylinders and not all the way through?

Also, Dr. I have attached the python code for you to test.

Hope this is clear to you Dr. Thank you.

3.png

2.png

build-xml1.py (1.95 KB)

Sorry for my mistake, I meant, the z-cylinders are not filled on the left. The x-cylinder creates a hole all the way through the z-cylinders. this is the issue. How can I pierce the x-cylinder up to 0.271cm in the x-axis into the z-cylinders and not all the way through?

在 2019年2月14日星期四 UTC+8上午8:24:53,Sharif Abu Darda写道:

Thank you, Dr. For all your support. I believe this will help others in the future. Thank you.