openmc-dev / openmc

OpenMC Monte Carlo Code
https://docs.openmc.org
Other
745 stars 480 forks source link

Distribcell Tallies in Lattice Outer Universes #551

Open wbinventor opened 8 years ago

wbinventor commented 8 years ago

It appears that the tallies with a "distribcell" filter on cells in lattice outer universes do not work. Although the code runs fine with such tallies, the results array in the tally's entry in the statepoint file is empty.

I recognize that this is a corner case and that it is tough to imagine a case where one would want to use "distribcell" tallies in lattice outer universes. However, I could see one use case if one wished to tally in each of the gaps between fuel assemblies, which may be most conveniently defined with the lattice outer attribute.

The reason this came up is that I added an outer universe to some of my lattices per the discussion with @smharper on #546. When one generates an openmc.MGXS library with "distribcell" domains, tallies will be created for those cells in lattice outer universes. Everything is fine unless one tries to loop over the domains in the library to perform operations on the MGXS or base Tallies in downstream data processing (e.g., distribcell tally summations per #550).

smharper commented 8 years ago

What behavior do you want a distribcell on an outer to have? It would be really difficult to add one element in the results array per instance of outer universe, but it would be pretty easy to lump all of the outer results into a single value in the array.

wbinventor commented 8 years ago

@smharper - the first of your two proposals is what I think would be best as it would be consistent with how the current distribcell implementation works for cells in non-outer universes.

smharper commented 8 years ago

That will require dynamically resizing the tally results arrays so it will likely interfere with #559. If it's okay with you, I'm not going to address this until #559 is closed

wbinventor commented 8 years ago

@smharper sure that sounds like a good plan.