If I have 2 sealed tanks A and B of 1 cu ft volume that contain air at atmospheric pressure and are at 300 deg K. temp absolute. For tank A I raise the temperature from 300K to 600K and I suppose the pressure will double due to this and would be 14.7 * 2 = 29.4psi absolute For tank B I use a piston and compress the air in it to 29.4 psi. I don't really know how to calculate the heat of compression in this case. Now If I allow both tanks to cool to ambient. Would the pressure in both tanks reduce to atmospheric pressure? What is the fundamental difference between the pressure increase due to temperature and and pressure increase due to mechanical compression?