Discuss the below in detail:
Q: A 1-m3 insulated, 40-kg rigid steel tank contains air at 500 kPa, and both tank and air are at 20°C. The tank is connected to a line flowing air at 2 MPa, 20°C. The valve is opened, allowing air to flow into the tank until the pressure reaches 1.5 MPa and is then closed. Assume the air and tank are always at the same temperature and find the final temperature.