Exergy Analysis of Compression and Expansion Processes