When the gas is cooled at constant pressure