blob: 304cfc964ec496e9e26b59e32e2b89ad6e26f89a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
clear;
clc;
funcprot(0);
//given data
c1 = 300;//velocity in m/s
p01 = 200;//stagnation pressure in kPa
T01 = 200;//stagnation temperature in degC
c2 = 50;//exit velocity in m/s
eff_d = 0.9;//diffuser efficiency
gamma = 1.4;
R = 287;//in J/(kg.K)
Cp = 1005;//in J/(kg.K)
//Calculations
T01 = T01+273;//stagnation temperature in K
T1 = T01*(1-(c1^2)/(2*Cp*T01));
M1 = c1/sqrt(gamma*R*T1);
T2 = T01*(1-(c2^2)/(2*Cp*T01))
T2s_T1 = eff_d*(T2/T1 -1)+1;
p2_p1 = (T2s_T1)^(gamma/(gamma-1));
p01_p1 = (T01/T1)^(gamma/(gamma-1));
p1 = p01/p01_p1;
p2 = p2_p1*p1;
ds = Cp*log(T2/T1) - R*log(p2/p1);
//Results
printf('(i)The static temperature at inlet of the diffuser = %.1f K',T1);
printf('\n The static temperature at outlet of the diffuser = %.1f K',T2);
printf('\n The inlet Mach number = %.4f',M1);
printf('\n (ii) The static pressure at diffuser inlet = %.1f kPa',p1);
printf('\n (iii) The increase in entropy caused by the diffusion process = %.1f J/kg.K',ds);
//there are small errors in the answers given in textbook
|