armi.reactor.converters.axialExpansionChanger module

Enable component-wise axial expansion for assemblies and/or a reactor

armi.reactor.converters.axialExpansionChanger.getDefaultReferenceAssem(assems)[source]

Return a default reference assembly.

armi.reactor.converters.axialExpansionChanger.makeAssemsAbleToSnapToUniformMesh(assems, nonUniformAssemFlags, referenceAssembly=None)[source]

Make this set of assemblies aware of the reference mesh so they can stay uniform as they axially expand.

armi.reactor.converters.axialExpansionChanger.expandColdDimsToHot(assems: list, isDetailedAxialExpansion: bool, referenceAssembly=None)[source]

Expand BOL assemblies, resolve disjoint axial mesh (if needed), and update block BOL heights

Parameters
  • assems (list[Assembly]) – list of assemblies to be thermally expanded

  • isDetailedAxialExpansion (bool) – If False, assemblies will be forced to conform to the reference mesh after expansion

  • referenceAssembly (Assembly, optional) – Assembly whose mesh other meshes will conform to if isDetailedAxialExpansion is False. If not provided, will assume the finest mesh assembly which is typically fuel.

class armi.reactor.converters.axialExpansionChanger.AxialExpansionChanger(detailedAxialExpansion: bool = False)[source]

Bases: object

Axially expand or contract assemblies or an entire core.

Variables
  • ~AxialExpansionChanger.linked (AssemblyAxialLinkage) – establishes object containing axial linkage information

  • ~AxialExpansionChanger.expansionData (ExpansionData) – establishes object to store and access relevant expansion data

Notes

  • Is designed to work with general, vertically oriented, pin-type assembly designs. It is not set up to account for any other assembly type.

  • Useful for fuel performance, thermal expansion, reactivity coefficients, etc.

Build an axial expansion converter.

Parameters

detailedAxialExpansion (bool, optional) – A boolean to indicate whether or not detailedAxialExpansion is to be utilized.

performPrescribedAxialExpansion(a, componentLst: list, percents: list, setFuel=True)[source]

Perform axial expansion of an assembly given prescribed expansion percentages

Parameters
  • a (Assembly) – ARMI assembly to be changed

  • componentLst (list[Component]) – list of Components to be expanded

  • percents (list[float]) – list of expansion percentages for each component listed in componentList

  • setFuel (boolean, optional) – Boolean to determine whether or not fuel blocks should have their target components set This is useful when target components within a fuel block need to be determined on-the-fly.

Notes

  • percents may be positive (expansion) or negative (contraction)

performThermalAxialExpansion(a, tempGrid: list, tempField: list, setFuel: bool = True, updateNDensForRadialExp: bool = True)[source]

Perform thermal expansion for an assembly given an axial temperature grid and field

Parameters
  • a (Assembly) – ARMI assembly to be changed

  • tempGrid (float, list) – Axial temperature grid (in cm) (i.e., physical locations where temp is stored)

  • tempField (float, list) – Temperature values (in C) along grid

  • setFuel (boolean, optional) – Boolean to determine whether or not fuel blocks should have their target components set This is useful when target components within a fuel block need to be determined on-the-fly.

  • updateNDensForRadialExp (optional, bool) – boolean to determine whether or not the component number densities should be updated to account for radial expansion/contraction

Notes

  • Setting updateNDensForRadialExp to False isolates the number density changes due to the temp change to just the axial dim. This is useful for testing. However, in practical use updateNDensForRadialExp should be set to True to capture radial expansion/contraction effects associated with updating the component temperature.

reset()[source]
setAssembly(a, setFuel=True)[source]

set the armi assembly to be changed and init expansion data class for assembly

Parameters

a (Assembly) – ARMI assembly to be changed

setFuelboolean, optional

Boolean to determine whether or not fuel blocks should have their target components set This is useful when target components within a fuel block need to be determined on-the-fly.

applyColdHeightMassIncrease()[source]

Increase component mass because they are declared at cold dims

Notes

A cold 1 cm tall component will have more mass that a component with the same mass/length as a component with a hot height of 1 cm. This should be called when the setting inputHeightsConsideredHot is used. This adjusts the expansion factor applied during applyMaterialMassFracsToNumberDensities.

axiallyExpandAssembly()[source]

Utilizes assembly linkage to do axial expansion

