Improve coll_krook second derivative#455
Merged
Merged
Conversation
Slightly hacky, but only expect to use this for collisional fluid closure.
This modification avoids taking the first derivative of a first derivative, which may improve numerical stability.
The tests now use more timesteps, so the accumulated rounding errors are a bit bigger.
Don't understand why this change altered the results of coll_krook_tests.jl, but the change is very small so probably nothing to worry about.
Missed in "Initialize and update moment.ion.temp".
Collaborator
Author
|
@LucasMontoya4 - tests passed, should we merge this now? |
Collaborator
|
@johnomotani looks fine to me. Do you think it's alright to have my Zenodo repo for the first paper still point to the previous version of master, so that the simulations can stay as the old ones? |
Collaborator
Author
Yes that's fine. The data provenance should point to whatever version (or versions, if necessary!) you used. |
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.
Slightly hacky, but only expect to use this for the Krook-collisional fluid closure. Should help to prevent spikes at z-direction element boundaries in the ion temperature (in coll_krook simulations).
Also puts the update of
moments.ion.tempin a more standard place, so that the ion temperature is always available (this could be used to simplify code in several places, but this has not been done yet).