summaryrefslogtreecommitdiff
path: root/611/CH12
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /611/CH12
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '611/CH12')
-rwxr-xr-x611/CH12/EX12.1/Chap12_Ex1_R1.sce64
-rwxr-xr-x611/CH12/EX12.1/Plot_12_1.jpegbin0 -> 39832 bytes
-rwxr-xr-x611/CH12/EX12.2/Chap12_Ex2_R1.sce82
-rwxr-xr-x611/CH12/EX12.2/Plot12_2.jpgbin0 -> 33586 bytes
-rwxr-xr-x611/CH12/EX12.3/Chap12_Ex3.sce49
-rwxr-xr-x611/CH12/EX12.4/Chap12_Ex4.sce48
-rwxr-xr-x611/CH12/EX12.5/Chap12_Ex5_R1.sce50
-rwxr-xr-x611/CH12/EX12.6/Chap12_Ex6.sce38
-rwxr-xr-x611/CH12/EX12.7/Chap12_Ex7_R1.sce38
-rwxr-xr-x611/CH12/EX12.8/Chap12_Ex8.sce56
-rwxr-xr-x611/CH12/EX12.8/lngamma1_gamma2_vs_x1.jpgbin0 -> 43608 bytes
-rwxr-xr-x611/CH12/EX12.9/Chap12_Ex9_R1.sce86
-rwxr-xr-x611/CH12/EX12.9/txy_diagram.jpegbin0 -> 57085 bytes
13 files changed, 511 insertions, 0 deletions
diff --git a/611/CH12/EX12.1/Chap12_Ex1_R1.sce b/611/CH12/EX12.1/Chap12_Ex1_R1.sce
new file mode 100755
index 000000000..deb490c98
--- /dev/null
+++ b/611/CH12/EX12.1/Chap12_Ex1_R1.sce
@@ -0,0 +1,64 @@
+// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India.
+
+//Chapter-12,Example 1,Page 423
+//Title: Margules parameters
+//================================================================================================================
+clear
+clc
+
+//INPUT
+//For convenience Benzene is taken as 1 and heptane is taken as 2
+T=60;//temperature of the system in degree celsius
+P=[237.60;265.20;317.50;333.00;368.70;387.20];//Pressure data in Torr (from Danneil et al.)
+x1=[0.0870;0.1800;0.4040;0.4790;0.7130;0.9070];//mole fraction of benzene in the liquid phase corresponding to the given pressure (no unit) (from Danneil et al.)
+y1=[0.1870;0.3400;0.5780;0.6420;0.7960;0.9220];//mole fraction of benzene in the vapour phase corresponding to the given pressure (no unit) (from Danneil et al.)
+antoine_const_benzene=[6.87987;1196.760;219.161];//Antoine's constants for Benzene from Table A.7
+antoine_const_heptane=[6.89386;1264.370;216.640];//Antoine's constants for heptane from Table A.7
+
+//CALCULATION
+//The form of the Antoine's equation used is logP=A-(B/(t+C)), where P is in Torr and t is in degree celsius
+P1_s=10^(antoine_const_benzene(1,:)-(antoine_const_benzene(2,:)/(T+antoine_const_benzene(3,:))));//calculation of saturation pressure of benzene at T in Torr
+P2_s=10^(antoine_const_heptane(1,:)-(antoine_const_heptane(2,:)/(T+antoine_const_heptane(3,:))));//calculation of saturation pressure of heptane at T in Torr
+l=length(P);//iteration parameter
+i=1;//iteration parameter
+while i<l|i==l
+ gaamma1(i)=(y1(i,:)*P(i,:))/(x1(i,:)*P1_s);//calculation of activity coefficient using the data points (no unit)
+ gaamma2(i)=((1-y1(i,:))*P(i,:))/((1-x1(i,:))*P2_s);//calculation of activity coefficient using the data points (no unit)
+ ln_gaamma1_expt(i)=log(gaamma1(i));
+ ln_gaamma2_expt(i)=log(gaamma2(i));
+ gE_RTx1x2(i)=((x1(i,:)*ln_gaamma1_expt(i))+((1-x1(i,:))*ln_gaamma2_expt(i)))/(x1(i,:)*(1-x1(i,:)));//calculation of gE/RT using Eq.(11.36) (no unit)
+ i=i+1;
+end
+plot(x1,gE_RTx1x2,'o');//Plot of gE/RTx1x2 vs x1 to determine A12 and A21
+ xtitle('Plot of gE/RTx1x2 vs x1','x1','gE/RTx1x2');
+//The three suffix Margules equation is given by gE/RTx1x2=(A21*x1)+(A12*x2), upon plotting gE/RTx1x2 vs x1 , the values of A12 and A21 were found (corresponding to x1=0 and x1=1.0. At x1=0, we get the value of A12 and at x1=1.0 i.e. x2=0, we get A21)
+A21=0.555;//value of A21 obtained from the plot of gE/RTx1x2 vs x1 (no unit)
+A12=0.315;//value of A12 obtained from the plot of gE/RTx1x2 vs x1 (no unit)
+//From the Margules equations (Eq. 11.79 and 11.80), the activity coefficients, Pressure and the mole fraction of benzene in the vapour phase in the vapour phase are recalculated using the experimental values of the mole fraction of benzene in the liquid phase (x1)repoerted earlier and the Margules paramters found above.
+j=1;//iteration parameter
+while j<l|j==l
+ ln_gaamma1(j)=((1-x1(j,:))^2)*(A12+(2*(A21-A12)*x1(j,:)));//calculation of ln(activity coefficient) (no unit)
+ ln_gaamma2(j)=(x1(j,:)^2)*(A21+(2*(A12-A21)*(1-x1(j,:))));//calculation of ln(activity coefficient) (no unit)
+ gaamma1(j)=exp(ln_gaamma1(j));//calculation of the activity coefficient (no unit)
+ gaamma2(j)=exp(ln_gaamma2(j));//calculation of the activity coefficient (no unit)
+ P_calc(j)=(gaamma1(j)*x1(j,:)*P1_s)+(gaamma2(j)*(1-x1(j,:))*P2_s);//pressure recalculated in Torr
+ y1_calc(j)=(gaamma1(j)*x1(j,:)*P1_s)/P(j);//recalculation of mole fraction of benzene in vapour phase (no unit)
+ j=j+1;
+end
+
+//OUTPUT
+mprintf('Data for the plot of gE/RTx1x2 vs x1: \n\n');
+i=1;
+for i=1:l
+ mprintf('P=%f Torr\t x1=%f\t y1=%f \t ln(gamma1)=%f\t\t ln(gamma2)=%f\t\t gE/RTx1x2=%f\n\n',P(i),x1(i),y1(i),ln_gaamma1_expt(i),ln_gaamma2_expt(i),gE_RTx1x2(i));
+end
+mprintf('Results: \n\n');
+i=1;
+for i=1:l
+ mprintf('x1=%f \t gamma1=%f \t gamma2=%f \t P_Exptl.=%f Torr\t P_Calc=%f Torr\t y1_Exptl=%f \t y1_calc=%f \n\n',x1(i),gaamma1(i),gaamma2(i),P(i),P_calc(i),y1(i),y1_calc(i));
+end
+
+//===============================================END OF PROGRAM===================================================
+//DISCLAIMER:ONE OF THE VALUES OF y1(Exptl) GIVEN IN THE ANSWER HAS A TYPO ERROR. THE VALUE AS GIVEN IN THE QUESTION IS 0.7960,WHILE WHAT IS GIVEN IN THE ANSWER IS 0.7920 THIS HAS BEEN CORRECTED IN THIS CODE.
+
+
diff --git a/611/CH12/EX12.1/Plot_12_1.jpeg b/611/CH12/EX12.1/Plot_12_1.jpeg
new file mode 100755
index 000000000..c10e08793
--- /dev/null
+++ b/611/CH12/EX12.1/Plot_12_1.jpeg
Binary files differ
diff --git a/611/CH12/EX12.2/Chap12_Ex2_R1.sce b/611/CH12/EX12.2/Chap12_Ex2_R1.sce
new file mode 100755
index 000000000..e8a30bf67
--- /dev/null
+++ b/611/CH12/EX12.2/Chap12_Ex2_R1.sce
@@ -0,0 +1,82 @@
+// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India.
+
+//Chapter-12,Example 2,Page 427
+//Title: van Laar parameters and t-x-y data
+//================================================================================================================
+clear
+clc
+
+//INPUT
+//For convenience methanol is taken as 1 and nitromethane is taken as 2
+P=760;//pressure of the system in Torr
+t=[96.90;68.20;65.10;64.50];//temperature of the system in degree celsius (from Nakanishi et al.)
+x1=[0.0150;0.4260;0.7470;0.9140];//mole fraction of methanol in the liquid phase corresponding to the given temperature (no unit) (from Nakanishi et al.)
+y1=[0.1330;0.7470;0.8380;0.9210];//mole fraction of methanol in the vapour phase corresponding to the given temperature (no unit) (from Nakanishi et al.)
+antoine_const_methanol=[8.08097;1582.271;239.726];//Antoine's constants for methanol from Table A.7
+antoine_const_nmethane=[7.28166;1446.937;227.600];//Antoine's constants for nitromethane from Table A.7
+
+//CALCULATION
+//The form of the Antoine's equation used is logP=A-(B/(t+C)), where P is in Torr and t is in degree celsius
+l=length(t);//iteration parameter
+i=1;
+while i<l|i==l
+//calculation of saturation pressure of methanol at t in Torr
+P1_s(i)=10^(antoine_const_methanol(1,:)-(antoine_const_methanol(2,:)/(t(i,:)+antoine_const_methanol(3,:))));
+//calculation of saturation pressure of nitromethane at t in Torr
+P2_s(i)=10^(antoine_const_nmethane(1,:)-(antoine_const_nmethane(2,:)/(t(i,:)+antoine_const_nmethane(3,:))));
+gaamma1(i)=(y1(i,:)*P)/(x1(i,:)*P1_s(i));//calculation of activity coefficient using the data points (no unit)
+gaamma2(i)=((1-y1(i,:))*P)/((1-x1(i,:))*P2_s(i));//calculation of activity coefficient using the data points (no unit)
+ln_gaamma1(i)=log(gaamma1(i));//calculating the value of ln(activity coefficient) (no unit)
+ln_gaamma2(i)=log(gaamma2(i));//calculating the value of ln(activity coefficient) (no unit)
+gE_RT(i)=((x1(i,:)*ln_gaamma1(i))+((1-x1(i,:))*ln_gaamma2(i)));//calculation of gE/RT using Eq.(11.36) (no unit)
+x1x2_gE_RT(i)=(x1(i,:)*(1-x1(i,:)))/gE_RT(i);//function for plotting againt x1 to determine the van Laar paramters (no unit)
+i=i+1;
+end
+plot(x1,x1x2_gE_RT,'o');//Plot of RTx1x2/gE vs x1 to determine A and B
+ xtitle('Plot of RTx1x2/gE vs x1','x1','RTx1x2/gE');
+ //The values of the intercepts are read from Plot 12.2. From the intercepts ,the value of A and B are determined as given below
+intercept_A=0.6725;//value of 1/A at x1=0, read from the plot (no unit)
+intercept_B=0.710;//value of 1/B at x1=1.0, read from the plot (no unit)
+A=1/intercept_A;//calculation of A (no unit)
+B=1/intercept_B;//calculation of B (no unit)
+//From the van Laar equations and using the van Laar parameters determined above along with the reported values of the mole fraction of methanol in the liquid phase (x1), the activity coefficients and the mole fraction of methanol in the vapour phase (y1) are found out.
+j=1;//iteration parameter
+tol=1e-6;//tolerance limit for convergence of the system when using fsolve
+while j<l|j==l
+ ln_gaamma1_new(j)=A/(1+((A/B)*(x1(j,:)/(1-x1(j,:)))))^2;//calculation of ln(activity coefficient) (no unit)
+ ln_gaamma2_new(j)=B/(1+((B/A)*((1-x1(j,:))/x1(j,:))))^2;//calculation of ln(activity coefficient) (no unit)
+ gaamma1(j)=exp(ln_gaamma1_new(j));//calculation of the activity coefficient (no unit)
+ gaamma2(j)=exp(ln_gaamma2_new(j));//calculation of the activity coefficient (no unit)
+ tguess(j)=100;//taking a guess value for the temperature to be used in the fsolve function in degree celsius
+function[fn]=solver_func(ti)
+ fn=((gaamma1(j)*(x1(j,:)/P)*(10^(antoine_const_methanol(1,:)-(antoine_const_methanol(2,:)/(ti+antoine_const_methanol(3,:))))))+((gaamma2(j))*((1-x1(j,:))/P)*(10^(antoine_const_nmethane(1,:)-(antoine_const_nmethane(2,:)/(ti+antoine_const_nmethane(3,:)))))))-1.0;//Function defined for solving the system
+endfunction
+[t_calc(j)]=fsolve(tguess(j),solver_func,tol)//using inbuilt function fsolve for solving the system of equations
+j=j+1;
+end
+//Recalculation of the mole fraction of methanol in the vapour phase using the temperature recalculated above and the activity coefficients calculated above
+j=1;//iteration paramter
+while j<l|j==l
+//recalculation of saturation pressure of methanol at t in Torr
+P1_s_calc(j)=10^(antoine_const_methanol(1,:)-(antoine_const_methanol(2,:)/(t_calc(j,:)+antoine_const_methanol(3,:))));
+//recalculation of saturation pressure of nitromethane at t in Torr
+P2_s_calc(j)=10^(antoine_const_nmethane(1,:)-(antoine_const_nmethane(2,:)/(t_calc(j,:)+antoine_const_nmethane(3,:))));
+y1_calc(j)=(gaamma1(j)*x1(j,:)*P1_s_calc(j))/P;//recalculation of the mole fraction of methanol in vapour phase (no unit)
+j=j+1;
+end
+
+//OUTPUT
+mprintf('Data for the plot of RTx1x2/gE vs x1: \n\n');
+i=1;
+for i=1:l
+ mprintf('t=%f degree celsius\t P1_s=%f Torr \t P2_s=%f Torr \t x1=%f\t y1=%f \n ln(gamma1)=%f\t\t ln(gamma2)=%f\t\t RTx1x2/gE=%f\n\n',t(i),P1_s(i),P2_s(i),x1(i),y1(i),ln_gaamma1(i),ln_gaamma2(i),x1x2_gE_RT(i));
+end
+mprintf('Txy data recalculated: \n \n');
+i=1;
+for i=1:l
+ mprintf('x1=%f \n t_exptl=%f degree celsius \t t_calc=%f degree celsius \n y1_exptl=%f \t\t\t y1_calc=%f \n\n ',x1(i),t(i),t_calc(i),y1(i),y1_calc(i));
+end
+
+//===============================================END OF PROGRAM===================================================
+
+
diff --git a/611/CH12/EX12.2/Plot12_2.jpg b/611/CH12/EX12.2/Plot12_2.jpg
new file mode 100755
index 000000000..3d77c156d
--- /dev/null
+++ b/611/CH12/EX12.2/Plot12_2.jpg
Binary files differ
diff --git a/611/CH12/EX12.3/Chap12_Ex3.sce b/611/CH12/EX12.3/Chap12_Ex3.sce
new file mode 100755
index 000000000..074ef4db6
--- /dev/null
+++ b/611/CH12/EX12.3/Chap12_Ex3.sce
@@ -0,0 +1,49 @@
+// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India.
+
+//Chapter-12,Example 3,Page 430
+//Title: P-x-y data using the Margules parameters
+//================================================================================================================
+clear
+clc
+
+//INPUT
+//For convenience acetone is taken as 1 and cyclohexane is taken as 2
+T=25;//temperature of the system in degree celsius
+A12=2.0522;//three suffix Margules parameters for the system (no unit)
+A21=1.7201;//three suffix Margules parameters for the system (no unit)
+P=[118.05;207.70;246.35;259.40;261.50;262.00;261.90;258.70;252.00];//Pressure data in Torr (from Tasic et al.)
+//mole fraction of acetone in the liquid phase corresponding to the given pressure (no unit) (from Tasic et al.)
+x1=[0.0115;0.1125;0.3090;0.5760;0.6920;0.7390;0.7575;0.8605;0.9250];
+//mole fraction of acetone in the vapour phase corresponding to the given pressure (no unit) (from Tasic et al.)
+y1=[0.1810;0.5670;0.6550;0.7050;0.7250;0.7390;0.7460;0.8030;0.8580];
+antoine_const_acetone=[7.11714;1210.595;229.664];//Antoine's constants for acetone from Table A.7
+antoine_const_chexane=[6.85146;1206.470;223.136];//Antoine's constants for cyclohexane from Table A.7
+
+//CALCULATION
+//The form of the Antoine's equation used is logP=A-(B/(t+C)), where P is in Torr and t is in degree celsius
+P1_s=10^(antoine_const_acetone(1,:)-(antoine_const_acetone(2,:)/(T+antoine_const_acetone(3,:))));//calculation of saturation pressure of acetone at T in Torr
+//calculation of saturation pressure of cyclohexane at T in Torr
+P2_s=10^(antoine_const_chexane(1,:)-(antoine_const_chexane(2,:)/(T+antoine_const_chexane(3,:))));
+
+//From the Margules equations (Eq. 11.79 and 11.80), the activity coefficients are found out
+l=length(P);//iteration parameter
+j=1;//iteration parameter
+while j<l|j==l
+ ln_gaamma1(j)=((1-x1(j,:))^2)*(A12+(2*(A21-A12)*x1(j,:)));//calculation of ln(activity coefficient) (no unit)
+ ln_gaamma2(j)=(x1(j,:)^2)*(A21+(2*(A12-A21)*(1-x1(j,:))));//calculation of ln(activity coefficient) (no unit)
+ gaamma1(j)=exp(ln_gaamma1(j));//calculation of the activity coefficient (no unit)
+ gaamma2(j)=exp(ln_gaamma2(j));//calculation of the activity coefficient (no unit)
+ P(j)=(gaamma1(j)*x1(j,:)*P1_s)+(gaamma2(j)*(1-x1(j,:))*P2_s);//calculation of pressure in Torr
+ y1_calc(j)=(gaamma1(j)*x1(j,:)*P1_s)/P(j);//calculation of mole fraction of acetone in vapour phase (no unit)
+ j=j+1;
+end
+
+//OUTPUT
+mprintf('P-x-y data: \n\n');
+i=1;
+mprintf('x1 \t gamma1\t gamma2 \t P (Torr) \t y1 \n');
+for i=1:l
+ mprintf('%0.4f \t %f \t %f \t %f \t %f \n',x1(i),gaamma1(i),gaamma2(i),P(i),y1_calc(i));
+end
+
+//===============================================END OF PROGRAM===================================================
diff --git a/611/CH12/EX12.4/Chap12_Ex4.sce b/611/CH12/EX12.4/Chap12_Ex4.sce
new file mode 100755
index 000000000..190123036
--- /dev/null
+++ b/611/CH12/EX12.4/Chap12_Ex4.sce
@@ -0,0 +1,48 @@
+// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India.
+
+//Chapter-12,Example 4,Page 432
+//Title: P-x-y data using the van Laar model
+//================================================================================================================
+clear
+clc
+
+//INPUT
+//For convenience acetone is taken as 1 and cyclohexane is taken as 2
+T=25;//temperature of the system in degree celsius
+A=2.0684;//the van Laar parameters for the system (no unit)
+B=1.7174;//the van Laar parameters for the system (no unit)
+P=[118.05;207.70;246.35;259.40;261.50;262.00;261.90;258.70;252.00];//Pressure data in Torr (from Tasic et al.)
+//mole fraction of acetone in the liquid phase corresponding to the given pressure (no unit) (from Tasic et al.)
+x1=[0.0115;0.1125;0.3090;0.5760;0.6920;0.7390;0.7575;0.8605;0.9250];
+//mole fraction of acetone in the vapour phase corresponding to the given pressure (no unit) (from Tasic et al.)
+y1=[0.1810;0.5670;0.6550;0.7050;0.7250;0.7390;0.7460;0.8030;0.8580];
+antoine_const_acetone=[7.11714;1210.595;229.664];//Antoine's constants for acetone from Table A.7
+antoine_const_chexane=[6.85146;1206.470;223.136];//Antoine's constants for cyclohexane from Table A.7
+
+//CALCULATION
+//The form of the Antoine's equation used is logP=A-(B/(t+C)), where P is in Torr and t is in degree celsius
+P1_s=10^(antoine_const_acetone(1,:)-(antoine_const_acetone(2,:)/(T+antoine_const_acetone(3,:))));//calculation of saturation pressure of acetone at T in Torr
+//calculation of saturation pressure of cyclohexane at T in Torr
+P2_s=10^(antoine_const_chexane(1,:)-(antoine_const_chexane(2,:)/(T+antoine_const_chexane(3,:))));
+//From the van Laar equations(Eq. 11.82 and 11.83), the activity coefficients are found out
+l=length(P);//iteration parameter
+j=1;//iteration parameter
+while j<l|j==l
+ ln_gaamma1(j)=A/(1+((A*x1(j,:))/(B*(1-x1(j,:)))))^2;//calculation of ln(activity coefficient) (no unit)
+ ln_gaamma2(j)=B/(1+((B*(1-x1(j,:)))/(A*x1(j,:))))^2;//calculation of ln(activity coefficient) (no unit)
+ gaamma1(j)=exp(ln_gaamma1(j));//calculation of the activity coefficient (no unit)
+ gaamma2(j)=exp(ln_gaamma2(j));//calculation of the activity coefficient (no unit)
+ P(j)=(gaamma1(j)*x1(j,:)*P1_s)+(gaamma2(j)*(1-x1(j,:))*P2_s);//calculation of pressure in Torr
+ y1_calc(j)=(gaamma1(j)*x1(j,:)*P1_s)/P(j);//calculation of mole fraction of acetone in vapour phase (no unit)
+ j=j+1;
+end
+
+//OUTPUT
+mprintf('P-x-y data: \n\n');
+i=1;
+mprintf('x1 \t gamma1 \t gamma2 \t P(Torr) \t y1 \n');
+for i=1:l
+ mprintf('%0.4f \t %f \t %f \t %f \t %f \n',x1(i),gaamma1(i),gaamma2(i),P(i),y1_calc(i));
+end
+
+//===============================================END OF PROGRAM===================================================
diff --git a/611/CH12/EX12.5/Chap12_Ex5_R1.sce b/611/CH12/EX12.5/Chap12_Ex5_R1.sce
new file mode 100755
index 000000000..bbcd878e4
--- /dev/null
+++ b/611/CH12/EX12.5/Chap12_Ex5_R1.sce
@@ -0,0 +1,50 @@
+// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India.
+
+//Chapter-12,Example 5,Page 435
+//Title: VLE data using the van Laar model
+//================================================================================================================
+clear
+clc
+
+//INPUT
+//For convenience chloroform is taken as 1 and methanol is taken as 2
+P=760;//pressure in Torr at which chloroform and methanol form an azeotrope
+T=53.5;//temperature in degree celsius at which chloroform and methanol form an azeotrope
+x1=0.65;//mole fraction of chloroform in the liquid phase (no unit) (corresponding to azeotropic composition)
+antoine_const_chloroform=[6.95465;1170.966;226.232];//Antoine's constants for acetone from Table A.7
+antoine_const_methanol=[8.08097;1582.271;239.726];//Antoine's constants for acetone from Table A.7
+
+//CALCULATION
+//The form of the Antoine's equation used is logP=A-(B/(t+C)), where P is in Torr and t is in degree celsius
+x2=1-x1;//calculation of the mole fraction of methanol in the liquid phase (no unit) (corresponding to azeotropic composition)
+//calculation of saturation pressure of chloroform at T in Torr
+P1_s=10^(antoine_const_chloroform(1,:)-(antoine_const_chloroform(2,:)/(T+antoine_const_chloroform(3,:))));
+//calculation of saturation pressure of methanol at T in Torr
+P2_s=10^(antoine_const_methanol(1,:)-(antoine_const_methanol(2,:)/(T+antoine_const_methanol(3,:))));
+//At the azeotropic conditions, the activity coefficients are determined using Eq.(12.15 and 12.16)
+gaamma1=P/P1_s;//calculation of activity coefficient using Eq.(12.15) (no unit)
+gaamma2=P/P2_s;//calculation of activity coefficient using Eq.(12.16) (no unit)
+A=log(gaamma1)*(1+((x2*log(gaamma2))/(x1*log(gaamma1))))^2;//calculation of the van Laar parameter (no unit) using Eq.(11.84)
+B=log(gaamma2)*(1+((x1*log(gaamma1))/(x2*log(gaamma2))))^2;//calculation of the van Laar parameter (no unit) using Eq.(11.85)
+x1=0.1:0.1:0.9;//taking the values of mole fraction of chloroform in the liquid phase to compute the VLE data (no unit)
+l=length(x1);//iteration parameter
+j=1;//iteration parameter
+while j<l|j==l
+ ln_gaamma1(j)=A/(1+((A*x1(:,j))/(B*(1-x1(:,j)))))^2;//calculation of ln(activity coefficient) (no unit)
+ ln_gaamma2(j)=B/(1+((B*(1-x1(:,j)))/(A*x1(:,j))))^2;//calculation of ln(activity coefficient) (no unit)
+ gaamma1(j)=exp(ln_gaamma1(j));//calculation of the activity coefficient (no unit)
+ gaamma2(j)=exp(ln_gaamma2(j));//calculation of the activity coefficient (no unit)
+ P(j)=(gaamma1(j)*x1(:,j)*P1_s)+(gaamma2(j)*(1-x1(:,j))*P2_s);//calculation of pressure in Torr
+ y1(j)=(gaamma1(j)*x1(:,j)*P1_s)/P(j);//calculation of mole fraction of chloroform in vapour phase (no unit)
+ j=j+1;
+end
+
+//OUTPUT
+mprintf('VLE data: \n\n');
+i=1;
+mprintf('x1 \tgamma1 \t\t gamma2 \t P (Torr) \t y1 \n\n');
+for i=1:l
+ mprintf('%0.1f \t %f \t %f \t %f \t %f \n',x1(i),gaamma1(i),gaamma2(i),P(i),y1(i));
+end
+
+//===============================================END OF PROGRAM===================================================
diff --git a/611/CH12/EX12.6/Chap12_Ex6.sce b/611/CH12/EX12.6/Chap12_Ex6.sce
new file mode 100755
index 000000000..311dc8d01
--- /dev/null
+++ b/611/CH12/EX12.6/Chap12_Ex6.sce
@@ -0,0 +1,38 @@
+// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India.
+
+//Chapter-12,Example 6,Page 443
+//Title: Dew pressure and liquid composition
+//================================================================================================================
+clear
+clc
+
+//INPUT
+//For convenience ethane is taken as 1 and propane is taken as 2
+y1=0.3;//mole fraction of ethane in the vapour phase (no unit)
+T=30;//temperature in degree celsius
+
+//CALCULATION
+//An assumption for the total Pressure is taken and the K factors are read from Fig.12.6. Using the K factor value, the value of x1 and x2 are computed.If x1 and x2 add up to 1, the assumption of total pressure is correct. Otherwise, the pressure is suitably adjusted
+y2=1-y1;//calculation of the mole fraction of propane in the vapour phase (no unit)
+P_guess=1;//assuming the value of pressure in MPa to compute the K factors
+K1=3.4;//K factor taken from Fig.(12.6) corresponding to T and P_guess (no unit)
+K2=1.1;//K factor taken from Fig.(12.6) corresponding to T and P_guess (no unit)
+x1_calc=y1/K1;//calculation of the mole fraction of ethane in the liquid phase (no unit)
+x2_calc=y2/K2;//calculation of the mole fraction of propane in the liquid phase (no unit)
+tot=x1_calc+x2_calc;//checking if x1 and x2 add upto 1
+if tot==1 then
+ P=P_guess;//if the total of x1 and x2 sum up to 1, then the assumed pressure is the Dew pressure (in MPa)
+ x1=x1_calc;//if the total of x1 and x2 sum up to 1, then the calculated value of x1 is the correct liquid composition of ethane (no unit)
+ x2=x2_calc;//if the total of x1 and x2 sum up to 1, then the calculated value of x2 is the correct liquid composition of propane (no unit)
+else
+ P=1.5;//assuming a higher value of P in MPa to compute the K factors from Fig.(12.6), as in this case, the sum total of x1 and x2 are less than 1
+ K1=2.4;//K factor taken from Fig.(12.6) corresponding to T and P (no unit)
+ K2=0.8;//K factor taken from Fig.(12.6) corresponding to T and P (no unit)
+ x1=y1/K1;//calculation of the mole fraction of ethane in the liquid phase (no unit)
+ x2=y2/K2;//calculation of the mole fraction of propane in the liquid phase (no unit)
+end
+
+//OUTPUT
+mprintf('The Dew pressure and the liquid composition of a binary vapour mixture of ethane and propane was found to be P=%0.2f MPa\t x1=%0.3f\t x2=%0.3f \t',P,x1,x2);
+
+//===============================================END OF PROGRAM===================================================
diff --git a/611/CH12/EX12.7/Chap12_Ex7_R1.sce b/611/CH12/EX12.7/Chap12_Ex7_R1.sce
new file mode 100755
index 000000000..ddb249abe
--- /dev/null
+++ b/611/CH12/EX12.7/Chap12_Ex7_R1.sce
@@ -0,0 +1,38 @@
+// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India.
+
+//Chapter-12,Example 7,Page 443
+//Title: Bubble temperature and vapour composition
+//================================================================================================================
+clear
+clc
+
+//INPUT
+//For convenience ethane is taken as 1 and propane is taken as 2
+x1=0.4;//mole fraction of ethane in the liquid phase (no unit)
+P=1.5;//pressure in MPa
+
+//CALCULATION
+//An assumption for the temperature is taken and the K factors are read from Fig.12.6. Using the K factor value, the value of y1 and y2 are computed.If y1 and y2 add up to 1, the assumption of the temperature is correct. Otherwise, the temperature is suitably adjusted
+x2=1-x1;//calculation of the mole fraction of propane in the liquid phase (no unit)
+t_guess=10;//assuming the value of temperature in degree celsius to compute the K factors
+K1=1.8;//K factor taken from Fig.(12.6) corresponding to t_guess and P (no unit)
+K2=0.5;//K factor taken from Fig.(12.6) corresponding to t_guess and P (no unit)
+y1_calc=K1*x1;//calculation of the mole fraction of ethane in the vapour phase (no unit)
+y2_calc=K2*x2;//calculation of the mole fraction of propane in the vapour phase (no unit)
+tot=y1_calc+y2_calc;//checking if y1 and y2 add upto 1
+if tot==1 then
+ t=t_guess;//if the total of y1 and y2 sum up to 1, then the assumed temperature is the bubble temperature (in degree celsius)
+ y1=y1_calc;//if the total of y1 and y2 sum up to 1, then the calculated value of y1 is the correct vapour composition of ethane (no unit)
+ y2=y2_calc;//if the total of y1 and y2 sum up to 1, then the calculated value of y2 is the correct vapour composition of propane (no unit)
+else
+ t=9;//assuming a lower value of t in degree celsius to compute the K factors from Fig.(12.6), as in this case, the sum total of y1 and y2 are greater than 1
+ K1=1.75;//K factor taken from Fig.(12.6) corresponding to t and P (no unit)
+ K2=0.5;//K factor taken from Fig.(12.6) corresponding to t and P (no unit)
+ y1=K1*x1;//calculation of the mole fraction of ethane in the vapour (no unit)
+ y2=K2*x2;//calculation of the mole fraction of propane in the vapour phase (no unit)
+end
+
+//OUTPUT
+mprintf('The bubble temperature and the vapour composition of a binary vapour mixture of ethane and propane was found to be t=%d degree celsius\n y1=%f\t y2=%f\t',t,y1,y2);
+
+//===============================================END OF PROGRAM===================================================
diff --git a/611/CH12/EX12.8/Chap12_Ex8.sce b/611/CH12/EX12.8/Chap12_Ex8.sce
new file mode 100755
index 000000000..78bd41ba3
--- /dev/null
+++ b/611/CH12/EX12.8/Chap12_Ex8.sce
@@ -0,0 +1,56 @@
+// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India.
+
+//Chapter-12,Example 8,Page 449
+//Title: Thermodynamic consistency
+//================================================================================================================
+clear
+clc
+
+//INPUT
+//For convenience 1-Propanol is taken as 1 and chlorobenzene is taken as 2
+P=[350.00;446.00;518.00;574.50;609.00;632.50;665.00;681.50;691.50];//pressure data in Torr, taken from (Ellis et al.)
+x1=[0.0550;0.1290;0.2120;0.3130;0.4300;0.5200;0.6380;0.7490;0.8720];//mole fraction of 1-propanol in the liquid phase, taken from (Ellis et al.) (no unit)
+y1=[0.3500;0.5110;0.5990;0.6500;0.6970;0.7260;0.7590;0.8130;0.8830];//mole fraction of 1-propanol in the vapour phase, taken from (Ellis et al.) (no unit)
+antoine_const_propanol=[8.37895;1788.020;227.438];//Antoine's constants for 1-Propanol from Table A.7
+antoine_const_cbenzene=[7.17294;1549.200;229.260];//Antoine's constants for Chlorobenzene from Table A.7
+T=95;//temperature of the system in degree celsius
+
+//CALCULATION
+//The form of the Antoine's equation used is logP=A-(B/(t+C)), where P is is Torr and t is in degree celsius
+P1_s=10^(antoine_const_propanol(1,:)-(antoine_const_propanol(2,:)/(T+antoine_const_propanol(3,:))));//calculation of saturation pressure of propanol at T in Torr
+//calculation of saturation pressure of chlorobenzene at T in Torr
+P2_s=10^(antoine_const_cbenzene(1,:)-(antoine_const_cbenzene(2,:)/(T+antoine_const_cbenzene(3,:))));
+l=length(P);//iteration parameter
+i=1;//iteration paramter
+while i<l|i==l
+ gaamma1(i)=(y1(i,:)*P(i,:))/(x1(i,:)*P1_s);//calculation of activity coefficient using Eq.(12.15) (no unit)
+ gaamma2(i)=((1-y1(i,:))*P(i,:))/((1-x1(i,:))*P2_s);//calculation of activity coefficient using Eq.(12.16) (no unit)
+ lngamma1_gamma2(i)=log(gaamma1(i)/gaamma2(i));//calculation of ln(activity coefficient1/activity coefficient 2) (no unit), to check for the consistency
+ i=i+1;
+end
+plot(x1,lngamma1_gamma2);//Plot of ln(gamma1/gamma2) vs x1 to determine A12 and A21
+xtitle('Plot of ln(gamma1/gamma2) vs x1','x1','ln(gamma1/gamma2)');
+//From the figure, the area above the x-axis and the area below the x-axis are determined and the thermodynamic consistency is checked
+area_above=1515;//area above the x-axis from the above plot (no unit)
+area_below=1540;//area below the x-axis (absolute value) from the above plot (no unit)
+consistency_parameter=abs((area_above-area_below)/(area_above+area_below));//calculating the paramter for checking the thermodynamic consistency (no unit)
+
+
+//OUTPUT
+mprintf('Values of ln(gamma1/gamma2): \n\n');
+i=1;
+mprintf('x1 \t gamma1 \t gamma2 \t ln(gamma1/gamma2)\n');
+
+for i=1:l
+ mprintf('%0.4f \t %f \t %f \t %f \n',x1(i),gaamma1(i),gaamma2(i),lngamma1_gamma2(i));
+end
+mprintf('\nThe value of the consistency parameter=%f\n',consistency_parameter);
+//0.02 is taken as the checking paramter for the consistency as prescribed by the author in the book on Page 449
+if consistency_parameter<0.02|consistency_parameter==0.02 then
+ mprintf('The VLE data is thermodynamically consistent');
+else
+ mprintf('The VLE data is not thermodynamically consistent');
+end
+
+//===============================================END OF PROGRAM===================================================
+
diff --git a/611/CH12/EX12.8/lngamma1_gamma2_vs_x1.jpg b/611/CH12/EX12.8/lngamma1_gamma2_vs_x1.jpg
new file mode 100755
index 000000000..7a9b3b19c
--- /dev/null
+++ b/611/CH12/EX12.8/lngamma1_gamma2_vs_x1.jpg
Binary files differ
diff --git a/611/CH12/EX12.9/Chap12_Ex9_R1.sce b/611/CH12/EX12.9/Chap12_Ex9_R1.sce
new file mode 100755
index 000000000..46b1266d3
--- /dev/null
+++ b/611/CH12/EX12.9/Chap12_Ex9_R1.sce
@@ -0,0 +1,86 @@
+// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India.
+
+//Chapter-12,Example 9,Page 464
+//Title: Temperature-composition diagram
+//================================================================================================================
+clear
+clc
+
+//INPUT
+//For convenience benzene is taken as 1 and water is taken as 2. They form a completely immiscible system
+P=760;//pressure of the system in Torr
+antoine_const_benzene=[6.87987;1196.760;219.161];//Antoine's constants for Benzene from Table A.7
+t=60:5:100;//temperature range in degree celsius
+//saturation pressure of water(in torr)in the temperature range given by t (from steam tables)
+P2_s=[149.40;187.58;233.71;289.13;355.21;433.51;525.84;634.00;760.00];
+x1=0:0.2:1;//mole fraction of benzene in the liquid phase (no unit) (taken in an arbitrary manner)
+
+//CALCULATION
+//The form of the Antoine's equation used is logP=A-(B/(t+C)), where P is in Torr and t is in degree celsius
+//The three phase equilibrium temperature is estimated using the saturation pressure values,such that at the three phase equilibrium temperature,P=P1_s+P2_s=P as given by Eq.(12.57) Torr
+l=length(t);//iteration parameter
+i=1;//iteration parameter
+while i<l|i==l
+//calculation of saturation pressure of benzene at T in Torr
+P1_s(i)=10^(antoine_const_benzene(1,:)-(antoine_const_benzene(2,:)/(t(:,i)+antoine_const_benzene(3,:))));
+//calculating the total pressure in Torr so as to narrow down the temperature range for estimating the three phase equilibrium temperature
+P_tot(i)=P1_s(i)+P2_s(i,:);
+i=i+1;
+end
+//From the P_tot values calculated above, it is observed that the temperature range in which the three phase equilibrium temperature lies,is in between 65 and 70 degree celsius. Using linear interpolation , the three phase equilibrium temperature is determined in degree celsius
+T=(((t(:,3)-t(:,2))*(760-P_tot(2,:)))/(P_tot(3,:)-P_tot(2,:)))+t(:,2);//linear interpolation to determine the three phase equilibrium temperature in degree celsius
+//calculation of saturation pressure of benzene at the three phase temperature in Torr
+P1_s_three_phase=10^(antoine_const_benzene(1,:)-(antoine_const_benzene(2,:)/(T+antoine_const_benzene(3,:))));
+P2_s_three_phase=760-P1_s_three_phase;//calculation of the saturation pressure of water at the three phase temperature in Torr
+y1_three_phase=P1_s_three_phase/760;//calculation of the mole fraction of benzene in the vapour phase at the three phase equilibrium point (no unit)
+//redefining the temeprature range in degree celsius for computing the vapour compositions in the two phase regions. (As the three phase equilibrium temperature lies between 65 and 70 degree celsius)
+//The normal boiling point of benzene is given as 80.1 degree celsius (at a pressure of 760 Torr)
+trange1=T:1:T+11;//temperature range for calculating vapour phase composition of benzene in the two phase region given by (L1+V)
+n=length(trange1);//iteration parameter
+i=1;//iteration parameter
+while i<n|i==n
+ if i==1 then
+ y1(i)=y1_three_phase;//calculation of the vapour composition of benzene in the two phase region (L1+V) using Eq.(12.59) (no unit)
+ else
+ P1_s_calc(i)=10^(antoine_const_benzene(1,:)-(antoine_const_benzene(2,:)/(trange1(:,i)+antoine_const_benzene(3,:))));
+ y1(i)=(P1_s_calc(i))/P;//calculation of the vapour composition of benzene in the two phase region (L1+V) using Eq.(12.59) (no unit)
+ end
+ i=i+1;
+end
+trange2=[70;75;80;85;90;95;100];//temperature range for calculating vapour phase composition of benzene in the two phase region given by (L2+V)
+P2_s_range=[233.71;289.13;355.21;433.51;525.84;634.00;760.00];//saturation pressure of water(in torr)in the temperature range given by trange2 (from steam tables)
+p=length(trange2);//iteration parameter
+i=1;//iteration parameter
+//calculation of the vapour composition of benzene in the two phase region (L2+V) using Eq.(12.61) (no unit)
+y_one(i)=y1_three_phase;
+trange2(i)=T;
+i=i+1;
+while i<p|i==p
+ y_one(i)=(P-P2_s_range(i,:))/P;
+ i=i+1;
+end
+i=1;//iteration parameter
+k=length(x1);//iteration parameter
+while i<k|i==k
+ t_3phase(i)=T;//creating a vector for generating the plot at the three phase temperature
+ i=i+1;
+end
+
+//OUTPUT
+//Generating the T-x-y plot for the benzene-water system
+plot(y1,trange1);
+plot(y_one,trange2);
+plot(x1,t_3phase);
+ xtitle('t-x-y diagram for benzene-water sytem at 760 Torr','x1,y1','t (degree celsius)');
+q=length(t);//iteration parameter
+i=1;//iteration parameter
+mprintf('Calculations performed for determining the three phase equilibrium temperature\n');
+mprintf('t(degree celsius) \t P1_s (Torr) \t P2_s (Torr) \t P1_s+P2_s (Torr) \n');
+for i=1:q
+ mprintf('%d \t \t \t %f \t %0.2f \t %f \n',t(i),P1_s(i),P2_s(i),P_tot(i));
+end
+mprintf('The three phase equilibrium temperature=%0.2f degree celsius \n',T);
+mprintf('The vapour phase composition of benzene at the three phase equilibrium point=%0.4f \n',y1_three_phase);
+//===============================================END OF PROGRAM===================================================
+
+
diff --git a/611/CH12/EX12.9/txy_diagram.jpeg b/611/CH12/EX12.9/txy_diagram.jpeg
new file mode 100755
index 000000000..bf24b4583
--- /dev/null
+++ b/611/CH12/EX12.9/txy_diagram.jpeg
Binary files differ