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: OrderedDict

This 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')
setName(name)[source]
getName()[source]
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.

Parameters:
  • nucName (str) – nuclide name – e.g. ‘U235’

  • microMultiGroupXS (XSCollection) – micro cross sections, typically a XSCollection from an ISOTXS

  • mgFlux (list like) – The flux in each energy group

  • totalFlux (float) – The total flux. Optional argument for increased speed if already available.

hasValues()[source]

Determines if there are non-zero values in this cross section 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.

Implementation: Generate a formatted cross section table. I_ARMI_DEPL_TABLES1
signature: getXsecTable
requirements: R_ARMI_DEPL_TABLES

Loops over the reaction rates stored as self to produce a string with the cross sections for each nuclide in the block. Cross sections may be populated by makeReactionRateTable.

The string will have a header with the table’s name formatted according to headerFormat followed by rows for each unique nuclide/reaction combination, where each line is formatted according to tableFormat.

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_TABLES0
signature: makeReactionRateTable
requirements: R_ARMI_DEPL_TABLES

For a given composite object obj and a list of nuclides nuclides in that object, call obj.getReactionRates() for each nuclide with a nDensity parameter of 1.0. If nuclides is not specified, use a list of all nuclides in obj. This will reach upwards through the parents of obj to the associated Core object and pull the ISOTXS library that is stored there. If obj does not belong to a Core, 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 to obj.getReactionRates(). Because nDensity was 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 obj has 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 a CrossSectionTable.

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