blob: b45206c4c1bea66f5efc7f7109127c288dedb2dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
|