// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India. //Chapter-12,Example 1,Page 423 //Title: Margules parameters //================================================================================================================ clear clc //INPUT //For convenience Benzene is taken as 1 and heptane is taken as 2 T=60;//temperature of the system in degree celsius P=[237.60;265.20;317.50;333.00;368.70;387.20];//Pressure data in Torr (from Danneil et al.) x1=[0.0870;0.1800;0.4040;0.4790;0.7130;0.9070];//mole fraction of benzene in the liquid phase corresponding to the given pressure (no unit) (from Danneil et al.) y1=[0.1870;0.3400;0.5780;0.6420;0.7960;0.9220];//mole fraction of benzene in the vapour phase corresponding to the given pressure (no unit) (from Danneil et al.) antoine_const_benzene=[6.87987;1196.760;219.161];//Antoine's constants for Benzene from Table A.7 antoine_const_heptane=[6.89386;1264.370;216.640];//Antoine's constants for heptane from Table A.7 //CALCULATION //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_heptane(1,:)-(antoine_const_heptane(2,:)/(T+antoine_const_heptane(3,:))));//calculation of saturation pressure of heptane at T in Torr l=length(P);//iteration parameter i=1;//iteration parameter while i