mit-crpg / opendeplete

A depletion framework for OpenMC
MIT License
15 stars 5 forks source link

HDF5 and generalized exponential-linear support #8

Closed cjosey closed 7 years ago

cjosey commented 7 years ago

As an extension to #7, this PR replaces the result read/write routines with a fully HDF5 version. The HDF5 architecture is roughly:

number[step, cell, nuclide, poly]
reaction rates[step, stage, cell, nuclide, reaction]
cells
    [cell IDs]
        volume attribute
        index attribute
nuclides
    [nuclide names]
        index in number attribute
        index in reaction rates attribute
reactions
    [reaction names]
        index in reaction rates attribute

With a few assorted other data values here and there. Notably, there is a step index. Arrays are extended as the simulation progresses such that only one file is generated.

I considered a more hierarchical format of "cell/nuclide/rxn" groups, but the storage requirement of the strings to describe the groups was 90 MB on my test problem, whereas the above was 600 kB.

Finally, the big feature addition that encouraged me to rewrite the IO routines was a rewrite of the integrator module. It is now written generically and coefficients for each algorithm are passed to the integrator. Further, support was added for:

A few examples are in integrator_coeffs.py, with interpolation welded on. There is an algorithm that uses all of these features legitimately (as in the interpolation is meaningful and superior to log-log interpolation and has working adaptive timestepping), but it is very far from publication. These modifications were directed to allow me to test this algorithm.

Current concerns: