A fluid is confined in a cylinder by a spring loaded, frictionless piston so that the pressure in the fluid is a linear function of the volume (p = a + bV) where U is in kJ, p is in kPa and V in cubic meter. If the fluid changes from an initial state of 170 kPa, 0.03 m3 to a final state of 400 kPa, 0.06 m3 , with no work other than that done on the piston, find the direction and magnitude of the work and heat transfer.