armi.physics.neutronics.isotopicDepletion.crossSectionTable module
Module containing the CrossSectionTable class.
The CrossSectionTable is useful for performing isotopic depletion analysis by storing one-group cross sections of interest to such an analysis. This used to live alongside the isotopicDepletionInterface, but that proved to be an unpleasant coupling between the ARMI composite model and the physics code contained therein. Separating it out at least means that the composite model doesn’t need to import the isotopicDepletionInterface to function.
- class armi.physics.neutronics.isotopicDepletion.crossSectionTable.CrossSectionTable(*args, **kwargs)[source]
Bases:
OrderedDictThis is a set of one group cross sections for use with isotopicDepletion analysis.
It can also double as a reaction rate table.
XStable is indexed by nucNames (nG), (nF), (n2n), (nA), (nP) and (n3n) are expected the cross sections are returned in barns.
- rateTypes = ('nG', 'nF', 'n2n', 'nA', 'nP', 'n3n')
- add(nucName, nG=0.0, nF=0.0, n2n=0.0, nA=0.0, nP=0.0, n3n=0.0)[source]
Add one group cross sections to the table.
- Parameters:
nucName (str) – nuclide name – e.g. ‘U235’
nG (float) – (n,gamma) cross section in barns
nF (float) – (n,fission) cross section in barns
n2n (float) – (n,2n) cross section in barns
nA (float) – (n,alpha) cross section in barns
nP (float) – (n,proton) cross section in barns
n3n (float) – (n,3n) cross section in barns
- addMultiGroupXS(nucName, microMultiGroupXS, mgFlux, totalFlux=None)[source]
Perform group collapse to one group cross sections and add to table.
- getXsecTable(headerFormat='$ xsecs for {}', tableFormat='\n{{mcnpId}} {nG:.5e} {nF:.5e} {n2n:.5e} {n3n:.5e} {nA:.5e} {nP:.5e}')[source]
Make a cross section table for external depletion physics code input decks.
Loops over the reaction rates stored as
selfto produce a string with the cross sections for each nuclide in the block. Cross sections may be populated bymakeReactionRateTable.The string will have a header with the table’s name formatted according to
headerFormatfollowed by rows for each unique nuclide/reaction combination, where each line is formatted according totableFormat.- Parameters:
headerFormat (string (optional)) – This is the format in which the elements of the header with be returned – i.e. if you use a .format() call with the case name you’ll return a formatted list of strings.
tableFormat (string (optional)) – This is the format in which the elements of the table with be returned – i.e. if you use a .format() call with mcnpId, nG, nF, n2n, n3n, nA, and nP you’ll get the format you want. If you use a .format() call with the case name you’ll return a formatted list of string elements
Results
-------
output (list) – a list of string elements that together make a xsec card
- armi.physics.neutronics.isotopicDepletion.crossSectionTable.makeReactionRateTable(obj, nuclides: List = None)[source]
Generate a reaction rate table for given nuclides.
Often useful in support of depletion.
Implementation: Generate a reaction rate table with entries for (nG), (nF), (n2n), (nA), and (nP) reactions. I_ARMI_DEPL_TABLES0For a given composite object
objand a list of nuclidesnuclidesin that object, callobj.getReactionRates()for each nuclide with anDensityparameter of 1.0. Ifnuclidesis not specified, use a list of all nuclides inobj. This will reach upwards through the parents ofobjto the associatedCoreobject and pull the ISOTXS library that is stored there. Ifobjdoes not belong to aCore, a warning is printed.For each child of
obj, use the ISOTXS library and the cross-section ID for the associated block to produce a reaction rate dictionary in units of inverse seconds for the nuclide specified in the original call toobj.getReactionRates(). BecausenDensitywas originally specified as 1.0, this dictionary actually represents the reaction rates per unit volume. If the nuclide is not in the ISOTXS library a warning is printed.Combine the reaction rates for all nuclides into a combined dictionary by summing together reaction rates of the same type on the same isotope from each of the children of
obj.If
objhas a non-zero multi-group flux, sum the group-wise flux into the total flux and normalize the reaction rates by the total flux, producing a one-group macroscopic cross section for each reaction type on each nuclide. Store these values in aCrossSectionTable.- Parameters:
nuclides (list, optional) – list of nuclide names for which to generate the cross-section table. If absent, use all nuclides obtained by self.getNuclides().
Notes
This also used to do some caching on the block level but that has been removed and the calls to this may therefore need to be re-optimized.
See also
armi.physics.neutronics.isotopicDepletion.isotopicDepletionInterface.CrossSectionTable,armi.reactor.composites.Composite.getReactionRates