# We Helped With This Engineering Homework: Have A Similar One?

SOLVED
Category Engineering Other College Solved Engineering Homework Help

## Short Assignment Requirements

This is an assignment on chemical engineering thermodynamics problem. For each part ,it implements different method to solve problems. The species used and the related values can be found in VaporPressure file.

## Assignment Description

The equations resulting from the mass balances, component balances, and thermodynamic relations (respectively) on an ideal flash tank separator are:

In general, this is a set of 20 equations in 25 unknowns. You would pick F and all four z variables, so they are parameters, but you lose one equation that way (the z variables sum to 1.) Also, the component balances aren’t independent of the overall balance, so that gets rid of one more equation. That means you need to pick two variable values to solve the system exactly (2 DoF). You will test your code on a mixture consisting of 4 of the following species: ethane, propylene, vinyl chloride monomer, isobutane, 1-butene, normal butane, and cis-2-butene. The species assigned(A,C,D,F) can be found in a separate pdf called “VaporPressure”.

A.                For your set of four species, write a function / subroutine in Matlab called “flash3.m” which finds the properties of the outlet streams of your flash using the feed component molar flow rates zF = F*[z1 z2 z3 z4]T, the temperature in the flash T, and the pressure in the flash P. The syntax for using it should be “[x y V L] = flash3(zF, T, P)”. Write it such that it uses the RachfordRice equation to find V, L, x, and y. Your code should call your “Psat#.m” scripts from above. The x, y, and zF should be 4-element COLUMN vectors. The code should give error messages (NOT MATLAB ERRORS) if the inputs are invalid. It only needs to work between the bubble point temperature/pressure and the dew point temperature/pressure of your mixture; see equations (4-12) through (4-15) on p. 149 of Seader and Henley (3rd edition) to find equations to calculate those temperatures/pressures. If the input temperature is too low (no vapor because you’re below the bubble point) or too high (no liquid because you’re above the dew point), your code should give an appropriate error message as text output. Same for pressure; the program should give an error if there can’t be two phases at those conditions. Your code should include comments for each step.

B.                 For your set of four species, write a function / subroutine in Matlab called “flash4.m” which finds the properties of the outlet streams using the feed component molar flow rates zF, the temperature in the flash T, and the desired flow rate of liquid L. The syntax for using it should be “[x y V P] = flash4(zF, T, L)”. Write it such that it uses Newton’s method for solving systems of non-linear equations to solve the problem. You can reduce the number of equations in any manner you like, but solving fewer equations may not make the algorithm converge faster. Again, it only needs to work between the bubble point and the dew point of your mixture and you should give proper errors if the inputs are invalid.

C.                 For your set of four species, write a function / subroutine in Matlab called “flash5.m” which finds the properties of the outlet streams using the feed component molar flow rates zF, the temperature in the flash T, and the desired mole fraction in the vapor of species 1, y1 (the lowest boiling one, called the “light key”). The syntax for using it should be “[x y2 y3 y4 V L P] = flash5(zF, T, y1)” where all the yi are scalars for any i = 1,2,3,4. Your algorithm should use the method of steepest descent. You can use another method for 1-3 iterations to find a “good” starting point for steepest descent, if you wish.

D.                (5 points) Write a script called “XXXflash.m” (where XXX are your initials) which incorporates flash3, flash4, and flash5 together so that the user can enter in zF, T, and any of {P, V, y1} and the algorithm will either solve the problem or give an appropriate error message. The syntax for using it should be “[x y V L P] = XXXflash(zF, T, P, L, y1)”. The code should first check if the zF and T are valid; if they are, it should then check if P is between the bubble and dew points for the input zF and T. If P is valid, it should use flash3 to find the outputs; if P is invalid, it should then check if L is in (0,F]. It should use L and flash4 if it is, ignoring P and y1. If both L and P are invalid, it should use y1 and flash5. It should give an error message if all the inputs are invalid, i.e. L is not in (0,F), P is invalid, and y1 is not in (0,1).

## Assignment Description

Your assignment is to write a “flash tank” unit operation (or just a “flash”) algorithm. A flash is a chemical process unit which separates a feed mixture of chemicals (which is at its boiling point after it is pushed through a valve) into a vapor stream and a liquid stream of different compositions. A picture of one looks like this:

You collected the vapor pressure data below (in bar) from the literature (Perry’s Handbook):

For your set of four species (A, C, D, F), fit the vapor pressure data above using a method of your choice. You must derive and give explicitly an expression for the vapor pressures as a function of temperature T for each component. All these expressions should be given somewhere in the comments of your code. You should write four *.m scripts called “Psat1.m”, “Psat2.m”, etc. The syntax for using them as functions should be “[VaporPressure] = Psat#(T)” with T in K. The output should give the vapor pressure in bars. Each of your scripts only need to work between 170 K and the highest critical temperature of your four species; outside that range the mixture is either all liquid or all vapor. It should produce a value of NaN if the input is not in the valid range (NaN is a Matlab number type, not a string, which means “Not a Number”.) Your scripts should be EVALUATING your method/expression at the input temperature, not CONSTRUCTING it; this may mean you have to write a script to create your method/expression, and then use that script’s results to create the Psat scripts.

Is it free to get my assignment evaluated?

Yes. No hidden fees. You pay for the solution only, and all the explanations about how to run it are included in the price. It takes up to 24 hours to get a quote from an expert. In some cases, we can help you faster if an expert is available, but you should always order in advance to avoid the risks. You can place a new order here.

How much does it cost?

The cost depends on many factors: how far away the deadline is, how hard/big the task is, if it is code only or a report, etc. We try to give rough estimates here, but it is just for orientation (in USD):

 Regular homework \$20 - \$150 Advanced homework \$100 - \$300 Group project or a report \$200 - \$500 Mid-term or final project \$200 - \$800 Live exam help \$100 - \$300 Full thesis \$1000 - \$3000

How do I pay?

Credit card or PayPal. You don't need to create/have a Payal account in order to pay by a credit card. Paypal offers you "buyer's protection" in case of any issues.

Why do I need to pay in advance?

We have no way to request money after we send you the solution. PayPal works as a middleman, which protects you in case of any disputes, so you should feel safe paying using PayPal.

Do you do essays?

No, unless it is a data analysis essay or report. This is because essays are very personal and it is easy to see when they are written by another person. This is not the case with math and programming.

Why there are no discounts?

It is because we don't want to lie - in such services no discount can be set in advance because we set the price knowing that there is a discount. For example, if we wanted to ask for \$100, we could tell that the price is \$200 and because you are special, we can do a 50% discount. It is the way all scam websites operate. We set honest prices instead, so there is no need for fake discounts.

Do you do live tutoring?

No, it is simply not how we operate. How often do you meet a great programmer who is also a great speaker? Rarely. It is why we encourage our experts to write down explanations instead of having a live call. It is often enough to get you started - analyzing and running the solutions is a big part of learning.

What happens if I am not satisfied with the solution?

Another expert will review the task, and if your claim is reasonable - we refund the payment and often block the freelancer from our platform. Because we are so harsh with our experts - the ones working with us are very trustworthy to deliver high-quality assignment solutions on time.

Customer Feedback

"Thanks for explanations after the assignment was already completed... Emily is such a nice tutor! "

Order #13073

Find Us On