A rigid tank primarily contains 3 kg of air at 500 kPa, 290 K. The tank is connected by a valve to a piston-cylinder assembly oriented vertically and consisting of 0.05 m³ of air initially at 200 kPa, 290 K. Even though the valve is closed, a slow leak permits air to flow into the cylinder until the tank pressure falls to 200 kPa. The weight of the piston and the pressure of the atmosphere keep a constant pressure of 200 kPa in the cylinder; and owing to heat transfer, the temperature stays constant at 290 K. For the air, calculate the total amount of energy transfer by heat, in kJ. Assume ideal gas behavior.