summaryrefslogtreecommitdiff
path: root/2015/CH5/EX5.8/5_8.sce
blob: 5e8d5ca671a89eaa5af2b008b36484f8d5bfa338 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

clc
//initialisation of variables
clear
t1=323 //temp in k
c1=300 //velocity in m/s
c2=100 //velocity in m/s
cp=1.005 //kj/kgk
p1=10 //pressure in bar
p3=14 // pressure in bar
g= 32.2 //ft/sec^2
//CALCULATIONS
t2=t1+(((c1)^2)+(c2)^2)/(2*cp)
p2=p1*(t2/t1)^(g/(g-1))
t2=t1*(p3/p1)^((g-1)/g)
h3=cp*t2
x=(0.5*((c1)^2-(c2)^2))/1000 //x=h2-h1
h1=cp*t1
eff=(h3-h1)/(x)
//RESULTS
printf('diffuser efficiency is %2f',eff)