To all
I am an experienced MCNP user, but I am new to the world of openmc and pyne.
I am using openmc on in a WSL2 Ubuntu environment.
I have openmc installed in the same conda environment as PyNE.
I do not have a DATAPATH statement in my .bashrc
I’m getting an error message: [Errno 21] Is a directory: ‘/opt/endfb-vii.1-hdf5’
/opt/endfb-vii.1-hdf5 is indeed a directory, and it contains these files: cross_sections.xml neutron photon wmp
I’ve looked at the New User - Cross_Section.XML issue, and looked at the
, and the associated response.
I saw where the ACE data libraries can be down loaded.
I looked at the OpenMC User’s guide. While I saw some references to openmc.config, I did not see anything about the configuration/contents of the file, or where it is stored. I do not have a copy of openmc.config in either my installation directory or my user directory.
Can someone please help?
Thanks.
Ron
I am using the following example in Jupyterlab:
%matplotlib inline
import os
from pprint import pprint
import shutil
import subprocess
import urllib.request
import h5py
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm
from matplotlib.patches import Rectangle
import openmc.data
I get this error:
IsADirectoryError Traceback (most recent call last)
Cell In[1], line 14
11 import matplotlib.cm
12 from matplotlib.patches import Rectangle
—> 14 import openmc.data
File /opt/anaconda3/3.10/anaconda3/envs/openmc-env/lib/python3.10/site-packages/openmc/init.py:35
33 from openmc.tracks import *
34 from . import examples
—> 35 from .config import *
37 # Import a few names from the model module
38 from openmc.model import rectangular_prism, hexagonal_prism, Model
File /opt/anaconda3/3.10/anaconda3/envs/openmc-env/lib/python3.10/site-packages/openmc/config.py:92
87 config[‘chain_file’] = chain_file
89 return config
—> 92 config = _default_config()
File /opt/anaconda3/3.10/anaconda3/envs/openmc-env/lib/python3.10/site-packages/openmc/config.py:81, in _default_config()
75 chain_file = os.environ.get(“OPENMC_CHAIN_FILE”)
76 if (chain_file is None and
77 config.get(‘cross_sections’) is not None and
78 config[‘cross_sections’].exists()
79 ):
80 # Check for depletion chain in cross_sections.xml
—> 81 data = DataLibrary.from_xml(config[‘cross_sections’])
82 for lib in reversed(data.libraries):
83 if lib[‘type’] == ‘depletion_chain’:
File /opt/anaconda3/3.10/anaconda3/envs/openmc-env/lib/python3.10/site-packages/openmc/data/library.py:149, in DataLibrary.from_xml(cls, path)
145 if path is None:
146 raise ValueError("Either path or openmc.config[‘cross_sections’] "
147 “must be set”)
→ 149 tree = ET.parse(path)
150 root = tree.getroot()
151 if root.find(‘directory’) is not None:
File /opt/anaconda3/3.10/anaconda3/envs/openmc-env/lib/python3.10/xml/etree/ElementTree.py:1222, in parse(source, parser)
1213 “”“Parse XML document into element tree.
1214
1215 source is a filename or file object containing XML data,
(…)
1219
1220 “””
1221 tree = ElementTree()
→ 1222 tree.parse(source, parser)
1223 return tree
File /opt/anaconda3/3.10/anaconda3/envs/openmc-env/lib/python3.10/xml/etree/ElementTree.py:569, in ElementTree.parse(self, source, parser)
567 close_source = False
568 if not hasattr(source, “read”):
→ 569 source = open(source, “rb”)
570 close_source = True
571 try:
IsADirectoryError: [Errno 21] Is a directory: ‘/opt/endfb-vii.1-hdf5’