3D N-Body Problem (Solar System) C#

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 replies · 3K views
mrtree
Messages
1
Reaction score
0
Hey there, first time posting, I have casually browsed this forum for a while.

Anyway on to the question, I am trying to solve in the best way possible the N-Body problem, I am at a complete loss, I have no idea what I can do, I have tried figuring out my self different integrators such as Verlet and RK4, but I cannot figure out anything.

What I need to be able to do is simulate our solar system in 3D, I have seen many implementations in 2D, but I can't find out how to calculate velocity, force and position as a function of time.

Any help would be amazing, and I would be eternally grateful.

EDIT: I should point the orbital bodies to be simulated.

Sun is Static in the center, 0,0,0
Mercury, Venus, Earth, Moon, Mars, Jupiter, Saturn, Uranus, Neptune and Pluto
 
on Phys.org
Start from the equations of motion for each planet. Convert this to a system of first-order differential equations, and you should be able to use that with any general-purpose integrator, such as Runge-Kutta.