The heat input to a system changing from an initial state i to a final state f depends on the path the system takes between these two states.
Consider the following thought experiment, in which the initial states and final states are identical. Hence, the change in internal energy is zero.
Isothermal gas expansion
An ideal gas is confined in initial volume V1 with initial pressure P1 and temperature T. The pressure is slowly reduced, and the volume slowly expanded at constant temperature to final pressure P2 and final volume V2 by allowing the piston to open slowly.
– ΔT = 0 and the process follows an isotherm.
– The gas does work (W < 0)
– Heat flows into gas (Q > 0)
Free gas expansion
An ideal gas is confined by membrane to initial volume V1 with initial pressure P1 and temperature T. This membrane is broken, and the gas expands rapidly into the vacuum space. (called “free” expansion) During this process the gas is in disequilibrium with no well-defined P. Finally, however, the gas has a well-defined final pressure P2 and final volume V2, and the same temperature T.
– The gas is essentially doing work against “nothing”. Hence work done is zero.
– No heat flows into the system due to insulating walls. Q = 0.
Note: Even if the walls are not insulating, the Q will still be 0.