armi.nuclearDataIO.cccc.tests.test_nhflux module

Test reading/writing of NHFLUX dataset.

armi.nuclearDataIO.cccc.tests.test_nhflux.createSIMPLE_HEXZ_NHFLUX(runVariant=False)[source]

Create NHFLUX file for storage into fixtures directory.

In order to test the reading of NHFLUX file, there is a need to provide one such file for testing. This function runs the provided DIF3D input, and generates an NHFLUX file. The DIF3D input is a modified version of test case 01 from the DIF3D code package. It uses the 4-group cross sections located in the last part of the input. The modification includes:

  1. reduce the geometry to 3 rows of assemblies in full core geometry;

  2. reduce the fuel assembly to contain 6 nodes only;

  3. change the dimension to be whole numbers.

In this way, the produced NHFLUX file is fairly small in size that makes it suitable for testing purposes. Another benefit of the simplified input is the trivial computer running time. It should take < 10 seconds to generate the NHFLUX file. Nevertheless, since the diffusion approximation is likely to be invalid for such a small-size core, results are not meant for physics benchmarking or other realistic applications.

Important

This requires both DIF3D and the TerraPower’s DIF3D ARMI plugin in order to run. The latest output is shipped with the test, but regenerating or updating it will require these extra dependencies. Also, if you don’t have them you can ask someone that does and maybe they can hook you up.

class armi.nuclearDataIO.cccc.tests.test_nhflux.TestNhflux(methodName='runTest')[source]

Bases: unittest.case.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_fc()[source]

Verify the file control info.

test_fluxMoments()[source]

Verify that the flux moments are properly read.

The 5 flux moments values are manually verified for two nodes. The indices are converted to zero based from the original by subtracting one.

test_xyPartialCurrents()[source]

Verify that the XY-directed partial currents can be read.

The surface partial currents can be used to reconstruct the surface flux and corner flux values. This test shows that the outgoing current in one hex is identical to the incoming current in the adjacent hex.

test_zPartialCurrents()[source]

Verify that the Z-directed partial currents can be read.

The Z-directed partial currents are manually checked for one node surface.

test_write()[source]

Verify binary equivalence of written binary file.

class armi.nuclearDataIO.cccc.tests.test_nhflux.TestNhfluxVariant(methodName='runTest')[source]

Bases: unittest.case.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_fc()[source]

Verify the file control info.

test_fluxMoments()[source]
test_write()[source]

Verify binary equivalence of written binary file.