manageCoreMesh(r)[source]

manage core mesh post assembly-level expansion

Parameters

r (Reactor) – ARMI reactor to have mesh modified

Notes

  • if no detailedAxialExpansion, then do “cheap” approach to uniformMesh converter.

  • update average core mesh values with call to r.core.updateAxialMesh()

  • oldMesh will be None during initial core construction at processLoading as it has not yet been set.

class armi.reactor.converters.axialExpansionChanger.AssemblyAxialLinkage(StdAssem)[source]

Bases: object

Determines and stores the block- and component-wise axial linkage for an assembly

Variables
  • ~AssemblyAxialLinkage.a (Assembly) – reference to original assembly; is directly modified/changed during expansion.

  • ~AssemblyAxialLinkage.linkedBlocks (dict) –

    keys –> Block

    values –> list of axially linked blocks; index 0 = lower linked block; index 1: upper linked block.

    see also: self._getLinkedBlocks()

  • ~AssemblyAxialLinkage.linkedComponents (dict) –

    keys –> Component

    values –> list of axially linked components; index 0 = lower linked component; index 1: upper linked component.

    see also: self._getLinkedComponents

class armi.reactor.converters.axialExpansionChanger.ExpansionData(a, setFuel)[source]

Bases: object

object containing data needed for axial expansion

setExpansionFactors(componentLst, percents)[source]

sets user defined expansion factors

Parameters
  • componentLst (list[Component]) – list of Components to have their heights changed

  • percents (list[float]) – list of height changes in percent that are to be applied to componentLst

Raises

RuntimeError – If componentLst and percents are different lengths

Notes

  • requires that the length of componentLst and percents be the same

updateComponentTempsBy1DTempField(tempGrid, tempField, updateNDensForRadialExp: bool = True)[source]

assign a block-average axial temperature to components

Parameters
  • tempGrid (numpy array) – 1D axial temperature grid (i.e., physical locations where temp is stored)

  • tempField (numpy array) – temperature values along grid

  • updateNDensForRadialExp (optional, bool) – boolean to determine whether or not the component number densities should be updated to account for radial expansion/contraction

Notes

  • given a 1D axial temperature grid and distribution, searches for temperatures that fall within the bounds of a block, and averages them

  • this average temperature is then passed to self.updateComponentTemp()

  • Setting updateNDensForRadialExp to False isolates the number density changes due to the temp change to just the axial dim. This is useful for testing. However, in practical use updateNDensForRadialExp should be set to True to capture radial expansion/contraction effects associated with updating the component temperature.

Raises
  • ValueError – if no temperature points found within a block

  • RuntimeError – if tempGrid and tempField are different lengths

updateComponentTemp(b, c, temp: float, updateNDensForRadialExp: bool = True)[source]

update component temperatures with a provided temperature

Parameters
  • b (Block) – parent block for c

  • c (Component) – component to which the temperature, temp, is to be applied

  • temp (float) – new component temperature in C

  • updateNDensForRadialExp (bool) – boolean to determine whether or not the component number densities should be updated to account for the radial expansion/contraction associated with the new temperature

Notes

  • “reference” height and temperature are the current states; i.e. before
    1. the new temperature, temp, is applied to the component, and

    2. the component is axially expanded

  • Setting updateNDensForRadialExp to False isolates the number density changes due to the temp change to just the axial dim. This is useful for testing. However, in practical use updateNDensForRadialExp should be set to True to capture radial expansion/contraction effects associated with updating the component temperature.

computeThermalExpansionFactors()[source]

computes expansion factors for all components via thermal expansion

getExpansionFactor(c)[source]

retrieves expansion factor for c

Parameters

c (Component) – Component to retrive expansion factor for

determineTargetComponent(b, flagOfInterest=None)[source]

determines target component, stores it on the block, and appends it to self._componentDeterminesBlockHeight

Parameters
  • b (Block) – block to specify target component for

  • flagOfInterest (Flags) – the flag of interest to identify the target component

Notes

  • if flagOfInterest is None, finds the component within b that contains flags that are defined in a preferred order of flags, or barring that, in b.p.flags

  • if flagOfInterest is not None, finds the component that contains the flagOfInterest.

Raises
isTargetComponent(c)[source]

returns bool if c is a target component

Parameters

c (Component) – Component to check target component status