armi.reactor.tests.test_reactors module

Testing for reactors.py.

armi.reactor.tests.test_reactors.buildOperatorOfEmptyHexBlocks(customSettings=None)[source]

Builds a operator w/ a reactor object with some hex assemblies and blocks, but all are empty.

Doesn’t depend on inputs and loads quickly.

Parameters:

customSettings (dict) – Dictionary of off-default settings to update

armi.reactor.tests.test_reactors.buildOperatorOfEmptyCartesianBlocks(customSettings=None)[source]

Builds a operator w/ a reactor object with some Cartesian assemblies and blocks, but all are empty.

Doesn’t depend on inputs and loads quickly.

Parameters:

customSettings (dict) – Off-default settings to update

class armi.reactor.tests.test_reactors.ReactorTests(methodName='runTest')[source]

Bases: TestCase

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.

class armi.reactor.tests.test_reactors.HexReactorTests(methodName='runTest')[source]

Bases: ReactorTests

This is meant to pair with the HexReactorReadOnlyTests unit test class.

The tests in this class all modify the Reactor object, so we need to create a new test reactor for each test.

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_getAssembliesInCircularRing()[source]
test_getAssembliesInHexRing()[source]
test_factorySortSetting()[source]

Create a core object from an input yaml.

test_getSetParameters()[source]

This test works through multiple levels of the data model hierarchy to test ability to modify parameters.

Test Case: Parameters are accessible throughout the armi tree. T_ARMI_PARAM1
signature: test_getSetParameters
requirements: R_ARMI_PARAM
Test Case: Ensure there is a setting for total core power. T_ARMI_SETTINGS_POWER0
signature: test_getSetParameters
requirements: R_ARMI_SETTINGS_POWER
test_sortChildren()[source]
test_sortAssemByRing()[source]

Demonstrate ring/pos sorting.

test_growToFullCore()[source]
test_genBlocksByLocName()[source]
test_setPitchUniform()[source]
test_normalizeNames()[source]
test_setB10VolOnCreation()[source]

Test the setting of b.p.initialB10ComponentVol.

test_getReactor()[source]

The Core object can return its Reactor parent; test that getter.

test_addMoreNodes()[source]
test_restoreReactor()[source]

Restore a reactor after growing it from third to full core.

Test Case: Convert a third-core to a full-core geometry and then restore it. T_ARMI_THIRD_TO_FULL_CORE1
signature: test_restoreReactor
test_saveAllFlux()[source]
test_getFluxVector()[source]
test_getFuelBottomHeight()[source]
test_isPickleable()[source]
test_removeAssemblyNoSfp()[source]
test_createAssemblyOfType()[source]

Test creation of new assemblies.

test_createAssemOfTypeExpandCore()[source]

Test creation of new assemblies in an expanded core.

test_getScalarEvolution()[source]
test_ifMissingSpatialGrid()[source]
test_pinCoordsAllBlocks()[source]

Make sure all blocks can get pin coords.

test_updateBlockBOLHeights_DBLoad()[source]

Test that blueprints assemblies are expanded in DB load.

test_buildManualZones()[source]
test_buildManualZonesEmpty()[source]
test_setPowerIfNecessary()[source]
test_findAllMeshPoints()[source]

Test findAllMeshPoints().

Test Case: Test that the reactor can calculate its core block mesh. T_ARMI_R_MESH
signature: test_findAllMeshPoints
requirements: R_ARMI_R_MESH
test_removeAssembliesInRing()[source]
test_removeAssembly()[source]

Test the removeAssembly method.

In particular, the Settings here set trackAssems to True, so when an Assembly is removed from the Core, it shows up in the SFP.

test_removeAssembliesInRingHex()[source]

Since the test reactor is hex, we need to use the overrideCircularRingMode option to remove assemblies from it.

class armi.reactor.tests.test_reactors.HexReactorReadOnlyTests(methodName='runTest')[source]

Bases: TestCase

This is meant to pair with the HexReactorTests unit test class.

The tests in this class only READ, and not WRITE to the Reactor object, so we only have to create one test reactor.

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_coreSfp()[source]

The reactor object includes a core and an SFP.

Test Case: The reactor object is a composite. T_ARMI_R
signature: test_coreSfp
requirements: R_ARMI_R
test_getTotalParam()[source]
test_geomType()[source]
test_getBlocksByIndices()[source]
test_getAllXsSuffixes()[source]
test_countBlocksOfType()[source]
test_countFuelAxialBlocks()[source]

