rbocce
October 31, 2024, 1:42pm
1
Hi all,
I am importing .step geometry in OpenMC using DAGMC. I would like to exploit the symmetry of my model, thus apply reflective boundary conditions (BC) on some surfaces and vacuum BC on others, similarly to the picture:
Up to now, to import the geometry and to apply a vacuum BC to the model I did something like this:
dagmc_univ = openmc.DAGMCUniverse(filename='filename.h5m').bounded_universe()
geometry = openmc.Geometry(root=dagmc_univ)
geometry.export_to_xml()
Clearly, this approach is not suitable for my goal since it allows just for one BC for the whole domain.
Is there a way to apply different BC on each surface?
Thanks
squang
November 4, 2024, 4:55am
2
You can try:
dagmc_univ = openmc.DAGMCUniverse(filename='filename.h5m')
vacuum_radius = 10
# Creating a bounding box
## X and Y reflective BC
px = openmc.XPlane(boundary_type = "reflective", name = "reflective boundary on X-axis")
py = openmc.YPlane(boundary_type = "reflective", name = "reflective boundary on Y-axis")
## Vacuum boundary as a cylinder
cyl = openmc.ZCylinder(x0=0.0, y0=0.0, r=vacuum_radius, boundary_type = "vacuum")
region = (+px & +py & -cyl)
containing_cell = openmc.Cell(region=region, fill= dagmc_univ)
geometry = openmc.Geometry(root=[containing_cell])
geometry.export_to_xml()
Best,