armi.nuclearDataIO.cccc.pwdint module

Read/write a CCCC PWDINT power density definition file.

PWDINT files power density at mesh intervals.

File format definition is from [CCCC-IV].

Examples

>>> pwr = pwdint.readBinary("PWDINT")
>>> pwdint.writeBinary(pwr, "PWDINT2")
class armi.nuclearDataIO.cccc.pwdint.PwdintData[source]

Bases: armi.nuclearDataIO.cccc.cccc.DataContainer

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

This contains a mapping from the i,j,k GEODST mesh to power density in Watts/cm^3.

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

Bases: armi.nuclearDataIO.cccc.cccc.StreamWithDataContainer

Stream for reading to/writing from with PWDINT data.

Parameters
  • power (PwdintData) – Data structure

  • fileName (str) – path to pwdint 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.pwdint.PwdintData[source]
readWrite()[source]

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

Logic to control which records will be present is here, which comes directly off the File specification.

_rwFileID()[source]
_rw1DRecord()[source]

Read/write File specifications on 1D record.

_rw2DRecord()[source]

Read/write power density by mesh point.