Tests that the users definition of fuel blocks is preserved.

test_getFirstFuelBlockAxialNode()[source]
test_getMaxAssembliesInHexRing()[source]
test_getMaxNumPins()[source]
test_findAxialMeshIndexOf()[source]
test_findAllAxialMeshPoints()[source]
test_findAxialMeshsSubmesh()[source]

Find all axial mesh points with a provided sub-mesh.

test_findAllAziMeshPoints()[source]
test_findAllRadMeshPoints()[source]
test_getAssemblyPitch()[source]
test_getNumAssemsAllRingsFilled()[source]

Basic test of getNumAssembliesWithAllRingsFilledOut.

test_getNumAssemsWithAllRingsBipass()[source]

Test edge case in getNumAssembliesWithAllRingsFilledOut by bypassing some of the logic.

test_getNumEnergyGroups()[source]
test_getMinimumPercentFluxInFuel()[source]
test_getAssemblyWithLoc()[source]

Get assembly by location, in a couple different ways to ensure they all work.

Test Case: Get assembly by location. T_ARMI_R_GET_ASSEM0
signature: test_getAssemblyWithLoc
requirements: R_ARMI_R_GET_ASSEM
test_getAssemblyWithName()[source]

Test getting an assembly by name.

Test Case: Get assembly by name. T_ARMI_R_GET_ASSEM1
signature: test_getAssemblyWithName
requirements: R_ARMI_R_GET_ASSEM
test_getDominantMaterial()[source]
test_getSymmetryFactor()[source]

Test getSymmetryFactor().

Test Case: Get the core symmetry. T_ARMI_R_SYMM
signature: test_getSymmetryFactor
requirements: R_ARMI_R_SYMM
test_getAssembliesOnSymmetryLine()[source]
test_getGridBounds()[source]

Test getGridBounds() works on different scales.

Test Case: Test that assembly grids nest inside core grids. T_ARMI_GRID_NEST
signature: test_getGridBounds
requirements: R_ARMI_GRID_NEST
test_locations()[source]
test_getMass()[source]
test_getNumRings()[source]
test_whenNoAssemblies(mockGetAssemblies)[source]

Test various edge cases when there are no assemblies.

test_addMultipleCores()[source]

Test the catch that a reactor can only have one core.

test_getNozzleTypes()[source]
test_getAvgTemp()[source]
test_getNuclideCategories()[source]

Test that nuclides are categorized correctly.

test_differentNuclideModels()[source]
test_applyThermalExpanCoreConst()[source]

Test that assemblies in core are correctly expanded.

Notes

All assertions skip the first block as it has no ‘Delta T’ and does not expand.

class armi.reactor.tests.test_reactors.HexReactorSoloTests(methodName='runTest')[source]

Bases: ReactorTests

This is meant to pair with the HexReactorTests unit test class.

Each test here creates its own, slightly unique, test reactor.

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_nonUniformAssems()[source]
class armi.reactor.tests.test_reactors.BigHexReactorTests(methodName='runTest')[source]

Bases: ReactorTests

This is meant to pair with the HexReactorTests unit test class.

These tests all need a larger test reactor. Ideally, we will migrate these to smaller test reactors one day.

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_genAssembliesAddedThisCycle()[source]
test_createFreshFeed()[source]
test_getAssemblies()[source]

Basic test of getAssemblies, with and without including the SFP.

Test Case: The spent fuel pool is a Composite structure. T_ARMI_SFP2
signature: test_getAssemblies
requirements: R_ARMI_SFP
test_findNeighbors()[source]

Find neighbors of a given assembly.

Test Case: Retrieve neighboring assemblies of a given assembly. T_ARMI_R_FIND_NEIGHBORS
signature: test_findNeighbors
class armi.reactor.tests.test_reactors.CartesianReactorTests(methodName='runTest')[source]

Bases: ReactorTests

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_add()[source]
test_getAssemblyPitch()[source]
test_getAssembliesInSquareRing(exclusions=[2])[source]
test_getNuclideCategoriesLogging()[source]

Simplest possible test of the getNuclideCategories method and its logging.

class armi.reactor.tests.test_reactors.CartesianReactorNeighborTests(methodName='runTest')[source]

Bases: ReactorTests

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_findNeighborsCartesian()[source]

Find neighbors of a given assembly in a Cartesian grid.