Documentation / @interstellar-tools/equations / specificMechanicalEnergy
Function: specificMechanicalEnergy()
ts
function specificMechanicalEnergy(v: number, r: number, mu: number): number;Defined in: orbits/specific-mechanical-energy.ts:68
Specific mechanical energy ($ \varepsilon $) of a point mass in a central gravity field.
Definition
where (
Units
- Inputs: (
) in m/s, ( ) in m, ( ) in m³/s². - Output: (
) in J/kg (i.e., m²/s²).
Orbit-type by sign
- (
) → elliptic (bound) - (
) → parabolic - (
) → hyperbolic
TIP
- For circular orbits (
), so ($ \varepsilon = -\mu/(2r) $). - If you have the semi-major axis (
), then ($ \varepsilon = -\mu/(2a) $).
In practiceEnergy of the ISS orbit
-29.35 MJ/kg
Specific orbital energy at 420 km altitude
Negative means the orbit is bound. Escaping Earth from there takes 29.35 MJ more for every kilogram, which brings the energy up to zero.
ts
const mu = 3.986004418e14;
const r = 6.371e6 + 420e3;
const v = circularSpeed(r, mu);
specificMechanicalEnergy(v, r, mu); // ≈ -2.935e7 J/kgParameters
| Parameter | Type | Description |
|---|---|---|
v | number | Speed magnitude ( |
r | number | Radius ( |
mu | number | Gravitational parameter ( |
Returns
number
Specific mechanical energy (
Throws
Error If v is not finite or negative.
Throws
Error If r is not finite or non-positive.
Throws
Error If mu is not finite or negative.
Example
ts
// LEO example around Earth (~400 km altitude)
const muEarth = 3.986004418e14; // m³/s²
const r = 6378e3 + 400e3; // Earth radius + 400 km
const v = Math.sqrt(muEarth / r); // near-circular speed
const eps = specificMechanicalEnergy(v, r, muEarth);
// eps ≈ -mu/(2r)