Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix out of date assumption on AZS IDs for "natural nuclides" #2049

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions armi/nucDirectory/nuclideBases.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,22 +800,6 @@ def getMcnpId(self):
"""
return "{0:d}000".format(self.z)

def getAAAZZZSId(self):
"""Gets the AAAZZZS ID for a few elements.

Notes
-----
the natural nuclides 'C' and 'V' do not have isotopic nuclide data for MC2 so sometimes they tag along in the
list of active nuclides. This method is designed to fail in the same as if there was not getAAAZZZSId method
defined.
"""
if self.element.symbol == "C":
return "120060"
elif self.element.symbol == "V":
return "510230"
else:
return None

def getMcc2Id(self):
"""Return the MC2-2 nuclide identification label based on the ENDF/B-V.2 cross section library."""
return self.mcc2id
Expand Down Expand Up @@ -1442,6 +1426,8 @@ def addGlobalNuclide(nuclide: NuclideBase):
f"{nuclide} with McnpId {nuclide.getMcnpId()} has already been added and cannot be duplicated."
)
byMcnpId[nuclide.getMcnpId()] = nuclide
if not isinstance(nuclide, (NaturalNuclideBase, LumpNuclideBase, DummyNuclideBase)):
# There are no AZS ID for elements / natural nuclides, or ficticious lump or dummy nuclides
byAAAZZZSId[nuclide.getAAAZZZSId()] = nuclide


Expand Down
4 changes: 1 addition & 3 deletions armi/nucDirectory/tests/test_nuclideBases.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,9 @@ def test_AAAZZZSNameGenerator(self):
:tests: R_ARMI_ND_ISOTOPES
"""
referenceNucNames = [
("C", "120060"),
("C12", "120060"),
("U235", "2350920"),
("AM242M", "2420951"),
("LFP35", None),
("DUMP1", None),
]

for nucName, refAaazzzs in referenceNucNames:
Expand Down