Hi all, I used CUBIT to convert my CAD model into a DAGMC geometry. I would like to identify the cell ID assigned to one of my cells in the DAGMC geometry so I can set up a cell filter for a flux tally at that location but I am not sure how to do this since all I have is the DAGMC geometry as a .h5m file. Please advise.
Here is a snippet of my code:
def create_tallies():
tallies = openmc.Tallies()
# Cell filter for the material's cell
cell_filter = openmc.CellFilter([1]) # Assuming Cell 1 is the cell containing the sample material
flux_tally = openmc.Tally(name="flux_tally")
flux_tally.filters = [cell_filter]
flux_tally.scores = ['flux']
tallies.append(flux_tally)
tallies.export_to_xml()
return tallies
hi,madrad
just use
cell_filter = openmc.CellFilter(1)
and 1 is your chosen volume id of your cubit model
directly use it as the parameter of cellfilter