Create a MATLAB program to solve the bubble point temperature and plot the T-x-y diagram of the acetone(1)-1-hexene(2) system at 101.33 kPa.
T in K
ln(Psat(kPa))=A-B/(T+C)
A1=14.3145;
B1=2756.22;
C1=-45.09;
log(Psat(bar)=A-B/(T+C)
A2=3.99063;
B2=1152.971;
C2=-47.301;
x1 = [0 0.06 0.116 0.184 0.287 0.387 0.497 0.593 0.605 0.698 0.805 0.908 1]
clc
clear all
A1=14.3145;
B1=2756.22;
C1=-45.09;
A2=3.99063;
B2=1152.971;
C2=-47.301;
P=101.33 %system at 101.33 kPa
P1=P*0.01 %1 kPa to bar = 0.01 bar.
T1_sat=(B1/(A1-log(P)))-C1 % calculate sarurute temperature
component 1
T2_sat=(B2/(A2-log(P1)))-C2 % calculate sarurute temperature
component 1
x1 = [0 0.06 0.116 0.184 0.287 0.387 0.497 0.593 0.605 0.698 0.805
0.908 1]; % component1 compistion;
L=length(x1) %no of point of X;
T=linspace(T2_sat,T1_sat,L);
Psat1=exp(A1-B1./(T+C1)); % calclutaion of saturation
y1=x1.*Psat1/P; % Roults law
plot(x1,T,'-o',y1,T,'-*');%plotting
xlim([0 1]);
title('Bubble point calculation');
xlabel('x1,y1');
ylabel('T, temperarure ');
legend('T-x1 ','T-y1')
legend('T-x1 ','T-y1')
Create a MATLAB program to solve the bubble point temperature and plot the T-x-y diagram of...