armi.reactor.converters.tests.test_axialExpansionChanger module

Test axialExpansionChanger

class armi.reactor.converters.tests.test_axialExpansionChanger.AxialExpansionTestBase(methodName='runTest')[source]

Bases: unittest.case.TestCase

common methods and variables for unit 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.

Steel_Component_Lst = [<Flags.DUCT: 549755813888>, <Flags.GRID_PLATE: 1099511627776>, <Flags.HANDLING_SOCKET: 2199023255552>, <Flags.INLET_NOZZLE: 4398046511104>, <Flags.CLAD: 70368744177664>, <Flags.WIRE: 562949953421312>, <Flags.ACLP: 9007199254740992>, <Flags.GUIDE_TUBE: 288230376151711744>]
class armi.reactor.converters.tests.test_axialExpansionChanger.Temperature(L, coldTemp=25.0, hotInletTemp=360.0, numTempGridPts=25, tempSteps=100, uniform=False)[source]

Bases: object

create and store temperature grid/field

Parameters
  • L (float) – length of self.tempGrid. Should be the height of the corresponding assembly.

  • coldTemp (float) – component as-built temperature

  • hotInletTemp (float) – temperature closest to bottom of assembly. Interpreted as inlet temp at nominal operations.

  • numTempGridPts (integer) – the number of temperature measurement locations along the z-axis of the assembly

  • tempSteps (integer) – the number of temperatures to create (analogous to time steps)

class armi.reactor.converters.tests.test_axialExpansionChanger.TestAxialExpansionHeight(methodName='runTest')[source]

Bases: armi.reactor.converters.tests.test_axialExpansionChanger.AxialExpansionTestBase, unittest.case.TestCase

verify that test assembly is expanded correctly

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

test the axial expansion gives correct heights for component-based expansion

test_AxialMesh()[source]

test that mesh aligns with block tops for component-based expansion

class armi.reactor.converters.tests.test_axialExpansionChanger.TestConservation(methodName='runTest')[source]

Bases: armi.reactor.converters.tests.test_axialExpansionChanger.AxialExpansionTestBase, unittest.case.TestCase

verify that conservation is maintained in assembly-level axial 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.

expandAssemForMassConservationTest()[source]

initialize class variables for mass conservation checks

test_ColdThermalExpansionContractionConservation()[source]

thermally expand and then contract to ensure original state is recovered

Notes: - temperature field is isothermal and initially at 25 C

test_HotThermalExpansionContractionConservation()[source]

thermally expand and then contract to ensure original state is recovered

Notes: - temperature field is isothermal and initially at 250 C

test_PrescribedExpansionContractionConservation()[source]

expand all components and then contract back to original state

Notes

  • uniform expansion over all components within the assembly

  • 10 total expansion steps: 5 at +1%, and 5 at -1%

  • assertion on if original axial mesh matches the final axial mesh

test_TargetComponentMassConservation()[source]

tests mass conservation for target components

test_SteelConservation()[source]

tests mass conservation for total assembly steel

Component list defined by, Steel_Component_List, in GetSteelMass()

test_NoMovementACLP()[source]

ensures that above core load pad (ACLP) does not move during fuel-only expansion

test_reset()[source]
test_computeThermalExpansionFactors()[source]

ensure expansion factors are as expected

class armi.reactor.converters.tests.test_axialExpansionChanger.TestManageCoreMesh(methodName='runTest')[source]

Bases: unittest.case.TestCase

verify that manage core mesh unifies the mesh for detailedAxialExpansion: False

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_manageCoreMesh()[source]
class armi.reactor.converters.tests.test_axialExpansionChanger.TestExceptions(methodName='runTest')[source]

Bases: armi.reactor.converters.tests.test_axialExpansionChanger.AxialExpansionTestBase, unittest.case.TestCase

Verify exceptions are caught

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_isTopDummyBlockPresent()[source]
test_setExpansionFactors()[source]
test_updateComponentTempsBy1DTempFieldValueError()[source]
test_updateComponentTempsBy1DTempFieldRuntimeError()[source]
test_AssemblyAxialExpansionException()[source]

test that negative height exception is caught

test_determineTargetComponentRuntimeErrorFirst()[source]
test_determineTargetComponentRuntimeErrorSecond()[source]
test_isFuelLocked()[source]

ensures that the RuntimeError statement in ExpansionData::_isFuelLocked is raised appropriately

Notes

