armi.physics.neutronics.crossSectionGroupManager module

Cross section group manager handles burnup-dependent properties of microscopic cross sections.

Blocks are specified to be in a certain cross section type and burnup group. Together, these form the cross section group. By advancing blocks by their burnup into different groups, we capture some of the physical effects related to depletion.

XS types are typically single capital letters like A BU groups are also capital letters. A XS group of AB is in XS type A and burnup group B.

This module groups the blocks according to their XS groups and can determine which block is to be deemed representative of an entire set of blocks in a particular xs group. Then the representative block is sent to a lattice physics kernel for actual physics calculations.

Generally, the cross section manager is a attribute of the lattice physics code interface

Examples

csm = CrossSectionGroupManager() csm._setBuGroupBounds(cs[‘buGroups’]) csm._addXsGroupsFromBlocks(blockList) csm.createRepresentativeBlocks() representativeBlockList = csm.representativeBlocks.values() blockThatRepresentsBA = csm.representativeBlocks[‘BA’]

The class diagram is provided in xsgm-class-diagram

XSGM class diagram

Class inheritance diagram for crossSectionGroupManager.

armi.physics.neutronics.crossSectionGroupManager.describeInterfaces(cs)[source]

Function for exposing interface(s) to other code.

armi.physics.neutronics.crossSectionGroupManager.getXSTypeNumberFromLabel(xsTypeLabel: str) int[source]

Convert a XSID label (e.g. ‘AA’) to an integer.

Useful for visualizing XS type in XTVIEW.

2-digit labels are supported when there is only one burnup group.

armi.physics.neutronics.crossSectionGroupManager.getXSTypeLabelFromNumber(xsTypeNumber: int) int[source]

Convert a XSID label (e.g. 65) to an XS label (e.g. ‘A’).

Useful for visualizing XS type in XTVIEW.

2-digit labels are supported when there is only one burnup group.

class armi.physics.neutronics.crossSectionGroupManager.BlockCollection(allNuclidesInProblem, validBlockTypes=None, averageByComponent=False)[source]

Bases: list

Controls which blocks are representative of a particular cross section type/BU group.

This is a list with special methods.

createRepresentativeBlock()[source]

Generate a block that best represents all blocks in group.

calcAvgNuclideTemperatures()[source]

Calculate the average nuclide temperatures in this collection based on the blocks in the collection.

If a nuclide is in multiple components, that’s taken into consideration.

\[T = \frac{\sum{n_i v_i T_i}}{\sum{n_i v_i}}\]

where \(n_i\) is a number density, \(v_i\) is a volume, and \(T_i\) is a temperature

getWeight(block)[source]

Get value of weighting function for this block.

getCandidateBlocks()[source]

Get blocks in this collection that are the valid representative type.

Often, peripheral non-fissile blocks (reflectors, control, shields) need cross sections but cannot produce them alone. You can approximate their cross sections by placing them in certain cross section groups. However, we do not want these blocks to be included in the spectrum calculations that produce cross sections. Therefore the subset of valid representative blocks are used to compute compositions, temperatures, etc.

Tip

The proper way to treat non-fuel blocks is to apply a leakage spectrum from fuel onto them.

class armi.physics.neutronics.crossSectionGroupManager.MedianBlockCollection(allNuclidesInProblem, validBlockTypes=None, averageByComponent=False)[source]

Bases: BlockCollection

Returns the median burnup block. This is a simple and often accurate approximation.

class armi.physics.neutronics.crossSectionGroupManager.AverageBlockCollection(allNuclidesInProblem, validBlockTypes=None, averageByComponent=False)[source]

Bases: BlockCollection

Block collection that builds a new block based on others in collection.

Averages number densities, fission product yields, and fission gas removal fractions.

armi.physics.neutronics.crossSectionGroupManager.getBlockNuclideTemperatureAvgTerms(block, allNucNames)[source]

Compute terms (numerator, denominator) of average for this block.

This volume-weights the densities by component volume fraction.

It’s important to count zero-density nuclides (i.e. ones like AM242 that are expected to build up) as trace values at the proper component temperatures.

class armi.physics.neutronics.crossSectionGroupManager.CylindricalComponentsAverageBlockCollection(allNuclidesInProblem, validBlockTypes=None, averageByComponent=False)[source]

Bases: BlockCollection

Creates a representative block for the purpose of cross section generation with a one- dimensional cylindrical model.

Notes

When generating the representative block within this collection, the geometry is checked against all other blocks to ensure that the number of components are consistent. This implementation is intended to be opinionated, so if a user attempts to put blocks that have geometric differences then this will fail.

This selects a representative block based on the collection of candidates based on the median Block-average temperatures as an assumption.

class armi.physics.neutronics.crossSectionGroupManager.SlabComponentsAverageBlockCollection(allNuclidesInProblem, validBlockTypes=None, averageByComponent=False)[source]

Bases: BlockCollection

Creates a representative 1D slab block.

