%Time test for the different flash calculations.
filename='SSresults.mat';
load (filename)

%For TP Flash
%Definition of initial points
NC=5;
x0=[0.0080 0.0860 0.4590 0.3450];
x=x0;
y0=[0.1620 0.4570 0.3280 0.0184]; 
y=y0;
x(NC)=1-sum(x(1:NC-1));        
y(NC)=1-sum(y(1:NC-1));
VF0=0.65;
[Zl0,phil,Hl,Vl]= srks(x,Ts(2),P(2),1);
[Zg0,phig,Hg,Vg]= srks(y,Ts(2),P(2),2);

%Explicit compressibility
tic
[ xeo, yeo,VFeo, hl, hv  ] = flashTPeo(Ts(2),P(2), x0,y0, z(2,:),VF0,Zl0,Zg0)
toc
TimeEO = toc;
x
y
%Implicit compressibility
tic
[xs, ys,VFs, h(4), h(3)] = flashTP(Ts(2),P(2), x0,y0,z(2,:),VF0)
toc
Time = toc;