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 viasetExpansionFactors()
.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 tosetFuel (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
toc.temperatureInC
whenTrue
, orsome other reference temperature and
c.temperatureInC
whenFalse
- setExpansionFactors(components: list['Component'], expFrac: list[float])[source]
Sets user defined expansion fractions.
- Parameters:
- 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:
Notes
- “reference” height and temperature are the current states; i.e. before
the new temperature, temp, is applied to the component, and
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:
- 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:
RuntimeError – no target component found
RuntimeError – multiple target components found