An ideal gas has its volume controlled by the $x$-coordinate of a piston. At $t=0$, the piston starts oscillating very quickly (compared to the time scale of equilibration in the gas), then after some time it stops at its original $x$-coordinate. Once the gas comes to equilibrium again, it will have the same volume as at $t=0$, but its energy will have increased (due to sound waves produced by the piston). Is this change in energy considered work, or heat?
Assume that the gas and piston are insulated in such a way that the final energy of the gas is independent of the temperature of the piston/surroundings.
- If I understand it correctly, the following are the usual definitions of work and heat:
Work: Some parameters of the system's Hamiltonian are declared to be "external parameters," and work is a change in the system's energy due to a change in one or more external parameters.
Heat: Any change in the system's energy that is not due to work.
It seems to me that since the volume is an external parameter, the oscillating piston does work on the gas even though there is no net change in volume.
If instead you answer heat, then my follow-up is: repeat the above experiment with a final volume smaller than the initial volume (ie, the piston compresses the gas while oscillating rapidly). The gas again gains energy -- do you call this heat, or do you have a way to separate the change in energy into a "work" term and a "heat" term? What if the piston does not oscillate but simply compresses the gas very quickly, again producing sound waves that increase the final equilibrium energy of the gas?