summaryrefslogtreecommitdiff
path: root/1379/CH2/EX2.1.4/example2_4.sce
blob: 211bfca8eb740f0033771d558c6f7e5a7316568f (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
//exapple 2.4 
clc; funcprot(0);
// Initialization of Variables
pi = %pi;
M=28.05/1000;
gamm=1.23;
R=8.314;
atm=101.3*1000;
P1=3*atm;
//calculation
//part1
P2=P1*(2/(gamm+1))^(gamm/(gamm-1));
disp(P2/1000,"pressure at nozzle throat (kPa):")
//part2
temp=273+50;
nu1=R*temp/P1/M;
G=18;//mass flow rate
nu2=nu1*(P2/P1)^(-1/gamm);
A=G^2*nu2^2*(gamm-1)/(2*gamm*P1*nu1*(1-(P2/P1)^((gamm-1)/gamm)));
d=sqrt(4*sqrt(A)/pi);
disp(d*100,"diameter required at nozzle throat in (cm)")
//part3
vel=sqrt(2*gamm*P1*nu1/(gamm-1)*(1-(P2/P1)^((gamm-1)/gamm)));
disp(vel,"sonic velocity at throat in(m/s):");