armi.reactor.tests.test_blocks module

Tests blocks.py

armi.reactor.tests.test_blocks.buildSimpleFuelBlock()[source]

Return a simple block containing fuel, clad, duct, and coolant.

armi.reactor.tests.test_blocks.loadTestBlock(cold=True)[source]

Build an annular test block for evaluating unit tests.

armi.reactor.tests.test_blocks.applyDummyData(block)[source]

Add some dummy data to a block for physics-like tests.

armi.reactor.tests.test_blocks.getComponentData(component)[source]
class armi.reactor.tests.test_blocks.Block_TestCase(methodName='runTest')[source]

Bases: unittest.case.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.

test_getSmearDensity()[source]
test_getSmearDensityMultipleLiner()[source]
test_timeNodeParams()[source]
test_getType()[source]
test_hasFlags()[source]
test_setType()[source]
test_duplicate()[source]
test_homogenizedMixture()[source]
test_getXsType()[source]
test_27b_setBuGroup()[source]
test_setZeroHeight()[source]

Test that demonstrates that a block’s height can be set to zero.

test_getVolumeFractionsWithZeroHeight()[source]

Tests that the component fractions are the same with a zero height block.

test_getVolumeFractionWithoutParent()[source]

Tests that the volume fraction of a block with no parent is zero.

test_clearDensity()[source]
test_getNumberDensity()[source]
test_getMasses()[source]
test_removeMass()[source]
test_setNumberDensity()[source]
test_setNumberDensities()[source]

Make sure we can set multiple number densities at once.

test_getMass()[source]
test_setMass()[source]
test_getTotalMass()[source]
test_replaceBlockWithBlock()[source]

Tests conservation of mass flag in replaceBlockWithBlock

test_getWettedPerimeter()[source]
test_getFlowAreaPerPin()[source]
test_getFlowArea()[source]
test_getHydraulicDiameter()[source]
test_adjustUEnrich()[source]
test_setLocation()[source]
test_setBuLimitInfo()[source]
test_getTotalNDens()[source]
test_getHMDens()[source]
test_getFissileMassEnrich()[source]
test_getMicroSuffix()[source]
test_getUraniumMassEnrich()[source]
test_getUraniumNumEnrich()[source]
test_getNumberOfAtoms()[source]
test_getPu()[source]
test_adjustDensity()[source]
test_completeInitialLoading()[source]
test_add()[source]
test_hasComponents()[source]
test_getComponentNames()[source]
test_getComponents()[source]
test_getComponent()[source]
test_getComponentsOfShape()[source]
test_getComponentsOfMaterial()[source]
test_getComponentByName()[source]
test_getSortedComponentsInsideOfComponent()[source]

Test that components can be sorted within a block and returned in the correct order.

test_getSortedComponentsInsideOfComponentSpecifiedTypes()[source]
test_getNumComponents()[source]
test_getNumPins()[source]
test_setLinPowByPin()[source]
test_getComponentAreaFrac()[source]
test_100_getPinPitch()[source]
test_101_getPitch()[source]
test_102_setPitch()[source]
test_106_getAreaFractions()[source]
test_rotatePins()[source]
test_expandElementalToIsotopics()[source]

Tests the expand to elementals capability.

test_expandAllElementalsToIsotopics()[source]

Tests the expand all elementals simlutaneously capability.

test_setPitch()[source]

Checks consistency after adjusting pitch

Needed to verify fix to Issue #165.

test_getMfp()[source]

Test mean free path.

test_consistentMassDensityVolumeBetweenColdBlockAndColdComponents()[source]
test_consistentMassDensityVolumeBetweenHotBlockAndHotComponents()[source]
test_consistentAreaWithOverlappingComponents()[source]

Test that negative gap areas correctly account for area overlapping upon thermal expansion.

Notes

This test calculates a reference coolant area by subtracting the areas of the intercoolant, duct, wire wrap, and pins from the total hex block area. The area of the pins is calculated using only the outer radius of the clad. This avoids the use of negative areas as implemented in Block.getVolumeFractions. Na-23 mass will not be conserved as when duct/clad expands sodium is evacuated

See also

armi.reactor.blocks.Block.getVolumeFractions

test_breakFuelComponentsIntoIndividuals()[source]
test_pinMgFluxes()[source]

Test setting/getting of pin-wise fluxes.

Warning

This will likely be pushed to the component level.

test_getComponentsInLinkedOrder()[source]
test_mergeWithBlock()[source]
test_getDimensions()[source]
test_getPlenumPin()[source]
test_hasPinPitch()[source]
test_getReactionRates()[source]
class armi.reactor.tests.test_blocks.Test_NegativeVolume(methodName='runTest')[source]

Bases: unittest.case.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.

test_negativeVolume()[source]

Build a block with WAY too many fuel pins and show that the derived volume is negative

class armi.reactor.tests.test_blocks.HexBlock_TestCase(methodName='runTest')[source]

Bases: unittest.case.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.

test_getArea()[source]
test_coords()[source]
test_getNumPins()[source]
test_symmetryFactor()[source]
test_retainState()[source]

Ensure retainState restores params and spatialGrids.

test_getPinCoords()[source]
test_getPitchHomogeneousBlock()[source]

Demonstrate how to communicate pitch on a hex block with unshaped components.

Notes

This assumes there are 3 materials in the homogeneous block, one with half the area fraction, and 2 with 1/4 each.

test_getDuctPitch()[source]
test_getPinCenterFlatToFlat()[source]
test_gridCreation()[source]
test_gridNumPinsAndLocations()[source]
test_gridNotCreatedMultipleMultiplicities()[source]
class armi.reactor.tests.test_blocks.ThRZBlock_TestCase(methodName='runTest')[source]

Bases: unittest.case.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.

test_radii()[source]
test_theta()[source]
test_axial()[source]
test_verifyBlockDims()[source]

This function is currently null. It consists of a single line that returns nothing. This test covers that line. If the function is ever implemented, it can be tested here.

test_getThetaRZGrid()[source]

Since not applicable to ThetaRZ Grids

test_getWettedPerimeter()[source]
test_getHydraulicDiameter()[source]
class armi.reactor.tests.test_blocks.CartesianBlock_TestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Tests for blocks with rectangular/square outer shape.

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.

PITCH = 70
test_getPitchSquare()[source]
test_getPitchHomogeneousBlock()[source]

Demonstrate how to communicate pitch on a hex block with unshaped components.

Notes

This assumes there are 3 materials in the homogeneous block, one with half the area fraction, and 2 with 1/4 each.

test_getCartesianGrid()[source]

Since not applicable to Cartesian Grids

test_getWettedPerimeter()[source]
test_getHydraulicDiameter()[source]
class armi.reactor.tests.test_blocks.MassConservationTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

Tests designed to verify mass conservation during thermal expansion

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

The point of this test is to determine if the number densities stay the same with two different heights of the same block. Since we want to expand a block from cold temperatures to hot using the fuel expansion coefficient (most important neutronicall), other components are not grown correctly. This means that on the block level, axial expansion will NOT conserve mass of non-fuel components. However, the excess mass is simply added to the top of the reactor in the plenum regions (or any non fueled region).

test_massFuelHeatup()[source]
test_massCladHeatup()[source]
test_massDuctHeatup()[source]
test_massCoolHeatup()[source]

Make sure mass of coolant goes down when it heats up.

test_dimensionDuctHeatup()[source]
test_coldMass()[source]

Verify that the cold mass is what it should be, even though the hot height is input.

At the cold temperature (but with hot height), the mass should be the same as at hot temperature and hot height.

test_massConsistency()[source]

Verify that the sum of the component masses equals the total mass.