Skip to content

About

Circular restricted three-body problem in Python: Earth-Moon orbits, Lagrange points, zero-velocity curves and Poincaré sections (Martins & Zanotello, Rev. Bras. Ensino Fís. 2018).

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Celestial dynamics

Python checks paper: 10.1590/1806-9126-rbef-2017-0174 python: 3.10+ license: Apache 2.0 website: research page

Orbits, Lagrange points and Poincaré sections of the restricted three-body problem.

An orbit around the Earth traced out on the Earth-Moon effective-potential landscape, with the zero-velocity curve and the five Lagrange points

A small Python exploration of the planar circular restricted three-body problem (think Earth, Moon and a spacecraft): trajectories in the rotating frame, the five Lagrange points, zero-velocity curves and Poincaré sections. It accompanies the review by Martins & Zanotello (2018).

Run it

git clone https://github.com/EngFlavioMartins/celestial-dynamics.git
cd celestial-dynamics
python run.py

run.py computes an Earth-Moon orbit and its Poincaré section and saves them to outputs/demo/dynamics.png. The first time, it installs what it needs into a private .venv folder (a minute or so); after that it starts at once. All you need is Python 3.10 or newer.

Prefer conda?
conda env create -f environment.yml
conda activate celestial-dynamics
python -m celestial_dynamics.cli

Next: Try python run.py --jacobi 3.1 for another energy level. The equations are in docs/method.md.

Figure and animation

Effective-potential landscape of the Earth-Moon system with a computed rosette orbit in the Earth's well, the zero-velocity curve and the five labelled Lagrange points

The effective potential of the Earth-Moon system with one orbit (amber), the zero-velocity curve and the five Lagrange points. The surface height is −log Ω, a display transform that keeps the wells, saddles and hills in place.

sh scripts/render/make_figure.sh          # the figure
python scripts/render/make_animation.py   # the animation at the top

Both need ParaView; the figure also needs LaTeX.

Cite

This code accompanies the review below. If you use it, please cite:

@article{martins2018threebody,
  author  = {Martins, Flavio A. C. and Zanotello, M.},
  title   = {Mec{\^a}nica Celeste e a Teoria dos Sistemas Din{\^a}micos: Uma Revis{\~a}o do Problema Circular Restrito de Tr{\^e}s Corpos},
  journal = {Revista Brasileira de Ensino de F{\'\i}sica},
  volume  = {40},
  number  = {2},
  pages   = {e2310},
  year    = {2018},
  doi     = {10.1590/1806-9126-rbef-2017-0174}
}

GitHub's Cite this repository button (from CITATION.cff) gives the same reference in other formats.

Licence

Apache 2.0: you are free to use, change and share this code, also commercially. If you pass it on, keep the NOTICE file with it; it says where the code comes from and how to cite it.

The bundled IBM Plex Sans fonts use the SIL Open Font Licence.

About

Circular restricted three-body problem in Python: Earth-Moon orbits, Lagrange points, zero-velocity curves and Poincaré sections (Martins & Zanotello, Rev. Bras. Ensino Fís. 2018).

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages