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.
- class armi.reactor.tests.test_blocks.TestDetailedNDensUpdate(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_blocks.Block_TestCase(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.
- 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_getSortedComponentsInsideOfComponentClad()[source]
Test that components can be sorted within a block and returned in the correct order.
For an arbitrary example: a clad component.
- test_getSortedComponentsInsideOfComponentDuct()[source]
Test that components can be sorted within a block and returned in the correct order.
For an arbitrary example: a duct.
- 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_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
- class armi.reactor.tests.test_blocks.BlockEnergyDepositionConstants(methodName='runTest')[source]
Bases:
TestCase
Tests the energy deposition methods.
MagicMocks xsCollections.compute*Constants() – we’re not testing those methods specifically so just make sure they’re hit
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_getTotalEnergyGenerationConstants(mock_capture, mock_fission)[source]
Mock both xsCollections methods so you get complete coverage.
- test_getFissionEnergyDepositionConstants(mock_method)[source]
Test RuntimeError and that it gets to the deposition constant call.
- test_getCaptureEnergyGenerationConstants(mock_method)[source]
Test RuntimeError and that it gets to the deposition constant call.
- class armi.reactor.tests.test_blocks.TestNegativeVolume(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_blocks.HexBlock_TestCase(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.
- test_block_dims()[source]
Tests that the block class can provide basic dimensionality information about itself.
- 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.
- class armi.reactor.tests.test_blocks.ThRZBlock_TestCase(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_blocks.CartesianBlock_TestCase(methodName='runTest')[source]
Bases:
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
- class armi.reactor.tests.test_blocks.MassConservationTests(methodName='runTest')[source]
Bases:
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).