How to model a truncated cone with hollow inside.

Hello, I was looking for an example of how OpenMC handles this attached model structure? It’s a truncated cone with a hollow inside. Having two outer radii and two inner radii. Please share a sample code example of how this is handled in OpenMC. Thank you.

s-l300.jpg

Here’s an example for a cone with a hollow cylindrical inside. A model with two concentric cones would be similar except you’d have to repeat the process of finding the z0 and r^2 parameters for the inner cone.

Define parameters for the annular cone.

inner_radius = 0.5
outer_radius = 1.0
height = 1.5
z_top = 0.0

Compute the cone’s r parameter. It is determined by how quickly the radius

changes as a function of height.

cone_r = (outer_radius - inner_radius) / height

Find the z0 parameter that places the top of the cell at z_top.

cone_z0 = z_top + inner_radius / cone_r

Define the surfaces for the annular cone.

cone = openmc.ZCone(z0=cone_z0, r2=cone_r**2)
inner_cyl = openmc.ZCylinder(r=inner_radius)
plane1 = openmc.ZPlane(z0=z_top-height)
plane2 = openmc.ZPlane(z0=z_top)

Define the annular cone cell

cell = openmc.Cell()
cell.region = -cone & +inner_cyl & +plane1 & -plane2

Hello Dr. Sterling Harper. Thank you for your example. I was able to follow it completely. Also, I designed the two concentric cones to follow your sample. Here is the code for others if needed. This will generate a cone with a hollow inside.

inner_radius_in = 0.5
inner_radius_out = 0.7
outer_radius_in = 1.0
outer_radius_out = 1.2
height = 1.5
z_top = 0.0

cone_r_in = (outer_radius_in - inner_radius_in) / height
cone_z0_in = z_top + inner_radius_in / cone_r_in

cone_r_out = (outer_radius_out - inner_radius_out) / height
cone_z0_out = z_top + inner_radius_out / cone_r_out

cone1 = openmc.ZCone(z0=cone_z0_in, R2=cone_r_in2)
cone2 = openmc.ZCone(z0=cone_z0_out, R2=cone_r_out
2)
plane1 = openmc.ZPlane(z0=z_top-height)
plane2 = openmc.ZPlane(z0=z_top)

cell = openmc.Cell()
cell.region = -cone2 & +cone1 & +plane1 & -plane2
cell.fill=st_fuel

root = openmc.Universe(universe_id=0, name=‘root universe’)
root.add_cells([cell])

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

Still, one thing I am having trouble is generating as the larger radius side up and smaller radius side down. The above code does create a smaller radius side up and a large radius side down. I believe there is an easy solution to this. But I am having trouble. I will update here if I figured out. Thank you for the guide.

Regards,
Sharif Abu Darda

Hello Dr. Sterling Harper. I figured it out how to do the larger radius side up and smaller radius side down. It’s was easy. Below is the code. Thank you for your guidance.

inner_radius_in = 0.5
inner_radius_out = 0.7
outer_radius_in = 1.0
outer_radius_out = 1.2
height = 1.5
z_top = 0.0

cone_r_in = (inner_radius_in - outer_radius_in) / height
cone_z0_in = z_top + outer_radius_in / cone_r_in

cone_r_out = (inner_radius_out - outer_radius_out) / height
cone_z0_out = z_top + outer_radius_out / cone_r_out

cone1 = openmc.ZCone(z0=cone_z0_in, R2=cone_r_in2)
cone2 = openmc.ZCone(z0=cone_z0_out, R2=cone_r_out
2)
plane1 = openmc.ZPlane(z0=z_top-height)
plane2 = openmc.ZPlane(z0=z_top)

cell = openmc.Cell()
cell.region = -cone2 & +cone1 & +plane1 & -plane2
cell.fill=st_fuel