P. 1
Separation Analysis Using Matlab_example1

Separation Analysis Using Matlab_example1

|Views: 5|Likes:
Published by Nagwa Mansy

More info:

Published by: Nagwa Mansy on Dec 05, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/05/2013

pdf

text

original

EXAMPLE 1: McCabe-Thiele Method and Stage Efficiency in Binary Distillation In this example, we utilize our MATLAB code

to visualize the McCabe-Thiele graphical equilibrium-stage method and determine overall efficiency in a distillation process for a binary mixture of A and B. It consists of i) constructing the equilibrium curve, ii) drawing operating lines and feed line, iii) displaying the equilibrium stages, and iv) illustrating stage and overall efficiency. We use the commands “plot” and “movie” in MATLAB1 to visualize and animate the diagrams. i) Equilibrium Curve % Selection iflag = 0 : constant alpha % = 1 : use Antoine Eqn for x-y data % = 2 : read x-y data iflag=input('0 for constant alpha, 1 for Antoine Eq., 2 for actual data ') Three ways of determining the equilibrium relationship between liquid and vapor phases are introduced. First, if a constant relative volatility, α AB =

KA y /x = A A where KA and KB are the KB yB / xB

volatility of A and B, respectively is assumed, the vapor composition yA can be determined at a given liquid composition, xA

yA =

α AB xA 1 + xA (α AB − 1)

(1.1)

Secondly, thermodynamic models can be used to determine the equilibrium relationship. If the component A and B form an ideal mixture, and the vapor pressure for the pure compounds,

Pi sat can be obtained from the Antoine equation2
log10 Pi sat = Ai −

Bi t + Ci

(1.2)

where Ai, Bi and Ci are Antoine constants for component i. Using the function “fzero” in
B

sat MATLAB1 which finds a zero of a given function, a temperature that satisfies PA + PBsat = Ptotal

can be determined for a liquid composition xA and xB. The vapor composition then is calculated
B

from Dalton’s law and Raoult’s law: 2

