Skip to content

moadotexe/threebodypython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

THREE BODY PROBLEM IN PYTHON

ABOUT:

The purpose of this project was as a capstone for a Computational Physics class focused on solving Physics problems numerically with Python. This course recaps basic and intermediate Physics but in the context of implementing computer solutions to these problems. I chose the three-body problem as the capstone of this course as I was interested in orbital mechanics and I was reading Liu Cixin's book which takes inspiration from this problem aptly named The Three Body Problem. This program is written entirely on a Jupyter notebook.

RUNNING THE NOTEBOOK: Before any numerical operations are conducted, there is a recap on Orbital Mechanics to familiarize one with the calculus that was implemented in solving these problems. After that, a baseline model is set by using our nearest neighbor, the Moon. The Earth and the Moon are a simple example of orbital mechanics and constants such as the gravitational constant, and the masses of Earth and the Moon are set. The relevant numerical libraries such as Numpy and Scipy are imported at this stage as well as Matplotlib for visualizing the path of these objects. The initial visualization is that of the relative paths of both celestial bodies. This plot is duplicated but with the spheres to easily visualize the orbital mechanics of the Earth and the Moon. This is replicated with the Sun added into the system. This is technically a three-body problem, however, the Sun's mass is just so large that it makes the combined mass of the Earth and Moon negligible. This is illustrated after the numerical calculations are done to represent the motions of these bodies. To better illustrate the three-body problem a hypothetical situation with the Centauri Star system demonstrates the chaos of a three-body system where the bodies are of equal mass. Although functionally, the Centauri system is a binary star system, there is a third star that is much lighter so in essence, it functions like a two-body problem. Like in the first two examples, the calculations were implemented and the orbits plotted. This time, the center of mass was added as both stars are of equal mass. Adding a third equally massive star is done at the end and the results show the true nature of three-body problems. Overall this is a visualization of a mathematics and physics problem that has stumped many of the greatest minds in the field and why it is nearly impossible to find a general solution.

CONTACT:

If you have any inquiries about this project, please reach out to me through my email: [email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published