Adding more temperatures to already existing HDF5 cross section file

Hello all,

I have a question. As obvious from the subject, i was wondering that is it possible to add temperatures to already present HDF5 cross section files?

if possible, can someone supply a short python code for that?

Thanks in advance.

Hi Khurrum

This file might give some insight. It has parts like data.add_temperature_from_ace(table)

https://github.com/openmc-dev/data/blob/master/convert_jeff32.py

Best

Jon

Thank you Jon.

Perhaps I need to elaborate a bit more. If I have certain temperatures available in ace from which i have made my h5 files but i need more temperatures (which are not present in ace file), can i do that and how?

Hopefully i have made myself clear(er) this time :slight_smile:

Thank you.

Hi Khurrum,

If you need to add more temperatures, you have two options:

  1. Use the openmc.data.njoy.make_ace function to generate new ACE files (from an ENDF file) at the appropriate temperatures. Then, use IncidentNeutron.add_temperature_from_ace to add the new temperature data to an existing IncidentNeutron instance. If you don’t already have an instance, you can use IncidentNeutron.from_hdf5 to create one from the HDF5 file that you already have.
  2. Use openmc.data.IncidentNeutron.from_njoy to create an entirely new set of data (for both existing and new temperatures).

In either case, you’ll need to call IncidentNeutron.export_to_hdf5 to generate a new HDF5 file.

Best regards,
Paul