A 0.018 cubic meter rigid tank is filled with saturated liquid water at 120*C. A valve is opened until half of the mass is withdrawn in liquid form. Heat is transferred from a source at 230*C which is constant. Find the heat transferred and the total entropy generated.