Hello,
I’m new in OpenMC and need some help.
I successfully downloaded openmc and set up OPENMC_CROSS_SECTION environment variable
However, when I runed the “Modeling Hexagonal Lattices” example on Jupyter Notebook, an error occured
input
plot = openmc.Plot.from_geometry(geometry)
plot.color_by = 'material'
plot.colors = colors = {
water: 'blue',
fuel: 'olive',
fuel2: 'yellow'
}
plot.to_ipython_image()
error message
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-53-856b8d0e4c5c> in <module>
6 fuel2: 'yellow'
7 }
----> 8 plot.to_ipython_image()
~/.local/lib/python3.6/site-packages/openmc/plots.py in to_ipython_image(self, openmc_exec, cwd, convert_exec)
703
704 # Run OpenMC in geometry plotting mode
--> 705 openmc.plot_geometry(False, openmc_exec, cwd)
706
707 # Convert to .png
~/.local/lib/python3.6/site-packages/openmc/executor.py in plot_geometry(output, openmc_exec, cwd)
57
58 """
---> 59 _run([openmc_exec, '-p'], output, cwd)
60
61
~/.local/lib/python3.6/site-packages/openmc/executor.py in _run(args, output, cwd)
36 error_msg = ' '.join(error_msg.split())
37
---> 38 raise RuntimeError(error_msg)
39
40
RuntimeError: No cross_sections.xml file was specified in materials.xml or in the OPENMC_CROSS_SECTIONS environment variable. OpenMC needs such a file to identify where to find data libraries. Please consult the user's guide at https://docs.openmc.org/ for information on how to set up data libraries.
I tried to write the address directly, but it didn’t work
materials = openmc.Materials([mat1, mat2, …])
materials.cross_sections = ‘/path/to/nucleardata/cross_sections.xml’
materials.export_to_xml()
Thanks in advance for your help.