Giter VIP home page Giter VIP logo

soefati / three-body-problem-gravitational-system Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zaman13/three-body-problem-gravitational-system

0.0 0.0 0.0 2.02 MB

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.

License: MIT License

Python 0.71% Jupyter Notebook 99.29%

three-body-problem-gravitational-system's Introduction

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).

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:

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

three-body-problem-gravitational-system's People

Contributors

zaman13 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.