- class openmc.Tallies(tallies=None)¶
Collection of Tallies used for an OpenMC simulation.
This class corresponds directly to the tallies.xml input file. It can be thought of as a normal Python list where each member is a
Tally. It behaves like a list as the following example demonstrates:
>>> t1 = openmc.Tally() >>> t2 = openmc.Tally() >>> t3 = openmc.Tally() >>> tallies = openmc.Tallies([t1]) >>> tallies.append(t2) >>> tallies += [t3]
tallies (Iterable of openmc.Tally) – Tallies to add to the collection
- append(tally, merge=False)¶
Append tally to collection
Create a tallies.xml file that can be used for a simulation.
path (str) – Path to file to write. Defaults to ‘tallies.xml’.
- classmethod from_xml(path='tallies.xml')¶
Generate tallies from XML file
- insert(index, item)¶
Insert tally before index
Merge any mergeable tallies together. Note that n-way merges are possible.