function y = sumy(Tk);

% This function returns the vector of differences (1-sumY) at given 
% values of temperature (Tk), pressure (P) and liquid composition (X).

% FZERO('sumy',value) returns the Tk that gives sumY=1, i.e. when the
% difference is zero

global Xglob Pglob NCglob Rglob Wglob Vglob Aglob

Y=ycomp(Tk);
y=sum(Y)-1;


