// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India. //Chapter-11,Example 1,Page 378 //Title:P-x-y and T-x-y diagram for a Benzene Toluene system //================================================================================================================ clear clc //INPUT antoine_const_benzene=[6.87987;1196.760;219.161];//Antoine's constants for Benzene from Table A.7 antoine_const_toluene=[6.95087;1342.310;219.187];//Antoine's constants for Toluene from Table A.7 t=95;//temperature at which the P-x-y diagram has to be prepared in degree celsius P=101.325;//pressure at which the T-x-y diagram has to be prepared in kPa //CALCULATION //P-x-y diagram: //For convenience Benzene is denoted as 1 and Toluene as 2 //The form of the Antoine's equation used is logP=A-(B/(t+C)), where P is in Torr and t is in degree celsius P1_s=10^(antoine_const_benzene(1,:)-(antoine_const_benzene(2,:)/(t+antoine_const_benzene(3,:))));//calculation of saturation pressure of benzene at t in Torr P2_s=10^(antoine_const_toluene(1,:)-(antoine_const_toluene(2,:)/(t+antoine_const_toluene(3,:))));//calculation of saturation pressure of toluene at t in Torr x1=0:0.1:1;//mole fraction of benzene in the liquid phase (no unit) i=1;//iteration parameter n=length(x1);//iteration parameter while i