Vapor-Liquid Equilibrium Diagram of Ethanol-Ethyl Acetate 
at 760 mmHg Using UNIQUAC Model
Author's Data: Housam Binous
Department of Chemical Engineering
National Institute of Applied Sciences and Technology
Tunis, TUNISIA
Email: binoushousam@yahoo.com

Off[General::"spell1"]

Vapor Pressure and Normal Boiling Points for Ethyl Acetate (component 1) and Ethanol (component 2)

Aa1 = 7.10179; Ba1 = 1244.951; Ca1 = 217.881;

Aa2 = 7.58670; Ba2 = 1281.590; Ca2 = 193.768;

Psat1 = 10^(Aa1 - Ba1/(T + Ca1))

FindRoot[Psat1 == 760, {T, 50}]

Psat2 = 10^(Aa2 - Ba2/(T + Ca2))

FindRoot[Psat2 == 760, {T, 50}]

Activity coefficients using UNIQUAC model
Component 1 = Ethyl Acetate
Component 2 = Ethanol

tau[j_, i_] := Exp[-(U[j, i] - U[i, i])/(R T)]

U[1, 1] = 0.0; U[1, 2] = 363.9664;

U[2, 1] = -62.7027; U[2, 2] = 0.0;

Gam1 = Exp[Log[Gam1C] + Log[Gam1R]]

Gam2 = Exp[Log[Gam2C] + Log[Gam2R]]

Gam1C = 
        Exp[Log[phi[1]/x[1]] + z/2 q[1] Log[v[1]/phi[1]] + l[1] - 
            phi[1]/x[1] (∑_(j = 1)^2) x[j] l[j]];

Gam2C = 
        Exp[Log[phi[2]/x[2]] + z/2 q[2] Log[v[2]/phi[2]] + l[2] - 
            phi[2]/x[2] (∑_(j = 1)^2) x[j] l[j]];

r[1] = 3.47860; r[2] = 2.10540;

q[1] = 3.11590; q[2] = 1.97200;

l[i_] := z/2 (r[i] - q[i]) - (r[i] - 1)

z = 10;

Gam1R = 
        Exp[q[1] (1 - 
                Log[(∑_(j = 1)^2) v[j] tau[j, 
                        1]] - (∑_(j = 1)^2)(( v[j] tau[1, j])/((∑_(k = 1)^2) v[k] tau[k, j])))];

Gam2R = 
        Exp[q[2] (1 - 
                Log[(∑_(j = 1)^2) v[j] tau[j, 
                        2]] - (∑_(j = 1)^2)(( v[j] tau[2, j])/((∑_(k = 1)^2) v[k] tau[k, j])))];

phi[i_] := r[i] x[i]/(∑_(j = 1)^2) r[j] x[j]

v[i_] := q[i] x[i]/(∑_(j = 1)^2) q[j] x[j]

R = 1.98721;

GAM1 = Gam1 /. x[1] ->  x /. x[2] ->  1 - x /. 
          T ->  T + 273.15;

GAM2 = Gam2 /. x[1] ->  x /. x[2] ->  1 - x /. 
          T ->  T + 273.15;

VLE data computation using UNIQUAC Model

i = 0;

P = 760;

While[
      i < 101, {x = i 0.01, 
sol = 
          FindRoot[
            Psat1 x GAM1 + Psat2 (1 - x) GAM2 ==  P, {T, 77, 
              78}]; xe[i] = x, 
        ye[i] = Psat1 x GAM1/P /. sol, 
Te[i] = T /. sol, 
        Print[i], i++}]

Tbl1 = Table[{xe[i], Te[i]}, {i, 1, 100}];

Tbl2 = Table[{ye[i], Te[i]}, {i, 1, 100}];

plt1 = 
      ListPlot[Tbl1, PlotStyle ->  RGBColor[1, 0, 0], 
        PlotJoined ->  True, 
        DisplayFunction ->  Identity]

plt2 = 
      ListPlot[Tbl2, PlotStyle ->  RGBColor[0, 0, 1], 
        PlotJoined ->  True, 
        DisplayFunction ->  Identity]

Show[plt1, plt2, DisplayFunction ->  $DisplayFunction]

Comparing data obtained from UNIQUAC Model and experimental data from Perry's Handbook

mydata = {{0, 78.57, 0}, {0.1, 75.77, 0.188}, {0.2, 74.17, 
          0.305}, 
{0.3, 73.24, 0.388}, {0.4, 72.71, 
          0.456}, {0.5, 72.47, 0.517}, 
{0.6, 72.49, 
          0.578}, {0.7, 72.79, 0.647}, {0.8, 73.48, 0.730}, {0.9, 74.77, 
          0.839}, {1, 77.06, 1}}

Tbl3 = 
      Table[{mydata[[i, 1]], mydata[[i, 2]]}, {i, 1, 11}]

Tbl4 = 
      Table[{mydata[[i, 3]], mydata[[i, 2]]}, {i, 1, 11}]

plt3 = 
      ListPlot[Tbl3, 
        PlotStyle ->  {PointSize[0.025], RGBColor[1, 0, 0]}, 
        DisplayFunction ->  Identity]

plt4 = 
      ListPlot[Tbl4, 
        PlotStyle ->  {PointSize[0.025], RGBColor[0, 0, 1]}, 
        DisplayFunction ->  Identity]

Show[plt3, plt4, plt1, plt2, 
      DisplayFunction ->  $DisplayFunction]