summaryrefslogtreecommitdiff
path: root/2126/CH4/EX4.12/12.sce
blob: 8c15f58591e07de34ff6033da698acc68c3c7547 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
clc
clear

//input data
t1=3 //Stagnation temperature ratio
M2=0.8 //Mach number at exit

//calculation
t2=0.964 //Ratio of stagnation temperature at exit and critical state (Rayleigh,M2,k=1.4) 
p1=1.266 //Static Pressure ratio  at exit from gas tables (Rayleigh,M2,k=1.4)
t3=t2/t1 //Stagnation temperature ratio at critical state 
M1=0.29 //Mach number at entry from gas tables (Rayleigh,t3,k=1.4)
p2=2.147 //Static pressure ratio at critical state from gas tables (Rayleigh,k=1.4,M1)
p=p1/p2 //ratio of static pressures at exit and entry
PL=(1-p)*100 //Percentage loss in static pressure in %

//output
printf('(A)Mach number at entry is %3.2f\n (B)Percentage loss in static pressure is %3i percent',M1,PL)