armi.nuclearDataIO.cccc.rtflux module

Read and write the Regular Total flux from a RTFLUX CCCC interface file.

RTFLUX is a CCCC standard data file for storing multigroup total flux on a mesh of any geometry type. It is defined in [CCCC-IV].

ATFLUX is in the same format but holds adjoint flux rather than regular flux.

Examples

>>> flux = rtflux.RtfluxStream.readBinary("RTFLUX")
>>> rtflux.RtfluxStream.writeBinary(flux, "RTFLUX2")
>>> adjointFlux = rtflux.AtfluxStream.readBinary("ATFLUX")

See also

NHFLUX

Reads/write nodal hex flux moments

RZFLUX

Reads/writes total fluxes from zones

class armi.nuclearDataIO.cccc.rtflux.RtfluxData[source]

Bases: DataContainer

Multigroup flux as a function of i,j,k and g indices.

The metadata also contains the power and k-eff.

This is the data structure that is read from or written to a RTFLUX file.

groupFluxes: ndarray

Maps i,j,k,g indices to total real or adjoint flux in n/cm^2-s

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

Bases: StreamWithDataContainer

Stream for reading/writing a RTFLUX or ATFLUX file.

Parameters:
  • flux (RtfluxData) – Data structure

  • fileName (str) – path to RTFLUX file

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

readWrite()[source]

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

getEnergyGroupIndex(g)[source]

Real fluxes stored in RTFLUX have “normal” (or “forward”) energy groups. Also see the subclass method ATFLUX.getEnergyGroupIndex().

0 based, so if NG=33 and you want the third group, this return 2.

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

Bases: RtfluxStream

This is a subclass for the ATFLUX file, which is identical in format to the RTFLUX file except that it contains the adjoint flux and has reversed energy group ordering.

getEnergyGroupIndex(g)[source]

Adjoint fluxes stored in ATFLUX have “reversed” (or “backward”) energy groups.

0 based, so if NG=33 and you want the third group (g=2), this returns 30.

armi.nuclearDataIO.cccc.rtflux.getFDFluxReader(adjointFlag)[source]

Returns the appropriate DIF3D FD flux binary file reader class, either RTFLUX (real) or ATFLUX (adjoint).