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

[Critical] Fix CN implementation of radially varying magnetic diffusion #346

Merged
merged 8 commits into from
Dec 3, 2021

Conversation

feathern
Copy link
Contributor

@feathern feathern commented Dec 3, 2021

The benchmarks, as well as most users, run with diffusion coefficients (nu, kappa, eta) that are constant in radius. Because of this, a bug in the code has gone unnoticed for a very long time. The diffusive terms are evolved using the semi-implicit Crank-Nicholson method, which is effectively an average of the forward and backward Euler methods. A magnetic diffusion term for the A-potential equation, namely dA/dr*deta/dr was being evolved without the explicit contribution from the CN scheme (i.e., the forward Euler component). This PR fixes the issue.

Please do not accept this PR just yet. I would like to hear from Rene about how we might automatically manage release notes before this is fully accepted.

@feathern feathern changed the title [WIP][Critical] Fix CN implementation of radially varying magnetic diffusion [Critical] Fix CN implementation of radially varying magnetic diffusion Dec 3, 2021
@feathern
Copy link
Contributor Author

feathern commented Dec 3, 2021

This PR is safe to accept now. I also added the changelog file as discussed.

Copy link
Contributor

@orvedahl orvedahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, thanks Nick.

@orvedahl orvedahl merged commit 147e4c6 into geodynamics:master Dec 3, 2021
@feathern feathern deleted the eta_fix2 branch May 10, 2024 15:19
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

Successfully merging this pull request may close these issues.

2 participants