Error when adding carbon element

Hi all, I am trying to run the expansion-filters jupyter notebook. However, I am getting an error when trying to add the Carbon element:

ValueError: Unsure how to partition natural abundance of isotope {0} into other natural isotopes of this element that are present in the cross section library provided. Consider adding the isotopes of this element individually.

I generated my cross section library and cross_sections.xml file using the openmc-get-jeff-data script. I have (ACE and) hdf5 data for natural carbon and C13, e.g. I have C0.h5 and C13.h5 files. And looking at the Element class, that seems to be the problem…I have non-zero list lengths for absent_nuclides and mutual_nuclides. If C13 didn’t exist, it looks like the C0 data would be used:

If no natural elements are present in the library, check if the

0 nuclide is present. If so, set the abundance to 1 for this

nuclide. Else, raise an error.

elif len(mutual_nuclides) == 0:
nuclide_0 = self + ‘0’
if nuclide_0 in library_nuclides:
abundances[nuclide_0] = 1.0
else:
msg = 'Unable to expand element {0} because the cross ’
'section library provided does not contain any of ’
‘the natural isotopes for that element.’
.format(self)
raise ValueError(msg)

Any advice on the best way to fix this issue?

Alex

Hi Alex,

You should be able to get around it by using add_nuclide(‘C0’, …). Let me know if that doesn’t solve the issue.

Best,
Paul