Question: 3.31 This problem involves computing the liquid-vapor Pxy diagram from the two parameter Margulies model. In this model, the activity coefficients are given by ln1=1x22+1x23


3.31 This problem involves computing the liquid-vapor Pxy diagram from the two parameter Margulies model. In this model, the activity coefficients are given by ln1=1x22+1x23 and ln2=2x12+2x13 The parameters and are already in dimensionless form in units of RT and are restricted to have the values i=A+3(1)i+1B and i=4(1)iB For this problem, we will use A=1 and B=0.3. This is sufficiently non-ideal to exhibit an azeotrope but not so bad that you will also get liquid-liquid phase separation. Recall from thermodynamics that the equilibrium is given by x11P1sat=y1P and x22P2sat=y2P where we have assumed an ideal vapor phase. For this problem, let's assume the saturation pressures are P1sat=1100mmHg and P2sat=800mmHg. The ultimate goal is to plot the Pxy diagram, but we are going to lead you through the problem in steps to make it easier. (b) Write a MATLAB program that implements Newton-Raphson to compute the equilibrium compositions. It is easiest to do this with four unknowns x=12x1y1 to avoid having to take very complicated derivatives. What is the residual vector and Jacobian needed for Newton-Raphson? Show that your answer from part (a) gives a very small value of R and compute the condition number of the Jacobian with the answer from part (a) using MATLAB's function cond. What does this mean for implementing Newton-Raphson? You do not need to execute the while loop here if you can answer the previous question without an "experiment" - you can make it not execute by giving it a very loose tolerance value. (c) Now write a MATLAB program that uses the results so far to make the Pxy diagram. You already have a big hint; the azeotrope is a turning point so you will need to make the diagram in two pieces, one before the turning point and one after. Your program should produce the Pxy diagram
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
