Solve the below problem:
Q: An insulated cylinder with a frictionless piston contains water at ambient pressure, 100 kPa, a quality of 0.8 and the volume is 8 L. A force is now applied, slowly compressing the water until it reaches a set of stops, at which point the cylinder volume is 1 L. The insulation is then removed from the cylinder walls, and the water cools to ambient temperature, 20?C, calculate the work and the heat transfer for the overall process.