function [f1,f2,f3]=tryf(zs,ks,vofs)
% function [f1,f2,f3]=tryf(zs,ks,vofs)
% Three functions that could be used to solve the flash
%    problem.
% Argument list
% Argument   Gives
%    zs    vector of feed mol fractions.
%    ks    vector of distribution coefficients.
%    vofs  values of V/F to determine each sum at.
% Vectors of fk(V/F) are returned where:
%    f1 is 1-sum(xs)
%    f2 is 1-sum(ys)
%    f3 is sum(ys-xs)
% Example: start301  to specify  benzene, toluene, o-xylene
%          vofs=0:.05:1;
%          ks=kval(375,101)
%          zs=[.4 .4 .2];
%          [f1,f2,f3]=tryf(zs,ks,vofs);
f1=[]; f2=[]; f3=[];
for k=1:length(vofs)
  xs=zs./(vofs(k)*(ks-1)+1);
  ys=xs.*ks;
  f1=[f1,1-sum(xs)];
  f2=[f2,1-sum(ys)];
  f3=[f3,sum(ys-xs)];
end

