Calculation of final temperature in reversible process.