Floor cross species thermal velocities at zero - #1076
Open
Maxwell-Rosen wants to merge 15 commits into
Open
Conversation
…using ion-electron collisions in 2x
…ove unused mirror failure file
…write_diagnostics
…This took me hours to debug and claude found it in 30 seconds, but I wouldn't have been able to focus claude in the right areas without the debugging.
…tive. Cell average being zero means that there should be no cross species collisions, reducing to the self-species collisions
14 tasks
Collaborator
|
i would think that flooring it to the minimum representable temperature (rather than 0) would be better. Also, I think this needs some serious testing, perhaps with:
|
Collaborator
Author
|
Although I understand the physical reasons for setting the floor to the minimum representable temperature, I do not think this will make a significant numerical difference. I'm skeptical that this change would alter the results meaningfully, but we can do it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is a fundamental flaw with the equations we use to compute the cross-species thermal velocities. These equations are defined in:
M. Francisquez, J. Juno, A. Hakim, G. W. Hammett, and D. R. Ernst, Improved multispecies Dougherty collisions, J. Plasma Phys. 88, 905880303 (2022).
The key equations are 2.9 and 2.10

When the mass ratio is large enough and Ti >> Te, this can lead to a negative thermal velocity squared.
To patch this, we insert the appropriate lines of code after the cross species thermal velocity is calculated
This is an appropriate patch for robustness; however, a future endeavor will need to reformulate cross-species collisions so as not to produce this error. Rosenbluth collisions will be added in the future, so it's not worth redoing the Dougherty collision-operator formulation for the mirrors.
This PR requires a cross-species collisions diagnostic, so this is combined with #1013.
Before:

After:
