armi.nucDirectory.tests.test_thermalScattering module

Tests for thermal scattering metadata.

armi.nucDirectory.tests.test_thermalScattering.buildBlockWithTSL()[source]

Return a simple block containing something with a TSL (graphite).

class armi.nucDirectory.tests.test_thermalScattering.TestThermalScattering(methodName='runTest')[source]

Bases: TestCase

Tests for thermal scattering on the reactor model.

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_graphiteOnReactor()[source]
test_endf8Compound()[source]
test_endf8ElementInCompound()[source]
test_endf8Isotope()[source]
test_ACECompound()[source]
test_ACEElementInCompound()[source]
test_ACEIsotope()[source]
test_failOnMultiple()[source]

HT9 has carbon in it with no TSL, while graphite has C with TSL. This should crash.

armi.nucDirectory.tests.test_thermalScattering.getNuclideThermalScatteringData(armiObj)[source]

Make a mapping between nuclideBases in an armiObj and relevant thermal scattering laws.

In some cases, a nuclide will be present both with a TSL and without (e.g. hydrogen in water and hydrogen in concrete in the same armiObj). While this could conceptually be handled somehow, we simply error out at this time.

Notes

Clients can use code like this to access TSL data. This is not an official framework method because it’s not general enough to cover all use cases in all reactors.

Returns:

tslByNuclideBase – A dictionary with NuclideBase keys and ThermalScattering values

Return type:

dict

Raises:

RuntimeError – When a armiObj has nuclides subject to more than one TSL, or subject to a TLS in one case and no TSL in another.

Examples

>>> tslInfo = getNuclideThermalScatteringData(armiObj)
>>> if nucBase in tslInfo:
>>>     aceLabel = tslInfo[nucBase].aceLabel