diff --git a/openmc/data/neutron.py b/openmc/data/neutron.py index 1d3a0176d4..07b1f7686a 100644 --- a/openmc/data/neutron.py +++ b/openmc/data/neutron.py @@ -34,7 +34,7 @@ from openmc.mixin import EqualityMixin _RESONANCE_ENERGY_GRID = np.logspace(-3, 3, 61) -def _get_metadata(zaid, metastable_scheme='nndc'): +def get_metadata(zaid, metastable_scheme='nndc'): """Return basic identifying data for a nuclide with a given ZAID. Parameters @@ -677,7 +677,7 @@ class IncidentNeutron(EqualityMixin): # If mass number hasn't been specified, make an educated guess zaid, xs = ace.name.split('.') name, element, Z, mass_number, metastable = \ - _get_metadata(int(zaid), metastable_scheme) + get_metadata(int(zaid), metastable_scheme) # Assign temperature to the running list kTs = [ace.temperature*EV_PER_MEV] diff --git a/scripts/openmc-update-inputs b/scripts/openmc-update-inputs index 7143851d8e..ea6506942d 100755 --- a/scripts/openmc-update-inputs +++ b/scripts/openmc-update-inputs @@ -241,15 +241,9 @@ def update_geometry(geometry_root): def replace_zaid(name): """Replace a nuclide name in the ZAID notation with the correct name.""" - # TODO: Account for metastable and any other special cases - name = name.strip() - z = int(name[:-3]) - a = int(name[-3:]) # Strips leading 0s - symbol = openmc.data.ATOMIC_SYMBOL[z] - name = str(symbol).title() + str(a) + zaid = int(name.strip()) + name = openmc.data.neutron.get_metadata(zaid)[0] return name - - def update_materials(root): """Update the given XML materials tree. Return True if changes were made."""