armi.nuclearDataIO.cccc.geodst module

Read/write a CCCC GEODST geometry definition file.

GEODST files define fine and coarse meshes and mappings between region numbers and mesh indices. They also store some zone information.

File format definition is from [CCCC-IV].

Examples

>>> geo = geodst.readBinary("GEODST")
>>> print(geo.xmesh)
>>> geo.zmesh[-1]*=2  # make a modification to data
>>> geodst.writeBinary(geo, "GEODST2")
class armi.nuclearDataIO.cccc.geodst.GeodstData[source]

Bases: DataContainer

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

The region numbers in this data structure START AT 1, not zero! Thus you must always remember the off-by-one conversion when comparing with list or matrix indices.

Notes

Analogous to a IsotxsLibrary for ISTOXS files.

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

Bases: StreamWithDataContainer

Stream for reading to/writing from with GEODST data.

Parameters:
  • geom (GeodstData) – Data structure

  • fileName (str) – path to geodst 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 a GEODST file and read/write it.

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

Implementation: Tool to read and write GEODST files. I_ARMI_NUCDATA_GEODST
signature: readWrite
requirements: R_ARMI_NUCDATA_GEODST

Reading and writing GEODST files is performed using the general nuclear data I/O functionalities described in I_ARMI_NUCDATA. Reading/writing a GEODST file is performed through the following steps:

  1. Read/write file ID record

  2. Read/write file specifications on 1D record.

  3. Based on the geometry type (IGOM), one of following records are read/written:

    • Slab (1), cylinder (3), or sphere (3): Read/write 1-D coarse mesh boundaries and fine mesh intervals.

    • X-Y (6), R-Z (7), Theta-R (8), uniform triangular (9), hexagonal (10), or R-Theta (11): Read/write 2-D coarse mesh boundaries and fine mesh intervals.

    • R-Theta-Z (12, 15), R-Theta-Alpha (13, 16), X-Y-Z (14), uniform triangular-Z (17), hexagonal-Z(18): Read/write 3-D coarse mesh boundaries and fine mesh intervals.

  4. If the geometry is not zero-dimensional (IGOM > 0) and buckling values are specified (NBS > 0): Read/write geometry data from 5D record.

  5. If the geometry is not zero-dimensional (IGOM > 0) and region assignments are coarse-mesh-based (NRASS = 0): Read/write region assignments to coarse mesh interval.

  6. If the geometry is not zero-dimensional (IGOM > 0) and region assignments are fine-mesh-based (NRASS = 1): Read/write region assignments to fine mesh interval.