Skip to content

Reformatting volume calculation output for OpenMC - precursor to tally post-processing

Kiesling, Kalin Rose requested to merge volume_calcs into openmc_dev

I changed how volume calculations are post-processed due to the changes in how the assemblies are defined now. This is a precursor MR to tally post-processing because the process of re-indexing the assemblies is necessary for both and I think it is easier to see how this somewhat major change is done in this slightly smaller MR.

Summary of changes:

  • the volume of each instance of an assembly and each of it's subassemblies is printed to the .summary file. Each assembly is listed by its location of ring and index which correspond to the ring and index of the PyARC input. This removes the volume detail for pins and each subassembly's subsection (ie radial regions) which was previously present. This information that is provided is consistent with the level of volume information provided by DIF3D.
  • The structure of the user_object results for openmc_volumes was updated to be more robust/explicit to match the above changes to how these are volumes are recorded.
  • In order to properly get each subassembly volume, the cells that are used to define the subassembly have been redefined as a universe in a new single cell. This makes it easier in volume post processing to get the volume of the total subassembly rather than each individual section of the subassembly.
  • In order to revert the indexing of the reactor lattice from the OpenMC indexing to PyARC, an additional method was added _convert_grid_to_rings() which is the exact opposite of the already existing _convert_rings_to_grid() method for going from PyARC to OpenMC lattice indexing. This handles square lattices. No additional methods were needed for reverting changes to the hexagonal lattice indexing.
  • The post-run test was updated for the formatting change as well as making a more complex geometry for the volume calc tests. The new geometry(ies) I think capture the different types of subassemblies. Due to the more complex test geometry, there is explicit calculations present for the expected volume of every component. These tests also test that indexing for square and hex lattices are properly reverted.
  • the pre-run test was updated to account for the new way subassemblies are defined and test was added for the new _convert_grid_to_rings() method.
  • Sample 18 was updated with the new formatting of the volume calculation output. Also note that these volumes reported by OpenMC match the DIF3D reported volumes.
  • Main README is updated to reflect the change to the user_object.results dictionary for the volume info.

Open Questions:

  1. Is it reasonable to put all this volume information in the .summary file, or should some of it be moved to the .extended.summary file? It looks like DIF3D reports just assembly level volumes in the .summary and puts the subassembly data in the extended.
  2. Is there a desire for more volume information besides assembly, subassembly, and material data?
Edited by Kiesling, Kalin Rose

Merge request reports