# Eli5 expanding and compressing gases

187 views

To my understanding when a gas is rapidly expanding it cools and when it is rapidly compressed it heats up. So how come when you fill up a canister with helium/nitrogen/propane, etc. the canister is cold even though you’re compressing the gas into it?

In: Physics

My understanding of this is the opposite. Compressors are used in air conditioners because they squeeze the air which essentially squeezes out heat. Also when you heat up a gas it moves around more so it expands. But I defer to someone who properly understands this topic and can give a good example.

Temperature is a function of pressure, volume, and the amount of the gas.

Once the gas is compressed and stable in a sealed container, it is low temperature. Liquefied gases are cold. However when you’re filling the tank – say, a scuba tank – then it does get warm in that process because as you identified, the gas is being compressed. that’s where the active process is

This is also why we should immerse these in a tub of water while they’re being filled, to safely dissipate the heat and also protect the tank.

But it is also why you must not expose containers of compressed gases to heat because they will .. rapidly decompress. (Boom)

If you are using a compressor to fill the tank then the compressor will heat up and the tank become cool according to the differential in pressure between the compressors input pressure and the pressure inside the tank. If you are filling the tank from a larger tank, the same will occur with the nozel on the larger tank seeing the heating. Once equilibrium is reached, or you shut off the flow at the max pressure rating of the tank, the heating and cooling will cease also. If you think about it, a compressor is taking a large volume of air, and pressurising it down a pipe into a chamber where it expands. This has a max throughput of the max pressure inside the pipe from the compressor (otherwise the flow would be reversed from the tank back into the compressor). Once you realise where the compression and expansion might be, you can figure out what components will get hot, and which will cool.

If you’re filling up from a big tank at a filling station, then the gas was already compressed. Compressing it into the big tank in the first place, using a pump or whatever, would have made the gas hot, but that probably happened hours or days ago and so the temperature of the big tank has equalized to its environment, so now it’s compressed, cool gas. Now, when the gas from the full tank is released into your empty tank, it expands to fill it and suddenly becomes very cold. As the pressure inside your tank rises, the new gas entering the tank is doing less expanding, so the chilling effect is most dramatic at the start of the fill, and the tank should warm back up as its pressure rises.

If you’re filling up a compressed air tank using a pump, then it’s different. The air starts out at room temperature and the pump will heat it up, and then it’s *hot* compressed air being pumped into an empty tank, which expands and cools down but doesn’t end up much colder than it started, so you won’t see any frost or condensation on the tank in that case.

First things first, there is no reason for a gas container to be particularly cold after filling. You are probably perceiving the thick metal walls of the container as cold. Gas containers of all kinds are usually stored outside, protected by direct sunlight, in ambient conditions and will therefore approach the ambient temperature.

Why do gases heat up when they are compressed? The little gas molecules want to spread out and fill out whatever room (volume) is available to them evenly. Therefore, we need to overcome this by applying energy (or in the correct thermodynamic context, work). The amount of work we need to apply depends on the kind of gas, the pressure we want to reach and the available volume that needs compressing. This process is fairly inefficient though and simply put, the gas molecules will rub against each other a lot. So there is a lot of that work we put in that doesn’t go into compressing the gas but is converted into and lost as heat.

In many technical processes, the heating of the gas during compression can be so high that you have apply multiple stages of compressors and cool the gas between them. The reason you filling a container does not seem to heat up the gas significantly is due to the low power of the compressor. The gas does heat up, just not enough for you to notice.

If you empty a gas container and the gas expands, what happens depends on the so-called Joule Thomson effect and its not a given that the expanding gas will cool. If it cools, that means it took energy from itself and its surroundings because work was needed so that the molecules could gain a larger distance on each other.

However, gases like Helium, Neon and Hydrogen have a so called Inversion temperature above 0 °C and 1 atmosphere of pressure and they will heat up when you empty a container under these conditions. The inversion temperature marks the tipping point whether gas heats up or cools down on expansion. The heating occurs because they effectively shed part of the energy that was put into compressing them to fill the volume.

Think of heat as a countable amount of something and temperature as a measure of how much heat there is per volume.

Heat is in every gas molecule. If you compress a lot of gas molecules, you also compress the heat that comes with them. More heat per volume unit means higher temperature.

This is what a compressor does: It forces a lot of gas into its pressurizing chamber which in turn gets hot. The hot chamber in turn is cooled down by the atmospheric gas surrounding it. Thus, the heat in the compressed gas inside has been reduced by a significant amount. If you were to expand the gas now back to its original state, it would have its original volume, but less heat per volume unit than you began with which translates to a lower temperature.

Pressurized gas containers had a lot of time to cool down, such that the compressed gas has the same amount of heat per volume unit than the surrounding atmosphere, but there is much more gas molecules per volume unit inside than outside. Thus gas containers cool down very much or even freeze. as you release the gas.