This is an old computational program in Python that I completed during my Master's in Astro and Particle Physics as part of a practical course in Astronomy and Astrophysics coursework. The repository has two different
The gravitation appears deceptively simple when it is put into mathematical form. The weakest among the lot! Its dependence on mass and the infinite range of effects creates an insurmountable difficulty when considering any celestial body's dynamics. In common dictum, each body attracts the other, so the motion of a body has a very complicated dependence on the configurations of other bodies. The N-body problem is about this. This protocol aims to consider an assembly of N-bodies and study the cause and effect among themselves.
Classical mechanics gives a few handfuls of ways of looking at the problem of classical dynamics. Lagrangian and Hamiltonian points of view are essentially similar to each other, but preferences of one over the other depend on the nature of the problem. Hamiltonian method opens a new way of visualizing the problem in the phase space. Since the N-body problem consists of a large number of particles, the Hamiltonian point of view is more feasible.
The motion of N point masses in their mutual gravitational field is the classical N-body problem. The Hamiltonian of a system is
With canonical momentum
and
Steps Are
-Using Hamiltonian the equation of motion, here, the rate of change of position vector and momenta, are obtained.
-Different numerical methods of computing differential equations have been used.
-Finally, the results are plotted. Oribit of two body systems, stability analysis of numerical computations, etc.
The dynamics aim to find the positions of particles for a given time. Numerical integration of the differential equations is required for this purpose. The Euler method, Leap Frog method, Verlet method, and Runge-Kutta method are employed for numerical calculations.
Follow these steps to get the project up and running on your local machine. Prerequisites
Python 3.x
NumPy
Matplotlib
Installation
Clone the repository: url git clone https://github.com/QED137/N-Body
- git clone -url "https://github.com/QED137/N-Body"
- cd N-Body.
- run chaos_part_1.ipynb
This project is part of the experimental lab for the Master's in Astro and Particle Physics course at the University of Tübingen.