Accessing Photo-Nuclear Reaction Data

Hi,

I was trying to use the openmc.data class to access photo-nuclear reaction cross sections either in ENDF or ACE format. I tried accessing the data using the IncidentPhoton and PhotonReaction classes but got error for either one.
I am unsure if these classes are even designed to access the data I am interested in and looking through the documentation I wasn’t able to find a definitive answer. My code looks like this:

mo100_g = openmc.data.PhotonReaction.from_ace(‘./j20u/42100.20u’, mt=4)

It returns the following error:

File ~/anaconda3/envs/openmc/lib/python3.11/site-packages/openmc/data/photon.py:992, in PhotonReaction.from_ace(cls, ace, mt)

989 rx = cls(mt) 991
'# Get energy grid (stored as logarithms)
→ 992 n = ace.nxs[3] 993 idx = ace.jxs[1]
994 energy = np.exp(ace.xss[idx : idx+n])*EV_PER_MEV

AttributeError: ‘str’ object has no attribute ‘nxs’

I also tried using the openmc.data.ace.Library function and I was able to read the ACE file but I wasn’t able to get to the cross sections. Any insight and help is greatly appreciated.

Hi @scheur13. At present, our ACE/ENDF functionality in openmc.data only handles photoatomic data, not photonuclear data. It wouldn’t be terribly difficult to code something up to read the data given our existing capabilities though if you wanted to give it a shot.