diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /647/CH12 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '647/CH12')
-rwxr-xr-x | 647/CH12/EX12.1/Example12_1.sce | 13 | ||||
-rwxr-xr-x | 647/CH12/EX12.10/Example12_10.sce | 40 | ||||
-rwxr-xr-x | 647/CH12/EX12.11/Example12_11.sce | 38 | ||||
-rwxr-xr-x | 647/CH12/EX12.12/Example12_12.sce | 39 | ||||
-rwxr-xr-x | 647/CH12/EX12.13/Example12_13.sce | 30 | ||||
-rwxr-xr-x | 647/CH12/EX12.14/Example12_14.sce | 53 | ||||
-rwxr-xr-x | 647/CH12/EX12.15/Example12_15.sce | 47 | ||||
-rwxr-xr-x | 647/CH12/EX12.16/Example12_16.sce | 22 | ||||
-rwxr-xr-x | 647/CH12/EX12.17/Example12_17.sce | 31 | ||||
-rwxr-xr-x | 647/CH12/EX12.18/Example12_18.sce | 42 | ||||
-rwxr-xr-x | 647/CH12/EX12.19/Example12_19.sce | 13 | ||||
-rwxr-xr-x | 647/CH12/EX12.2/Example12_2.sce | 13 | ||||
-rwxr-xr-x | 647/CH12/EX12.20/Example12_20.sce | 37 | ||||
-rwxr-xr-x | 647/CH12/EX12.21/Example12_21.sce | 18 | ||||
-rwxr-xr-x | 647/CH12/EX12.22/Example12_22.sce | 76 | ||||
-rwxr-xr-x | 647/CH12/EX12.3/Example12_3.sce | 29 | ||||
-rwxr-xr-x | 647/CH12/EX12.4/Example12_4.sce | 24 | ||||
-rwxr-xr-x | 647/CH12/EX12.5/Example12_5.sce | 24 | ||||
-rwxr-xr-x | 647/CH12/EX12.6/Example12_6.sce | 24 | ||||
-rwxr-xr-x | 647/CH12/EX12.7/Example12_7.sce | 28 | ||||
-rwxr-xr-x | 647/CH12/EX12.8/Example12_8.sce | 30 | ||||
-rwxr-xr-x | 647/CH12/EX12.9/Example12_9.sce | 40 |
22 files changed, 711 insertions, 0 deletions
diff --git a/647/CH12/EX12.1/Example12_1.sce b/647/CH12/EX12.1/Example12_1.sce new file mode 100755 index 000000000..13a8797f5 --- /dev/null +++ b/647/CH12/EX12.1/Example12_1.sce @@ -0,0 +1,13 @@ +clear;
+clc;
+
+// Example: 12.1
+// Page: 471
+
+printf("Example: 12.1 - Page: 471\n\n");
+
+// This problem involves proving a relation in which no mathematics and no calculations are involved.
+// For prove refer to this example 12.1 on page number 471 of the book.
+
+printf(" This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n");
+printf(" For prove refer to this example 12.1 on page 471 of the book.");
\ No newline at end of file diff --git a/647/CH12/EX12.10/Example12_10.sce b/647/CH12/EX12.10/Example12_10.sce new file mode 100755 index 000000000..3c1d4c9fa --- /dev/null +++ b/647/CH12/EX12.10/Example12_10.sce @@ -0,0 +1,40 @@ +clear;
+clc;
+
+// Example: 12.10
+// Page: 489
+
+printf("Example: 12.10 - Page: 489\n\n");
+
+// Solution
+
+//*****Data******//
+// Reaction: CO(g) + H2O(g) ------> CO2(g) + H2(g)
+P = 10;// [bar]
+T = 1000;// [K]
+K_1000 = 1.5;
+//***********//
+
+// Moles in feed:
+nCO_feed = 1;
+nH20_feed = 1;
+// Let e be the degree of completion at equilibrium.
+// Moles at Equilibrium:
+// nCO_eqb = 1 - e;
+// nH20_eqb = 1 - e;
+// nCO2_eqb = e;
+// nH2_eqb = e;
+// Total moles at equilibrium = 1 - e + 1 - e + e + e = 2
+// Mole Fractions at Equilibrium:
+// yCO_eqb = (1 - e)/2;
+// yH20_eqb = (1 - e)/2;
+// yCO2_eqb = e/2;
+// yH2_eqb = e/2;
+// Sum of stoichometric coeffecient:
+v = 1 + 1 - 1 - 1;
+K = K_1000*P^v;
+deff('[y] = f(e)','y = K - (e/2)*(e/2)/(((1 - e)/2)*(1 - e)/2)');
+e = fsolve(0.5,f);
+printf("Composition of the gas leaving the mixture\n");
+printf("yCO = yH20 = %.4f\n",(1 - e)/2);
+printf("yCO2 = yH2 = %.4f\n",e/2);
\ No newline at end of file diff --git a/647/CH12/EX12.11/Example12_11.sce b/647/CH12/EX12.11/Example12_11.sce new file mode 100755 index 000000000..e7424d731 --- /dev/null +++ b/647/CH12/EX12.11/Example12_11.sce @@ -0,0 +1,38 @@ +clear;
+clc;
+
+// Example: 12.11
+// Page: 489
+
+printf("Example: 12.11 - Page: 489\n\n");
+
+// Solution
+
+//*****Data******//
+// Reaction: N2(g) + 3H2(g) --------> 2NH3
+nN2_feed = 1;
+nH2_feed = 5;
+T = 800;// [K]
+P = 250;// [bar]
+K = 1.106*10^(-5);
+//**************//
+
+// Let e be the degree of completion at equilibrium.
+// Moles at Equilibrium:
+// nN2_eqb = 1 - e;
+// nH2_eqb = 5 - 3*e;
+// nNH3_eqb = 2*e;
+// Total moles at equilibrium = 1 - e + 5 - 3*e + 2*e = 2*(3 - e)
+// Mole Fractions at Equilibrium:
+// yN2_eqb = (1 - e)/(2*(3 - e));
+// yH2_eqb = (5 - 3*e)/(2*(3 - e));
+// yNH3_eqb = 2*e/(2*(3 - e));
+// Sum of stoichometric coeffecient:
+v = 2 - 3 - 1;
+Ky = K*P^(-v);
+deff('[y] = f(e)','y = Ky - ((2*e/(2*(3 - e)))^2)/(((1-e)/((2*(3 - e))))*((5 - 3*e)/(2*(3 - e)))^3)');
+e = fsolve(0.5,f);
+printf("Molar Composition of the gases\n");
+printf("yN2 = %.4f\n",(1 - e)/(2*(3 - e)));
+printf("yH2 = %.4f\n",(5 - 3*e)/(2*(3 - e)));
+printf("yNH3 = %.4f\n",(2*e)/(2*(3 - e)));
\ No newline at end of file diff --git a/647/CH12/EX12.12/Example12_12.sce b/647/CH12/EX12.12/Example12_12.sce new file mode 100755 index 000000000..d04ad310d --- /dev/null +++ b/647/CH12/EX12.12/Example12_12.sce @@ -0,0 +1,39 @@ +clear;
+clc;
+
+// Example: 12.12
+// Page: 490
+
+printf("Example: 12.12 - Page: 490\n\n");
+
+// Solution
+
+//*****Data******//
+// Reaction: SO2(g) + (1/2)O2 ------> SO3(g)
+P = 1;// [bar]
+T = 750;// [K]
+K = 74;
+//************//
+
+// Moles in Feed:
+nSO2 = 1;
+nO2 = 0.5;
+// Let e be the degree of completion at equilibrium.
+// Moles at Equilibrium:
+// nSO2_eqb = 10 - e;
+// nO2_eqb = 8 - 0.5*e;
+// nSO3_eqb = e;
+// Total no. of moles = 10 - e + 8 - 0.5*e + e = 18 -0.5*e;
+// Mole fraction at Equilibrium:
+// ySO2_eqb = (10 - e)/(18 - 0.5*e);
+// yO2_eqb = (8 - 0.5*e)/(18 - 0.5*e);
+// ySO3_eqb = e/(18 - 0.8*e);
+// Sum of stoichometric coeffecient:
+v = 1 - 1 -0.5;
+Ky = K*P^(-v);
+deff('[y] = f(e)','y = Ky - (e*(18 - (0.5*e)))/((10 - e)*(8 - 0.5*e))');
+e = fsolve(7,f);
+printf("Molar Composition of the gases\n");
+printf("nSO2 = %.2f\n",(10 - e));
+printf("nO2 = %.2f\n",(8 - 0.5*e));
+printf("nSO3 = %.2f\n",e);
\ No newline at end of file diff --git a/647/CH12/EX12.13/Example12_13.sce b/647/CH12/EX12.13/Example12_13.sce new file mode 100755 index 000000000..bebafb163 --- /dev/null +++ b/647/CH12/EX12.13/Example12_13.sce @@ -0,0 +1,30 @@ +clear;
+clc;
+
+// Example: 12.13
+// Page: 492
+
+printf("Example: 12.13 - Page: 492\n\n");
+
+// Solution
+
+//*****Data******//
+// Reaction: PCl5 = PCl3 + Cl2
+T = 250;// [OC]
+Kp = 1.8;
+e = 0.5;
+//**************//
+
+// Basis: 1 mol of PCl5
+// At Equilibrium:
+n_PCl5 = 1 - e;
+n_PCl3 = e;
+n_Cl2 = e;
+n_total = n_PCl5 + n_PCl3 + n_Cl2;
+// Patrial Pressures:
+// P_PCl5 = (n_PCl5/n_total)*P
+// P_PCl3 = (n_PCl3/n_total)*P
+// P_Cl2 = (n_Cl2/n_total)*P
+deff('[y] = f(P)','y = Kp - ((n_PCl3/n_total)*P)*((n_Cl2/n_total)*P)/((n_PCl5/n_total)*P)');
+P = fsolve(7,f);// [atm]
+printf("Total Pressure Required for 50 %% conversion of PCl5 is %.1f atm",P);
\ No newline at end of file diff --git a/647/CH12/EX12.14/Example12_14.sce b/647/CH12/EX12.14/Example12_14.sce new file mode 100755 index 000000000..ee66f0525 --- /dev/null +++ b/647/CH12/EX12.14/Example12_14.sce @@ -0,0 +1,53 @@ +clear;
+clc;
+
+// Example: 12.14
+// Page: 494
+
+printf("Example: 12.14 - Page: 494\n\n");
+
+// Solution
+
+//*****Data******//
+// Reaction: SO2(g) + (1/2)O2(g) -------> SO3(g)
+// Moles in Feed:
+nSO2_feed = 1;
+nO2_feed = 0.5;
+nAr_feed = 2;
+P = 30;// [bar]
+T = 900;// [K]
+K = 6;
+//*************//
+
+// Let e be the degree of completion at equilibrium.
+// nSO2_eqb = 1 - e;
+// nO2_eqb = 0.5*(1 - e);
+// nSO3_eqb = e;
+// nAr_eqb = 2;
+// Total moles at equilibrium = 1 - e + 0.5*(1 - e) + e + 2 = (7 - e)/2
+// Mole fractions:
+// ySO2_eqb = 2*(1 - e)/(7 - e)
+// yO2_eqb = (1 - e)/(7 - e)
+// ySO3_eqb = 2*e/(7 - e)
+// yAr_eqb = 4/(7 - e)
+// Sum of Stoichiometric Coeffecient:
+v = 1 - 1 - 1/2;
+Ky = K*P^(-v);
+e = 0.8;
+err = 1;
+while err > 0.2
+ Ky_new = (2*e/(7 - e))/(((2*(1 - e))/(7 - e))*(((1 - e)/(7 - e))^0.5));
+ err = abs(Ky - Ky_new);
+ Ky = Ky_new;
+ e = e + 0.001;
+end
+printf("Degree of Conversion is %.3f\n",e);
+ySO2_eqb = 2*(1 - e)/(7 - e);
+yO2_eqb = (1 - e)/(7 - e);
+ySO3_eqb = 2*e/(7 - e);
+yAr_eqb = 4/(7 - e);
+printf("Equilibrium Composition of the reaction Mixture\n");
+printf("ySO2 = %.4f\n",ySO2_eqb);
+printf("yO2 = %.4f\n",yO2_eqb);
+printf("ySO3 = %.4f\n",ySO3_eqb);
+printf("yAr = %.4f\n",yAr_eqb)
\ No newline at end of file diff --git a/647/CH12/EX12.15/Example12_15.sce b/647/CH12/EX12.15/Example12_15.sce new file mode 100755 index 000000000..903734527 --- /dev/null +++ b/647/CH12/EX12.15/Example12_15.sce @@ -0,0 +1,47 @@ +clear;
+clc;
+
+// Example: 12.15
+// Page: 498
+
+printf("Example: 12.15 - Page: 498\n\n");
+
+// Solution
+
+//*****Data******//
+// Reaction: CH3COOH(l) + C2H5OH(l) --------> CH3COOC2H5(l) + H2O(l)
+T = 373.15;// [K]
+nCH3COOH_feed = 1;
+nC2H5OH_feed = 1;
+deltaHf_CH3COOH = -484.5;// [kJ]
+deltaHf_C2H5OH = -277.69;// [kJ]
+deltaHf_CH3COOC2H5 = -480;// [kJ]
+deltaHf_H2O = -285.83;// [kJ]
+deltaGf_CH3COOH = -389.9;// [kJ]
+deltaGf_C2H5OH = -174.78;// [kJ]
+deltaGf_CH3COOC2H5 = -332.2;// [kJ]
+deltaGf_H2O = -237.13;// [kJ]
+R = 8.314;// [J/mol K]
+//******************//
+
+deltaH_298 = deltaHf_CH3COOC2H5 + deltaHf_H2O - deltaHf_CH3COOH - deltaHf_C2H5OH;// [kJ]
+deltaG_298 = deltaGf_CH3COOC2H5 + deltaGf_H2O - deltaGf_CH3COOH - deltaGf_C2H5OH;// [kJ]
+T0 = 298;// [K]
+K_298 = exp(-(deltaG_298*1000/(R*T0)));
+K_373 = K_298*exp((deltaH_298*1000/R)*((1/T0) - (1/T)));
+// Let e be the degree of completion at equilibrium.
+// nCH3COOH_eqb = 1 - e;
+// nC2H5OH_eqb = 1 - e;
+// nCH3COOC2H5_eqb = e;
+// nH2O_eqb = e;
+// Total moles at equilibrium = 1 - e + 1 - e + e + e = 2
+// Mole fractions:
+// ySO2_eqb = (1 - e)/2
+// yO2_eqb = (1 - e)/2
+// ySO3_eqb = e/2
+// yAr_eqb = e/2
+// Sum of Stoichiometric Coeffecient:
+v = 1 + 1 - 1 - 1;
+deff('[y] = f(e)','y = K_373 - ((e/2)*(e/2))/(((1 - e)/2)*((1 - e)/2))');
+e = fsolve(0.5,f);
+printf("Mole fraction of ethyl acetate is %.3f",e/2);
\ No newline at end of file diff --git a/647/CH12/EX12.16/Example12_16.sce b/647/CH12/EX12.16/Example12_16.sce new file mode 100755 index 000000000..3bb7463ad --- /dev/null +++ b/647/CH12/EX12.16/Example12_16.sce @@ -0,0 +1,22 @@ +clear;
+clc;
+
+// Example: 12.16
+// Page: 501
+
+printf("Example: 12.16 - Page: 501\n\n");
+
+// Solution
+
+//*****Data******//
+// Reaction: CaCO3(s) = CaO(s) + CO2(g)
+T = 1000;// [K]
+deltaH_1000 = 1.7533*10^5;// [J]
+deltaS_1000 = 150.3;// [J/mol K]
+R = 8.314;// [J/mol K]
+//****************//
+
+deltaG_1000 = deltaH_1000 - T*deltaS_1000;// [J]
+K_1000 = exp(-(deltaG_1000/(R*T)));// [bar]
+P = K_1000;
+printf("The decomposition pressure of limestone is %.4f bar at 1000 K",P);
\ No newline at end of file diff --git a/647/CH12/EX12.17/Example12_17.sce b/647/CH12/EX12.17/Example12_17.sce new file mode 100755 index 000000000..5988e86e3 --- /dev/null +++ b/647/CH12/EX12.17/Example12_17.sce @@ -0,0 +1,31 @@ +clear;
+clc;
+
+// Example: 12.17
+// Page: 501
+
+printf("Example: 12.17 - Page: 501\n\n");
+
+// Solution
+
+//*****Data******//
+// Reaction: A(s) ---------> B(s) + C(g)
+deff('[deltaG] = f1(T)','deltaG = 85000 - 213.73*T + 6.71*T*log(T) - 0.00028*T^2');// [J]
+T1 = 400;// [K]
+T2 = 700;// [K]
+Pc = 1;// [bar]
+R = 8.314;// [J/mol K]
+//**************//
+
+deltaG_400 = f1(400);// [J]
+deltaG_700 = f1(700);// [J]
+K_400 = exp(-(deltaG_400/(R*T1)));// [bar]
+K_700 = exp(-(deltaG_700/(R*T2)));// [bar]
+printf("The decomposition pressure is %.4f bar at 400 K\n",K_400);
+printf("The decomposition pressure is %.2f bar at 700 K\n",K_700);
+
+// Equilibrium constant for solid - gas reaction is:
+// K = aB*aC/aA = aC = fC = Pc
+deff('[y] = f2(T)','y = Pc - exp(-f1(T)/(R*T))');
+T = fsolve(900,f2);// [K]
+printf("The decomposition temperature is %.3f K",T);
\ No newline at end of file diff --git a/647/CH12/EX12.18/Example12_18.sce b/647/CH12/EX12.18/Example12_18.sce new file mode 100755 index 000000000..4c1dea6fb --- /dev/null +++ b/647/CH12/EX12.18/Example12_18.sce @@ -0,0 +1,42 @@ +clear;
+clc;
+
+// Example: 12.18
+// Page: 502
+
+printf("Example: 12.18 - Page: 502\n\n");
+
+// Solution
+
+//*****Data******//
+T = 875;// [K]
+K = 0.514;
+P = 1;// [bar]
+//*************//
+
+// Reaction: Fe(s) + H2O(g) --------->FeO(s) + H2(g)
+// K = a_FeO*a_H2/(a_Fe*a_H2O)
+// Since the activities of the solid components Fe & FeO at equilibrium may be taken as unity.
+// a_Fe = a_FeO = 1
+// Ka = a_H2/a_H2O;
+// Feed:
+nH2O_feed = 1;
+nH2feed = 0;
+// Let e be the degree of completion at equilibrium.
+// Moles at Equilibrium:
+// nH2O_eqb = 1 - e;
+// nH2_eqb = e;
+// Total moles at equilibrium = 1 - e + e = 1
+// Mole Fractions at Equilibrium:
+// yH20_eqb = 1 - e;
+// yH2_eqb = e;
+// Sum of stoichometric coeffecient:
+v = 1 - 1;
+Ky = K*P^(-v);
+// Ky = e/(1 - e)
+e = Ky/(Ky + 1);
+yH2_eqb = e;
+yH2O_eqb = 1 - e;
+printf("Equilibrium Composition\n");
+printf("yH2 = %.2f\n",yH2_eqb);
+printf("y_H2O = %.2f\n",yH2O_eqb);
\ No newline at end of file diff --git a/647/CH12/EX12.19/Example12_19.sce b/647/CH12/EX12.19/Example12_19.sce new file mode 100755 index 000000000..cc82d408d --- /dev/null +++ b/647/CH12/EX12.19/Example12_19.sce @@ -0,0 +1,13 @@ +clear;
+clc;
+
+// Example: 12.19
+// Page: 503
+
+printf("Example: 12.19 - Page: 503\n\n");
+
+// Mathematics is involved in proving but just that no numerical computations are involved.
+// For prove refer to this example 12.19 on page number 503 of the book.
+
+printf(" Mathematics is involved in proving but just that no numerical computations are involved.\n\n");
+printf(" For prove refer to this example 12.19 on page 503 of the book.");
\ No newline at end of file diff --git a/647/CH12/EX12.2/Example12_2.sce b/647/CH12/EX12.2/Example12_2.sce new file mode 100755 index 000000000..773766121 --- /dev/null +++ b/647/CH12/EX12.2/Example12_2.sce @@ -0,0 +1,13 @@ +clear;
+clc;
+
+// Example: 12.2
+// Page: 473
+
+printf("Example: 12.2 - Page: 473\n\n");
+
+// This problem involves proving a relation in which no mathematics and no calculations are involved.
+// For prove refer to this example 12.2 on page number 473 of the book.
+
+printf(" This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n");
+printf(" For prove refer to this example 12.2 on page 473 of the book.");
\ No newline at end of file diff --git a/647/CH12/EX12.20/Example12_20.sce b/647/CH12/EX12.20/Example12_20.sce new file mode 100755 index 000000000..ae651ae35 --- /dev/null +++ b/647/CH12/EX12.20/Example12_20.sce @@ -0,0 +1,37 @@ +clear;
+clc;
+
+// Example: 12.20
+// Page: 505
+
+printf("Example: 12.20 - Page: 505\n\n");
+
+// Solution
+
+//Reactions:
+// CO + (1/2)O2 ------------> CO2 ......................................(1)
+// C + O2 ------------------> CO2 ......................................(2)
+// H2 + (1/2)O2 ------------> H2O ......................................(3)
+// C + 2H2 -----------------> CH4 ......................................(4)
+
+// Elimination of C:
+// Combining Eqn. (2) with (1):
+// CO + (1/2)O2 ------------> CO2 ......................................(5)
+// Combining Eqn. (2) with (4):
+// CH4 + O2 ----------------> 2H2 + CO2 ................................(6)
+
+// Elimination of O2:
+// Combining Eqn. (3) with (4):
+// CO2 + H2 ----------------> CO + H2O .................................(7)
+// Combining Eqn. (3) with (6):
+// CH4 + 2H2O -------------> CO2 + 4H2 .................................(8)
+
+// Equations 7 & 8 are independent sets. Hence
+r = 2;// [No. of independent rkn.]
+C = 5;// [No. of component]
+P = 1;// [No. of phases]
+s = 0;// [No special constraint]
+// Applying Eqn. 12.81
+F = C - P + 2 - r - s;// [Degree of freedom]
+printf("No. of independent reaction that occur is %d\n",r);
+printf("No. of Degree of freedom is %d",F);
\ No newline at end of file diff --git a/647/CH12/EX12.21/Example12_21.sce b/647/CH12/EX12.21/Example12_21.sce new file mode 100755 index 000000000..ad564f631 --- /dev/null +++ b/647/CH12/EX12.21/Example12_21.sce @@ -0,0 +1,18 @@ +clear;
+clc;
+
+// Example: 12.21
+// Page: 506
+
+printf("Example: 12.21 - Page: 506\n\n");
+
+// Solution
+
+// Reaction: CaCO3 -----------> CaO + CO2
+r = 1;// [No. of independent rkn.]
+C = 3;// [No. of component]
+P = 3;// [No. of phases, solid CaO, solid CaCO3, gaseous CO2]
+s = 0;// [No special constraint]
+// Applying Eqn. 12.81
+F = C - P + 2 - r - s;// [Degree of freedom]
+printf("No. of Degree of freedom is %d",F);
\ No newline at end of file diff --git a/647/CH12/EX12.22/Example12_22.sce b/647/CH12/EX12.22/Example12_22.sce new file mode 100755 index 000000000..2a14fa441 --- /dev/null +++ b/647/CH12/EX12.22/Example12_22.sce @@ -0,0 +1,76 @@ +clear;
+clc;
+
+// Example: 12.22
+// Page: 508
+
+printf("Example: 12.22 - Page: 508\n\n");
+
+// Solution
+
+//*********Data*********//
+// Reaction:
+// C4H10 -----------> C2H4 + C2H6 ....................................(A)
+// C4H10 -----------> C3H6 + CH4 .................................... (B)
+T = 750;// [K]
+P = 1.2;// [bar]
+Ka = 3.856;
+Kb = 268.4;
+//************************//
+
+// Let
+// ea = Degree of conversion of C4H10 in reaction (A)
+// eb = Degree of conversion of C4H10 in reaction (B)
+
+// Moles in Feed:
+nC4H10_feed = 1;
+nC2H4_feed = 0;
+nC2H6_feed = 0;
+nC3H6_feed = 0;
+nCH4_feed = 0;
+
+// Moles at Equilibrium:
+// nC4H10_eqb = 1 - ea - eb
+// nC2H4_eqb = ea
+// nC2H6_eqb = ea
+// nC3H6_eqb = eb
+// nCH4_eqb = eb
+
+// Total moles at equilibrium = 1 - ea - eb + ea + eb + eb = 1 + ea + eb
+
+// Mole Fraction:
+// yC4H10_eqb = (1 - ea - eb)/(1 + ea + eb)
+// yC2H4_eqb = ea/(1 + ea + eb)
+// yC2H6_eqb = ea/(1 + ea + eb)
+// yC3H6_eqb = eb/(1 + ea + eb)
+// yCH4_eqb = eb/(1 + ea + eb)
+
+// Sum of the stoichometric coeffecient:
+va = 1 + 1 - 1;
+vb = 1 + 1 - 1;
+
+// e = [ea eb]
+// Solution of simultaneous equation
+function[f]=F(e)
+ f(1) = (((e(1)/(1 + e(1) + e(2)))*(e(1)/(1 + e(1) + e(2))))/((1 - e(1) - e(2))/(1 + e(1) + e(2))))*P^va - Ka;
+ f(2) = (((e(2)/(1 + e(1) + e(2)))*(e(2)/(1 + e(1) + e(2))))/((1 - e(1) - e(2))/(1 + e(1) + e(2))))*P^vb - Kb;
+ funcprot(0);
+endfunction
+
+// Initial guess:
+e = [0.1 0.8];
+y = fsolve(e,F);
+ea = y(1);
+eb = y(2);
+yC4H10_eqb = (1 - ea - eb)/(1 + ea + eb);
+yC2H4_eqb = ea/(1 + ea + eb);
+yC2H6_eqb = ea/(1 + ea + eb);
+yC3H6_eqb = eb/(1 + ea + eb);
+yCH4_eqb = eb/(1 + ea + eb);
+
+printf("At Equilibrium\n");
+printf("yC4H10 = %.4f\n",yC4H10_eqb);
+printf("yC2H4 = %.4f\n",yC2H4_eqb);
+printf("yC2H6 = %.4f\n",yC2H6_eqb);
+printf("yC3H6 = %.4f\n",yC3H6_eqb);
+printf("yCH4 = %.4f\n",yCH4_eqb);
\ No newline at end of file diff --git a/647/CH12/EX12.3/Example12_3.sce b/647/CH12/EX12.3/Example12_3.sce new file mode 100755 index 000000000..435338b00 --- /dev/null +++ b/647/CH12/EX12.3/Example12_3.sce @@ -0,0 +1,29 @@ +clear;
+clc;
+
+// Example: 12.3
+// Page: 479
+
+printf("Example: 12.3 - Page: 479\n\n");
+
+// Solution
+
+//*****Data******//
+// Reaction: C2H5OH(g) + (1/2)O2(g) = CH3CHO(g) + H2O(g)
+Temp = 298;// [K]
+G_CH3CHO = -133.978;// [kJ]
+G_H2O = -228.60;// [kJ]
+G_C2H5OH = -174.883;// [kJ]
+R = 8.314;// [J/mol K]
+//***************//
+
+G_O2 = 0;// [kJ]
+G_rkn = G_CH3CHO + G_H2O -(G_C2H5OH + G_O2);// [kJ]
+G_rkn = G_rkn*1000;// [J]
+if G_rkn < 0
+ printf("Reaction is feasible\n");
+ K = exp(-(G_rkn/(R*Temp)));
+ printf("Equilibium Constant is %.3e",K);
+else
+ printf("Reaction is not feasible\n");
+end
\ No newline at end of file diff --git a/647/CH12/EX12.4/Example12_4.sce b/647/CH12/EX12.4/Example12_4.sce new file mode 100755 index 000000000..bfaa2cfca --- /dev/null +++ b/647/CH12/EX12.4/Example12_4.sce @@ -0,0 +1,24 @@ +clear;
+clc;
+
+// Example: 12.4
+// Page: 479
+
+printf("Example: 12.4 - Page: 479\n\n");
+
+// Solution
+
+//*****Data******//
+// H2O(l) = H2O(g)
+deltaH = 9710;// [cal]
+deltaS = 26;// [e.u.]
+Temp = 27 + 273;// [K]
+P = 1;// [atm]
+//**************//
+
+deltaG = deltaH - Temp*deltaS;// [cal]
+if deltaG > 0
+ printf("Vaporisation of liquid water is not spontaneous\n");
+else
+ printf("Vaporisation of liquid water is spontaneous")
+end
\ No newline at end of file diff --git a/647/CH12/EX12.5/Example12_5.sce b/647/CH12/EX12.5/Example12_5.sce new file mode 100755 index 000000000..e5435c7de --- /dev/null +++ b/647/CH12/EX12.5/Example12_5.sce @@ -0,0 +1,24 @@ +clear;
+clc;
+
+// Example: 12.5
+// Page: 481
+
+printf("Example: 12.5 - Page: 481\n\n");
+
+// Solution
+
+//*****Data******//
+// Reaction: N2(g) + 3H2(g) = 2NH3(g)
+Temp = 298;// [K]
+G_NH3 = -16.750;// [kJ/mol]
+R = 8.314;// [J/mol K]
+//***************//
+
+G_N2 = 0;// [kJ/mol]
+G_H2 = 0;// [kJ/mol]
+G_rkn = 2*G_NH3 - G_N2 - 3*G_H2;// [kJ/mol]
+printf("Standard Gibbs free energy change is %.1f kJ/mol\n",G_rkn);
+G_rkn = G_rkn*1000;// [J/mol];
+K = exp(-(G_rkn/(R*Temp)));
+printf("Equilibrium constant is %.2e",K);
\ No newline at end of file diff --git a/647/CH12/EX12.6/Example12_6.sce b/647/CH12/EX12.6/Example12_6.sce new file mode 100755 index 000000000..cb95afa2f --- /dev/null +++ b/647/CH12/EX12.6/Example12_6.sce @@ -0,0 +1,24 @@ +clear;
+clc;
+
+// Example: 12.6
+// Page: 481
+
+printf("Example: 12.6 - Page: 481\n\n");
+
+// Solution
+
+//*****Data******//
+// Reaction: CO(g) + H2O(g) = CO2(g) + H2(g)
+G_CO = -32.8;// [kcal]
+G_H2O = -54.64;// [kcal]
+G_CO2 = -94.26;// [kcal]
+Temp = 273 + 25;// [K]
+R = 1.987;// [cal/mol.K]
+//***************//
+
+G_H2 = 0;// [kcal]
+G_rkn = G_CO2 + G_H2 - (G_CO + G_H2O);// [kcal]
+G_rkn = G_rkn*1000;// [cal]
+K = exp(-(G_rkn/(R*Temp)));
+printf("Equilibrium Constant is %.3e",K);
\ No newline at end of file diff --git a/647/CH12/EX12.7/Example12_7.sce b/647/CH12/EX12.7/Example12_7.sce new file mode 100755 index 000000000..51916217e --- /dev/null +++ b/647/CH12/EX12.7/Example12_7.sce @@ -0,0 +1,28 @@ +clear;
+clc;
+
+// Example: 12.7
+// Page: 485
+
+printf("Example: 12.7 - Page: 485\n\n");
+
+// Solution
+
+//*****Data******//
+// Reaction: CO(g) + H2O(g) = CO2(g) + H2(g)
+T1 = 298;// [K]
+T2 = 1000;// [K]
+P = 1;// [bar]
+K1 = 1.1582*10^5;
+H_CO = -110.532;// [kJ]
+H_H2O = -241.997;// [kJ]
+H_CO2 = -393.978;// [kJ]
+R = 8.314;// [J/mol.K]
+//***************//
+
+H_H2 = 0;// [kJ]
+H_rkn = H_CO2 + H_H2 - (H_CO + H_H2O);// [kJ]
+H_rkn = H_rkn*1000;// [J]
+// From Van't Hoff Equation,
+K2 = K1*exp((H_rkn/R)*((1/T1) - (1/T2)));
+printf("Equilibrium constant at 1000 K is %.4f",K2);
\ No newline at end of file diff --git a/647/CH12/EX12.8/Example12_8.sce b/647/CH12/EX12.8/Example12_8.sce new file mode 100755 index 000000000..614127b0c --- /dev/null +++ b/647/CH12/EX12.8/Example12_8.sce @@ -0,0 +1,30 @@ +clear;
+clc;
+
+// Example: 12.8
+// Page: 485
+
+printf("Example: 12.8 - Page: 485\n\n");
+
+// Solution
+
+//*****Data******//
+// Reaction: N2(g) + 3H2(g) = 2NH3(g)
+T1 = 298;// [K]
+T2 = 700;// [K]
+H_NH3 = -46.1;// [kJ]
+G_NH3 = -16.747;// [kJ]
+R = 8.314;// [J/mol.K]
+//**************//
+
+H_N2 = 0;// [kJ]
+H_H2 = 0;// [kJ]
+G_N2 = 0;// [kJ]
+G_H2 = 0;// [kJ]
+H_rkn = 2*H_NH3 - (H_N2 + 3*H_H2);// [kJ]
+G_rkn = 2*G_NH3 - (G_N2 + 3*G_H2);// [kJ]
+H_rkn = H_rkn*1000;// [J]
+G_rkn = G_rkn*1000;// [J]
+K1 = exp(-(G_rkn/(R*T1)));
+K2 = K1*exp((H_rkn/R)*((1/T1) - (1/T2)));
+printf("Equilibrium constant at 700 K is %.4e",K2);
\ No newline at end of file diff --git a/647/CH12/EX12.9/Example12_9.sce b/647/CH12/EX12.9/Example12_9.sce new file mode 100755 index 000000000..0cdd2d1e7 --- /dev/null +++ b/647/CH12/EX12.9/Example12_9.sce @@ -0,0 +1,40 @@ +clear;
+clc;
+
+// Example: 12.9
+// Page: 486
+
+printf("Example: 12.9 - Page: 486\n\n");
+
+// Solution
+
+//*****Data******//
+// Reaction: CO(g) + H2O(g) ----> CO2(g) + H2(g)
+T1 = 298;// [K]
+T2 = 1000;// [K]
+deltaH_298 = -41450;// [J/mol]
+deltaGf_298 = -28888;// [J/mol]
+alpha_CO2 = 45.369;// [kJ/kmol K]
+alpha_H2 = 27.012;// [kJ/kmol K]
+alpha_CO = 28.068;// [kJ/kmol K]
+alpha_H2O = 28.850;// [kJ/kmol K]
+beeta_CO2 = 8.688*10^(-3);// [kJ/kmol square K]
+beeta_H2 = 3.509*10^(-3);// [kJ/kmol square K]
+beeta_CO = 4.631*10^(-3);// [kJ/kmol square K]
+beeta_H2O = 12.055*10^(-3);// [kJ/kmol square K]
+R = 8.314;// [J/mol K]
+//*************//
+
+delta_alpha = alpha_CO2 + alpha_H2 - (alpha_CO + alpha_H2O);
+delta_beeta = beeta_CO2 + beeta_H2 - (beeta_CO + beeta_H2O);
+// To obtain the standard heat of reaction:
+deltaH_0 = deltaH_298 - (delta_alpha*T1 + (delta_beeta*T1^2)/2);// [kJ/mol]
+// From Eqn. 12.52:
+IR = (deltaH_0 - delta_alpha*T1*log(T1) - (delta_beeta*T1^2)/2 - deltaGf_298)/T1;// [kJ/mol K]
+// Substituting T = T2 and IR in Eqn. 12.51:
+deltaG_1000 = deltaH_0 - delta_alpha*T2*log(T2) - (delta_beeta*T2^2)/2 - IR*T2;// [kJ/mol]
+printf("Standard Gibbs free energy at 1000 K %.3f kJ\n",deltaG_1000/1000);
+
+// Standard Equilibrium Constant at 1000 K
+K_1000 = exp(-(deltaG_1000)/(R*T2));
+printf("Standard Equilibrium Constant is %.1f",K_1000);
\ No newline at end of file |