njoy / NJOY21

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

Thermal Scattering low at very low temperature #103

Closed chlavell closed 4 years ago

chlavell commented 4 years ago

Hello,

Attempting to create 0.1 K thermal scattering law files. Frequent NaN errors below ~3.5 K in LEAPR. Varies with material. Material requires Skold treatment. Have attempted various alpha beta grids without success, also using einstien oscillators where appropriate. Using a GDOS up to a few 10s of meV (instead of the full 400 meV range) seems to get temperature lower, but not where we want it.

Thanks!

TSL Carbon file attached.

DPMC_input_0.10.txt

jlconlin commented 4 years ago

Thank you @chlavell for your input. I can confirm that when I run your input, I get a bunch of NaNs as you have reported. It's not clear at the moment whether this is a bug in NJOy or a problem with your input deck. Unfortunately, I'm not an expert on thermal scattering data. Hopefully someone like @ameliajo, @vedantkm, or @marquezj can chime in.

marquezj commented 4 years ago

Hi Chris: aside of the possible bugs, PMMA is a solid and the Sköld (and Vineyard) approximations are valid for liquids. If you really need the coherent inelastic component you should consider computing the one-phonon coherent contribution.

I will try to check the bug later and report back.

Good luck.

Ignacio

marquezj commented 4 years ago

Ok @chlavell this is the problem: for very low temperatures you need large values of beta to represent the energies of the spectrum. fsum (the function used to compute the normalization of the spectrum, the effective temperature and the Debye-Waller integral) requires the calculation of exp(beta), and that is the cause of the NaNs. As it is, the bug is it it gives back a NaN instead of throwing an error, but with the current algorithm you still get into trouble.

Going for very low temperatures will always be tough, but perhaps in the new implementation of LEAPR this could be improved by avoiding the calculation of exp(beta), cosh(beta), sinh(beta), etc if possible.

chlavell commented 4 years ago

Thanks Ignacio,

Good to have an answer, thanks for looking into it. Maybe it’s an uniformed question, but Can we just throw zeros for beta > some value? Happy to take an answer, and discuss s(q) choice, in one-to-one email.

Nice to hear from you again, by the way. The new thermal inclusions in endf are a wonderful accomplishment.

Chris

Sent with BlackBerry Work (www.blackberry.com)

From: Jose Ignacio Marquez Damian notifications@github.com<mailto:notifications@github.com> Date: Friday, Feb 07, 2020, 12:40 AM To: njoy/NJOY21 NJOY21@noreply.github.com<mailto:NJOY21@noreply.github.com> Cc: Lavelle, Christopher M. Christopher.Lavelle@jhuapl.edu<mailto:Christopher.Lavelle@jhuapl.edu>, Mention mention@noreply.github.com<mailto:mention@noreply.github.com> Subject: [EXT] Re: [njoy/NJOY21] Thermal Scattering low at very low temperature (#103)

APL external email warning: Verify sender noreply@github.com before clicking links or attachments

Ok @chlavellhttps://github.com/chlavell this is the problem: for very low temperatures you need large values of beta to represent the energies of the spectrum. fsum (the function used to compute the normalization of the spectrum, the effective temperature and the Debye-Waller integral) requires the calculation of exp(beta), and that is the cause of the NaNs. As it is, the bug is it it gives back a NaN instead of throwing an error, but with the current algorithm you still get into trouble.

Going for very low temperatures will always be tough, but perhaps in the new implementation of LEAPR this could be improved by avoiding the calculation of exp(beta), cosh(beta), sinh(beta), etc if possible.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/njoy/NJOY21/issues/103?email_source=notifications&email_token=AOPO7SXU7WIH4WKZTL2JW2TRBTX3FA5CNFSM4KQ7FEJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELBZI5A#issuecomment-583242868, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOPO7SXYVWHXY3YD5TM2CGLRBTX3FANCNFSM4KQ7FEJQ.

chlavell commented 4 years ago

Sorry, new to github. Didnt realize I could post here.

The S(Q) choice comes from our own measurements, the elastic shows structure factor. Results similar to those of Kanaya (PHYSICAL REVIEW B, VOLUME 64, 144202) and Genix (Macromolecules 2006, 39, 3947-3958).

Given the measurements, I can already estimate , so if that computation is throwing the error, could we skip it and allow user input?

jlconlin commented 4 years ago

So this seems like a problem with the input values and not an issue with NJOY. Am I misunderstanding the problem?

chlavell commented 4 years ago

A bit of both. The temperature I'm trying to achieve is very low, Liquid He4 temp. Some of the excitation in the density of states are in excess of 100 meV. E/kT becomes very large, which Ignacio believes is leading to NaN errors. That being said, trying reaching to these temperatures with NJOY/LEAPR is an unusual application. That work just finished up, so we'll have to leave it there for now, or at least I will. Thanks for your help!