RCM of a Nonideal Ternary Mixture using StreamPlot
Authors' Data: Housam Binous
Department of Chemical Engineering
National Institute of Applied Sciences and Technology
Tunis, TUNISIA
Email: binoushousam@yahoo.com

Reference :
M. F. Doherty and M. F. Malone, Conceptual Design of Distillation Systems, New York: McGraw-Hill, 2001.

Computation may take several minutes to complete.

Manipulate[Module[{plt,y1,y2,y3,x1,x2,x3,Psat1,Psat2,Psat3,GAM1,GAM2,GAM3,T,Tbp},
R=1.987;
Aa2=7.63132;Ba2=1566.69;Ca2=273.419;Aa1=6.95465;Ba1=1170.966;Ca1=226.232;
Aa3=8.08097;Ba3=1582.271;Ca3=239.726;
Psat1=10^(Aa1-Ba1/(T+Ca1));Psat2=10^(Aa2-Ba2/(T+Ca2)) ;Psat3=10^(Aa3-Ba3/(T+Ca3)) ;
l12=-506.85180;l21=116.11710;l13=-361.79440;
l31=1694.02400;l23=-124.93280;l32=551.45450;
V1=80.7;V2=74.0;V3=40.7;A12=V2/V1 Exp[-l12/(R*(T+273.15))];
A13=V3/V1 Exp[-l13/(R*(T+273.15))];
A32=V2/V3 Exp[-l32/(R*(T+273.15))];
A21=V1/V2 Exp[-l21/(R*(T+273.15))];
A31=V1/V3 Exp[-l31/(R*(T+273.15))];
A23=V3/V2 Exp[-l23/(R*(T+273.15))];
GAM1[x1_,x2_,x3_]:=Exp[-Log[x1+x2*A12+x3*A13]+1-(x1/(x1+x2*A12+x3*A13)+x2*A21/(x1*A21+x2+x3*A23)+x3*A31/(x1*A31+x2*A32+x3))];
GAM2[x1_,x2_,x3_]:=Exp[-Log[x1*A21+x2+x3*A23]+1-(x1*A12/(x1+x2*A12+x3*A13)+x2/(x1*A21+x2+x3*A23)+x3*A32/(x1*A31+x2*A32+x3))];
GAM3[x1_,x2_,x3_]:=Exp[-Log[x1*A31+x2*A32+x3]+1-(x1*A13/(x1+x2*A12+x3*A13)+x2*A23/(x1*A21+x2+x3*A23)+x3/(x1*A31+x2*A32+x3))];
 y1=((GAM1[x1,x2,x3] Psat1 x1)/P);
 y2=((GAM2[x1,x2,x3] Psat2 x2)/P);y3=((GAM3[x1,x2,x3] Psat3 x3)/P);x3=1-x1-x2;Tbp[x1_?NumericQ,x2_?NumericQ,x3_?NumericQ]:=(T/.FindRoot[x1 Psat1 GAM1[x1,x2,x3]+x2 Psat2 GAM2[x1,x2,x3]+x3 Psat3 GAM3[x1,x2,x3]== P,{T,50,70}]);plt=StreamPlot[({x1-y1,x2-y2}/.T-> Tbp[x1,x2,x3]),{x1,0,1},{x2,0,1},StreamPoints-> 100,StreamScale-> Large,StreamStyle-> Red,RegionFunction-> Function[{x1,x2},0≤ x1≤ 1&& 0≤ x2≤ 1 && 0≤ 1-x2-x1≤ 1]];Show[plt,AspectRatio-> 1,Epilog -> {Thickness[0.005],Line[{{0,1},{1,0}}],Line[{{0,0},{1,0}}],Line[{{0,1},{0,0}}],Style[Text["methanol",{-0.1,-0.05},{-1,0}],Red,14],Style[Text["chloroform",{1.1,-0.05},{-1,0}],Red,14],Style[Text["acetone",{-0.05,1.1},{-1,0}],Red,14],If[P== 760,{Style[Text["(Subscript[A, 1])",{0.69,-0.05},{-1,0}],RGBColor[.49,0,0],14],Style[Text["(Subscript[A, 2])",{-0.1,0.83},{-1,0}],RGBColor[.49,0,0],14],Style[Text["(Subscript[A, 3])",{0.68,0.36},{-1,0}],RGBColor[.49,0,0],14],Style[Text["(Subscript[A, 4])",{0.25,0.38},{-1,0}],RGBColor[.49,0,0],14],RGBColor[.49,0,0],PointSize[0.03],Point[{0.6552,0}],Point[{0,0.7907}],Point[{0.2290,0.3321}],Point[{0.6613,0.3387}]},PointSize[0.03]]},ImageSize-> {500,400},ImagePadding->{{70,90},{25,48}},PlotRangeClipping->False]],{{P,760,"total pressure"},100,800,20,Appearance-> "Labeled"},ControlPlacement-> Top]