Specific orbital energy (source code)

= Specific orbital energy
{title2=$\varepsilon$}
{wiki}

The <specific orbital energy> is the relative <mechanical energy> per unit <reduced mass> in the Newtonian <two-body problem>. For total <mass> $M=M_1+M_2$, <gravitational parameter> $\mu_g=GM$, separation $r$ and relative <speed> $v$, it is
$$
\varepsilon=\frac{v^2}{2}-\frac{\mu_g}{r}=-\frac{\mu_g}{2a}.
$$
The <gravitational potential> is taken to vanish at infinite separation. The last equality uses a signed <semi-major axis> $a$: positive for a bound <ellipse> and negative for a <hyperbolic Kepler orbit>. A <parabolic Kepler orbit> has $\varepsilon=0$ and no finite <semi-major axis>. For nonradial attractive <Kepler orbits>, these signs distinguish the three orbit classes.<Introduction to Celestial Mechanics by Richard Fitzpatrick>[Online Orbital energies, equations 4.41–4.45]{ref}

For a <circular orbit>, $v^2=\mu_g/r$ gives $\varepsilon=-\mu_g/(2r)$. For an escaping <hyperbolic Kepler orbit>, taking $r\to\infty$ gives the <hyperbolic excess speed> $v_\infty=\sqrt{2\varepsilon}$. Multiplication by the <reduced mass> gives the <two-body orbital energy>; dividing by a different <mass> would mix conventions. The units of <specific orbital energy> are $\mathrm{J\,kg^{-1}}=\mathrm{m^2\,s^{-2}}$.