armi.reactor.converters.axialExpansionChanger.expansionData module

Data container for axial expansion.

armi.reactor.converters.axialExpansionChanger.expansionData.iterSolidComponents(b: Block) Iterable[Component][source]

Iterate over all solid components in the block.

armi.reactor.converters.axialExpansionChanger.expansionData.getSolidComponents(b: Block) list['Component'][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.

See also

iterSolidComponents(), suited

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

Bases: object

Data container for axial expansion.

The primary responsibility of this class is to determine the axial expansion factors for each solid component in the assembly. Expansion factors can be computed from the component temperatures in computeThermalExpansionFactors() or provided directly to the class via setExpansionFactors().

This class relies on the concept of a “target” expansion component for each block. While components will expand at different rates, the final height of the block must be determined. The target component, determined by determineTargetComponents(), will drive the total height of the block post-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 caculated from
    • c.inputTemperatureInC to c.temperatureInC when True, or

    • some other reference temperature and c.temperatureInC when False

componentReferenceTemperature: dict['Component', float]
setExpansionFactors(components: list['Component'], expFrac: list[float])[source]

Sets user defined expansion fractions.

Parameters:
  • components (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 components

Raises:

RuntimeError – If components 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: Component, 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: Component)[source]

Retrieves expansion factor for c.

Parameters:

c (Component) – Component to retrive expansion factor for

determineTargetComponent(b: Block, flagOfInterest: Optional[Flags] = None) Component[source]

Determines the component who’s expansion will determine block height.

This information is also stored on the block at Block.p.axialExpTargetComponent for faster retrieval later.

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

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

Returns:

Component identified as target component, if found.

Return type:

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: Component) bool[source]

Returns bool if c is a target component.

Parameters:

c (Component) – Component to check target component status