openmc-dev / openmc

OpenMC Monte Carlo Code
https://docs.openmc.org
Other
745 stars 481 forks source link

Remove redundant temperature-independent data from HDF5 Datasets #697

Closed nelsonag closed 8 years ago

nelsonag commented 8 years ago

Some continuous-energy nuclear data is independent of material temperature; this includes the nuclide metadata and, energy-angle information, and for some evaluations, fast energy cross sections for some reaction channels. To significantly reduce the storage size and better set us up for temperature dependence, it would make sense if the data files for multiple temperatures were 1) combined in to a single file, and 2) redundant information removed.

That is, if the current data format of:

/U235.71c
/U235.72c
/U235.73c
...

be re-written to be:

/U235.endf70
    /300K
    /600K
    /900K
    ...
    /WMP
nelsonag commented 8 years ago

I have an interesting finding to share. So I made a script (the one which yielded PR #702) to compare libraries of the same isotope/metastable state at all the temperatures. I ran tihs so far only on the MCNP6 endf70 data.

I found that for the most part it behaves exactly as you would expect: cross sections and the x/s energy grid are T-dependent and thats mostly it. This holds for all reaction channel x/s, even though BROADR typically doesn't broaden in the fast range, since the ACER thinning algorithm has a chance to change the energy grid. Having said that we could probably force the grid to be the same in the fast range and it'd be OK.

There were two surprises though:

nelsonag commented 8 years ago

I wanted to give a little update on this:

Ok, so otherwise, expect this issue to be resolved with the following set of PRs:

  1. PR providing the CE HDF5 library reorganization
    • At this point this would only save disk space, not memory, but after this point the users would not have to re-generate libraries
  2. PR providing the MG HDF5 library reorganization
    • This would do the same as above, but for the MG library.
    • I'd prefer to keep 2 and 1 separate just to minimize the size of each PR, but I may find that the changes needed to make the MG mode work with the new temperature attribute/element instead of xs aren't worth it.
  3. PR reorganizing the CE portion of nuclide_header.F90 and associated code so the data representation within OpenMC also removes redundant temperature independent data.
    • Unlike 1, this is where the big benefit is for most of us: it saves memory.
    • I want this separate just to keep the size of PR#1 manageable.

A PR analogous to #3 but for MG mode shouldn't be necessary since all the data is temperature-dependent, and therefore there isn't much of a driver to separate it out. If we find a good enough reason, or just to make MG look like CE (even though the MG data isn't in the nuclide class like it is for CE...), expect a future PR.

nelsonag commented 8 years ago

Oh, I should have added what the data format looks like for early digestion:

Within the file U235.h5:

\U235
  \energy   # Every temperature has an independent energy grid due to NJOY thinning
    \294K
    \600K
  \kTs     
    \294K
    \600K
  \reactions
    \reaction_002
      \294K
        \threshold_idx
        \xs
      \600K
        \threshold_idx
        \xs
     \Q_value
     \center_of_mass
     \products
     \...

A few notes:

paulromano commented 8 years ago

@nelsonag Sorry I've been mute so far. This all sounds great. Regarding the S(a,b) table issue, I think your option (b) sounds pretty sensible (having it pick the closest temperature and putting out a warning).

Two suggestions:

nelsonag commented 8 years ago

I agree with option (b).

On Tue, Aug 23, 2016 at 10:42 AM, Paul Romano notifications@github.com wrote:

@nelsonag https://github.com/nelsonag Sorry I've been mute so far. This all sounds great. Regarding the S(a,b) table issue, I think your option (b) sounds pretty sensible (having it pick the closest temperature and putting out a warning).

Two suggestions:

  • For storing the kTs, you could just have a single dataset that is an array of kTs.
  • Store threshold_idx as an attribute on the xs dataset.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mit-crpg/openmc/issues/697#issuecomment-241754214, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_TM-F_O6NdQ6EKbdiQZa27tyWYbVpqks5qiwbpgaJpZM4JeU_H .

paulromano commented 8 years ago

Re: kTs -- On second thought, it's easy to add a new group/dataset whereas I'm not sure what happens if you try to modify an existing dataset, so I think you're right on this one.

nelsonag commented 8 years ago

Closed by #712. Yay!