Finding surface ID of DAGMC geometry

Hi all, I’m trying to set up a surface tally on some DAGMC geometry to find the neutron flux leaving the rear wall of my blanket. As far as I understand from this post I need to specify the surface ID and can then set up a surface filter as usual. So I’m wondering what’s the best way to find this out. I’m working in the neutronics workshop docker container, in Jupyter notebook. I tried just using !cat geometry.xml but it didn’t show anything helpful.
Thanks :slightly_smiling_face:

Unfortunately I don’t know a good way to do this with an existing h5m file. I’ve seen people making point sources at different locations and probe the model by having a tally for each surface IDs and seeing which surfaces have high responses. If you are making your own h5m files you could output additional information when making each surface id to help locate them. When creating the h5m file printing information like the center of the surface, along with each surface ID could help narrow it down. There might be a way with pymoab.

Just found out about pydagmc which lets you interrogate dagmc files:

https://github.com/svalinn/pydagmc/tree/main

quick example

import dagmc
model = dagmc.DAGModel('testDagmc.h5m')
groups = model.groups
group = groups['mat:vacuum']
vols = group.get_volumes()
print(vols[1].get_surfaces())
print(vols[2].get_surfaces())
print(vols[3].get_surfaces())
{1: Surface 1, 1024 triangles}
{1: Surface 1, 1024 triangles, 2: Surface 2, 1024 triangles}
{2: Surface 2, 1024 triangles, 4: Surface 4, 1028 triangles}

That is, volume 1 has surface 1, volume 2 has surfaces 1 and 2, and volume 3 has surfaces 2 and 4.
These should match the surface IDs in openmc, provided adjust_geom_ids = False when initializing the dagmc universe

1 Like