summaryrefslogtreecommitdiff
path: root/647/CH12/EX12.17/Example12_17.sce
diff options
context:
space:
mode:
Diffstat (limited to '647/CH12/EX12.17/Example12_17.sce')
-rwxr-xr-x647/CH12/EX12.17/Example12_17.sce31
1 files changed, 31 insertions, 0 deletions
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