The Thermodynamics of Pipeline Pigs and Paintball

2026-03-25

Discussion of isentropic efficiency of something you wouldn't think of as a heat engine.

Written by: Peter Maginot

A thought experiment

Have you ever come across an old paintball gun while cleaning your basement and think “I wonder what the true efficiency of these things is anyway?” How many paintballs would an “ideal” paintball gun be able to shoot on a given tank of compressed air, and how does that compare to a real-world one? No? Well, I’m gonna tell you anyways… This does actually have real-world implications for oil and gas and chemical process operations, as compressed air and natural gas are used as working fluids driving pneumatic actuators or pumps in most processing facilities. Understanding the drivers of these devices’ efficiency is important for determining how much gas they will consume. A paintball can also be thought of as a very small, VERY high-speed pipeline pig, and developing a model for pig behavior in natural gas pipelines is something I plan on studying further.

Building a model

First, how should we model this? Some paintball guns work by storing a fixed volume of gas in a chamber behind the barrel, which is released to propel the paintball when the trigger is pulled. The chamber is refilled for the next shot to complete the cycle. As a decent first approximation, we can model this as an isentropic expansion of that initial volume of gas as it pushes the paintball down the barrel, which seems at first glance to be pretty simple to model.

We’ll start with the paintball at the back end of the barrel, with essentially no space behind it between it and the trapped high pressure gas. We’ll assume there’s a valve behind the paintball that is instantaneously opened to put the paintball in contact with the high pressure gas, which begins accelerating it down the barrel due to the pressure difference between the high pressure gas behind the paintball and the much lower atmospheric pressure in front of the paintball. Our system will be closed, consisting of only the expanding gas doing work on the paintball (and subsequently on the atmosphere as it moves it out of the way).

Diagram of the setup Diagram of the setup

We can write an energy balance for the expanding gas as it gives some of its internal energy to the paintball and to the atmosphere as it pushes the air in front of the paintball out of the way.

Energy balance

Here we assume the process happens so fast that no heat is transferred between the gas and any surroundings, and that the change in potential energy of the gas is negligible, and the change in kinetic energy of the gas is negligible. This last assumption may be a bad one! The typical limit for paintball speed is about 300 feet per second, which is about 30% of the speed of sound in air at room temperature. We’ll check it at the end, and maybe later explore what happens if we don’t make that assumption.

For an ideal gas, there is an exact relation for the change in internal energy for an isentropic process where the pressure is changed. This is derived from the fact that the change in internal energy is only a function of the change in temperature of the gas and the heat capacity of the gas. We can also use the isentropic relation for an ideal gas relating the temperature, pressure, and ratio (k) of constant pressure (Cp) and constant volume (Cv) specific heats. Here To and Po are the initial temperature and pressure of the initial high pressure gas volume (Vo), and T and P are the temperature and pressure of the gas after it has expanded some amount down the barrel.

Energy balance

But what is the pressure (P) behind the paintball going to be when the paintball leaves the barrel? We can think of three possible scenarios:

  1. The pressure is somewhere above atmospheric pressure.
  2. The pressure is exactly atmospheric pressure.
  3. The pressure is somewhere below atmospheric pressure.

Intuitively, I would guess that #2 is the most efficient, as in case #1, the gas is still exerting a net positive force on the paintball when it leaves and could have pushed a bit more, and in #3, at the end the atmosphere will be pushing harder on the paintball than the gas behind it is at the end, actually slowing it down. Let’s make no assumptions and just see where the math takes us…

We can use the isentropic relation for pressure and volume to relate the initial pressure and volume of gas to the final pressure (P) and volume (Vo, the initial chamber volume + Vb, the volume of the barrel)

Isentropic relation

Solving for the volume of the barrel, Vb, and substituting it in to the above equation, doing much rearranging, we solve for either the velocity as a function of the final pressure and initial volume,

Energy balance

or the initial volume as a function of the desired velocity and final pressure.

Energy balance

We can also relate the volume of the barrel to its cross section area and length, to find the barrel length as a function of the initial gas volume and final pressure.

Energy balance

Well, now we can just go ahead and plot it out! For a gas pressure of about 115 psia (which is about the pressure at which many spool-style paintball guns operate) and a desired velocity of 280 feet per second (a typical velocity target to make sure you are under a 300 feet per second field limit), we get this plot (note that I converted all quantities to SI units before calculation, which I highly recommend as a practice to avoid conversion errors):

Plot of pressure vs gas consumption and barrel length

Sure enough, the required gas volume reaches a minimum of 2.02 x 10-5 cubic meters right at atmospheric pressure, so my earlier intuition appears to have been correct. The required barrel length at this point is also 0.29 meters (about 11 inches), which is about the length of many actual paintball barrels. But interestingly, the required volume is pretty flat – even if you shorten the barrel by 30% to 8 inches, the required air volume is only increased by about 5%, so having a somewhat shorter barrel doesn’t really impose that much of an efficiency penalty. So how many paintballs can this ideal paintball gun shoot on a given tank of gas? Since we now know the pressure, temperature, and volume of gas required to accelerate a single paintball, we can figure out how many moles of gas this would be. At 115 psia, the ideal gas law should be pretty accurate.

Ideal gas law

However, we have neglected the fact that some gas that remains behind the valve at atmospheric pressure before it is cycled and recharged before the next shot. Having some gas in there to start will reduce the amount of gas needed to fully re-charge it. The only gas actually lost from the process is the gas that ends up in the barrel. For these conditions, this turns out to be about 77% of the gas.

Moles in tank

A typical paintball air tank stores gas at 4,500 psi, which is so far above atmospheric pressure that the ideal gas law is going to start breaking down under pressure. If you look up the density of nitrogen at 300K and 4,500 psia in the NIST database, it’s 10,787 moles per cubic meter. For a 77 cubic inch air tank (assuming the same properties as pure nitrogen):

Shots per tank

The actual tank is only going to hold about 86% of what we calculated from the ideal gas law. Also, we aren’t going to be able to use every single molecule of gas in the tank to propel paintballs. Once the pressure falls below the operating pressure of the paintball gun (115 psia in our example), the chamber won’t be pressurized enough to propel the ball, so we will assume that what is left in the tank when it reaches 115 psia is not usable.

Shots per tank Shots per tank

Conclusion

Well there we have it, an “ideal” paintball gun should manage 2672 shots at 280 feet per second on a paintball gun operating at 115 psia (~100 psi gauge pressure) with a 77 cubic inch compressed air tank filled to 4,500 psia. Here’s a youtube video of someone trialing an actual spool valve paintball gun in exactly that configuration – he manages 1690 shots, not bad at 63% of ideal! Here’s another one with the exact same paintball gun and tank with a bit higher velocity – he manages 1393 shots, while my model predicts 2407 shots would be possible at that higher velocity (58% efficient).

This model doesn’t account for the energy needed to cycle the bolt back and forth each shot, or the friction of the paintball as it travels down the barrel, or the kinetic energy imparted to the gas as it accelerates down the barrel. On the kinetic energy of the gas, the 0.00642 moles of air per shot works out to 0.19 grams of air per shot. While much less than the 3 grams of paintball accelerated up to speed, there is a good bit of kinetic energy imparted into the air that we haven’t accounted for. Also, as gases are accelerated to a significant fraction of the speed of sound, their static pressure (and consequently their ability to push on objects to accelerate them) is reduced, requiring more air per shot than I’ve calculated with this simplified model. All in all, I’m impressed that actual guns managed about 60% efficiency. Of course, we don’t know the actual pressure the tank was filled to, or the exact weight of the paintballs they were using, both of which would affect the results by several percent if they deviated from what I assumed.

Another effect that we have neglected is evident in the videos - condensation appears on the outside of the gas storage tanks, indicating that they are cooling off as the gas expands. I assumed the tank temperature was constant for each shot. A better model would account for this change.

Anyways, this was a fun thought experiment to try out. You never know when you will run into some interesting thermodynamics in your basement.

Thermodynamics