Orbital Mechanics Simulator
Simulate planetary orbits under gravity. Adjust mass and initial velocity to explore circular, elliptical, and escape trajectories.
About Orbital Mechanics
Orbital mechanics describes the motion of objects under the influence of gravity. Newton's law of universal gravitation states that every mass attracts every other mass with a force proportional to the product of their masses and inversely proportional to the square of the distance between them.
Key Variables
| Symbol | Name | Unit | Description |
|---|---|---|---|
| G | Gravitational Constant | m³/(kg·s²) | Universal constant of gravitation |
| M | Central Mass | kg | Mass of the central body (e.g., star) |
| m | Orbital Mass | kg | Mass of the orbiting body (negligible) |
| r | Orbital Radius | m | Distance from central body to orbiting body |
| v | Orbital Speed | m/s | Current speed of the orbiting body |
| e | Eccentricity | — | Shape of orbit: 0 = circular, 0<e<1 = elliptical, e≥1 = hyperbolic |
| E | Total Energy | J | KE + PE; negative = bound orbit, positive = escape |
| L | Angular Momentum | kg·m²/s | Conserved quantity: L = m r × v |
Orbit Types
- Circular orbit: v = v_c = √(GM/r). Total energy E < 0, eccentricity e = 0.
- Elliptical orbit: v < v_esc and orbit is bound. E < 0, 0 < e < 1.
- Parabolic escape: v = v_esc = √(2GM/r). E = 0 exactly, e = 1.
- Hyperbolic escape: v > v_esc. E > 0, e > 1 — the body escapes to infinity.
Worked Example
For a circular orbit at distance r = 100 (normalized units) with G = 1, M = 50000:
Kepler's Laws
- First Law: Orbits are ellipses with the central body at one focus.
- Second Law: A line from the central body to the orbiting body sweeps equal areas in equal times (angular momentum conservation).
- Third Law: T² ∝ a³, where a is the semi-major axis of the orbit.
Energy Conservation
The total mechanical energy is the sum of kinetic and gravitational potential energy. For a bound orbit this is negative and remains constant.
Key Formulas
Newton's Law of Gravitation
Circular Orbit Speed
Escape Velocity
Orbital Period (Kepler's 3rd Law)
Eccentricity from Energy and Angular Momentum
| Formula | Description | Notes |
|---|---|---|
| F = GMm/r² | Gravitational force | Inverse-square law |
| v_c = √(GM/r) | Circular orbit speed | Decreases with distance |
| v_esc = √(2GM/r) | Escape velocity | Always √2 times circular speed |
| T² = 4π²a³/(GM) | Kepler's 3rd law | a = semi-major axis |
| E = ½mv² − GMm/r | Total orbital energy | Negative = bound, positive = escape |
| L = mr²ω = mrv⊥ | Angular momentum | Conserved in central force field |
Frequently Asked Questions
Why does the orbit change shape when I change the initial velocity?
The shape of the orbit (its eccentricity) depends on the ratio of the initial speed to the circular orbit speed. At v_c you get a circle; below that, an inward-shifted ellipse; above that, an outward-shifted ellipse; at √2·v_c, you reach escape velocity and the orbit opens into a parabola.
Why does the orbiting body speed up near the central body?
This is Kepler's Second Law: angular momentum L = mrv is conserved. When r decreases, v must increase to keep L constant. The body converts gravitational potential energy into kinetic energy as it falls inward.
What is escape velocity?
Escape velocity is the minimum speed needed to escape the gravitational pull of the central body from a given distance: v_esc = √(2GM/r). It is always √2 ≈ 1.41 times the circular orbit speed at the same radius.
Why is total energy conserved?
Gravity is a conservative force — it does work on the orbiting body, but the work is reversible. Energy shifts between kinetic (½mv²) and potential (−GMm/r) forms, but the total E = KE + PE stays constant throughout the orbit.
What are Kepler's Laws and do they apply here?
Yes. Kepler's First Law (elliptical orbits), Second Law (equal areas in equal times), and Third Law (T² ∝ a³) all emerge naturally from Newton's inverse-square gravity law. The simulator implements this physics directly.