Pointing to Cross Sections on Mac from Jupyter

Hello all,

I am a brand new OpenMC user and am using it on a Mac computer in conda. The installation all went fine and I can import OpenMC into python (I have been trying to use this just from a Jupyter notebook) without any issue. I can’t seem to get the pointing to the cross section data bases to work right though.

I downloaded mcnp_endfb70 from the data bases website and ended up with a file full of HD5 files. I try and point to it with the following:

materials.cross_sections = '/Users/gbru/Desktop/UR/OpenMC/mcnp_endfb70' 
materials.export_to_xml()

This doesn’t work and gives me the following when I run the program:

 Reading settings XML file...
 ERROR: Cross sections XML file '/Users/gbru/Desktop/UR/OpenMC/mcnp_endfb70' does not exist.

I assume I am doing something extremely stupid here, but can’t figure it out for the life of me. Can someone help alleviate the mistake?

Thank you!

Welcome to the community.

The path used for the cross sections appears a little unusual. This should point to a xml file. Normally the xml file is called cross_sections.xml. By any chance are you missing the extension from the filename?

Thanks!

Am I supposed to make the xml file or is that what I should have downloaded? The file it points to is just a normal file full of HDF5 files with cross sections in them.

when you download the openmc nuclear data it includes the cross_sections.xml and the h5 cross section files. Both types of file are in the downloaded compressed archive downloadable from openmc.org

I have no idea what changed, but I redownloaded the cross section library a couple of times and finally got one with the cross_sections.xml file! Everything worked the first time after that. Thanks for your help!