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:
armi.nuclearDataIO.cccc.cccc.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
= None¶ Maps i,j,k,g indices to total real or adjoint flux in n/cm^2-s
-
-
class
armi.nuclearDataIO.cccc.rtflux.
RtfluxStream
(data: armi.nuclearDataIO.cccc.cccc.DataContainer, fileName: str, fileMode: str)[source]¶ Bases:
armi.nuclearDataIO.cccc.cccc.StreamWithDataContainer
Stream for reading/writing a RTFLUX or ATFLUX file.
- Parameters
Create an instance of a
Stream
.- Parameters
-
_rwFileID
()[source]¶ Read/write file id record.
Notes
The username, version, etc are embedded in this string but it’s usually blank.
-
class
armi.nuclearDataIO.cccc.rtflux.
AtfluxStream
(data: armi.nuclearDataIO.cccc.cccc.DataContainer, fileName: str, fileMode: str)[source]¶ Bases:
armi.nuclearDataIO.cccc.rtflux.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.
Create an instance of a
Stream
.- Parameters
-
armi.nuclearDataIO.cccc.rtflux.
getFDFluxReader
(adjointFlag)[source]¶ Returns the appropriate DIF3D FD flux binary file reader class, either RTFLUX (real) or ATFLUX (adjoint).
-
armi.nuclearDataIO.cccc.rtflux.
plotTriangleFlux
(rtfluxData: armi.nuclearDataIO.cccc.rtflux.RtfluxData, axialZ, energyGroup, hexPitch=1.7320508075688772, hexSideSubdivisions=1, imgFileExt='.png')[source]¶ Plot region total flux for one core-wide axial slice on triangular/hexagonal geometry.
Warning
This will run on non-triangular meshes but will look wrong.
- Parameters
rtfluxData (RtfluxData object) – The RTFLUX/ATFLUX data object containing all read file data. Alternatively, this could be a FIXSRC file object, but only if FIXSRC.fixSrc is first renamed FIXSRC.triangleFluxes.
axialZ (int) – The DIF3D axial node index of the core-wide slice to plot.
energyGroup (int) – The energy group index to plot.
hexPitch (float, optional) – The flat-to-flat hexagonal assembly pitch in this core. By default, it is sqrt(3) so that the triangle edge length is 1 if hexSideSubdivisions=1.
hexSideSubdivisions (int, optional) – By default, it is 1 so that the triangle edge length is 1 if hexPitch=sqrt(3).
imgFileExt (str, optional) – The image file extension.