RCM of a Nonideal Ternary Mixture using StreamPlot​
​Authors: Housam Binous and Ahmed Bellagi

Reference :​
M. F. Doherty and M. F. Malone, Conceptual Design of Distillation Systems, New York: McGraw-Hill, 2001.
Gas constant, total pressure, vapor pressure, molar volume and binary interaction parameters for the WILSON model
In[]:=
R=1.987;P=760;​​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;
Activities using the WILSON model
In[]:=
A12=V2/V1Exp[-l12/(R*(T+273.15))];​​A13=V3/V1Exp[-l13/(R*(T+273.15))];​​A32=V2/V3Exp[-l32/(R*(T+273.15))];​​A21=V1/V2Exp[-l21/(R*(T+273.15))];​​A31=V1/V3Exp[-l31/(R*(T+273.15))];​​A23=V3/V2Exp[-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))];​​
Modified Raoult’s law
In[]:=
y1=
GAM1[x1,x2,x3]Psat1x1
P
;​​y2=
GAM2[x1,x2,x3]Psat2x2
P
;y3=
GAM3[x1,x2,x3]Psat3x3
P
;x3=1-x1-x2;
Bubble temperature
In[]:=
Tbp[x1_?NumericQ,x2_?NumericQ,x3_?NumericQ]:=(T/.FindRoot[x1Psat1GAM1[x1,x2,x3]+x2Psat2GAM2[x1,x2,x3]+x3Psat3GAM3[x1,x2,x3]P,{T,50,70}]);
RMC
In[]:=
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]];
In[]:=
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["
A
1
",{0.69,-0.05},{-1,0}],RGBColor[.49,0,0],14],Style[Text["
A
2
",{-0.1,0.83},{-1,0}],RGBColor[.49,0,0],14],Style[Text["
A
3
",{0.68,0.36},{-1,0}],RGBColor[.49,0,0],14],Style[Text["
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]
Out[]=