armi.reactor.tests.test_components module

Tests functionalities of components within ARMI.

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

getCircleVoidDict()[source]
getCircleFuelDict()[source]
test_factory()[source]

Creating and verifying void and fuel components.

test_componentInitializationAndDuplication()[source]

Initialize and duplicate a component, veifying the parameters.

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

Bases: 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 Component

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

Bases: 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 Component

test_initializeComponentMaterial()[source]

Creating component with single material.

test_setNumberDensity()[source]

Test setting a single number density.

test_setNumberDensities()[source]

Test setting multiple number densities.

test_solid_material()[source]

Determine if material is solid.

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

Bases: 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 NullComponent

test_cmp()[source]

Test null component.

test_nonzero()[source]
test_getDimension()[source]

Test getting empty component.

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

Bases: 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 UnshapedComponent

componentMaterial = 'HT9'
componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'area': 3.141592653589793}
test_getComponentArea()[source]
test_getBoundingCircleOuterDiameter()[source]
test_component_less_than()[source]

Ensure that comparisons between components properly reference bounding circle outer diameter.

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

Bases: 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 arbitrary shape, mass is conserved.

test_volumeAfterClearCache()[source]

Test volume after cache has been cleared.

test_densityConsistent()[source]

Testing the Component matches quick hand calc.

test_density()[source]

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

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

Bases: 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 DerivedShape

componentMaterial = 'Sodium'
componentDims = {'Thot': 400.0, 'Tinput': 25.0, 'area': 1.0}
test_getBoundingCircleOuterDiameter()[source]
test_computeVolume()[source]

Test the computeVolume method on a number of components in a block.

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

Bases: TestShapedComponent

Test circle shaped 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 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_getDimension()[source]

Test getting component dimension at specific temperature.

test_thermallyExpands()[source]

Test that ARMI can thermally expands a circle.

test_getBoundingCircleOuterDiameter()[source]
test_getCircleInnerDiameter()[source]
test_dimensionThermallyExpands()[source]
test_getArea()[source]

Calculate area of circle.

test_componentInteractionsLinkingByDimensions()[source]

Tests linking of Components by dimensions.

The component gap, representing the fuel-clad gap filled with Void, is defined with dimensions that depend on the fuel outer diameter and clad inner diameter. The resolveLinkedDims() method links the gap dimensions appropriately when the Component is constructed, and the test shows the area of the gap is calculated correctly based on the thermally-expanded dimensions of the fuel and clad Components.

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.

test_fuelMass()[source]
class armi.reactor.tests.test_components.TestComponentExpansion(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.

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: TestShapedComponent

Test triangle shaped 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 Triangle

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

Calculate area of triangle.

test_thermallyExpands()[source]

Test that ARMI can thermally expands a triangle.

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

Bases: TestShapedComponent

Test rectangle shaped 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 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]

Get outer diameter bounding circle.

test_getCircleInnerDiameter()[source]
test_getArea()[source]

Calculate area of rectangle.

test_thermallyExpands()[source]

Test that ARMI can thermally expands a rectangle.

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

Bases: 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 SolidRectangle

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

Test get bounding circle of the outer diameter.

test_getArea()[source]

Calculate area of solid rectangle.

test_thermallyExpands()[source]

Test that ARMI can thermally expands a solid rectangle.

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

Bases: TestShapedComponent

Test square shaped 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 Square

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

Get bounding circle outer diameter.

test_getCircleInnerDiameter()[source]
test_getArea()[source]

Calculate area of square.

test_thermallyExpands()[source]

Test that ARMI can thermally expands a square.

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

Bases: 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 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]

Calculate area of cube.

test_thermallyExpands()[source]

Test that ARMI can thermally expands a cube.

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

Bases: TestShapedComponent

Test hexagon shaped 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 Hexagon

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

Get perimeter of hexagon.

test_getBoundingCircleOuterDiameter()[source]
test_getCircleInnerDiameter()[source]
test_getArea()[source]

Calculate area of hexagon.

test_thermallyExpands()[source]

Test that ARMI can thermally expands a hexagon.

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

Bases: TestShapedComponent

Test holed hexagon shaped 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 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]

Calculate area of holed hexagon.

test_thermallyExpands()[source]

Test that ARMI can thermally expands a holed hexagon.

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

Bases: 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 HexHoledCircle

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'holeOP': 3.6, 'mult': 1.0, 'od': 16.5}
test_getCircleInnerDiameter()[source]
test_getArea()[source]

Calculate area of hex holed circle.

test_thermallyExpands()[source]

Test that ARMI can thermally expands a holed hexagon.

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

Bases: 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 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]

Calculate area of holed rectangle.

test_thermallyExpands()[source]
test_dimensionThermallyExpands()[source]
class armi.reactor.tests.test_components.TestHoledSquare(methodName='runTest')[source]

Bases: TestHoledRectangle

Test holed square shaped 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 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: TestShapedComponent

Test helix shaped 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 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]

Calculate area of helix.

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: 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 Sphere

componentDims = {'Thot': 430.0, 'Tinput': 25.0, 'id': 0.0, 'mult': 3, 'od': 1.0}
test_getVolume()[source]

Calculate area of sphere.

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

Bases: 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 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: 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 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 Update dimensions.

test_thermallyExpands()[source]
test_getBoundingCircleOuterDiameter()[source]
class armi.reactor.tests.test_components.TestMaterialAdjustments(methodName='runTest')[source]

Bases: 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_setMassFracOnComponentMaterial()[source]

Checks for valid and invalid mass fraction assignments on a component’s material.

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]