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

armi.reactor.tests.test_reactors.loadTestReactor(inputFilePath='/home/runner/work/armi/armi/armi/tests', customSettings=None, inputFileName='armiRun.yaml')[source]

Loads a test reactor. Can be used in other test modules.

Parameters:
  • inputFilePath (str, default=TEST_ROOT) – Path to the directory of the input file.

  • customSettings (dict with str keys and values of any type, default=None) – For each key in customSettings, the cs which is loaded from the armiRun.yaml will be overwritten to the value given in customSettings for that key.

  • inputFileName (str, default="armiRun.yaml") – Name of the input file to run.

Returns:

  • o (Operator)

  • r (Reactor)

armi.reactor.tests.test_reactors.reduceTestReactorRings(r, cs, maxNumRings)[source]

Helper method for the test reactor above.

The goal is to reduce the size of the reactor for tests that don’t neeed such a large reactor, and would run much faster with a smaller one.

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

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_factorySortSetting()[source]
test_sortChildren()[source]
test_sortAssemByRing()[source]

Demonstrate ring/pos sorting.

test_getTotalParam()[source]
test_geomType()[source]
test_growToFullCore()[source]
test_getBlocksByIndices()[source]
test_getAllXsSuffixes()[source]
test_countBlocksOfType()[source]
test_normalizeNames()[source]
test_setB10VolOnCreation()[source]

Test the setting of b.p.initialB10ComponentVol.

test_countFuelAxialBlocks()[source]

Tests that the users definition of fuel blocks is preserved.

Test Case: Tests that the users definition of fuel blocks is preserved. TEST_REACTOR_2 ../_images/arrow-right-circle.svg
signature: test_countFuelAxialBlocks
links outgoing: REQ_REACTOR
test_getFirstFuelBlockAxialNode()[source]
test_getMaxAssembliesInHexRing()[source]
test_getMaxNumPins()[source]
test_addMoreNodes()[source]
test_findAxialMeshIndexOf()[source]
test_findAllAxialMeshPoints()[source]
test_findAllAxialMeshPoints_wSubmesh()[source]
test_findAllAziMeshPoints()[source]
test_findAllRadMeshPoints()[source]
test_findNeighbors()[source]
test_getAssembliesInCircularRing()[source]
test_getAssembliesInHexRing()[source]
test_genAssembliesAddedThisCycle()[source]
test_getAssemblyPitch()[source]
test_getNumAssembliesWithAllRingsFilledOut()[source]
test_getNumEnergyGroups()[source]
test_getMinimumPercentFluxInFuel()[source]
test_getAssembly()[source]
test_restoreReactor()[source]
test_differentNuclideModels()[source]
test_getDominantMaterial()[source]
test_getSymmetryFactor()[source]
test_getAssembliesOnSymmetryLine()[source]
test_saveAllFlux()[source]
test_getFluxVector()[source]
test_getFuelBottomHeight()[source]
test_getGridBounds()[source]
test_locations()[source]
test_getMass()[source]
test_isPickleable()[source]
test_removeAssembly()[source]
test_removeAssemblyNoSfp()[source]
test_removeAssembliesInRing()[source]
test_removeAssembliesInRingByCount()[source]
test_removeAssembliesInRingHex()[source]

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

test_getNozzleTypes()[source]
test_createAssemblyOfType()[source]

Test creation of new assemblies.

test_createFreshFeed()[source]
test_createAssemblyOfTypeExpandedCore()[source]

Test creation of new assemblies in an expanded core.

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

Make sure all blocks can get pin coords.

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

test_updateBlockBOLHeights_DBLoad()[source]

Test that blueprints assemblies are expanded in DB load.

Notes

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

test_buildManualZones()[source]
test_buildManualZonesEmpty()[source]
test_getNuclideCategories()[source]

Test that nuclides are categorized correctly.

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

Simplest possible test of the getNuclideCategories method and its logging.