Flow Lab

Syllabus / Module 12: Applications: Flight & Aerospace

Lesson 12.7

Orbital Mechanics

The two-body problem, Kepler's laws from ODEs, orbital elements, Hohmann transfers, and integrating orbits accurately.

Written byClaude Opus

🌊
Why this matters for simulation: Spaceflight, and why your integrator choice matters over long times.

By the end of this lesson you can…

  • Reduce two gravitating bodies to one ODE, $\ddot{\mathbf r} = -\mu\mathbf r/r^3$, and show that energy and angular momentum are conserved along it.
  • Derive Kepler's three laws from that ODE: equal areas from angular momentum, conic orbits from the equation for $u = 1/r$, and $T = 2\pi\sqrt{a^3/\mu}$ from the area of the ellipse.
  • Derive $E = -\mu/(2a)$ and the vis-viva equation, and compute an orbit's elements from a position and velocity.
  • Plan a Hohmann transfer from LEO to GEO by hand and check it with a simulation.
  • Explain, with numbers, why velocity Verlet keeps angular momentum exactly and energy in a band over a thousand orbits while RK4 drifts, and when RK4 still wins.
  • Describe the restricted three-body problem and measure its sensitivity to a one-micrometre-per-second change.
On this page
·
  1. Two bodies become one
  2. Two conserved quantities
  3. Polar coordinates and the second law
  4. The shape: conic sections
  5. Energy sets the size: vis-viva
  6. The period: Kepler’s third law
  7. Worked example: the parking orbit
  8. Orbital elements
  9. The Hohmann transfer
  10. Worked example: LEO to GEO
  11. Integrating orbits for a long time
  12. A three-body glimpse
  13. Computing it
  14. Concept checks
  15. Problems
  16. Key Takeaways

12.6 Lateral-Directional Modes closed the aircraft chapter. Now leave the atmosphere: no lift, no fin, no table of derivatives, only the F=ma\mathbf F = m\mathbf a of 12.4 6-DOF Aircraft Equations of Motion with one force, gravity, falling off as the inverse square of distance. That force is simple enough to solve exactly, which makes it the best test bed for an integrator, and it is where integrator choice decides whether a simulated satellite survives a thousand orbits.

Tools: 7.8 Conservative Systems & Lyapunov Functions, 4.7 Energy & Symplectic Integrators, 7.10 Chaos & the Lorenz System.

▶ Video From F = ma with an inverse-square force to Kepler's laws, vis-viva, a Hohmann transfer to GEO, and why Verlet keeps an orbit closed while RK4 slowly lowers itcaptions only
Transcript
  1. Now leave the atmosphere: no lift, no fin, only F equals m a, with one force, gravity, falling off as the inverse square of distance. That force can be solved exactly, so it is the best test bed for an integrator.
  2. Two bodies pull on each other equally and oppositely. Divide each force by its own mass and subtract, and the centre of mass drops out: six equations become three. r double dot equals minus mu r over r cubed, with mu for the Earth 3.986004418 times ten to the fourteenth.
  3. The force is central, so two things are conserved. Energy, kinetic plus potential, trades back and forth around the orbit while the sum stays flat at minus 8.144. And angular momentum h, x y dot minus y x dot, which keeps the orbit in one plane.
  4. In polar form gravity has no sideways part, so r squared theta dot is constant: that is h. The radius sweeps area at the steady rate h over two. Kepler's second law: equal areas in equal times, fast at perigee, slow at apogee.
  5. Trade time for angle and let u be one over r. The radial equation becomes a harmonic oscillator with a constant push: u double prime plus u equals mu over h squared. Its solution is a conic, with the Earth at a focus. Kepler's first law is a theorem, and only an inverse square force makes it so.
  6. Both apsides solve one quadratic, so energy is minus mu over two a, and vis-viva follows. The ellipse area, swept at rate h over two, gives T equals two pi root a cubed over mu, whatever the eccentricity. For a parking orbit at 6778 kilometres: 7668.64 metres per second, 92.56 minutes, and escape at 10,845.09.
  7. To reach geostationary orbit at 42,164 kilometres: burn prograde, coast half an ellipse that touches both circles, burn again. That ellipse has semi-major axis 24,471 kilometres and eccentricity 0.72302. Burn along the velocity, where the craft is fastest.
  8. Vis-viva at perigee gives 10,066.14 metres per second against 7668.64 for the circle: burn one is 2397.51. At apogee the ellipse gives 1618.17 against 3074.67, so burn two is 1456.50. Total 3854.01 metres per second, after 19,048.4 seconds. The simulation flies it with RK4.
  9. Burn one lifts the energy from minus 29.404 to minus 8.144. Burn two, only 61 percent as big, lifts it to minus 4.727. The same delta v does more where the craft is fast.
  10. Now the integrators. Fly the transfer ellipse for 1000 orbits at a 120 second step. RK4 drifts in a straight line, always losing energy, 1.66 times ten to the minus five per orbit. Verlet jumps to a band of 1.435 times ten to the minus two in its first orbit and never leaves it. RK4 crosses that band after 866 orbits.
  11. At equal cost, one RK4 step equals four Verlet steps, so compare Verlet at 30 seconds: it holds 8.912 times ten to the minus four, and RK4 passes it after 53 orbits. Yet over 10 orbits RK4 is 83 times better: use it for one transfer or re-entry, and Verlet for the long run.
  12. Euler is worse. One step multiplies angular momentum by one plus tau squared mu over r cubed, exactly. In low Earth orbit at 60 seconds that is 1.0046 per step, and 93 steps, one orbit, multiply h by 1.239 and leave the craft at 12,010 kilometres. Verlet's kicks and drifts never change h.
  13. Add the Moon and the clean picture breaks: the restricted three-body problem has no closed form, and energy and angular momentum are no longer conserved. Start a craft at 6778 kilometres with 10.733 kilometres per second, plus a twin one micrometre per second faster, for 217 days.
  14. With the Moon off, the twins stay within 1.56 kilometres. With the Moon on they are 0.254 kilometres apart by day 87, 69.2 by day 174 and 4660 by day 217, after a pass 3180 kilometres from the Moon. Close encounters stretch small differences, with no friction anywhere.
  15. To recap. One inverse-square equation conserves energy and angular momentum, and Kepler's laws fall out of it. LEO to GEO costs 3854.01 metres per second. Verlet keeps an orbit in a band while RK4 drifts, and with the Moon a micrometre per second grows to 4660 kilometres.
  16. Next, the heat equation. Conservation of energy plus Fourier's law gives a PDE for the temperature along a bar, and its diffusion term returns in Navier–Stokes as viscosity. This lesson's own sequels are the n-body problem and the orbit planner.

Two bodies become one

A satellite of mass mm at r2\mathbf r_2 and the Earth, mass MM at r1\mathbf r_1, pull on each other with equal and opposite forces of size GMm/r2GMm/r^2, where r=r2−r1\mathbf r = \mathbf r_2 - \mathbf r_1. Divide each force by its own mass and subtract:

r¨=r¨2−r¨1=−G(M+m)r2 rr=−μr3 r,μ=G(M+m).\ddot{\mathbf r} = \ddot{\mathbf r}_2 - \ddot{\mathbf r}_1 = -\frac{G(M + m)}{r^2}\,\frac{\mathbf r}{r} = -\frac{\mu}{r^3}\,\mathbf r, \qquad \mu = G(M + m).

The centre of mass feels no net force, coasts, and drops out: six equations become three. For a satellite μ\mu is the Earth’s, 3.986004418×10143.986004418\times10^{14} m3^3/s2^2, known far better than GG or MM because it is measured directly from orbits. The force points along r\mathbf r: it is central, and that fact gives everything that follows.

Two conserved quantities

Energy. Dot the equation with r˙\dot{\mathbf r}. The left side is ddt12v2\frac{d}{dt}\tfrac12 v^2; on the right, r⋅r˙=rr˙\mathbf r\cdot\dot{\mathbf r} = r\dot r, so the term is −μr˙/r2=ddt(μ/r)-\mu\dot r/r^2 = \frac{d}{dt}(\mu/r). Hence

E=v22−μris constant,E = \frac{v^2}{2} - \frac{\mu}{r} \quad\text{is constant,}

the specific energy, in joules per kilogram: 7.8 Conservative Systems & Lyapunov Functions‘s conserved HH for a particle in the potential −μ/r-\mu/r. It is negative for a bound orbit.

Angular momentum, and why the orbit is flat. The acceleration changes v\mathbf v only by adding multiples of r\mathbf r, and the velocity changes r\mathbf r by multiples of v\mathbf v. Neither can leave the plane containing r\mathbf r and v\mathbf v, so the motion stays in it. In that plane define

h=xy˙−yx˙.h = x\dot y - y\dot x .

Then h˙=xy¨−yx¨\dot h = x\ddot y - y\ddot x (the x˙y˙\dot x\dot y terms cancel), and with x¨=kx\ddot x = kx, y¨=ky\ddot y = ky for the same k=−μ/r3k = -\mu/r^3, this is kxy−kyx=0kxy - kyx = 0. Any central force conserves hh; the inverse square was not used.

Polar coordinates and the second law

Write the position as a complex number, z=reiθz = re^{i\theta}, and differentiate twice with the product rule:

z¨=[(r¨−rθ˙2)+i(2r˙θ˙+rθ¨)]eiθ.\ddot z = \big[(\ddot r - r\dot\theta^2) + i(2\dot r\dot\theta + r\ddot\theta)\big]e^{i\theta}.

The real part in brackets is the acceleration along r\mathbf r, the imaginary part the acceleration across it. Gravity has no cross component, so

r¨−rθ˙2=−μr2,2r˙θ˙+rθ¨=1rddt(r2θ˙)=0.\ddot r - r\dot\theta^2 = -\frac{\mu}{r^2}, \qquad 2\dot r\dot\theta + r\ddot\theta = \frac1r\frac{d}{dt}\big(r^2\dot\theta\big) = 0 .

So r2θ˙=hr^2\dot\theta = h, the same hh in polar form. In a short time dtdt the radius sweeps a thin triangle of area 12r⋅r dθ\tfrac12 r\cdot r\,d\theta, so dA/dt=12r2θ˙=h/2dA/dt = \tfrac12r^2\dot\theta = h/2: Kepler’s second law, equal areas in equal times.

The shape: conic sections

With θ˙=h/r2\dot\theta = h/r^2 the radial equation is one ODE for rr. Trade time for angle and use u=1/ru = 1/r. By the chain rule r˙=drdθθ˙=−1u2dudθ hu2=−hdudθ\dot r = \frac{dr}{d\theta}\dot\theta = -\frac{1}{u^2}\frac{du}{d\theta}\,hu^2 = -h\frac{du}{d\theta}, and again, r¨=−hd2udθ2θ˙=−h2u2d2udθ2\ddot r = -h\frac{d^2u}{d\theta^2}\dot\theta = -h^2u^2\frac{d^2u}{d\theta^2}. Substitute, with rθ˙2=h2u3r\dot\theta^2 = h^2u^3:

d2udθ2+u=μh2.\frac{d^2u}{d\theta^2} + u = \frac{\mu}{h^2}.

This is the harmonic oscillator of 5.3 Mechanical Vibrations: Spring–Mass–Damper with a constant force: the particular solution μ/h2\mu/h^2 plus a cosine. So

r=p1+ecos⁡(θ−ω),p=h2μ,r = \frac{p}{1 + e\cos(\theta - \omega)}, \qquad p = \frac{h^2}{\mu},

with the amplitude e≥0e \ge 0, the eccentricity, and ω\omega the direction of the closest point. This is a conic with the Earth at a focus: a circle for e=0e = 0, an ellipse for e<1e \lt 1, a parabola for e=1e = 1, a hyperbola for e>1e \gt 1. Kepler’s first law is now a theorem. Here the inverse square mattered: only a 1/r21/r^2 force makes the right side constant, and then the orbit closes every turn.

The closest point, periapsis (perigee for the Earth), is at rp=p/(1+e)r_p = p/(1 + e), apoapsis at ra=p/(1−e)r_a = p/(1 - e). Their average is the semi-major axis aa, which gives p=a(1−e2)p = a(1 - e^2).

Energy sets the size: vis-viva

At the apsides the velocity is purely sideways, so v=h/rv = h/r and E=h2/(2r2)−μ/rE = h^2/(2r^2) - \mu/r. Multiply by r2r^2:

Er2+μr−12h2=0.E r^2 + \mu r - \tfrac12 h^2 = 0 .

Both apsides solve this quadratic, so they are its two roots, whose sum is rp+ra=−μ/Er_p + r_a = -\mu/E. With rp+ra=2ar_p + r_a = 2a:

E=−μ2a,v2=μ(2r−1a).E = -\frac{\mu}{2a}, \qquad v^2 = \mu\left(\frac2r - \frac1a\right).

The second form is the vis-viva equation. Size depends only on energy; shape also on hh. Eliminating pp between h2/μh^2/\mu and a(1−e2)a(1 - e^2) gives e=1+2Eh2/μ2e = \sqrt{1 + 2Eh^2/\mu^2}, the sim’s readout.

The period: Kepler’s third law

The radius sweeps the ellipse’s area πab\pi ab, with b=a1−e2b = a\sqrt{1 - e^2}, at the steady rate h/2h/2, so T=2πab/hT = 2\pi ab/h. With h=μa(1−e2)h = \sqrt{\mu a(1 - e^2)} the eccentricity cancels:

T=2πa3μ.T = 2\pi\sqrt{\frac{a^3}{\mu}} .

Kepler’s third law: a circle and a long ellipse with the same aa take the same time.

Worked example: the parking orbit

Circular LEO at r1=6778r_1 = 6778 km (about 400400 km up):

  1. Vis-viva with a=ra = r: v1=μ/r1=3.986004418×1014/6.778×106=7668.64v_1 = \sqrt{\mu/r_1} = \sqrt{3.986004418\times10^{14}/6.778\times10^6} = 7668.64 m/s.
  2. T=2πr13/μ=92.56T = 2\pi\sqrt{r_1^3/\mu} = 92.56 minutes; E=−μ/(2r1)=−29.404E = -\mu/(2r_1) = -29.404 MJ/kg.
  3. Escape needs E=0E = 0: v=2μ/r1=10 845.09v = \sqrt{2\mu/r_1} = 10\,845.09 m/s, 2\sqrt2 times more.

Orbital elements

Six numbers replace a position and velocity:

  • size and shape: aa and ee;
  • plane: inclination ii to the equator, and the longitude Ω\Omega of the ascending node, where the orbit crosses the equator going north;
  • orientation in the plane: argument of periapsis ω\omega;
  • where the craft is: the true anomaly ν=θ−ω\nu = \theta - \omega (or the mean anomaly, which grows uniformly in time).

The sim is planar (i=Ω=0i = \Omega = 0). It finds aa from EE, ee from EE and hh, and ω\omega from the eccentricity vector [(v2−μ/r)r−(r⋅v)v]/μ\big[(v^2 - \mu/r)\mathbf r - (\mathbf r\cdot\mathbf v)\mathbf v\big]/\mu, which points at periapsis. It draws the osculating ellipse: the conic the craft would follow from this instant on.

The Hohmann transfer

To go from a circle of radius r1r_1 to one of r2r_2 with two burns, use the ellipse touching both: perigee r1r_1, apogee r2r_2, at=(r1+r2)/2a_t = (r_1 + r_2)/2. Burn prograde at r1r_1, coast half an orbit, burn prograde at r2r_2.

Why along the velocity? A burn Δv\Delta v along v\mathbf v raises 12v2\tfrac12v^2 by vΔv+12Δv2v\Delta v + \tfrac12\Delta v^2, more than in any other direction, and most where vv is largest; a sideways burn mostly turns the velocity. (From memory: Hohmann is the cheapest two-burn transfer between coplanar circles, and a three-burn bi-elliptic transfer beats it only when r2/r1r_2/r_1 exceeds about 11.911.9, the capstone’s subject.)

Worked example: LEO to GEO

μ=3.986004418×1014\mu = 3.986004418\times10^{14} m3^3/s2^2, r1=6778r_1 = 6778 km, r2=42 164r_2 = 42\,164 km.

  1. Transfer ellipse: at=24 471a_t = 24\,471 km, e=(r2−r1)/(r2+r1)=0.72302e = (r_2 - r_1)/(r_2 + r_1) = 0.72302.
  2. Perigee: circular 7668.647668.64 m/s; on the ellipse vp=μ(2/r1−1/at)=10 066.14v_p = \sqrt{\mu(2/r_1 - 1/a_t)} = 10\,066.14 m/s. Δv1=2397.51\Delta v_1 = 2397.51 m/s.
  3. Apogee: on the ellipse va=1618.17v_a = 1618.17 m/s; circular 3074.673074.67 m/s. Δv2=1456.50\Delta v_2 = 1456.50 m/s.
  4. Total 3854.013854.01 m/s. Transfer time, half a period: πat3/μ=19 048.4\pi\sqrt{a_t^3/\mu} = 19\,048.4 s =5.291= 5.291 h.
  5. Check: r1vp=r2va=68 228.3r_1v_p = r_2v_a = 68\,228.3 km2^2/s, so va/vp=r1/r2=0.16075v_a/v_p = r_1/r_2 = 0.16075.

Burn 1 lifts EE from −29.404-29.404 to −8.144-8.144 MJ/kg, burn 2, 61%61\% its size, only to −4.727-4.727: the same Δv\Delta v does more where the craft is fast.

◆ Interactive Orbit sandbox: prograde and retrograde burns, the live osculating ellipse, energy and angular momentum readouts, three integrators flown side by side, and a Hohmann preset

Loading simulation…

What the sim shows. Three craft fly the same plan, one per integrator. The Hohmann preset fires Δv1\Delta v_1 at t=0t = 0 and arms Δv2\Delta v_2, which each craft fires at the first step boundary after its r⋅v\mathbf r\cdot\mathbf v turns negative (just past apogee). At the default step Δt=10\Delta t = 10 s:

  • RK4 fires at t=19 050t = 19\,050 s at r=42 164.0r = 42\,164.0 km, 1.61.6 s late, and ends with e=0.00016e = 0.00016.
  • Verlet fires at 19 06019\,060 s at 42 168.742\,168.7 km and ends with a=42 168.5a = 42\,168.5 km, e=0.00089e = 0.00089. It follows a slightly larger “shadow” orbit (4.7 Energy & Symplectic Integrators), an error that shrinks as Δt2\Delta t^2.
  • Euler spirals outward (Problem 3 shows why), reaches “apogee” at 46 399.946\,399.9 km at 21 65021\,650 s, and is left far above GEO with e≈0.013e \approx 0.013, still drifting.

In the circular-LEO preset a 100100 m/s prograde burn gives RK4 an apogee of 7143.47143.4 km, as vis-viva predicts; Verlet’s sits within a few kilometres.

Integrating orbits for a long time

The drift test preset flies the transfer ellipse with no burns, from perigee, and plots ∣ΔE/E∣|\Delta E/E| for all three integrators at the same step. The numbers are the sim’s readout; the lab cell reproduces the first two columns.

methodΔt\Delta tforce evaluations per orbitmax ∣ΔE/E∣\lvert\Delta E/E\rvert, 10 orbits100 orbits1000 orbits
RK4120120 s127012701.719×10−41.719\times10^{-4}1.667×10−31.667\times10^{-3}1.659×10−21.659\times10^{-2}
Verlet120120 s3173171.435×10−21.435\times10^{-2}1.435×10−21.435\times10^{-2}1.435×10−21.435\times10^{-2}
Verlet3030 s127012708.912×10−48.912\times10^{-4}8.912×10−48.912\times10^{-4}8.912×10−48.912\times10^{-4}

The period is 38 096.838\,096.8 s, so 120120 s is 317317 steps per orbit, and one step at perigee covers about 12001200 km, ten degrees of arc.

  1. RK4 drifts in a straight line, 1.66×10−51.66\times10^{-5} per orbit, always losing energy. Its osculating apogee falls 8.188.18, 81.7881.78 and 801.92801.92 km after 1010, 100100 and 10001000 orbits, and ∣Δh/h∣|\Delta h/h| reaches 1.13×10−31.13\times10^{-3}.
  2. Verlet does not drift. Its error is larger at first, a band of 1.435×10−21.435\times10^{-2} that it fills in the first orbit and never leaves; RK4 crosses it after 866866 orbits. Its apogee readout is off by +695.57+695.57, +723.54+723.54, +694.72+694.72 km: large, but no trend.
  3. At equal cost Verlet wins early. A Verlet step can reuse the previous step’s last force, so one RK4 step at 120120 s costs four Verlet steps at 3030 s. That Verlet run holds 8.912×10−48.912\times10^{-4}, sixteen times smaller (second order), and RK4 passes it after 5353 orbits.

Why Verlet keeps hh exactly. A kick adds k(x,y)k(x, y) to the velocity, changing hh by x ky−y kx=0x\,ky - y\,kx = 0. A drift adds τ(x˙,y˙)\tau(\dot x, \dot y) to the position, changing hh by τx˙y˙−τy˙x˙=0\tau\dot x\dot y - \tau\dot y\dot x = 0. Verlet is kicks and drifts, so hh holds to rounding: the sim shows ∣Δh/h∣|\Delta h/h| near 10−1410^{-14}. Each step also preserves phase-space area, which keeps the energy in a band. RK4’s error per orbit has the same sign every orbit, because every orbit has the same geometry, so it accumulates.

When RK4 wins. Over 1010 orbits RK4 is 8383 times better at the same step: for a single transfer or a re-entry, a high-order or adaptive method is the right tool. And bounded energy is not position accuracy: a symplectic orbit precesses and runs ahead or behind.

A three-body glimpse

Add the Moon and the clean picture breaks. Even the restricted problem, a massless craft moving under the Earth and the Moon on their circular orbit, has no general closed-form solution. In a frame rotating with the Moon, in units of 384 400384\,400 km and 4.3484.348 days, with the Moon’s mass fraction m=0.01215m = 0.01215:

x¨−2y˙=x−(1−m)(x+m)r13−m(x−1+m)r23,y¨+2x˙=y−(1−m)yr13−myr23,\ddot x - 2\dot y = x - \frac{(1 - m)(x + m)}{r_1^3} - \frac{m(x - 1 + m)}{r_2^3}, \qquad \ddot y + 2\dot x = y - \frac{(1 - m)y}{r_1^3} - \frac{my}{r_2^3},

with r1r_1, r2r_2 the distances to the Earth at x=−mx = -m and the Moon at x=1−mx = 1 - m. The 2y˙2\dot y, 2x˙2\dot x terms are the Coriolis force and the bare xx, yy the centrifugal force of the rotating frame. Energy and angular momentum are no longer conserved; one combination survives, the Jacobi constant C=x2+y2+2(1−m)/r1+2m/r2−x˙2−y˙2C = x^2 + y^2 + 2(1 - m)/r_1 + 2m/r_2 - \dot x^2 - \dot y^2.

The second lab cell starts a craft at 67786778 km with 10.73310.733 km/s (with the Moon off, an ellipse with apogee 220 295220\,295 km and period 4.394.39 days) and a twin 11 micrometre per second faster. With the Moon off the twins are at most 1.561.56 km apart after 217217 days: a two-body error grows only linearly, because the faster twin has a slightly longer period. With the Moon on they are 0.2540.254 km apart by day 8787, 69.269.2 km by day 174174, and 46604660 km by day 217217, after a pass 31803180 km from the Moon’s centre on day 185.6185.6. Close encounters stretch small differences enormously: the sensitive dependence of 7.10 Chaos & the Lorenz System, with no friction anywhere. The Jacobi constant drifts by only 1.2×10−81.2\times10^{-8}, so the growth belongs to the problem, not the solver.

Computing it

🐍 PythonLab: RK4 against velocity Verlet on the LEO-to-GEO transfer ellipse
⌘/Ctrl + Enter

The same algorithms as the sim. Change RK4’s 120.0 to 60.0: its drift falls 3232-fold, as fourth order predicts for half the step.

🐍 PythonLab: twin craft one micrometre per second apart, with and without the Moon
⌘/Ctrl + Enter
🧪 Coding exerciseExercise: plan the Hohmann transfer, then fly it with velocity Verlet
⌘/Ctrl + Enter

The reference coast arrives 10731073 m above GEO radius, 179.998∘179.998^\circ round, with 0.0990.099 m/s of radial velocity, 0.0410.041 m/s short after burn 2. With 80008000 steps the miss falls to 268268 m, a quarter: second order.

Concept checks

✅ Concept check

A craft on the transfer ellipse can fire $100$ m/s prograde at perigee ($10\,066$ m/s) or at apogee ($1618$ m/s). Which raises its orbital energy more?

✅ Concept check

Total $\Delta v$ of the LEO ($6778$ km) to GEO ($42\,164$ km) Hohmann transfer, in m/s?

✅ Concept check

A circular orbit and an ellipse with $e = 0.723$ both have $a = 24\,471$ km. Which has the longer period?

✅ Concept check

In the drift test at $120$ s steps, Verlet's energy error is $1.435\times10^{-2}$ after 10 orbits and RK4's is $1.719\times10^{-4}$. Which statement is right?

Problems

✏️ Pen & paperApsides from a single state●●○

After burn 1 the craft is at r=6778r = 6778 km moving sideways at 10 066.1410\,066.14 m/s. (a) Compute hh and EE. (b) Solve Er2+μr−12h2=0Er^2 + \mu r - \tfrac12h^2 = 0 for the apsides. (c) Find aa, ee and the period.

Show worked solution

(a) In km and s, μ=398 600.4418\mu = 398\,600.4418: h=6778⋅10.06614=68 228.3h = 6778\cdot10.06614 = 68\,228.3 km2^2/s; E=12(10.06614)2−398 600.4418/6778=50.6636−58.8080=−8.1443E = \tfrac12(10.06614)^2 - 398\,600.4418/6778 = 50.6636 - 58.8080 = -8.1443 km2^2/s2^2.

(b) r=(−μ±μ2+2Eh2)/(2E)r = \big(-\mu \pm \sqrt{\mu^2 + 2Eh^2}\big)/(2E) gives 67786778 km and 42 16442\,164 km: the craft is at perigee, and apogee is GEO radius, as planned.

(c) a=−μ/(2E)=24 471a = -\mu/(2E) = 24\,471 km; e=(42 164−6778)/(42 164+6778)=0.72302e = (42\,164 - 6778)/(42\,164 + 6778) = 0.72302; T=2πa3/μ=38 096.8T = 2\pi\sqrt{a^3/\mu} = 38\,096.8 s =10.58= 10.58 h.

✏️ Pen & paperThe radius of GEO●○○

A geostationary satellite turns once per sidereal day, 86 164.0986\,164.09 s (from memory). (a) Find its radius from Kepler’s third law. (b) Find its speed. (c) Why the sidereal day?

Show worked solution

(a) r=(μT2/4π2)1/3=(398 600.4418⋅86 164.092/39.478)1/3=42 164.2r = (\mu T^2/4\pi^2)^{1/3} = (398\,600.4418\cdot86\,164.09^2/39.478)^{1/3} = 42\,164.2 km.

(b) v=2πr/T=3.0747v = 2\pi r/T = 3.0747 km/s, matching μ/r=3074.67\sqrt{\mu/r} = 3074.67 m/s.

(c) The Earth turns once per sidereal day relative to the stars, so an equatorial circular orbit with that period stays over one point. The solar day, 86 40086\,400 s, would give 42 24142\,241 km.

✏️ Pen & paperWhy Euler spirals out●●●

One forward Euler step of size τ\tau is rn+1=rn+τvn\mathbf r_{n+1} = \mathbf r_n + \tau\mathbf v_n, vn+1=vn+τa(rn)\mathbf v_{n+1} = \mathbf v_n + \tau\mathbf a(\mathbf r_n) with a=−μr/r3\mathbf a = -\mu\mathbf r/r^3. (a) Show that the angular momentum obeys hn+1=hn(1+τ2μ/rn3)h_{n+1} = h_n(1 + \tau^2\mu/r_n^3) exactly. (b) Evaluate the factor in LEO with τ=60\tau = 60 s. (c) Why does Verlet not do this?

Show worked solution

(a) Write a=kr\mathbf a = k\mathbf r, k=−μ/rn3k = -\mu/r_n^3. Then hn+1=(x+τx˙)(y˙+τky)−(y+τy˙)(x˙+τkx)h_{n+1} = (x + \tau\dot x)(\dot y + \tau ky) - (y + \tau\dot y)(\dot x + \tau kx). The τ0\tau^0 terms give hnh_n; the τ1\tau^1 terms give x˙y˙−y˙x˙+k(xy−yx)=0\dot x\dot y - \dot y\dot x + k(xy - yx) = 0; the τ2\tau^2 terms give k(x˙y−y˙x)=−khnk(\dot xy - \dot yx) = -kh_n. So hn+1=hn(1−τ2k)=hn(1+τ2μ/rn3)h_{n+1} = h_n(1 - \tau^2k) = h_n(1 + \tau^2\mu/r_n^3). The kick uses the old position after the drift has moved the craft, so it is no longer parallel to the new r\mathbf r.

(b) μ/r3=1.2801×10−6\mu/r^3 = 1.2801\times10^{-6} s−2^{-2}: a factor 1.00461.0046 per step. A direct run of 9393 steps (one orbit is 92.692.6) multiplies hh by 1.2391.239 and leaves the craft at 12 01012\,010 km.

(c) Each Verlet kick uses the acceleration at the position the craft has during that kick, so it is parallel to r\mathbf r and leaves hh alone, and each drift is parallel to v\mathbf v.

Key Takeaways

  • Two bodies reduce to r¨=−μr/r3\ddot{\mathbf r} = -\mu\mathbf r/r^3; for the Earth μ=3.986004418×1014\mu = 3.986004418\times10^{14} m3^3/s2^2.
  • A central force conserves h=xy˙−yx˙h = x\dot y - y\dot x and keeps the orbit flat; gravity also conserves E=12v2−μ/rE = \tfrac12v^2 - \mu/r.
  • Kepler’s laws are theorems: equal areas from r2θ˙=hr^2\dot\theta = h, conics from u′′+u=μ/h2u'' + u = \mu/h^2, T=2πa3/μT = 2\pi\sqrt{a^3/\mu} from the area πab\pi ab.
  • The apsides are the roots of Er2+μr−12h2=0Er^2 + \mu r - \tfrac12h^2 = 0, which gives E=−μ/(2a)E = -\mu/(2a) and vis-viva.
  • LEO to GEO: Δv1=2397.51\Delta v_1 = 2397.51 m/s, Δv2=1456.50\Delta v_2 = 1456.50 m/s, total 3854.013854.01 m/s, 5.2915.291 h.
  • Over 10001000 orbits RK4 drifts in a straight line while Verlet stays in a band and keeps hh to rounding; at equal cost Verlet wins after 5353 orbits.
  • With the Moon, a 11 micrometre per second difference grows to 46604660 km in 217217 days.
  • Next in the build order, 9.2 The Heat (Diffusion) Equation, leaves orbits for fields. Here conservation laws came out of an ODE; there one goes in: conservation of energy plus Fourier’s law gives a PDE for the temperature along a bar, and its diffusion term returns in Navier–Stokes as viscosity. This lesson’s own sequels are 14.7 N-Body Simulation and 16.5 Capstone: Orbital Transfer Planner.
Finished this lesson?

Mark it complete to track your progress (saved in this browser). Reading every section does this for you.

Where this leads

These later lessons build directly on this one: