In this problem, you will use your knowledge of solving systems of nonlinear equations and continuation methods

Question:

In this problem, you will use your knowledge of solving systems of nonlinear equations and continuation methods to determine both the composition and the temperature distribution in an ideal staged rectification column. Recall from mass and energy balances that the operating line for a rectifying column is given byYn+1 RD XD -Xn+ 1 + RD 1 + RD

where RD is the reflux ratio, xD is the concentration of the distillate, yn+1 is the concentration of the gas entering stage n, and xn is the concentration of the liquid exiting stage n. The concentrations refer to the lighter boiling component. We will be considering a total condensor, whereupon x0 = y1 = xD. In an ideal column, the liquid composition xn and gas composition yn exiting stage n are assumed to be in equilibrium. We will further assume that this equilibrium is given by Raoult’s lawXnPsat XnP = ynP (1 - Yn)P psat (1-xn)Pat= 2

where species 1 is the lighter boiling component, Pisat is the saturation pressure of species i = 1, 2, and P is the pressure of the column. The saturation pressures (in mm Hg) are correlated using the Antoine equation,log10 Pa = A - psat Bi Tn + Ci

where Tn is the temperature of stage n in centigrade Ai, Bi, and Ci are the Antoine coefficients for species i.

In mass and energy balances, you learned how to make a graphical solution to this problem using the McCabe–Thiele method on an x–y phase diagram for the lighter boiling component. In this problem, you will figure out how to make this solution numerically without creating the phase diagram in advance. As an added bonus, the numerical solution will also furnish the temperature of each equilibrium stage. To help guide your solution to the problem, there are several subtasks to complete prior to making the full calculation.

For this problem, we will consider the rectification of benzene and toluene at atmospheric pressure. The Antoine coefficients are given in the table below.Benzene Toluene A 6.905 65 6.954 64 B 1211.033 1344.800 C 220.790 219.480

We will consider a rectifying column that produces a distllate of 99.95% pure benzene using a reflux ratio RD = 1.95. The column contains 15 stages.

(a) Recast the problem into a pair of coupled nonlinear equations that you can use to compute xn and Tn for given values of yn and P.

(b) Determine the Jacobian for this 2 × 2 system.

(c) Write a MATLAB function called computeJ that computes the elements of the Jacobian. Confirm that this function produces the correct output for the values Tn = 90°C and xn = 0.7 if you input yn = 0.7. Report the Jacobian matrix for these values in your written submission. Save the function as an m-file in your working directory for use in later programs.

(d) Write a MATLAB function called computeR that computes the elements of the residual. Confirm that this function produces the correct output for the values Tn = 90°C and xn = 0.7 if you input yn = 0.7. Report the residual vector for these values. Save the function as an m-file in your working directory for use in later programs.

(e) Write a MATLAB function called NewtonRaphson that performs the Newton– Raphson method to solve your linear system. This function should call computeJ and computeR. Use the norm of δ for convergence and stop the iterations when this is less than 10−4. You are allowed to use a built-in MATLAB function to do the matrix inversion. Test your solution when yn = 0.7 using an initial guess of Tn = 90°C and xn = 0.7. Report the values of Tn and xn produced by your program. Also confirm, by hand, that these values are the correct solution to the nonlinear equations. Save the function as an m-file in your working directory for use in later programs.

(f) Write a MATLAB function called rectification that executes a zero-order continuation method to determine the values of xn, yn, and Tn for each stage of the column. The function should call NewtonRaphson for the equilibrium calculation. The output of the function should be an N × 3 matrix with the values of xn in the first column, yn in the second column, and Tn in the third column. Your function should also plot each variable versus the stage number n.

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: