Skip to content

Implement various tally capabilities for OpenMC

Kiesling, Kalin Rose requested to merge tallies into openmc_dev

Implementing the construction and running of tallies for OpenMC (but not post processing yet- to come in next MR). Various tally types were added into three main categories: meshtally, regiontally, and surfacetally. Only one type of tally can occur in each tally{} block, but any number of tally blocks can be added. Below is a description of each and the options available:

  • meshtally: define a 3D Cartesian mesh grid for tallying.
    • Each dimension is defined in one of two ways: 1) set min/max values for and the number of equally spaced voxels, or 2) list all values in grid explicitly.
    • Question: How useful would a cylindrical mesh be here? Should I add that as an option?
  • regiontally: defines certain volume(s) or region(s) for which to tally
    • set core_averaged or assembly:
      • core_averaged: means to use the entire volume of the reactor/core defined to do one single volume tally
      • assembly: list the assemblies for which to get one volume tally per assembly instance of that type
        • pin_only: if True, each pin will be individually tallied in the assemblies listed instead of the entire assembly volume
  • surfacetally: defines surface(s) to tally current on
    • list the surface names to apply tally to. Note: Each surface name listed gets its own tally result, but all instances of a single surface are tallied together. I am not sure if/how it is possible to construct a tally for each individual surface instance.
    • if surface names are not defined, then the surfaces encasing the entire geometry/core/reactor will be used.

Each tally is required to have some scoring information present to indicate what specifically to tally (except surfacetally which can only score current so it is set by default). scores ('flux' or 'heating') and/or reaction_rates can be scored. Any number of scores types are allowable in each as long as they are in the allowable list (currently limited, see schema for options which are all from the openmc documentation). If nuclides are specified for reaction_rates, then only reaction_rates can be listed and no scores can be tallied at the same time because only reaction rates can be filtered by nuclide (limitation set by OpenMC). If no specific nuclides are listed, then scores and reaction rates can be tallied simultaneously in the same tally. The schema has been setup to handle the logic for all these limitations.

After the type of tally desired is defined as above, additional filters/parameters can be set to refine to each tally definition:

  • materials: (optional) list of materials to tally; tallies will give results per material listed.
  • energy_bins: (optional) tally into energy bins
  • power: (optional) if this is set, the 'heating' score will be added to the scoring list (if not already present) such that the two can be used in post processing together.

This MR has implemented the schema, construction, and running of all these different types of tallies and options. The new test file gives a comprehensive overview of all the different combos/tallies possible. Not included in this MR is post processing these tallies as that will be quite an involved process to determine the best way to present this data.

You will also notice changes to some prerun tests that already existed because of how assembly universe definitions were changed. Previously there was one universe per assembly type repeated through the reactor lattice. But in order to properly tally each assembly separately, those repeated assemblies must now be redefined as unique universes.

Edited by Kiesling, Kalin Rose

Merge request reports