For context, I'm writing a small simulation to predict the behavior of a pure substance within tanks, pipes, valves and so on for entertainment purposes. I have an issue to simulate venting.
Here is how I simulate a venting:
- My thermodynamic system is a pure substance at vapor-liquid equilibrium (VLE) for both the initial and final state.
- I use a cubic equation of state (a Peng Robinson variant) and I am able to generate both PT and PV diagrams (using the Maxwell construction). When compared to some thermodynamics tables, the results I get are good enough for my needs.
To simulate a venting, I would like to remove some mass from the system assuming the temperature stay constant, and I could deduce the final equilibrium state (at VLE too).
When I think about this, I cannot see how a pressure drop could occur. I have several hypothesis but I am not sure which one is right (if any):
- The maxwell construction may be a too strong approximation and in reality there would be a pressure drop on each isotherms at VLE (in that case, isotherms would have a negative slope, not a zero one). Thus when I remove mass from the system, I can use the same isotherm to deduce the pressure drop and the final state.
- The venting is not an isothermal process but an adiabatic one. The temperature drops and this is the reason why the pressure drops too. In such a case I do not know how to proceed because I do not know how to estimate the final temperature, I have just have the quantity of matter remaining in the system and I need either the final pressure or the final temperature to compute the final state.
So my question is: using reasonable assumptions, is there a way to estimate the pressure drop due to venting?