Hello,
Thank you for your time reading this post. I am new to openmc and new to Linux.
My problem is during the ‘Modelling a Pin-Cell’ tutorial I get an error saying ‘RuntimeError: Could not find thermal scattering data c_H_in_H2O in cross_sections.xml file.’
How can I fix this?
I can also see that I don’t have the same amount of isotopes in my cross_sections.xml file.
To further expand on the problem, I think the reason this may be happening is because I followed an unusual installation video meant for fusion modelling. I followed a fusion installation example here openmc workshop ubuntu - YouTube with openmc being downloaded with bundle from a github page.
Thanks fsabab for the solution.
I am new to this. I clicked the [Download .tar.xz] link and clicked ‘save’.
Once it has downloaded do I need to do anything more, like extract the file into a specific folder somewhere?
Do not change anything else on the `.bashrc` file. Save that.
Now if you don’t wanna do this i.e., setting up the environment variable, you can simply omit the previous step. Just copy the cross_sections.xml file and paste it to your working directory.
Hi fsabab,
I followed steps 1 to 4, and reran the code in Jupyter Notebooks but unfortunately it did not work. My exact input, with the error message at the end is this:
%matplotlib inline
#ln 30 has a comment for N13
import openmc
uo2 = openmc.Material(1, “uo2”)
print(uo2)
Material
ID = 1
Name = uo2
Temperature = None
Density = None [sum]
S(a,b) Tables
Nuclides
mat = openmc.Material()
print(mat)
Material
ID = 2
Name =
Temperature = None
Density = None [sum]
S(a,b) Tables
Nuclides
help(uo2.add_nuclide)
Help on method add_nuclide in module openmc.material:
add_nuclide(nuclide, percent, percent_type=‘ao’) method of openmc.material.Material instance
Add a nuclide to the material
Parameters
----------
nuclide : str
Nuclide to add, e.g., 'Mo95'
percent : float
Atom or weight percent
percent_type : {'ao', 'wo'}
'ao' for atom percent and 'wo' for weight percent
I think you messed something up in your bashrc file.
Please check again. Do remember that you need to put the export OPENMC_CROSS_SECTION command in a new line.
I checked the .bashrc file and the export command is on a new line. I don’t know what is wrong. I am very new at this. It was a struggle to get anything running on it in the first place. I installed it via someones github and when that wasn’t working with the cross section reinstalled it with the conda command. It was still running the code but missing cross sections. It displaying that ‘no module named openmc’ error message when I run it now
@fruitfly You’re using Docker and to fix this problem you can use either openmc-data-downloader or install full data library inside docker. I’d go with the second option
docker run -it ukaea/openmcworkshop /bin/bash
cd $HOME
wget -c https://anl.box.com/shared/static/uhbxlrx7hvxqw27psymfbhi7bx7s6u6a.xz -O endfb8
tar -xvf endfb8 -C /opt
rm -rf endfb8
echo "export OPENMC_CROSS_SECTIONS= '/opt/endfb80_hdf5/cross_sections.xml'" >> ~/.bashrc
But I would recommend using anaconda/miniconda to install openmc. Open terminal and type the following command one by one
I tried using anaconda/miniconda to install openmc but now when I type “impost openmc” in Jupyter Notebook it comes back with an error message saying “ModuleNotFoundError: No module named ‘openmc’” , and when I type “openmc” in terminal it says “Command ‘openmc’ not found”.
It turns out my problem was more than just downloading a new data library and couldn’t be solved in this thread. Therefor I have chosen fsabab’s answer for the solution as it worked to at least download the data library.