armi.reactor.grids package
This contains structured meshes in multiple geometries and spatial locators (i.e. locations).
Grids
are objects that map indices (i, j, k) to spatial locations
(x,y,z) or (t,r,z). They are useful for arranging things in reactors, such as:
Fuel assemblies in a reactor
Plates in a heat exchanger
Pins in a fuel assembly
Blocks in a fuel assembly (1-D)
Fast reactors often use a hexagonal grid, while other reactors may be better suited for Cartesian or RZT grids. This module contains representations of all these.
Grid
s can be defined by any arbitrary combination of absolute grid boundaries and
unit step directions.
Associated with grids are IndexLocations
. Each of these maps
to a single cell in a grid, or to an arbitrary point in the continuous space represented
by a grid. When a Grid` is built, it builds a collection of IndexLocation
s, one
for each cell.
In the ARMI armi.reactor
module, each object is assigned a locator either from
a grid or in arbitrary, continuous space (using a CoordinateLocation
) on the
spatialLocator
attribute.
Below is a basic example of how to use a 2-D grid:
>>> grid = CartesianGrid.fromRectangle(1.0, 1.0) # 1 cm square-pitch Cartesian grid
>>> location = grid[1,2,0]
>>> location.getGlobalCoordinates()
array([ 1., 2., 0.])
Grids can be chained together in a parent-child relationship. This is often used in ARMI
where a 1-D axial grid (e.g. in an assembly) is being positioned in a core or spent-fuel
pool. See example in
armi.reactor.tests.test_grids.TestSpatialLocator.test_recursion()
.
The “radial” (ring, position) indexing used in DIF3D can be converted to and from the
more quasi-Cartesian indexing in a hex mesh easily with the utility methods
HexGrid.getRingPos()
and indicesToRingPos()
.
This module is designed to satisfy the spatial arrangement requirements of the
Reactor package
.
Throughout the module, the term global refers to the top-level coordinate system while the word local refers to within the current coordinate system defined by the current grid.
- armi.reactor.grids.locatorLabelToIndices(label: str) Tuple[int, int, Optional[int]] [source]
Convert a locator label to numerical i,j,k indices.
If there are only i,j indices, make the last item None
Submodules
- armi.reactor.grids.axial module
- armi.reactor.grids.cartesian module
CartesianGrid
CartesianGrid.fromRectangle()
CartesianGrid.overlapsWhichSymmetryLine()
CartesianGrid.getRingPos()
CartesianGrid.getIndicesFromRingAndPos()
CartesianGrid.getMinimumRings()
CartesianGrid.getPositionsInRing()
CartesianGrid.locatorInDomain()
CartesianGrid.changePitch()
CartesianGrid.getSymmetricEquivalents()
CartesianGrid.pitch
CartesianGrid.armiObject
- armi.reactor.grids.constants module
- armi.reactor.grids.grid module
- armi.reactor.grids.hexagonal module
HexGrid
HexGrid.fromPitch()
HexGrid.pitch
HexGrid.indicesToRingPos()
HexGrid.getMinimumRings()
HexGrid.getPositionsInRing()
HexGrid.getNeighboringCellIndices()
HexGrid.getLabel()
HexGrid.getIndicesFromRingAndPos()
HexGrid.getRingPos()
HexGrid.overlapsWhichSymmetryLine()
HexGrid.getSymmetricEquivalents()
HexGrid.triangleCoords()
HexGrid.changePitch()
HexGrid.locatorInDomain()
HexGrid.isInFirstThird()
HexGrid.generateSortedHexLocationList()
HexGrid.allPositionsInThird()
HexGrid.armiObject
- armi.reactor.grids.locations module
LocationBase
IndexLocation
IndexLocation.detachedCopy()
IndexLocation.parentLocation
IndexLocation.indices
IndexLocation.getCompleteIndices()
IndexLocation.getLocalCoordinates()
IndexLocation.getGlobalCoordinates()
IndexLocation.getGlobalCellBase()
IndexLocation.getGlobalCellTop()
IndexLocation.getRingPos()
IndexLocation.getSymmetricEquivalents()
IndexLocation.distanceTo()
MultiIndexLocation
CoordinateLocation
addingIsValid()
- armi.reactor.grids.structuredgrid module
GridParameters
StructuredGrid
StructuredGrid.isAxialOnly
StructuredGrid.reduce()
StructuredGrid.offset
StructuredGrid.items()
StructuredGrid.backUp()
StructuredGrid.restoreBackup()
StructuredGrid.getCoordinates()
StructuredGrid.getCellBase()
StructuredGrid.getCellTop()
StructuredGrid.getNeighboringCellIndices()
StructuredGrid.getAboveAndBelowCellIndices()
StructuredGrid.getIndexBounds()
StructuredGrid.getBounds()
StructuredGrid.getLocatorFromRingAndPos()
StructuredGrid.getIndicesFromRingAndPos()
StructuredGrid.getMinimumRings()
StructuredGrid.getPositionsInRing()
StructuredGrid.getRingPos()
StructuredGrid.getAllIndices()
StructuredGrid.armiObject
StructuredGrid.pitch
- armi.reactor.grids.thetarz module
ThetaRZGrid
ThetaRZGrid.getSymmetricEquivalents()
ThetaRZGrid.fromGeom()
ThetaRZGrid.getRingPos()
ThetaRZGrid.getIndicesFromRingAndPos()
ThetaRZGrid.getCoordinates()
ThetaRZGrid.indicesOfBounds()
ThetaRZGrid.locatorInDomain()
ThetaRZGrid.getMinimumRings()
ThetaRZGrid.getPositionsInRing()
ThetaRZGrid.overlapsWhichSymmetryLine()
ThetaRZGrid.pitch()
ThetaRZGrid.armiObject