I'm playing around with a Euler's method simulation of an adiabatic compression/decompression process on an ideal gas.
If I have a volume of gas and I contract its volume slightly, I will be doing work on it. For very small time steps the work is approximately the product of the pressure and the change in volume.
As I understand it, because the system is adiabatic, all of the work done on the gas will increase it's temperature. The combined increase in temperature and the decrease in volume will increase the pressure of the gas according to the Ideal Gas Law.
The majority of my question pertains to the specific heat (Cv or Cp) of the gas in question. This process is neither constant volume or constant pressure so neither of the specific heats seem to apply. The answer to this question suggests that Cv still applies in this case when dealing with an ideal gas: Work done in adiabatic process
Does Cv also apply in my case?