# Can't use multipole temperature method

**URL:** <https://openmc.discourse.group/t/cant-use-multipole-temperature-method/1738>\
**Category:** User Support\
**Created:** [February 23, 2022, 10:57pm UTC](https://openmc.discourse.group/t/cant-use-multipole-temperature-method/1738 "2022-02-23T22:57:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrReactorMan](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@MrReactorMan](https://openmc.discourse.group/u/MrReactorMan)\
**Post date:** [February 23, 2022, 10:57pm UTC](https://openmc.discourse.group/t/cant-use-multipole-temperature-method/1738/1 "2022-02-23T22:57:57Z")

</div>

Hi there,

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

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

```

The error is:

```auto
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](https://docs.openmc.org/en/stable/usersguide/cross_sections.html#windowed-multipole-data)

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [February 24, 2022, 4:24am UTC](https://openmc.discourse.group/t/cant-use-multipole-temperature-method/1738/2 "2022-02-24T04:24:00Z")

</div>

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

```python
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:

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

```

---

<div class="post-metadata">

**Author:** ![MrReactorMan](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@MrReactorMan](https://openmc.discourse.group/u/MrReactorMan)\
**Post date:** [March 3, 2022, 9:23pm UTC](https://openmc.discourse.group/t/cant-use-multipole-temperature-method/1738/3 "2022-03-03T21:23:34Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [March 3, 2022, 10:45pm UTC](https://openmc.discourse.group/t/cant-use-multipole-temperature-method/1738/4 "2022-03-03T22:45:29Z")

</div>

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:

```nohighlight
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.

---

<div class="post-metadata">

**Author:** ![MrReactorMan](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@MrReactorMan](https://openmc.discourse.group/u/MrReactorMan)\
**Post date:** [March 9, 2022, 5:38pm UTC](https://openmc.discourse.group/t/cant-use-multipole-temperature-method/1738/5 "2022-03-09T17:38:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![MrReactorMan](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@MrReactorMan](https://openmc.discourse.group/u/MrReactorMan)\
**Post date:** [March 9, 2022, 8:56pm UTC](https://openmc.discourse.group/t/cant-use-multipole-temperature-method/1738/6 "2022-03-09T20:56:38Z")

</div>

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](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”.

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [March 22, 2022, 11:59am UTC](https://openmc.discourse.group/t/cant-use-multipole-temperature-method/1738/7 "2022-03-22T11:59:47Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![MrReactorMan](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@MrReactorMan](https://openmc.discourse.group/u/MrReactorMan)\
**Post date:** [March 23, 2022, 5:28pm UTC](https://openmc.discourse.group/t/cant-use-multipole-temperature-method/1738/8 "2022-03-23T17:28:16Z")

</div>

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

I’m getting a weird warning now:

```auto
 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?

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [March 23, 2022, 5:48pm UTC](https://openmc.discourse.group/t/cant-use-multipole-temperature-method/1738/9 "2022-03-23T17:48:04Z")

</div>

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](https://openmc.org/official-data-libraries/)

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

```nohighlight
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')

```
