Carnot Cycle — How Heat Produces Work, and the Upper Limit on Efficiency

If the gas in a cylinder goes through isothermal expansion → adiabatic expansion → isothermal compression → adiabatic compression, it returns to its original state after one cycle, yet net work remains. This is a heat engine. In ① the piston motion is shown side by side with the P–V and T–S diagrams; in ② you follow the heat and work of the four stages numerically and confirm that the efficiency is η = 1 − TC/TH.

All thermodynamic quantities are computed from the partition function (translation + rotation + vibration + electronic degeneracy). The adiabats are not drawn by assuming a constant CV; they are obtained by solving the condition of constant entropy, S(T, V) = const, directly.