I am trying to determine how to accurately model an open system which includes: A tank: Volume = 1320 gallons An exit pipe from tank: Diameter = 3 inches The tank is compressed from atmospheric conditions to a final pressure of 100 psig. Then the tank is allowed to decompress by opening a valve at the exit (blow down test). The air in the tank is initially at 400 F and 100 psig. The temperature in the tank decreases as pressure decreases. How do I model the temperature change in the tank as well as pressure. Keep in mind choke conditions at the pipe exit. Assume isentropic behavior and perfect insulation. Ignore frictional losses of the exit pipe and bends. Hope you guys can help me with this. Thanks! FYI: The problem I am having is that, we known, PV=mRT but the pressure changes with the temperature, but the mass also changes due to decompression (open system).