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