https://github.com/ocramz/rungekutta
https://github.com/ocramz/rungekutta
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ocramz/rungekutta
- Owner: ocramz
- License: other
- Created: 2022-03-09T17:49:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-10T15:18:56.000Z (over 3 years ago)
- Last Synced: 2025-07-08T20:23:31.846Z (3 months ago)
- Language: Haskell
- Size: 16.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
This is a small module collecting about a dozen Runge-Kutta methods
of different orders, along with a couple of programs to exercise them.Build and run testrk, volterra, volterra2, and arenstorf:
o testrk exercises all of the methods in a non-adaptive way,
solving a test problem with a known analytic solution,
to check convergence. (This was what first indicated that
there was a problem with the Fehlberg 7(8) listing in HNW.)o volterra uses a non-adaptive method to solve the Lotka-Volterra
equations from t=0 to t=40: either from a built-in starting point,
or from a starting point specified on the command line.o volterra2 does the same, except it uses an adaptive solver
o arenstorf solves the restricted 3-body problem (earth+moon+satellite)
using an adaptive solver with some specific initial conditions
which yield periodic orbitsThe volterra2 and arenstorf examples use an "oracle" function to
decide what is a good step size. Right now that oracle function is in
each test file; arguably it should be in the RungeKutta module.
Eventually it will be, but I haven't spent much time yet on making
that oracle especially good.