-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
add Piecewise Parabolic Method discretization method #239
base: master
Are you sure you want to change the base?
Conversation
merge for compatibility with sciml/master
I realized I was missing some steps before (those involving the dependence on uΔt) so I added those in. The hyperparameter is now Cx (Courant number times the spacing dx, or uΔt), which existing PPM solvers have access to but we don't. It's probably a good choice to set Cx <= min(dx), but it's hard to give more heuristics than this without further testing. It seems to work best with forward/implicit Euler, which can be slow, and it runs into stability issues with changes to solvers or significant variation to Cx - I don't think this is a useful scheme in the MTK framework as is. The problems seem theoretical, as it's hard to guarantee the interpolation is useful without knowing the exact uΔt, so it may be useful to come up with a new discretization scheme based on the same parabolic interpolation idea but without being so prescriptive about the timestep/needing to know the advection rate. The "incomplete" version I had before (at |
Useful is for benchmarks to determine. Libraries should have both useful and non-useful methods if they are to be a good research tool in the methods themselves! |
Codecov Report
@@ Coverage Diff @@
## master #239 +/- ##
==========================================
- Coverage 78.81% 73.82% -4.99%
==========================================
Files 39 41 +2
Lines 1987 2086 +99
==========================================
- Hits 1566 1540 -26
- Misses 421 546 +125
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
For sure, these are more notes on what I'd like to implement that'd be useful for my own research (and others' work hopefully) than on inherently how useful the method is |
Reference: https://www.sciencedirect.com/science/article/pii/0021999184901438?via%3Dihub
Currently
tests/demo_ppm_runs.jl
shows that it's usable as a substitute for WENO, andtests/demo_parker_singular.jl
shows that it can create aSingularException
that I'd like to try and chase down.PPM is explicitly dependent on the timestep, so only fixed-timestep methods should be used. I think the best ones are forward/implicit Euler, since that's what past astro codes that use PPM have used.
PPM is also compatible with varying dx, which I'd like to try out with the Parker wind problem (which has a logarithmic x axis that I analytically transformed to be uniform) once the fixed-dx case works.