summaryrefslogtreecommitdiff
path: root/1919/CH5/EX5.21
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1919/CH5/EX5.21
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 '1919/CH5/EX5.21')
-rwxr-xr-x1919/CH5/EX5.21/Ex5_21.sce24
1 files changed, 24 insertions, 0 deletions
diff --git a/1919/CH5/EX5.21/Ex5_21.sce b/1919/CH5/EX5.21/Ex5_21.sce
new file mode 100755
index 000000000..f1c2f4752
--- /dev/null
+++ b/1919/CH5/EX5.21/Ex5_21.sce
@@ -0,0 +1,24 @@
+
+// Theory and Problems of Thermodynamics
+// Chapter 5
+//Second Law of Thermodynamcis
+// Example 21
+
+clear ;clc;
+
+//Given data
+PA = 0.2 // pressure of air at station A in MPa
+TA = 423.15 // temperature of air at station A in K
+PB = 0.18 // pressure of air at station B in MPa
+TB = 403.15 // temperature of air at station B in K
+R = 8.314 // gas constant
+r = 1.4 // specific ration of heat capacities
+
+// for a flow process, the second law of thermodynamics s2>=s1
+//Hence, air flows in the direction of increasing entrophy
+// SB-SA = Cp*log(TB/TA)-Rlog(PB/PA)
+SB_SA = R*{[r/(r-1)]*log(TB/TA) - log(PB/PA)} //change in entrophy(SB-SA)
+
+// Output Results
+mprintf('The difference in SB and SA = %5.4f kJ/kmol K', SB_SA)
+mprintf('\n Hence the flow direction is from Station B to Station A')