Looking for Runge-Kutta 8th order in C/C++

  • C/C++
  • Thread starter thor36
  • Start date
  • Tags
    Runge-kutta
In summary, the conversation discusses the use of Runge-Kutta methods in a celestial mechanics/astrodynamics application, specifically the 8th order method (89). The person is looking for a library or implementation that is free to use and well-documented, preferably in C++. They have found a library but are unsure about its licensing. Someone suggests looking up the eighth order Runge-Kutta method online and provides a list of papers, including one by E. Fehlberg which discusses high-order RK methods. The person thanks them for the answer but clarifies that they are looking for existing software. They have found a library that includes a Runge-Kutta-Fehlberg (78) method and ask for the main differences
  • #1
thor36
10
0
Greetings all !
This is my first post on the forum, so please kindly let me know if I am not asking a proper question or on a proper board.

I would like to use Runge-Kutta 8th order method (89) in a celestial mechanics / astrodynamics application, written in C++. Therefore I wonder if anyone knows a good library / implementation that is documented and free to use ? It is ok if it is written in C, as long as there aren't any compilation problems to be expected.

So far I have found this library. The code seems ok, but I haven't found any information on licensing.

Can you help me by revealing some of the alternatives you might know and would suit my problem ?
Thank you very much and kind regards,
T
 
Last edited:
Technology news on Phys.org
  • #2
If you google "eighth order runge kutta method" you'll find plenty of hits to keep you busy.

The list of papers here might be of use, particularly the paper by E. Fehlberg, which discusses
high-order RK methods:
 

Attachments

  • RKmethods.pdf
    28.6 KB · Views: 983
  • #3
Thank you for the answer. My question was more application oriented though, trying to find already written software. Nonetheless, I have found a library which includes a Runge-Kutta-Fehlberg(78) method.

Can anyone explain me the main differences if I would be using the "RKF78" instead of RK89 ?

My application would be celestial mechanics - planetary motion as well as artificial satellites. There may be a lot of forces and other varying parameters included, and precision is preferred over computation time. Thank you.
 
  • #4
If the methods go by the same naming convention, then RFK78 should be 7th order with 8th order error estimate, while RK89 should be 8th order with 9th order error estimate.
 
  • #5
Rather very slow methods to the n-body Newtonian problem.
Once I used the extrapolated methods... some new version, very fast and practically any order: 2 up to 100, for example, but with higher precision (probably something as 256 bit - quad double; double is enought up to order 20 at most... mayby 16).
 

1. What is Runge-Kutta 8th order and how is it used in C/C++?

Runge-Kutta 8th order is a numerical method used for solving ordinary differential equations. It is often used in C/C++ programming to approximate solutions to complex mathematical problems.

2. How does Runge-Kutta 8th order differ from other numerical methods?

Unlike lower order Runge-Kutta methods, the 8th order method provides a more accurate approximation of the solution by using more intermediate calculations. This results in a higher level of precision and is especially useful for problems with rapidly changing behavior.

3. Can Runge-Kutta 8th order be used for all types of differential equations?

No, Runge-Kutta 8th order is specifically designed for solving ordinary differential equations. It may not be suitable for partial differential equations or other types of equations.

4. Are there any limitations or drawbacks to using Runge-Kutta 8th order in C/C++?

One limitation of using Runge-Kutta 8th order is that it can be computationally expensive, requiring a large number of calculations for each time step. Additionally, it may not be suitable for highly stiff differential equations.

5. Are there any resources or libraries available for implementing Runge-Kutta 8th order in C/C++?

Yes, there are various libraries and resources available for implementing Runge-Kutta 8th order in C/C++, such as the GNU Scientific Library and the Boost library. These resources provide pre-written code for efficient implementation of the method.

Similar threads

  • Programming and Computer Science
Replies
15
Views
2K
Replies
56
Views
708
  • Programming and Computer Science
Replies
2
Views
2K
  • Programming and Computer Science
Replies
5
Views
2K
  • Programming and Computer Science
Replies
1
Views
2K
  • Differential Equations
Replies
6
Views
3K
  • Programming and Computer Science
Replies
14
Views
4K
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
  • Programming and Computer Science
Replies
10
Views
12K
Replies
2
Views
8K
Back
Top