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 (e.g.
the mc2Interface
.
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
- 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)[source]¶
Bases:
list
Controls which blocks are representative of a particular cross section type/BU group
This is a list with special methods.
- 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.
See also
terrapower.physics.neutronics.mc2.mc2Writers.Mc2Writer._getAllNuclideDensities
uses these values
- 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)[source]¶
Bases:
armi.physics.neutronics.crossSectionGroupManager.BlockCollection
Returns the median burnup block. This is a simple and often accurate approximation.
- class armi.physics.neutronics.crossSectionGroupManager.AverageBlockCollection(allNuclidesInProblem, validBlockTypes=None)[source]¶
Bases:
armi.physics.neutronics.crossSectionGroupManager.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.SlabComponentsAverageBlockCollection(allNuclidesInProblem, validBlockTypes=None)[source]¶
Bases:
armi.physics.neutronics.crossSectionGroupManager.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:
armi.physics.neutronics.crossSectionGroupManager.AverageBlockCollection
Flux-weighted AverageBlockCollection
- class armi.physics.neutronics.crossSectionGroupManager.CrossSectionGroupManager(r, cs)[source]¶
Bases:
armi.interfaces.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.
Construct an interface.
The
r
andcs
arguments are required, but may beNone
, where appropriate for the specificInterface
implementation.- Parameters
r (Reactor) – A reactor to attach to
cs (Settings) – Settings object to use
- Raises
RuntimeError – Interfaces derived from Interface must define their name
- 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.
- 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.
- interactCoupled(iteration)[source]¶
Update XS groups on each physics coupling iteration to get latest temperatures.
- 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
- Returns
blockCollectionByXsGroup (dict) – Mapping between XS IDs and the new block collections
modifiedReprBlocks (dict) – Mapping between XS IDs and the new representative blocks
- Raises
ValueError – If passed list arguments are empty
- getNextAvailableXsTypes(howMany=1, excludedXSTypes=None)[source]¶
Return the next however many available xs types.
- Parameters
- 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.
See also
- 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.