openmc icon indicating copy to clipboard operation
openmc copied to clipboard

Add helpful error message for when num_delayed_groups=0 but MDGXS present

Open gridley opened this issue 2 years ago • 1 comments

Description

When a delayed group tally such as 'decay-rate' is present in an mgxs.Library object, we rely on num_delayed_groups being greater than zero. When creating the tallies, a mysterious error arises if a user has forgot to set the number of delayed groups to the correct value:

  File "/home/gavin/.local/lib/python3.10/site-packages/openmc/mgxs/library.py", line 588, in add_to_tallies_file
    for tally in mgxs.tallies.values():
  File "/home/gavin/.local/lib/python3.10/site-packages/openmc/mgxs/mgxs.py", line 594, in tallies
    zip(self.scores, self.tally_keys, self.filters, estimators)
TypeError: 'NoneType' object is not iterable

We should explicitly check for this condition and raise a more useful message if so.

gridley avatar Dec 31 '23 06:12 gridley

Hi, is this issue still open?

vanessalulla avatar Apr 01 '24 02:04 vanessalulla