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/CH5/EX5.15/Example5_15.sce | |
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/CH5/EX5.15/Example5_15.sce')
-rwxr-xr-x | 647/CH5/EX5.15/Example5_15.sce | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/647/CH5/EX5.15/Example5_15.sce b/647/CH5/EX5.15/Example5_15.sce new file mode 100755 index 000000000..b0666eaa2 --- /dev/null +++ b/647/CH5/EX5.15/Example5_15.sce @@ -0,0 +1,27 @@ +clear;
+clc;
+
+// Example: 5.15
+// Page: 169
+
+printf("Example: 5.15 - Page: 169\n\n");
+
+// Solution
+
+//*****Data*****//
+m1 = 5;// [kg]
+m2 = 20;// [kg]
+C = 4.2;// [kJ/kg K]
+T1 = 350;// [K]
+T2 = 250;// [K]
+//**************//
+
+// Suppose the final temperature is T
+deff('[y] = f(T)','y = m1*C*(T1 - T) - m2*C*(T - T2)');
+T = fsolve(7,f);// [K]
+// Change in entropy of Hot Water:
+deltaS1 = m1*C*integrate('(1/T)','T',T1,T);// [kJ/K]
+// Change in Entopy of Hot Water:
+deltaS2 = m2*C*integrate('(1/T)','T',T2,T);// [kJ/K]
+deltaS = deltaS1 + deltaS2;// [kJ/K]
+printf("Change in Entropy is %.3f kJ/K",deltaS);
\ No newline at end of file |