armi.reactor.tests.test_components module

Tests functionalities of components within ARMI

class armi.reactor.tests.test_components.TestComponentFactory(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.

getCircleVoidDict()[source]
getCircleFuelDict()[source]
test_factory()[source]
test_componentInitializationAndDuplication()[source]
test_factoryBadShapeName()[source]
test_invalidCoolantComponentAssignment()[source]
class armi.reactor.tests.test_components.TestGeneralComponents(methodName='runTest')[source]

Bases: unittest.case.TestCase

Base test for all individual component tests.

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.

componentCls

alias of armi.reactor.components.component.Component

componentMaterial = 'HT9'
componentDims = {'Thot': 25.0, 'Tinput': 25.0}
class armi.reactor.tests.test_components.TestComponent(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestGeneralComponents

Test the base component.

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.

componentCls

alias of armi.reactor.components.component.Component

test_initializeComponent()[source]
class armi.reactor.tests.test_components.TestNullComponent(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestGeneralComponents

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.

componentCls

alias of armi.reactor.components.NullComponent

test_cmp()[source]
test_nonzero()[source]
test_getDimension()[source]
class armi.reactor.tests.test_components.TestUnshapedComponent(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestGeneralComponents

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.

componentCls

alias of armi.reactor.components.UnshapedComponent

componentMaterial = 'HT9'
componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'area': 3.141592653589793}
test_getComponentArea()[source]
test_getBoundingCircleOuterDiameter()[source]
test_fromComponent()[source]
class armi.reactor.tests.test_components.TestShapedComponent(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestGeneralComponents

Abstract class for all shaped components

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

Test that when we thermally expand any arbirtray shape, mass is conserved

Test Case: Test that ARMI can thermally expand any arbitrary shape. TEST_REACTOR_THERMAL_EXPANSION_0 ../_images/arrow-right-circle.svg
test_volumeAfterClearCache()[source]
test_densityConsistent()[source]
test_density3D()[source]

Testing the Component density gets the correct 3D material density.

class armi.reactor.tests.test_components.TestDerivedShape(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestShapedComponent

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.

componentCls

alias of armi.reactor.components.DerivedShape

componentMaterial = 'Sodium'
componentDims = {'Thot': 400.0, 'Tinput': 25.0, 'area': 1.0}
test_getBoundingCircleOuterDiameter()[source]
class armi.reactor.tests.test_components.TestCircle(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestShapedComponent

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.

componentCls

alias of armi.reactor.components.basicShapes.Circle

componentDims = {'Thot': 25.0, 'Tinput': 25.0, 'id': 5.0, 'mult': 1.5, 'od': 10}
test_getThermalExpansionFactorConservedMassByLinearExpansionPercent()[source]

Test that when ARMI thermally expands a circle, mass is conserved.

Test Case: Test that ARMI correctly thermally expands objects with circular shape. TEST_REACTOR_THERMAL_EXPANSION_1 ../_images/arrow-right-circle.svg
test_getDimension()[source]
test_thermallyExpands()[source]

Test that ARMI can thermally expands a circle

Test Case: Test that ARMI can thermally expands a circle TEST_REACTOR_THERMAL_EXPANSION_2 ../_images/arrow-right-circle.svg
test_getBoundingCircleOuterDiameter()[source]
test_getCircleInnerDiameter()[source]
test_dimensionThermallyExpands()[source]
test_getArea()[source]
test_componentInteractionsLinkingByDimensions()[source]

Tests linking of components by dimensions.

test_badComponentName()[source]

This shows that resolveLinkedDims cannot support names with periods in them

test_componentInteractionsLinkingBySubtraction()[source]

Tests linking of components by subtraction.

test_getNumberDensities()[source]

Test that demonstrates that number densities can be retrieved on from component.

test_changeNumberDensities()[source]

Test that demonstates that the number densities on a component can be modified.

class armi.reactor.tests.test_components.TestComponentExpansion(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.

tCold = 20
tWarm = 50
tHot = 500
coldOuterDiameter = 1.0
test_HT9Expansion()[source]
test_UZrExpansion()[source]
test_B4CExpansion()[source]
runExpansionTests(mat: str, isotope: str)[source]
componentMassIndependentOfInputTemp(mat: str)[source]
expansionConservationHotHeightDefined(mat: str, isotope: str)[source]

Demonstrate tutorial for how to expand and relationships conserved at during expansion.

Notes

  • height taken as hot height and show how quantity is conserved with inputHeightsConsideredHot = True (the default)

expansionConservationColdHeightDefined(mat: str)[source]

Demonstrate that material is conserved at during expansion

Notes

  • height taken as cold height and show how quantity is conserved with inputHeightsConsideredHot = False

class armi.reactor.tests.test_components.TestTriangle(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestShapedComponent

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.

componentCls

alias of armi.reactor.components.basicShapes.Triangle

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'base': 3.0, 'height': 2.0, 'mult': 30}
test_getArea()[source]
test_thermallyExpands()[source]

Test that ARMI can thermally expands a triangle

Test Case: Test that ARMI can thermally expands a triangle TEST_REACTOR_THERMAL_EXPANSION_3 ../_images/arrow-right-circle.svg
test_dimensionThermallyExpands()[source]
class armi.reactor.tests.test_components.TestRectangle(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestShapedComponent

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.

componentCls

alias of armi.reactor.components.basicShapes.Rectangle

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'lengthInner': 4.0, 'lengthOuter': 6.0, 'mult': 2, 'widthInner': 3.0, 'widthOuter': 5.0}
test_negativeArea()[source]
test_getBoundingCircleOuterDiameter()[source]
test_getCircleInnerDiameter()[source]
test_getArea()[source]
test_thermallyExpands()[source]

Test that ARMI can thermally expands a rectangle

Test Case: Test that ARMI can thermally expands a rectangle TEST_REACTOR_THERMAL_EXPANSION_4 ../_images/arrow-right-circle.svg
test_dimensionThermallyExpands()[source]
class armi.reactor.tests.test_components.TestSolidRectangle(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestShapedComponent

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.

componentCls

alias of armi.reactor.components.basicShapes.SolidRectangle

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'lengthOuter': 5.0, 'mult': 1, 'widthOuter': 5.0}
test_getBoundingCircleOuterDiameter()[source]
test_getArea()[source]
test_thermallyExpands()[source]

Test that ARMI can thermally expands a solid rectangle

Test Case: Test that ARMI can thermally expands a solid rectangle TEST_REACTOR_THERMAL_EXPANSION_5 ../_images/arrow-right-circle.svg
test_dimensionThermallyExpands()[source]
class armi.reactor.tests.test_components.TestSquare(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestShapedComponent

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.

componentCls

alias of armi.reactor.components.basicShapes.Square

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'mult': 1, 'widthInner': 2.0, 'widthOuter': 3.0}
test_negativeArea()[source]
test_getBoundingCircleOuterDiameter()[source]
test_getCircleInnerDiameter()[source]
test_getArea()[source]
test_thermallyExpands()[source]

Test that ARMI can thermally expands a square

Test Case: Test that ARMI can thermally expands a square TEST_REACTOR_THERMAL_EXPANSION_6 ../_images/arrow-right-circle.svg
test_dimensionThermallyExpands()[source]
class armi.reactor.tests.test_components.TestCube(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestShapedComponent

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.

componentCls

alias of armi.reactor.components.volumetricShapes.Cube

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'heightInner': 10.0, 'heightOuter': 20.0, 'lengthInner': 4.0, 'lengthOuter': 5.0, 'mult': 2, 'widthInner': 3.0, 'widthOuter': 5.0}
test_negativeVolume()[source]
test_getVolume()[source]
test_thermallyExpands()[source]

Test that ARMI can thermally expands a cube

Test Case: Test that ARMI can thermally expands a cube TEST_REACTOR_THERMAL_EXPANSION_7 ../_images/arrow-right-circle.svg
class armi.reactor.tests.test_components.TestHexagon(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestShapedComponent

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.

componentCls

alias of armi.reactor.components.basicShapes.Hexagon

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'ip': 5.0, 'mult': 1, 'op': 10.0}
test_getPerimeter()[source]
test_getBoundingCircleOuterDiameter()[source]
test_getCircleInnerDiameter()[source]
test_getArea()[source]
test_thermallyExpands()[source]

Test that ARMI can thermally expands a hexagon

Test Case: Test that ARMI can thermally expands a hexagon TEST_REACTOR_THERMAL_EXPANSION_8 ../_images/arrow-right-circle.svg
test_dimensionThermallyExpands()[source]
class armi.reactor.tests.test_components.TestHoledHexagon(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestShapedComponent

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.

componentCls

alias of armi.reactor.components.complexShapes.HoledHexagon

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'holeOD': 3.6, 'mult': 1.0, 'nHoles': 7, 'op': 16.5}
test_getBoundingCircleOuterDiameter()[source]
test_getCircleInnerDiameter()[source]
test_getArea()[source]
test_thermallyExpands()[source]

Test that ARMI can thermally expands a holed hexagon

Test Case: Test that ARMI can thermally expands a holed hexagon TEST_REACTOR_THERMAL_EXPANSION_9 ../_images/arrow-right-circle.svg
test_dimensionThermallyExpands()[source]
class armi.reactor.tests.test_components.TestHoledRectangle(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestShapedComponent

Tests HoledRectangle, and provides much support for HoledSquare 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.

componentCls

alias of armi.reactor.components.complexShapes.HoledRectangle

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'holeOD': 3.6, 'lengthOuter': 16.0, 'mult': 1.0, 'widthOuter': 10.0}
dimsToTestExpansion = ['lengthOuter', 'widthOuter', 'holeOD', 'mult']
setClassDims()[source]
test_getBoundingCircleOuterDiameter()[source]
test_getCircleInnerDiameter()[source]
test_getArea()[source]
test_thermallyExpands()[source]
test_dimensionThermallyExpands()[source]
class armi.reactor.tests.test_components.TestHoledSquare(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestHoledRectangle

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.

componentCls

alias of armi.reactor.components.complexShapes.HoledSquare

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'holeOD': 3.6, 'mult': 1.0, 'widthOuter': 16.0}
dimsToTestExpansion = ['widthOuter', 'holeOD', 'mult']
setClassDims()[source]
test_thermallyExpands()[source]
test_getCircleInnerDiameter()[source]
class armi.reactor.tests.test_components.TestHelix(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestShapedComponent

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.

componentCls

alias of armi.reactor.components.complexShapes.Helix

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'axialPitch': 1.0, 'helixDiameter': 2.0, 'id': 0.1, 'mult': 1.5, 'od': 0.25}
test_getBoundingCircleOuterDiameter()[source]
test_getCircleInnerDiameter()[source]
test_getArea()[source]
test_thermallyExpands()[source]
test_dimensionThermallyExpands()[source]
test_validParameters()[source]

testing the Helix class performs as expected with various inputs

class armi.reactor.tests.test_components.TestSphere(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestShapedComponent

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.

componentCls

alias of armi.reactor.components.volumetricShapes.Sphere

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'id': 0.0, 'mult': 3, 'od': 1.0}
test_getVolume()[source]
test_thermallyExpands()[source]
class armi.reactor.tests.test_components.TestTorus(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestShapedComponent

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.

componentCls

alias of armi.reactor.components.volumetricShapes.Torus

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'inner_minor_radius': 28.73, 'major_radius': 140, 'outer_minor_radius': 30}
test_thermallyExpands()[source]
test_getVolume()[source]
class armi.reactor.tests.test_components.TestRadialSegment(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestShapedComponent

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.

componentCls

alias of armi.reactor.components.volumetricShapes.RadialSegment

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'height': 160, 'inner_radius': 110, 'mult': 1, 'outer_radius': 170}
test_getVolume()[source]
test_thermallyExpands()[source]
test_getBoundingCircleOuterDiameter()[source]
class armi.reactor.tests.test_components.TestDifferentialRadialSegment(methodName='runTest')[source]

Bases: armi.reactor.tests.test_components.TestShapedComponent

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.

componentCls

alias of armi.reactor.components.volumetricShapes.DifferentialRadialSegment

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'height': 160, 'inner_axial': 60, 'inner_radius': 110, 'radius_differential': 60}
test_getVolume()[source]
test_updateDims()[source]
test_thermallyExpands()[source]
test_getBoundingCircleOuterDiameter()[source]
class armi.reactor.tests.test_components.TestMaterialAdjustments(methodName='runTest')[source]

Bases: unittest.case.TestCase

Tests to make sure enrichment and mass fractions can be adjusted properly.

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

Make sure we can set a mass fraction properly.

test_adjustMassFrac_invalid()[source]
test_adjustMassFrac_U235()[source]
test_adjustMassFrac_U()[source]
test_adjustMassFrac_clear_ZR()[source]
test_adjustMassFrac_set_ZR()[source]
test_adjustMassFrac_leave_same()[source]
test_adjustMassEnrichment()[source]
test_getEnrichment()[source]