Answer:
The air heats up when being compressed and transefers heat to the barrel.
Explanation:
When a gas is compressed it raises in temperature. Assuming that the compression happens fast and is done before a significant amount of heat can be transferred to the barrel, we could say it is an adiabatic compression. This isn't exactly true, it is an approximation.
In an adiabatic transformation:
[tex]P^{1-k} * T^k = constant[/tex]
For air k = 1.4
SO
[tex]P0^{-0.4} * T0^{1.4} = P1^{-0.4} * T1^{1.4}[/tex]
[tex]T1^{1.4} = \frac{P1^{0.4} * T0^{1.4}}{P0^{0.4}}[/tex]
[tex]T1^{1.4} = \frac{P1}{P0}^{0.4} * T0^{1.4}[/tex]
[tex]T1 = T0 * \frac{P1}{P0}^{0.4/1.4}[/tex]
[tex]T1 = T0 * \frac{P1}{P0}^{0.28}[/tex]
SInce it is compressing, the fraction P1/P0 will always be greater than one, and raised to a positive fraction it will always yield a number greater than one, so the final temperature will be greater than the initial temperature.
After it was compressed the hot air will exchange heat with the barrel heating it up.