Skip to content

Commit a33afff

Browse files
authored
Fix out of date assumption on AZS IDs for "natural nuclides" (#2049)
1 parent a8e7dec commit a33afff

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed

armi/nucDirectory/nuclideBases.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -800,22 +800,6 @@ def getMcnpId(self):
800800
"""
801801
return "{0:d}000".format(self.z)
802802

803-
def getAAAZZZSId(self):
804-
"""Gets the AAAZZZS ID for a few elements.
805-
806-
Notes
807-
-----
808-
the natural nuclides 'C' and 'V' do not have isotopic nuclide data for MC2 so sometimes they tag along in the
809-
list of active nuclides. This method is designed to fail in the same as if there was not getAAAZZZSId method
810-
defined.
811-
"""
812-
if self.element.symbol == "C":
813-
return "120060"
814-
elif self.element.symbol == "V":
815-
return "510230"
816-
else:
817-
return None
818-
819803
def getMcc2Id(self):
820804
"""Return the MC2-2 nuclide identification label based on the ENDF/B-V.2 cross section library."""
821805
return self.mcc2id
@@ -1442,6 +1426,8 @@ def addGlobalNuclide(nuclide: NuclideBase):
14421426
f"{nuclide} with McnpId {nuclide.getMcnpId()} has already been added and cannot be duplicated."
14431427
)
14441428
byMcnpId[nuclide.getMcnpId()] = nuclide
1429+
if not isinstance(nuclide, (NaturalNuclideBase, LumpNuclideBase, DummyNuclideBase)):
1430+
# There are no AZS ID for elements / natural nuclides, or ficticious lump or dummy nuclides
14451431
byAAAZZZSId[nuclide.getAAAZZZSId()] = nuclide
14461432

14471433

armi/nucDirectory/tests/test_nuclideBases.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,11 +466,9 @@ def test_AAAZZZSNameGenerator(self):
466466
:tests: R_ARMI_ND_ISOTOPES
467467
"""
468468
referenceNucNames = [
469-
("C", "120060"),
469+
("C12", "120060"),
470470
("U235", "2350920"),
471471
("AM242M", "2420951"),
472-
("LFP35", None),
473-
("DUMP1", None),
474472
]
475473

476474
for nucName, refAaazzzs in referenceNucNames:

0 commit comments

Comments
 (0)