Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debye numerical stability near zero. #147

Open
lukeamyers opened this issue Dec 6, 2024 · 0 comments
Open

Debye numerical stability near zero. #147

lukeamyers opened this issue Dec 6, 2024 · 0 comments

Comments

@lukeamyers
Copy link
Collaborator

lukeamyers commented Dec 6, 2024

When running debye.process_debye_gruneisen(), this warning occurs when calculating the heat capacity for small temperatures (I think I had 0.25 K):

dfttk/debye.py:306: RuntimeWarning: overflow encountered in exp 
- 3 * x[non_zero_temp_mask] / (np.exp(x[non_zero_temp_mask]) - 1)

Basically x = theta/T and np.exp(x) is the exponential of an already large value. A numerical approximation (Taylor series?) could be used for small temperatures. or perhaps there is some other way to avoid exponentiation. At least I think this is what's happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant