Answer in matlab code please and P to return the mole fractions of vapor and liq
ID: 1842452 • Letter: A
Question
Answer in matlab code please and P to return the mole fractions of vapor and liquid generated by a binary mixture. To complete a binary flash calculation, a material balance can be performed to calculate the fraction of vapor generated (v/F) by specifying the feed mole fraction of the more-volatile species. Modify the vLE function given in class so that it takes the additional argument z (the mole fraction of the more-volatile species) and returns an additional variable, V/F. Using this function, a) Calculate the fraction of vapor generated from a flash of a mixture containing 50 mol% n-butane and 50 mo19% n-hexane at 40 eCand 1.5 bar. b) By trial and error using your function, find the temperature needed to generate v/F o 8 from a feed containing zou 0.5 at 1.5 bar n-butane 6.80896 935.860 238.730 n-hexane_ 6.87024 1168.720 224.210Explanation / Answer
Applying species balance on more volitile we get:
zF=xL+yV
y=-x(L/V)+z(F/V)
Also: L=F-V
so we get V/F=(z-x)/(y-x)
The matlab code is as follows:
function[x,y,VF]=Bincomp(AntC1,AntC2,P,T,z)
Pvap1=10^(AntC1(1)-AntC1(2)/(AntC1(3)+T));
Pvap2=10^(AntC2(1)-AntC2(2)/(AntC2(3)+T));
x=(P-Pvap2)/(Pvap1-Pvap2);
y=x*Pvap1/P;
VF=(z-x)/(y-x);
end
Part a
Using following inputs:
z=0.5, T=40, P=1.5*750.062
result:
x=0.3318
y=0.8339
V/F=0.335
(b) using trial and error we get T=58.4C