Thinking back to high school or first year chemistry, you may recall how to calculate mole fractions. For example, if you have 1 kmol
Thinking back to high school or first year chemistry, you may recall how to calculate mole fractions. For example, if you have 1 kmol of two liquid species (A and B), in total you have 2 kmol, and the mole fraction is 0.5 for species A and is 0.5 for species B. Fun! The above statement would also have been true if the two species were entirely in the vapour or solid phase. However, these mole balances, common in courses like ChE 2D04, or even Chem 1A03, are only straightforward because you account for all moles in all phases simultaneously (or everything in one phase). Things become increasingly complicated when the species are in equilibrium between two or more phases. In this case, we have a mixture of two components as a liquid/vapour mixture, which begs the question: How do you know how much of each component exists in each phase? This question is basically the cornerstone of VLE and solution thermodynamics, with many applications in the industry, particularly for distillation, separations, and the production of alloys. A Brief History Lesson Long story short, the key to knowing how much of each component in each of one or several liquid or gaseous phases is to express each component's Gibbs Free Energy (GFE). All components will have a GFE in each phase, and since (as mentioned in undergraduate chemistry classes) GFE is a measure of a chemical's deviation from its resting state, determining the natural states of each component can be achieved by minimizing the GFE of a given system at some temperature and pressure. Honestly, it is not all that bad. ONE PROBLEM, though... This problem needed to be solved way back in the early 1900s. At that time, optimization was understood in concept, but literally impossible to solve for any reasonably sized problem. Turns out finding the "best" solution to a problem with > O DOF (the basis of all optimization) is pretty much impossible without iteration. Since Alan Turing would not lay the groundwork for digital computers for another 40 years or so, it fell to Gilbert Lewis to try another path in which he tried to "balance" the interactions between the liquid and vapour phases using experimental data. This turned out to be the harbinger of doom throughout all undergraduate chemical engineering curricula to this day: fugacity. Fugacity is something that can be computed via an equation of state (EOS), such as the ideal gas law or any number of exceedingly complicated (but circumstantially more accurate) equations based off of a hundred years of experimental data and some poor grad student fitting coefficients in an MIT basement for their entire PhD. Fun! Fugacity acts as an effective partial pressure, thus having units of pressure (bars in our case). It represents the behaviour of non-ideal gasses and is used extensively in thermodynamics and chemical equilibrium problems. Once you have it, you can exploit some nifty relationships to generate an equation system with 0 DOF and solve it using any numerical method of your choosing! Now, it is certainly NOT the purpose of this assignment to master fugacity, but what we CAN say for sure is that Gilbert Lewis' idea was quite clever: Take an optimization and approximate it as a system of nonlinear equations with 0 DOF instead! Since nonlinear equation systems were much better understood back in the 1900s, this led to a very effective method to predict phase equilibria and opened a field of applied chemistry and thermodynamic modeling that, about 120 years and trillions of dollars in economic impacts later, is still used to this very day. One day you may thank me for the history lesson. Today is probably not that day. Whatever. ChE 2E04 Mastery Problem 2.1 - 2022 Back to the Problem Page 2 OK, so our objective is to identify what pressure is required for the liquid phase of a water/chloroform mixture to be 85% water. To answer this question, consider the DeLannoy-Adams-Nease-Khan (DANK) EOS. There are many EOSS that are applicable depending on the components involved, but we will assume DANK is appropriate for this system. The DANK EOS will be used to model and compute both the liquid and vapour fugacity at 50C (and ONLY 50C). To solve the system, we want the fugacities in each phase to be equal to each other. The corresponding equations for the fugacity coefficients, , which are used to connect fugacity to pressure and mole fractions, can be derived. The fugacity coefficients for liquid water (), liquid chloroform (), vapour water (), and vapour chloroform () are: Equation O equation (1) = equation (2) fw = 0w xwP f = 0xcP fw = wywP f = yP fe = fe f = fw = 0.2494P 1.1547P + 1.7371 0 = -25.746P +90.776P-171.14P + 183.77 + Xc = 0.498P -3.27P + 6.54 0 = -12.786P + 103.342P - 309.147P + 282.974 After completing your thermodynamics and process simulation classes you will feel comfortable collecting the independent balances that represent this system, but for now these equations are provided in the table below, which also tracks the variables and DOF of the system as more equations are added. Remember that once we obtain a system with 0 DOF, we can solve it as a system of equations. Table 1. DOF for the vapour-liquid equilibrium of water and chloroform New Variables , P O equation (3) equation (4) cixc fwr xw f Ow: fwr yw Defe. Yc Total Variables Total Equations 1 246 4 7 10 13 13 13 13 13 568493546 10 DOF - N 336 in 4 m 1 2 5 7 5 (1) 3 (3) (4) P is the pressure of the system in bars. . . Xw = 0.85 yw + y = 1 Xw + Xc = 1 . That probably seems like a lot, but it is likely that if you actually inspect the equations closely you will recognize a lot of them. Either way, the variables in our system are described as follows: 13 13 13 11 12 13 123 2 1 0 is the fugacity coefficient of species i in the liquid phase. is the fugacity coefficient of species i in the vapour phase. fi is the fugacity of species i in the liquid phase (and must equal its vapour counterpart). fi is the fugacity of species i in the vapour phase (and must equal its liquid counterpart). x is the mole fraction of species i in the liquid phase. y, is the mole fraction of species i in the vapour phase. This system of equations can be used to determine the vapour and liquid phase concentrations of a water/chloroform mixture at 50C. Moreover, as long as the fugacity equations are consistent (which can be validated against experimental data), this system can be used to generate a binary phase diagram of the water/chloroform system. Phase diagrams are very common in Chemical and Materials Engineering. A binary phase diagram is a way to describe the mole fractions of two species in two different phases as a function of pressure (at constant temperature) or temperature (at constant pressure). Consider the diagram to the right as an example, which is for a mixture of ethanol and water at room temperature. Note here that the x-axis x(1) / y(1) is not a division, but rather is indicating that the blue line is the liquid mole fraction of component 1 [x(1)] and the red line is the vapour mole fraction of component 1 [y(1)]. Objectives Using the information presented as above, you are to: P (bar) 1.7 16 1.4 1.3 1 09 0.8 0.7 0 0.2 0.6 (1)/y(1) 0.8 1. Set the fugacity balances up for the water/chloroform system so they can be solved using fsolve. 2. Use the MATLAB function fsolve to determine the system pressure that will achieve a particular mole fraction of water in the liquid phase at 50C. 3. Modify your function to solve for the mole fractions of both components in both phases at a given pressure and at 50C. 4. Use the fugacity equations to generate a phase diagram of the water/chloroform system. Deliverables You are to submit a code package containing a driver code and any functions solved using fsolve. The driver file must perform the following once the "play" button is pressed: 1. Print out the system pressure and mole fractions of both components in both phases if the mole fraction of water in the liquid phase (x) is known to be 0.85. 2. Print out the system pressure and mole fractions of both components in both phases if the pressure of the system (P) is known to be 1.6 bar. DO NOT assume x is 0.85... Because it's not. 3. By cycling through known values of xw from 0 to 1, solve the system for the mole fractions of both components in both phases and the system pressure. Using these results, generate a binary phase diagram where the liquid and vapour mole fractions of water (x, and yw) are on the x-axis and P is on the y-axis. For this deliverable and only this deliverable, you are to assume that the ideal gas law applies, which means equations (3) and (4) are replaced with 0 = 1 and 0 = 1, respectively. In your cover letter, discuss your solution method and how you set the equations up for use in fsolve. Discuss your general strategy for developing the phase diagram and how you would explain the results to a colleague. Advice You are strongly suggested to use fsolve with 13 unknowns and 13 equations. Remember that known information like xw = 0.85 can be treated like an equation rather than a constant. It would be something like 0 = 0.85 - xw. Once you get your first deliverable to work, the others can use the same equation system with only slight modifications to the known information (but using the same set of variables). To make the phase diagram, you only need to "remember" xw, yw, and P for each time you solve the system. You can do it in a single loop that calls fsolve repeatedly. And, as always, be sure to exploit TA and instructor office hours to help you on your way ( ) .
Step by Step Solution
3.58 Rating (172 Votes )
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started