Confusion of "tally" when using DAGMC-OpenMC

Hi All,
I have a trouble about “tally” when using DAGMC-OpenMC. There is a example in the OpenMC-document(here is the link). Before DAGMC-OpenMC was released, we using python code to create geometry and “cell”(such as fuel_cell, moderator cell), so the ways of “tally” are easy to be understand, like that:

tally = openmc.Tally() tally.filters = [openmc.CellFilter([fuel_cell. moderator_cell])]

It’s convenient for us to create geometry by using DAGMC-OpenMC, however, the instruction about the relationship between “cell” of OpenMC and “volume” of “Cubit/Trelis” is not very clearly. I’m confused about the way of “tally” like that:


tally = openmc.Tally()
tally.filters = [openmc.CellFilter(1)]

What does the Id number “1” represent? Why does it represent the fuel cell according to the OpenMC-document? Following are the screenshot of the example in the OpenMC-document
example.PNG
The example doesn’t show the process of creating geometry, so what’s the relationship of the “Id” and the “DAGMC-Geometry” ?
Any reply will be appreciated !

Best Regards

Hi Bin,

Thanks for trying out the DAGMC-OpenMC feature. I hope it’s helping you in your work.

In

tally = openmc.Tally()
tally.filters = [openmc.CellFilter(1)]

The “1” indicates that this filter is for volume 1 in the DagMC CAD model. (When discussing DagMC models we often refer to 3D regions as volumes rather than cells due to their origin in CAD software, but the terms can be used interchangeably here.) Volume IDs appear in the CAD software used to generate the models seen in the example notebook you’ve referenced above. In this case, I used Trelis (also known as Cubit). The bottom line is that you’ll need to know the IDs of the volumes you wish to filter on based on knowledge of the model or loading of the model into the CAD software to figure out which cell/volume IDs to reference becasue, as you said, we don’t have any Python objects to use when setting up these filters. I’ll make sure to add a note about all this in the DagMC example notebook for clarity.

However, pending the merge of a currently open pull request in OpenMC, another nice way to visualize 2D slices of DagMC models is using the native plotting utility we’ve been working on (https://github.com/openmc-dev/plotter). DagMC models will be able to be viewed just like any other OpenMC geometry using this tool, which will provide output about cell (or volume) IDs as the pointer is moved over the plot.

I hope this helps. Please let me know if you have any other questions!

Cheers,

example.PNG