jasper wrote:Not clear. I see your script, which is essentially running many T+P flashes and checking whether a liquid is present.
Which simulation environment are you running this in? Can you reduce the problem to 2 equilibrium calculations:
1) calculate the dew point temperature:
- Code: Select all
[phases,phasefractions,compositions,T,P]=getEquilibrium(x,'vaporfraction',1,'pressure',P)
2) calculate the T-P flash at the temperature below (?) the dew point where only vapor appears?
- Code: Select all
[phases,phasefractions,compositions,T,P]=getEquilibrium(x,'temperature',T,'pressure',P)
(where T is the temperature below the dew point that gives vapor only)
and post the outputs?
1.In PROII 9.4
2.My idea is to use the getEquilibrium function, and if liquid is exist, T=T+10^(1-k), else T=T-10^(1-k), here k is to control the accuracy from 1 to 0.0001.
unless arrive at satisfactory accuracy
3.My script is to calculate Dewpoint at the temperature when liquid is first exist, and then plus 10^(1-k) (Kelvin)
4.Aside from my script, you can try to use getEquilibrium function to see the phases at the temperature of 0.001K lower than the dewpoint (calculated by the simulation environment), it will show only vapor phase instead of two phases actually