项目作者: zaman13

项目描述 :
A python code to calculate planetary orbits in a three-body gravitational system. The code can demonstrate how one planet affects the orbit of another planet. As an example, Earth, Jupiter, Sun system is analyzed.
高级语言: Jupyter Notebook
项目地址: git://github.com/zaman13/Three-Body-Problem-Gravitational-System.git
创建时间: 2018-06-08T21:49:21Z
项目社区:https://github.com/zaman13/Three-Body-Problem-Gravitational-System

开源协议:MIT License

下载


Three-Body-Problem-Gravitational-System


alt text
alt text
alt text
alt text

alt text

A python code to calculate planetary orbits in a three-body gravitational system. The code can demonstrate how one planet affects the orbit of another planet. As an example, Earth, Jupiter, Sun system is analyzed.

The code is available in Jupyter notebook (or IPython notebook) format and python script format (suitable for running with spyder).

alt text " class="reference-link">Math and Theory alt text

Theory file

Requirements

The code uses matplotlib to create the orbital motion animation. The package ffmpeg is required to run the animation. It can be installed using the Anaconda terminal:

  1. conda install -c menpo ffmpeg

The video is embedded in the Jupyter notebook using html5. The vidoe can also exported as mp4.

Earth-Jupiter-Sun system

The effect of Jupiter on Earth’s orbit can be visualized using the Earth-Jupiter-Sun system notebook. The mass of Jupiter was taken to be 500 times its original mass. The effect on Earth’s orbit due to the presence of this “Super Jupiter” can be easily noticed from the orbital animation.

Sample output

Earth-Jupiter-Sun system.

alt text

References

  1. Earth fact sheet: https://nssdc.gsfc.nasa.gov/planetary/factsheet/earthfact.html
  2. Jupiter fact sheet: https://nssdc.gsfc.nasa.gov/planetary/factsheet/jupiterfact.html
  3. https://www.phas.ubc.ca/~berciu/TEACHING/PHYS349/karla.pdf