Git Product home page Git Product logo

celesti_track's Introduction

N-Body Celestials Simulation

Description

This is a simple N-body simulation of Celestials.

Remaining Questions

  1. 2D vs 3D: For now we choose to use 3D, but we can also use 2D.

  2. System invariance and consistency of state
    Regardless of how and where the bodies are initialized, the states of these initialized points should also be consistent.

  • potential solution:
    • center of mass frame
    • fixing the initial positions of the bodies
    • use invariant encodings of the state
  1. Collision detection

Celestial Bodies

  1. Properties

    • mass (m)
    • position (x, y, z)
    • velocity (vx, vy, vz)
  2. Default Units

    • ( G = 1 )
    • ( M_{\text{planet}} = 1 )
    • ( M_{\text{star}} = 1 )

    A one star and one planet system is used as the default system.

  3. Solar-sys like Units

    • ( Yr = 365.25 ) days (Julian)
    • ( AU = 1.495978707 \times 10^{11} ) m
    • ( M_{\text{sun}} = 1.98855 \times 10^{30} ) kg
    • ( G = 4 \pi^2 \left( \frac{AU^3}{M_{\text{sun}} \times Yr^2} \right) = 39.47841760435743 )

    Details explaination about the units and gravitational constant.

Compared with data in Hamiltonian NN
  1. Properies (State)

    • mass (m)
    • position (x, y)
    • velocity (vx, vy)
  2. Energy

    • kinetic energy
    • potential energy
  3. Default Units

    • ( G = 1 )
    • ( M_{\text{celestial}} = 1 )
  4. Return Values

    • Position and Velocity of the bodies in time steps (x, y, vx, vy)
    • Derivatives of the position and velocity of the bodies in time steps (dx/dt, dy/dt, dvx/dt, dvy/dt)
    • Energy of the system in time steps (e = potential + kinetic)

Additional Notes

A more advanced implementation: Using the Rebound library to calculate the gravitational interactions between the bodies. The simulation is done in 3D, but the output is a 2D projection of the orbits on the XY plane.

Celestial Bodies

  1. Properties
    • mass (m)
    • position (x, y, z)
    • velocity (vx, vy, vz)

celesti_track's People

Contributors

w3nhao avatar

Watchers

 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.