njoy / NJOY21

NJOY for the 21st Century
https://www.njoy21.io/NJOY21
Other
71 stars 38 forks source link

THERMR produces coherent elastic cross section even if no MF7 MT2 present in TNSL file #140

Open mattooca opened 3 years ago

mattooca commented 3 years ago

Just ran into a surprise when comparing FUDGE and NJOY results for thermal neutron scattering.

For several materials including HinH2O, DinD2O, OinD2O and benzene, the ENDF-VIII evaluation only includes an incoherent inelastic section (MF7 MT4), no MT2 elastic. However, THERMR still produces an elastic cross section that appears to have Bragg edges. This elastic cross section appears to be the same for each material, except scaled down if natom != 1. Since these aren't crystalline materials, I don't expect to see any Bragg peaks.

Possibly related comment in the NJOY manual: "Coherent elastic cross sections are generated for crystalline materials using either parameters given in an ENDF-6 format evaluation or an extended version of the method of HEXSCAT[32]". Is NJOY resorting to a model in the absence of any Bragg edges? I set the 'icoh' option to 1, which seems to indicate 'compute using data from ENDF', although it apparently could also mean 'graphite' in an earlier format.

Here's the thermr input portion of my HinH2O input:

 thermr
  21 -24 -25
  1  125 16 1 2 1 0 2 221 1 / matde, matdp, nbin, ntemp, iin, icoh, iform, natom, mtref, iprint
  293.6   / temp in K
  .001 10.0
 moder
  -25 65

After this, tape65 contains an incoherent inelastic cross section in MF3 MT221, and Bragg edges (plotted below) in MF3 MT222.

HinH2O_elastic

jlconlin commented 3 years ago

As us usually the case with thermal scattering questions, I defer to @ameliajo or @marquezj. They are the thermal scattering experts, not me.

ameliajo commented 3 years ago

Hi, I believe this behavior arises because icoh [6th value in Card2] is set to 1. We're rewriting THERMR right now, but as it is currently icoh=1 tells THERMR that you want coherent elastic data for graphite, and so it [in THERMR] calculates the bragg peak locations etc for that. Setting icoh=0 should fix your problem. In rewriting THERMR, I came across this exact behavior with H(H2O) and spent awhile trying to figure out how to invoke the ENDF6-related interpretation of icoh=1, but I believe that was simply a mistake in the code/manual.

In the newer version of THERMR that is being written, there should be a check to ensure that this accidental behavior does not exist, so thank you so much for raising this.

marquezj commented 3 years ago

Yes, I agree with @ameliajo. It is not a bug, it is exactly the expected result. When you run THERMR to process a liquid you should set icoh=0.

THERMR has hardcoded the parameters for some of the thermal scattering materials in ENDF/B-III to V. Those evaluations were produced with GASKET, which was not able to compute MF=7 / MT=2, and NJOY supports processing them by including Bragg scattering parameters. The combination of no MF = 7 / MT = 2 and icoh = 1/2/3 means "no Bragg scattering parameters given in the ENDF file, compute them for graphite / beryllium / beryllium oxide". This is done in subroutine sigcoh().

Now, at this point we can safely assume that processing something so old can only be done for historical reasons, and a previous version of NJOY could be used for that. Anything evaluated after the introduction of LEAPR does not need it. I would suggest new versions of NJOY should just ignore the input in icoh and always use the value from the ENDF file if available. This is already done now in THERMR, but the change should be to just set icoh=0 if no data is present.