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:
FuelHandlerImplements the entire interface but with empty methods.
- class armi.physics.fuelCycle.tests.test_assemblyRotationAlgorithms.ShuffleAndRotateTestHelper(methodName='runTest')[source]
Bases:
TestCaseFixture 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
bdoes 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:
ShuffleAndRotateTestHelperTest 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:
ShuffleAndRotateTestHelperCreate 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 -> thirdfirstis moved to the location ofsecondand rotated by comparingfirstburnup againstsecondpin powers.secondis moved to the location ofthirdand rotated by comparingsecondburnup againstthirdpin powers.
where:
firstburnup is maximized in the upper left direction.secondpin power is minimized along the lower left direction.secondburnup is maximized in the upper right direction.thirdpin power is minimized in the direct right direction.
We should expect:
firstis rotated from upper left to lower left => two 60 degree CCW rotations.secondis rotated from upper right to direct right => five 60 degree CCW rotations.
- class armi.physics.fuelCycle.tests.test_assemblyRotationAlgorithms.SimpleRotationTests(methodName='runTest')[source]
Bases:
ShuffleAndRotateTestHelperTest 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.