Notes

  • Ignores lumped fission products since there is no foreseeable need for burn calculations in 1D slab geometry since it is used for low power neutronic validation.

  • Checks for consistent component dimensions for all blocks in a group and then creates a new Block.

  • Iterates through components of all blocks and calculates component average number densities. This calculation takes the first component of each block, averages the number densities, and applies this to the number density to the representative block.

class armi.physics.neutronics.crossSectionGroupManager.FluxWeightedAverageBlockCollection(*args, **kwargs)[source]

Bases: AverageBlockCollection

Flux-weighted AverageBlockCollection.

class armi.physics.neutronics.crossSectionGroupManager.CrossSectionGroupManager(r, cs)[source]

Bases: Interface

Looks at the reactor and updates burnup group information based on current burnup.

Contains a BlockCollection for each cross section group.

Notes

The representative blocks created in the CrossSectionGroupManager are ordered alphabetically by key.

name: Optional[str] = 'xsGroups'

The name of the interface. This is undefined for the base class, and must be overridden by any concrete class that extends this one.

interactBOL()[source]

Called at the Beginning-of-Life of a run, before any cycles start.

interactBOC(cycle=None)[source]

Update representative blocks and block burnup groups.

Notes

The block list each each block collection cannot be emptied since it is used to derive nuclide temperatures.

interactEOC(cycle=None)[source]

EOC interaction.

Clear out big dictionary of all blocks to avoid memory issues and out-of-date representers.

interactEveryNode(cycle=None, tn=None)[source]

Interaction at every time node.

interactCoupled(iteration)[source]

Update cross-section groups on each physics coupling iteration to get latest temperatures.

Notes

Updating the cross-section on only the first (i.e., iteration == 0) timenode can be a reasonable approximation to get new cross sections with some temperature updates but not have to run lattice physics on each coupled iteration. If the user desires to have the cross sections updated with every coupling iteration, the latticePhysicsFrequency: all option.

See also

interactCoupled()

clearRepresentativeBlocks()[source]

Clear the representative blocks.

xsTypeIsPregenerated(xsID)[source]

Return True if the cross sections for the given xsID is pre-generated.

fluxSolutionIsPregenerated(xsID)[source]

Return True if an external flux solution file for the given xsID is pre-generated.

createRepresentativeBlocks()[source]

Get a representative block from each cross-section ID managed here.

createRepresentativeBlocksUsingExistingBlocks(blockList, originalRepresentativeBlocks)[source]

Create a new set of representative blocks using provided blocks.

This uses an input list of blocks and creates new representative blocks for these blocks based on the compositions and temperatures of their original representative blocks.

Notes

This is required for computing Doppler, Voided-Doppler, Temperature, and Voided-Temperature reactivity coefficients, where the composition of the representative block must remain the same, but only the temperatures within the representative blocks are to be modified.

Parameters:
  • blockList (list) – A list of blocks defined within the core

  • originalRepresentativeBlocks (dict) – A dict of unperturbed representative blocks that the new representative blocks are formed from keys: XS group ID (e.g., “AA”) values: representative block for the XS group

Returns:

  • blockCollectionByXsGroup (dict) – Mapping between XS IDs and the new block collections

  • modifiedReprBlocks (dict) – Mapping between XS IDs and the new representative blocks

  • origXSIDsFromNew (dict) – Mapping of original XS IDs to new XS IDs. New XS IDs are created to represent a modified state (e.g., a Doppler temperature perturbation).

Raises:

ValueError – If passed list arguments are empty

getNextAvailableXsTypes(howMany=1, excludedXSTypes=None)[source]

Return the next however many available xs types.

Parameters:
  • howMany (int, optional) – The number of requested xs types

  • excludedXSTypes (list, optional) – A list of cross section types to exclude from using

Raises:

ValueError – If there are no available XS types to be allocated

makeCrossSectionGroups()[source]

Make cross section groups for all blocks in reactor and unrepresented blocks from blueprints.

disableBuGroupUpdates()[source]

Turn off updating bu groups based on burnup.

Useful during reactivity coefficient calculations to be consistent with ref. run.

enableBuGroupUpdates()[source]

Turn on updating bu groups based on burnup.

getNucTemperature(xsID, nucName)[source]

Return the temperature (in C) of the nuclide in the group with specified xsID.

Notes

Returns None if the xsID or nucName are not in the average nuclide temperature dictionary self.avgNucTemperatures

updateNuclideTemperatures(blockCollectionByXsGroup=None)[source]

Recompute nuclide temperatures for the block collections within the core.

Parameters:

blockCollectionByXsGroup (dict, optional) – Mapping between the XS IDs in the core and the block collections. Note that providing this as an arugment will only update the average temperatures of these XS IDs/block collections and will result in other XS ID average temperatures not included to be discarded.

Notes

This method does not update any properties of the representative blocks. Temperatures are obtained from the BlockCollection class rather than the representative block.

armi.physics.neutronics.crossSectionGroupManager.blockCollectionFactory(xsSettings, allNuclidesInProblem)[source]

Build a block collection based on user settings and input.