the y – x diagram is plotted. i.tguess. i. L and V in the rectifying section (and L and V in the stripping section).'LineWidth'. 'b--'.'iter').b1.a1. if iflag==0 % Contant alpha ynew=a*xnew/(1+xnew*(a-1)). constant molar liquid and vapor rates. figure(1).[y. With the liquid and vapor compositions in equilibrium xA and yA.b1. [x xnew].2) % Plot y vs.c1. tguess=t.optimset('disp'. ynew=pvapor(a1. the liquid and vapor compositions.b2.ynew].'LineWidth'. curve) hold on title('McCabe-Thiele Method') xlabel('x') ylabel('y') axis([0 1 0 1]) axis('square') plot([x xnew].i)=getframe. end plot([x.xnew.a2. y=ynew.xnew]. elseif iflag==1 % Using Antoine Eq. x diagram (eq. ynew=ydata(i+1).e.t)/Ptotal*xnew else % Actual Data xnew=xdata(i+1). xA and yA can directly be read from the actual data. (2) t=fzero('antoine'.2) hold on Frames(:.e.3) Finally. x=xnew. clf for i = 1:itotal xnew=x+dx.c2.c1. the operating lines for the rectifying and stripping sections can be displayed using 2 .'b'. end ii) Operating Lines and Feed Line Under the assumption of constant molar overflow. the equilibrium curve.Ptotal).sat PA yA = xA Ptotal (1.

the operating lines from Eqs.5) where R = L/D and VB = V / B are the reflux ratio and boil-up ratio.1 The transfer in the operating line from the rectifying section to stripping section is made when the liquid composition. and the q-line from Eq. xD and xB are the overhead product and bottom product composition. Starting from the distillate xD (or bottoms product xB). (1. 3 .6) are uniquely determined.5). Meanwhile. the q-line which describes the feed condition can also be displayed using ⎛ q ⎞ ⎛ zF ⎞ y =⎜ ⎟ x −⎜ ⎟ ⎝ q −1 ⎠ ⎝ q −1 ⎠ where q = (1. Repeat a and b until x reaches xB. the reflux ratio. (1.4) and (1.6) L−L is the ratio of the increase in molar flux rate across the feed stage to the molar F feed rate. (1.4) (1. R. respectively. F. When actual data is used for the equilibrium curve. and D and B are the distillate and bottoms product rate. the Matlab interpolation function called “interp1” is used to find the intersection points in procedure a. Once any two of these three parameters. respectively. iii) Theoretical Equilibrium Stages Once the equilibrium curve.4) and (1.5). x passes that of the intersection of the two operating lines and feed line. operating lines and feed line are drawn. boil-up ratio VB and feed condition q are specified.⎛ R ⎞ ⎛ 1 ⎞ y =⎜ ⎟x+⎜ ⎟ xD ⎝ R +1⎠ ⎝ R +1⎠ ⎛ V +1⎞ ⎛ 1 ⎞ y = ⎜ B ⎟ x − ⎜ ⎟ xB ⎝ VB ⎠ ⎝ VB ⎠ (1. the equilibrium composition at each stage is determined by the McCabe-Thiele method. Drop a vertical line to the operating line c. the procedure for plotting the graphical solution is as follows: a. Draw a horizontal line from (xD. In Eqs. and zF is the feed composition. xD) to the equilibrium curve b.

relation if iflag==0 xnew=ynew/(a-ynew*(a-1)).tmid. pause % calculating # of stages if x >= x_B nstage=nstage+1 else nstage=nstage+x/x_B end end % c. Draw a horizontal line to the eq.[ynew.b1. EMV for each stage. line for rectifying section y=LoverV_D*x+x_D/(R+1) else % using the op.ynew.i)=getframe.c2.while x >= x_B % loop for stepping ynew=y % using constant alpha for eq.b1. relation elseif iflag==1 t=fzero('antoine2'. end plot([x.c1.ynew). xnew=ynew*Ptotal/pvapor(a1.xdata. % using Antoine Eq. line for stripping section y=LoverV_B*x-x_B/V_B end plot([xnew.i)=getframe.'LineWidth'.Ptotal).'iter').a1.a2. % using actual data for eq. pause i=i+1. Repeat a and b until x reaches x_B iv) Stage and Overall Efficiency Using the Murphree vapor efficiency. relation else xnew=interp1(ydata. Draw a vertical line to the op. x=xnew if x >= x_c %if x >= z % using the op. line hold on Frames(:.x].ynew]. (2) for eq.xnew].'LineWidth'. curve hold on Frames(:.3 yi = yi +1 + EMV ( yieq − yn +1 ) (1.optimset('disp'.7) 4 .c1.t).'r'.[y.'r'.2) % a.y].2) % b. the actual vapor composition can be obtained as2.b2.

Seader.. Eo = N t / N a . curve) Design Input Reflux ratio & feed condition or Reflux ratio & boilup ratio or Boilup ratio & feed condition • Step 2: Display operating lines and feed line • Step 3: Determine theoretical equilibrium stages.where i+1 is the stage below and yieq is the composition in the vapor in equilibrium with the liquid composition leaving stage i. Eo is determined by the ratio of the number of the theoretical equilibrium stages to that of the actual stages. 2002).. Pratap. Unit Operations of Chemical Engineering (McGraw Hill. E.J. 1998) Obtain equilibrium data Thermodynamic Input Constant relative volatility/ Antoine equation/ Actual data • Step 1: Display y vs. x diagram (eq. J. Emv • Step 4: Display new stepping based on Emv Determine actual stages Na and overall efficiency Eo Figure 1. REFERENCES 1.. Nt • Horizontal line to equilibrium curve • Vertical drop to operating line Design Input Murphree vapor efficiency. and Harriott..e. i. R. The overall efficiency.D. Smith. 2000) 3. Flow chart of Example 1: graphical method for binary distillation 5 . P.. A Quick Introduction for Scientists and Engineers (Oxford University Press. 2. C. L. McCabe. xi. Getting Started with MATLAB. J. and Henley. Separation Process Principles (John Wiley & Sons. W. 6th ed.1.

3 0.6 0. xB = 0.4 0.9 1 1 0.3 0.1 0.2 0.5 0.1 0 1 0.5 0.8 0.9 0.5 x 0.9 0.7 0.5 0.4 0.1 0.5.3 0.1 0.4 0.6 0.7.7 0.3 0.2.4 0.2 0.1 0.4 0.1 0 y 0 0.05.4 0.3 0.9 0.8 0.5.2 0.1 0 1 0.7 0.6 0.8 0.9 1 y 0 0.9 1 y 0 0. B 6 .6 0.9 0.4 0.8 0.3 0.7 0.8 0.4 0.3 0.7 0. xD = 0.6 0.8 0.5 x 0. Snap shots of graphical output of Example 1: McCabe-Thiele method for binary distillation of acetone and toluene.6 0.6 0.1 0.5 0.95.5 x 0.2 0.7 0.2 0. q = 0. R = 2.3 0.2 0.2 0.6 0. a) Equilibrium curve from Antoine equations. c) theoretical equilibrium stages.9 1 Figure 1.8 0. b) operating lines and feed line for zA = 0.5 x 0.2 0. and d) actual stages (shown in dashed line) with Emv = 0.8 0.1 0 y 0 0.7 0.7 0.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->