Air from a line at 12 MPa, 15 deg C flows into a 500-liter rigid tank that initially contains air at 100 kPa and 15 deg C, which are also the ambient conditions. The process is adiabatic and the tank's valve closes when the pressure inside the tank reaches a prescribed value P2. The tank then cools to the ambient temperature, at which point the pressure is 5 MPa. Find P2 an PS for the overall process. Assume air is an ideal constant-Cv0 gas.