A $2-\mathrm{m}^{3}$ rigid tank initially contains air at $100 \mathrm{kPa}$ and $22^{\circ} \mathrm{C} .$ The tank is connected to a supply line through a valve. Air is flowing in the supply line at $600 \mathrm{kPa}$ and $22^{\circ} \mathrm{C}$. The valve is opened, and air is allowed to enter the tank until the pressure in the tank reaches the line pressure, at which point the valve is closed. A thermometer placed in the tank indicates that the air temperature at the final state is $77^{\circ} \mathrm{C}$. Determine (a) the mass of air that has entered the tank and $(b)$ the amount of heat transfer.