njoy / NJOY2016

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

GROUPR has problems due to NaNs coming from UNRESR #116

Closed whaeck closed 5 years ago

whaeck commented 5 years ago

Thomas Saller (LANL) indicated an issue with ENDF/B-VII.1 Na22 (the same evaluation was also carried over into ENDF/B-VIII.0) leading GROUPR to produce NaN cross section values. It would appear that this is independent of the sigma0 values used (both 1e+10 and 0.1 barn produce some NaN values).

An input file to illustrate the issue is attached: na22.txt

Now, ENDF/B-VII.1 Na22 is a file taken over from JEF 2.2, and it has a history of issues in the unresolved resonance region (PURR for instance also generates negative or zero cross section values in the unresolved resonance region) and it would appear that the problem is related to this as well.

In the calculation method used in UNRESR, a modified cross section sigm is calculated as the sum of the background cross section, the potential scattering cross section, the interference cross section and the sigma0 value. If the background is negative (which is the case for Na22, sigb=-4.77 at 15000 eV) and the sum of the potential scattering and sigma0 value is smaller in absolute value compared to that backgound (sigma0=0.1, spot=4.05 and sint=-0.21 at 15000 eV), then the modified sigm is negative. In the example at 15 keV, sigm=-0.82.

At some point in the calculation, UNRESR will need to calculate a value beta defined as sigm divided by a factor (which is a function of the unresolved resonance parameters). At 15 keV for sigma0=0.1, beta=-1.4e-2 This value is then used later on in a square root of ( 1 + beta ) / beta. As a result, if beta is negative and the absolute value is larger than 1, than the minus sign of beta cancels out int he calculation of the square root. However, is beta is negative and the absolute value is smaller than 1, then we are taking the square root of a negative value. In the example at 15 keV, this leads to a NaN value which then propagates through to the cross section value.

In order to better diagnose this problem in the future, a message should be added to UNRESR to indicate this issue, as we have already done in PURR (where we signal negative cross sections and zero probabilities, or issues with the total cross section not summing to the sum of its components).

As a workaround, I would suggest using a different evaluation.

whaeck commented 5 years ago

Fixed with #117