Three fundamental situations show how the energy balance changes depending on which exchanges are present: heating at constant volume (no work), heating with a moving piston (the work of the atmosphere appears) and free expansion into a vacuum (all exchanges are zero). In each case the first law is the same: only which terms survive changes.