Why does Joule-Thomson expansion of a gas do no (external) work?

I understand one of the benefits of the Hampson-Linde cycle is that there are no cold-side moving parts, but isn't one losing an awful lot of energy in the throttling process? There must be something basic I'm missing here, because it looks almost like this cycle destroys energy: pressure drops while volume increases, and temperature drops at the same time. The expansion is isentropic (How does that differ from an adiabatic expansion? I thought the condition that dS = 0 constrained a gas to a unique trajectory - an adiabat - along which it does work. But unless I'm mistaken, a Joule-Thomson expansion does no external work, despite not being an expansion into an evacuated space. Where did the work "go"?

Maybe an example might illustrate. If I let air out of my car's tyres, is that a Joule-Thomson expansion? If so, doesn't the expansion do work in lifting the atmosphere by 20 attometers? If not, what is an everydayish example?

-
The Joule-Thompson effect kind of is an expansion into an evacuated space though - imagine the pressure on one side of the plug is zero. Then the gas coming out of the plug is expanding into a vacuum, and it's intuitively reasonable that it should cool down. Having a positive pressure on both sides is just a less extreme version of this. But note that Joule-Thompson expansion is very much not isentropic - it's adiabatic and it's a distinctly irreversible process ($dS/dt>0$). This is why the Hampson-Linde cycle is inefficient. – Nathaniel Jul 2 '12 at 9:11
I'm not sure if the above answers your question - if you feel it does then say so and I'll post it as an answer. – Nathaniel Jul 2 '12 at 9:11
No, wait - a gas expanding into a vacuum should stay the same temperature, not cool down. I guess I don't fully understand the Joule-Thompson effect after all. I'll look into it and get back to you. – Nathaniel Jul 2 '12 at 9:15
I actually started writing this question mindful of the Joule-Thomson effect, but then realized my question is more general than that - being relevant also to ideal gases. I hope the question as edited doesn't seem too confused. – Bernd Jendrissek Jul 2 '12 at 9:19
@Nathaniel I get that it can't possibly be reversible, otherwise one could make compressed air for free. Okay, so an isentropic process is not necessarily adiabatic which probably resolves part of my confusion - I guess the "missing" work goes into disordering the expanded gas. – Bernd Jendrissek Jul 2 '12 at 9:27

The question, as I interpret it, is about the conservation of energy during Joule-Thomson expansion. (That is, expansion of a gas through a small hole or porous plug, where there is a pressure difference between the two sides, and no work or heat is exchanged with the environment, except for work associated with the pressure change.)

Consider the classic Joule-Thompson experiment, where gas in a pipe is forced through a porous plug. Let the pressure on one side be $p_1$ and the pressure on the other side by $p_2 < p_1$, so that the gas flows from side 1 to side 2.

Now consider the passage of a small amount of gas from one side to the other. On side 1, the rest of the gas does work $p_1 V_1$ to push the packet of gas through the plug (where $V_1$ is the volume that the packet of gas has at pressure $p_1$). As the packet comes out of the other side of the plug it must displace a volume $V_2$ of gas, doing work $p_2 V_2$. In your car tyre, example, $p_2 V_2$ is the work the outflowing gas does in lifting the atmosphere.

In general, for real gases, $p_1 V_1$ will not equal $p_2 V_2$, for the reasons explained in John Rennie's answer. It can be greater or lesser, depending on the properties of the gas and on the two pressures. This means that the energy lost as work on side 1 will not equal the energy gained as work on side 2. This energy change must be compensated in order to satisfy the first law. Since the gas can exchange neither heat nor work with its surroundings, the only other thing that can change is its internal energy. The first law implies that $U_2 - U_1 = p_1V_1 - p_2V_2$, as Wikipedia explains.

It happens that for most gases at room temperature, $p_2V_2>p_1V_1$, which implies that the gas's internal energy (and therefore its temperature) must decrease as it goes through the plug.

Note that we didn't assume the entropy stays constant, and in fact it increases: the entropy change associated with expanding the gas must be greater than the entropy change associated with reducing its temperature, otherwise the gas would not flow through the plug.

In your car tyre example, the gas does indeed to work in lifting the atmosphere, but this is less than the work done by the gas inside the tyre forcing it out through the valve, and this is why the temperature has to decrease.

-
This is the first time I've come across this "except for work associated with the pressure change" qualifier. That would resolve all my confusion. I'd like to take your word for it, but {citation needed}? :) (I'd just like to see more elaboration on that point.) – Bernd Jendrissek Jul 2 '12 at 10:11
Another part of what I'm not getting is: does the gas inside the tyre need to do work forcing the gas out the valve due to the fact it's real, non-ideal air in there, or is it largely the same even if the gas were ideal? IOW, is it due to "friction" or just mechanical configuration? – Bernd Jendrissek Jul 2 '12 at 10:18
If the gas were ideal, it would still need to do work in order to force the gas packet out; it's just that (I think) this would be equal to the work done by the gas packet as it leaves the valve. Deviations from the ideal gas law don't make the $pV$ terms go to zero, they just introduce a difference between $p_1V_1$ and $p_2V_2$. Does that make it clearer? – Nathaniel Jul 2 '12 at 10:28
@BerndJendrissek I should be a bit clearer - the work associated with the pressure change is done by some parts of the gas on other parts (i.e. it's the $pV$ terms in my answer), so it's not counted as work done on an external system. In the Joule-Thompson experiment there is no heat exchanged with an external system (because it's insulated), and there's no work done on an external system, because there's nothing that's being moved against a force, other than the gas itself. This is why the difference in the $pV$ terms can't do anything other than change $U$. – Nathaniel Jul 2 '12 at 15:12
How does the expanding gas "know" that it isn't pushing, say, a turbine blade? And instead pushing, well, what... just more gas? – Bernd Jendrissek Jul 2 '12 at 16:53

The Joule-Thompson effect is only non-zero for non-ideal gases, and arises because when there is a potential between gas molecules the potential energy changes as a function of the spacing of the gas molecules (for spacing read mean free path in this context).

The diagram shows roughly what the intermolecular potential looks like (this is the result of a quick Google and comes from the Encylcopaedia Brittanica - you'll find much similar info on the web).

At long range the intermolecular potential is attractive, therefore as the average spacing of gas molecules is increased their potential energy is increased (just as taking a satellite farther from the Earth increases it's potential energy). This increase in potential energy has to come from somewhere, and it comes from the kinetic energy of the gas molecules i.e. they slow down and therefore the temperature drops.

However there is a competing effect. At close range the intermolecular potential is repulsive, so as gas molecules approach a collision their potential energy goes through a minimum and increases again. As you increase the mean free path you decrease the number of collisions per second and this tends to decrease the average potential energy, which means the molecules will move faster i.e. their temperature increasess.

Which effect wins depends on which bit of the intermolecular potential has the most effect.

-
I get what the Joule-Thomson effect is; I didn't ask "why does a real gas cool (or warm) during J-T expansion", it was "where did the work go". – Bernd Jendrissek Jul 2 '12 at 10:09