summaryrefslogtreecommitdiff
path: root/2507/CH8/EX8.12/Ex8_12.sce
diff options
context:
space:
mode:
Diffstat (limited to '2507/CH8/EX8.12/Ex8_12.sce')
-rwxr-xr-x2507/CH8/EX8.12/Ex8_12.sce22
1 files changed, 22 insertions, 0 deletions
diff --git a/2507/CH8/EX8.12/Ex8_12.sce b/2507/CH8/EX8.12/Ex8_12.sce
new file mode 100755
index 000000000..b45206c4c
--- /dev/null
+++ b/2507/CH8/EX8.12/Ex8_12.sce
@@ -0,0 +1,22 @@
+clc
+clear
+printf("Example 8.12 | Page number 225 \n\n");
+//Find the direction fo air flow
+//Given Data
+pA = 120 //kPa //Pressure at location A
+TA = 50+273 //K //Temperature at location A
+VA = 150 //m/s //Velocity at location A
+
+pB = 100 //kPa //Pressure at location B
+TB = 30+273 //K //Temperature at location B
+VB = 250 //m/s //Velocity at location B
+
+Cp = 1.005 //kJ/kg
+R = 0.287 //kJ/kgK
+//Solution
+delta_S_sys = (Cp*log(TB/TA))-(R*log(pB/pA)) //kJ/kgK //Entropy of system
+if delta_S_sys < 0 then
+ printf("Flow is from B to A.");
+else
+ printf("Flow is from A to B.")
+end