// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India. //Chapter-12,Example 9,Page 464 //Title: Temperature-composition diagram //================================================================================================================ clear clc //INPUT //For convenience benzene is taken as 1 and water is taken as 2. They form a completely immiscible system P=760;//pressure of the system in Torr antoine_const_benzene=[6.87987;1196.760;219.161];//Antoine's constants for Benzene from Table A.7 t=60:5:100;//temperature range in degree celsius //saturation pressure of water(in torr)in the temperature range given by t (from steam tables) P2_s=[149.40;187.58;233.71;289.13;355.21;433.51;525.84;634.00;760.00]; x1=0:0.2:1;//mole fraction of benzene in the liquid phase (no unit) (taken in an arbitrary manner) //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 //The three phase equilibrium temperature is estimated using the saturation pressure values,such that at the three phase equilibrium temperature,P=P1_s+P2_s=P as given by Eq.(12.57) Torr l=length(t);//iteration parameter i=1;//iteration parameter while i