mctools / ncrystal

NCrystal : a library for thermal neutron transport in crystals and other materials
https://mctools.github.io/ncrystal/
Other
41 stars 18 forks source link

Improve scattering kernel sampling #40

Open tkittel opened 4 years ago

tkittel commented 4 years ago

NCrystal v2.0.0 (to be released shortly) will include support for scattering kernels. Although we will already be using the improved sampling algorithm for these that we published in 2018, I am opening this issue to remind ourselves to at some point find time to implement the so-called "cell-based sampling" idea that we have discussed internally. That should result in much faster sampling, and sampling with fewer unwanted artifacts.

tkittel commented 2 years ago

NCrystal v3.1.0 (to be released shortly) will slightly address some of the artifacts near the kinematic endpoint, but as the spurious vertical "lines" in the following plots show, there are still (as expected) issues arising when the alpha distribution at two neighbouring beta grid points are different enough:

1KHe4_sample_5Aa_neutron

At least the new SABEval utilities created for v3.1.0 will make the remaining work for a cell-based sampling implementation a lot less.

dddijulio commented 1 year ago

Some artifacts appear in the scattered angles and energies at low temperatures when using the standard sampling with the He-4 kernels. This is more apparent at lower temperatures. They appear to be gone when using SAB exactly. See attached data at 0.75 K and 1.3 K with 0.002 eV incoming neutrons. At 1.3 K it looks like both methods give the same result, but the artifacts are there at 0.75 K. ucnmode=refine does not remove the artifacts.

0 75K_SABExactly 0 75K_Standard 1 3K_SABExactly 1 3K_Standard

tkittel commented 7 months ago

Another approach is also to split out the G1 (and perhaps G2) contributions into dedicated processes, which only need the G1 1D grid as tabulated data.