Hi,
I’m a new user and I want to make a cube, how can I do it? Could you help me?
You could manually create the six planar surfaces and then create a cell out of the intersection of their half-spaces:
xmin = openmc.XPlane(-10.0)
xmax = openmc.XPlane(10.0)
ymin = openmc.YPlane(-10.0)
ymax = openmc.YPlane(10.0)
zmin = openmc.ZPlane(-10.0)
zmax = openmc.ZPlane(10.0)
cube_cell = openmc.Cell(fill=..., region=+xmin & -xmax & +ymin & -ymax & +zmin & -zmax)
We also have a composite surface that achieves the same thing:
cube_surface = openmc.model.RectangularParallelepiped(-10.0, 10.0, -10.0, 10.0, -10.0, 10.0)
cube_cell = openmc.Cell(fill=..., region=-cube_surface)
1 Like