When an ideal gas is compressed adiabatically, that is, without adding heat, work is done on it, and its temperature increases. In an adiabatic expansion, the gas does work, and its temperature drops. Adiabatic compressions actually occur in the cylinders of a car, where the compressions of the gas-air mixture take place so quickly that there is no time for the mixture to exchange heat with its environment. Nevertheless, because work is done on the mixture during the compression, its temperature does rise significantly. In fact, the temperature increase can be so large that the mixture can explode without the addition of a spark. Such explosions, since they are not timed, make a car run poorly—it usually “knocks.” As the ignition temperature rises with the octane of the gasoline, the usage of higher-octane gasoline is one way to overcome this issue.
Another interesting adiabatic process is the free expansion of a gas. Imagine a gas is confined by a membrane to one side of a two-compartment, thermally insulated container. When the membrane is punctured, the gas rushes into the empty side of the container, thereby expanding freely. As the gas expands “against a vacuum”, the pressure decreases (p = 0), it does no work, and, because the vessel is thermally insulated, the expansion is adiabatic. With Q = 0 and W = 0 in the first law, dU = 0, so the internal energy in the initial and final equilibrium states is the same for the free expansion. If the gas is ideal, the internal energy depends only on the temperature. Therefore, when an ideal gas expands freely, its temperature does not change.