Work performed by gas during expansion