Write a Matlab code that will determine and plot the vapor-liquid equilibrium (VLE) curve for a given binary mixture.
Step 1: Write 2 separate functions that will accept 4 inputs (a, b, c, and T) and (a’, b’, c’, and T) to determine the vapor pressure using the Antoine equation for 2 different compounds (A and B). The general convention is to have A be the more volatile compound (i.e. lower boiling point). The first function will accept inputs to output the vapor pressure in units of kPa with T in Kelvins.
π ππππ£ππ = π − π − π
The 2nd function will accept inputs to output the vapor pressure in units of bar with T in Kelvins. Multiply by 100 to output in kPa.
Write a script:
π′πππππ£ππ = π′ − π + π′
Step 1: Request input (a, b, c, and T) and the total pressure (101 kpa) for each compound from the user and determine whether the inputs use the 1st or 2nd Antoine equation. Use prompt statements for the inputs and also to choose the function to be used.
Step 2: Determine and store the vapor pressure of A and B using the appropriate Antoine equation for a range of temperatures. Use temperature values from 1 to 500 kelvin
Step 3: Determine and store the resulting liquid mole fractions of A, xA. This is an array.
ππ£ππ,π΄π₯π΄ + ππ£ππ,π΅ (1 − π₯π΄) = π
You will need to solve for xA for your code.
Step 4: Calculate the gas mole fractions of A via
π¦π΄ = ππ£ππ,π΄π₯π΄ π
This is the corresponding array for xA.
Step 5: Plot yA vs xA along with a 45ο° line (i.e. y = x line). Note: Both yA and xA are bound between 0 and 1, so limit your plots to only show the relevant values.
Data:
Use the 1st Antoine Equation for the following inputs:
A: Isopropanol (BP = 82.6ο°C): a = 15.65, b = 3109, c = 73.55 B: N-propanol (BP = 97ο°C): a = 15.22, b = 3008, c = 86.49
Use the 2nd Antoine Equation for the following inputs:
B: n-heptane (BP = 98.42ο°C): a’ = 4.02832, b’ = 1268.636, c’ = -56.199
Step 6: The solution to a flash distillation column is given by a mole balance around species A:
πΉπ₯πΉ = ππ¦ + (πΉ − π)π₯
Where F is the feed rate in kg-mol, xF is the feed liquid mole fraction of A, V is the exiting vapor flow rate, y is the gas mole fraction exiting, and x is the liquid mole fraction exiting.
Given the following values, determine the equilibrium compositions (x and y) of the exiting vapor and liquid streams with your equilibrium curve. The equilibrium compositions are determined by the intersection of the mole balance and the equilibrium curve.
Solve the problem in an m-file using your functions and graphing the equilibrium and mole balance on a single plot to determine the equilibrium compositions.
V = 40 kg mol F = 100 kg mol xF = 0.6
Repeat the problem for the 2 different mixtures (Isopropanol/n-propanol and n-pentane/n-heptane)
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme