mit-crpg / opendeplete

A depletion framework for OpenMC
MIT License
15 stars 5 forks source link

Fix results for far-chain nuclides #15

Closed cjosey closed 7 years ago

cjosey commented 7 years ago

In the older version of the code, if a nuclide didn't exist in total_number, it didn't matter, because total_number itself gets written to disk.

With the new HDF5 routines, if a nuclide doesn't exist until several timesteps in (think a dozen (n,gamma) reactions in a row), the Results dictionaries (formed from total_number) may not contain the nuclide we need. This causes __setitem__ to fail.

This PR fixes this issue by forcing all nuclides that might exist now or in the future to exist in total_number after the first depletion sub-step.