-
Notifications
You must be signed in to change notification settings - Fork 114
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
Correct Formula for Potential Energy #2227
base: main
Are you sure you want to change the base?
Correct Formula for Potential Energy #2227
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this!
examples/paper_self_gravitating_gas_dynamics/elixir_eulergravity_jeans_instability.jl
Outdated
Show resolved
Hide resolved
…ty_jeans_instability.jl Co-authored-by: Hendrik Ranocha <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2227 +/- ##
==========================================
+ Coverage 77.62% 83.95% +6.34%
==========================================
Files 486 486
Lines 39107 39118 +11
==========================================
+ Hits 30353 32840 +2487
+ Misses 8754 6278 -2476
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
The formula for the (gravitational) potential energy from the Euler-Gravity paper is wrong:
and should contain a factor of 0.5 according to the book "Galactic Dynamics"
The reason why this was not spotted is that the analytical solution in the reproducibility repository is only read from file, not computed from the formula for the analytical solution (see e.g. FLASH user guide, equation (34.35))
Using this code
one obtains the correct plot: