What the heck is a gravity assist and how does it work? The first question is easy—a gravity assist (also called a gravity slingshot) is a space maneuver in which a spacecraft gets a speed boost by moving past a planet. You could also use the gravity assist to slow down or even to change directions. However, in this case let’s just consider boosting the speed.

Yes, this gravity assist was used by a bunch of spacecraft like both Voyager 1 and Voyager 2 to get out the outer part of the solar system (and beyond). The maneuver was also used by fictional spacecraft like the *Hermes* in the movie (and book) *The Martian*. OK, actually my interest in gravity assists started with this tweet.

<

p class=”paywall”>So, let’s do it. Here is my introduction to gravity assists.

One of the things we like to do in physics is to make things as simple as possible while still keeping the main concept that we want to explore. This is where the famous “spherical cow” joke comes from (it’s a classic).

The key physics idea in a gravity assist is of course the gravitational force. This is an attractive force between objects with mass. Since it’s an attractive force, the direction of the force is always directed along a line between the centers of the two objects. The magnitude of this gravitational force depends on the product of the two masses and is inversely proportional to the square of the distance between them (we use *r* for the distance). It’s easier to see this as an equation. Like this:

As an object gets near a planet, this gravitational force will pull on the spacecraft and change its motion. This can be complicated, so I will just make a one-dimensional interaction with an object moving straight toward a planet. Of course there are two problems with this 1D model. First, the space object would hit the surface of the planet—that’s hardly an efficient way to get a gravity assist. I can fix this problem by just not giving the planet a real surface. That’s a simple fix.

If there is not a planetary surface, that introduces the second problem. What happens when the object passes right through the center of the planet? In that case, the distance between the object would be zero and the gravitational force would be undefined (because of the dividing-by-zero thing). Here’s how I will fix this problem. When the object enters the planet’s surface, there will just be a gravitational force of zero until it gets to the other side.

OK, we are ready for this model. Of course I am using Python because that’s what I do. Here is the code running below. Note that it doesn’t run in real time, and the space object is huge so that you can see it. Also, you can look at (and edit) the code by pressing the Pencil icon and then run it with the Play button.

With these values, the object starts with a speed of 1,000 m/s, and when it gets to the other side of the planet it is traveling at 1,011.86 m/s. Yes, that’s pretty much the same velocity—it’s just a rounding error difference (or something like that).

But really the animation isn’t that useful. How about a graph showing the energy of the system. In this interaction, there are three energies to consider. First, there is the kinetic energy of the spacecraft. This depends on both the mass and the speed of the object. Second, there is the kinetic energy of the planet—if it’s locked in place (for now) then it will have zero kinetic energy. Finally, there is the gravitational potential energy. This depends on the distance between the two objects—except for the time when the object is inside the planet, in which case the potential will just be a constant value.

So, here is the same interaction but with a plot of energy vs. distance.

Notice that as the object moves toward the planet, it increases in energy (the blue curve) because of the gravitational force. Once it is inside the planet, there is no gravitational force (this is to prevent the calculation from going bonkers) and it just travels at a constant speed. On the other side, the gravitational force is pulling it backward so the object decreases in kinetic energy. Oh, the total energy (kinetic plus potential) is constant—as it should be.

In the end, it’s at about the same speed as it was before the gravity assist. The stationary planet didn’t really do much. It would be just like rolling down into a valley and then back up the other side. Without any frictional forces (which there aren’t in space), it doesn’t gain any energy.

What about a moving planet? Let’s do that. Here is a similar plot with a planet that is moving in the same direction as the object, with about 20 percent the speed (initially). I added another line for the total energy (kinetic plus potential) for the space object.

In this case, the object again starts with a velocity of 1,000 m/s but now ends up with a speed of 1,280 m/s. Yes, it increased in speed. If you look at the total energy, it also increases at the end of the maneuver. Note that there is a small increase in energy during the time the object is inside the planet, but I suspect this is just a rounding error (not a big deal). This gravity assist would be like a ball rolling down a moving valley (yes, that seems weird). But the moving valley can give the ball a little bit of energy as it rolls down and then back up the incline. Just like in the example above.

Now for the important idea. Was energy conserved? Yes. Even though the object increased in energy, the total energy is constant. The increase in kinetic energy of the object is matched by a decrease in kinetic energy for the planet. Does this mean the planet changes in speed? Technically, yes—but the amount is super small. But even a small change in speed of the planet can lead to a significant change in energy, because the planet has such a large mass.

Really, this gravity assist is just like an elastic collision. Wait. Let me be clear. This IS a perfectly elastic collision—just like two bouncy balls colliding. In order to have an elastic collision, two conditions must be satisfied. First, the total momentum must be constant. The momentum is the product of mass and velocity for the two objects. Since there is only the gravitational force acting on the objects, a change in momentum for one object is equal to the opposite change in momentum for the other object.

The second requirement for a perfectly elastic collision is for the total kinetic energy to be the same “before” and “after” the “collision.” Yes, I put those words in quotes for a reason. If you calculate the sum of the kinetic energies when the two objects are far apart (where far is relative) then the kinetic energy is conserved. The gravitational potential energy for the system decreases with distance between the objects, so that far away, it’s close to zero. However, while the objects are close, there is significant potential energy so that kinetic energy is not conserved. But it’s still essentially a perfectly elastic collision. In this collision, the space object increases in kinetic energy and the planet decreases in kinetic energy to make the total energy conserved. Oh, wait. How can it be a collision if they don’t collide? The physics of an elastic collision just require that the force on one object is equal and opposite to the force on the other object. Since this interaction is from the gravitational force, that requirement is easily satisfied. No crashing needed.

I guess I should answer the Twitter question from above. What would happen if the planets were “locked” into place and not moving? Could you still get a gravity assist? It’s a tough question, because how would you make a planet stay stationary? There would have to be some external force to balance the gravitational force from the Sun. But still, once the planet is stationary, you couldn’t steal any energy from it, and you wouldn’t be able to get a gravity assist.

Does that mean that if there were enough spacecraft with close flybys to a planet they could make the planet stop orbiting and crash into the sun? Technically, yes. However, even a large spacecraft would have a mass that is much less than a planet. Remember the mass of Earth is on the order of 10^{24} kilograms. There’s no way an object would have a mass close to that. Oh, and there are planets like Jupiter with a mass that is about 300 times more than Earth’s.

What about the next step? How about a more realistic gravitational assist? What if the object isn’t moving in the exact same direction as the planet? In that case it gets a little bit more complicated. Not only does the speed of the spacecraft change, the direction changes too. It’s not so trivial to find an approach angle to give the optimal speed boost (if that is your intention). But probably the best way to explore a 2D gravity assist is to just do one. You don’t have to go to space, you can instead make a numerical calculation. Really, the code above still works in 2D. If you move the planet to a different location and give it a different starting velocity vector, you can still have a gravity assist. Go ahead and try that for homework. Play around and see what starting approach vector gives the best speed boost. It will be fun.

### More Great WIRED Stories

social experiment by Livio Acerbo #greengroundit #wired https://www.wired.com/story/how-does-a-gravity-assist-work