Calculate Work for Reversible & Irreversible Expansion/Compression