Why compressed gas cools

Why does a compressed gas cool a container down when released?
I mean in terms of imaging the actual gas molecules moving around. For instance, I can imagine why water on the skin evaporating could cool a person down. The body transfers kinetic energy to the water and then some of the really fast most energetic water molecules fly off, thus taking that energy with it.

If you open the valve on a compressed gas container shouldn't the gas just fly out and not take any extra kinetic energy with it?

The gas expands doing work against the external atmospheric pressure. Since it does the work, it ought to loose some internal energy resulting in lowering of its temperature.

Ok, it lost some energy when the moving gas molecule flew out. What if you compressed three gas molecules in a really really tiny space, open a tiny vale to let one molecule fly out. Would the other two some how slow down?

Ok, it lost some energy when the moving gas molecule flew out. What if you compressed three gas molecules in a really really tiny space, open a tiny vale to let one molecule fly out. Would the other two some how slow down?

Yes. Since, the volume remains constant, release of one molecule will result in lowering of pressure apparently lowering its temperature and kinetic energy is a function of temperature. So speed of the other two will decrease.

Yes. Since, the volume remains constant, release of one molecule will result in lowering of pressure apparently lowering its temperature and kinetic energy is a function of temperature. So speed of the other two will decrease.

I still don't see why the would slow down. I guess I am looking for a detailed description of why the individual gas molecules left behind would be moving slower. I would like to scale it up to balls bouncing in a room. say, If three balls were bouncing around a room and one flew out, I don't see how the other two would slow down, even if the net pressure on the walls and two balls went down.

In a sealed container with an ideal gas at temperature T, there exists a range of velocities from very high to very low. Should the container be opened, the fastest molecules will escape preferentially over the slow ones. As a result the velocity distribution in the container changes towards the lower values, which is equal to lower temperature.

Kinetic theory of gases uses as an assumption that there exists a large number of molecules, so it really shouldn't be thought of in terms of just three molecules in a box. But even here, you should see that with the box being opened by e.g., removing one of the sides, the fastest of the three has got the highest probability of leaving first.

In a sealed container with an ideal gas at temperature T, there exists a range of velocities from very high to very low. Should the container be opened, the fastest molecules will escape preferentially over the slow ones. As a result the velocity distribution in the container changes towards the lower values, which is equal to lower temperature.

Kinetic theory of gases uses as an assumption that there exists a large number of molecules, so it really shouldn't be thought of in terms of just three molecules in a box. But even here, you should see that with the box being opened by e.g., removing one of the sides, the fastest of the three has got the highest probability of leaving first.

So the explanation is that the gas molecules with greater velocities are a little more likely to fly out of the valve? Are there simulations of this that have been done before?

Ok, it lost some energy when the moving gas molecule flew out. What if you compressed three gas molecules in a really really tiny space, open a tiny vale to let one molecule fly out. Would the other two some how slow down?

Fastest molecule is the most probable to escape.

But, if one random molecule just disappears, then we can say no temperature change happens in the tiny box.

Yes, it's a correct conclusion that in our thought experiment the escaping gas is hot.

And from this we can conclude that this is some other phenomenom, not the one we are currently interested, right?

If the three molecules, racing towards the opened valve, collide with each other many times during the race, then a random molecule wins the race, the winning molecule has random speed. The molecules escape in random order.

If the three molecules, racing towards the opened valve, do not collide with each other during the race, then a faster molecule is more likely to win the race. The fast molecules escape first.

Yes, it's a correct conclusion that in our thought experiment the escaping gas is hot.

And from this we can conclude that this is some other phenomenom, not the one we are currently interested, right?

If the three molecules, racing towards the opened valve, collide with each other many times during the race, then a random molecule wins the race, the winning molecule has random speed. The molecules escape in random order.

If the three molecules, racing towards the opened valve, do not collide with each other during the race, then a faster molecule is more likely to win the race. The fast molecules escape first.

I'm sorry I am not exactly sure what you are saying. Are you saying it is this phenomenon that is causing the compressed gas to cool when the valve is opened?, and if it that phenomenon, then why is it that you can freeze things with the compressed gas that escapes.

Ok, it lost some energy when the moving gas molecule flew out. What if you compressed three gas molecules in a really really tiny space, open a tiny vale to let one molecule fly out. Would the other two some how slow down?

No. To understand this you should understand the idea of work. "Work" in physics means something very specific. When work is done, energy is transferred. If you let a lone molecule out of a container and it doesnt hit anything, it cannot transfer energy and cannot do work. If you let a gas expand into a vacuum its temperature would remain the same. It has not lost energy, it has not done work, it will not cool down.

Now consider your compressed gas. It is not being released into a vacuum. Its being released into another container of (less) compressed gas (the atmosphere). When you open the valve on your spray can the gas cannot just escape because there is another gas there blocking its way. It has to push against the atmosphere which is "doing work". The compressed gas does work on the atmosphere. The compressed gas expands and cools, the atmosphere becomes slightly more dense and heats. At a molecular level your compressed gas molecules collide with the atmospheric molecules transferring some of their momentum and energy to the atmosphere.

Note that when you see the ideal gas law explained in chemistry texts you should always see the gas pictured in a container with a piston or something like that on top. This piston behaves like the atmosphere in that is provides something for the compressed gas to do work on while it expands.

I'm sorry I am not exactly sure what you are saying. Are you saying it is this phenomenon that is causing the compressed gas to cool when the valve is opened?, and if it that phenomenon, then why is it that you can freeze things with the compressed gas that escapes.

I'm saying there are many phenomena, and maybe we'd better forget that one where molecules are being sorted by making them race.

Instead, how about if we consider one molecule and a nozzle.
If a molecule is released at the narrow end of the nozzle, the molecule will fly out of the nozzle, and then the molecule may cool a thing that is after the nozzle.

A picture: < =

Nozzle at the left, plates that will be cooled at the right.

Exercise for the reader: Check that this device works. Note: There are no other gas molecules except the one.

Forget everything you've read above. For most practical situations the work done by a gas as it expands can be considered negligible. The Joule–Thomson effect is the most important effect. For most gasses, at room temperature at a reasonable amount of pressure the Joule–Thomson effect leads to cooling, but there are important exceptions. Helium and Hydrogen will actually often warm up as they expand. In order to explain the Joule–Thomson effect you must realize that real gasses behave different than ideal gasses. The molecules in a gas actually attract each other and will slow down when they move apart which leads to cooling under expansion. Surprisingly, warming sometimes happens instead. That happens because as a gas expands, the molecules will collide less often. During a collision molecules will suffer repulsive forces instead of attraction. That means that during a collision the molecules move more slowly. If the collision happen less often, the molecules average speed increases leading to higher temperature. That second effect can be dominant for certain gasses.

Also note that if you're thinking of the cooling observed when using a propane tank, the propane is actually in a liquid state and changes phases to a gas before being released. That change of states requires latent heat taken from the gas which will than cool down.

Also note that if you're thinking of the cooling observed when using a propane tank, the propane is actually in a liquid state and changes phases to a gas before being released. That change of states requires latent heat taken from the gas which will than cool down.

So isn't that two explanations then?/ if it is a state change why would it need latent heat, surely each individual molecule has enough energy to escape.

So isn't that two explanations then?/ if it is a state change why would it need latent heat, surely each individual molecule has enough energy to escape.

Temperature is a measure of the average energy of the molecules. Some will have low energy, most will have a medium amount of energy, and a few will have a high amount of energy. Only the ones with the high amount of energy will have enough to change states. When they do, they take their energy with them. Then, through random collisions, some of the remaining low and medium energy molecules will be given enough energy to change states. When this energy is transferred from the other molecules, they cool down. Repeat the process a few trillion times and the liquid cools down dramatically.