Hi guys!
I'm currently working on an Excel spreadsheet that does depressurization calculation.
I've managed to incorporate these so far in the spreadsheet:
1. Flowrate across an orifice (for subsonic and choked flow)
2. Adiabatic expansion inside the vessel.
With that said, the spreadsheet is able to calculate for the required orifice area or the vessel final pressure (given the proper needed data).
#1 is kinda straightforward so there's little difficulty dealing with but as for #2, this is where some issue lie, but let me discuss how I did my calculation:
1. Since I employed a numerical approach, I set a certain time step (del_t) and calculate the required mass flow across the nozzle (m) and then I calculate its corresponding volume flow (Qm) and then subtract this from the vessel inventory (Q-Qm*del_t) at the prevailing pressure (P1). With those info at hand, I do the adiabatic expansion calculation (from Q-Qm*del_t to Q, which is the vessel volume) and calculate the corresponding P2 and T2 from it.
2. I used compressibility factor (Z) and ratio of Cp/Cv (k) to do the adiabatic expansion calculation (at initial vessel conditions)
3. I have not included heat losses in the calculation (not yet anyway)
I ran the spreadsheet in comparison with what Hysys depressurizing utility produces and while I was able to get a somewhat similar result (within 5%) with it, there are fluids (such as propane) that behaves erratically (final vessel temperature in particular). I suspect the non-ideal behavior of ethane comes into picture.
So for the questions:
1. Is my method in #1 reasonable? Because I can also do the subtraction of inventory on mole basis and back calculate P and T from it, though how it fits in adiabatic expansion isn't that clear (at least for me).
2. I think I hit a brick wall on how I do my adiabatic expansion calculation since I basically treat it as an expansion of ideal gas. So I plan on doing calculation based on EOS (I already implemented Peng-Robinson in the spreadsheet) and do the adiabatic expansion using EOS.
Since it's been a while since I dealt with it, my understanding is that for an adiabatic expansion, your entropy remains the same and the work done by expansion (is it PdV?) is absorbed by the change in enthalpy.
So basically, I need to calculate the initial enthalpy H1 and entropy S1 and knowing delS=0, I can back calculate H2 using S1, and thus the temperature. And I presume that P2 will be tied up in this calculation (since H depends weakly on P).
Is that right? Basically I want to ask for a nudge in the right direction on how to make this work.
Thanks!