armi.physics.fuelCycle.tests.test_assemblyRotationAlgorithms module
Tests for tools used to rotate hex assemblies.
Notes
These algorithms are defined in assemblyRotationAlgorithms.py, but they are used in:
FuelHandler.outage()
.
- class armi.physics.fuelCycle.tests.test_assemblyRotationAlgorithms.MockFuelHandler(operator)[source]
Bases:
FuelHandler
Implements the entire interface but with empty methods.
- class armi.physics.fuelCycle.tests.test_assemblyRotationAlgorithms.ShuffleAndRotateTestHelper(methodName='runTest')[source]
Bases:
TestCase
Fixture class to assist in testing rotation of assemblies via the fuel handler.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- N_PINS = 169
- static ensureBlockHasSpatialGrid(b: HexBlock)[source]
If
b
does not have a spatial grid, auto create one.
- setAssemblyPinBurnups(a: HexAssembly, burnups: ndarray)[source]
Prepare the assembly that will be shuffled and rotated.
- setAssemblyPinPowers(a: HexAssembly, pinPowers: ndarray)[source]
Prep the assembly that existed at the site a shuffled assembly will occupy.
- powerWithMinValue(minIndex: int) ndarray [source]
Create a vector of pin powers with a minimum value at a given index.
- class armi.physics.fuelCycle.tests.test_assemblyRotationAlgorithms.TestOptimalAssemblyRotation(methodName='runTest')[source]
Bases:
ShuffleAndRotateTestHelper
Test the burnup dependent assembly rotation methods.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_maxBurnupAtCenterNoRotation()[source]
If max burnup pin is at the center, no rotation is suggested.
- test_oppositeRotation()[source]
Test a 180 degree rotation is suggested when the max burnup pin is opposite the lowest power pin.
Use the second ring of the hexagon because it’s easier to write out pin locations and check work.
Notes
Use zero-indexed pin location not pin ID to assign burnups and powers. Since we have a single component,
Block.p.linPowByPin[i] <-> Component.p.pinPercentBu[i]
- class armi.physics.fuelCycle.tests.test_assemblyRotationAlgorithms.TestFuelHandlerMgmtTools(methodName='runTest')[source]
Bases:
ShuffleAndRotateTestHelper
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_buRotationWithFreshFeed()[source]
Test that rotation works if a new assembly is swapped with fresh fuel.
Fresh feed assemblies will not exist in the reactor, and various checks that try to the “previous” assembly’s location can fail.
- test_buRotationWithStationaryRotation()[source]
Test that the burnup equalizing rotation algorithm works on non-shuffled assemblies.
- test_rotateInShuffleQueue()[source]
Test for expected behavior when multiple assemblies are shuffled and rotated in one outage.
Examine the behavior of three assemblies:
first -> second -> third
first
is moved to the location ofsecond
and rotated by comparingfirst
burnup againstsecond
pin powers.second
is moved to the location ofthird
and rotated by comparingsecond
burnup againstthird
pin powers.
where:
first
burnup is maximized in the upper left direction.second
pin power is minimized along the lower left direction.second
burnup is maximized in the upper right direction.third
pin power is minimized in the direct right direction.
We should expect:
first
is rotated from upper left to lower left => two 60 degree CCW rotations.second
is rotated from upper right to direct right => five 60 degree CCW rotations.
- class armi.physics.fuelCycle.tests.test_assemblyRotationAlgorithms.SimpleRotationTests(methodName='runTest')[source]
Bases:
ShuffleAndRotateTestHelper
Test the simple rotation where assemblies are rotated a fixed amount.
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.