A tank containing carbon dioxide at 400 K and 50 bar is vented until the temperature in the tank falls to 300 K. Assuming there is no heat transfer between the gas and the tank, find the pressure in the tank at the end of the venting process and the fraction of the initial mass of gas remaining in the tank if carbon dioxide obeys the ideal gas and PR equations of state