Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assignment 3 Non-Linear Systems-Multicomponent flash Due: Sep 27, 2017 4:00pm 1.

ID: 3889632 • Letter: A

Question

Assignment 3 Non-Linear Systems-Multicomponent flash Due: Sep 27, 2017 4:00pm 1. Multicomponent flash Develop the MATLAB codes to analyze problems of multicomponent flash separation. Consider a feed consisting of propane, n-butane and n-pentane with a composition of Z- [0.3,0.3,0.4] Use the equilibrium data from Holland (1963) in the form, =ya,Tj-1 where the coefficients are given yi-T.N (KM)(13) below, where T is in deg R. (a). The feed is flashed at a temperature and pressure of T = 750R , P= 400psia. Determine the vapor fractions y, and the compositions in liquid and vapor phases. Note that the liquid and vapor compositions are given by I..N Note that the flash equation is given by in which either or T can be considered as unknown. Use fsolve to solve the problem. Include a listing of all the m-files that you write to complete this problem Component ail ai2 413 ai4 2.7980091E-1 1.1811943E-3 1.0935041E-6 0.35180421E-9 -2.3203 344 E-| | 0.83753226E-3 |-0.6 1774360E-6 | 0.15243376E-9 0.37103008E-1 -0.36257004E-30.99113800E-6 -0.54441110E-9 Propane n-butane n-pentane (b) (c) (d) (e) What should be the temperature in order to get 50% of the feed into vapor What would be the bubble point temperature (when = 0) of this mixture? what would be the dew point temperature (when = 1 ) of this mixture? What is the boiling point of n-pentane? [Hint: Try a pure component feed]

Explanation / Answer

Answer: See the code below:

--------------------------------------------------

#Given

#Feed composition consisting of propane, n-butane and n-pentane
Zi = [0.3 0.3 0.4];

#Coefficients for equilibrium data
ai1 = [-2.7980091E-1 -2.3203344E-1 0.37103008E-1];
ai2 = [1.1811943E-3 0.83753226E-3 -0.36257004E-3];
ai3 = [-1.0935041E-6 -0.61774360E-6 0.99113800E-6];
ai4 = [0.35180421E-9 0.15243376E-9 -0.54441110E-9];

ai = [ai1 ai2 ai3 ai4];

#Temperature
T = 750 #in deg R

#Pressure
P = 400 #in psia

#function for flash equation
function F = flashEquation(Ki, T, Zi, Si, N)
F = [];
for i=1:N
    F = F+ (((1-Ki(i)*T)*Zi(i))/(((Ki(i)*T)-1)*Si+1));
end
return F;
end

#function to calculate vapor composition
function yi = vaporComposition(Ki,xi)
yi = Ki.*xi;
end

#function to calculate liquid composition
function xi = liquidComposition(Zi, Si, Ki)
xi = Zi./(1+Si.*(Ki-1));
end

#function to calculate Ki as per equilibrium data
function Ki = calculateKi(ai, T, N)
Ki =[];
Sum = [];
for j = 1:N
    Sum[j] = sum((ai(j).*T^(j-1)));
end
Ki = T.*(Sum.^3);
end

--------------------------------------------