The energy added as work during the compression of a gas leads to an increase in pressure and temperature. Learn more about this in this article.
While an increase in temperature due to the supply of heat is directly plausible from everyday experience, an increase in temperature due to a mechanical supply of energy as work (compression) is more difficult to understand. For gases in particular, however, there is a very clear explanation for this. For this purpose, we will first consider the analogy of a tennis ball hit by a racket. When the racket hits the ball, kinetic energy is obviously added to the ball. The tennis ball now flies back at a higher speed.
In the analogous way, the compression of a gas can be considered. The piston represents the racket and the gas molecules the tennis balls. The piston coming towards the molecules during compression increases the momentum of molecuels and thus the kinetic energy. The molecules become faster and the temperature consequently rises! The relationship between the mean kinetic energy of the particles and the resulting pressure is explained in more detail in the article Pressure and Temperature.
The speed with which the piston compresses the gas volume is relatively irrelevant for the process of temperature increase. If the piston is moved slowly, the individual collisions may not be as powerful, but they occur more frequently because the molecules collide again with the moving piston after a certain time. If the piston moves quickly, on the other hand, there are fewer collisions with the piston surface, but they are more powerful.
In practice, the speed with wich the gas is compressed has an influence insofar as the temperature increase at a relatively low compression rate can be compensated by a heat flow through the cylinder walls. The final temperature after compression will therefore not be so high due to the releasing of energy as heat. If, on the other hand, compression is very fast, hardly any heat can be released to the surroundings through the cylinder walls in the short time available (adiabatic system). The final temperature after the compression will be higher.
One can demonstrate the temperature increase during an (adiabatic) compression with the following experiment. A cylinder is closed with a piston. A piece of cotton wool is placed inside the cylinder. If the piston is abruptly pushed down, the work added during compression causes the temperature to rise so much that the cotton wool ignites. Diesel engines work according to this principle of so-called self-ignition. Instead of cotton wool, a gasoline-air mixture is ignited.