# How to estimate the pressure drop due to venting?

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?

• Your assumption about using adiabatic rather than isothermal is correct. Would you know how to proceed if the substance were water/steam and you had a set of saturated steam tables (rather than using Peng-Robinson)? Would you know how to proceed if you had only gas in the chamber? Feb 17, 2023 at 13:33
• I'm using Peng-Robinson mainly to generate my own tables on the fly. Is this the core issue? I know how to compute the volume and the mass at equilibrium of each phases given the mass and the temperature of the substance, and the volume of the chamber. Whether the system at VLE or gas only, I don't know how to proceed because there is always a missing value (mass and volume are known for the final state, but the temperature and pressure are not if the process is adiabatic )
– Zejj
Feb 17, 2023 at 14:12

The open system version of the 1st law of thermodynamics tells us that $$dU=d(mu)=h_Vdm$$ where m is the combined mass of liquid and vapor in the tank, u is the internal energy per combined mass, and $$h_V=u_V+Pv_V$$is the enthalpy per unit mass of vapor (with $$v_V$$ representing the specific volume of the vapor). If we combine these two equations, we obtain:$$du=\left[(u_V-u)+Pv_V\right]\frac{dm}{m}$$In addition, we have $$u=u_L(1-x)+u_Vx$$and $$v_L(1-x)+v_Vx=\frac{V}{m}$$where V is the volume of the tank and x is the mass fraction vapor in the tank.

• Is this not what you were expecting? Incidentally, the equations can also be set up using the open system version of an entropy balance. Feb 18, 2023 at 11:46
• Thank you for your help but I think you overestimate my knowledge a little bit :) I spent a lot of time playing with your equations and now I understand how you obtained du. What I am not sure about is what to do with it. My best guess is I have to integrate over mass but I am not sure of what I should consider as known in the first place, and what I can consider constant during integration. Could you explain how to proceed ?
– Zejj
Feb 21, 2023 at 12:12
• yes, you integrate over mass. First you determine du for a small change dm in m. Then you determine the new value of u from the previous value (which is known). Then you use the steam tables to solve the u and v equations for x and T. Then make another incremental change in m, etc. Feb 21, 2023 at 12:26
• Thanks again, it's perfectly clear now and I learnt a lot in the process. I accept your answer.
– Zejj
Feb 21, 2023 at 13:44