1515This module provides fundamental nuclide information to be used throughout the framework
1616and applications.
1717
18+ .. impl:: Isotopes and isomers can be queried by name, label, MC2-3 ID, MCNP ID, and AAAZZZS ID.
19+ :id: I_ARMI_ND_ISOTOPES0
20+ :implements: R_ARMI_ND_ISOTOPES
21+
1822The nuclide class structure is outlined :ref:`here <nuclide-bases-class-diagram>`.
1923
2024.. _nuclide-bases-class-diagram:
@@ -423,7 +427,7 @@ def _processBurnData(self, burnInfo):
423427 )
424428
425429 def getDecay (self , decayType ):
426- r """Get a :py:class:`~armi.nucDirectory.transmutations.DecayMode`.
430+ """Get a :py:class:`~armi.nucDirectory.transmutations.DecayMode`.
427431
428432 Retrieve the first :py:class:`~armi.nucDirectory.transmutations.DecayMode`
429433 matching the specified decType.
@@ -493,7 +497,12 @@ def getAAAZZZSId(self):
493497
494498
495499class NuclideBase (INuclide , IMcnpNuclide ):
496- """Represents an individual nuclide/isotope."""
500+ """Represents an individual nuclide/isotope.
501+
502+ .. impl:: Isotopes and isomers can be queried by name and label.
503+ :id: I_ARMI_ND_ISOTOPES1
504+ :implements: R_ARMI_ND_ISOTOPES
505+ """
497506
498507 def __init__ (self , element , a , weight , abundance , state , halflife ):
499508 IMcnpNuclide .__init__ (self )
@@ -558,22 +567,35 @@ def getNaturalIsotopics(self):
558567 return self .element .getNaturalIsotopics ()
559568
560569 def getMcc2Id (self ):
561- """Return the MC2-2 nuclide identification label based on the ENDF/B-V.2 cross section library."""
570+ """Return the MC2-2 nuclide identification label based on the ENDF/B-V.2 cross section library.
571+
572+ .. impl:: Isotopes and isomers can be queried by MC2-2 ID.
573+ :id: I_ARMI_ND_ISOTOPES2
574+ :implements: R_ARMI_ND_ISOTOPES
575+ """
562576 return self .mcc2id
563577
564578 def getMcc3Id (self ):
565- """Return the MC2-3 nuclide identification label based on the ENDF/B-VII.0 cross section library."""
579+ """Return the MC2-3 nuclide identification label based on the ENDF/B-VII.0 cross section library.
580+
581+ .. impl:: Isotopes and isomers can be queried by MC2-3 ID.
582+ :id: I_ARMI_ND_ISOTOPES3
583+ :implements: R_ARMI_ND_ISOTOPES
584+ """
566585 return self .mcc3id
567586
568587 def getMcnpId (self ):
569588 """
570589 Gets the MCNP label for this nuclide.
571590
591+ .. impl:: Isotopes and isomers can be queried by MCNP ID.
592+ :id: I_ARMI_ND_ISOTOPES4
593+ :implements: R_ARMI_ND_ISOTOPES
594+
572595 Returns
573596 -------
574597 id : str
575598 The MCNP ID e.g. ``92235``, ``94239``, ``6000``
576-
577599 """
578600 z , a = self .z , self .a
579601
@@ -595,6 +617,10 @@ def getAAAZZZSId(self):
595617 """
596618 Return a string that is ordered by the mass number, A, the atomic number, Z, and the isomeric state, S.
597619
620+ .. impl:: Isotopes and isomers can be queried by AAAZZZS ID.
621+ :id: I_ARMI_ND_ISOTOPES5
622+ :implements: R_ARMI_ND_ISOTOPES
623+
598624 Notes
599625 -----
600626 An example would be for U235, where A=235, Z=92, and S=0, returning ``2350920``.
@@ -629,7 +655,6 @@ def getEndfMatNum(self):
629655 -------
630656 id : str
631657 The MAT number e.g. ``9237`` for U238
632-
633658 """
634659 z , a = self .z , self .a
635660 if self .element .symbol in BASE_ENDFB7_MAT_NUM :
@@ -679,7 +704,7 @@ def __repr__(self):
679704 return f"<{ self .__class__ .__name__ } { self .name } : Z:{ self .z } , W:{ self .weight :<12.6e} , Label:{ self .label } >"
680705
681706 def getNaturalIsotopics (self ):
682- r """Gets the natural isotopics root :py:class:`~elements.Element`.
707+ """Gets the natural isotopics root :py:class:`~elements.Element`.
683708
684709 Gets the naturally occurring nuclides for this nuclide.
685710
@@ -789,7 +814,7 @@ def __lt__(self, other):
789814 )
790815
791816 def getNaturalIsotopics (self ):
792- r """Gets the natural isotopics, an empty iterator.
817+ """Gets the natural isotopics, an empty iterator.
793818
794819 Gets the naturally occurring nuclides for this nuclide.
795820
@@ -855,7 +880,7 @@ def __lt__(self, other):
855880 )
856881
857882 def getNaturalIsotopics (self ):
858- r """Gets the natural isotopics, an empty iterator.
883+ """Gets the natural isotopics, an empty iterator.
859884
860885 Gets the naturally occurring nuclides for this nuclide.
861886
@@ -1115,12 +1140,12 @@ def factory():
11151140 "Nuclides are already initialized and cannot be re-initialized unless "
11161141 "`nuclideBases.destroyGlobalNuclides` is called first."
11171142 )
1118- __addNuclideBases ()
1143+ addNuclideBases ()
11191144 __addNaturalNuclideBases ()
11201145 __addDummyNuclideBases ()
11211146 __addLumpedFissionProductNuclideBases ()
1122- __updateNuclideBasesForSpecialCases ()
1123- __readMCCNuclideData ()
1147+ updateNuclideBasesForSpecialCases ()
1148+ readMCCNuclideData ()
11241149 __renormalizeNuclideToElementRelationship ()
11251150 __deriveElementalWeightsByNaturalNuclideAbundances ()
11261151
@@ -1130,11 +1155,15 @@ def factory():
11301155 thermalScattering .factory ()
11311156
11321157
1133- def __addNuclideBases ():
1158+ def addNuclideBases ():
11341159 """
11351160 Read natural abundances of any natural nuclides.
11361161
11371162 This adjusts already-existing NuclideBases and Elements with the new information.
1163+
1164+ .. impl:: Separating natural abundance data from code.
1165+ :id: I_ARMI_ND_DATA0
1166+ :implements: R_ARMI_ND_DATA
11381167 """
11391168 with open (os .path .join (context .RES , "nuclides.dat" )) as f :
11401169 for line in f :
@@ -1190,8 +1219,13 @@ def __addLumpedFissionProductNuclideBases():
11901219 LumpNuclideBase (name = "LREGN" , weight = 1.0 )
11911220
11921221
1193- def __readMCCNuclideData ():
1194- """Read in the label data for the MC2-2 and MC2-3 cross section codes to the nuclide bases."""
1222+ def readMCCNuclideData ():
1223+ """Read in the label data for the MC2-2 and MC2-3 cross section codes to the nuclide bases.
1224+
1225+ .. impl:: Separating MCC data from code.
1226+ :id: I_ARMI_ND_DATA1
1227+ :implements: R_ARMI_ND_DATA
1228+ """
11951229 with open (os .path .join (context .RES , "mcc-nuclides.yaml" ), "r" ) as f :
11961230 yaml = YAML (typ = "rt" )
11971231 nuclides = yaml .load (f )
@@ -1208,10 +1242,14 @@ def __readMCCNuclideData():
12081242 byMcc3Id [nb .getMcc3Id ()] = nb
12091243
12101244
1211- def __updateNuclideBasesForSpecialCases ():
1245+ def updateNuclideBasesForSpecialCases ():
12121246 """
12131247 Update the nuclide bases for special case name changes.
12141248
1249+ .. impl:: The special case name Am242g is supported.
1250+ :id: I_ARMI_ND_ISOTOPES6
1251+ :implements: R_ARMI_ND_ISOTOPES
1252+
12151253 Notes
12161254 -----
12171255 This function is specifically added to change the definition of
0 commit comments