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.

Notes

Calling this method will result in an increase in mass via applyColdHeightMassIncrease!

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

Bases: object

Axially expand or contract assemblies or an entire core.

Variables:
  • linked (AssemblyAxialLinkage) – establishes object containing axial linkage information

  • 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/contraction 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, expandFromTinputToThot: bool = False)[source]

Perform thermal expansion/contraction 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.

  • expandFromTinputToThot (bool) – determines if thermal expansion factors should be calculated from c.inputTemperatureInC to c.temperatureInC (True) or some other reference temperature and c.temperatureInC (False)

reset()[source]
setAssembly(a, setFuel=True, expandFromTinputToThot=False)[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.

expandFromTinputToThot: bool

determines if thermal expansion factors should be calculated from c.inputTemperatureInC to c.temperatureInC (True) or some other reference temperature and c.temperatureInC (False)

Notes

When considering thermal expansion, if there is an axial temperature distribution on the assembly, the axial expansion methodology will NOT perfectly preseve mass. The magnitude of the gradient of the temperature distribution is the primary factor in determining the cumulative loss of mass conservation. Additional details will be documented in axialExpansion of the documentation.

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.

armi.reactor.converters.axialExpansionChanger.getSolidComponents(b)[source]

Return list of components in the block that have solid material.

Notes

Axial expansion only needs to be applied to solid materials. We should not update number densities on fluid materials to account for changes in block height.

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

Bases: object

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

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

  • linkedBlocks (dict) –

    • keys = Block

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

  • linkedComponents (dict) –

    • keys = Component

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

See also

-, -

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

Bases: object

Object containing data needed for axial expansion.

Parameters:
  • a (Assembly) – Assembly to assign component-wise expansion data to

  • setFuel (bool) – used to determine if fuel component should be set as axial expansion target component during initialization. see self._isFuelLocked

  • expandFromTinputToThot (bool) – determines if thermal expansion factors should be calculated from c.inputTemperatureInC to c.temperatureInC (True) or some other reference temperature and c.temperatureInC (False)

setExpansionFactors(componentLst: List, expFrac: List)[source]

Sets user defined expansion fractions.

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

  • expFrac (List[float]) – list of L1/L0 height changes that are to be applied to componentLst

Raises:

RuntimeError – If componentLst and expFrac are different lengths

updateComponentTempsBy1DTempField(tempGrid, tempField)[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

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()

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

  • RuntimeError – if tempGrid and tempField are different lengths

updateComponentTemp(c, temp: float)[source]

Update component temperatures with a provided temperature.

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

  • temp (float) – new component temperature in C

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

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