armi.nuclearDataIO.cccc.isotxs module¶
This module reads and writes ISOTXS files.
ISOTXS is a binary file that contains multigroup microscopic cross sections. ISOTXS stands for Isotope Cross Sections.
ISOTXS files are often created by a lattice physics code such as MC2 or DRAGON and used as input to a global flux solver such as DIF3D.
This module implements reading and writing of the ISOTXS file format, consistent with [CCCC-IV].
Examples
>>> from armi.nuclearDataIO.cccc import isotxs
>>> myLib = isotxs.readBinary('ISOTXS-ref')
>>> nuc = myLib.getNuclide('U235','AA')
>>> fis5 = nuc.micros.fission[5]
>>> scat = nuc.micros.scatter[(0, 5, 6, 1)] # 1st order elastic scatter from group 5->6
>>> nuc.micros.fission[7] = fis5*1.01 # you can modify the isotxs too.
>>> captureEnergy = nuc.isotxsMetadata["ecapt"]
>>> isotxs.writeBinary(myLib, 'ISOTXS-modified')
- armi.nuclearDataIO.cccc.isotxs.compareSet(fileNames, tolerance=0.0, verbose=False)[source]¶
takes a list of strings and reads all binaries with that name comparing them in all combinations
Notes
useful for finding mcc bugs when you want to compare a series of very similar isotxs outputs Verbose gets VERY long
- armi.nuclearDataIO.cccc.isotxs.compare(lib1, lib2, tolerance=0.0, verbose=False)[source]¶
Compare two XSLibraries, and return True if equal, or False if not.
Notes
Tolerance allows the user to ignore small changes that may be caused by small library differences or floating point cacluations the closer to zero the more differences will be shown 10**-5 is a good tolerance to use if not using default. Verbose shows the XS matrixes that are not equal
- armi.nuclearDataIO.cccc.isotxs.addDummyNuclidesToLibrary(lib, dummyNuclides)[source]¶
This method adds DUMMY nuclides to the current ISOTXS library.
- Parameters
lib (obj) – ISOTXS library object
dummyNuclides (list) – List of DUMMY nuclide objects that will be copied and added to the GAMISO file
Notes
Since MC2-3 does not write DUMMY nuclide information for GAMISO files, this is necessary to provide a consistent set of nuclide-level data across all the nuclides in a
XSLibrary
.