function [t,y]=bubpt2(p,x1)
% Bubpt2 - binary form of bubpt
% function [t,y]=bubpt2(p,x1)
% Binary form of bubpt function
% Argument List:
% Argument   Gives
%    p      pressure in kPa
%    x1     mol fraction of 1st component in liquid
% Returns    Giving
%    t      the bubble point temperature of the mixture.
%             in the units of Tdeg.
%    y      vapor mol fraction of compound 1.
% Ex: start301a in Unix: give the names: benzene, toluene
%   >> start301b 
%     [t,y]=bubpt2(101,.3)
%    ( t will contain the bubble point and y the vapor comp.)
ts=teql(p);
cs=[p,x1,1-x1];
t=ssec2(ts,'-sum(kval(x,c(1)).*c(2:3))+1',cs);
ks=kval(t,p);
y=x1*ks(1);
