Problem
A cylinder containing 1 kg of ammonia has an externally loaded piston. Initially the ammonia is at 2 MPa and 180oC. It is now cooled to saturated vapor at 40oC and then further cooled to 20oC, at which point the quality is 50%. Find the total work and the heat transfer for the process, assuming a piecewise linear variation of P versus V.
The response should include a reference list. Double-space, using Times New Roman 12 pnt font, one-inch margins, and APA style of writing and citations.