summaryrefslogtreecommitdiff
path: root/647/CH5/EX5.18/Example5_18.sce
diff options
context:
space:
mode:
Diffstat (limited to '647/CH5/EX5.18/Example5_18.sce')
-rwxr-xr-x647/CH5/EX5.18/Example5_18.sce27
1 files changed, 27 insertions, 0 deletions
diff --git a/647/CH5/EX5.18/Example5_18.sce b/647/CH5/EX5.18/Example5_18.sce
new file mode 100755
index 000000000..082f9d42f
--- /dev/null
+++ b/647/CH5/EX5.18/Example5_18.sce
@@ -0,0 +1,27 @@
+clear;
+clc;
+
+// Example: 5.18
+// Page: 170
+
+printf("Example: 5.18 - Page: 170\n\n");
+
+// Solution
+
+//*****Data*****//
+m_iron = 40;// [kg]
+T1 = 625;// [K]
+m_water = 160;// [kg]
+T2 = 276;// [K]
+C_iron = 0.45;// [kJ/kg K]
+C_water = 4.185;// [kJ/kg K]
+//**************//
+
+deff('[y] = f(T)','y = m_iron*C_iron*(T1 - T) - m_water*C_water*(T - T2)');
+T = fsolve(7,f);// [K]
+// Change in Entropy of the iron casting can be estimated as:
+deltaS1 = m_iron*C_iron*log(T/T1);// [kJ/K]
+// Change in Entropy of Water is given by:
+deltaS2 = m_water*C_water*log(T/T2);// [kJ/K]
+deltaS = deltaS1 + deltaS2;// [kJ/K]
+printf("Total Entropy Change is %.2f kJ/K",deltaS); \ No newline at end of file