This is implemented by creating a fuel block that contains no fuel component and passing it to ExpansionData::_isFuelLocked.

test_determineLinked()[source]
test_getLinkedComponents()[source]

test for multiple component axial linkage

class armi.reactor.converters.tests.test_axialExpansionChanger.TestDetermineTargetComponent(methodName='runTest')[source]

Bases: armi.reactor.converters.tests.test_axialExpansionChanger.AxialExpansionTestBase, unittest.case.TestCase

verify determineTargetComponent method is properly updating _componentDeterminesBlockHeight

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_determineTargetComponent()[source]
test_determineTargetComponentBlockWithMultipleFlags()[source]
test_specifyTargetComponet_BlueprintSpecified()[source]
class armi.reactor.converters.tests.test_axialExpansionChanger.TestInputHeightsConsideredHot(methodName='runTest')[source]

Bases: unittest.case.TestCase

verify thermal expansion for process loading of core

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

block heights are cold and should be expanded

Notes

Two assertions here:
  1. total assembly height should be preserved (through use of top dummy block)

  2. in armi.tests.detailedAxialExpansion.refSmallReactorBase.yaml, Thot > Tinput resulting in a non-zero DeltaT. Each block in the expanded case should therefore be a different height than that of the standard case. - The one exception is for control assemblies. These designs can be unique from regular

    pin type assemblies by allowing downward expansion. Because of this, they are skipped for axial expansion.

armi.reactor.converters.tests.test_axialExpansionChanger.checkColdBlockHeight(bStd, bExp, assertType, strForAssertion)[source]
class armi.reactor.converters.tests.test_axialExpansionChanger.TestLinkage(methodName='runTest')[source]

Bases: armi.reactor.converters.tests.test_axialExpansionChanger.AxialExpansionTestBase, unittest.case.TestCase

test axial linkage between 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.

runTest(componentsToTest: dict, assertionBool: bool, name: str, commonArgs: Optional[tuple] = None)[source]

runs various linkage tests

Parameters
  • componentsToTest (dict) – keys –> component class type; values –> dimensions specific to key

  • assertionBool (boolean) – expected truth value for test

  • name (str) – the name of the test

  • commonArgs (tuple, optional) – arguments common to all Component class types

Notes

  • components “typeA” and “typeB” are assumed to be vertically stacked

  • two assertions: 1) comparing “typeB” component to “typeA”; 2) comparing “typeA” component to “typeB”

  • the different assertions are particularly useful for comparing two annuli

  • to add Component class types to a test:
    Add dictionary entry with following:

    {Component Class Type: [{<settings for component 1>}, {<settings for component 2>}]

test_overlappingSolidPins()[source]
test_differentMultNotOverlapping()[source]
test_solidPinNotOverlappingAnnulus()[source]
test_solidPinOverlappingWithAnnulus()[source]
test_annularPinNotOverlappingWithAnnulus()[source]
test_annularPinOverlappingWithAnnuls()[source]
test_thinAnnularPinOverlappingWithThickAnnulus()[source]
test_AnnularHexOverlappingThickAnnularHex()[source]
test_liquids()[source]
test_unshapedComponentAndCircle()[source]
armi.reactor.converters.tests.test_axialExpansionChanger.buildTestAssemblyWithFakeMaterial(name: str, hot: bool = False)[source]

Create test assembly consisting of list of fake material

Parameters

name (string) – determines which fake material to use

class armi.reactor.converters.tests.test_axialExpansionChanger.FakeMat[source]

Bases: armi.materials.ht9.HT9

Fake material used to verify armi.reactor.converters.axialExpansionChanger

Notes

  • specifically used TestAxialExpansionHeight to verify axialExpansionChanger produces expected heights from hand calculation

  • also used to verify mass and height conservation resulting from even amounts of expansion and contraction. See TestConservation.

name = 'FakeMat'

String identifying the material

linearExpansionPercent(Tk=None, Tc=None)[source]

A fake linear expansion percent

class armi.reactor.converters.tests.test_axialExpansionChanger.FakeMatException[source]

Bases: armi.materials.ht9.HT9

Fake material used to verify TestExceptions

Notes

  • the only difference between this and class Fake(HT9) above is that the thermal expansion factor is higher to ensure that a negative block height is caught in TestExceptions:test_AssemblyAxialExpansionException.

name = 'FakeMatException'

String identifying the material

linearExpansionPercent(Tk=None, Tc=None)[source]

A fake linear expansion percent