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

Click For Summary
SUMMARY

The discussion focuses on solving the 3D N-Body problem to simulate the solar system using C#. The user has attempted various integrators, specifically Verlet and Runge-Kutta (RK4), but struggles with calculating velocity, force, and position over time. The simulation requires modeling the Sun as a static body at coordinates (0,0,0) and includes planets such as Mercury, Venus, Earth, Moon, Mars, Jupiter, Saturn, Uranus, Neptune, and Pluto. The recommended approach is to start with the equations of motion for each planet and convert them into a system of first-order differential equations suitable for integration.

PREREQUISITES
  • Understanding of the N-Body problem in physics
  • Familiarity with C# programming language
  • Knowledge of numerical integration techniques, specifically Runge-Kutta methods
  • Basic concepts of celestial mechanics and orbital dynamics
NEXT STEPS
  • Research the implementation of Runge-Kutta methods in C# for solving differential equations
  • Explore the equations of motion for celestial bodies and their conversion to first-order differential equations
  • Study existing 3D N-Body simulations to understand common practices and optimizations
  • Learn about gravitational force calculations and their impact on orbital trajectories
USEFUL FOR

Developers interested in astrophysics simulations, educators teaching celestial mechanics, and programmers looking to enhance their skills in numerical methods and C# application development.

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
 
Technology news 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.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 24 ·
Replies
24
Views
5K