Thermal scattering data c_H_in_H2O in cross_sections issue in pincell.ipynb

Hi, I am trying to run the pincell example from openmc-notebooks/pincell.ipynb at develop · openmc-dev/openmc-notebooks · GitHub. I am using container to run this file on notebook http://127.0.0.1:8888/lab/tree/pincell.ipynb.

I came across to the following error.

RuntimeError: Could not find thermal scattering data c_H_in_H2O in cross_sections.xml file.

I checked the tree and I don’t see the cross_sections.xml file.

  1. How do I add t thermal scattering data c_H_in_H2O in cross_sections.xml or in the pincell.ipynp code?
    2)Where am I going to find the cross_sections.xml file?

Thank you
Birsen

Hi Birsena, have you tried to download the nuclear data from openmc official nuclear data library?

You can set your default cross sections for openmc using the OPENMC_CROSS_SECTIONS variable as described in the documentation.

Hi Wahid,

I use Docker with openMC to run the problem.

I found the statement:

The **cross_sections.xml** tells OpenMC where it can find nuclide cross sections and S(a,b)) tables. This can be set either by the **OPENMC_CROSS_SECTIONS** environment variable or the **Materials.cross_sections** attribute.”

Using the following command I can see the library (which tells they are in the path) but I don’t know where S(a,b) are?

!cat $OPENMC_CROSS_SECTIONS

print(’ …')

….

Hi Birsena,
The cross_sections.xml shows the relative path of each nuclear data. so for your s(alpha,beta) data, you can make sure that each file exist on its location. i.e. c_H_in_H2O.h5 for H in H2O

Hi Wahid,
Thank you. I downloaded the data file into the docker container under /tasks and set the path in my code. It is working. Thank you

I considered adding the cross section data in .bash file on Windows but I am not sure if it would work since I am using docker container.

First I downloaded the cross section data in one of the Windows folder in C drive, but did not take it to the file location in C drive. So I had to move the data inside the docker container.

Is there way to define the path that would work in Docker Container if the data is located in C drive somewhere?

Thank you again for your help

Birsen

Hi Birsena,
Sometimes, I declared the path to cross_sections.xml directly inside the python script. it looks like this.

import openmc
openmc.config['cross_sections'] = '/home/path/to/your/openmclib/endfb-vii.1-hdf5/cross_sections.xml'

But if you want to declare it as environment variable, I recommend you to add this to you .profile file at your home directory. I am adding this line at the bottom of .profile

# set PATH so it includes user's private bin if it exists
if .....
fi

# OpenMC Cross-sections
export OPENMC_CROSS_SECTIONS=/home/path/to/your/endfb-vii.1-hdf5/cross_sections.xml

I think it could work