armi.materials.tests.test_materials module

Tests materials.py.

class armi.materials.tests.test_materials.AbstractMaterialTest[source]

Bases: object

Base for material tests.

MAT_CLASS = None
VALID_TEMP_K = 500
test_isPicklable()[source]

Test that all materials are picklable so we can do MPI communication of state.

test_density()[source]

Test that all materials produce a non-zero density.

test_TD()[source]

Test the material density.

test_duplicate()[source]

Test the material duplication.

test_cache()[source]

Test the material cache.

class armi.materials.tests.test_materials.MaterialConstructionTests(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_matInit()[source]

Make sure all materials can be instantiated without error.

class armi.materials.tests.test_materials.MaterialFindingTests(methodName='runTest')[source]

Bases: TestCase

Make sure materials are discoverable as designed.

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

Test resolveMaterialClassByName() function.

Test Case: Materials can be grabbed from a list of namespaces. T_ARMI_MAT_NAMESPACE0
signature: test_findMaterial
requirements: R_ARMI_MAT_NAMESPACE
test_namespacing()[source]

Test loading materials with different material namespaces, to cover how they work.

Test Case: Material can be found in defined packages. T_ARMI_MAT_NAMESPACE1
signature: test_namespacing
requirements: R_ARMI_MAT_NAMESPACE
Test Case: Material namespaces register materials with an order of priority. T_ARMI_MAT_ORDER
signature: test_namespacing
requirements: R_ARMI_MAT_ORDER
test_importYamlMaterialDir()[source]
class armi.materials.tests.test_materials.CaliforniumTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Californium

test_pseudoDensity()[source]
test_porosities()[source]
class armi.materials.tests.test_materials.CesiumTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Cs

test_pseudoDensity()[source]
class armi.materials.tests.test_materials.MagnesiumTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Magnesium

VALID_TEMP_K = 1000
test_pseudoDensity()[source]
class armi.materials.tests.test_materials.MagnesiumOxideTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of MgO

test_pseudoDensity()[source]
test_linearExpansionPercent()[source]
class armi.materials.tests.test_materials.MOXTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of MOX

test_density()[source]
test_applyInputParams()[source]
class armi.materials.tests.test_materials.NaClTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of NaCl

test_density()[source]
class armi.materials.tests.test_materials.PotassiumTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Potassium

test_pseudoDensity()[source]
class armi.materials.tests.test_materials.ScandiumOxideTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Sc2O3

test_pseudoDensity()[source]
test_linearExpansionPercent()[source]
class armi.materials.tests.test_materials.SodiumTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Sodium

test_pseudoDensity()[source]
test_enthalpy()[source]
test_thermalConductivity()[source]
class armi.materials.tests.test_materials.ThoriumUraniumMetalTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of ThU

test_pseudoDensity()[source]
test_thermalConductivity()[source]
test_linearExpansion()[source]
class armi.materials.tests.test_materials.UraniumTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Uranium

test_applyInputParams()[source]
test_density()[source]
test_thermalConductivity()[source]
test_pseudoDensity()[source]
class armi.materials.tests.test_materials.UraniumOxideTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of UraniumOxide

test_adjustMassEnrichment()[source]
test_density()[source]
test_thermalConductivity()[source]
test_linearExpansion()[source]
test_linearExpansionPercent()[source]
test_heatCapacity()[source]

Check against Figure 4.2 from ORNL 2000-1723 EFG.

test_getDensityExpansion3D()[source]
test_duplicate()[source]

Test the material duplication.

Test Case: Materials shall calc mass fracs at init. T_ARMI_MAT_FRACS4
signature: test_duplicate
requirements: R_ARMI_MAT_FRACS
test_applyInputParams()[source]
class armi.materials.tests.test_materials.ThoriumTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Thorium

test_setDefaultMassFracs()[source]

Test default mass fractions.

test_pseudoDensity()[source]
test_linearExpansion()[source]
test_thermalConductivity()[source]
class armi.materials.tests.test_materials.ThoriumOxideTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of ThoriumOxide

test_density()[source]
test_linearExpansion()[source]
test_thermalConductivity()[source]
class armi.materials.tests.test_materials.VoidTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Void

test_pseudoDensity()[source]

This material has a no pseudo-density.

test_density()[source]

This material has no density.

test_linearExpansion()[source]

This material does not expand linearly.

class armi.materials.tests.test_materials.MixtureTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of _Mixture

test_density()[source]

This material has no density function.

test_setDefaultMassFracs()[source]

Test default mass fractions.

Test Case: The materials generate nuclide mass fractions. T_ARMI_MAT_FRACS1
signature: test_setDefaultMassFracs
requirements: R_ARMI_MAT_FRACS
test_linearExpansion()[source]
class armi.materials.tests.test_materials.LeadTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Lead

VALID_TEMP_K = 600
test_linearExpansion()[source]

Unit tests for lead materials linear expansion.

Test Case: Fluid materials do not linearly expand, at any temperature. T_ARMI_MAT_FLUID2
signature: test_linearExpansion
requirements: R_ARMI_MAT_FLUID
test_setDefaultMassFracs()[source]

Test default mass fractions.

Test Case: The materials generate nuclide mass fractions. T_ARMI_MAT_FRACS2
signature: test_setDefaultMassFracs
requirements: R_ARMI_MAT_FRACS
test_pseudoDensity()[source]
test_heatCapacity()[source]
class armi.materials.tests.test_materials.LeadBismuthTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of LeadBismuth

test_setDefaultMassFracs()[source]

Test default mass fractions.

Test Case: The materials generate nuclide mass fractions. T_ARMI_MAT_FRACS3
signature: test_setDefaultMassFracs
requirements: R_ARMI_MAT_FRACS
test_pseudoDensity()[source]
test_heatCapacity()[source]
test_dynamicVisc()[source]
class armi.materials.tests.test_materials.CopperTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Cu

test_setDefaultMassFracs()[source]
test_densityNeverChanges()[source]
test_linearExpansionPercent()[source]
test_getChildren()[source]
test_getChildrenWithFlags()[source]
class armi.materials.tests.test_materials.ZrTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Zr

test_thermalConductivity()[source]
test_linearExpansion()[source]
test_linearExpansionPercent()[source]
test_pseudoDensity()[source]
class armi.materials.tests.test_materials.InconelTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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_setDefaultMassFracs()[source]
test_pseudoDensity()[source]
test_Iconel800_linearExpansion()[source]
class armi.materials.tests.test_materials.Inconel600Tests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Inconel600

test_setDefaultMassFracs()[source]
test_linearExpansionPercent()[source]
test_linearExpansion()[source]
test_pseudoDensity()[source]
test_heatCapacity()[source]
class armi.materials.tests.test_materials.Inconel625Tests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Inconel625

test_setDefaultMassFracs()[source]
test_linearExpansionPercent()[source]
test_linearExpansion()[source]
test_pseudoDensity()[source]
test_heatCapacity()[source]
class armi.materials.tests.test_materials.InconelX750Tests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of InconelX750

test_setDefaultMassFracs()[source]
test_linearExpansionPercent()[source]
test_linearExpansion()[source]
test_pseudoDensity()[source]
test_heatCapacity()[source]
class armi.materials.tests.test_materials.Alloy200Tests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Alloy200

test_nickleContent()[source]

Assert alloy 200 has more than 99% nickel per its spec.

test_linearExpansion()[source]
test_linearExpansionHotter()[source]
class armi.materials.tests.test_materials.CaH2Tests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of CaH2

test_pseudoDensity()[source]
class armi.materials.tests.test_materials.HafniumTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Hafnium

test_pseudoDensity()[source]
class armi.materials.tests.test_materials.HT9Tests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of HT9

test_feContent()[source]
test_linearExpansion()[source]
class armi.materials.tests.test_materials.HastelloyNTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of HastelloyN

test_thermalConductivity()[source]
test_heatCapacity()[source]
test_linearExpansionPercent()[source]
test_alpha_mean()[source]
class armi.materials.tests.test_materials.TZMTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of TZM

test_applyInputParams()[source]
test_pseudoDensity()[source]
test_linearExpansionPercent()[source]
class armi.materials.tests.test_materials.YttriumOxideTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of Y2O3

test_pseudoDensity()[source]
test_linearExpansionPercent()[source]
class armi.materials.tests.test_materials.ZincOxideTests(methodName='runTest')[source]

Bases: AbstractMaterialTest, 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.

MAT_CLASS

alias of ZnO

test_density()[source]
test_linearExpansionPercent()[source]
class armi.materials.tests.test_materials.FuelMaterialTests(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.

baseInput = '\nnuclide flags:\n    U: {burn: false, xs: true}\n    ZR: {burn: false, xs: true}\ncustom isotopics:\n    customIsotopic1:\n        input format: mass fractions\n        density: 1\n        U: 1\n    customIsotopic2:\n        input format: mass fractions\n        density: 1\n        ZR: 1\nblocks:\n    fuel: &block_fuel\n        fuel1: &component_fuel_fuel1\n            shape: Hexagon\n            material: UZr\n            Tinput: 600.0\n            Thot: 600.0\n            ip: 0.0\n            mult: 1\n            op: 10.0\n        fuel2: &component_fuel_fuel2\n            shape: Hexagon\n            material: UZr\n            Tinput: 600.0\n            Thot: 600.0\n            ip: 0.0\n            mult: 1\n            op: 10.0\nassemblies:\n    fuel a: &assembly_a\n        specifier: IC\n        blocks: [*block_fuel]\n        height: [1.0]\n        axial mesh points: [1]\n        xs types: [A]\n'
loadAssembly(materialModifications)[source]
test_class1Class2Class1WtFrac()[source]
test_class1Class2ClassXCustomIsotopics()[source]
class armi.materials.tests.test_materials.PickledMaterialsTests(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_simpleReload()[source]

Prove that the material pickling works, creating reasonable copies of the matProps material.

test_massFrac()[source]

Ensure that setting the mass fractions on one pickled material does not affect another copy.

test_applyInputParams()[source]

Ensure that using applyInputParams on one pickled material does not affect another copy.

test_classVariables()[source]

Ensure that directly modifying the Material class variables of one material does not affect another copy.