The maximum useful work that can be extracted during a process is: Wuseful = Eint + pV - TS. The "TS" term represents:
- The heat transferred to the environment
- The work done by the environment
- The thermal energy of the system
- The change in the entropy of the universe