njoy / NJOY2016

Nuclear data processing with legacy NJOY
https://www.njoy21.io/NJOY2016
Other
96 stars 86 forks source link

Bug in writing exit energy grid for Cd115m1 MF6 MT91 at 9MeV #263

Open HunterBelanger opened 2 years ago

HunterBelanger commented 2 years ago

Hello,

I have had some problems reading the ACE files for Cd115m1 in lib80x (all temps). It appears that for MT 91, the outgoing energy distribution (for an incident energy of 9 MeV) is not sorted. I have tried reprocessing the evaluation myself (NJOY2016.64), and still get the same error from my ACE reader about unsorted exit energies. Upon examining the outgoing energies with their corresponding PDF and CDF values, I see the following:

outgoing energy: [..., 8.36675,      8.52461,      8.68247,     8.84034,      8.999,        8.9982]
PDF:             [..., 4.071329e-13, 8.088499e-14, 1.08047e-14, 9.954359e-16, 4.078309e-17, 0.0000]
CDF:             [..., 1.0,          1.0,          1.0,         1.0,          1.0,          1.0]

Indeed, the outgoing energy is not sorted, but I also realized that the last 6 energies all have a CDF of 1, and therefore, the 5 last energies will likely never be sampled. I imagine the problem in the CDF is due to the very small PDF values not playing well with the limited floating point precision ? If this is indeed the case, there likely isn't much that can be done to solve this issue.

The outgoing energies however are a slightly different story. Looking at the raw Cd115m1 evaluation (lines 12923 and 12929), one can see that an outgoing energy of 8.9982 MeV appears twice. The fact that this outgoing energy appears twice is likely a bug in the evaluation, but that still does not explain why this value is being changed to 8.999 MeV, while the second instance of 8.9982 MeV isn't affected for some reason.

whaeck commented 2 years ago

Interesting. I'll put this one on my list for things to look at.

I looked at the incident energy below and and above 9 MeV in the evaluation (at 8 and 10 MeV), and the last energy is in there twice as well (7.98861 MeV for Ein=8 MeV and 9.89956 MeV for Ein=10 MeV). I haven't looked in the ACE file yet but I wonder why you get this issue at 9 MeV and not 8 or 10 MeV. For the last few outgoing energies, the emission probabilities are also quite low (< 1e-20). Some data curation before adding the to the ACE file might be warranted here.

I do think the last outgoing energy value (with outgoing emission probabilities of 0) are actually redundant. This might be an artifact from EMPIRE. I'll have to talk with Mike Herman to figure that out. Some data curation before adding the to the ACE file might be warranted here.

HunterBelanger commented 2 years ago

So if I manually correct the unsorted energy grid at 9MeV, my library stops throwing errors at me, so for some reason, this doesn't seem to be happening at 8MeV or 10MeV, though I have absolutely no clue why.

whaeck commented 2 years ago

Weird. I'll have a look to figure this out.