armi.nucDirectory.nucDir module¶
Some original nuclide directory code.
Notes
This may be deprecated. Consider using the appropriate instance methods available through the
armi.nucDirectory.nuclideBases.INuclide
objects and/or the
armi.nucDirectory.nuclideBases
module.
- armi.nucDirectory.nucDir.getNuclidesFromInputName(name)[source]¶
Convert nuclide specifier strings to isotopically-expanded nuclide bases
- armi.nucDirectory.nucDir.getNaturalIsotopics(elementSymbol=None, z=None)[source]¶
determines the atom fractions of all natural isotopes
- armi.nucDirectory.nucDir.getNaturalMassIsotopics(elementSymbol=None, z=None)[source]¶
return mass fractions of all natural isotopes. To convert number fractions to mass fractions, we multiply by A
- armi.nucDirectory.nucDir.getMc2Label(name)[source]¶
Return a MC2 prefix label without a xstype suffix
MC**2 has labels and library names. The labels are like U235IA, ZIRCFB, etc. and the library names are references to specific data sets on the MC**2 libraries (e.g. U-2355, etc.)
This method returns the labels without the xstype suffixes (IA, FB). Rather than maintaining a lookup table, this simply converts the ARMI nuclide names to MC**2 names.
- Parameters
name (str) – ARMI nuclide name of the nuclide
- Returns
mc2LibLabel – The MC**2 prefix for this nuclide.
- Return type
Examples
>>> nucDir.getMc2Label('U235') 'U235' >> nucDir.getMc2Label('FE') 'FE' >>> nucDir.getMc2Label('IRON') 'FE' >>> nucDir.getMc2Label('AM242') A242
- armi.nucDirectory.nucDir.getMc2LibName(name)[source]¶
returns a MC2 library name given an ARMI nuclide name
These are all 6 characters ‘U-2355’, ‘ZR S’, etc.
- Parameters
name (str) – ARMI nuclide name of the nuclide
- Returns
mc2LibLabel – The 6-character MC**2 library ID for this nuclide
- Return type
See also
readMc2Nuclides
reads a data file containing all the mc2 labels and chooses the proper library extension for each.
- armi.nucDirectory.nucDir.getRebusLabel(name)[source]¶
Return a REBUS label for the rebus input file.
This should have no intermediate spaces and should be 5 characters long Examples: “U235 “, “B10 “, etc.
Technically, this should be in the rebusInterface. No need to put specifics in this general module.
- Parameters
name (str) – ARMI nuclide name like U235, B10, ZR, CU, etc.
- armi.nucDirectory.nucDir.getElementName(z=None, symbol=None)[source]¶
Returns element name
Examples
>>> nucDir.getElementName(10) 'Neon' >>> nucDir.getElementName(symbol='Zr') 'Neon'
- armi.nucDirectory.nucDir.getElementSymbol(z=None, name=None)[source]¶
Returns element abbreviation given atomic number Z
Examples
>>> nucDir.getElementSymbol(10) 'Ne' >>> nucDir.getElementSymbol(name='Neon') 'Ne'
- armi.nucDirectory.nucDir.getNuclide(nucName)[source]¶
Looks up the ARMI nuclide object that has this name
- Parameters
nucName (str) – A nuclide name like U-235 or AM241, AM242M, AM242M
- Returns
nuc – An armi nuclide object.
- Return type
Nuclide
- armi.nucDirectory.nucDir.getNuclides(nucName=None, elementSymbol=None)[source]¶
returns a list of nuclide names in a particular nuclide or element
If no arguments, returns all nuclideBases in the directory
Used to convert things to DB name, to adjustNuclides, etc.
- armi.nucDirectory.nucDir.getNuclideNames(nucName=None, elementSymbol=None)[source]¶
returns a list of nuclide names in a particular nuclide or element
If no arguments, returns all nuclideBases in the directory.
Warning
You will get both isotopes and NaturalNuclideBases for each element.
- armi.nucDirectory.nucDir.getAtomicWeight(lab=None, z=None, a=None)[source]¶
returns atomic weight in g/mole
- Parameters
- Returns
aMass – Atomic weight in grams /mole from NIST, or just mass number if not in library (U239 gives 239)
- Return type
Examples
>>> from armi.nucDirectory import nucDir >>> nucDir.getAtomicWeight('U235') 235.0439299
>>> nucDir.getAtomicWeight('U239') 239
>>> nucDir.getAtomicWeight('U238') 238.0507882
>>> nucDir.getAtomicWeight(z=94,a=239) 239.0521634
- armi.nucDirectory.nucDir.getRebusNameFromMC2(mc2LibLabel=None, mc2Label=None)[source]¶
maps an MC2 label to a rebus label
- armi.nucDirectory.nucDir.getNameFromMC2(mc2LibLabel=None, mc2Label=None)[source]¶
maps an MC2 label to an ARMI label
Tries to maintain some backwards compatibility with old ISOTXS libs with B-10AA, CARBAA, etc.
- armi.nucDirectory.nucDir.getStructuralElements()[source]¶
return list of element symbol in structure