function Y = sumY(T);

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

global X NC P R A W alpha 

Y=NRTL(T);
Y=1-sum(Y);