Can't use multipole temperature method

Hi there,

I get an error when attempting to use the multipole method with the following line:

settings.temperature = {'method': 'interpolation'}

The error is:

ValueError: Unable to set "temperature method" to "multipole" since it is not in "['nearest', 'interpolation']"

I’m using the ENDF 7.1 database which includes the windowed multipole library according to this link: https://docs.openmc.org/en/stable/usersguide/cross_sections.html#windowed-multipole-data

@MrReactorMan Welcome to the community! To use multipole data, you need to set:

settings.temperature = {'multipole': True}

Generally you should also set the temperature method to interpolation (which is still needed outside of the resolved resonance range), so together this would look like:

settings.temperature = {
    'method': 'interpolation',
    'multipole': True
}

Thank you Paul! That worked great.

I’m now having an issue of the temperatures I would like to use being lower than the ENDF 7.1 database supports. Specifically Hydrogen and Zirconium. What is the best way to get properties at temperatures below 293 K?

Starting from the ENDF files for the isotopes of H and Zr you’re interested in, you can use our data API to call NJOY under the hood to generate data at whatever temperature you desire. This would look like:

zr90 = openmc.data.IncidentNeutron.from_njoy('Zr90.endf', temperatures=[200., 293., 600., ...])
zr90.export_to_hdf5('Zr90.h5')

Then you can add this file to an existing cross_sections.xml file.

1 Like

Hi Paul,

Thanks for the response. I attempted that method however I’m getting the following error:
“FileNotFoundError: [Errno 2] No such file or directory: ‘njoy’: ‘njoy’”

Is this a package I need to import, or something within the ENDF folders?

I ended up not having the NJOY application installed. Here’s the link to the installation instructions for anyone that needs it: https://docs.njoy21.io/install.html

I was advised to use NJOY2016, I’m unsure if this fix will work for 21. After installing it I had to change line 180 in “openmc-0.12.2/python3.6/openmc/data/njoy.py” to have the variable ‘njoy_exec’ include my path to NJOY file. For me it was: “/home/shared/NJOY2016/bin/njoy”.

@MrReactorMan You actually don’t need to modify the OpenMC source in order to specify the NJOY executable. This can be done as follows:

openmc.data.IncidentNeutron.from_njoy(..., njoy_exec="/home/shared/NJOY2016/bin/njoy")

Hi Paul, thanks for adding that that’s definitely easier.

I’m getting a weird warning now:

 WARNING: Windowed multipole functionality is turned on, but no multipole
          libraries were found. Make sure that windowed multipole data is
          present in your cross_sections.xml file.

I added the newly generated .h5 files to the endf library and modified the cross_sections file to point to their new paths, is there another step I missed?

Multipole data has to be specially processed – right now the only library available that contains multipole data is the ENDF/B-VII.1 one that you can find here: Official Data Libraries | OpenMC

If you’re processing your own data, you could add multipole library with something like:

multipole_library_filenames = [
    '/path/to/wmp/001001.h5',
    '/path/to/wmp/001002.h5',
    ...
]
lib = openmc.data.DataLibrary.from_xml(<existing cross_sections.xml file>)
for path in multipole_library_filenames:
    lib.register_file(path)
lib.export_to_xml('new_cross_sections.xml')