armi.nuclearDataIO.cccc.rzflux module

Module for reading/writing RZFLUX CCCC interface files.

RZFLUX contains Regular Zone Flux, or multigroup flux by neutron energy group in each zone. It also can hold some convergence and neutron balance information.

The format is defined in [CCCC-IV].

Examples

>>> flux = rzflux.readBinary("RZFLUX")
>>> flux.groupFluxes[2, 0] *= 1.1
>>> rzflux.writeBinary(flux, "RZFLUX2")
>>> rzflux.writeAscii(flux, "RZFLUX2.ascii")
class armi.nuclearDataIO.cccc.rzflux.Convergence[source]

Bases: enum.Enum

Convergence behavior flags for ITPS from RZFLUX file.

NO_ITERATIONS = 0
CONVERGED = 1
CONVERGING = 2
DIVERGING = 3
class armi.nuclearDataIO.cccc.rzflux.RzfluxData[source]

Bases: armi.nuclearDataIO.cccc.cccc.DataContainer

Data representation that can be read from or written to a RZFLUX file.

Notes

Analogous to a IsotxsLibrary for ISTOXS files.

class armi.nuclearDataIO.cccc.rzflux.RzfluxStream(data: armi.nuclearDataIO.cccc.cccc.DataContainer, fileName: str, fileMode: str)[source]

Bases: armi.nuclearDataIO.cccc.cccc.StreamWithDataContainer

Stream for reading to/writing from with RZFLUX data.

Parameters
  • flux (RzfluxData) – Data structure

  • fileName (str) – path to RZFLUX file

  • fileMode (str) – string indicating if fileName is being read or written, and in ascii or binary format

Create an instance of a Stream.

Parameters
  • fileName (str) – name of the file to be read

  • fileMode (str) – the file mode, i.e. ‘w’ for writing ASCII, ‘r’ for reading ASCII, ‘wb’ for writing binary, and ‘rb’ for reading binary.

static _getDataContainer() → armi.nuclearDataIO.cccc.rzflux.RzfluxData[source]
readWrite()[source]

Step through the structure of the file and read/write it.

_rwFileID()[source]

Read/write file id record.

Notes

The username, version, etc are embedded in this string but it’s usually blank. The number 28 was actually obtained from a hex editor and may be code specific.

_rw1DRecord()[source]

Read/write File specifications on 1D record.

_rw2DRecord()[source]

Read/write the multigroup fluxes (n/cm^2-s) into a NxG matrix.

Notes

Zones are blocked into multiple records so we have to block or unblock them.

rwMatrix reverses the indices into FORTRAN data order so be very careful with the indices.