Академический Документы
Профессиональный Документы
Культура Документы
1 Funded
Book Description
Title: Gas Dynamics and Jet Propulsion
Author: P. Murugaperumal
Publisher: Scitech Publications, Chennai
Edition: 1
Year: 2005
ISBN: 8188429937
Scilab numbering policy used in this document and the relation to the
above book.
Exa Example (Solved example)
Eqn Equation (Particular equation of the above book)
AP Appendix to Example(Scilab Code that is an Appednix to a particular
Example of the above book)
For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means
a scilab code whose theory is explained in Section 2.3 of the book.
Contents
List of Scilab Codes
12
46
74
104
124
6 Aircraft Propulsion
170
7 Rocket Propulsion
195
209
1.6
1.7
1.8
1.9
1.10
1.11
1.12
1.13
1.14
1.15
1.16
1.17
Exa 1.18
Exa 1.19
Exa 1.20
Exa 1.21
12
13
14
15
16
17
17
18
19
20
20
22
22
23
24
25
25
26
27
28
28
Exa
Exa
Exa
Exa
Exa
1.22
1.23
1.24
1.25
1.26
Exa 1.27
Exa 1.28
Exa 1.29
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
1.30
1.31
1.32
1.33
1.34
1.35
1.36
1.37
Exa
Exa
Exa
Exa
1.38
1.39
2.1
2.2
Exa 2.3
Exa
Exa
Exa
Exa
Exa
2.4
2.5
2.6
2.7
2.8
Exa 2.9
Exa 2.10
29
30
30
31
32
33
33
34
35
36
37
38
39
40
40
41
43
44
46
47
49
50
51
52
54
55
56
57
Exa 2.11
Exa 2.12
Exa 2.13
Exa 2.14
Exa 2.15
Exa 2.16
Exa 2.17
Exa 2.18
Exa 2.19
Exa 2.20
Exa 2.21
Exa 2.22
Exa 3.1
Exa 3.2
Exa 3.3
Exa 3.4
Exa 3.5
Exa 3.6
Exa 3.7
Exa 3.8
Exa 3.9
Exa 3.10
Exa 3.11
59
60
62
63
63
65
66
67
68
70
71
72
74
75
76
77
78
80
82
83
84
86
87
Exa 3.12
Exa 3.13
Exa 3.14
Exa 3.15
Exa 3.16
Exa 3.17
Exa 3.18
Exa 3.19
Exa 3.20
Exa 3.21
Exa 4.1
Exa 4.2
Exa 4.3
Exa 4.4
Exa 4.5
Exa 4.6
Exa 4.7
Exa 4.8
Exa 4.9
88
89
91
93
95
96
98
100
101
102
104
105
107
108
109
111
112
114
115
Exa 4.10
Exa 4.11
Exa 4.12
Exa 4.13
Exa 4.14
Exa 5.1
Exa 5.2
Exa 5.3
Exa 5.4
Exa
Exa
Exa
Exa
Exa
5.5
5.6
5.7
5.8
5.9
Exa 5.10
Exa 5.11
Exa 5.12
Exa 5.13
Exa 5.14
Exa 5.15
Exa 5.16
Exa 5.17
Exa 5.18
To find exit properties Maximum stagnation temperature percentage of pressure loss and initial mach number
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
To find Mach number and percentage drop in pressure 118
To find inlet mach number and percentage loss in static
pressure . . . . . . . . . . . . . . . . . . . . . . . . . . 119
To find inlet and exit mach number . . . . . . . . . . 120
To find properties at exit and sonic condition and heat
required to accelerate gas from inlet to sonic condition 121
To find Mach number before shock properties after shock
density increase loss of stagnation pressure and entropy
change of air in pipe . . . . . . . . . . . . . . . . . . . 124
To find properties across normal shock and entropy change 125
To find properties downstream of shock . . . . . . . . 127
To find velocities across shock and stagnation pressure
change . . . . . . . . . . . . . . . . . . . . . . . . . . 128
To find properties downstream of shock . . . . . . . . 129
To find pressure acting on front of the body . . . . . . 130
To find mass flow rate and properties at exit of CD nozzle 130
To find properties upstream of wave front . . . . . . . 133
To find properties downstream of shock total head pressure ratio entropy change strength of shock . . . . . . 134
To determine Mach number across shock and area at
shock . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
To find Mach number across shock Static pressure and
area at shock . . . . . . . . . . . . . . . . . . . . . . . 136
To find properties at various sections . . . . . . . . . . 137
To find mass flow rate and properties at throat and exit
at various sections of CD nozzle . . . . . . . . . . . . 139
To estimate the difference in mercury in limbs of U tube
manometer at various velocities . . . . . . . . . . . . 146
To estimate Mach number and properties across the normal shock of tube . . . . . . . . . . . . . . . . . . . . 147
To find Mach number and velocity in pitot tube . . . . 148
To find shock speed and air velocity inside the shock . 149
To compute speed of wave pressure and temperature of
air at rest . . . . . . . . . . . . . . . . . . . . . . . . 150
Exa 5.19
Exa 5.20
Exa 5.21
Exa 5.22
Exa 5.23
Exa 5.24
Exa 5.25
Exa 5.26
Exa 5.27
Exa 5.28
Exa 6.1
Exa 6.2
Exa 6.3
Exa 6.4
Exa 6.5
Exa 6.6
Exa 6.7
Exa 6.8
Exa 6.9
151
153
156
158
159
161
164
165
166
168
170
172
173
175
176
177
179
180
181
Exa 6.10
Exa 6.11
Exa 6.12
Exa 6.13
Exa 6.14
Exa 6.15
Exa 6.16
Exa 6.17
Exa 7.1
Exa 7.2
Exa 7.3
Exa 7.4
Exa 7.5
Exa 7.6
Exa 7.7
Exa 7.8
Exa 7.9
Exa 7.10
Exa 7.11
Exa 7.12
To calculate pressure rise pressured developed by compressor and air standard efficiency of the engine . . . . 182
To estimate diameter power output AFR and absolute
velocity of the jet . . . . . . . . . . . . . . . . . . . . 184
To determine jet velocity thrust specific thrust TSFC
thrust power and efficiencies . . . . . . . . . . . . . . 185
To jet velocity fuel rate TSFC propulsive power and
efficiencies . . . . . . . . . . . . . . . . . . . . . . . . 186
To find absolute jet velocity volume of air compressed
diameter power output and air fuel ratio of the jet . . 187
To estimate AFR nozzle thrust propeller thrust and
mass flow rate . . . . . . . . . . . . . . . . . . . . . . 188
To find various parameters of ramjet engine through out
its operation . . . . . . . . . . . . . . . . . . . . . . . 190
To find power input power output Fuel air ratio Exit
Mach number thrust and thrust power developed in the
jet . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
To find thrust of the motor of a rocket . . . . . . . . . 195
To calculate area ratio thrust characteristic velocity thrust
coefficient exit velocity and possible maximum velocity 196
To estimate thrust per unit area and specific impulse
197
To find specific impulse specific propellant consumption
effective and absolute jet velocity of rocket . . . . . . 198
To find propulsive efficiency thrust and thrust power of
rocket . . . . . . . . . . . . . . . . . . . . . . . . . . 199
To find velocity and maximum height that rocket will
reach . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
To determine thrust coefficient propellant weight flow
coefficient SPC and characteristic velocity of rocket . 201
To find various parameters of rocket projectile during
its operation . . . . . . . . . . . . . . . . . . . . . . . 202
To propulsive power engine output and efficiencies . . 203
To find thrust specific impulse and efficiencies . . . . 204
To find specific impulse SPC effective and actual jet
velocity and efficiencies . . . . . . . . . . . . . . . . . 204
To find propellant flow rate thrust developed and height
attained during powered and coasting flights . . . . . 206
10
Exa 7.13
Exa
Exa
Exa
Exa
Exa
7.14
8.1.34
8.1.35
8.1.37
8.1.38
Exa
Exa
Exa
Exa
Exa
8.1.39
8.1.40
8.3.10
8.3.15
8.3.31
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
8.3.32
8.3.33
8.5.16
8.5.17
8.5.20
8.5.21
8.5.22
8.6.41
8.6.42
8.7.42
8.7.44
8.7.45
8.7.46
Exa 8.7.47
Exa 8.7.48
11
207
208
209
210
210
211
212
212
213
213
214
214
215
216
216
217
217
218
219
219
220
221
221
222
222
223
Chapter 1
Compressible Flow
Fundamentals
clc
clear
// I n p u t d a t a
m =0.75 // Mass o f a i r i n kg
T1 =800 // I n t i a l T e m p e r a t u r e i n K
P1 =400 // I n i t i a l P r e s s u r e i n kPa
P2 =150 // F i n a l P r e s s u r e i n kPa
k =1.4 // A d i a b a t i c c o n s t a n t
R =0.287 // S p e c i f i c Gas c o n s t a n t i n J / kgK
// C a l c u l a t i o n
p1 = P2 / P1 // p r e s s u r e r a t i o o f p r o c e s s
T2 = T1 * p1 ^(( k -1) / k ) // F i n a l t e m p e r a t u r e i n K
W =(( m * R *( T1 - T2 ) ) /( k -1) ) // Workdone i n kJ
//PV Diagram
scf ()
clf ()
12
graph , a d i a b a t i c e x p a n s i o n
23 P = P1 * V1 ^ k ./ V ^ k // R e p r e s e n t i n g p r e s s u r e on g r a p h
24 plot (V , P ) // P l o t t i n g
25 legend ( PV k=C ) // D e f i n i n g c u r v e
26 xtitle ( PV Diagram , V ( c c ) , P ( kPa ) ) // T i t l e s
of axes
27
28
29
// Output
printf ( Workdone i s %3 . 2 f kJ ,W )
Scilab code Exa 1.2 To calculate heat transfer internal energy change and
work done
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
clc
clear
// I n p u t d a t a
V1 =0.35 // Volume o f g a s i n m3
P1 =110 // I n i t i a l P r e s s u r e i n kPa
T1 =300 // I n t i a l T e m p e r a t u r e i n K
P2 =600 // F i n a l P r e s s u r e i n kPa , m i s s i n g d a t a
k =1.4 // A d i a b a t i c c o n s t a n t
Cv =718 // S p e c i f i c h e a t a t c o n s t a n t volume i n J / kgK
R =287 // S p e c i f i c Gas c o n s t a n t i n J / kgK
// C a l c u l a t i o n
dQ =0 // Heat t r a n s f e r i n J , S i n c e A d i a b a t i c p r o c e s s
m =( P1 *10^3* V1 ) /( R * T1 ) // Mass o f a i r i n kg
p1 = P2 / P1 // P r e s s u r e r a t i o
T2 = T1 * p1 ^(( k -1) / k ) // F i n a l t e m p e r a t u r e i n K
dU =( m * Cv *( T2 - T1 ) ) *10^ -3 // Change i n i n t e r n a l e n e r g y
i n kJ
13
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
dW = - dU // Workdone i n kJ , S i n c e dQ=0
//PV Diagram
scf ()
clf ()
V1cc = V1 *10^3 // I n l e t volume i n c c
V2cc = V1cc *( T2 / T1 ) ^(1/( k -1) ) // F i n a l volume i n c c
V = V1cc :( V2cc - V1cc ) /100: V2cc
// R e p r e s e n t i n g
volume on graph , a d i a b a t i c e x p a n s i o n
P = P2 * V1cc ^ k ./ V ^ k // R e p r e s e n t i n g p r e s s u r e on g r a p h
plot (V , P ) // P l o t t i n g
legend ( PV k=C ) // D e f i n i n g c u r v e
xtitle ( PV Diagram , V ( c c ) , P ( kPa ) ) // T i t l e s
of axes
// Output
printf ( (A) Heat t r a n s f e r i s %3i J \n (B) Change i n
i n t e r n a l e n e r g y i s %3 . 3 f kJ \n (C) Workdone i s %3 . 3
f kJ \n ,dQ , dU , dW )
Scilab code Exa 1.3 To determine temperature enthalpy drop and internal
energy change
1
2
3
4
5
6
7
8
9
10
11
12
clc
clear
// I n p u t d a t a
P1 =3.2 // I n i t i a l P r e s s u r e i n
P2 =1 // F i n a l P r e s s u r e i n b a r
T1 =475 // I n i t i a l t e m p e r a t u r e
Mol =44 // M o l e c u l a r w e i g h t o f
Ri =8314 // I d e a l g a s c o n s t a n t
k =1.3 // A d i a b a t i c c o n s t a n t
// C a l c u l a t i o n
14
bar
in K
c a r b o n d i o x i d e i n kg / mol
i n J / molK
13 R = Ri / Mol // S p e c i f i c g a s c o n s t a n t i n J / kgK
14 Cp =( k * R ) /( k -1) // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
15
16
17
18
19
20
21
22
p r e s s u r e i n J / kgK
Cv = Cp / k // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t volume
i n J / kgK
p1 = P2 / P1 // P r e s s u r e r a t i o
T2 = T1 * p1 ^(( k -1) / k ) // F i n a l T e m p e r a t u r e
dh = Cp *( T1 - T2 ) *10^ -3 // E n t h a l p y d r o p i n kJ / kg
dU = Cv *( T2 - T1 ) *10^ -3 // Change i n i n t e r n a l e n e r g y i n
kJ / kg , ve s i g n i n d i c a t e s l o s s
// Output
printf ( (A) T e m p e r a t u r e i s %3 . 3 f K\n (B) E n t h a l p y d r o p
i s %3 . 3 f kJ / kg \n (C) Change i n i n t e r n a l e n e r g y i s
%3 . 2 f kJ / kg i . e . %3 . 2 f kJ / kg ( l o s s ) ,T2 , dh , dU , abs
( dU ) )
Scilab code Exa 1.4 To determine properties at outlet and area ratio of
diffuser
1
2
3
4
5
6
7
8
9
clc
clear
// I n p u t d a t a
P1 =0.5 // I n i t i a l P r e s s u r e i n b a r
T1 =50+273 // I n t i a l T e m p e r a t u r e i n K
C1 =240 // I n l e t v e l o c i t y i n m/ s
C2 =120 // O u t l e t v e l o c i t y i n m/ s , m i s s i n g d a t a
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
10 k =1.4 // A d i a b a t i c c o n s t a n t
11
12 // C a l c u l a t i o n
13 T2 = T1 +(( C1 ^2 - C2 ^2) /(2* Cp ) ) // F i n a l T e m p e r a t u r e i n K
14 t1 = T2 / T1 // T e m p e r a t u r e r a t i o
15
15 P2 = P1 * t1 ^( k /( k -1) ) // F i n a l P r e s s u r e i n b a r
16 ar =( P1 * T2 * C1 ) /( P2 * T1 * C2 ) // R a t i o o f o u t l e t t o
inlet
area
17
18
19
// Output
printf ( (A) At o u t l e t : \ n
T e m p e r a t u r e i s %3 . 2 f K\n
P r e s s u r e i s %3 . 4 f b a r \n (B) R a t i o o f o u t l e t t o
i n l e t a r e a i s %3 . 4 f ,T2 , P2 , ar )
Scilab code Exa 1.5 To determine static pressure and axial force of turbojet engine
1
2
3
4
5
6
7
8
9
10
11
clc
clear
// I n p u t d a t a
m =25 // Mass f l o w r a t e o f a i r i n kg / s
C2 =115 // O u t l e t v e l o c i t y i n m/ s
P1 =100 // // I n i t i a l P r e s s u r e i n kPa
T1 =300 // I n t i a l T e m p e r a t u r e i n K
C1 =40 // I n l e t v e l o c i t y i n m/ s
R =0.287 // S p e c i f i c g a s c o n s t a n t i n kJ / kgK
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
12 k =1.4 // A d i a b a t i c c o n s t a n t
13
14
15
16
17
18
19
20
// C a l c u l a t i o n
T2 = T1 +(( C1 ^2 - C2 ^2) /(2* Cp ) ) // F i n a l T e m p e r a t u r e i n K
t1 = T2 / T1 // T e m p e r a t u r e r a t i o
P2 = P1 * t1 ^( k /( k -1) ) // F i n a l P r e s s u r e i n b a r
A1 =( m * R * T1 ) /( P1 * C1 ) // Area a t i n l e t i n m2
A2 =( m * R * T2 ) /( P2 * C2 ) // Area a t o u t l e t i n m2
F =(( P1 * A1 ) -( P2 * A2 ) ) +( m *( C1 - C2 ) ) *10^ -3 // A x i a l f o r c e
on m o u t h p i e c e r e s u l t i n g from a c c e l e r a t i o n o f a i r
i n kN
16
21
22
23
// Output
printf ( (A) S t a t i c p r e s s u r e a t i n t a k e f a c e i s %3 . 3 f
kPa \n (B) Magnitude o f a x i a l f o r c e on m o u t h p i e c e
r e s u l t i n g from a c c e l e r a t i o n o f a i r i s %3 . 3 f kN ,
P2 , F )
clc
clear
// I n p u t d a t a
P =200 // P r e s s u r e i n kPa
C =50 // V e l o c i t y o f a i r i n m/ s
d =2.9 // D e n s i t y i n kg /m3
Mol =32 // M o l e c u l a r w e i g h t o f o x y g e n i n kg / mol
k =1.4 // A d i a b a t i c c o n s t a n t
Ri =8314 // I d e a l g a s c o n s t a n t i n J / molK
// C a l c u l a t o r
R = Ri / Mol // S p e c i f i c g a s c o n s t a n t i n J / kgK
T = P *10^3/( R * d ) // T e m p e r a t u r e i n K
a = sqrt ( k * R * T ) // V e l o c i t y o f sound i n m/ s
M = C / a // Mach number
// Output
printf ( Mach number i s %3 . 2 f ,M )
17
3
4
5
6
7
8
9
// I n p u t d a t a
Pa =1.3 // P r e s s u r e a t s e c t i o n A i n b a r
Ta =50+273 // T e m p e r a t u r e a t s e c t i o n A i n K
Pb =1 // P r e s s u r e a t s e c t i o n B i n b a r
Tb =13+273 // T e m p e r a t u r e a t s e c t i o n B i n K
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
10 R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
11
12 // C a l c u l a t i o n
13 ds =(( Cp * log ( Tb / Ta ) ) -( R * log ( Pb / Pa ) ) ) *10^ -3 // The
c h a n g e i n t h e e n t r o p y i s kJ / kg
14 //+ve s i g n i n d i c a t e s A t o B
15 //ve s i g n i n d i c a t e s B t o A
16
17
18
// Output
printf ( The c h a n g e i n t h e e n t r o p y i s %3 . 4 f kJ / kg \n
S i n c e v a l u e i s ve , p r o c e s s must t a k e s p l a c e from
B t o A , ds )
clc
clear
// I n p u t d a t a
V1 =8 // I n t i a l volume i n l i t r e
V2 =7.8 // F i n a l volume i n l i t r e
P1 =0.7 // I n t i a l P r e s s u r e i n MPa
P2 =2.7 // F i n a l P r e s s u r e i n MPa
// C a l c u l a t i o n s
K =( P2 - P1 ) /( log ( V1 / V2 ) ) // Bulk modulus o f l i q u i d i n
kPa
18
12
13
14
// Output
printf ( Bulk modulus o f l i q u i d i s %3 . 3 f kPa ,K )
fill
pressure
v e s s e l i n m3
6 P =3000 // T e s t p r e s s u r e i n b a r
7 dv =0.6 // Change o f empty volume o f
c o n t a i n e r due t o
p r e s s u r i s a t i o n in percentage
8 K =20000 // Bulk modulus o f w a t e r i n MPa
9
10 // C a l c u l a t i o n
11 m1 = V1 *10^3 // Mass o f w a t e r r e q u i r e d t o f i l l
pressure
v e s s e l i n kg
12 Vr =( P * V1 ) / K // Reduced volume o f w a t e r due t o
13
14
15
16
17
18
19
c o m p r e s s i o n i n m3
Vi = dv * V1 /100 // I n c r e a s e d volume o f c o n t a i n e r i n m3
V = Vr + Vi // Volume o f a d d i t i o n a l w a t e r r e q u i r e d i n m3
m = V *10^3 // Mass o f a d d i t i o n a l w a t e r r e q u i r e d i n kg
mt = m1 + m // T o t a l mass o f w a t e r r e q u i r e d i n l i t r e ,
S i n c e 1 kg=1 L i t
// Output
printf ( Mass o f w a t e r t o be pumped i n t o t h e v e s e l t o
o b t a i n t h e d e s i r e d p r e s s u r e i s %3i l i t , mt )
19
o i l i n m/ s
16 a_hg = sqrt ( K_hg / d_hg ) // S o n i c v e l o c i t y o f m e r c u r y i n
m/ s
17 a_steel = sqrt ( E_steel / d_steel ) // S o n i c v e l o c i t y o f
s t e e l i n m/ s
18
19
20
// Output
printf ( (A) S o n i c v e l o c i t y o f c r u d e o i l i s %3 . 2 f m/ s \
n (B) S o n i c v e l o c i t y o f m e r c u r y i s %3 . 2 f m/ s \n (A)
S o n i c v e l o c i t y o f s t e e l i s %3 . 1 f m/ s \n , a_oil ,
a_hg , a_steel )
20
5 T =20+273 // T e m p e r a r t u r e o f medium i n K
6 Cp_fr =678 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
7
p r e s s u r e o f f r e o n i n J / kgK
Cv_fr =543 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
v o l i m e o f f r e o n i n J / kgK
T_air =0+273 // T e m p e r a t u r e o f a i r i n K
Ri =8314 // I d e a l g a s c o n s t a n t i n J / molK
mol_h =2 // M o l e c u l a r w e i g h t o f Hydrogen i n kg / mol
mol_water =18 // M o l e c u l a r w e i g h t o f w a t e r i n kg / mol
R_air =287 // S p e c i f i c g a s c o n s t a n t o f a i r i n J / kgK
k =1.4 // A d i a b a t i c c o n s t a n t o f h y d r o g e n
k_water =1.3 // A d i a b a t i c c o n s t a n t o f w a t e r
8
9
10
11
12
13
14
15
16 // C a l c u l a t i o n
17 R_h = Ri / mol_h // S p e c i f i c
18
19
20
21
22
23
24
25
26
27
gas c o n s t a n t o f hydrogen in
J / kgK
a_h = sqrt ( k * R_h * T ) // V e l o c i t y o f sound i n h y d r o g e n i n
m/ s
R_water = Ri / mol_water // S p e c i f i c g a s c o n s t a n t o f
w a t e r i n J / kgK
a_water = sqrt ( k_water * R_water * T ) // V e l o c i t y o f sound
i n w a t e r v a p o u r i n m/ s
k_fr = Cp_fr / Cv_fr // A d i a b a t i c c o n s t a n t o f f e o a n
R_fr = Cp_fr - Cv_fr // S p e c i f i c g a s c o n s t a n t o f f r e o n i n
J / kgK
a_fr = sqrt ( k_fr * R_fr * T ) // V e l o c i t y o f sound i n f r e o n
i n m/ s
a_air = sqrt ( k * R_air * T_air ) // S o n i c V e l o c i t y o f a i r a t
i n m/ s
// Output
printf ( (A) V e l o c i t y o f sound i n h y d r o g e n i s %3 . 2 f m/
s \n (B) V e l o c i t y o f sound i n w a t e r v a p o u r i s %3 . 2 f
m/ s \n (C) V e l o c i t y o f sound i n f r e o n i s %3 . 2 f m/ s
\n (D) S o n i c V e l o c i t y o f a i r a t %3i K i s %3 . 4 f m/ s
,a_h , a_water , a_fr , T_air , a_air )
21
Scilab code Exa 1.12 To find highest pressure acting on surface of a body
1
2
3
4
5
6
7
8
9
10
11
12
13
clc
clear
// I n p u t d a t a
M =0.85 // Mach number
P =80 // P r e s s u r e i n kPa
k =1.4 // A d i a b a t i c C o n s t a n t
// C a l c u l a t i o n
Po = P *(1+((( k -1) /2) * M ^2) ) ^( k /( k -1) ) // P r e s s u r e a c t i n g
on t h e s u r f a c e o f t h e body i n kPa
// Output
printf ( The h i g h e s t p r e s s u r e a c t i n g on t h e s u r f a c e
o f t h e body i s %3 . 1 f kPa , Po )
Scilab code Exa 1.13 To find air velocity for different types of flow
1
2
3
4
5
6
7
8
9
10
11
12
clc
clear
// I n p u t d a t a
P =96 // P r e s s u r e i n kPa
T =27+273 // T e m p e r a t u r e i n K
dP =32 // D i f f e r e n c e b e t w e e n p i v o t and s t a t i c p r e s s u r e
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c Gas c o n s t a n t i n J / kgK
// C a l c u l a t i o n
d =( P *10^3) /( R * T ) // D e n s i t y i n kg /m3
22
of
i n c o m p r e s s i b l e f l o w i n m/ s
pr =( dP ) / P // P r e s s u r e r a t i o
p1 = pr +1 // S t a g n a t i o n t o s t a t i c p r e s s u r e r a t i o
M = sqrt ((( p1 ^(( k -1) / k ) -1) *2) /( k -1) ) // Mach number
Cc = M * sqrt ( k * R * T ) // V e l o c i t y o f c o m p r e s s i b l e f l o w i n
m/ s
// Output
printf ( (A) A i r v e l o c i t y i n i n c o m p r e s s i b l e f l o w i s %3
. 1 f m/ s \n (B) A i r v e l o c i t y i f f l o w i s c o m p r e s s i b l e
i s %3 . 3 f m/ s ,Ci , Cc )
clc
clear
// I n p u t d a t a
T1 =200+273 // I n t i a l T e m p e r a t u r e i n K
P1 =1.7 // I n i t i a l P r e s s u r e i n b a r
P2 =1 // F i n a l P r e s s u r e i n b a r
C1 =30 // I n l e t v e l o c i t y i n m/ s
m =1 // Mass f l o w r a t e i n kg / s
D =0.025 // N o z z l e d i a m e t e r i n m
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c Gas c o n s t a n t i n J / kgK
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
14
15 // C a l c u l a t i o n
16 p1 = P2 / P1 // P r e s s u r e r a t i o
17 T2 = T1 * p1 ^(( k -1) / k ) // F i n a l t e m p e r a t u r e i n K
18 E1 = T1 +( C1 ^2/(2* Cp ) ) //LHS o f S t e a d y f l o w e n e r g y
equation
23
19 C2 = sqrt (( E1 - T2 ) *2* Cp ) // E x i t
v e l o c i t y of the a i r in
m/ s
20 d2 =( P2 *10^5) /( R * T2 ) // D e n s i t y a t
21 A2 = %pi * D ^2/4 // Area a t o u t l e t i n
22 n = ceil ( m /( d2 * A2 * C2 ) ) // Number o f
23
24 // Output
25 printf ( (A) E x i t v e l o c i t y o f t h e
o u t l e t i n kg /m3
m2
n o z z l e s t o be u s e d
a i r i s %3 . 2 f m/ s \n (
B) Number o f n o z z l e s t o be u s e d a r e %1 . 0 f ,C2 , n )
clc
clear
// I n p u t d a t a
Po =300 // P r e s s u r e i n t h e v e s s e l i n kPa
To =50+273 // T e m p e r a t u r e i n v e s s e l i n K
M =1 // Mach number
k =1.667 // A d i a b a t i c c o n s t a n t
Ri =8314 // I d e a l g a s c o n s t a n t i n J / molK
Mol =4 // M o l e c u l a r w e i g h t o f h e l i u m i n kg / mol
// C a l c u l a t i o n
R = Ri / Mol // S p e c i f i c g a s c o n s t a n t i n J / kgK
Cp =( k * R ) /( k -1) // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
p1 =(2/( k +1) ) ^( k /( k -1) ) // P r e s s u r e r a t i o
Pt = Po * p1 // P r e s s u r e a t t e s t c o n d i t i o n i n kPa
t1 =(2/( k +1) ) // T e m p e r a t u r e r a t i o
Tt = To * t1 // T e m p e r a t u r e a t t e s t c o n d i t i o n i n K
at = sqrt ( k * R * Tt ) // V e l o c i t y o f sound i n m/ s
Ct = at // V e l o c i t y o f g a s a t t e s t c o n d i t i o n i n m/ s
Cmax = sqrt (2* Cp * To ) //Maximum v e l o c i t y due t o
e x p a n d i n g o f g a s e s t h r o u g h n o z z l e s y s t e m i n m/ s
24
22
23
24
// Output
printf ( (A) At t e s t p o i n t : \ n
P r e s s u r e i s %3 . 2 f kPa
\n
T e m p e r a t u r e i s %3 . 2 f K\n
V e l o c i t y i s %3
. 1 f m/ s \n (B) Maximum v e l o c i t y due t o e x p a n d i n g o f
g a s e s t h r o u g h n o z z l e s y s t e m i s %3 . 2 f m/ s ,Pt , Tt ,
Ct , Cmax )
Scilab code Exa 1.16 To find mach number and velocity of flow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
clc
clear
// I n p u t d a t a
T =40+273 // T e m p e r a t u r e i n K
p1 =0.5 // S t a t i c t o S t a g n a t i o n p r e s s u r e r a t i o
k =1.67 // A d i a b a t i c c o n s t a n t
Ri =8314 // I d e a l g a s c o n s t a n t i n J / molK
Mol =39.94 // M o l e c u l a r w e i g h t o f a r g o n i n kg / mol
// C a l c u l a t i o n
R = Ri / Mol // S p e c i f i c g a s c o n s t a n t i n J / kgK
p2 =1/ p1 // P r e s s u r e r a t i o
M = sqrt ((( p2 ^(( k -1) / k ) -1) *2) /( k -1) ) // Mach number
C = M * sqrt ( k * R * T ) // V e l o c i t y i n t h e f l o w i n m/ s
// Output
printf ( (A) Mach number i s %3 . 3 f \n (B) V e l o c i t y i n t h e
f l o w i s %3 . 1 f m/ s ,M , C )
Scilab code Exa 1.17 To find distance covered before sonic boom is heard
on ground
25
1
2
3
4
5
6
7
8
9
10
11
12
13
clc
clear
// I n p u t d a t a
M =2.5 // Mach number
h =10 // H e i g h t i n km
// C a l c u l a t i o n
alp = asind (1/ M ) // Mach c o n e a n g l e i n d e g r e e
d =10/ tand ( alp ) // D i s t a n c e t h e j e t would c o v e r b e f o r e
a s o n i c boom i s h e a r d on g r o u n d i n km
// Output
printf ( D i s t a n c e t h e j e t would c o v e r b e f o r e a s o n i c
boom i s h e a r d on g r o u n d i s %3 . 2 f km ,d )
Scilab code Exa 1.18 To calculate time elapsed to feel disturbance due to
aircraft
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
clc
clear
// I n p u t d a t a
h =1100 // H e i g h t i n m
M1 =2.5 // Mach number o f a i r c r a f t @h
T =280 // T e m p e r a t u r e @h
M2 =0.5 // Mach number o f o b s e r v e r
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
alp = asind (1/ M1 ) // Mach c o n e a n g l e i n d e g r e e
a = sqrt ( k * R * T ) // V e l o c i t y o f sound i n m/ s
C1 = M1 * a // V e l o c i t y o f a i r c r a f t when t h e o b s e r v e r i s
s t a t i o n a r y i n m/ s
26
i s stationary in sec
17 C2 =( M1 - M2 ) * a // V e l o c i t y
o f a i r c r a f t when t h e
o b s e r v e r i s moving i n t h e d i r e c t i o n o f a i r c r a f t
i n m/ s
18 t2 = h /( C2 * tand ( alp ) ) // Time e l a p s e d when t h e o b s e r v e r
i s moving i n t h e d i r e c t i o n o f a i r c r a f t i n s e c
19 C3 =( M1 + M2 ) * a // V e l o c i t y o f a i r c r a f t when t h e
o b s e r v e r i s moving i n t h e o p p o s i t e d i r e c t i o n i n m
/s
20 t3 = h /( C3 * tand ( alp ) ) // Time e l a p s e d when t h e o b s e r v e r
i s moving i n t h e o p p o s i t e d i r e c t i o n i n s e c
21
22
23
// Output
printf ( (A) Time e l a p s e d when t h e o b s e r v e r i s
s t a t i o n a r y i s %3 . 3 f s e c \n (B) Time e l a p s e d when
t h e o b s e r v e r i s moving i n t h e d i r e c t i o n o f
a i r c r a f t w i t h M=%3 . 1 f i s %3 . 2 f s e c \n (C) Time
e l a p s e d when t h e o b s e r v e r i s moving i n t h e
o p p o s i t e d i r e c t i o n i s %3 . 2 f s e c \n ,t1 , M2 , t2 , t3 )
clc
clear
// I n p u t d a t a
P =200 // P r e s s u r e i n kPa
d =2.9 // D e n s i t y i n kg /m3
C =50 // V e l o c i t y i n m/ s
mol =32 // M o l e c u l a r w e i g h t o f o x y g e n i n kg / mol
k =1.4 // A d i a b a t i c c o n s t a n t
Ri =8314 // I d e a l g a s c o n s t a n t i n J / molK
// C a l c u l a t i o n
27
13
14
15
16
17
18
19
R = Ri / mol // S p e c i f i c g a s C o n s t a n t i n J / kgk
T =( P *10^3) /( R * d ) // T e m p e r a t u r e i n K
a = sqrt ( k * R * T ) // V e l o c i t y o f sound i n m/ s
M = C / a // Mach number
// Output
printf ( Mach number i s %3 . 4 f ,M )
clc
clear
// I n p u t d a t a
C =200 // V e l o c i t y o f o b j e c t i n m/ s
mol =4 // M o l e c u l a r w e i g h t o f h e l i u m i n kg / mol
k =1.67 // A d i a b a t i c c o n s t a n t
Ri =8314 // I d e a l g a s c o n s t a n t i n J / molK
T =288 // T e m p e r a t u r e i n K
// C a l c u l a t i o n
R = Ri / mol // S p e c i f i c g a s C o n s t a n t i n J / kgk
a = sqrt ( k * R * T ) // V e l o c i t y o f sound i n m/ s
M = C / a // Mach number
// Output
printf ( Mach number i s %3 . 1 f ,M )
Scilab code Exa 1.21 To find speed of sound and Mach number
1 clc
2 clear
3
28
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// I n p u t d a t a
Z1 =0 // H e i g h t from s e a l e v e l i n m
Z2 =11 // H e i g h t from s e a l e v e l i n m
T1 =288 // T e m p e r a t u r e @Z1 i n K, from g a s t a b l e s
T2 =216.5 // T e m p e r a t u r e @Z2 i n K, from g a s t a b l e s
C =1000*(5/18) // V e l o c i t y i n m/ s
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgk
// C a l c u l a t i o n
a1 = sqrt ( k * R * T1 ) // Sound v e l o c i t y @Z1 i n m/ s
M1 = C / a1 // Mach number @Z1
a2 = sqrt ( k * R * T2 ) // Sound v e l o c i t y @Z2 i n m/ s
M2 = C / a2 // Mach number @Z2
// Output
printf ( (A) Speed o f sound a t : \ n
s e a l e v e l i s %3 . 2
f \n
an a l t i t u d e o f %3i km i s %3 . 2 f m/ s \n (B)
Mach numbeer a t : \ n
s e a l e v e l i s %3 . 2 f \n
an
a l t i t u d e o f %3i km i s %3 . 2 f ,a1 , Z2 , a2 , M1 , Z2 , M2 )
clc
clear
// I n p u t d a t a
T =300+273 // S t a t i c T e m p e r a t u r e i n K
C =200 // V e l o c i t y i n m/ s
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
8
9 // C a l c u l a t i o n
10 To = T +( C ^2/(2* Cp ) ) // S t a g n a t i o n T e m p e r a t u r e i n K
11 C_max = sqrt (2* Cp * To ) //Maximum p o s s i b l e v e l o c i t y
29
o b t a i n e d by a i r i n m/ s
12
13
14
// Output
printf ( Maximum p o s s i b l e v e l o c i t y o b t a i n e d by a i r i s
%3 . 2 f m/ s , C_max )
between a i r i n s i d e
t h e t y r e and n o z z l e e x i t
6 Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
7
8 // C a l c u l a t i o n
9 C = sqrt (2* Cp * dT ) // E x i t v e l o c i t y o f a i r i n m/ s
10
11 // Output
12 printf ( E x i t v e l o c i t y o f a i r i s %3 . 1 f m/ s ,C )
Scilab code Exa 1.24 To find static conditions and Flight Mach number
1
2
3
4
5
6
7
clc
clear
// I n p u t d a t a
C =800*(5/18) // V e l o c i t y i n m/ s
Po =105 // S t a g n a t i o n p r e s s u r e i n kPa
To =35+273 // S t a g n a t i o n t e m p e r a t u r e i n K
30
8 Cp =1005 // S p e c i f i c
// C a l c u l a t i o n
T = To -( C ^2/(2* Cp ) ) // S t a t i c t e m p e r a t u r e i n K
P = Po *( T / To ) ^( k /( k -1) ) // S t a t i c p r e s s u r e i n kPa
a = sqrt ( k * R * T ) // Sound V e l o c i t y i n m/ s
M = C / a // Mach number
// Output
printf ( (A) S t a t i c c o n d i t i o n s : \ n
P r e s s u r e i s %3 . 2 f
kPa \n
T e m p e r a t u r e i s %3 . 2 f K\n
Sound
V e l o c i t y i s %3 . 2 f m/ s \n (B) Mach number i s %3 . 2 f ,
P ,T ,a , M )
Scilab code Exa 1.25 To find stagnation pressure and mach number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
clc
clear
// I n p u t d a t a
C =215 // V e l o c i t y i n m/ s
T =30+273 // S t a t i c t e m p e r a t u r e i n K
P =5 // S t a t i c p r e s s u r e i n b a r
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgk
k =1.4 // A d i a b a t i c C o n s t a n t
// C a l c u l a t i o n s
a = sqrt ( k * R * T ) // Sound V e l o c i t y i n m/ s
M = C / a // Mach number
To = T *(1+((( k -1) /2) * M ^2) ) // S t a g n a t i o n t e m p e r a t u r e i n
K
15 Po = P *( To / T ) ^( k /( k -1) ) // S t a g n a t i o n p r e s s u r e i n kPa
31
16
17
18
// Output
printf ( (A) S t a g n a t i o n P r e s s u r e i s %3 . 4 f b a r \n (B)
Mach number i s %3 . 3 f ,Po , M )
clc
clear
// I n p u t d a t a
T =400 // S t a t i c t e m p e r a t u r e i n K
k =1.4 // A d i a b a t i c C o n s t a n t
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
8 R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgk
9
10 // C a l c u l a t i o n
11 a = sqrt ( k * R * T ) // Sound v e l o c i t y i n m/ s
12 C = a // V e l o c i t y o f j e t i n m/ s , S i n c e j e t h a s s o n i c
13
14
15
16
17
18
19
20
velocity
To = T +( C ^2/(2* Cp ) ) // S t a g n a t i o n t e m p e r a t u r e i n K
ao = sqrt ( k * R * To ) // Sound v e l o c i t y a t S t a g n a t i o n
c o n d i t i o n i n m/ s
ho =( Cp * To ) *10^ -3 // S t a g n a t i o n e n t h a l p y i n kJ / kg
C_max = sqrt (2* Cp * To ) //Maximum v e l o c i t y o f j e t i n m/ s
cr = C / C_max // C r o c c o number
// Output
printf ( (A) V e l o c i t y o f sound a t %3i K i s %3 . 3 f m/ s \n
(B) V e l o c i t y o f sound a t s t a g n a t i o n c o n d i t i o n i s
%3 . 3 f m/ s \n (C) Maximum v e l o c i t y o f j e t i s %3 . 3 f m
/ s \n (D) S t a g n a t i o n e n t h a l p y i s %3 . 3 f kJ / kg \n (E)
C r o c c o number i s %3 . 4 f ,T ,C , ao , C_max , ho , cr )
32
Scilab code Exa 1.27 To find stagnation conditions and mass flow rate
1
2
3
4
5
6
7
8
9
10
clc
clear
// I n p u t d a t a
C =250 // V e l o c i t y o f a i r i n m/ s
D =10 // D i a m e t e r i n d u c t i n cm
T =5+273 // S t a t i c t e m p e r a t u r e i n K
P =40 // S t a t i c p r e s s u r e i n kPa
k =1.4 // A d i a b a t i c c o n s t a n t
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
11 R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgk
12
13
14
15
16
17
18
19
20
21
// C a l c u l a t i o n
To = T +( C ^2/(2* Cp ) ) // S t a g n a t i o n t e m p e r a t u r e i n K
Po = P *( To / T ) ^( k /( k -1) ) // S t a g n a t i o n p r e s s u r e i n kPa
d =( P *10^3) /( R * T ) // D e n s i t y i n kg /m3
A =( %pi * D ^2/4) *10^ -4 // Area i n m2
m = d * A * C // Mass f l o w r a t e i n kg / s
// Output
printf ( (A) S t a g n a t i o n p r e s s u r e i s %3 . 2 f kPa \n (B)
S t a g n a t i o n t e m p e r a t u r e i s %3 . 2 f K\n (C) Mass f l o w
r a t e i s %3 . 4 f kg / s ,Po , To , m )
Scilab code Exa 1.28 To find stagnation conditions and velocity at dynamic condition
1 clc
33
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
clear
// I n p u t d a t a
C =300 // V e l o c i t y o f a i r i n m/ s
P =1 // S t a t i c p r e s s u r e i n kPa
T =290 // S t a t i c t e m p e r a t u r e i n K
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgk
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
// C a l c u l a t i o n
To = T +( C ^2/(2* Cp ) ) // S t a g n a t i o n t e m p e r a t u r e i n K
Po = P *( To / T ) ^( k /( k -1) ) // S t a g n a t i o n p r e s s u r e i n kPa
a = sqrt ( k * R * T ) // Sound v e l o c i t y i n m/ s
Co = sqrt ( k * R * To ) // Sound v e l o c i t y a t S t a g n a t i o n
c o n d i t i o n i n m/ s
// Output
printf ( (A) S t a g n a t i o n p r e s s u r e and t e m p e r a t u r e a r e
%3 . 4 f b a r and %3 . 2 f K\n (B) V e l o c i t y o f sound i n
t h e dynamic and s t a g n a t i o n c o n d i t i o n s a r e %3 . 2 f m
/ s and %3 . 2 f m/ s ,Po , To ,a , Co )
Scilab code Exa 1.29 To find flow velocity for compressible and incompressible flow
1
2
3
4
5
6
7
8
clc
clear
// I n p u t d a t a
dP =490*(1.01325/760) // P r e s s u r e i n p i v o t t u b e i n b a r
P =0.3546+1.01325 // S t a t i c p r e s s u r e ( a b s o l u t e ) i n b a r
To =25+273 // S t a g n a t i o n t e m p e r a t u r e i n K
k =1.4 // A d i a b a a t i c c o n s t a n t
34
9 R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgk
10 Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
11
12 // C a l c u l a t i o n
13 Po = dP + P // S t a g n a t i o n p r e s s u r e i n b a r
14 T = To *( P / Po ) ^(( k -1) / k ) // S t a t i c t e m p e r a t u r e
15 C1 = sqrt (2* Cp *( To - T ) ) // Flow v e l o c i t y f o r
C o m p r e s s i b l e f l o w i n m/ s
16 di = Po /( R * To ) // D e n s i t y i n kg /m3
17 C2 = sqrt ((2* dP ) / di ) // Flow v e l o c i t y
for
i n c o m p r e s s i b l e f l o w i n m/ s
18
19
20
// Output
printf ( Flow v e l o c i t y f o r : \ n (A) C o m p r e s s i b l e f l o w i s
%3 . 2 f m/ s \n (B) I n c o m p r e s s i b l e f l o w i s %3 . 2 f m/ s
,C1 , C2 )
Scilab code Exa 1.30 To find Mach number velocity and area at a point
1
2
3
4
5
6
7
8
9
10
11
12
13
clc
clear
// I n p u t d a t a
To =27+273 // S t a g n a t i o n t e m p e r a t u r e i n K
Po =8 // S t a g n a t i o n P r e s s u r e i n b a r
P =5.6 // S t a t i c p r e s s u r e i n bar , t a k e n from d i a g r a m
given
m =2 // Mass f l o w r a t e i n kg / s
k =1.4 // A d i a b a a t i c c o n s t a n t
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgk
// C a l c u l a t i o n
35
14
15
16
17
18
19
20
21
T = To *( P / Po ) ^(( k -1) / k ) // S t a t i c t e m p e r a t u r e i n K
a = sqrt ( k * R * T ) // Sound v e l o c i t y i n m/ s
C = sqrt (2* Cp *( To - T ) ) // V e l o c i t y i n m/ s
M = C / a // Mach number
A =(( m * R * T ) /( P *10^5* C ) ) *10^4 // Area a t a p o i n t i n t h e
c h a n n a l i n cm2
// Output
printf ( (A) Mach number i s %3 . 4 f \n (B) V e l o c i t y i s %3
. 1 f m/ s \n (C) Area a t a p o i n t i n t h e c h a n n a l i s %3
. 3 f cm2 ,M ,C , A )
Scilab code Exa 1.31 To find velocity and mass flow rate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
clc
clear
// I n p u t d a t a
Po =1.8 // S t a g n a t i o n p r e s s u r e i n atm
To =20+273 // S t a g n a t i o n t e m p e r a t u r e i n K
P =1 // S u r r o u n d i n g p r e s s u r e i n atm
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgk
// C a l c u l a t i o n
p1 =0.528 // S t a t i c t o S t a g n a t i o n p r e s s u r e r a t i o @Mach
number =1 , from g a s t a b l e s
Pt = p1 * Po // C r i t i c a l p r e s s u r e i n atm , S i n c e Pt<P t h e
flow i s not chocked
di =( Po *10^5) /( R * To ) // D e n s i t y i n kg /m3
ao = sqrt ( k * R * To ) // Sound v e l o c i t y a t S t a g n a t i o n
c o n d i t i o n i n m/ s
Cp =( k * R ) /( k -1) // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
C = sqrt (2* Cp * To *(1 -( P / Po ) ^(( k -1) / k ) ) ) // V e l o c i t y o f
36
// Output
printf ( (A) V e l o c i t y o f a i r f l o w which w i l l t a k e
p l a c e from chamber t o t h e o u t s i d e t h r o u g h a u n i t
a r e a h o l e i s %3 . 3 f m/ s \n (B) Mass f l o w r a t e p e r
u n i t a r e a i s %3 . 3 f kg / sm2 ,C , G )
Scilab code Exa 1.32 To find various properties at one section in duct
1
2
3
4
5
6
7
8
9
10
11
12
clc
clear
// I n p u t d a t a
A1 =465.125 // C r o s s s e c t i o n a l a r e a a t e n t r y i n cm2
T1 =26.66+273 // S t a t i c t e m p e r a t u r e a t s e c t i o n 1 i n K
P1 =3.4473 // S t a t i c P r e s s u r e a t s e c t i o n 1 i n b a r
C1 =152.5 // V e l o c i t y a t s e c t i o n 1 i n m/ s
P2 =2.06838 // S t a t i c P r e s s u r e a t s e c t i o n 2 i n b a r
T2 =277.44 // S t a t i c t e m p e r a t u r e a t s e c t i o n 2 i n K
C2 =260.775 // V e l o c i t y a t s e c t i o n 2 i n m/ s
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
13 k =1.4 // A d i a b a t i c c o n s t a n t
14 R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgk
15
16 // C a l c u l a t i o n s
17 To1 = T1 +( C1 ^2/(2* Cp ) ) // S t a g n a t i o n t e m p e r a t u r e a t
entry in K
18 To2 = T2 +( C2 ^2/(2* Cp ) ) // S t a g n a t i o n t e m p e r a t u r e a t
exit in K
37
// h e r e To1=To2 from a n s w e r s
d1 =( P1 *10^5) /( R * T1 ) // D e n s i t y a t s e c t i o n 1
d2 =( P2 *10^5) /( R * T2 ) // D e n s i t y a t s e c t i o n 2
ar =( d2 * C2 ) /( d1 * C1 ) // R a t i o o f i n l e t t o o u t l e t a r e a
A2 = A1 / ar // C r o s s s e c t i o n a l a r e a a t e x i t i n cm2
C_max = sqrt (2* Cp * To1 ) //Maximum v e l o c i t y a t e x i t i n m
/s
25 m = d1 * A1 * C1 *10^ -4 // Mass f l o w r a t e i n kg / s
26 F =(( P1 *10^5* A1 *10^ -4) -( P2 *10^5* A2 *10^ -4) ) +( m *( C1 - C2 )
) // F o r c e a c t i n g on t h e d u c t w a l l b e t w e e n two
sections in N
19
20
21
22
23
24
27
28
29
// Output
printf ( (A) Maximum v e l o c i t y and s t a g n a t i o n
t e m p e r a t u r e a t e x i t a r e %3 . 2 f m/ s and %3 . 2 f K\n (
B) S i n c e S t a g n a t i o n t e m p e r a t u r e %3i K a t e n t r y and
%3i K a t e x i t a r e e q u a l , t h e f l o w i s a d i a b a t i c \n
(C) C r o s s s e c t i o n a l a r e a a t e x i t i s %3 . 2 f cm2\ n
(D) F o r c e a c t i n g on t h e d u c t w a l l b e t w e e n two
s e c t i o n s i s %3 . 2 f N , C_max , To2 , To1 , To2 , A2 , F )
Scilab code Exa 1.33 To find various properties at one section in duct
1
2
3
4
5
6
7
8
9
10
11
12
clc
clear
// I n p u t d a t a
P1 =250 // S t a t i c P r e s s u r e a t s e c t i o n 1 i n kPa
T1 =26+273 // S t a t i c t e m p e r a t u r e a t s e c t i o n 1 i n K
M1 =1.4 // Mach number a t e n t r y
M2 =2.5 // Mach number a t e x i t
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgk
// C a l c u l a t i o n
38
13 C1 = sqrt ( k * R * T1 ) * M1 // A i r v e l o c i t y a t e n t r y i n m/ s
14 To = T1 *(1+((( k -1) /2) * M1 ^2) ) // S t a g n a t i o n t e m p e r a t u r e
15
16
17
18
19
20
21
22
23
in K
t1 =(1+((( k -1) /2) * M2 ^2) ) // S t a g n a t i o n t o e x i t
Temperature r a t i o
T2 = To / t1 // E x i t t e m p e r a t u r e i n K
C2 = sqrt ( k * R * T2 ) * M2 // A i r v e l o c i t y a t e x i t i n m/ s
P2 = P1 *( T2 / T1 ) ^( k /( k -1) ) // E x i t s t a t i c p r e s s u r e i n
kPa
d2 =( P2 *10^3) /( R * T2 ) // D e n s i t y a t s e c t i o n 2 i n kg /m3
G = d2 * C2 // ) Mass f l o w r a t e t h r o u g h t h e d u c t p e r
s q u a r e m e t r e i n kg / sm2
// Output
printf ( (A) At s e c o n d s e c t i o n : \ n
T e m p e r a t u r e i s %3
. 2 f K\n
P r e s s u r e i s %3 . 2 f kPa \n
Velocity is
%3 . 4 f m/ s \n (B) Mass f l o w r a t e t h r o u g h t h e d u c t
p e r s q u a r e m e t r e i s %3 . 1 f kg / sm2 ,T2 , P2 , C2 , G )
clc
clear
// I n p u t d a t a
M =2 // Mach number
h =20 // A l t i t u d e i n km
Tc = -56 // Ambient t e m p e r a t u r e i n d e g r e e C e n t i g r a d e
Ta = -56+273 // Ambient t e m p e r a t u r e i n K
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgk
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
// C a l c u l a t i o n
39
14 a = sqrt ( k * R * Ta ) // Sound v e l o c i t y i n m/ s
15 C = M * a // V e l o c i t y o f f l i g h t i n m/ s
16 To = Tc +( C ^2/(2* Cp ) ) // The maximum t e m p e r a t u r e
e n c o u n t e r e d i s %3 . 1 f d e g r e e C e n t i g r a d e
17
18
19
// Output
printf ( The maximum t e m p e r a t u r e e n c o u n t e r e d i s %3 . 1 f
d e g r e e C e n t i g r a d e , To )
clc
clear
// I n p u t d a t a
W =20000 // Power d e v e l o p e d i n kW
m =12 // Mass f l o w r a t e i n kg / s
C1 =50 // V e l o c i t y o f a i r e n t e r i n g i n m/ s
T1 =700+273 // T e m p e r a t u r e o f a i r e n t e r i n g i n K
T2 =298 // T e m p e r a t u r e o f a i r l e a v i n g i n K
C2 =125 // V e l o c i t y o f a i r l e a v i n g i n m/ s
Cp =1.005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n kJ / kgK
12
13 // C a l c u l a t i o n
14 dh = Cp *( T2 - T1 ) // Change i n e n t h a l p y i n kJ / kg
15 Q =(( m * dh ) +W -( m *(1/2000) *( C2 ^2 - C1 ^2) ) ) // The r a t e
of
h e a t t r a n s f e r i n kJ / s
16
17
18
// Output
printf ( The r a t e o f h e a t t r a n s f e r i s %3 . 2 f kJ / s ,Q )
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
clc
clear
// I n p u t d a t a
mol =39.9 // M o l e c u l a r w e i g h t o f g a s i n kg / mol
k =1.67 // A d i a b a t i c c o n s t a n t
Po =500 // P r e s s u r e i n chamber i n kPa
To =30+273 // T e m p e r a t u r e i n chamber i n K
P1 =80 // P r e s s u r e o f n o z z l e a t g i v e n s e c t i o n i n kPa
D =0.012 // C r o s s s e c t i o n d i a m e t e r o f n o z z l e i n m
Ri =8314 // I d e a l g a s c o n s t a n t i n J / molK
// C a l c u l a t i o n
R = Ri / mol // S p e c i f i c g a s c o n s t a n t i n J / kgK
p1 = Po / P1 // S t a g n a t i o n t o s t a t i c p r e s s u r e r a t i o
M1 = sqrt (((( p1 ^(( k -1) / k ) ) -1) *2) /( k -1) ) // Mach number
at s e c t i o n
T1 = To *((1+((( k -1) /2) * M1 ^2) ) ^( -1) ) // T e m p e r a t u r e a t
section in K
a = sqrt ( k * R * T1 ) // Sound V e l o c i t y i n m/ s
C1 = M1 * a // Gas V e l o c i t y a t s e c t i o n i n m/ s
d =( P1 *10^3) /( R * T1 ) // D e n s i t y i n kg /m3
A1 = %pi * D ^2/4 // C r o s s s e c t i o n a l Area
m = d * A1 * C1 // Mass f l o w r a t e t h r o u g h n o z z l e i n kg / s
// Output
printf ( (A) At s e c t i o n : \ n
Mach number i s %3 . 1 f \n
T e m p e r a t u r e i s %3 . 1 f K\n
V e l o c i t y i s %3 . 3 f
m/ s \n (B) Mass f l o w r a t e t h r o u g h n o z z l e i s %3 . 3 f
kg / s ,M1 , T1 , C1 , m )
Scilab code Exa 1.37 To find Mach number velocity and pressure at a
section in duct
1 clc
41
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
clear
// I n p u t d a t a
mol =4 // M o l e c u l a r w e i g h t o f g a s i n kg / mol
k =1.3 // A d i a b a t i c c o n s t a n t
C1 =150 // Gas V e l o c i t y a t s e c t i o n 1 i n m/ s
P1 =100 // P r e s s u r e o f d u c t a t s e c t i o n 1 i n kPa
T1 =15+273 // T e m p e r a t u r e a t s e c t i o n 1 i n K
T2 = -10+273 // T e m p e r a t u r e a t s e c t i o n 2 i n K
Ri =8314 // I d e a l g a s c o n s t a n t i n J / molK
// C a l c u l a t i o n
R = Ri / mol // S p e c i f i c g a s c o n s t a n t i n J / kgK
a1 = sqrt ( k * R * T1 ) // Sound v e l o c i t y a t s e c t i o n 1 i n m/ s
M1 = C1 / a1 // Mach number a t s e c t i o n 1
t1 =0.9955 // S t a t i c t o S t a g n a t i o n t e m p e r a t u r e r a t i o
a t e n t r y from g a s t a b l e s @M1, k =1.3
To = T1 / t1 // S t a g a n t i o n t e m p e r a t u r e i n K
p1 =0.9815 // S t a t i c t o S t a g n a t i o n p r e s s u r e r a t i o a t
e n t r y from g a s t a b l e s @M1, k =1.3
Po = P1 / p1 // S t a g n a t i o n p r e s s u r e i n kPa
t2 = T2 / To // S t a t i c t o S t a g n a t i o n t e m p e r a t u r e r a t i o a t
exit
M2 =0.82 //Amch number a t s e c t i o n 2 from g a s t a b l e s
@t2 , k =1.3
p2 =0.659 // S t a t i c t o S t a g n a t i o n p r e s s u r e r a t i o a t
e x i t from g a s t a b l e s @M2, k =1.3
P2 = Po * p2 // P r e s s u r e a t s e c t i o n 2 i n kPa
a2 = sqrt ( k * R * T2 ) // Sound v e l o c i t y a t s e c t i o n 2 i n m/ s
C2 = M2 * a2 // Gas V e l o c i t y a t s e c t i o n 2 i n m/ s
// Output
printf ( At t h e s e c o n d p o i n t : \ n
Mach number i s %3
. 2 f \n
P r e s s u r e i s %3 . 3 f kPa \n
Velocity is
%3 . 2 f m/ s ,M2 , P2 , C2 )
42
Scilab code Exa 1.38 To find mass flow rate and velocity at exit
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
clc
clear
// I n p u t d a t a
A1 =10 // I n l e t a r e a i n cm2
C1 =80 // I n l e t A i r v e l o c i t y i n m/ s
T1 =28+273 // I n l e t t e m p e r a t u r e i n K
P1 =700 // I n l e t P r e s s u r e i n kPa
P2 =250 // E x i t p r e s s u r e i n kPa
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
a1 = sqrt ( k * R * T1 ) // Sound v e l o c i t y a t i n l e t i n m/ s
M1 = C1 / a1 // Mach number a t i n l e t
t1 =0.989 // S t a t i c t o S t a g n a t i o n t e m p e r a t u r e r a t i o a t
e n t r y from g a s t a b l e s @M1, k =1.4
To = T1 / t1 // S t a g a n t i o n t e m p e r a t u r e i n K
p1 =0.964 // S t a t i c t o S t a g n a t i o n p r e s s u r e r a t i o a t
e n t r y from g a s t a b l e s @M1, k =1.4
Po = P1 / p1 // S t a g n a t i o n p r e s s u r e i n kPa
p2 = P2 / Po // S t a t i c t o S t a g n a t i o n p r e s s u r e r a t i o
M2 =1.335 // Mach number a t e x i t
t2 =0.737 // S t a t i c t o S t a g n a t i o n t e m p e r a t u r e r a t i o a t
e x i t from g a s t a b l e s @M2, k =1.4
T2 = To * t2 // S t a g n a t i o n t e m p e r a t u r i n K
a2 = sqrt ( k * R * T2 ) // Sound v e l o c i t y a t e x i t i n m/ s
C2 = M2 * a2 // E x i t A i r v e l o c i t y i n m/ s
d1 =( P1 *10^3) /( R * T1 ) // D e n s i t y a t i n l e t i n kg /m3
m = d1 * A1 * C1 *10^ -4 // Mass f l o w r a t e i n kg / s
// Output
43
30
Scilab code Exa 1.39 To find time required for a value of pressure decrease
1
2
3
4
5
6
7
8
9
10
11
12
13
14
clc
clear
// I n p u t d a t a
V =5 // Volume o f a i r i n m3
Ae =10*10^ -4 // E x i t a r e a i n cm2
To =60+273 // T e m p e r a t u r e i n s i d e i n t h e t a n k i n K
Po1 =40 // I n t i a l t o t a l p r e s s u r e i n b a r
Po2 =2 // F i n a l t o t a l p r e s s u r e i n b a r
P =1 // D i s c h a r g e p r e s s u r e i n b a r
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
// Here p r e s s u r e r a t i o s P/ Po1 and P/ Po2 a r e a l w a y s
l e s s than c r i t i c a l p r e s s u r e r a t i o t h e r e f o r e f l o w
i s c h o k e d i . e . M=1 a t e x i t
15 Gp =(0.0404184* Ae ) / sqrt ( To ) // Mass f l o w r a t e by
S t a g n a t i o n p r e s s u r e i . e . m/Po
16 // D i f f e r e n t i a t i n g m=(PV) / (RTo ) w . r . t . t i m e and
i n t r g r a t i n g r e s u l t i n g e q u a t i o n we g e t f o l l o w i n g
expression .
17 t = -( V /( R * To * Gp ) ) * log ( Po2 / Po1 ) // The t i m e r e q u i r e d
f o r t a n k p r e s s u r e t o d e c r e a s e from Po1 t o Po2 i n
sec
18
19
20
// Output
printf ( The t i m e r e q u i r e d f o r t a n k p r e s s u r e t o
d e c r e a s e from %i b a r t o %i b a r i s %3 . 2 f s e c ,Po1 ,
Po2 , t )
44
45
Chapter 2
Flow through Variable Area
Ducts
Scilab code Exa 2.1 To find mass flow rate temperature and pressure at
throat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
clc
clear
// I n p u t d a t a
do1 =1.12 // D e n s i t y o f a i r i r e s e r v o i r i n kg /m3
ao1 =500 // V e l o c i t y o f sound i n r e s e r v o i r i n m/ s
d =0.01 // T h r o a t d i a m e t e r i n m
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
To1 = ao1 ^2/( k * R ) // S t a g n a t i o n t e m p e r a t u r e i n K
Po1 = do1 * R * To1 // S t a g n a t i o n p r e s s u r e i n Pa
p1 =0.528 // R a t i o o f c r i t i c a l p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from g a s t a b l e s @M=1
15 Pt =( Po1 * p1 ) *10^ -5 // T h r o a t p r e s s u r e i n b a r
16 t1 =0.834 // R a t i o o f c r i t i c a l t e m p e r a t u r e t o
S t a g n a t i o n t e m p e r a t u r e from g a s t a b l e s @M=1
46
17 Tt = To1 * t1 // c r i t i c a l t e m p e r a t u r e i n K
18 d_t =( Pt *10^5) /( R * Tt ) // D e n s i t y o f a i r a t t h r o a t i n
19
20
21
22
23
24
25
kg /m3
a_t = sqrt ( k * R * Tt ) // Sound v e l o c i t y a t t h r o a t i n m/ s
Ct = a_t // A i r v e l o c i t y t t h r o a t i n m/ s , S i n c e M=1
A_t = %pi * d ^2/4 // T h r o a t a r e a i n m2
m = d_t * A_t * Ct //Maximum mass f l o w r a t e i n kg / s
// Output
printf ( (A) Maximum mass f l o w r a t e i s %3 . 5 f kg / s \n (B
) P r e s s u r e and t e m p e r a r a t u r e a t t h e t h r o a t a r e %3
. 3 f b a r and %3 . 4 f K ,m , Pt , Tt )
Scilab code Exa 2.2 To find properties at throat and exit in Convergent
Divergent nozzle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
clc
clear
// I n p u t d a t a
P1 =2 // I n t i a l p r e s s u r e i n b a r
C1 =170 // I n i t i a l v e l o c i t y o f a i r i n m/ s
T1 =473 // I n t i a l t e m p e r a t u r e i n K
A1 =1000 // I n l e t a r e a i n mm2
P2 =0.95 // E x i t p r e s s u r e i n b a r
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
a_1 = sqrt ( k * R * T1 ) // V e l o c i t y o f sound a t i n l e t i n m/ s
M1 = C1 / a_1 // I n l e t mach number
t1 =0.970 // R a t i o o f i n l e t t e m p e r a t u r e t o S t a g n a t i o n
t e m p e r a t u r e from g a s t a b l e s @M=1
17 To1 = T1 / t1 // S t a g n a t i o n t e m p e r a t u r e i n K
18 p1 =0.900 // R a t i o o f i n l e t p r e s s u r e t o S t a g n a t i o n
47
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
p r e s s u r e from g a s t a b l e s @M=1
Po1 = P1 / p1 // S t a g n a t i o n p r e s s u r e i n b a r
a1 =1.623 // R a t i o o f i n l e t a r e a t o c r i t i c a l a r e a from
i s e n t r o p i c g a s t a b l e s @M=1
At = A1 / a1 // c r i t i c a l a r e a i n mm2
p2 =0.528 // P r e s s u r e r a t i o a t c r i t i c a l s t a t e from
i s e n t r o p i c g a s t a b l e s @M=1
Pt = Po1 * p2 // T h r o a t p r e s s u r e i n b a r
t2 =0.834 // T e m p e r a t u r e r a t i o a t c r i t i c a l s t a t e from
i s e n t r o p i c g a s t a b l e s @M=1
Tt = To1 * t2 // T h r o a t t e m p e r a t u r e i n K
a_t = sqrt ( k * R * Tt ) // V e l o c i t y o f sound a t t h r o a t i n m/
s
C_t = a_t // C r i t i c a l v e l o c i t y o f a i r i n m/ s
p3 = P2 / Po1 // P r e s s u r e r a t i o a t e x i t
M2 =1.17 // Mach number a t e x i t from i s e n t r o p i c g a s
t a b l e s @p3
t3 =0.785 // T e m p e r a t u r e r a t i o a t e x i t from i s e n t r o p i c
g a s t a b l e s @M2
T2 = To1 * t3 // E x i t t e m p e r a t u r e i n K
a3 =1.022 // Area r a t i o a t e x i t from i s e n t r o p i c g a s
t a b l e s @M2
A2 = At * a3 // E x i t a r e a i n mm 2 , wrong a n s w e r i n
textbook
C2 = M2 * sqrt ( k * R * T2 ) // E x i t v e l o c i t y i n m/ s
// Output
printf ( (A) S t a g n a t i o n t e m p e r a t u r e and p r e s s u r e a r e
%3 . 2 f K and %3 . 3 f b a r \n (B) S o n i c v e l o c i t y and
mach number a t e n t r y a r e %3 . 2 f m/ s and %3 . 2 f \n (C
) V e l o c i t y , Mach number and f l o w a r e a a t o u t l e t
s e c t i o n a r e %3 . 2 f m/ s , %3 . 2 f and %3 . 2 f mm2\ n (D)
P r e s s u r e , a r e a a t t h r o a t o f t h e n o z z l e a r e %3 . 5 f
b a r and %3 . 3 f mm2 ,To1 , Po1 , a_1 , M1 , C2 , M2 , A2 , Pt , At
)
48
Scilab code Exa 2.3 To find properties at throat and exit maximum possible velocity of gas and type of nozzle
1
2
3
4
5
6
7
8
9
10
11
clc
clear
// I n p u t d a t a
Po1 =10 // S t a g n a t i o n p r e s s u r e i n b a r
To1 =798 // S t a g n a t i o n t e m p e r a t u r e i n K
Pt =7.6 // T h r o a t p r e s s u r e i n b a r
m =1.5 // Mass f l o w r a t e i n kg / s
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
12
13 // C a l c u l a t i o n
14 p1 =0.528 // R a t i o o f
15
16
17
18
19
20
21
22
23
24
25
26
c r i t i c a l p r e s s u r e to Stagnation
p r e s s u r e from i s e n t r o p i c g a s t a b l e s @M=1 , k =1.4
Pc = p1 * Po1 // C r i t i c a l p r e s s u r e i n b a r
P2 = Pt // E x i t p r e s s u r e i n bar , S i n c e Pc<P2
p2 = P2 / Po1 // P r e s s u r e r a t i o
M2 =0.64 // E x i t mach number from i s e n t r o p i c g a s
t a b l e s @p2
t1 =0.924 // R a t i o o f e x i t t e m p e r a t u r e t o S t a g n a t i o n
t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s @M2
T2 = t1 * To1 // e x i t t e m p e r a t u r e i n K
C2 = sqrt ( k * R * T2 ) * M2 // E x i t v e l o c i t y i n m/ s
C_max = sqrt (2* Cp * To1 ) //Maximum p o s s i b l e v e l o c i t y i n
m/ s
d2 =( P2 *10^5) /( R * T2 ) // D e n s i t y a t e x i t i n kg /m3
At =( m /( d2 * C2 ) ) *10^6 // T h r o a t a r e a i n mm2
// Output
49
27
printf ( (A) At t h e n o z z l e t h r o a t / e x i t : \ n
Pressure
i s %3 . 2 f b a r \n
T e m p e r a t u r e i s %3 . 2 f K\n
V e l o c i t y i s %3 . 2 f \n (B) Maximum p o s s i b l e v e l o c i t y
i s %3 . 2 f m/ s \n (C) Type o f t h e n o z z l e i s a
c o n v e r g e n t n o z z l e and i t s t h r o a t a r e a i s %3 . 3 f mm
2 ,P2 , T2 , C2 , C_max , At )
clc
clear
// I n p u t d a t a
Po1 =3.344 // S t a g n a t i o n p r e s s u r e i n b a r
To1 =900 // S t a g n a t i o n t e m p e r a t u r e i n K
P2 =1.05 // E x i t p r e s s u r e i n b a r
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
11
12 // C a l c u l a t i o n
13 p1 = P2 / Po1 // P r e s s u r e r a t i o
14 M2 =1.40 // E x i t mach number from g a s t a b l e s @p1 , k =1.4
15 t1 =0.718 // R a t i o o f e x i t t e m p e r a t u r e t o S t a g n a t i o n
16
17
18
19
20
21
22
23
24
25
26
27
28
29
t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s @M2
T_2 = t2 * To1 // e x i t t e m p e r a t u r e i n K
C_2 = sqrt ( k * R * T_2 ) * M_2 // E x i t v e l o c i t y i n m/ s
p2 =0.738 // R a t i o o f e x i t p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from i s e n t r o p i c g a s t a b l e s @M2
P_2 = Po1 * p2 // e x i t p r e s s u r e i n b a r
d_2 =( P_2 *10^5) /( R * T_2 ) // D e n s i t y a t e x i t i n kg /m3
// Output
printf ( (A) At e x i t : \ n
Temperaure i s %3i K\n
V e l o c i t y i s %3 . 2 f m/ s \n
D e n s i t y i s %3 . 3 f kg /m
3\ n (B) At d i f f u s e r : \ n
Temperaure i s %3 . 3 f K\n
V e l o c i t y i s %3 . 3 f m/ s \n
D e n s i t y i s %3 . 4 f
kg /m3\ n
P r e s s u r e i s %3 . 4 f b a r \n ,T2 , C2 , d2 , T_2
, C_2 , d_2 , P_2 )
Scilab code Exa 2.5 To find mass flow rate and pressure of a CD nozzle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
clc
clear
// I n p u t d a t a
Po1 =8 // S t a g n a t i o n p r e s s u r e i n b a r
To1 =273+15 // S t a g n a t i o n t e m p e r a t u r e i n K
At =25 // T h r o a t a r e a i n cm2
A2 =100 // E x i t a r e a i n cm2
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
a1 = A2 / At // Area r a t i o
M2 =2.94 // E x i t mach number from g a s t a b l e s @a1 , k =1.4
p1 =0.0298 // R a t i o o f e x i t p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from i s e n t r o p i c g a s t a b l e s @M2, k =1.4
16 P2 = Po1 * p1 // e x i t p r e s s u r e i n b a r
51
a c t s as
diffuser
18 p2 =0.9847 // R a t i o o f
19
20
21
22
23
24
25
26
27
28
29
30
e x i t p r e s s u r e to Stagnation
p r e s s u r e from i s e n t r o p i c g a s t a b l e s @M2
P_2 = Po1 * p2 // e x i t p r e s s u r e i n b a r
p3 =0.528 // R a t i o o f c r i t i c a l p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from i s e n t r o p i c g a s t a b l e s @M=1 , k =1.4
Pc =( Po1 * p3 ) // C r i t i c a l p r e s s u r e i n b a r
t1 =0.834 // R a t i o o f c r i t i c a l t e m p e r a t u r e t o
S t a g n a t i o n t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s
@M=1 , k =1.4
Tt = To1 * t1 // c r i t i c a l t e m p e r a t u r e i n K
d_t =( Pc *10^5) /( R * Tt ) // D e n s i t y a t c r i t i c a l s t a t e i n
kg /m3
a_t = sqrt ( k * R * Tt ) // V e l o c i t y o f sound a t c r i t i c a l
s t a t e i n m/ s
Ct = a_t // V e l o c i t y o f a i r a t c r i t i c a l s t a t e i n m/ s
m = d_t * At * Ct *10^ -4 // Mass f l o w r a t e i n kg / s
// Output
printf ( (A) Maximum mass f l o w r a t e i s %3 . 3 f kg / s \n (B
) As n o z z l e : \ n
P r e s s u r e i s %3 . 4 f b a r \n
Mach
number i s %3 . 2 f \n As d i f f u s e r : \ n
Pressure i s
%3 . 4 f b a r \n
Mach number i s %3 . 3 f ,m , P2 , M2 , P_2 ,
M_2 )
Scilab code Exa 2.6 To find exit properties and force exerted on diffuser
walls
1 clc
2 clear
3
4 // I n p u t d a t a
5 D1 =15 // Entry d i a m e t e r i n cm
6 D2 =30 // E x i t d i a m a t e r i n cm
52
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
P1 =0.96 // I n l e t p r e s s u r e i n b a r
T1 =340 // I n l e t t e m p e r a t u r e i n K
C1 =185 // I N l e t v e l o c i t y i n m/ s
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
A1 = %pi * D1 ^2/4 // Entry a r e a i n cm2
A2 = %pi * D2 ^2/4 // E x i t a r e a i n cm2
a_1 = sqrt ( k * R * T1 ) // Sound v e l o c i t y i n m/ s
M1 = C1 / a_1 // I n l e t mach number
p1 =0.843 // R a t i o o f i n l e t p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from g a s t a b l e s @M1, k =1.4
Po1 = P1 / p1 // S t a g n a t i o n p r e s s u r e i n b a r
t1 =0.952 // R a t i o o f i n l e t t e m p e r a t u r e t o S t a g n a t i o n
t e m p e r a t u r e from g a s t a b l e s @M1, k =1.4
To1 = T1 / t1 // S t a g n a t i o n t e m p e r a t u r e i n K
a1 =1.34 // R a t i o o f i n l e t a r e a t o c r i t i c a l a r e a from
i s e n t r o p i c g a s t a b l e s @M1, k =1.4
At = A1 / a1 // c r i t i c a l a r e a i n cm2
a2 = A2 / At // Area r a t i o
M2 =0.1088 // E x i t mach number from g a s t a b l e s @a2 , k
=1.4
p2 =0.992 // R a t i o o f e x i t p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from i s e n t r o p i c g a s t a b l e s @M2, k =1.4
P2 = Po1 * p2 // e x i t p r e s s u r e i n b a r
t2 =0.9976 // R a t i o o f e x i t t e m p e r a t u r e t o S t a g n a t i o n
t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s @M2, k =1.4
T2 = To1 * t2 // e x i t t e m p e r a t u r e i n K
C2 = sqrt ( k * R * T2 ) * M2 // E x i t v e l o c i t y i n m/ s
F1 = P1 *10^5* A1 *10^ -4*(1+( k *( M1 ^2) ) ) // F o r c e e x e r t e d
a t e n t r y i n kN
F2 = P2 *10^5* A2 *10^ -4*(1+( k *( M2 ^2) ) ) // F o r c e e x e r t e d
a t e x i t i n kN
F =( F2 - F1 ) *10^ -3 // F o r c e e x e r t e d on t h e d i f f u s e r
w a l l s i n kN , wrong a n s w e r i n t e x t b o o k
// Output
53
36
Scilab code Exa 2.7 To find properties at inlet and exit of diffuser
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
clc
clear
// I n p u t d a t a
M1 =3.6 // I n l e t mach number
M2 =2 // E x i t mach number
m =15 // Mass f l o w r a t e i n kg / s
P1 =1.05 // I n l e t p r e s s u r e i n b a r
T1 =313 // I n l e t t e m p e r a t u r e i n K
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
p1 =11.38*10^ -3 // R a t i o o f i n l e t p r e s s u r e t o
S t a g n a t i o n p r e s s u r e from g a s t a b l e s @M1, k =1.4
Po = P1 / p1 // S t a g n a t i o n p r e s s u r e i n b a r
t1 =0.278 // R a t i o o f i n l e t t e m p e r a t u r e t o S t a g n a t i o n
t e m p e r a t u r e from g a s t a b l e s @M1, k =1.4
To = T1 / t1 // S t a g n a t i o n t e m p e r a t u r e i n K
C1 = sqrt ( k * R * T1 ) * M1 // I n l e t v e l o c i t y i n m/ s
d1 =( P1 *10^5) /( R * T1 ) // D e n s i t y a t i n l e t i n kg / s , P1
i n Pa
A1 =( m /( d1 * C1 ) ) *10^4 // I n l e t a r e a i n cm2
p2 =0.128 // R a t i o o f e x i t p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from i s e n t r o p i c g a s t a b l e s @M2, k =1.4
P2 = Po * p2 // e x i t p r e s s u r e i n b a r
t2 =0.555 // R a t i o o f e x i t t e m p e r a t u r e t o S t a g n a t i o n
t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s @M2, k =1.4
T2 = To * t2 // e x i t t e m p e r a t u r e i n K
54
25 C2 = sqrt ( k * R * T2 ) * M2 // E x i t v e l o c i t y i n m/ s
26 d2 =( P2 *10^5) /( R * T2 ) // D e n s i t y a t e x i t i n kg / s
27 A2 =( m /( d2 * C2 ) ) *10^4 // E x i t a r e a i n cm2
28
29 // Output
30 printf ( (A) At I n l e t : \ n
Area i s %3 . 1 f cm2\ n
T o t a l p r e s s u r e %3 . 2 f b a r \n
Total temperature
i s %3 . 1 f K\n (B) At E x i t : \ n
Area i s %3 . 1 f cm2\
n
T o t a l p r e s s u r e %3 . 2 f b a r \n
Total
t e m p e r a t u r e i s %3 . 2 f K\n
S t a t i c temperature i s
%3 . 2 f K\n
S t a t i c p r e s s u r e i s %3 . 2 f b a r ,A1 , Po
, To , A2 , Po , To , T2 , P2 )
Scilab code Exa 2.8 To find properties at throat and exit and maximum
possible velocity of nozzle
1
2
3
4
5
6
7
8
9
10
11
clc
clear
// I n p u t d a t a
Po =6.91 // S t a g n a t i o n p r e s s u r e i n b a r
To =325+273 // S t a g n a t i o n t e m p e r a t u r e i n K
P2 =0.98 // e x i t p r e s s u r e i n b a r
m =3600/3600 // Mass f l o w r a t e i n kg / s
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
12
13 // C a l c u l a t i o n
14 p1 =0.528 // R a t i o o f
c r i t i c a l p r e s s u r e to Stagnation
p r e s s u r e from g a s t a b l e s @M=1
15 Pt = Po * p1 // c r i t i c a l p r e s s u r e i n b a r
16 t1 =0.834 // R a t i o o f c r i t i c a l t e m p e r a t u r e t o
S t a g n a t i o n t e m p e r a t u r e from g a s t a b l e s @M=1
55
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Tt = To * t1 // c r i t i c a l t e m p e r a t u r e i n K
at = sqrt ( k * R * Tt ) // Sound v e l o c i t y a t t h r o a t i n m/ s
Ct = at // A i r v e l o c i t y t t h r o a t i n m/ s , S i n c e M=1
dt =( Pt *10^5) /( R * Tt ) // D e n s i t y o f a i r a t t h r o a t i n kg
/m 3 , Pt i n Pa
At =( m /( dt * Ct ) ) *10^4 // T h r o a t a r e a i n m2 x10 4
p2 = P2 / Po // P r e s s u r e r a t i o
M2 =1.93 // E x i t mach number from g a s t a b l e s @p2 , k =1.4
t2 =0.573 // R a t i o o f e x i t t e m p e r a t u r e t o S t a g n a t i o n
t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s @M2, k =1.4
T2 = To * t2 // e x i t t e m p e r a t u r e i n K
a2 =1.593 // R a t i o o f e x i t a r e a t o c r i t i c a l a r e a from
i s e n t r o p i c g a s t a b l e s @M2, k =1.4
A2 = a2 * At // E x i t a r e a i n m 2 , At i n m2 x10 4
C_max = sqrt (2* Cp * To ) //Maximum p o s s i b l e v e l o c i t y i n m
/s
// Output
printf ( (A) At t h r o a t : \ n
Area i s %3 . 2 f x 1 0 4 m2\ n
P r e s s u r e i s %3 . 2 f b a r \n
V e l o c i t y i s %3 . 1 f
m/ s \n (B) At E x i t : \ n
Area i s %3 . 3 f x 1 0 4 m2\ n
Mach number i s %3 . 2 f \n (C) Maximum p o s s i b l e
v e l o c i t y i s %3 . 2 f m/ s ,At , Pt , Ct , A2 , M2 , C_max )
clc
clear
// I n p u t d a t a
P1 =2.45 // I n l e t p r e s s u r e i n b a r
T1 =26.5+273 // I n l e t t e m p e r a t u r e i n K
M1 =1.4 // I n l e t mach number
M2 =2.5 // E x i t mach number
56
9 k =1.3 // A d i a b a t i c C o n s t a n t
10 R =469 // S p e c i f i c g a s c o n s t a n t i n J / kgK
11
12 // C a l c u l a t i o n
13 t1 =0.773 // R a t i o o f i n l e t t e m p e r a t u r e t o S t a g n a t i o n
14
15
16
17
18
19
20
21
22
Scilab code Exa 2.10 To determine throat and exit conditions mass flow
rate through nozzle
1
2
3
4
5
6
7
8
9
10
clc
clear
// I n p u t d a t a
Po =1000 // S t a g n a t i o n p r e s s u r e i n kPa
To =800 // S t a g n a t i o n t e m p e r a t u r e i n K
k =1.4 // A d i a b a t i c C o n s t a n t
M2 =2 // E x i t mach number
At =20 // T h r o a t a r e a i n cm2
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
57
11
12 // C a l c u l a t i o n
13 t1 =0.834 // R a t i o o f
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
c r i t i c a l temperature to
S t a g n a t i o n t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s
@M=1 , k =1.4
Tt = To * t1 // c r i t i c a l t e m p e r a t u r e i n K
at = sqrt ( k * R * Tt ) // V e l o c i t y o f sound a t c r i t i c a l
s t a t e i n m/ s
Ct = at // V e l o c i t y o f a i r a t c r i t i c a l s t a t e i n m/ s ,
S i n c e M=1
p1 =0.528 // R a t i o o f c r i t i c a l p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from i s e n t r o p i c g a s t a b l e s @M=1 , k =1.4
Pt = Po * p1 // C r i t i c a l p r e s s u r e i n b a r
dt =( Pt *10^3) /( R * Tt ) // D e n s i t y a t c r i t i c a l s t a t e i n
kg /m 3 , Pt i n Pa
m = dt * At *10^ -4* Ct // Mass f l o w r a t e i n kg / s , At i n m2
p2 =0.128 // R a t i o o f e x i t p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from i s e n t r o p i c g a s t a b l e s @M2, k =1.4
P2 = Po * p2 // e x i t p r e s s u r e i n kPa
t2 =0.555 // R a t i o o f e x i t t e m p e r a t u r e t o S t a g n a t i o n
t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s @M2, k =1.4
T2 = To * t2 // e x i t t e m p e r a t u r e i n K
a2 =1.687 // R a t i o o f e x i t a r e a t o c r i t i c a l a r e a from
i s e n t r o p i c g a s t a b l e s @M2, k =1.4
A2 = At * a2 // E x i t a r e a i n cm2
C2 = sqrt ( k * R * T2 ) * M2 // E x i t v e l o c i t y i n m/ s
d2 = P2 *10^3/( R * T2 ) // D e n s i t y a t e x i t i n kg /m 3 , P2 i n
Pa
// Output
printf ( (A) At t h r o a t : \ n
T e m p e r a t u r e i s %3 . 1 f K\n
V e l o c i t y i s %3 . 2 f m/ s \n
P r e s s u r e i s %3i kPa
\n (B) At E x i t : \ n
T e m p e r a t u r e i s %3i K\n
P r e s s u r e i s %3i kPa \n
Area i s %3 . 2 f m2\ n
Mass f l o w r a t e i s %3 . 4 f kg / s ,Tt , Ct , Pt , T2 , P2 , A2 , m
)
58
Scilab code Exa 2.11 To find properties at throat and test section mass
flow rate and Power required in nozzle of wind tunnel
1
2
3
4
5
6
7
8
9
10
11
clc
clear
// I n p u t d a t a
M2 =2 // E x i t mach number
At =1000 // T h r o a t a r e a i n cm2
Po =0.69 // S t a g n a t i o n p r e s s u r e i n b a r
To =310 // S t a g n a t i o n t e m p e r a t u r e i n K
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
Cp =1.005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n kJ / kgK
12
13 // C a l c u l a t i o n
14 t1 =0.834 // R a t i o o f
15
16
17
18
19
20
21
22
23
c r i t i c a l temperature to
S t a g n a t i o n t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s
@M=1 , k =1.4
Tt = To * t1 // c r i t i c a l t e m p e r a t u r e i n K
at = sqrt ( k * R * Tt ) // V e l o c i t y o f sound a t c r i t i c a l
s t a t e i n m/ s
Ct = at // V e l o c i t y o f a i r a t c r i t i c a l s t a t e i n m/ s ,
S i n c e M=1
p1 =0.528 // R a t i o o f c r i t i c a l p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from i s e n t r o p i c g a s t a b l e s @M=1 , k =1.4
Pt = Po * p1 // C r i t i c a l p r e s s u r e i n b a r
dt =( Pt *10^5) /( R * Tt ) // D e n s i t y a t c r i t i c a l s t a t e i n
kg /m 3 , Pt i n Pa
m = dt * At *10^ -4* Ct // Mass f l o w r a t e i n kg / s , At i n m2
p2 =0.128 // R a t i o o f e x i t p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from i s e n t r o p i c g a s t a b l e s @M2, k =1.4
P2 = Po * p2 // e x i t p r e s s u r e i n b a r
59
24 t2 =0.555 // R a t i o o f
25
26
27
28
29
30
31
32
e x i t temperature to Stagnation
t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s @M2, k =1.4
T2 = To * t2 // e x i t t e m p e r a t u r e i n K
C2 = sqrt ( k * R * T2 ) * M2 // E x i t v e l o c i t y i n m/ s
d2 =( P2 *10^5) /( R * T2 ) // D e n s i t y a t e x i t i n kg /m 3 , P2
i n Pa
A2 =( m /( d2 * C2 ) ) *10^4 // E x i t a r e a i n cm2
P = m * Cp *( To - T2 ) // Power r e q u i r e d t o d r i v e t h e
c o m p r e s s o r i n kW
// Output
printf ( (A) At t h r o a t : \ n
T e m p e r a t u r e i s %3 . 2 f K\n
V e l o c i t y i s %3 . 2 f m/ s \n
P r e s s u r e i s %3 . 3 f
b a r \n
At T e s t s e c t i o n : \ n
T e m p e r a t u r e i s %3
. 2 f K\n
V e l o c i t y i s %3 . 3 f m/ s \n
Pressure i s
%3 . 3 f b a r \n (B) Area o f c r o s s s e c t i o n a t t e s t
s e c t i o n i s %3i cm2\ n (C) Mass f l o w r a t e i s %3 . 3 f
kg / s \n (D) Power r e q u i r e d t o d r i v e t h e c o m p r e s s o r
i s %3 . 2 f kW ,Tt , Ct , Pt , T2 , C2 , P2 , A2 ,m , P )
Scilab code Exa 2.12 To find cross section at throat and exit
1
2
3
4
5
6
7
8
9
10
11
12
clc
clear
// I n p u t d a t a
Po =10 // S t a g n a t i o n p r e s s u r e i n b a r
To =100+273 // S t a g n a t i o n t e m p e r a t u r e i n K
m =15 // mass f l o w r a t e i n kg / s
P2s =1 // Back p r e s s u r e i n i s e n t r o p i c s t a t e i n b a r
eff =0.95 // e f f i c i e n c y o f d i v e r g i n g n o z z l e
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
60
13
14 // C a l c u l a t i o n
15 // c a s e I : i s e n t r o p i c
16 t1 =0.834 // R a t i o o f c r i t i c a l
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
temperature to
S t a g n a t i o n t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s
@M=1 , k =1.4
Tt = To * t1 // c r i t i c a l t e m p e r a t u r e i n K
at = sqrt ( k * R * Tt ) // V e l o c i t y o f sound a t c r i t i c a l
s t a t e i n m/ s
Ct = at // V e l o c i t y o f a i r a t c r i t i c a l s t a t e i n m/ s ,
S i n c e M=1
p1 =0.528 // R a t i o o f c r i t i c a l p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from i s e n t r o p i c g a s t a b l e s @M=1 , k =1.4
Pt = Po * p1 // C r i t i c a l p r e s s u r e i n b a r
dt =( Pt *10^5) /( R * Tt ) // D e n s i t y a t c r i t i c a l s t a t e i n
kg /m 3 , Pt i n Pa
At =( m /( dt * Ct ) ) *10^4 // T h r o a t a r e a i n cm2
p2 = P2s / Po // P r e s s u r e r a t i o
M2s =2.15 // E x i t mach number from g a s t a b l e s (
i s e n t r o p i c s t a t e ) @p2 , k =1.4
t2 =0.519 // R a t i o o f e x i t t e m p e r a t u r e t o S t a g n a t i o n
t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s @M2s , k =1.4
T2s = t2 * To // e x i t t e m p e r a t u r e i n K
a2s = sqrt ( k * R * T2s ) // V e l o c i t y o f sound a t e x i t i n m/ s
C2s = M2s * a2s // E x i t a i r v e l o c i t y i n m/ s
d2s =( P2s *10^5) /( R * T2s ) // D e n s i t y a t e x i t i n kg /m 3 ,
P2 i n Pa
A2s =( m /( d2s * C2s ) ) *10^4 // E x i t a r e a i n cm2
// c a s e I I : i s e n t r o p i c u p t o t h r o a t
T2 = To -( eff *( To - T2s ) ) // E x i t t e m p a r e t u r e i n K
C2 = sqrt (2* Cp *( To - T2 ) ) // E x i t a i r v e l o c i t y i n m/ s
P2 = P2s // E x i t p r e s s u r e i n bar , S i n c e i t i s d i f f u s e r
d2 =( P2 *10^5) /( R * T2 ) // D e n s i t y a t e x i t i n kg /m 3 , P2
i n Pa
A2 =( m /( d2 * C2 ) ) *10^4 // E x i t a r e a i n cm2
// Output
printf ( (A) The n o z z l e c r o s s s e c t i o n a t t h r o a t i n
61
Scilab code Exa 2.13 To find ratio of areas velocity and back pressure in
CD nozzle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
clc
clear
// I n p u t d a t a
Po =600 // S t a g n a t i o n p r e s s u r e i n kPa
To =40+273 // S t a g n a t i o n t e m p e r a t u r e i n K
P2 =100 // e x i t p r e s s u r e i n kPa
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
p1 = P2 / Po // p r e s s u r e r a t i o
M2 =1.82 // E x i t mach number from g a s t a b l e s @p2 , k =1.4
ar =1.461 // R a t i o o f n o z z l e e x i t a r e a t o n o z z l e
t h r o a t a r e a from g a s t a b l e s @M2
t1 =0.602 // R a t i o o f e x i t t e m p e r a t u r e t o S t a g n a t i o n
t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s @M2, k =1.4
T2 = To * t1 // e x i t t e m p e r a t u r e i n K
C2 = sqrt ( k * R * T2 ) * M2 // E x i t a i r v e l o c i t y i n m/ s
p2 =3.698 // R a t i o o f s t a t i c p r e s s u r e s a f t e r s h o c k t o
b e f o r e s h o c k from n o r m a l s h o c k g a s t a b l e s @M2
Py = p2 * P2 // The back p r e s s u r e a t which n o r m a l s h o c k
a c t s a t t h e e x i t p l a n e o f t h e n o z z l e i n kPa
// Output
printf ( (A) R a t i o o f n o z z l e e x i t a r e a t o n o z z l e
t h r o a t a r e a i s %3 . 3 f \n (B) The d i s c h a r g e v e l o c i t y
from n o z z l e i s %3 . 2 f m/ s \n (C) The back p r e s s u r e
62
a t which n o r m a l s h o c k a c t s a t t h e e x i t p l a n e o f
t h e n o z z l e i s %3 . 1 f kPa ,ar , C2 , Py )
area
6 Po =700 // S t a g n a t i o n p r e s s u r e i n kPa
7 P2 =400 // e x i t p r e s s u r e i n kPa
8
9 // C a l c u l a t i o n
10 p1 =0.528 // R a t i o o f
p r e s s u r e from g a s
c r i t i c a l p r e s s u r e to Stagnation
t a b l e s @M=1
p r e s s u r e in bar
ratio
number from g a s t a b l e s @p2 , k =1.4
11 Pt = Po * p1 // c r i t i c a l
12 p2 = P2 / Po // P r e s s u r e
13 M2 =0.93 // E x i t mach
14
15 // Output
16 printf ( S i n c e p r e s s u r e
Scilab code Exa 2.15 To find mass flow rate static and stagnation conditions and entropy change of subsonic diffuser
1 clc
63
2
3
4
5
6
7
8
9
10
11
12
clear
// I n p u t d a t a
A1 =0.15 // I n l e t a r e a i n m2
C1 =240 // I n l e t v e l o c i t y i n m/ s
T1 =300 // I n l e t t e m p e r a t u r e i n K
P1 =0.7 // I n l e t p r e s s u r e i n b a r
C2 =120 // E x i t v e l o c i t y i n m/ s
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
13
14 // C a l c u l a t i o n s
15 a1 = sqrt ( k * R * T1 ) // V e l o c i t y o f sound a t i n l e t i n m/ s
16 M1 = C1 / a1 // I n l e t mach number
17 d1 =( P1 *10^5) /( R * T1 ) // D e n s i t y a t i n l e t i n kg / s , P1
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
i n Pa
m = d1 * A1 * C1 // Mass f l o w r a t e i n kg / s
t1 =0.913 // R a t i o o f i n l e t t e m p e r a t u r e t o S t a g n a t i o n
t e m p e r a t u r e from g a s t a b l e s @M1, k =1.4
To = T1 / t1 // S t a g n a t i o n t e m p e r a t u r e i n K
p1 =0.727 // R a t i o o f i n l e t p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from g a s t a b l e s @M1, k =1.4
Po = P1 / p1 // S t a g n a t i o n p r e s s u r e i n b a r
T2 = To -( C2 ^2/(2* Cp ) ) // E x i t t e m p e r a t u r e i n K
t2 = T2 / To // T e m p e r a t u r e r a t i o
M2 =0.33 // E x i t mach number from g a s t a b l e s @t2 , k =1.4
p2 =0.927 // R a t i o o f e x i t p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from i s e n t r o p i c g a s t a b l e s @M2, k =1.4
P2 = Po * p2 // e x i t p r e s s u r e i n b a r
d2 =( P2 *10^5) /( R * T2 ) // D e n s i t y a t e x i t i n kg / s , P2 i n
Pa
A2 =( m /( d2 * C2 ) ) // E x i t a r e a i n m2
ds =0 // Entropy c h a n g e i n kJ / kgK, s i n c e p r o c e s s i s
isentropic
// Output
64
33
Scilab code Exa 2.16 To find throat area reservoir conditions and mass
flow rate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
clc
clear
// I n p u t d a t a
A2 =645 // E x i t a r e a i n mm2
M2 =2 // E x i t mach number
P2 =1 // e x i t p r e s s u r e i n b a r
T2 =185 // E x i t t e m p e r a t u r e i n K
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
t1 =0.555 // R a t i o o f e x i t t e m p e r a t u r e t o S t a g n a t i o n
t e m p e r a t u r e from g a s t a b l e s @M2, k =1.4
To = T2 / t1 // S t a g n a t i o n t e m p e r a t u r e i n K
p1 =0.128 // R a t i o o f e x i t p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from i s e n t r o p i c g a s t a b l e s @M2, k =1.4
Po = P2 / p1 // S t a g n a t i o n p r e s s u r e i n b a r
a1 =1.687 // R a t i o o f e x i t a r e a t o c r i t i c a l a r e a from
i s e n t r o p i c g a s t a b l e s @M2, k =1.4
At = A2 / a1 // C r i t i c a l a r e a i n mm2
d2 =( P2 *10^5) /( R * T2 ) // D e n s i t y a t e x i t i n kg / s , P2 i n
Pa
C2 = sqrt ( k * R * T2 ) * M2 // E x i t a i r v e l o c i t y i n m/ s
m = d2 * A2 * C2 *10^ -6 // Mass f l o w r a t e i n kg / s , A2 i n m2
65
22
23
24
// Output
printf ( (A) T h r o a t a r e a i s %3 . 2 f mm2\ n (B) R e s e r v o i r
p r e s s u r e i s %3 . 4 f b a r \n (C) R e s e r v o i r t e m p e r a t u r e
i s %3 . 2 f K\n (D) Mass f l o w r a t e i s %3 . 4 f kg / s ,At ,
Po , To , m )
Scilab code Exa 2.17 To find throat conditions ratio of velocities and mass
flow rate
1
2
3
4
5
6
7
8
9
10
11
clc
clear
// I n p u t d a t a
Po =20 // S t a g n a t i o n p r e s s u r e i n kPa
To =1000 // S t a g n a t i o n t e m p e r a t u r e i n K
P2 =3 // e x i t p r e s s u r e i n b a r
A2 =100 // E x i t a r e a i n cm2
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
12
13 // C a l c u l a t i o n s
14 p1 = P2 / Po // P r e s s u r e r a t i o
15 M2 =1.9 // E x i t mach number from g a s t a b l e s @p1 , k =1.4
16 t1 =0.581 // R a t i o o f e x i t t e m p e r a t u r e t o S t a g n a t i o n
17
18
19
20
21
22 Pt = Po * p1 // c r i t i c a l
23 t1 =0.834 // R a t i o o f
24
25
26
27
28
29
30
31
32
33
p r e s s u r e in bar
c r i t i c a l temperature to
S t a g n a t i o n t e m p e r a t u r e from g a s t a b l e s @M=1
Tt = To * t1 // c r i t i c a l t e m p e r a t u r e i n K
at = sqrt ( k * R * Tt ) // Sound v e l o c i t y a t t h r o a t i n m/ s
Ct = at // A i r v e l o c i t y t t h r o a t i n m/ s , S i n c e M=1
dt =( Pt *10^5) /( R * Tt ) // D e n s i t y o f a i r a t t h r o a t i n kg
/m 3 , Pt i n Pa
m = dt * At *10^ -4* Ct // Mass f l o w r a t e i n kg / s , At i n m2
C_max = sqrt (2* Cp * To ) //Maximum p o s s i b l e v e l o c i t y i n m
/s
cr = C2 / C_max // R a t i o o f v e l o c i t i e s
// Output
printf ( (A) At T h r o a t : \ n
Area i s %3 . 2 f cm2\ n
P r e s s u r e i s %3 . 2 f b a r \n
T e m p e r a t u r e i s %3i K\n
(B) E x i t v e l o c i t y i s %3 . 4 f t i m e s C max i n m/ s \n (
C) Mass f l o w r a t e i s %3 . 2 f kg / s ,At , Pt , Tt , cr , m )
Scilab code Exa 2.18 To find mass flow rate and exit conditions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
clc
clear
// I n p u t d a t a
Po =7 // S t a g n a t i o n p r e s s u r e i n b a r
To =100+273 // S t a g n a t i o n t e m p e r a t u r e i n K
At =12 // C r i t i c a l a r e a i n cm2
A2 =25.166 // E x i t a r e a i n cm2
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
a1 = A2 / At // R a t i o o f a r e a s
// s u b s o n i c
67
Scilab code Exa 2.19 To find mach number change in stagnation pressure
entropy change and static temperature and efficiency of nozzle
68
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
clc
clear
// I n p u t d a t a
T1 =335 // I n l e t t e m p e r a t u r e i n K
P1 =655 // I n l e t p r e s s u r e i n kPa
C1 =150 // I n l e t v e l o c i t y i n m/ s
P2 =138 // E x i t p r e s s u r e i n kPa
T2 =222 // E x i t t e m p e r a t u r e i n K
m =9 // Mass f l o w r a t e i n kg / s
Mol =32 // Molar mass o f o x y g e n i n kg / mol
Ri =8314 // I d e a l g a s c o n s t a n t i n J / kgk
k =1.4 // A d i a b a t i c C o n s t a n t
Cp =915 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t p r e s s u r e
i n J / kgK
// C a l c u l a t i o n
R = Ri / Mol // S p e c i f i c g a s c o n s t a n t i n J / kgK
a1 = sqrt ( k * R * T1 ) // Sound v e l o c i t y a t i n l e t i n m/ s
M1 = C1 / a1 // I n l e t mach number
t1 =0.964 // R a t i o o f i n l e t t e m p e r a t u r e t o S t a g n a t i o n
t e m p e r a t u r e from g a s t a b l e s @M1, k =1.4
To1 = T1 / t1 // S t a g n a t i o n t e m p e r a t u r e a t i n l e t i n K
p1 =0.881 // R a t i o o f i n l e t p r e s s u r e t o S t a g n a t i o n
p r e s s u r e a t e n t r y from g a s t a b l e s @M1, k =1.4
Po1 = P1 / p1 // S t a g n a t i o n p r e s s u r e a t e n t r y i n kPa
t2 =0.834 // R a t i o o f c r i t i c a l t e m p e r a t u r e t o
S t a g n a t i o n t e m p e r a t u r e from g a s t a b l e s @M=1
Tt = To1 * t2 // c r i t i c a l t e m p e r a t u r e i n K
C2 = sqrt ( C1 ^2+(2* Cp *( T1 - T2 ) ) ) // E x i t v e l o c i t y i n m/ s ,
a2 = sqrt ( k * R * T2 ) // Sound v e l o c i t y a t e x i t i n m/ s
M2 = C2 / a2 // E x i t mach number
p2 =0.208 // R a t i o o f e x i t p r e s s u r e t o S t a g n a t i o n
p r e s s u r e a t e x i t from i s e n t r o p i c g a s t a b l e s @M2, k
=1.4
Po2 = P2 / p2 // S t a g n a t i o n p r e s s u r e a t e x i t i n kPa
SPC =( Po1 - Po2 ) // Change i n t h e s t a g n a t i o n p r e s s u r e
b e t w e e n i n l e t and e x i t i n kPa
69
i s e n t r o p i c state in K
34 eff =(( T1 - T2 ) /( T1 - T2s ) ) *100 // N o z z l e e f f i c i e n c y i n
percent
35
36
37
// Output
printf ( (A) E x i t mach number i s %3 . 2 f \n (B) Change i n
t h e s t a g n a t i o n p r e s s u r e b e t w e e n i n l e t and e x i t i s
%3 . 2 f kPa \n (C) Change i n e n t r o p y i s %3 . 3 f J / kgK
\n (D) S t a t i c t e m p e r a t u r e a t t h r o a t i s %3 . 1 f K\n (
E) N o z z l e e f f i c i e n c y i s %3 . 2 f p e r c e n t ,M2 , SPC , ds ,
Tt , eff )
Scilab code Exa 2.20 To find pressure rise coefficient and ratio of area
1
2
3
4
5
6
7
8
9
10
11
clc
clear
// I n p u t d a t a
C1 =200 // I n l e t v e l o c i t y i n m/ s
Po1 =400 // S t a g n a t i o n p r e s s u r e a t e n t r y i n kPa
To1 =500 // S t a g n a t i o n t e m p e r a t u r e a t i n l e t i n K
C2 =100 // E x i t v e l o c i t y i n m/ s
eff =0.9 // N o z z l e e f f i c i e n c y
k =1.4 // A d i a b a t i c C o n s t a n t
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
12
13 // C a l c u l a t i o n
14 T1 = To1 -( C1 ^2/(2* Cp ) ) // I n l e t t e m p e r a t u r e i n K
15 t1 = T1 / To1 // T e m p e r a t u r e r a t i o
16 P1 = Po1 * t1 ^( k /( k -1) ) // I n l e t p r e s s u r e i n kPa
17 To2s =( eff *( To1 - T1 ) ) + T1 // E x i t S t a g n a t i o n t e m p e r a t u r e
at i s e n t r o p i c s t a t e in K
70
18 To2 = To2s // E x i t S t a g n a t i o n t e m p e r a t u r e i n K,
Since
adiabatic
19 T2 = To2 -( C2 ^2/(2* Cp ) ) // E x i t t e m p e r a t u r e i n K
20 t2 = To2s / T1 // T e m p e r a t u r e r a t i o
21 Po2 = P1 * t2 ^( k /( k -1) ) // S t a g n a t i o n p r e s s u r e a t e x i t
22
23
24
25
26
27
28
in
kPa
t3 = T2 / To2 // T e m p e r a t u r e r a t i o
P2 = Po2 * t3 ^( k /( k -1) ) // E x i t p r e s s u r e i n kPa
Cpr =( P2 - P1 ) /( Po1 - P1 ) // P r e s s u r e r a i s e c o e f f i c i e n t
ar =( P1 * T2 * C1 ) /( P2 * T1 * C2 ) // R a t i o o f e x i t t o i n l e t
area
// Output
printf ( (A) P r e s s u r e r a i s e c o e f f i c i e n t i s %3 . 3 f \n (B)
R a t i o o f e x i t t o i n l e t a r e a i s %3 . 3 f ,Cpr , ar )
Scilab code Exa 2.21 To find area at throat and exit Mach number total
pressure loss and entropy change
1
2
3
4
5
6
7
8
9
10
11
12
clc
clear
// I n p u t d a t a
Po1 =4.9 // S t a g n a t i o n p r e s s u r e a t e n t r y i n b a r
P2 =1.4 // E x i t p r e s s u r e i n b a r
To =810 // S t a g n a t i o n t e m p e r a t u r e i n K
m =1 // Mass f l o w r a t e i n kg / s
eff =0.9 // N o z z l e e f f i c i e n c y
k =1.4 // A d i a b a t i c C o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
13
14 // C a l c u l a t i o n s
15 t1 =0.834 // R a t i o o f
c r i t i c a l temperature to
71
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
S t a g n a t i o n t e m p e r a t u r e from g a s t a b l e s @M=1
Tt = To * t1 // c r i t i c a l t e m p e r a t u r e i n K
at = sqrt ( k * R * Tt ) // Sound v e l o c i t y a t c r i t i c a l s t a t e
i n m/ s
Ct = at // A i r v e l o c i t y t t h r o a t i n m/ s , S i n c e M=1
p1 =0.528 // R a t i o o f c r i t i c a l p r e s s u r e t o S t a g n a t i o n
p r e s s u r e from g a s t a b l e s @M=1
Pt = Po1 * p1 // c r i t i c a l p r e s s u r e i n b a r
dt =( Pt *10^5) /( R * Tt ) // D e n s i t y o f a i r a t t h r o a t i n kg
/m 3 , Pt i n Pa
At =( m /( dt * Ct ) ) *10^4 // T h r o a t a r e a i n cm2
p2 = P2 / Po1 // P r e s s u r e r a t i o
T2s = To * p2 ^(( k -1) / k ) // E x i t t e m p e r a t u r e i n K ( a t
isentropic state )
T2 = To -( eff *( To - T2s ) ) // E x i t t e m p e r a t u r e i n K
d2 =( P2 *10^5) /( R * T2 ) // D e n s i t y a t e x i t i n kg /m 3 , P2
i n Pa
C2 = sqrt (2* Cp *( To - T2 ) ) // E x i t a i r v e l o c i t y i n m/ s
A2 =( m /( d2 * C2 ) ) *10^4 // E x i t a r e a i n cm2
a2 = sqrt ( k * R * T2 ) // Sound v e l o c i t y a t e x i t i n m/ s
M2 = C2 / a2 // E x i t mach number
p3 =0.332 // S t a t i c t o s t a g n a t i o n p r e s s u r e r a t i o a t
e x i t from i s e n t r o p i c g a s t a b l e s @M2, k =1.4
Po2 = P2 / p3 // s t a g n a t i o n p r e s s u r e i n b a r
TPL = Po1 - Po2 // L o s s i n t o t a l p r e s s u r e i s %3 . 3 f b a r
ds = R * log ( Po1 / Po2 ) // I n c r e a s e i n e n t r o p y i n kJ / kgK
// Output
printf ( (A) T h r o a t and e x i t a r e a a r e %3 . 2 f cm2 and
%3 . 3 f cm2\ n (B) E x i t mach number i s %3 . 2 f \n (C)
L o s s i n t o t a l p r e s s u r e i s %3 . 3 f b a r \n (D) I n c r e a s e
i n e n t r o p y i s %3 . 2 f kJ / kgK ,At , A2 , M2 , TPL , ds )
Scilab code Exa 2.22 To find required throat and exit area of nozzle
72
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
clc
clear
// I n p u t d a t a
Po =3.5 // S t a g n a t i o n p r e s s u r e i n b a r
To =425+273 // S t a g n a t i o n t e m p e r a t u r e i n K
P2 =0.97 // E x i t p r e s s u r e i n b a r
m =18 // Mass f l o w r a t e i n kg / s
Kd =0.99 // C o e f f i c i e n t o f d i s c h a r g e
eff =0.94 // N o z z l e e f f i c i e n c y
k =1.33 // A d i a b a t i c C o n s t a n t
Cp =1110 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
// C a l c u l a t i o n s
Pt = Po *(2/( k +1) ) ^( k /( k -1) ) // c r i t i c a l p r e s s u r e i n b a r
Tt = To *(2/( k +1) ) // c r i t i c a l t e m p e r a t u r e i n K
R = Cp /( k /( k -1) ) // S p e c i f i c g a s c o n s t a n t i n J / kgK
m_s = m / Kd // I s e n t r o p i c mass
at = sqrt ( k * R * Tt ) // Sound v e l o c i t y a t t h r o a t i n m/ s
Ct = at // A i r v e l o c i t y t t h r o a t i n m/ s , S i n c e M=1
dt =( Pt *10^5) /( R * Tt ) // D e n s i t y o f a i r a t t h r o a t i n kg
/m 3 , Pt i n Pa
At =( m_s /( dt * Ct ) ) *10^4 // T h r o a t a r e a i n cm2
p2 = P2 / Po // P r e s s u r e r a t i o
T2s = To * p2 ^(1/( k /( k -1) ) ) // E x i t t e m p e r a t u r e i n K ( a t
isentropic state )
T2 = To -( eff *( To - T2s ) ) // E x i t t e m p e r a t u r e i n K
d2 =( P2 *10^5) /( R * T2 ) // D e n s i t y a t e x i t i n kg /m 3 , P2
i n Pa
C2 = sqrt (2* Cp *( To - T2 ) ) // E x i t a i r v e l o c i t y i n m/ s
A2 =( m_s /( d2 * C2 ) ) *10^4 // E x i t a r e a i n cm2
// Output
printf ( T h r o a t a r e a and E x i t a r e a o f n o z z l e a r e %3 . 1
f cm2 and %3 . 1 f cm2 ,At , A2 )
73
Chapter 3
Flow Through Constant Area
Duct Adiabatic Flow
clc
clear
// i n p u t d a t a
M1 =0.25 // Mach number a t e n t r a n c e
M2 =1 // Mach number a t e x i t
D =0.04 // i n n e r t u d e d i a m e t e r i n m
f =0.002 // f r i c t i o n a l f a c t o r
// c a l c u l a t i o n
X1 =8.537 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r a t
e n t r y from g a s t a b l e s @M1=0.25
12 X2 =0 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r a t e x i t
from g a s t a b l e s @M2=1
13 X = X1 - X2 // o v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
p a r a m e t e r i . e . ( 4 f L ) /D
14 L =( X * D ) /(4* f ) // Length o f t h e p i p e i n m
15
16
// o u t p u t
74
17
Scilab code Exa 3.2 To find length of required duct and length required
to obtain critical condition
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
clc
clear
// i n p u t d a t a
M1 =0.1 // Mach number a t e n t r a n c e
M2 =0.5 // Mach number a t a s e c t i o n
M3 =1 // Mach number a t c r i t i c a l c o n d i t i o n
D =0.02 // D i a m e t e r o f d u c t i n m
f =0.004 // F r i c t i o n a l f a c t o r
// c a l c u l a t i o n
X1 =66.922 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s @M1=0.1
X2 =1.069 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s @M2=0.5
X3 =0 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from g a s
t a b l e s @M3=1
X4 = X1 - X3 // // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r
from M2=0.1 t o M3=1
L1 =( X4 * D ) /(4* f ) // Length o f t h e p i p e i n m
X5 = X2 - X3 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
M2=0.5 t o M3=1
L2 =( X5 * D ) /(4* f ) // A d d i t i o n l e n g t h o f t h e p i p e
r e q u i r e d to a c c e l e r a t e into c r i t i c a l c o nd it i on in
m
L = L1 - L2 // Length o f t h e p i p e r e q u i r e d t o a c c e l e r a t e
t h e f l o w from M1=0.1 t o M2=0.5 i n m
// o u t p u t
printf ( (A) Length o f t h e p i p e r e q u i r e d t o a c c e l e r a t e
75
Scilab code Exa 3.3 To find length of pipe and mass flow rate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
clc
clear
// i n p u t d a t a
D =0.05 // i n n e r p i p e d i a m e t e r i n m
Po =10 // S t a g n a t i o n P r e s s u r e a t r e s e r v o i r i n b a r
To =400 // S t a g n a t i o n t e m p e r a t u r e a t r e s e r v o i r i n K
f =0.002 // f r i c t i o n a l f a c t o r
M1 =3 // Mach number a t e n t r a n c e
M2 =1 // Mach number a t end o f p i p e
R =287 // Gas c o n s t a n t i n J / kgK
k =1.4 // A d i a b a t i c c o n s t a n t
// c a l c u l a t i o n
X1 =0.522 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s @M1=3
X2 =0 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from g a s
t a b l e s @M2=1
X = X1 - X2 // o v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
parameter
L =( X * D ) /(4* f ) // Length o f t h e p i p e i n m
p1 =0.0272 // P r e s s u r e r a t i o from g a s t a b l e s (M=3 , k
=1.4 , i s e n t r o p i c )
P1 = p1 * Po // S t a t i c p r e s s u r e a t e n t r a n c e i n b a r
t1 =0.3571 // T e m p e r a t u r e r a t i o from g a s t a b l e s (M=3 , k
=1.4 , i s e n t r o p i c )
T1 = t1 * To // S t a t i c t e m p e r a t u r e a t e n t r a n c e i n K
d1 =( P1 *10^5) /( R * T1 ) // D e n s i t y o f a i r i n kg /m 3 , P1
i n Pa
76
24
25
26
27
28
29
30
a1 = sqrt ( k * R * T1 ) // Sound v e l o c i t y i n m/ s
C1 = a1 * M1 // a i r v e l o c i t y i n m/ s
A1 =( %pi * D ^2) /4 // C r o s s s e c t i o n a l a r e a o f p i p e i n m2
m = d1 * A1 * C1 // Mass f l o w r a t e i n kg / s
// o u t p u t
printf ( (A) Length o f t h e p i p e i s %3 . 2 f m\n (B) Mass
f l o w r a t e i s %3 . 4 f kg / s ,L , m )
Scilab code Exa 3.4 To find temperature velocity at a section and distance
between two sections
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
clc
clear
// i n p u t d a t a
C1 =235 // V e l o c i t y a t e n t r a n c e i n m/ s
P1 =13 // S t a t i c P r e s s u r e a t e n t r y i n b a r
P2 =10 // S t a t i c P r e s s u r e a t a p o i n t i n d u c t i n b a r
T1 =543 // S t a t i c t e m p e r a t u r e a t e n t r y i n K e l v i n
D =0.15 // i n n e r d u c t d i a m e t e r i n m
f =0.005 // f r i c t i o n a l f a c t o r
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // Gas c o n s t a n t i n J / kgK
// c a l c u l a t i o n
a1 = sqrt ( k * R * T1 ) // Sound v e l o c i t y i n m/ s
M1 = C1 / a1 // Mach number a t e n t r y
p1 =2.138 // S t a t i c P r e s s u r e r a t i o from g a s t a b l e s (
f a n n o f l o w t a b l e s , k = 1 . 4 ,M= 0 . 5 )
Pt = P1 / p1 // S t a t i c c r i t i c a l p r e s s u r e i n b a r
t1 =1.143 // S t a t i c t e m p e r a t u r e r a t i o from g a s t a b l e s
( f a n n o f l o w t a b l e s , k = 1 . 4 ,M= 0 . 5 )
Tt = T1 / t1 // S t a t i c c r i t i c a l t e m p e r a t u r e i n K
c1 =0.534 // V e l o c i t y r a t i o from g a s t a b l e s ( f a n n o
77
22
23
24
25
26
27
28
29
30
31
32
33
34
35
f l o w t a b l e s , k = 1 . 4 ,M= 0 . 5 )
Ct = C1 / c1 // C r i t i c a l v e l o c i t y i n m/ s
p2 =1.644 // P r e s s u r e r a t i o from g a s t a b l e s ( f a n n o
flow ta b le s , k =1.4)
M2 =0.64 // Mach number from g a s t a b l e s ( f a n n o f l o w
t a b l e s , k = 1 . 4 , p2 )
c2 =0.674 // V e l o c i t y r a t i o from g a s t a b l e s ( f a n n o
f l o w t a b l e s , k = 1 . 4 , p2 )
C2 = Ct * c2 // A i r v e l o c i t y a t P2 i n m/ s
t2 =1.109 // T e m p e r a t u r e r a t i o from g a s t a b l e s ( f a n n o
f l o w t a b l e s , k = 1 . 4 , p2 )
T2 = t2 * Tt // S a t i c t e m p e r a t u r e a t P2 i s K
X1 =1.06922 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r
from g a s t a b l e s @M1
X2 =0.353 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s @M2
X = X1 - X2 // o v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
parameter
L =( X * D ) /(4* f ) // Length o f t h e p i p e i n m
// o u t p u t
printf ( (A) T e m p e r a t u r e and v e l o c i t y a t s e c t i o n o f
t h e d u c t where t h e p r e s s u r e h a s d r o p p e d t o %3i
b a r due t o f r i c t i o n a r e %3 . 1 f K and %3 . 2 f m/ s \n (
B) The d i s t a n c e b e t w e e n two s e c t i o n i s %3 . 3 f m ,P2
, T2 , C2 , L )
Scilab code Exa 3.5 To find length of pipe and properties of air at exit
1 clc
2 clear
3
4 // i n p u t d a t a
5 P1 =120 // S t a t i c
6 T1 =313 // S t a t i c
p r e s s u r e at e n t r a n c e in bar
temperature at entry in Kelvin
78
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
parameter
35 L2 =( X5 * D ) /(4* f ) // Length b e t w e e n s o n i c and o u l e t
section
36 L = L1 - L2 // Length o f t h e p i p e i n m
37
38
39
// o u t p u t
printf ( (A) Maximum l e n g t h o f t h e p i p e i s %3 . 2 f m\n (
B) P r o p e r t i e s o f a i r a t s o n i c c o n d i t i o n : \ n
P r e s s u r e i s %3i kPa \n
T e m p e r a t u r e i s %3 . 2 f K\n
V e l o c i t y i s %3 . 1 f m/ s \n (C) Length o f t h e p i p e
i s %3 . 1 f m\n (D) P r o p e r t i e s o f a i r a t M2=%3 . 1 f : \ n
P r e s s u r e i s %3i kPa \n
T e m p e r a t u r e i s %3 . 2 f
K\n
V e l o c i t y i s %3 . 2 f m/ s \n ,L1 , Pt , Tt , Ct ,L , M2
, P2 , T2 , C2 )
Scilab code Exa 3.6 To find mach number properties at a section and critical section and length of the duct
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
clc
clear
// i n p u t d a t a
M1 =0.25 // Mach number a t e n t r a n c e
ds =0.124 // Change i n e n t r o p y i n kJ / kgK
P1 =700 // S t a t i c p r e s s u r e a t e n t r a n c e i n b a r
T1 =333 // S t a t i c t e m p e r a t u r e a t e n t r y i n K e l v i n
D =0.05 // i n n e r p i p e d i a m e t e r i n m
f =0.006 // f r i c t i o n a l f a c t o r
k =1.4 // A d i a b a t i c c o n s t a n t
R =0.287 // Gas c o n s t a n t i n kJ / kgK
// c a l c u l a t i o n
p1 = exp ( ds / R ) // R a t i o o f S t a g n a t i o n p r e s s u r e a t i n l e t
to o u t l e t
16 t1 =0.987 // R a t i o o f S t a t i c T e m p e r a t u r e t o S t a g n a t i o n
80
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
t e m p e r a t u r e a t e n t r y from g a s t a b l e s @M1
To1 = T1 / t1 // S t a g n a t i o n t e m p e r a t u r e a t e n t r y i n K
p2 =0.957 // R a t i o o f S t a t i c p r e s s u r e t o S t a g n a t i o n
p r e s s u r e a t e n t r y from g a s t a b l e s @M1
Po1 = P1 / p2 // S t a g n a t i o n p r e s s u r e a t e n t r y i n kPa
Po2 = Po1 / p1 // S t a g n a t i o n p r e s s u r e a t e x i t i n kPa
a1 = sqrt ( k * R *10^3* T1 ) // Sound v e l o c i t y i n m/ s , R i n J
/ kg
C1 = a1 * M1 // a i r v e l o c i t y i n m/ s
p3 =4.3615 // S t a t i c P r e s s u r e r a t i o from g a s t a b l e s (
f a n n o f l o w t a b l e s , k = 1 . 4 ,M= 0 . 2 5 )
Pt = P1 / p3 // S t a t i c c r i t i c a l p r e s s u r e i n kPa
t1 =1.185 // S t a t i c t e m p e r a t u r e r a t i o from g a s t a b l e s
( f a n n o f l o w t a b l e s , k = 1 . 4 ,M= 0 . 2 5 )
Tt = T1 / t1 // S t a t i c c r i t i c a l t e m p e r a t u r e i n K
c1 =0.272 // V e l o c i t y r a t i o from g a s t a b l e s ( f a n n o
f l o w t a b l e s , k = 1 . 4 ,M= 0 . 2 5 )
Ct = C1 / c1 // C r i t i c a l v e l o c i t y i n m/ s
p4 =2.4065 // P r e s s u r e r a t i o a t e n t r y from g a s t a b l e s
@M1, k
Pot = Po1 / p4 // S t a g n a t i o n p r e s s u r e a t c r i t i c a l s t a t e
i n kPa
X1 =8.537 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k
p5 = Po2 / Pot // P r e s s u r e r a t i o
M2 =0.41 // Mach number a t e x i t from g a s t a b l e s @p5
p6 =2.629 // P r e s s u r e r a t i o a t e x i t from g a s t a b l e s
@p5
P2 = Pt * p6 // E x i t p r e s s u r e i n kPa
t2 =1.161 // T e m p e r a t u r e r a t i o a t e x i t from g a s t a b l e s
@p5
T2 = Tt * t2 // E x i t t e m p e r a t u r e i n K
c2 =0.4415 // V e l o c i t y r a t i o a t e x i t from g a s t a b l e s
@p5
C2 = Ct * c2 // E x i t v e l o c i t y i n m/ s
X2 =2.141 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k
X3 = X1 - X2 // o v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
81
parameter
42 L =( X3 * D ) /(4* f ) // Length o f t h e p i p e i n m
43
44
45
// o u t p u t
printf ( (A) Mach number a t e x i t ( s e c t i o n 2 ) i s %3 . 2 f \
n (B) P r o p e r t i e s a t e x i t ( s e c t i o n 2 ) : \ n
Pressure
i s %3 . 2 f kPa \n
T e m p e r a t u r e i s %3i K\n
V e l o c i t y i s %3 . 3 f m/ s \n (C) Length o f t h e d u c t i s
%3 . 3 f m ,M2 , P2 , T2 , C2 , L )
Scilab code Exa 3.7 TO find final pressure and velocity of duct
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
clc
clear
// i n p u t d a t a
M1 =0.25 // I n i t i a l Mach number
M2 =0.75 // F i n a l mach number
P1 =1.5 // I n l e t p r e s s u r e i n b a r
T1 =300 // I n l e t t e m p e r a t u r e i n K
k =1.4 // A d i a b a t i c c o n s t a n t
R =0.287 // Gas c o n s t a n t i n kJ / kgK
// c a l c u l a t i o n
a1 = sqrt ( k * R *10^3* T1 ) // Sound v e l o c i t y i n m/ s , R i n J
/ kg
C1 = a1 * M1 // a i r v e l o c i t y i n m/ s
p1 =4.3615 // P r e s s u r e r a t i o a t e n t r y from g a s t a b l e s
@M1, k
Pt = P1 / p1 // S t a t i c c r i t i c a l p r e s s u r e i n kPa
c1 =0.272 // V e l o c i t y r a t i o from g a s t a b l e s ( f a n n o
f l o w t a b l e s , k = 1 . 4 ,M1)
Ct = C1 / c1 // C r i t i c a l v e l o c i t y i n m/ s
p2 =1.385 // P r e s s u r e r a t i o a t e x i t from g a s t a b l e s
@M2, k
82
20 P2 = Pt * p2 // E x i t p r e s s u r e i n b a r
21 c2 =0.779 // V e l o c i t y r a t i o a t e x i t from g a s t a b l e s
@M2, k
22 C2 = Ct * c2 // E x i t v e l o c i t y i n m/ s
23
24
25
// o u t p u t
printf ( F i n a l p r e s s u r e and v e l o c i t y a r e %3 . 4 f b a r
and %3 . 2 f m/ s ,P2 , C2 )
Scilab code Exa 3.8 To find inlet mach number mass flow rate and exit
temperature
1
2
3
4
5
6
7
8
9
clc
clear
// i n p u t d a t a
T1 =333 // I n l e t t e m p e r a t u r e i n K
D =0.05 // i n n e r d u c t d i a m e t e r i n m
f =0.005/4 // f r i c t i o n a l f a c t o r
L =5 // Length o f t h e p i p e i n m
Pt =101 // E x i t p r e s s u r e i n kPa , Pt=P2 S i n c e f l o w i s
choked
10 M2 =1 // Mach number a t e x i t s i n c e p i p e i s c h o k e d
11 k =1.4 // A d i a b a t i c c o n s t a n t
12 R =0.287 // Gas c o n s t a n t i n kJ / kgK
13
14 // c a l c u l a t i o n
15 X =(4* f * L ) / D // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r
16 M1 =0.6 // I n l e t mach number
17 t1 =1.119 // T e m p e r a t u r e r a t i o a t e n t r y from f a n n o
f l o w g a s t a b l e s @M1, k
18 Tt = T1 / t1 // S t a t i c c r i t i c a l t e m p e r a t u r e i n K
19 at = sqrt ( k * R *10^3* Tt ) // Sound v e l o c i t y i n m/ s , R i n J
/ kg
20 Ct = at // a i r
v e l o c i t y i n m/ s
83
21 d_t = Pt /( R * Tt ) // D e n s i t y a t e x i t i n kg /m3
22 At = %pi * D ^2/4 // C r i t i c a l a r e a i n m2
23 m = d_t * At * Ct // Mass f l o w r a t e i n kg / s
24
25 // o u t p u t
26 printf ( (A) Mach number a t i n l e t i s %3 . 1 f \n (B) Mass
f l o w r a t e i s %3 . 5 f kg / s \n (C) E x i t t e m p e r a t u r e i s
%3 . 3 f K ,M1 ,m , Tt )
Scilab code Exa 3.9 To find length diameter of the duct pressure at exit
Stagnation pressure lose and to verify exit mach number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
clc
clear
// i n p u t d a t a
m =8.25 // Mass f l o w r a t e i n kg / s
M1 =0.15 // Mach number a t e n t r a n c e
M2 =0.5 // Mach number a t e x i t
P1 =345 // S t a t i c p r e s s u r e a t e n t r a n c e i n kPa
T1 =38+273 // S t a t i c t e m p e r a t u r e a t e n t r y i n K e l v i n
f =0.005 // f r i c t i o n a l f a c t o r
k =1.4 // A d i a b a t i c c o n s t a n t
R =0.287 // Gas c o n s t a n t i n kJ / kgK
// c a l c u ; a t i o n
d1 =( P1 *10^3) /( R *10^3* T1 ) // D e n s i t y o f a i r i n kg /m 3 ,
P1 i n Pa
a1 = sqrt ( k * R *10^3* T1 ) // Sound v e l o c i t y i n m/ s , R i n J
/ kg
C1 = a1 * M1 // a i r v e l o c i t y i n m/ s
A1 = m /( d1 * C1 ) // I n l e t a r e a i n m2
D =( sqrt ((4* A1 ) /( %pi ) ) ) *10^3 // i n n e r d u c t d i a m e t e r i n
mm
p1 =7.3195 // S t a t i c P r e s s u r e r a t i o from g a s t a b l e s (
84
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
f a n n o f l o w t a b l e s , k = 1 . 4 ,M= 0 . 1 5 )
Pt = P1 / p1 // S t a t i c c r i t i c a l p r e s s u r e i n kPa
t1 =1.1945 // S t a t i c t e m p e r a t u r e r a t i o from g a s t a b l e s
( f a n n o f l o w t a b l e s , k = 1 . 4 ,M= 0 . 1 5 )
Tt = T1 / t1 // S t a t i c c r i t i c a l t e m p e r a t u r e i n K
c1 =0.164 // V e l o c i t y r a t i o from g a s t a b l e s ( f a n n o
f l o w t a b l e s , k = 1 . 4 ,M= 0 . 1 5 )
Ct = C1 / c1 // C r i t i c a l v e l o c i t y i n m/ s
p2 =0.984 // P r e s s u r e r a t i o a t e n t r y from g a s t a b l e s (
f a n n o f l o w t a b l e s , k = 1 . 4 ,M= 0 . 1 5 )
Po1 = P1 / p2 // S t a g n a t i o n p r e s s u r e a t e n t r y i n kPa
p3 =3.928 // S t a g n a t i o n p r e s s u r e r a t i o a t e n t r y from
g a s t a b l e s ( f a n n o f l o w t a b l e s , k = 1 . 4 ,M= 0 . 1 5 )
Pot = Po1 / p3 // S t a g n a t i o n p r e s s u r e a t c r i t i c a l s t a t e
i n kPa
X1 =28.354 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k
p5 =2.138 // P r e s s u r e r a t i o a t e x i t from g a s t a b l e s (
f a n n o f l o w t a b l e s , k = 1 . 4 ,M2)
P2 = Pt * p5 // E x i t p r e s s u r e i n kPa
t2 =1.143 // T e m p e r a t u r e r a t i o a t e x i t from g a s t a b l e s
( f a n n o f l o w t a b l e s , k = 1 . 4 ,M2)
T2 = Tt * t2 // E x i t t e m p e r a t u r e i n K
c2 =0.534 // V e l o c i t y r a t i o a t e x i t from g a s t a b l e s (
f a n n o f l o w t a b l e s , k = 1 . 4 ,M2)
C2 = Ct * c2 // E x i t v e l o c i t y i n m/ s
p6 =1.34 // S t a g n a t i o n p r e s s u r e r a t i o a t e x i t from g a s
t a b l e s ( f a n n o f l o w t a b l e s , k = 1 . 4 ,M2)
Po2 = Pot * p6 // S t a g n a t i o n p r e s s u r e a t e x i t i n kPa
SPL = Po1 - Po2 // S t a g n a t i o n P r e s s u r e l o s e i n kPa
X2 =1.069 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k
X3 = X1 - X2 // o v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
parameter
L =( X3 * D *10^ -3) /(4* f ) // Length o f t h e d u c t i n m
42
43
44 // v e r i f i c a t i o n
45 a2 = sqrt ( k * R *10^3* T2 ) // Sound v e l o c i t y
85
i n m/ s , R i n J
/ kg
46 M2_v = C2 / a2 // a i r v e l o c i t y i n m/ s
47
48
49
// o u t p u t
printf ( (A) Length o f t h e d u c t i s %3 . 2 f m\n (B)
D i a m e t e r o f t h e d u c t i s %3i mm\n (C) P r e s s u r e and
d i a m e t e r a t e x i t a r e %3 . 2 f kPa , and %3i mm
r e s p e c t i v e l y \n (D) S t a g n a t i o n P r e s s u r e l o s e i s %3i
kPa \n (E) U s i n g e x i t v e l o c i t y %3 . 2 f m/ s ,
t e m p e r a t u r e %3 . 2 f K Mach number i s f o u n d t o be %3
. 2 f ,L ,D , P2 ,D , SPL , C2 , T2 , M2_v )
Scilab code Exa 3.10 To find length of the pipe Mach number percent of
stagnation pressure loss and length required to reach choking condition
1
2
3
4
5
6
7
8
clc
clear
// i n p u t d a t a
M1 =0.25 // Mach number a t e n t r a n c e
f =0.01/4 // f r i c t i o n a l f a c t o r
D =0.15 // i n n e r p i p e d i a m e t e r i n m
p1 =0.8 // S t a g n a t i o n p r e s s u r e r a t i o a t e x i t t o e n t r y
when l o s s i n s t a g n a t i o n p r e s s u r e i s 20%
9 M3 =0.8 // Mach number a t a s e c t i o n
10
11 // c a l c u l a t i o n
12 p2 =2.4065 // R a t i o o f S t a g n a t i o n
p r e s s u r e at entry
86
17
18
19
20
21
22
23
24
L1 =( X1 * D ) /(4* f ) // Length o f t h e p i p e i n m
L2 =( X2 * D ) /(4* f ) // Length o f t h e p i p e i n m
L = L1 - L2 // O v e r a l l l e n g t h o f t h e d u c t i n m
p4 =1.038 // S t a g n a t i o n p r e s s u r e r a t i o from M=1 t o M3
PL =(1 -( p4 / p2 ) ) *100 // P e r c e n t a g e o f s t a g n a t i o n
p r e s s u r e from i n l e t t o s e c t i o n a t which M3 i n
percent
// o u t p u t
printf ( (A) Length o f t h e p i p e i s %3 . 2 f m\n (B) Mach
number a t t h i s e x i t i s %3 . 2 f \n (C) P e r c e n t a g e o f
s t a g n a t i o n p r e s s u r e from i n l e t t o s e c t i o n a t
which M=%3 . 1 f i s %3 . 2 f p e r c e n t \n (D) Maximum
l e n g t h t o r e a c h c h o k i n g c o n d i t i o n i s %3 . 3 f m ,L ,
M2 , M3 , PL , L1 )
Scilab code Exa 3.11 To find length of the pipe and mass flow rate
1
2
3
4
5
6
7
8
9
10
11
clc
clear
// i n p u t d a t a
D =0.3 // i n n e r d u c t d i a m e t e r i n m
P1 =10 // S t a t i c p r e s s u r e a t e n t r a n c e i n b a r
T1 =400 // S t a t i c t e m p e r a t u r e a t e n t r y i n K e l v i n
M1 =3 // Mach number a t e n t r a n c e
M2 =1 // Mach number a t e x i t
k =1.3 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c Gas c o n s t a n t i n J / kgK, wrong
printing in question
12 f =0.002 // f r i c t i o n a l f a c t o r
13
14 // c a l c u l a t i o n
15 p1 =0.233 // P r e s s u r e
r a t i o from g a s t a b l e s (M=3 , k
=1.4 , i s e n t r o p i c )
87
16 Pt = P1 / p1 // S t a t i c p r e s s u r e a t e n t r a n c e i n b a r
17 t1 =0.489 // T e m p e r a t u r e r a t i o from g a s t a b l e s (M=3 , k
18
19
20
21
22
23
24
25
26
27
28
=1.4 , i s e n t r o p i c )
Tt = T1 / t1 // S t a t i c t e m p e r a t u r e a t e n t r a n c e i n K
X1 =0.628 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.3
L1 =( X1 * D ) /(4* f ) // Length o f t h e p i p e i n m
d_t =( Pt *10^5) /( R * Tt ) // D e n s i t y a t c r i t i c a l s t a t e i n
kg /m 3 , Pt i n Pa
at = sqrt ( k * R * Tt ) // Sound v e l o c i t y i n m/ s , R i n J / kg
Ct = at // a i r v e l o c i t y i n m/ s
At =( %pi * D ^2) /4 // C r i t i c a l a r e a i n m2
m = d_t * At * Ct // Mass f l o w r a t e i n kg / s
// o u t p u t
printf ( (A) Length o f t h e p i p e i s %3 . 2 f m\n (B) Mass
f l o w r a t e i s %3 . 3 f kg / s ,L1 , m )
Scilab code Exa 3.12 To find length and Mach number of given pipe and
at required section
1
2
3
4
5
6
7
8
clc
clear
// i n p u t d a t a
M1 =0.25 // Mach number a t e n t r a n c e
f =0.04/4 // f r i c t i o n a l f a c t o r
D =0.15 // i n n e r d u c t d i a m e t e r i n m
p1 =0.9 // S t a g n a t i o n p r e s s u r e r a t i o a t e x i t t o e n t r y
when l o s s i n s t a g n a t i o n p r e s s u r e i s 10%
9 ds =190 // / Change i n e n t r o p y i n J / kgK
10 k =1.3 // A d i a b a t i c c o n s t a n t
11 R =287 // S p e c i f i c Gas c o n s t a n t i n J / kgK, wrong
printing in question
12
88
13 // c a l c u l a t i o n
14 p2 =2.4064 // R a t i o o f
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
stagnation p r e s s u r e s at i n l e t
t o c r i t i c a l s t a t e from g a s t a b l e s f a n n o f l o w
t a b l e s @M1, k =1.3
X1 =8.537 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.3
p3 = p1 * p2 // R a t i o o f s t a g n a t i o n p r e s s u r e s a t e x i t t o
c r i t i c a l s t a t e from g a s t a b l e s f a n n o f l o w t a b l e s
@M1, k =1.3
M2 =0.28 // Mach number a t p1 =0.9 from g a s t a b l e s @p3
X2 =6.357 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k =1.3
X3 = X1 - X2 // o v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
parameter
L1 =( X3 * D ) /(4* f ) // Length o f t h e p i p e i n m
p4 = exp ( ds / R ) // R a t i o o f S t a g n a t i o n p r e s s u r e a t e n t r y
t o S t a g n a t i o n p r e s s u r e where d s =190
p5 = p1 / p4 // R a t i o o f S t a g n a t i o n p r e s s u r e s where d s
=190 t o c r i t i c a l s t a t e
M3 =0.56 // Mach number where d s =190
X4 =0.674 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M3, k =1.3
X5 = X1 - X4 // o v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
parameter
L2 =( X5 * D ) /(4* f ) // Length o f t h e p i p e i n m
// o u t p u t
printf ( (A) Length o f t h e p i p e i s %3 . 3 f m\n (B) Length
o f t h e p i p e would r e q u i r e t o r i s e e n t r o p y by %3i
J / kgK i s %3 . 5 f m\n (C) Mach number i s %3 . 2 f ,L1 ,
ds , L2 , M3 )
Scilab code Exa 3.13 To find length of the pipe percent of stagnation pressure change and entropy change
89
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
clc
clear
// i n p u t d a t a
Po1 =200 // S t a g a n t i o n p r e s s u r e a t i n l e t i n kPa
To1 =303 // S t a g n a t i o n t e m p e r a t u r e a t i n l e t i n K
M1 =0.2 // I n l e t Mach number from d i a g r a m
D =0.025 // i n n e r t u d e d i a m e t e r i n m( m i s s i n g d a t a )
M2 =0.8 // O u t l e t Mach number
f =0.005/4 // f r i c t i o n a l f a c t o r
R =287 // Gas c o n s t a n t i n J / kgK
// c a l c u l a t i o n
t1 =0.992 // S t a t i c t o S t a g n a t i o n t e m p e r a t u r e r a t i o a t
e n t r y from g a s t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
T1 = To1 * t1 // S t a t i c t e m p e r a t u r e i n K
p1 =0.973 // S t a t i c t o S t a g n a t i o n p r e s s u r e r a t i o a t
e n t r y from g a s t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
P1 = Po1 * p1 // S t a t i c p r e s s u r e i n kPa
p2 =2.964 // S t a g n a t i o n p r e s s u r e r a t i o a t i n l e t t o
c r i t i c a l s t a t e from g a s t a b l e s (M1, k = 1 . 4 , f a n n o
flow )
Pot = Po1 / p2 // S t a g n a t i o n p r e s s u r e a t c r i t i c a l s t a t e
i n kPa
X1 =14.533 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
p3 =1.038 // S t a g n a t i o n p r e s s u r e r a t i o a t o u t l e t t o
c r i t i c a l s t a t e from g a s t a b l e s (M1, k = 1 . 4 , f a n n o
flow )
Po2 = Pot * p3 // S t a g n a t i o n p r e s s u r e a t e x i t i n kPa
X2 =0.073 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k =1.4
X3 = X1 - X2 // o v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
parameter
L1 =( X3 * D ) /(4* f ) // Length o f t h e p i p e i n m
SPL =(1 -( p3 / p2 ) ) *100 // P e r c e n t a g e d e c r e a s e i n
stagnation pressure in percent
ds = R * log ( Po1 / Po2 ) // Change o f e n t r o p y i n kJ / kgK
90
28
29
30
// o u t p u t
printf ( (A) Length o f t h e p i p e i s %3 . 1 f m\n (B)
P e r c e n t a g e d e c r e a s e i n s t a g n a t i o n p r e s s u r e i s %3
. 2 f p e r c e n t \n (C) Change o f e n t r o p y i s %3 . 3 f kJ / kg
K ,L1 , SPL , ds )
Scilab code Exa 3.14 To find maximum length of pipe and conditions of
air at exit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
clc
clear
// i n p u t d a t a
D1 =0.03 // I n l e t d u c t d i a m e t e r i n m
D2 =0.015 // T h r o a t d i a m e t e r o f d u c t i n m
Po1 =750 // S t a g a n t i o n p r e s s u r e a t i n l e t i n kPa
To1 =450 // S t a g n a t i o n t e m p e r a t u r e a t i n l e t i n K
f =0.02/4 // f r i c t i o n a l f a c t o r
L =0.25 // Length o f t h e d u c t i n m
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // Gas c o n s t a n t i n J / kgK
// c a l c u l a t i o n
ar =( D1 / D2 ) ^2 // R a t i o o f a r e a s
M1 =2.94 // Mach number a t i n l e t from g a s t a b l e s ( ar , k
=1.4 , i s e n t r o p i c )
p1 =0.0298 // S t a t i c t o S t a g n a t i o n p r e s s u r e r a t i o a t
e n t r y from g a s t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
P1 = Po1 * p1 // S t a t i c p r e s s u r e a t i n l e t i n kPa
t1 =0.367 // S t a t i c t o S t a g n a t i o n t e m p e r a t u r e r a t i o a t
e n t r y from g a s t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
T1 = To1 * t1 // S t a t i c t e m p e r a t u r e a t i n l e t i n K
a1 = sqrt ( k * R * T1 ) // Sound v e l o c i t y i n m/ s
C1 = a1 * M1 // A i r v e l o c i t y a t i n l e t i n m/ s
91
23 X1 =0.513 // f r i c t i o n a l
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
p2 =0.226 // S t a t i c t o C r i t i c a l p r e s s u r e r a t i o a t
i n l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
Pt = P1 / p2 // C r i t i c a l p r e s s u r e i n kPa
c1 =1.949 // S t a t i c t o C r i t i c a l v e l o c i t y r a t i o a t
i n l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
Ct = C1 / c1 // C r i t i c a l v e l o c i t y i n m/ s
t2 =0.439 // S t a t i c t o C r i t i c a l t e m p e r a t u r e r a t i o a t
i n l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
Tt = T1 / t2 // C r i t i c a l t e m p e r a t u r e i n K
L1 =( X1 * D1 ) /(4* f ) // Length o f t h e p i p e from i n l e t t o
c r i t i c a l state in m
L2 = L1 - L // Length o f t h e p i p e from r e q u i r e d p o i n t t o
c r i t i c a l state in m
X2 =(4* f * L2 ) / D2 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r
M2 =2.14 // Mach number a t i n l e t from g a s t a b l e s ( X2 , k
=1.4 , fanno flow )
p3 =0.369 // S t a t i c t o C r i t i c a l p r e s s u r e r a t i o a t
o u t l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k
=1.4
P2 = Pt * p3 // E x i t p r e s s u r e i n kPa
c2 =1.694 // S t a t i c t o C r i t i c a l v e l o c i t y r a t i o a t
o u t l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k
=1.4
C2 = Ct * c2 // E x i t v e l o c i t y i n m/ s
t3 =0.623 // S t a t i c t o C r i t i c a l t e m p e r a t u r e r a t i o a t
o u t l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k
=1.4
T2 = t3 * Tt // E x i t t e m p e r a t u r e i n K
// o u t p u t
printf ( (A) Maximum l e n g t h o f t h e p i p e i s %3 . 4 f m\n (
B) C o n d i t i o n o f a i r a t e x i t : \ n
P r e s s u r e i s %3 . 2
f kPa \n
V e l o c i t y i s %3 . 2 f m/ s \n
Temperature
i s %3 . 2 f K\n ,L1 , P2 , C2 , T2 )
92
Scilab code Exa 3.15 To find Maximum and required length of the pipe
and properties of air at a section
1
2
3
4
5
6
7
8
9
10
clc
clear
// i n p u t d a t a
f =0.002 // f r i c t i o n a l f a c t o r
C1 =130 // A i r v e l o c i t y a t i n l e t i n m/ s
T1 =400 // I n l e t t e m p e r a t u r e a t i n l e t i n K
P1 =250 // I n l e t p r e s s u r e a t i n l e t i n kPa
D =0.16 // I n l e t d u c t d i a m e t e r i n m
p1 =0.8 // S t a g n a t i o n p r e s s u r e r a t i o a t e x i t t o e n t r y
when l o s s i n s t a g n a t i o n p r e s s u r e i s 20%
11 L1 =35 // Length o f d u c t from i n l e t t o r e q u i r e d
section
12 k =1.4 // A d i a b a t i c c o n s t a n t
13 R =287 // Gas c o n s t a n t i n J / kgK
14
15 // c a l c u l a t i o n
16 a1 = sqrt ( k * R * T1 ) // Sound v e l o c i t y i n m/ s
17 M1 = C1 / a1 // Mach number a t i n l e t
18 p2 =0.9295 // S t a t i c t o S t a g n a t i o n p r e s s u r e
19
20
21
22
23
24
r a t i o at
e n t r y from g a s t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
Po1 = P1 / p2 // S t a g a n t i o n p r e s s u r e a t i n l e t i n kPa
Po2 =0.8* Po1 // S t a g a n t i o n p r e s s u r e a t o u t l e t i n kPa
p3 =1.89725 // S t a g n a t i o n p r e s s u r e r a t i o a t i n l e t t o
c r i t i c a l s t a t e from g a s t a b l e s (M1, k = 1 . 4 , f a n n o
flow )
Pot = Po1 / p3 // S t a g n a t i o n p r e s s u r e a t c r i t i c a l s t a t e
i n kPa
X1 =4.273 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
p4 =3.33725 // S t a t i c P r e s s u r e r a t i o from g a s t a b l e s (
93
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
f a n n o f l o w t a b l e s , k = 1 . 4 ,M= 0 . 5 )
Pt = P1 / p4 // S t a t i c c r i t i c a l p r e s s u r e i n kPa
t1 =1.175 // S t a t i c t e m p e r a t u r e r a t i o from g a s t a b l e s
( f a n n o f l o w t a b l e s , k = 1 . 4 ,M= 0 . 5 )
Tt = T1 / t1 // S t a t i c c r i t i c a l t e m p e r a t u r e i n K
c1 =0.347 // V e l o c i t y r a t i o from g a s t a b l e s ( f a n n o
f l o w t a b l e s , k = 1 . 4 ,M= 0 . 5 )
Ct = C1 / c1 // C r i t i c a l v e l o c i t y i n m/ s
p5 = Po2 / Pot // P r e s s u r e r a t i o
M2 =0.43 // Mach number a t p1 =0.8
X2 =1.833 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k =1.4
X3 = X1 - X2 // o v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
parameter
L2 =( X3 * D ) /(4* f ) // Length o f t h e p i p e i n m, ( from
r e q u i r e d s e c t i o n to c r i t i c a l s t a t e )
L3 =( X1 * D ) /(4* f ) // Length o f t h e p i p e i n m, ( from
r e q u i r e d i n l e t to c r i t i c a l s t a t e )
L4 = L3 - L1 // Length o f t h e p i p e i n m
X4 =(4* f * L3 ) / D // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r
M3 =0.39 // Mach number a t L1=35m
p6 =2.767 // S t a t i c t o C r i t i c a l p r e s s u r e r a t i o a t
o u t l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M3, k
=1.4
P2 = Pt * p6 // E x i t p r e s s u r e i n kPa
t2 =1.1645 // S t a t i c t o C r i t i c a l t e m p e r a t u r e r a t i o a t
o u t l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M3, k
=1.4
T2 = Tt * t2 // E x i t t e m p e r a t u r e i n K
c2 =0.42087 // S t a t i c t o C r i t i c a l v e l o c i t y r a t i o a t
o u t l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M3, k
=1.4
C2 = Ct * c2 // E x i t v e l o c i t y i n m/ s
// o u t p u t
printf ( (A) Length o f p i p e r e q u i r e d f o r p=%3 . 1 f m i s
%3 . 3 f m\n (B) P r o p e r t i e s o f a i r a t s e c t i o n %3i
from i n l e t : \ n
T e m p e r a t u r e i s %3 . 3 f K\n
94
P r e s s u r e i s %3 . 2 f kPa \n
V e l o c i t y i s %3 . 1 f m/ s \
n (C) Maximum l e n g t h o f t h e p i p e i s %3 . 2 f m ,p1 , L2
, L1 , T2 , P2 , C2 , L3 )
Scilab code Exa 3.16 To find exit mach number and inlet temperature
and pressure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
clc
clear
// i n p u t d a t a
D =0.3 // i n n e r p i p e d i a m e t e r i n m
Q =1000 // D i s c h a r g e i n m3/ min
P2 =150 // E x i t p r e s s u r e i n kPa
T2 =293 // E x i t t e m p e r a t u r e i n K
L1 =50 // Length o f t h e p i p e i n m
f =0.005 // f r i c t i o n a l f a c t o r
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // Gas c o n s t a n t i n J / kgK
// c a l c u l a t i o n
A = %pi * D ^2/4 // Area o f d u c t i n m2
C2 = Q /( A *60) // E x i t a i r v e l o c i t y i n m/ s
a2 = sqrt ( k * R * T2 ) // Sound v e l o c i t y i n m/ s
M2 = C2 / a2 // E x i t mach number
p1 =1.54 // // S t a t i c t o C r i t i c a l p r e s s u r e r a t i o a t
o u t l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k
=1.4
Pt = P2 / p1 // C r i t i c a l p r e s s u r e i n kPa
t1 =1.10 // S t a t i c t o C r i t i c a l t e m p e r a t u r e r a t i o a t
o u t l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k
=1.4
Tt = T2 / t1 // C r i t i c a l t e m p e r a t u r e i n K
X1 =0.228 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k =1.4
95
24 L2 =( X1 * D ) /(4* f ) // Length o f t h e p i p e i n m
25 L2 = L1 + L2 // O v e r a l l l e n g t h o f p i p e from i n l e t
26
27
28
29
30
31
32
33
34
to
c r i t i c a l state in m
X2 =(4* f * L2 ) / D // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r
f o r M1
M1 =0.345 // I n l e t Mach number from g a s t a b l e s f a n n o
f l o w t a b l e s @X2 , k =1.4
p2 =3.14 // S t a t i c t o C r i t i c a l p r e s s u r e r a t i o a t i n l e t
from g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
P1 = Pt * p2 // S t a t i c p r e s s u r e a t i n l e t i n kPa
t2 =1.17 // S t a t i c t o C r i t i c a l t e m p e r a t u r e r a t i o a t
i n l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
T1 = Tt * t2 // S t a t i c t e m p e r a t u r e a t i n l e t i n K
// o u t p u t
printf ( (A) Mach number a t t h e e x i t i s %3 . 3 f \n (B)
I n l e t p r e s s u r e and t e m p e r a t u r e a r e %3 . 3 f kPa and
%3 . 2 f K ,M2 , P1 , T1 )
Scilab code Exa 3.17 To find Static and Stagnation conditions velocity
length and mass flow rate of air in pipe
1
2
3
4
5
6
7
8
9
10
11
12
13
clc
clear
// i n p u t d a t a
D =0.0254 // i n n e r p i p e d i a m e t e r i n m
f =0.003 // f r i c t i o n a l f a c t o r
M1 =2.5 // I n l e t Mach number
To1 =310 // S t a g n a t i o n t e m p e r a t u r e a t i n l e t i n K
P1 =0.507 // S t a t i c p r e s s u r e a t i n l e t i n kPa
M2 =1.2 // E x i t mach number
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // Gas c o n s t a n t i n J / kgK
96
14 // c a l c u l a t i o n
15 t1 =0.4444 // S t a t i c t o S t a g n a t i o n t e m p e r a t u r e
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
ratio
a t e n t r y from g a s t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
T1 = To1 * t1 // S t a t i c t e m p e r a t u r e a t i n l e t i n K
p1 =0.05853 // S t a t i c t o S t a g n a t i o n p r e s s u r e r a t i o a t
e n t r y from g a s t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
Po1 = P1 / p1 // S t a g a n t i o n p r e s s u r e a t i n l e t i n kPa
a1 = sqrt ( k * R * T1 ) // Sound v e l o c i t y a t i n l e t i n m/ s , R
i n J / kg
C1 = a1 * M1 // a i r v e l o c i t y a t i n l e t i n m/ s
c1 =2.95804 // S t a t i c t o C r i t i c a l v e l o c i t y r a t i o a t
i n l e t from g a s t a b l e s , i s o t h e r m a l t a b l e s @M1, k =1.4
Ctt = C1 / c1 // C r i t i c a l v e l o c i t y a t i s o t h e r m a l s t a t e i n
m/ s
p2 =0.33806 // S t a t i c t o C r i t i c a l p r e s s u r e r a t i o a t
i n l e t from g a s t a b l e s , i s o t h e r m a l @M1, k =1.4
Ptt = P1 / p2 // C r i t i c a l p r e s s u r e a t i s o t h e r m a l s t a t e i n
bar
p3 =3.61691 // S t a g n a t i o n p r e s s u r e r a t i o a t i n l e t t o
i s o t h e r m a l s t a t e from g a s t a b l e s , i s o t h e r m a l
t a b l e s @M1, k =1.4
Pott = Po1 / p3 // C r i t i c a l p r e s s u r e a t i s o t h e r m a l s t a t e
in K
t2 =1.968748 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t i n l e t
t o i s o t h e r m a l s t a t e from g a s t a b l e s , i s o t h e r m a l
t a b l e s @M1, k =1.4
Tott = To1 / t2 // C r i t i c a l t e m p e r a t u r e a t i s o t h e r m a l
state in K
X1 =1.28334 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r
from g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
c2 =1.4186 // S t a t i c t o C r i t i c a l v e l o c i t y r a t i o a t
e x i t from g a s t a b l e s , i s o t h e r m a l t a b l e s @M2, k =1.4
C2 = Ctt * c2 // E x i t v e l o c i t y i n m/ s
p4 =0.7043 // S t a t i c t o C r i t i c a l p r e s s u r e r a t i o a t
i n l e t from g a s t a b l e s , i s o t h e r m a l @M2, k =1.4
P2 = Ptt * p4 // E x i t p r e s s u r e i n b a r
p5 =1.07026 // S t a g n a t i o n p r e s s u r e r a t i o a t i n l e t t o
i s o t h e r m a l s t a t e from g a s t a b l e s , i s o t h e r m a l
97
35
36
37
38
39
40
41
42
43
44
45
46
47
t a b l e s @M2, k =1.4
Po2 = Pott * p5 // S t a g n a t i o n p r e s s u r e a t e x i t i n b a r
t3 =1.127 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t i n l e t t o
i s o t h e r m a l s t a t e from g a s t a b l e s , i s o t h e r m a l
t a b l e s @M2, k =1.4
To2 = Tott * t3 // S t a g n a t i o n t e m p e r a t u r e a t e x i t i n b a r
T2 = T1 // E x i t t e m p e r a t u r e i n K, S i n c e i s o t h e r m a l f l o w
X2 =0.19715 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r
from g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k =1.4
X3 = X1 - X2 // O v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
parameter
L1 =( X3 * D ) /(4* f ) // Length o f t h e p i p e i n m
d1 =( P1 *10^5) /( R * T1 ) // D e n s i t y o f a i r i n kg /m 3 , P1
i n Pa
A1 =( %pi * D ^2) /4 // C r o s s s e c t i o n a l a r e a o f p i p e i n m2
m = d1 * A1 * C1 // Mass f l o w r a t e i n kg / s
// o u t p u t
printf ( At M=%3 . 1 f : \ n (A) S t a t i c p r e s s u r e and s t a t i c
t e m p e r a t u r e a r e %3 . 5 f b a r and %3 . 3 f K
r e s p e c t i v e l y \n (B) S t a g n a t i o n p r e s s u r e and
t e m p e r a t u r e a r e %3 . 4 f b a r and %3 . 3 f K
r e s p e c t i v e l y \n (C) V e l o c i t y o f a i r i s %3 . 3 f m/ s \n
(D) D i s t a n c e o f t h e s e c t i o n from i n n l e t i s %3 . 3 f m
\n (E) Mass f l o w r a t e i s %3 . 5 f kg / s ,M2 , P2 , T2 , Po2 ,
To2 , C2 , L1 , m )
Scilab code Exa 3.18 To find length of pipe and properties of air at a
section and limiting mach number
1 clc
2 clear
3
4 // i n p u t d a t a
5 D =0.12 // i n n e r d u c t d i a m e t e r i n m
98
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
f =0.004 // f r i c t i o n a l f a c t o r
M1 =0.4 // I n l e t Mach number
P1 =300 // S t a t i c p r e s s u r e a t i n l e t i n kPa
T1 =310 // S t a t i c t e m p e r a t u r e a t i n l e t i n K
M2 =0.6 // E x i t mach number
k =1.4 // A d i a b a t i c c o n s t a n t
// c a l c u l a t i o n
p1 =2.118 // S t a t i c t o C r i t i c a l p r e s s u r e r a t i o a t
i n l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
Pt = P1 / p1 // C r i t i c a l p r e s s u r e i n kPa
X1 =1.968 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
p2 =1.408 // S t a t i c t o C r i t i c a l p r e s s u r e r a t i o a t
o u t l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k
=1.4
P2 = Pt * p2 // E x i t p r e s s u r e i n kPa
X2 =0.299 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k =1.4
X3 = X1 - X2 // O v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
parameter
L1 =( X3 * D ) /(4* f ) // Length o f t h e p i p e i n m
T2 = T1 // E x i t t e m p e r a t u r e i n K, S i n c e i s o t h e r m a l f l o w
Ttt = T1 // C r i t i c a l t e m p e r a t u r e a t c r i t i c a l s t a t e ,
Since isothermal flow
Mtt =1/ sqrt ( k ) // L i m i t i n g Mach number
L2 =( X1 * D ) /(4* f ) // Length o f t h e d u c t r e q u i r e d t o
a t t a i n l i m i t i n g mach number i n m
// o u t p u t
printf ( (A) Length o f t h e d u c t r e q u i r e d t o c h n a g e t h e
mach number t o %3 . 1 f i s %3 . 4 f m\n (B) P r e s s u r e
and t e m p e r a t u r e a t M=%3 . 1 f i s %3i kPa and %3i K
r e s p e c t i v e l y \n (C) Length o f t h e d u c t r e q u i r e d t o
a t t a i n l i m i t i n g mach number i s %3 . 3 f m\n (D) S t a t e
o f a i r a t l i m i t i n g mach number %3 . 3 f i s s u b s o n i c
,M2 , L1 , M2 , P2 , T2 , L2 , Mtt )
99
15
16
17
18
19
20
21
22
clc
clear
// i n p u t d a t a
m =0.32 // Mass f l o w r a t e i n kg / s
L =140 // Length o f t h e p i p e i n m
P1 =800 // I n l e t p r e s s u r e i n N/m 2 , wrong u n i t s i n
textbook
T1 =288 // I n l e t t e m p e r a t u r e i n K
P2 =600 // O u t l e t p r e s s u r e i n N/m 2 , wrong u n i t s i n
textbook
f =0.006 // f r i c t i o n a l f a c t o r
R =287 // Gas c o n s t a n t i n J / kgK
// c a l c u l a t i o n
// U s i n g A d i a b a t i c E q u a t i o n d = 1 / ( ( ( ( ( ( %pi ( d / 2 ) 2 ) 2 )
/ ( 2 m2RT) ) ( P12P2 2 ) ) ( l o g ( P1/P2 ) ) ) / ( 2 f L ) )
and c o n v e r t i n g i n t o 5 t h d e g r e e p o l y n o m i a l o f d
a =( %pi ^2*( P1 ^2 - P2 ^2) ) /(32* m ^2* R * T1 ) // C o e f f i c i e n t o f
power 5
b = log ( P1 / P2 ) // C o e f f i c i e n t o f power 1
c =2* f * L // C o e f f i c i e n t o f c o n s t a n t
p5 = poly ([ - c -b 0 0 0 a ] , d , c o e f f ) // S o l v i n g
polynomial of degree 5
d = roots ( p5 , e ) //Command t o f i n d r o o t s
// o u t p u t
disp ( P o s s i b l e v a l u e s f o r d i a m e t e r o f p i p e a r e : \ n )
// D i s p l a y s w h a t e v e r w i t h i n p a r a n t h e s i s
23 disp ([ d ]) //To d i s p l a y r o o t s
24 printf ( \ n T h e r e f o r e D i a m e t e r o f t h e p i p e i s 0 . 7 m )
100
20
21
22
23
24
25
clc
clear
// i n p u t d a t a
Q =225/60 // D i s c h a r g e i n m3/ s
T2 =293 // E x i t t e m p e r a t u r e i n K
P2 =1.25 // E x i t p r e s s u r e i n b a r
L1 =30 // Length o f t h e p i p e i n m
D =0.15 // Duct d i a m e t e r i n m
f =0.02/4 // f r i c t i o n a l f a c t o r
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // Gas c o n s t a n t i n J / kgK
// c a l c u l a t i o n
A = %pi * D ^2/4 // a r e a i n m2
C2 = Q / A // E x i t a i r v e l o c i t y i n m/ s
a2 = sqrt ( k * R * T2 ) // E x i t sound v e l o c i t y i n m/ s
M2 = C2 / a2 // E x i t mach number
p1 =1.703 // S t a t i c t o C r i t i c a l p r e s s u r e r a t i o a t
o u t l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k
=1.4
Pt = P2 / p1 // C r i t i c a l p r e s s u r e i n b a r
c1 =0.654 // S t a t i c t o C r i t i c a l v e l o c i t y r a t i o a t
o u t l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k
=1.4
Ct = C2 / c1 // C r i t i c a l v e l o c i t y i n m/ s
t1 =1.114 // S t a t i c t o C r i t i c a l t e m p e r a t u r e r a t i o a t
o u t l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k
=1.4
Tt = T2 / t1 // C r i t i c a l t e m p e r a t u r e i n K
X1 =0.417 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
101
26 X2 =(4* f * L1 ) / D // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r
27 X3 = X1 + X2 // o v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
28
29
30
31
32
33
34
35
36
37
parameter
M1 =0.32 // Mach number a t e n t r a n c e
p2 =3.385 // S t a t i c t o C r i t i c a l p r e s s u r e r a t i o a t
i n l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
P1 = Pt * p2 // S t a t i c p r e s s u r e a t i n l e t i n b a r
c2 =0.347 // S t a t i c t o C r i t i c a l v e l o c i t y r a t i o a t
i n l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
C1 = Ct * c2 // A i r v e l o c i t y a t i n l e t i n m/ s
t2 =1.176 // S t a t i c t o C r i t i c a l t e m p e r a t u r e r a t i o a t
i n l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
T1 = Tt * t2 // S t a t i c t e m p e r a t u r e a t i n l e t i n K
// o u t p u t
printf ( R e q u i r e d I n l e t C o n d i t i o n : \ n
Pressure i s
%3 . 4 f b a r \n
V e l o c i t y i s %3 . 3 f m/ s \n
T e m p e r a t u r e i s %3 . 1 f K ,P1 , C1 , T1 )
Scilab code Exa 3.21 To find mach number at sections and mean value of
friction
1
2
3
4
5
6
7
8
9
10
11
12
13
clc
clear
// i n p u t d a t a
D1 =0.134 // I n l e t d u c t d i a m e t e r i n m
Po1 =7 // S t a g n a t i o n p r e s s u r e a t i n l e t i n b a r
P1 =0.245 // S t a t i c p r e s s u r e a t 5D1 i . e . L1 i n b a r
P2 =0.5 // S t a t i c p r e s s u r e a t 33D1 i . e . L2 i n b a r
D2 =0.0646 // t h r o a t d i a m e t e r i n m
L1 =5* D1 // Length o f n o z z l e t i l l s e c t i o n 1 i n m
L2 =33* D1 // Length o f n o z z l e t i l l s e c t i o n 2 i n m
// c a l c u l a t i o n
102
14 ar =( D1 / D2 ) ^2 // R a t i o o f a r e a s
15 p1 = P1 / Po1 // P r e s s u r e r a t i o
16 APR1 = p1 * ar // Area P r e s s u r e r a t i o
i . e . ( A1P1 ) / ( At
Po1 )
17 M1 =2.54 // Mach number a t
18
19
20
21
22
23
24
25
26
27
i n l e t from i s e n t r o p i c g a s
t a b l e s @APR1
X1 =0.44 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
APR2 =0.3073 // Area P r e s s u r e r a t i o i . e . ( A2P2 ) / ( At
Po1 )
M2 =1.54 // E x i t mach number
X2 =0.151 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k =1.4
X3 = X1 - X2 // o v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
parameter
L3 = L2 - L1 // Length o f t h e n o z z l e ( S e c t i o n 1 t o
S e c t i o n 2) i n m
f =( X3 * D1 ) /(4* L3 ) // f r i c t i o n a l f a c t o r
// o u t p u t
printf ( (A) Mach number a t %3 . 3 f m and %3 . 3 f m a r e %3
. 2 f and %3 . 2 f r e s p e c t i v e l y \n (B) Mean v a l u e o f
f r i c t i o n b e t w e e n two s e c t i o n s i s %3 . 5 f ,L1 , L2 , M1 ,
M2 , f )
103
Chapter 4
Flow Through Constant Area
Ducts Rayleigh Flow
Scilab code Exa 4.1 To find heat transferred per unit mass flow and temperature change
1
2
3
4
5
6
7
8
9
10
11
12
clc
clear
// i n p u t d a t a
Pa =1*10^5 // P r e s s u r e o f d r y a i r i n Pa
To1 =288 // T o t a l s t a g n a t i o n t e m p e r a t u r e a t i n l e t i n K
M1 =1 // Mach number a t i n l e t o f p i p e
M2 =0.8 // Mach number a t e x i t o p i p e
Cp =1.005 // S p e c i f i c h e a t o f d r y a i r i n kJ / kgK
// c a l c u l a t i o n
t1 =0.834 // T e m p e r a t u r e r a t i o a t e n t r y , i . e . e n t r y
s t a t i c t e m p e r a t u r e t o t o t a l t e m p e r a t u r e from g a s
t a b l e s a t i s e n t r o p i c , M1=1 & a d i a b a t i c c o n s t a n t
=1.4
13 T1 = t1 * To1 // S t a t i c t e m p e r a t u r e a t e n t r y i n K e l v i n
14 t2 =0.964 // T e m p e r a t u r e r a t i o a t c r i t i c a l s t a t e , i . e .
e x i t stagnation temperature to c r i t i c a l s t a t e
104
15
16
17
18
19
20
21
22
clc
clear
// i n p u t d a t a
M1 =3 // Mach number a t e n t r y
P1 =1 // S t a t i c P r e s s u r e a t e n t r y i n atm
T1 =300 // S t a t i c T e m p e r a t u r e a t e n t r y i n K
q =300 // The h e a t t r a n s f e r r e d p e r u n i t mass f l o w i n
kJ / kg
9 R =287 // Gas c o n s t a n t i n J / kgK
10 Cp =1.005 // S p e c i f i c h e a t o f d r y a i r i n kJ / kgK
11
12 // c a l c u l a t i o n
13 t1 =2.8 // T e m p e r a t u r e r a t i o
a t e n t r y from g a s t a b l e s
(M=3 , k = 1 . 4 , i s e n t r o p i c )
105
14 To1 = t1 * T1 // T o t a l s t a g n a t i o n t e m p e r a t u r e a t
i n l e t in
K
15 p1 =0.0272 // P r e s s u r e
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
ratio
a t e n t r y from g a s t a b l e s
(M=3 , k = 1 . 4 , i s e n t r o p i c )
Po1 = P1 / p1 // S t a g n a t i o n P r e s s u r e a t e n t r y i n atm
p2 =0.176 // S t a t i c P r e s s u r e r a t i o
at c r i t i c a l s t a t e
from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M=3)
Pt = P1 / p2 // S t a t i c c r i t i c a l p r e s s u r e i n atm
p3 =3.424 // S t a g n a t i o n P r e s s u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M=3)
Pot = Po1 / p3 // S t a g n a t i o n c r i t i c a l p r e s s u r e i n atm
t2 =0.281 // S t a t i c t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M=3)
Tt = T1 / t2 // S t a t i c c r i t i c a l t e m p e r a t u r e i n K
t3 =0.654 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M=3)
Tot = To1 / t3 // S t a g n a t i o n c r i t i c a l t e m p e r a t u r e i n K
To2 =( q / Cp ) + To1 // S t a g n a t i o n e x i t t e m p e r a t i o n i n K
t4 =( To2 / Tot ) // S t a g n a t i o n T e m p e r a t u r e r a t i o a t e x i t
M2 =1.6 // Mack number a t e x i t from g a s t a b l e s (
Rayleigh , t4 )
p4 =0.524 // S t a t i c P r e s s u r e r a t i o
a t e x i t from g a s
t a b l e s ( R a y l e i g h , t 4 = 0 . 8 6 6 ,M= 1 . 6 )
P2 = p4 * Pt // S t a t i c P r e s s u r e a t e x i t i n atm
p5 =1.176 // S t a g n a t i o n P r e s s u r e r a t i o a t e x i t from
g a s t a b l e s ( R a y l e i g h , t 4 = 0 . 8 6 6 ,M= 1 . 6 )
Po2 = p5 * Pot // S t a g n a t i o n P r e s s u r e a t e x i t i n atm
t5 =0.702 // S t a t i c t e m p e r a t u r e r a t i o a t e x i t from g a s
t a b l e s ( R a y l e i g h , t 4 = 0 . 8 6 6 ,M= 1 . 6 )
T2 = t5 * Tt // S t a t i c e x i t t e m p e r a t u r e i n K
d2 = P2 *101325/( R * T2 ) // d e n s i t y o f a i r a t e x i t i n kg /m
3 , P2 i n N/m2
// o u t p u r
printf ( (A) The Mach numer a t e x i t i s %3 . 1 f \n (B)
S t a t i c P r e s s u r e a t e x i t i s %3 . 3 f atm\n (C) S t a t i c
e x i t t e m p e r a t u r e i s %3 . 2 f K\n (D) d e n s i t y o f a i r
a t e x i t i s %3 . 4 f kg /m3\ n (E) S t a g n a t i o n e x i t
106
t e m p e r a t i o n i s %3 . 2 f K\n ( F ) S t a g n a t i o n P r e s s u r e
a t e x i t i s %3 . 2 f atm ,M2 , P2 , T2 , d2 , To2 , Po2 )
Scilab code Exa 4.3 To find mass flow rate per unit area Final temperature and heat added per kg of air flow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
clc
clear
// i n p u t d a t a
M1 =2 // Mach number a t e n t r y
P1 =1.4 // S t a t i c P r e s s u r e a t e n t r y i n b a r
T1 =323 // S t a t i c T e m p e r a t u r e a t e n t r y i n K
Cp =1.005 // S p e c i f i c h e a t o f d r y a i r i n kJ / kgK
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // Gas c o n s t a n t i n J / kgK
// c a l c u l a t i o n
t1 =0.555 // T e m p e r a t u r e r a t i o a t e n t r y from g a s
t a b l e s (M=2 , k = 1 . 4 , i s e n t r o p i c )
To1 = T1 / t1 // T o t a l s t a g n a t i o n t e m p e r a t u r e a t i n l e t i n
K
p1 =0.364 // P r e s s u r e r a t i o
a t e n t r y from g a s t a b l e s
(M=2 , k = 1 . 4 , i s e n t r o p i c )
Po1 = P1 / p1 // S t a g n a t i o n P r e s s u r e a t e n t r y i n b a r
t2 =0.529 // S t a t i c t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M=2)
Tt = T1 / t2 // S t a t i c c r i t i c a l t e m p e r a t u r e i n K
t3 =0.793 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M=2)
Tot = To1 / t3 // S t a g n a t i o n c r i t i c a l t e m p e r a t u r e i n K
To2 = Tot // S t a g n a t i o n e x i t t e m p e r a t i o n i n K
q = Cp *( To2 - To1 ) // The h e a t t r a n s f e r r e d p e r u n i t mass
f l o w i n kJ / kg
a1 = sqrt ( k * R * T1 ) // Sound v e l o c i t y i n m/ s
107
24 C1 = M1 * a1 // A i r v e l o c i t y i n m/ s
25 d1 =( P1 *10^5) /( R * T1 ) // d e n s i t y o f a i r i n kg /m3
26 ma = d1 * C1 // Mass f l o w r a t e p e r u n i t a r e a i n kg / sm3
27
28 // o u t p u t
29 printf ( (A) Mass f l o w r a t e p e r u n i t a r e a i s %3 . 2 f kg /
Scilab code Exa 4.4 To calculate pressure and Mach number after combustion in combustion chamber
1
2
3
4
5
6
7
8
clc
clear
// i n p u t d a t a
C1 =100 // A i r v e l o c i t y i n t o c o m b u s t i o n chamber i n m/ s
P1 =3 // S t a t i c P r e s s u r e a t e n t r y i n b a r
T1 =318 // S t a t i c T e m p e r a t u r e a t e n t r y i n K
q =630 // The h e a t t r a n s f e r r e d p e r u n i t mass f l o w i n
kJ / kg
9 Cp =1.005 // S p e c i f i c h e a t o f d r y a i r i n kJ / kgK
10 k =1.4 // A d i a b a t i c c o n s t a n t
11 R =287 // Gas c o n s t a n t i n J / kgK
12
13 // c a l c u l a t i o n
14 a1 = sqrt ( k * R * T1 ) // Sound v e l o c i t y i n m/ s
15 M1 = C1 / a1 // Mach number a t e n t r y
16 t1 =0.985 // T e m p e r a t u r e r a t i o a t e n t r y from g a s
t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
17 To1 = T1 / t1 // T o t a l s t a g n a t i o n t e m p e r a t u r e a t i n l e t i n
K
18 p1 =0.947 // P r e s s u r e r a t i o
a t e n t r y from g a s t a b l e s
(M1, k = 1 . 4 , i s e n t r o p i c )
19 Po1 = P1 / p1 // S t a g n a t i o n P r e s s u r e a t e n t r y i n b a r
108
20 To2 =( q / Cp ) + To1 // S t a g n a t i o n e x i t
21 p2 =2.163 // S t a t i c P r e s s u r e r a t i o
22
23
24
25
26
27
28
29
30
31
32
33
temperation in K
at c r i t i c a l s t a t e
from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M= 0 . 2 8 )
Pt = P1 / p2 // S t a t i c c r i t i c a l p r e s s u r e i n b a r
p3 =2.206 // S t a g n a t i o n P r e s s u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M= 0 . 2 8 )
Pot = Po1 / p3 // S t a g n a t i o n c r i t i c a l p r e s s u r e i n b a r
t2 =0.310 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M= 0 . 2 8 )
Tot = To1 / t2 // S t a g n a t i o n c r i t i c a l t e m p e r a t u r e i n K
t3 =( To2 / Tot ) // S t a g n a t i o n T e m p e r a t u r e r a t i o a t e x i t
M2 =0.7 // Mack number a t e x i t from g a s t a b l e s (
Rayleigh , t3 )
p4 =1.423 // S t a t i c P r e s s u r e r a t i o
a t e x i t from g a s
t a b l e s ( R a y l e i g h , t3 , M2)
P2 = p4 * Pt // S t a t i c P r e s s u r e a t e x i t i n b a r
// o u t p u t
printf ( (A) P r e s s u r e a f t e r c o m b u s t i o n i s %3 . 3 f b a r \n
(B) Mach number a f t e r c o m b u s t i o n i s %3 . 1 f ,P2 , M2 )
Scilab code Exa 4.5 To find total temperature static pressure at exit Stagnation pressure and exponent of polytropic equation
1
2
3
4
5
6
7
8
9
10
11
clc
clear
// i n p u t d a t a
M1 =3 // Mach number a t e n t r y
To1 =295 // T o t a l s t a g n a t i o n t e m p e r a t u r e a t i n l e t i n K
P1 =0.5 // S t a t i c P r e s s u r e a t e n t r y i n b a r
M2 =1.5 // Mack number a t e x i t
Cp =1.005 // S p e c i f i c h e a t o f d r y a i r i n kJ / kgK
R =287 // Gas c o n s t a n t i n J / kgK
109
12 // c a l c u l a t i o n
13 p1 =0.0272 // P r e s s u r e
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
ratio
a t e n t r y from g a s t a b l e s
(M=3 , k = 1 . 4 , i s e n t r o p i c )
Po1 = P1 / p1 // S t a g n a t i o n P r e s s u r e a t e n t r y i n b a r
t1 =0.357 // T e m p e r a t u r e r a t i o a t e n t r y from g a s
t a b l e s (M=3 , k = 1 . 4 , i s e n t r o p i c )
T1 = t1 * To1 // S t a t i c t e m p e r a t u r e a t e n t r y i n K e l v i n
p2 =0.176 // S t a t i c P r e s s u r e r a t i o
at c r i t i c a l s t a t e
from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M=3)
Pt = P1 / p2 // S t a t i c c r i t i c a l p r e s s u r e i n b a r
p3 =3.424 // S t a g n a t i o n P r e s s u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M=3)
Pot = Po1 / p3 // S t a g n a t i o n c r i t i c a l p r e s s u r e i n b a r
t2 =0.654 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M=3)
Tot = To1 / t2 // S t a g n a t i o n c r i t i c a l t e m p e r a t u r e i n K
t3 =0.280 // S t a t i c t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M=3)
Tt = T1 / t3 // S t a t i c c r i t i c a l t e m p e r a t u r e i n K
p4 =0.578 // // S t a t i c P r e s s u r e r a t i o
a t e x i t from g a s
t a b l e s ( R a y l e i g h ,M= 1 . 5 )
P2 = p4 * Pt // S t a t i c P r e s s u r e a t e x i t i n b a r
p5 =1.122 // S t a g n a t i o n P r e s s u r e r a t i o a t e x i t from
g a s t a b l e s ( R a y l e i g h ,M= 1 . 5 )
Po2 = p5 * Pot // S t a g n a t i o n P r e s s u r e a t e x i t i n b a r
t4 =0.753 // // S t a t i c t e m p e r a t u r e r a t i o a t e x i t from
g a s t a b l e s ( R a y l e i g h ,M= 1 . 5 )
T2 = t4 * Tt // S t a t i c e x i t t e m p e r a t u r e i n K
t5 =0.909 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t e x i t from
g a s t a b l e s ( R a y l e i g h ,M= 1 . 5 )
To2 = t5 * Tot // T o t a l s t a g n a t i o n t e m p e r a t u r e a t e x i t i n
K
q = Cp *( To1 - To2 ) // The h e a t t r a n s f e r r e d p e r u n i t mass
f l o w i n kJ / kg
SPC = Po1 - Po2 // Change i n s t a g n a t i o n p r e s s u r e i n b a r
n = log ( Po1 / Po2 ) /( log ( Po1 / Po2 ) - log ( To1 / To2 ) ) //
Exponent o f p o l y t r o p i c e q u a t i o n
qmax = Cp *( Tot - To1 ) //Maximum p o s s i b l e h e a t t r a n s f e r
110
i n kJ / kg
37 ds = Cp * log ( T2 / T1 ) -( R * log ( P2 / P1 ) ) // Change i n e n t r o p y
i n kJ / kgK
38
39
40
// o u t p u t
printf ( (A) T o t a l t e m p e r a t u r e a t e x i t i s %3 . 2 f K\n (B
) S t a t i c p r e s s u r e a t e x i t i s %3 . 3 f b a r \n (C)
Change i n s t a g n a t i o n p r e s s u r e i s %3 . 2 f b a r \n (D)
Exponent o f p o l y t r o p i c e q u a t i o n i s %3 . 2 f ,To2 , P2 ,
SPC , n )
clc
clear
// i n p u t d a t a
M2 =0.9 // Mack number a t e x i t
P2 =2.5 // S t a t i c P r e s s u r e a t e x i t i n b a r
T2 =1273 // S t a t i c e x i t t e m p e r a t u r e i n K
t1 =3.74 // r a t i o o f s t a g n a t i o n t e m p e r a t u r e s a t and
exit entry
9 Cp =1.218 // S p e c i f i c h e a t o f d r y a i r i n kJ / kgK
10 k =1.3 // A d i a b a t i c c o n s t a n t
11
12 // c a l c u l a t i o n
13 t2 =0.892 // T e m p e r a u t u r e r a t i o
a t e x i t from g a s
t a b l e s ( i s e n t r o p i c , k = 1 . 3 ,M= 0 . 9 )
14 To2 = T2 / t2 // T o t a l s t a g n a t i o n t e m p e r a t u r e a t e x i t i n
K
15 To1 = To2 / t1 // T o t a l s t a g n a t i o n t e m p e r a t u r e a t i n l e t
in K
16 p1 =1.12 // S t a t i c p r e s s u r e r a t i o a t c r i t i c a l s t a t e
from g a s t a b l e s ( R a y l e i g h , k = 1 . 3 ,M= 1 . 5 )
111
17 Pt = P2 / p1 // S t a t i c
18 t3 =1.017 // S t a t i c
19
20
21
22
23
24
25
26
27
28
29
30
31
32
c r i t i c a l p r e s s u r e in bar
temperature r a t i o at c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 3 ,M= 1 . 5 )
Tt = T2 / t3 // S t a t i c c r i t i c a l t e m p e r a t u r e i n K
t4 =0.991 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 3 ,M= 1 . 5 )
Tot = To2 / t4 // S t a g n a t i o n c r i t i c a l t e m p e r a t u r e i n K
t5 = To1 / Tot // R a t i o o f s t a g n a t i o n t e m p e r a t u r e a t
e n t r y and c r i t i c a l s t a t e
M1 =0.26 // Mach number a t e n t r y from g a s t a b l e s (
R a y l e i g h , t5 , k = 1 . 3 )
p2 =2.114 // S t a t i c P r e s s u r e r a t i o
a t e n t r y from g a s
t a b l e s ( R a y l e i g h , t5 , k = 1 . 3 )
P1 = Pt * p2 // S t a t i c P r e s s u r e a t e n t r y i n b a r
t6 =0.302 // S t a t i c t e m p e r a t u r e r a t i o
a t e n t r y from
g a s t a b l e s ( R a y l e i g h , t5 , k = 1 . 3 )
T1 = Tt * t6 // S t a t i c t e m p e r a t u r e a t e n t r y i n K e l v i n
q = Cp *( To2 - To1 ) // The h e a t t r a n s f e r r e d p e r u n i t mass
f l o w i n kJ / kg
qmax = Cp *( Tot - To1 ) //Maximum p o s s i b l e h e a t t r a n s f e r
i n kJ / kg
// o u t p u t
printf ( (A) Mach number a t e n t r y i s %3 . 2 f \n (B)
P r e s s u r e a t e n t r y i s %3 . 3 f b a r \n (C) T e m p e r a t u r e
o f g a s i s %3i K\n (D) Amount o f h e a t added i s %3 . 2
f kJ / kg \n (E) Maximum h e a t t h a t can be h e a t e d i s
%3 . 3 f kJ / kg ,M1 , P1 , T1 ,q , qmax )
Scilab code Exa 4.7 To determine Mach number pressure temperature and
velocity of gas at exit
1 clc
2 clear
3
112
// i n p u t
P1 =0.343 // S t a t i c P r e s s u r e a t e n t r y i n b a r
T1 =310 // S t a t i c t e m p e r a t u r e a t e n t r y i n K e l v i n
C1 =60 // V e l o c i t y a t e n t r a n c e i n m/ s
q =1172.5 // The h e a t t r a n s f e r r e d p e r u n i t mass f l o w
i n kJ / kg
9 Cp =1.005 // S p e c i f i c h e a t o f d r y a i r i n kJ / kgK
10 k =1.4 // A d i a b a t i c c o n s t a n t
11 R =287 // Gas c o n s t a n t i n J / kgK
4
5
6
7
8
12
13 // c a l c u l a t i o n
14 a1 = sqrt ( k * R * T1 ) // Sound v e l o c i t y i n m/ s
15 M1 = C1 / a1 // Mach number a t e n t r y
16 t1 =0.9943 // T e m p e r a t u r e r a t i o a t e n t r y from g a s
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
t a b l e s (M= 0 . 1 7 , k = 1 . 4 , i s e n t r o p i c )
To1 = T1 / t1 // T o t a l s t a g n a t i o n t e m p e r a t u r e a t i n l e t i n
K
p1 =2.306 // S t a t i c P r e s s u r e r a t i o a t c r i t i c a l s t a t e
from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M= 0 . 1 7 )
Pt = P1 / p1 // S t a t i c c r i t i c a l p r e s s u r e i n b a r
t2 =0.154 // S t a t i c t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M= 0 . 1 7 )
Tt = T1 / t2 // S t a t i c c r i t i c a l t e m p e r a t u r e i n K
t3 =0.129 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M= 0 . 1 7 )
Tot = To1 / t3 // S t a g n a t i o n c r i t i c a l t e m p e r a t u r e i n K
c1 =0.0665 // V e l o c i t y r a t i o a t c r i t i c a l s t a t e from
g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M= 0 . 1 7 )
Ct = C1 / c1 // C r i t i c a l v e l o c i t y i n m/ s
To2 =( q / Cp ) + To1 // S t a g n a t i o n e x i t t e m p e r a t i o n i n K
t4 = To2 / Tot // R a t i o o f s t a g n a t i o n t e m p e r a t u r e a t e x i t
and c r i t i c a l s t a t e
M2 =0.45 // Mach number a t e x i t from g a s t a b l e s (
R a y l e i g h , t4 , k = 1 . 4 )
p2 =1.87 // S t a t i c P r e s s u r e r a t i o
a t e x i t from g a s
t a b l e s ( R a y l e i g h , t4 , k = 1 . 4 )
P2 = p2 * Pt // S t a t i c P r e s s u r e a t e x i t i n b a r
t5 =0.7075 // S t a t i c t e m p e r a t u r e r a t i o
a t e x i t from
113
g a s t a b l e s ( R a y l e i g h , t4 , k = 1 . 4 )
32 T2 = t5 * Tt // S t a t i c e x i t t e m p e r a t u r e i n K
33 c2 =0.378 // V e l o c i t y r a t i o a t c r i t i c a l s t a t e from g a s
t a b l e s ( Rayleigh , k =1.4 , t4 )
34 C2 = Ct * c2 // e x i t v e l o c i t y i n m/ s
35
36
37
// o u t p u t
printf ( At e x i t c o n d i t i o n s : \ n (A) Mach number i s %3
. 2 f \n (B) P r e s s u r e i s %3 . 3 f b a r \n (C) T e m p e r a t u r e
i s %3 . 2 f K\n (D) E x i t v e l o c i t y i s %3 . 2 f m/ s ,M2 , P2
, T2 , C2 )
Scilab code Exa 4.8 To find Mach number pressure and temperature after
cooling
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
clc
clear
// i n p u t d a t a
M1 =2 // Mach number a t e n t r y
To1 =523 // T o t a l s t a g n a t i o n t e m p e r a t u r e a t i n l e t i n K
Po1 =6 // S t a g n a t i o n P r e s s u r e a t e n t r y i n b a r
To2 =423 // S t a g n a t i o n e x i t t e m p e r a t i o n i n K
// c a l c u l a t i o n
t1 =0.555 // T e m p e r a t u r e r a t i o a t e n t r y from g a s
t a b l e s (M=2 , k = 1 . 4 , i s e n t r o p i c )
T1 = t1 * To1 // S t a t i c t e m p e r a t u r e a t e n t r y i n K e l v i n
p1 =0.128 // P r e s s u r e r a t i o
a t e n t r y from g a s t a b l e s
(M=2 , k = 1 . 4 , i s e n t r o p i c )
P1 = Po1 * p1 // S t a t i c P r e s s u r e a t e n t r y i n b a r
p2 =0.364 // S t a t i c p r e s s u r e r a t i o a t c r i t i c a l s t a t e
from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M=2)
p3 =1.503 // // S t a g n a t i o n p r e s s u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M=2) ,
114
17
18
19
20
21
22
23
24
25
26
27
p r i n t i n g mistake in textbook
t2 =0.529 // S t a t i c T e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M=2)
t3 =0.793 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M=2)
t4 =( To2 / To1 ) * t3 // R a t i o o f s t a g n a t i o n t e m p e r a t u r e a t
e x i t and c r i t i c a l s t a t e
M2 =3.15 // Mach number a t e x i t from g a s t a b l e s (
R a y l e i g h , t4 , k = 1 . 4 )
p4 =0.161 // S t a t i c P r e s s u r e r a t i o
a t e x i t from g a s
t a b l e s ( R a y l e i g h , t4 , k = 1 . 4 ) , p r i n t i n g m i s t a k e i n
textbook
t5 =0.258 // S t a t i c t e m p e r a t u r e r a t i o
a t e x i t from
g a s t a b l e s ( R a y l e i g h , t4 , k = 1 . 4 )
P2 =( p4 / p2 ) * P1 // S t a t i c P r e s s u r e a t e x i t i n b a r
T2 =( t5 / t2 ) * T1 // S t a t i c e x i t t e m p e r a t u r e i n K
// o u t p u t
printf ( A f t e r C o o l i n g : \ n (A) Mach number i s %3 . 2 f \n
(B) P r e s s u r e i s %3 . 4 f b a r \n (C) T e m p e r a t u r e i s %3 . 2
f K ,M2 , P2 , T2 )
Scilab code Exa 4.9 To determine heat added per kg of air flow maximum
possible heat transfer and heat transfer required to get maximum static temperature
1 clc
2 clear
3
4 // i n p u t d a t a
5 M2 =0.8 // Mack number a t e x i t
6 t1 =4 // R a t i o o f s t a g n a t i o n t e m p e r a t u r e a t e x i t and
entry
7 T1 =288 // A t m o s p h e r i c t e m p e r a t u r e i n K
8 P1 =1 // A t m o s p h e r i c P r e s s u r e i n atm
115
9 Cp =1.005 // S p e c i f i c h e a t o f d r y a i r i n kJ / kgK
10
11 // c a l c u l a t i o n
12 t2 =0.964 // R a t i o o f s t a g n a t i o n t e m p e r a t u r e a t e x i t
13
14
15
16
17
18
19
20
21
22
23
24
25
26
and c r i t i c a l s t a t e from g a s t a b l e s
t3 = t2 / t1 // R a t i o o f s t a g n a t i o n t e m p e r a t u r e a t e n t r y
and c r i t i c a l s t a t e
M1 =0.24 // // Mach number a t e n t r y from g a s t a b l e s (
R a y l e i g h , t3 , k = 1 . 4 )
t5 =0.988 // T e m p e r a t u r e r a t i o a t e n t r y from g a s
t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
To1 = T1 / t5 // T o t a l s t a g n a t i o n t e m p e r a t u r e a t i n l e t i n
K
To2 = t1 * To1 // S t a g n a t i o n e x i t t e m p e r a t i o n i n K
Tot = To1 / t3 // S t a g n a t i o n c r i t i c a l t e m p e r a t u r e i n K
q = Cp *( To2 - To1 ) // The h e a t t r a n s f e r r e d p e r u n i t mass
f l o w i n kJ / kg
qmax = Cp *( Tot - To1 ) //Maximum p o s s i b l e h e a t t r a n s f e r
i n kJ / kg
t6 =0.9775 // R a t i o o f s t a g n a t i o n t e m p e r a t u r e f o r
maximum s t a t i c t e m p e r a t u r e (M=1/ s q r t ( k ) , R a y l e i g h )
To3 = Tot * t6 //maximum s t a g n a t i o n t e m p e r a t u r e i n K
q_req = Cp *( To3 - To1 ) // Heat t r a n s f e r r e q u i r e d t o g e t
maximum s t a t i c t e m p e r a t u r e i n kJ / kg
// o u t p u t
printf ( (A) Heat added p e r kg o f a i r f l o w i s %3 . 2 f kJ
/ kg \n (B) Maximum p o s s i b l e h e a t t r a n s f e r i s %3 . 2 f
kJ / kg \n (C) Heat t r a n s f e r r e q u i r e d t o g e t maximum
s t a t i c t e m p e r a t u r e i s %3 . 1 f kJ / kg ,q , qmax , q_req )
Scilab code Exa 4.10 To find exit properties Maximum stagnation temperature percentage of pressure loss and initial mach number
1 clc
116
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
clear
// i n p u t d a t a
T1 =560 // S t a t i c T e m p e r a t u r e a t e n t r y i n K
P1 =0.6 // S t a t i c P r e s s u r e a t e n t r y i n b a r
C1 =75 // A i r v e l o c i t y i n t o c o m b u s t i o n chamber i n m/ s
mp =30 // a i r f u e l r a t i o
CV =92000 // C a l o r i f i c v a l u e o f f u e l i n kJ / kg
Cp =1.005 // S p e c i f i c h e a t o f d r y a i r i n kJ / kgK
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // Gas c o n s t a n t i n J / kgK
// c a l c u l a t i o n
a1 = sqrt ( k * R * T1 ) // Sound v e l o c i t y i n m/ s
M1 = C1 / a1 // Mach number a t e n t r y
t1 =0.9949 // T e m p e r a t u r e r a t i o a t e n t r y from g a s
t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
To1 = T1 / t1 // T o t a l s t a g n a t i o n t e m p e r a t u r e a t i n l e t i n
K
p1 =0.982 // P r e s s u r e r a t i o
a t e n t r y from g a s t a b l e s
(M1, k = 1 . 4 , i s e n t r o p i c )
Po1 = P1 / p1 // S t a g n a t i o n P r e s s u r e a t e n t r y i n b a r
q = CV /( mp +1) // The h e a t t r a n s f e r r e d p e r u n i t mass
f l o w i n kJ / kg o f gas , mp+1= t o t a l amount o f f u e l =
mf+ma
p2 =2.317 // S t a t i c P r e s s u r e r a t i o
at c r i t i c a l s t a t e
from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M1)
Pt = P1 / p2 // S t a t i c c r i t i c a l p r e s s u r e i n b a r
p3 =1.246 // S t a g n a t i o n P r e s s u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M1)
Pot = Po1 / p3 // S t a g n a t i o n c r i t i c a l p r e s s u r e i n b a r
t2 =0.137 // S t a t i c t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M1)
Tt = T1 / t2 // S t a t i c c r i t i c a l t e m p e r a t u r e i n K
t3 =0.115 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M1)
Tot = To1 / t3 // S t a g n a t i o n c r i t i c a l t e m p e r a t u r e i n K
To2 =( q / Cp ) + To1 // S t a g n a t i o n e x i t t e m p e r a t i o n i n K
117
31 t4 = To2 / Tot // R a t i o o f
and c r i t i c a l
stagnation temperature at e x i t
state
R a y l e i g h , t4 , k = 1 . 4 )
Pressure ratio
a t e x i t from g a s
t a b l e s ( R a y l e i g h , t4 , k = 1 . 4 )
P2 = p4 * Pt // S t a t i c P r e s s u r e a t e x i t i n bar ,
miscalculation in textbook
p5 =1.186 // S t a g n a t i o n P r e s s u r e r a t i o a t e x i t from
g a s t a b l e s ( R a y l e i g h , t4 , k = 1 . 4 )
Po2 = Pot * p5 // S t a g n a t i o n P r e s s u r e a t e x i t i n b a r
t5 =0.472 // S t a t i c t e m p e r a t u r e r a t i o
a t e x i t from
g a s t a b l e s ( R a y l e i g h , t4 , k = 1 . 4 )
T2 = t5 * Tt // S t a t i c e x i t t e m p e r a t u r e i n K
C2 = M2 * sqrt ( k * R * T2 ) // e x i t v e l o c i t y i n m/ s
SPL =(( Po1 - Po2 ) / Po1 ) *100 // P e r c e n t a g e o f p r e s s u r e
l o s s i n c o m b u s t i o n chamber i n %
33 p4 =2.0825 // S t a t i c
34
35
36
37
38
39
40
41
42
43
// o u t p u t
printf ( (A) At e x i t : \ n
P r e s s u r e i s %3 . 5 f b a r \n
T e m p e r a t u r e i s %3i K \n
V e l o c i t y i s %3 . 2 f m
/ s \n
Mach number i s %3 . 2 f \n (B) Maximum
s t a g n a t i o n t e m p e r a t u r e a v a i l a b l e i s %3 . 2 f K\n (C)
P e r c e n t a g e o f p r e s s u r e l o s s i n c o m b u s t i o n chamber
i s %3 . 1 f p e r c e n t \n (D) I n t i a l Mach number i s %3 . 2
f \n ,P2 , T2 , C2 , M2 , Tot , SPL , M1 )
Scilab code Exa 4.11 To find Mach number and percentage drop in pressure
1 clc
2 clear
3
4 // i n p u t d a t a
5 To1 =473 // T o t a l s t a g n a t i o n t e m p e r a t u r e a t
118
i n l e t in K
6 To2 =673 // S t a g n a t i o n e x i t t e m p e r a t i o n i n K
7 M1 =0.5 // Mach number a t e n t r y
8
9 // c a l c u l a t i o n
10 t1 =0.6914 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t
11
12
13
14
15
16
17
18
19
critical
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M1)
p1 =1.7778 // S t a t i c p r e s s u r e r a t i o a t c r i t i c a l s t a t e
from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M1)
t2 =( To2 / To1 ) * t1 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t
exit
M2 =0.867 // Mach number a t e x i t from g a s t a b l e s (
R a y l e i g h , t2 , k = 1 . 4 )
p2 =1.16 // S t a t i c p r e s s u r e r a t i o a t e x i t from g a s
t a b l e s ( R a y l e i g h , k = 1 . 4 ,M2)
p = p2 / p1 // r a t i o o f s t a t i c p r e s s u r e s a t o u l e t and
inlet
PL =(1 - p ) *100 // p r e s s u r e l o s s i n %
// o u t p u t
printf ( (A) Mach number i s %3 . 3 f \n (B) P e r c e n t a g e d r o p
i n p r e s s u r e i s %3 . 1 f p e r c e n t ,M2 , PL )
Scilab code Exa 4.12 To find inlet mach number and percentage loss in
static pressure
1
2
3
4
5
6
7
8
9
clc
clear
// i n p u t d a t a
t1 =3 // S t a g n a t i o n t e m p e r a t u r e r a t i o
M2 =0.8 // Mach number a t e x i t
// c a l c u l a t i o n
t2 =0.964 // R a t i o o f s t a g n a t i o n t e m p e r a t u r e a t e x i t
and c r i t i c a l s t a t e ( R a y l e i g h , M2, k = 1 . 4 )
119
10 p1 =1.266 // S t a t i c
11
12
13
14
15
16
17
18
Pressure ratio
a t e x i t from g a s
t a b l e s ( R a y l e i g h , M2, k = 1 . 4 )
t3 = t2 / t1 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t c r i t i c a l
state
M1 =0.29 // Mach number a t e n t r y from g a s t a b l e s (
R a y l e i g h , t3 , k = 1 . 4 )
p2 =2.147 // S t a t i c p r e s s u r e r a t i o a t c r i t i c a l s t a t e
from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M1)
p = p1 / p2 // r a t i o o f s t a t i c p r e s s u r e s a t e x i t and
entry
PL =(1 - p ) *100 // P e r c e n t a g e l o s s i n s t a t i c p r e s s u r e i n
%
// o u t p u t
printf ( (A) Mach number a t e n t r y i s %3 . 2 f \n (B)
P e r c e n t a g e l o s s i n s t a t i c p r e s s u r e i s %3i p e r c e n t
,M1 , PL )
Scilab code Exa 4.13 To find inlet and exit mach number
1
2
3
4
5
6
7
8
9
10
11
12
13
clc
clear
// i n p u t d a t a
To1 =300 // T o t a l s t a g n a t i o n t e m p e r a t u r e a t i n l e t i n K
To2 =310 // S t a g n a t i o n e x i t t e m p e r a t i o n i n K
G =1300 // Mass v e l o c i t y i n kg /m2 s
P1 =105*10^3 // S t a t i c P r e s s u r e a t e n t r y i n Pa
Cp =1.005 // S p e c i f i c h e a t o f d r y a i r i n kJ / kgK
R =287 // Gas c o n s t a n t i n J / kgK
// c a l c u l a t i o n
T1 =((( -2* P1 ^2* Cp ) + sqrt ((( -2* P1 ^2* Cp ) ^2) +(8* G ^2* R ^2*
P1 ^2* Cp * To1 ) ) ) /(2* G ^2* R ^2) ) // S t a t i c t e m p e r a t u r e
in K
120
14 t1 = T1 / To1 // T e m p e r a t u r e r a t i o a t e n t r y
15 M1 =1.4 // Mach number a t e n t r y from g a s t a b l e s (
16
17
18
19
20
21
22
i s e n t r o p i c , t1 , k = 1 . 4 )
t2 =0.934 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M1)
Tot = To1 / t2 // S t a g n a t i o n c r i t i c a l t e m p e r a t u r e i n K
t3 = To2 / Tot // S t a g n a t i o n t e m p e r a t u r e r a t i o a t e x i t
from g a s t a b l e s ( R a y l e i g h , k = 1 . 4 ,M1)
M2 =1.26 // Mach number a t e x i t from g a s t a b l e s (
R a y l e i g h , t3 , k = 1 . 4 )
// o u t p u t
printf ( (A) The i n l e t mach number i s %3 . 2 f \n (B) The
e x i t mach number i s %3 . 2 f ,M1 , M2 )
Scilab code Exa 4.14 To find properties at exit and sonic condition and
heat required to accelerate gas from inlet to sonic condition
1
2
3
4
5
6
7
8
9
10
clc
clear
// i n p u t d a t a
k =1.3 // A d i a b a t i c c o n s t a n t
R =466 // Gas c o n s t a n t i n J / kgK
P1 =0.345 // S t a t i c P r e s s u r e a t e n t r y i n Pa
T1 =312 // S t a t i c T e m p e r a t u r e a t e n t r y i n K
C1 =65.5 // Entry v e l o c i t y i n m/ s
q =4592 // The h e a t t r a n s f e r r e d p e r u n i t mass f l o w i n
kJ / kg
11
12 // c a l c u l a t i o n
13 a1 = sqrt ( k * R * T1 ) // Sound v e l o c i t y i n m/ s
14 M1 = C1 / a1 // Mach number a t e n t r y
15 t1 =0.9965 // T e m p e r a t u r e r a t i o a t e n t r y from g a s
t a b l e s (M1, k = 1 . 3 , i s e n t r o p i c )
121
16 To1 = T1 / t1 // T o t a l s t a g n a t i o n t e m p e r a t u r e a t
i n l e t in
K
17 p1 =2.235 // S t a t i c
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Pressure ratio
at c r i t i c a l s t a t e
from g a s t a b l e s ( R a y l e i g h , k = 1 . 3 ,M1)
Pt = P1 / p1 // S t a t i c c r i t i c a l p r e s s u r e i n b a r
c1 =0.051 // V e l o c i t y r a t i o a t c r i t i c a l s t a t e from g a s
t a b l e s ( R a y l e i g h , k = 1 . 3 ,M1)
Ct = C1 / c1 // C r i t i c a l v e l o c i t y i n m/ s
t2 =0.112 // S t a t i c t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 3 ,M1)
Tt = T1 / t2 // S t a t i c c r i t i c a l t e m p e r a t u r e i n K
t3 =0.098 // S t a g n a t i o n t e m p e r a t u r e r a t i o a t c r i t i c a l
s t a t e from g a s t a b l e s ( R a y l e i g h , k = 1 . 3 ,M1)
Tot = To1 / t3 // S t a g n a t i o n c r i t i c a l t e m p e r a t u r e i n K
Cp =( k * R ) /( k -1) // S p e c i f i c h e a t o f d r y a i r i n kJ / kgK
To2 =( q / Cp ) + To1 // S t a g n a t i o n e x i t t e m p e r a t i o n i n K
t4 =( To2 / Tot ) // S t a g n a t i o n T e m p e r a t u r e r a t i o a t e x i t
M2 =0.60 // Mack number a t e x i t from g a s t a b l e s (
Rayleigh , t4 )
p2 =1.567 // S t a t i c P r e s s u r e r a t i o
a t e x i t from g a s
t a b l e s ( R a y l e i g h , t4 , k = 1 . 4 )
P2 = p2 * Pt // S t a t i c P r e s s u r e a t e x i t i n b a r
t5 =0.884 // S t a t i c t e m p e r a t u r e r a t i o
a t e x i t from
g a s t a b l e s ( R a y l e i g h , t4 , k = 1 . 4 )
T2 = t5 * Tt // S t a t i c e x i t t e m p e r a t u r e i n K
c2 =0.564 // V e l o c i t y r a t i o a t c r i t i c a l s t a t e from g a s
t a b l e s ( Rayleigh , k =1.4 , t4 )
C2 = Ct * c2 // e x i t v e l o c i t y i n m/ s
qmax = Cp *( Tot - To1 ) /10^3 //Maximum p o s s i b l e h e a t
t r a n s f e r i n kJ / kg
// o u t p u t
printf ( (A) Heat r e q u i r e d t o a c c e l e r a t e t h e g a s from
t h e i n l e t c o n d i t i o n t o s o n i c c o n d i t i o n i s %3 . 2 f
kJ / kg \n (B) The p r e s s u r e and t e m p e r a t u r e a t s o n i c
c o n d i t i o n a r e %3 . 3 f b a r and %3 . 2 f K r e s p e c t i v e l y \
n (C) The p r o p e r t i e s a t e x i t a r e : \ n
Pressure i s
%3 . 3 f b a r \n
T e m p e r a t u r e i s %3 . 2 f K\n
122
V e l o c i t y i s %3i m/ s , qmax , Pt , Tt , P2 , T2 , C2 )
123
Chapter 5
Normal and Oblique Shock
Scilab code Exa 5.1 To find Mach number before shock properties after
shock density increase loss of stagnation pressure and entropy change of air
in pipe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
clc
clear
// I n p u t d a t a
Px =150 // P r e s s u r e b e f o r e t h e s h o c k i n kPa
Tx =25+273 // T e m p e r a t u r e b e f o r e t h e s h o c k i n K
Py =350 // P r e s s u r e j u s t a f t e r t h e s h o c k i n kPa
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n s
p1 = Py / Px // P r e s s u r e r a t i o
Mx =1.4638 // Mach number b e f o r e t h e s h o c k
My =0.716 // Mach number a f t e r t h e s h o c k from g a s
t a b l e s @Mx
15 t1 =1.294 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @p1
16 Ty = t1 * Tx // T e m p e r a t u r e r a t i o a f t e r t h e s h o c k i n K
17 ax = sqrt ( k * R * Tx ) // V e l o c i t y o f sound b e f o r e t h e s h o c k
124
18
19
20
21
22
23
24
25
26
27
28
29
30
i n m/ s
Cx = ax * Mx // V e l o c i t y o f g a s b e f o r e t h e s h o c k i n m/ s
ay = sqrt ( k * R * Ty ) // V e l o c i t y o f sound a f t e r t h e s h o c k
i n m/ s
Cy = ay * My // V e l o c i t y o f g a s a f t e r t h e s h o c k i n m/ s
p2 =0.942 // S t a g n a t i o n p r e s s u r e r a t i o a f t e r and
b e f o r e t h e s h o c k from g a s t a b l e s @p1
ds = R * log (1/ p2 ) // Change i n e n t r o p y i n J / kgK
p3 =3.265 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k t o S t a t i c
p r e s s u r e b e f o r e s h o c k from g a s t a b l e s @p1
Poy = p3 * Px // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n kPa
Pox = Poy / p2 // S t a g n a t i o n p r e s s u r e b e f o r e s h o c k i n kPa
pr_loss = Pox - Poy // L o s s o f s t a g n a t i o n p r e s s u r e o f a i r
i n kPa
dd =(1000/ R ) *(( Py / Ty ) -( Px / Tx ) ) // I n c r e a s e i n d e n s i t y
o f a i r i n kg /m3
// Output
printf ( (A) Mach number b e f o r e s h o c k i s %3 . 4 f \n (B)
After shock :\ n
Mach number i s %3 . 3 f \n
S t a t i c t e m p e r a t u r e i s %3 . 3 f K\n
V e l o c i t y i s %3
. 2 f m/ s \n (C) I n c r e a s e i n d e n s i t y o f a i r i s %3 . 2 f
kg /m3\ n (D) L o s s o f s t a g n a t i o n p r e s s u r e o f a i r i s
%3 . 2 f kPa \n (E) Change i n e n t r o p y i s %3 . 3 f J / kgK
,Mx , My , Ty , Cy , dd , pr_loss , ds )
Scilab code Exa 5.2 To find properties across normal shock and entropy
change
1 clc
2 clear
3
4 // I n p u t d a t a
5 Tx =350 // T e m p e r a t u r e b e f o r e t h e s h o c k i n K
6 Px =137.8 // P r e s s u r e b e f o r e t h e s h o c k i n kPa
125
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
Cx =750 // V e l o c i t y b e f o r e t h e s h o c k i n m/ s
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
ax = sqrt ( k * R * Tx ) // V e l o c i t y o f sound b e f o r e t h e s h o c k
i n m/ s
Mx = Cx / ax // Mach number b e f o r e t h e s h o c k
My =0.577 // Mach number a f t e r t h e s h o c k from g a s
t a b l e s @Mx
p1 =4.5 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @My
Py = Px * p1 // S t a t i c p r e s s u r e a f t e r s h o c k i n kPa
t1 =1.687 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @My
Ty = Tx * t1 // T e m p e r a t u r e r a t i o a f t e r t h e s h o c k i n K
p2 =5.641 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k t o S t a t i c
p r e s s u r e b e f o r e s h o c k from g a s t a b l e s @My
Poy = Px * p2 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n kPa
p3 =0.721 // S t a g n a t i o n p r e s s u r e r a t i o a f t e r and
b e f o r e t h e s h o c k from g a s t a b l e s @My
Pox = Poy / p3 // S t a g n a t i o n p r e s s u r e b e f o r e s h o c k i n kPa
ds = R * log (1/ p3 ) // Change i n e n t r o p y i n J / kgK
t2 =0.555 // S t a t i c t o S t a g n a t i o n t e m p e r a t u r e r a t i o
b e f o r e s h o c k from i s e n t r o p i c g a s t a b l e s @Mx, k =1.4
Tox = Tx / t2 // S t a g n a t i o n t e m p e r a t u r e b e f o r e s h o c k i n
K
p4 =0.128 // S t a t i c t o S t a g n a t i o n p r e s s u r e r a t i o from
i s e n t r o p i c g a s t a b l e s @Mx, k =1.4
Pox = Px / p4 // S t a g n a t i o n p r e s s u r e i n kPa
t4 =0.937 // S t a t i c t o S t a g n a t i o n t e m p e r a t u r e r a t i o
b e f o r e s h o c k from n o r m a l s h o c k g a s t a b l e s @Mx, k
=1.4 ( Tox=Toy Checked )
Toy = Ty / t4 // S t a g n a t i o n t e m p e r a t u r e a f t e r s h o c k i n K
ay = sqrt ( k * R * Ty ) // V e l o c i t y o f sound a f t e r t h e s h o c k
i n m/ s
Cy =( My * ay ) // V e l o c i t y o f g a s a f t e r t h e s h o c k i n m/ s
126
33
34
// Output
printf ( (A) At i n l e t t o s h o c k : \ n
Stagnation
p r e s s u r e i s %3 . 1 f kPa \n
Stagnation temperature
i s %3 . 2 f K\n
Mach number i s %3 . 0 f \n (B) A f t e r
shock :\ n
S t a g n a t i o n p r e s s u r e i s %3 . 2 f kPa \n
S t a g n a t i o n t e m p e r a t u r e i s %3 . 2 f K\n
Static
p r e s s u r e i s %3 . 1 f kPa \n
S t a t i c temperature i s
%3 . 2 f K\n
Mach number i s %3 . 3 f \n
Velocity
i s %3 . 2 f m/ s \n (C) Change i n e n t r o p y a c r o s s t h e
s h o c k i s %3 . 2 f J / kgK ,Pox , Tox , Mx , Poy , Toy , Py , Ty ,
My , Cy , ds )
clc
clear
// I n p u t d a t a
Tx =0+273 // T e m p e r a t u r e b e f o r e t h e s h o c k i n K
Px =60 // P r e s s u r e b e f o r e t h e s h o c k i n kPa
Cx =497 // A i r V e l o c i t y b e f o r e t h e s h o c k i n m/ s
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
ax = sqrt ( k * R * Tx ) // V e l o c i t y o f sound b e f o r e t h e s h o c k
i n m/ s
Mx = Cx / ax // Mach number b e f o r e t h e s h o c k
My =0.70109 // Mach number a f t e r t h e s h o c k from g a s
t a b l e s @Mx
p1 =2.45833 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @My
Py = p1 * Px // S t a t i c p r e s s u r e a f t e r s h o c k i n kPa
t1 =1.32022 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @My
127
18 Ty = Tx * t1 // T e m p e r a t u r e r a t i o a f t e r t h e s h o c k i n K
19 p2 =3.41327 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k t o
20
21
22
23
24
25
26
27
S t a t i c p r e s s u r e b e f o r e s h o c k from g a s t a b l e s @My
Poy = p2 * Px // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n kPa
p3 =0.92979 // S t a g n a t i o n p r e s s u r e r a t i o a f t e r and
b e f o r e t h e s h o c k from g a s t a b l e s @My
Pox = Poy / p3 // S t a g n a t i o n p r e s s u r e b e f o r e s h o c k i n kPa
ay = sqrt ( k * R * Ty ) // V e l o c i t y o f sound a f t e r t h e s h o c k
i n m/ s
Cy = ay * My // V e l o c i t y o f a i r a f t e r t h e s h o c k i n m/ s
// Output
printf ( A f t e r s h o c k : \ n
(A) Mach number i s %3 . 5 f \n
(B) V e l o c i t y i s %3 . 3 f m/ s \n
(C) S t a g n a t i o n
p r e s s u r e i s %3 . 3 f kPa \n ,My , Cy , Poy )
Scilab code Exa 5.4 To find velocities across shock and stagnation pressure change
1
2
3
4
5
6
7
8
9
10
11
12
clc
clear
// I n p u t d a t a
Px =30 // P r e s s u r e b e f o r e t h e s h o c k i n kPa
Tx = -30+273 // T e m p e r a t u r e b e f o r e t h e s h o c k i n K
pr =2.6 // P r e s s u r e r a t i o a c r o s s t h e s h o c k wave
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
Mx =1.54 // Mach number b e f o r e t h e s h o c k from g a s
t a b l e s @pr
13 My =0.687 // Mach number a f t e r t h e s h o c k from g a s
t a b l e s @Mx
14 t1 =1.347 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
128
15
16
17
18
19
20
21
22
23
24
25
26
27
s h o c k from g a s t a b l e s @My
Ty = t1 * Tx // T e m p e r a t u r e r a t i o a f t e r t h e s h o c k i n K
p1 =3.567 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k t o S t a t i c
p r e s s u r e b e f o r e s h o c k from g a s t a b l e s @My
Poy = p1 * Px // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n kPa
p2 =0.917 // S t a g n a t i o n p r e s s u r e r a t i o a f t e r and
b e f o r e t h e s h o c k from g a s t a b l e s @My
Pox = Poy / p2 // S t a g n a t i o n p r e s s u r e b e f o r e s h o c k i n kPa
dP = Pox - Poy // Change i n s t a g n a t i o n p r e s s u r e i n kPa
ax = sqrt ( k * R * Tx ) // V e l o c i t y o f sound b e f o r e t h e s h o c k
i n m/ s
Cx =( Mx * ax ) // A i r V e l o c i t y b e f o r e t h e s h o c k i n m/ s
ay = sqrt ( k * R * Ty ) // V e l o c i t y o f sound a f t e r t h e s h o c k
i n m/ s
Cy =( My * ay ) // V e l o c i t y o f a i r a f t e r t h e s h o c k i n m/ s
// Output
printf ( (A) V e l o c i t i e s u p s t r e a m and downstream o f
s h o c k wave a r e %3 . 2 f m/ s and %3 . 2 f m/ s
r e s p e c t i v e l y \n (B) Change i n s t a g n a t i o n p r e s s u r e
i s %3 . 3 f kPa ,Cx , Cy , dP )
clc
clear
// I n p u t d a t a
Mol =39.9 // Molar mass o f a g a s i n kg / mol
k =1.67 // S p e c i f i c h e a t r a t i o
Mx =2.5 // Mach number b e f o r e t h e s h o c k
Px =40 // P r e s s u r e b e f o r e t h e s h o c k i n kPa
Tx = -20+273 // T e m p e r a t u r e b e f o r e t h e s h o c k i n K
// C a l c u l a t i o n
129
t h e s h o c k from g a s
t a b l e s @Mx
13 p1 =7.567 // S t a t i c
and b e f o r e
i n kPa
b e f o r e the
shock in K
// Output
printf ( Downstream t h e n o r m a l s h o c k : \ n
Mach
number i s %3 . 3 f \n
P r e s s u r e i s %3 . 2 f kPa \n
T e m p e r a t u r e i s %3 . 3 f K ,My , Py , Ty )
Scilab code Exa 5.6 To find pressure acting on front of the body
1
2
3
4
5
6
7
8
9
clc
clear
// I n p u t d a t a
Mx =2 // Mach number b e f o r e t h e s h o c k
Px =50 // P r e s s u r e b e f o r e t h e s h o c k i n kPa
// C a l c u l a t i o n
p1 =6.335 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k t o S t a t i c
p r e s s u r e b e f o r e s h o c k from g a s t a b l e s @Mx
10 Poy = p1 * Px // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n kPa
11
12
13
// Output
printf ( P r e s s u r e a c t i n g on t h e f r o n t o f t h e body i s
%3 . 2 f kPa , Poy )
130
Scilab code Exa 5.7 To find mass flow rate and properties at exit of CD
nozzle
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
clc
clear
// I n p u t d a t a
Po =800 // P r e s s u r e i n r e s e r v o i r i n kPa
To =40+273 // T e m p e r a t u r e i n r e s e r v o i r i n K
M2a =2.5 // Mach number a t e x i t from d i a g r a m
At =25 // T h r o a t Area i n cm2
Ax =40 // Area j u s t b e f o r e t h e s h o c k i n cm2
Ay =40 // Area j u s t a f t e r t h e s h o c k i n cm2
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
t1 =0.834 // R a t i o o f c r i t i c a l t e m p e r a t u r e and
s t a g n a t i o n t e m p e r a t u r e from g a s t a b l e s @M=1
Tt = To * t1 // C r i t i c a l t e m p e r a t u r e i n K
p1 =0.528 // R a t i o o f c r i t i c a l p r e s s u r e and s t a g n a t i o n
p r e s s u r e from g a s t a b l e s @M=1
Pt = Po * p1 // C r i t i c a l p r e s s u r e i n kPa
dt = Pt *10^3/( R * Tt ) // D e n s i t y i n kg /m 3 , Pt i n Pa
at = sqrt ( k * R * Tt ) // V e l o c i t y o f sound a t t h r o a t i n m/ s
Ct = at // A i r V e l o c i t y o f sound a t t h r o a t i n m/ s
m = dt * At *10^ -4* Ct // Mass f l o w r a t e i n kg / s
p2 =0.0585 // R a t i o o f e x i t t o s t a g n a t i o n p r e s s u r e
from i s e n t r o p i c g a s t a b l e s @M2=2.5
a1 =2.637 // R a t i o o f e x i t t o c r i t i c a l a r e a from
i s e n t r o p i c g a s t a b l e s @M2=2.5
A2 = a1 * At // E x i t a r e a i n cm2
a2 = Ax / At // Area r a t i o
M =1.94 // Mach number u p s t r e a m o f s h o c k from g a s
t a b l e s @a2
p3 =0.140 // R a t i o o f upstram o f s h o c k t o s t a g n a t i o n
p r e s s u r e s from i s e n t r o p i c g a s t a b l e s @M
Px = p3 * Po // P r e s s u r e upstram o f s h o c k i n kPa
131
30 t2 =0.570 // R a t i o o f upstram o f s h o c k t o s t a g n a t i o n
t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s @M
31 Tx = t2 * To // T e m p e r a t u r e upstram o f s h o c k i n K
32 My =0.588 // Mach number downstream o f s h o c k from
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
n o r m a l s h o c k g a s t a b l e s @M
p4 =4.225 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @My
Py = Px * p4 // S t a t i c p r e s s u r e a f t e r s h o c k i n kPa
t3 =1.639 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @My
Ty = Tx * t3 // T e m p e r a t u r e r a t i o a f t e r t h e s h o c k i n K
p5 =2.338 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k t o S t a t i c
p r e s s u r e b e f o r e s h o c k from g a s t a b l e s @My
Poy = p5 * Px // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n kPa
p6 =0.749 // S t a g n a t i o n p r e s s u r e r a t i o a f t e r and
b e f o r e t h e s h o c k from g a s t a b l e s @My
Pox = Poy / p6 // S t a g n a t i o n p r e s s u r e b e f o r e s h o c k i n kPa
// Here At2=Aty , Po2=Poy , Toy=To2=To1=To
p7 =0.79 // S t a t i c t o s t a g n a t i o n p r e s s u r e r a t i o a f t e r
s h o c k from i s e n t r o p i c g a s t a b l e s @My
Po2 = Py / p7 // S t a g n a t i o n p r e s s u r e a t e x i t i n kPa
t4 =0.935 // S t a t i c t o s t a g n a t i o n t e m p e r a t u r e r a t i o
a f t e r s h o c k from i s e n t r o p i c g a s t a b l e s @My
To2 = Ty / t4 // S t a g n a t i o n t e m p e r a t u r e i n K ( c h e c k e d )
a3 =1.2 // R a t i o o f a r e a s a f t e r s h o c k i . e . ( Ay/ At2 )
At2 = Ay / a3 // C r i t i c a l a r e a a f t e r s h o c k i n cm2
a4 = A2 / At2 // R a t i o o f a r e a s
M2b =0.31 // Mach number a t e x i t from g a s t a b l e s @a4 (
a s p e r s e c t i o n b )
p8 =0.936 // S t a t i c t o s t a g n a t i o n p r e s s u r e r a t i o a t
e x i t from i s e n t r o p i c g a s t a b l e s @M2b
P2 = Po2 * p8 // E x i t p r e s s u r e i n kPa
t5 =0.981 // S t a t i c t o s t a g n a t i o n t e m p e r a t u r e r a t i o
a f t e r s h o c k from i s e n t r o p i c g a s t a b l e s @M2b
T2 = To2 * t5 // E x i t t e m p e r a t u r e i n K
// Output
printf ( CASEI : \ n
(A) Mass f l o w r a t e i s %3 . 2 f kg / s
132
\n
(B) E x i t a r e a i s %3 . 1 f cm2\ n CASEI I : \ n
(A) T e m p e r a t u r e i s %3 . 3 f K\n
(B) P r e s s u r e i s %3
. 1 f kPa ,m , A2 , T2 , P2 )
clc
clear
// I n p u t d a t a
Px =1 // P r e s s u r e b e f o r e t h e s h o c k i n b a r
Tx =17+273 // T e m p e r a t u r e b e f o r e t h e s h o c k i n K
Cx =500 // A i r V e l o c i t y b e f o r e t h e s h o c k i n m/ s
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
ax = sqrt ( k * R * Tx ) // V e l o c i t y o f sound b e f o r e t h e s h o c k
i n m/ s
Mx = Cx / ax // Mach number b e f o r e t h e s h o c k
My =0.715 // Mach number a f t e r t h e s h o c k from g a s
t a b l e s @Mx
p1 =2.335 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @My
Py = p1 * Px // S t a t i c p r e s s u r e a f t e r s h o c k i n b a r
t1 =1.297 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @My
Ty = Tx * t1 // T e m p e r a t u r e r a t i o a f t e r t h e s h o c k i n K
ay = sqrt ( k * R * Ty ) // V e l o c i t y o f sound a f t e r t h e s h o c k
i n m/ s
Cy = ay * My // V e l o c i t y o f a i r a f t e r t h e s h o c k i n m/ s
C_y = Cx - Cy // V e l o c i t y o f a i r i n m/ s
M_y = C_y / ay // Mach number i m p a r e d u p s t r e a m o f t h e
wave f r o n t
t2 =0.939 // S t a t i c t o s t a g n a t i o n t e m p e r a t u r e r a t i o
133
a f t e r s h o c k from i s e n t r o p i c g a s t a b l e s @M y
24 T_oy = Ty / t2 // S t a g n a t i o n t e m p e r a t u r e o f a i r i n K
25
26
27
// Output
printf ( (A) P r e s s u r e i s %3 . 3 f b a r \n (B) T e m p e r a t u r e i s
%3 . 2 f K\n (C) V e l o c i t y o f a i r i s %3 . 2 f m/ s \n (D)
S t a g n a t i o n t e m p e r a t u r e i s %3 . 2 f K\n (E) Mach
number i s %3 . 3 f ,Py , Ty , C_y , T_oy , M_y )
Scilab code Exa 5.9 To find properties downstream of shock total head
pressure ratio entropy change strength of shock
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
clc
clear
// I n p u t d a t a
Mx =3 // Mach number b e f o r e t h e s h o c k
Tx =27+273 // T e m p e r a t u r e b e f o r e t h e s h o c k i n K
Px =1 // P r e s s u r e b e f o r e t h e s h o c k i n b a r
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
My =0.475 // Mach number a f t e r t h e s h o c k from g a s
t a b l e s @Mx
p1 =10.333 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @My
Py = p1 * Px // S t a t i c p r e s s u r e a f t e r s h o c k i n b a r
t1 =2.679 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @My
Ty = Tx * t1 // T e m p e r a t u r e r a t i o a f t e r t h e s h o c k i n K
p2 =12.061 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k t o
S t a t i c p r e s s u r e b e f o r e s h o c k from g a s t a b l e s @My
Poy = p2 * Px // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n b a r
p3 =0.328 // S t a g n a t i o n p r e s s u r e r a t i o a f t e r and
134
20
21
22
23
24
25
26
27
b e f o r e t h e s h o c k from g a s t a b l e s @My
Pox = Poy / p3 // S t a g n a t i o n p r e s s u r e b e f o r e s h o c k i n kPa
ay = sqrt ( k * R * Ty ) // V e l o c i t y o f sound a f t e r t h e s h o c k
i n m/ s
Cy = ay * My // V e l o c i t y o f a i r a f t e r t h e s h o c k i n m/ s
ds = R * log (1/ p3 ) // Change i n e n t r o p y i n J / kgK
e =( Py - Px ) / Px // S t r e n g t h o f s h o c k
// Output
printf ( ( I ) Downstream o f t h e s h o c k : \ n
(A) P r e s s u r e
i s %3 . 3 f b a r \n
(B) T e m p e r a t u r e i s %3 . 1 f K\n
(C) Gas v e l o c i t y i s %3 . 2 f m/ s \n
(D) Mach
number i s %3 . 3 f \n ( I I ) T o t a l head p r e s s u r e r a t i o
i s %3 . 3 f \n ( I I I ) Entropy c h a n g e a c r o s s t h e s h o c k
i s %3 . 3 f J / kgK\n ( IV ) S t r e n g t h o f t h e s h o c k i s %3
. 3 f ,Py , Ty , Cy , My , p3 , ds , e )
Scilab code Exa 5.10 To determine Mach number across shock and area
at shock
1 clc
2 clear
3
4 // I n p u t d a t a
5 a1 =0.4 // R a t i o o f
6 p1 =0.8 // R a t i o o f
8
9 // C a l c u l a t i o n
10 a2 =1/ a1 // r e c i p r o c a l o f a1 t o f i n d i n g a s t a b l e s
11 // Pox=Po1=Po , Poy=Po2
12 a2p2 = a2 * p1 // Area p r e s s u r e r a t i o i . e . ( A2P2 ) / ( At2
Po2 )
13 M2 =0.28 // E x i t mach number from g a s t a b l e s @a2p2
135
14 a3 =2.166 // R a t i o o f
15
16
17
18
19
20
21
22
23
24
Scilab code Exa 5.11 To find Mach number across shock Static pressure
and area at shock
1 clc
2 clear
3
4 // I n p u t d a t a
5 a1 =1/3 // R a t i o o f
6 p1 =0.4 // R a t i o o f
7
8 // C a l c u l a t i o n
9 a2 =1/ a1 // r e c i p r o c a l o f a1 t o f i n d i n g a s t a b l e s
10 // we know Pox=Po1=Po , Poy=Po2 , At=Atx and Aty=At2
11 a2p2 = a2 * p1 // Area p r e s s u r e r a t i o i . e . ( A2P2 ) / ( At2
136
12
13
14
15
16
17
18
19
20
21
22
23
Po2 )
M2 =0.472 // E x i t mach number from g a s t a b l e s @a2p2
a3 =1.397 // R a t i o o f e x i t a r e a t o t h r o a t a r e a a f t e r
s h o c k from g a s t a b l e s @a2p2
p2 =0.858 // S t a t i c t o s t a g n a t i o n p r e s s u r e r a t i o a t
e x i t from g a s t a b l e s @a2p2
p3 = a3 / a2 // S t a g n a t i o n p r e s s u r e r a t i o a f t e r and
b e f o r e shock
Mx =2.58 // Mach number b e f o r e t h e s h o c k @p3
My =0.506 // Mach number a f t e r t h e s h o c k from g a s
t a b l e s @Mx
p4 =9.145 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k t o S t a t i c
p r e s s u r e b e f o r e s h o c k from g a s t a b l e s @My
a4 =2.842 // R a t i o o f a r e a b e f o r e s h o c k t o t h r o a t a r e a
p5 =0.051 // R a t i o o f P r e s s u r e b e f o r e s h o c k t o
Stagnation p r e s s u r e at entry
// Output
printf ( At s e c t i o n where s h o c k o c c u r s : \ n
(A) Mach
number Mx=%3 . 2 f and My=%3 . 3 f \n
(B) S t a t i c
P r e s s u r e i s %3 . 3 f Po1 ( u n i t s depend on Po1 ) \n
(C) Area o f c r o s s s e c t i o n i s %3 . 3 f At ( u n i t s
depend on At ) ,Mx , My , p5 , a4 )
clc
clear
// I n p u t d a t a
Po =300 // P r e s s u r e i n r e s e r v o i r i n kPa
To =500 // T e m p e r a t u r e i n r e s e r v o i r i n K
At =1 // T h r o a t a r e a i n m2
Ax =2 // Area j u s t b e f o r e t h e s h o c k i n m2
Ay =2 // Area j u s t a f t e r t h e s h o c k i n m2
137
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
A2 =3 // E x i t a r e a i n m2
// C a l c u l a t i o n
a1 = Ax / At // Area r a t i o
Mx =2.2 // Mach number u p s t r e a m o f s h o c k
p1 =0.0935 // R a t i o o f p r e s s u r e b e f o r e s h o c k t o
s t a g n a t i o n p r e s s u r e b e f o r e s h o c k from g a s t a b l e s
@Mx
Px = p1 * Po // p r e s s u r e b e f o r e s h o c k i n kPa
t1 =0.50 // R a t i o o f t e m p e r a t u r e b e f o r e s h o c k t o
s t a g n a t i o n p r e s s u r e b e f o r e s h o c k from g a s t a b l e s
@Mx
Tx = t1 * To // t e m p e r a t u r e b e f o r e s h o c k i n K
My =0.547 // Mach number downstream o f s h o c k
p2 =5.480 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @My
Py = Px * p2 // S t a t i c p r e s s u r e a f t e r s h o c k i n kPa
t2 =1.857 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @My
Ty = t2 * Tx // T e m p e r a t u r e r a t i o a f t e r t h e s h o c k i n K
p3 =6.716 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k t o S t a t i c
p r e s s u r e b e f o r e s h o c k from g a s t a b l e s @My
Poy = Px * p3 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n kPa
Po2 = Poy // E x i t s t a g n a t i o n p r e s s u r e i n kPa , S i n c e
t o t a l p r e s s u r e r e m a i n s same a f t e r s h o c k
t3 =0.943 // S t a t i c t o s t a g n a t i o n p r e s s u r e a f t e r s h o c k
from i s e n t r o p i c g a s t a b l e s @My
Toy = Ty / t3 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n K
To2 = Toy // E x i t s t a g n a t i o n t e m p e r a t u r e i n K, S i n c e
temperature remains a f t e r shock
a2 =1.255 // R a t i o o f a r e a a f t e r s h o c k t o t h r o a t a r e a
a f t e r s h o c k from i s e n t r o p i c g a s t a b l e s @My
Aty = Ay / a2 // T h r o a t a r e a a f t e r s h o c k i n m2
At2 = Aty // T h r o a t a r e a a t e x i t i n m2
a3 = A2 / At2 // A r e a s r a t i o
M2 =0.33 // E x i t mach number from g a s t a b l e s @a3
p4 =0.927 // S t a t i c t o S t a g n a t i o n p r e s s u r e a t e x i t
from g a s i s e n t r o p i c g a s t a b l e s @a3
138
36 P2 = Po2 * p4 // E x i t p r e s s u r e i n kPa
37 t4 =0.978 // S t a t i c t o S t a g n a t i o n t e m p e r a t u r e a t e x i t
from g a s i s e n t r o p i c g a s t a b l e s @a3
38 T2 = To2 * t4 // E x i t t e m p e r a t u r e i n K
39
40
41
// Output
printf ( (A) P r e s s u r e a t s e c t i o n ( x ) Px=%3 . 2 f kPa \n (B
) P r e s s u r e a t s e c t i o n ( y ) Px=%3 . 3 f kPa \n (C)
S t a g n a t i o n p r e s s u r e a t s e c t i o n ( y ) Poy=%3 . 2 f kPa \
n (D) T h r o a t a r e a o f c r o s s s e c t i o n a t s e c t i o n ( y )
Aty=%3 . 4 f m2\ n (E) S t a g n a t i o n p r e s s u r e a t e x i t
Po2=%3 . 2 f kPa \n ( F ) T h r o a t a r e a o f c r o s s s e c t i o n
a t e x i t At2=%3 . 4 f m2\ n (G) S t a t i c P r e s s u r e a t
e x i t P2=%3 . 2 f kPa \n (H) S t a g a n t i o n t e m p e r a t u r e a t
e x i t To2=%3i K\n ( I ) T e m p e r a t u r e a t e x i t T2=%3i k
,Px , Py , Poy , Aty , Po2 , At2 , P2 , To2 , T2 )
Scilab code Exa 5.13 To find mass flow rate and properties at throat and
exit at various sections of CD nozzle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
clc
clear
// I n p u t d a t a
Po1 =500 // S t a g n a t i o n p r e s s u r e i n kPa
To1 =600 // S t a g n a t i o n t e m p e r a t u r e i n K
C1 =100 // i n l e t v e l o c i t y i n m/ s
A1 =0.01 // I n l e t Area i n m2
A2 =0.01 // E x i t Area i n m2
Mx =1.2 // Mach number b e f o r e t h e s h o c k
Ax =37.6 // Area j u s t b e f o r e t h e s h o c k i n cm2
Ay =37.6 // Area j u s t a f t e r t h e s h o c k i n cm2
Px =109.9 // P r e s s u r e b e f o r e t h e s h o c k i n kPa
Poy =350 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n kPa
k =1.4 // A d i a b a t i c c o n s t a n t
139
16 R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
17 Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t volume
i n J / kgK
18
19 // C a l c u l a t i o n
20 T1 = To1 +( C1 ^2/(2* Cp ) ) // I n l e t
21 ai_1 = sqrt ( k * R * T1 ) // V e l o c i t y
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
s t a t i c temperature in K
o f sound a t i n l e t i n m/
s
M1 = C1 / ai_1 // I n l e t Mach number
p1 =0.973 // S t a t i c t o S t a g n a t i o n p r e s s u r e r a t i o a t
e n t r y from g a s t a b l e s @M1
P1 = Po1 * p1 // I n l e t s t a t i c p r e s s u r e i n kPa
d1 = P1 *10^3/( R * T1 ) // D e n s i t y a t i n l e t i n kg /m 3 , P1
i n Pa
m = d1 * A1 * C1 // Mass f l o w r a t e a t i n l e t i n kg / s
p2 =0.528 // R a t i o o f c r i t i c a l p r e s s u r e t o s t a g n a t i o n
p r e s s u r e from g a s t a b l e s @M=1
Pt = Po1 * p2 // C r i t i c a l p r e s s u r e i n kPa
t1 =0.834 // R a t i o o f c r i t i c a l t e m p e r a t u r e t o
s t a g n a t i o n t e m p e r a t u r e from g a s t a b l e s @M=1
Tt = t1 * To1 // c r i t i c a l t e m p e r a t u r e i n K
ai_t = sqrt ( k * R * Tt ) // V e l o c i t y o f sound a t c r i t i c a l
s t a t e i n m/ s
Ct = ai_t // V e l o c i t y o f a i r a t c r i t i c a l s t a t e i n m/ s
a1 =2.964 // R a t i o o f i n l e t a r e a t o c r i t i c a l a r e a from
g a s t a b l e s @M=1
At = A1 / a1 // c r i t i c a l a r e a i n m2
dt = Pt /( R * Tt ) // D e n s i t y a t c r i t i c a l s t a t e i n kg /m3
mt = dt * At * Ct // Mass f l o w r a t e a t c r i t i c a l s a t a t e i n
kg / s
// Sub d i v i s i o n ( a )
a2 =1.030 // R a t i o o f a r e a a f t e r s h o c k t o c r i t i c a l
a r e a from g a s t a b l e s @Mx
Ay_a = At * a2 // Area a f t e r s h o c k i n cm2
p3 =0.412 // R a t i o o f upstram o f s h o c k t o s t a g n a t i o n
p r e s s u r e s from i s e n t r o p i c g a s t a b l e s @Mx
Px_a = Po1 * p3 // P r e s s u r e upstram o f s h o c k i n kPa
t2 =0.776 // R a t i o o f upstram o f s h o c k t o s t a g n a t i o n
140
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s @Mx
Tx_a = To1 * t2 // T e m p e r a t u r e upstram o f s h o c k i n K
My_a =0.84 // Mach number downstream o f s h o c k from
n o r m a l s h o c k g a s t a b l e s @Mx
p4 =1.497 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @My
Py_a = Px_a * p4 // S t a t i c p r e s s u r e a f t e r s h o c k i n kPa
t3 =1.099 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @My
Ty_a = Tx_a * t3 // T e m p e r a t u r e r a t i o a f t e r t h e s h o c k i n
K
p5 =2.407 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k t o S t a t i c
p r e s s u r e b e f o r e s h o c k from g a s t a b l e s @My
Poy_a = Px_a * p5 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n
kPa
a3 =1.204 // R a t i o o f a r e a a f t e r s h o c k t o t h r o a t a r e a
a f t e r s h o c k from i s e n t r o p i c g a s t a b l e s @My
At2_a =( Ay_a / a3 ) *10^4 // T h r o a t a r e a a t e x i t i n m 2 ,
c a l c u l a t i o n mistake in textbook
a4 = A2 / At2_a // R a t i o o f a r e a s t o f i n d g a s t a b l e s
M2_a =0.2 // E x i t mach number a t s e c t i o n A from g a s
t a b l e s @a4
p5 =0.973 // r a t i o o f e x i t p r e s s u r e t o s t a g n a t i o n
p r e s s u r e a f t e r s h o c k from g a s t a b l e s
P2_a = p5 * Poy_a // e x i t p r e s s u r e i n kPa
// Sub d i v i s i o n ( b )
a5 = Ax / At // R a t i o o f a r e a b e f o r e s h o c k t o c r i t i c a l
area
Mx_b =1.4 // Mach number a t s e c t i o n B from g a s t a b l e s
@a5
p6 =0.314 // R a t i o o f upstram o f s h o c k t o s t a g n a t i o n
p r e s s u r e s from i s e n t r o p i c g a s t a b l e s @Mx b
Px_b = Po1 * p6 // P r e s s u r e upstram o f s h o c k i n kPa
t4 =0.718 // R a t i o o f upstram o f s h o c k t o s t a g n a t i o n
t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s @Mx b
Tx_b = To1 * t4 // T e m p e r a t u r e upstram o f s h o c k i n K
p20 =3.049 // S t a g n a t i o n p r e s s u r e r a t i o a f t e r s h o c k t o
S t a t i c p r e s s u r e b e f o r e s h o c k from g a s t a b l e s
141
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89 p12 =4 // S t a g n a t i o n
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
p r e s s u r e a f t e r shock to S t a t i c
p r e s s u r e b e f o r e s h o c k from g a s t a b l e s @Mx c
Poy_c = Px * p12 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n
kPa
a9 =1.136 // R a t i o o f a r e a a f t e r s h o c k t o t h r o a t a r e a
a f t e r s h o c k from g a s t a b l e s My c = 0 . 6 5 4
At2_c = Ax_c / a9 // T h r o a t a r e a a t e x i t i n m2
a8 = A2 / At2_c // R a t i o o f a r e a s
M2_c =0.23 // E x i t mach number a t s e c t i o n B from g a s
t a b l e s @a8
p11 =0.964 // r a t i o o f e x i t p r e s s u r e t o s t a g n a t i o n
p r e s s u r e a f t e r s h o c k from g a s t a b l e s
P2_c = p11 * Poy_c // e x i t p r e s s u r e i n kPa
// Sub d i v i s i o n (D)
p13 = Poy / Po1 // P r e s s u r e r a t i o , S i n c e Pox=Po1
Mx_d =2.04 // Mach number u p s t r e a m o f s h o c k from g a s
t a b l e s @p13
My_d =0.571 // Mach number downstream o f s h o c k from
g a s t a b l e s @p13
p14 =4.688 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @My d
t8 =1.72 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @My d
p15 =5.847 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k t o
S t a t i c p r e s s u r e b e f o r e s h o c k from g a s t a b l e s
@Mx d
p16 =0.120 // R a t i o o f upstram o f s h o c k t o s t a g n a t i o n
p r e s s u r e s from i s e n t r o p i c t a b l e s @Mx d
Px_d = Po1 * p16 // P r e s s u r e upstram o f s h o c k i n kPa
t9 =0.546 // R a t i o o f upstram o f s h o c k t o s t a g n a t i o n
t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s @Mx d
Tx_d = To1 * t9 // T e m p e r a t u r e upstram o f s h o c k i n K
p21 =4.688 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s
Py_d = Px_d * p21 // P r e s s u r e downstram o f s h o c k i n kPa
t12 =1.72 // R a t i o o f upstram o f s h o c k t o s t a g n a t i o n
t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s
Ty_d = Tx_d * t12 // T e m p e r a t u r e a f t e r t h e s h o c k i n K
143
112 a9 =1.745 // R a t i o o f a r e a b e f o r e s h o c k t o t h r o a t a r e a
from i s e n t r o p i c g a s t a b l e s
113 Ax_d = At * a9 *10^4 // Area b e f o r e s h o c k i n cm2
114 a10 =1.226 // R a t i o o f a r e a a f t e r s h o c k t o t h r o a t a r e a
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
a f t e r s h o c k from i s e n t r o p i c t a b l e s @My d
At2_d =( Ax_d / a10 ) // T h r o a t a r e a a t e x i t i n cm2
a11 = A2 / At2_d // R a t i o o f a r e a s
M2_d =0.29 // E x i t mach number a t s e c t i o n B from g a s
t a b l e s @a11
p17 =0.943 // r a t i o o f e x i t p r e s s u r e t o s t a g n a t i o n
p r e s s u r e a f t e r s h o c k from g a s t a b l e s
P2_d = p17 * Poy // e x i t p r e s s u r e i n kPa
// Sub d i v i s i o n ( e )
a12 = Ax / At // R a t i o o f a r e a s
Mx_e =2.62 // Mach number u p s t r e a m o f s h o c k from g a s
t a b l e s @a12
t10 =0.421 // R a t i o o f upstram o f s h o c k t o s t a g n a t i o n
t e m p e r a t u r e from i s e n t r o p i c g a s t a b l e s
Tx_e = To1 * t10 // T e m p e r a t u r e upstram o f s h o c k i n K
p18 =0.0486 // R a t i o o f upstram o f s h o c k t o s t a g n a t i o n
p r e s s u r e s from i s e n t r o p i c t a b l e s @Mx e
Px_e = p18 * Po1 // P r e s s u r e upstram o f s h o c k i n kPa
My_e =0.502 // Mach number downstream o f s h o c k from
g a s t a b l e s @Mx e
p19 =7.842 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @My e
Py_e = Px_e * p19 // P r e s s u r e downstram o f s h o c k i n kPa
P2_e = Py_e // E x i t p r e s s u r e i n kPa
t11 =2.259 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @My d
Ty_e = Tx_e * t11 // Temperaure downstram o f s h o c k i n K
T2_e = Ty_e // E x i t t e m p e r a t u r e i n K
// Output
printf ( At t h r o a t : \ n
Mass f l o w r a t e i s %3 . 2 f kg / s
\n
Area a t t h r o a t i s %3 . 5 f m2\ n
Pressure
i s %3i kPa \n
T e m p e r a t u r e i s %3 . 1 f K\n
V e l o c i t y i s %3 . 1 f m/ s \n ( a ) At s e c t i o n (A) : \ n
144
P r e s s u r e u p s t r e a m i s %3i kPa \n
Temperature
u p s t r e a m i s %3 . 1 f K\n
Mack number downstream
i s %3 . 2 f \n
P r e s s u r e downstream i s %3 . 3 f kPa \n
T e m p e r a t u r e downstream i s %3 . 3 f K\n
S t a g n a t i o n p r e s s u r e downstream i s %3 . 1 f kPa \n
Area i s %3 . 3 f cm2\ n At e x i t : \ n
Mach number
i s %3 . 1 f \n
P r e s s u r e i s %3 . 1 f kPa \n ( b ) At
s e c t i o n (B) : \ n
P r e s s u r e u p s t r e a m i s %3i kPa \n
T e m p e r a t u r e u p s t r e a m i s %3 . 1 f K\n
Mack
number u p s t r e a m i s %3 . 1 f \n
Mack number
downstream i s %3 . 3 f \n
P r e s s u r e downstream i s
%3 . 2 f kPa \n
T e m p e r a t u r e downstream i s %3 . 2 f K\
n
S t a g n a t i o n p r e s s u r e downstream i s %3 . 1 f kPa \
n
Area i s %3 . 3 f cm2\ n At e x i t : \ n
Mach
number i s %3 . 2 f \n
P r e s s u r e i s %3 . 1 f kPa \n ( c )
At s e c t i o n (C) : \ n
Area u p s t r e a m i s %3 . 2 f cm2\
n
T e m p e r a t u r e u p s t r e a m i s %3 . 1 f K\n
Mack
number u p s t r e a m i s %3 . 2 f \n
Mack number
downstream i s %3 . 3 f \n
P r e s s u r e downstream i s
%3 . 2 f kPa \n
T e m p e r a t u r e downstream i s %3 . 2 f K\
n
S t a g n a t i o n p r e s s u r e downstream i s %3i kPa \n
Area i s %3 . 4 f cm2\ n At e x i t : \ n
Mach
number i s %3 . 2 f \n
P r e s s u r e i s %3 . 1 f kPa \n ( d )
At s e c t i o n (D) : \ n
P r e s s u r e u p s t r e a m i s %3i kPa
\n
T e m p e r a t u r e u p s t r e a m i s %3 . 1 f K\n
Area
u p s t r e a m i s %3 . 3 f cm2\ n
Mack number u p s t r e a m
i s %3 . 2 f \n
Mack number downstream i s %3 . 2 f \n
P r e s s u r e downstream i s %3 . 2 f kPa \n
T e m p e r a t u r e downstream i s %3 . 2 f K\n
Area i s %3
. 3 f cm2\ n At e x i t : \ n
Mach number i s %3 . 2 f \n
P r e s s u r e i s %3 . 2 f kPa \n ( e ) At s e c t i o n (E) : \ n
P r e s s u r e u p s t r e a m i s %3 . 1 f kPa \n
T e m p e r a t u r e u p s t r e a m i s %3 . 1 f K\n
Mack number
u p s t r e a m i s %3 . 2 f \n
Mack number downstream i s
%3 . 3 f \n
P r e s s u r e downstream i s %3 . 1 f kPa \n
T e m p e r a t u r e downstream i s %3 . 2 f K\n At e x i t : \ n
T e m p e r a t u r e i s %3 . 2 f K\n
P r e s s u r e i s %3 . 1 f
kPa \n ,m , At , Pt , Tt , Ct , Px_a , Tx_a , My_a , Py_a , Ty_a ,
145
clc
clear
// I n p u t d a t a
T =300 // T e m p e r a t u r e i n K
P =1.01325*10^5 // A b s o l u t e p r e s s u r e i n Pa
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
C_1 =60 // V e l o c i t y o f a i r i n m/ s
C_2 =200 // V e l o c i t y o f a i r i n m/ s
C_3 =500 // V e l o c i t y o f a i r i n m/ s
d_hg =13600 // D e n s i t y o f m e r c u r y i n kg /m3
g =9.81 // A c c e l e r a t i o n due t o g r a v i t y i n m/ s 2
// C a l c u l a t i o n
a = sqrt ( k * R * T ) // Sound v e l o c i t y i n m/ s
M_1 = C_1 / a // Mach number
dP1 =( P * C_1 ^2) /(2* R * T ) // D i f f e r e n c e i n m e r c u r y l e v e l s
i n Pa
dP1_hg =( dP1 /( d_hg * g ) ) *1000 // D i f f e r e n c e i n m e r c u r y
l e v e l s i n mm o f Hg
M_2 = C_2 / a // Mach number
p1 =(1+(( k -1) /2) * M_2 ^2) ^( k /( k -1) ) // S t a g n a t i o n t o
static pressure ratio
Po = p1 * P // S t a g n a t i o n p r e s s u r e i n Pa
dP2 = abs ( Po - P ) // D i f f e r e n c e i n m e r c u r y l e v e l s i n Pa
146
24
25
26
27
28
29
30
31
32
33
34
35
Scilab code Exa 5.15 To estimate Mach number and properties across the
normal shock of tube
1
2
3
4
5
6
7
8
9
10
11
clc
clear
// I n p u t d a t a
Px =16 // P r e s s u r e b e f o r e t h e s h o c k i n kPa
Poy =70 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n kPa
To =300+273 // S t a g n a t i o n t e m p e r a t u r e i n K
k =1.4 // A d i a b a t i c c o n s t a n t
// C a l c u l a t i o n
p1 = Poy / Px // P r e s s u r e r a t i o
147
b e f o r e s h o c k from g a s t a b l e s
a f t e r and b e f o r e s h o c k
from g a s t a b l e s
16 Tx = To /(1+(( k -1) /2) * Mx ^2) // T e m p e r a t u r e u p s t r e a m o f
shock in K
17 Ty = Tx * t1 // T e m p e r a t u r e downstream o f s h o c k i n K
18 Pox = Poy / p2 // S t a g n a t i o n p r e s s u r e b e f o r e s h o c k i n kPa
15 t1 =1.483 // T e m p e r a t u r e r a t i o
19
20
21
// Output
printf ( (A) Mach number o f t h e t u n n a l i s Mx=%3 . 3 f (My
=%3 . 3 f ) \n (B) Upstream o f t h e t u b e : \ n
Static
t e m p e r a t u r e i s %3i K\n
T o t a l p r e s s u r e i s %3 . 1 f
kPa \n (C) Downstream o f t h e t u b e : \ n
Static
t e m p e r a t u r e i s %3i K\n
T o t a l p r e s s u r e i s %3i
kPa ,Mx , My , Tx , Pox , Ty , Poy )
Scilab code Exa 5.16 To find Mach number and velocity in pitot tube
1
2
3
4
5
6
7
clc
clear
// I n p u t d a t a
Py =455 // P r e s s u r e downstream o f s h o c k i n kPa
Ty =65+273 // T e m p e r a t u r e downstream o f s h o c k i n K
dP =65 // D i f f e r e n c e b e t w e e n dynamic and s t a t i c
p r e s s u r e i n kPa
8 k =1.4 // A d i a b a t i c c o n s t a n t
9 R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
10
11 // C a l c u l a t i o n
12 Poy = dP + Py // S t a g n a t i o n p r e s s u r e
13 p1 = Py / Poy // P r e s s u r e r a t i o
148
a f t e r s h o c k i n kPa
i s e n t r o p i c g a s t a b l e s @p1
15 Mx =3.8 // Mach number u p s t r e a m o f s h o c k from n o r m a l
s h o c k g a s t a b l e s @My
16 t1 =3.743 // T e m p e r a t u r e r a t i o
a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @My
17 Tx = Ty / t1 // T e m p e r a t u r e b e f o r e t h e s h o c k i n K
18 ax = sqrt ( k * R * Tx ) // V e l o c i t y o f sound b e f o r e t h e s h o c k
i n m/ s
19 Cx = Mx * ax // A i r V e l o c i t y b e f o r e t h e s h o c k i n m/ s
20
21
22
// Output
printf ( (A) Mach number i s Mx=%3 . 1 f (My=%3 . 2 f ) \n (B)
V e l o c i t y i s %3 . 2 f m/ s ,Mx , My , Cx )
Scilab code Exa 5.17 To find shock speed and air velocity inside the shock
1
2
3
4
5
6
7
8
9
10
11
12
13
clc
clear
// I n p u t d a t a
k =1.4 // A d i a b a t i c c o n s t a n t
Px =1.01325 // P r e s s u r e b e f o r e t h e s h o c k i n b a r
Tx =15+273 // T e m p e r a t u r e b e f o r e t h e s h o c k i n K
Py =13.789 // P r e s s u r e j u s t a f t e r t h e s h o c k i n b a r
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
p1 = Py / Px // P r e s s u r e r a t i o
Mx =3.47 // Mach number u p s t r e a m o f s h o c k from n o r m a l
s h o c k g a s t a b l e s @p1
14 My =0.454 // Mach number downstream o f s h o c k from
i s e n t r o p i c g a s t a b l e s @p1
15 t1 =3.213 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @Mx
149
16 Ty = Tx * t1 // T e m p e r a t u r e downstream o f s h o c k i n K
17 p2 =15.574 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k t o
18
19
20
21
22
23
24
25
26
27
28
29
30
S t a t i c p r e s s u r e b e f o r e s h o c k from g a s t a b l e s @Mx
Poy = Px * p2 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n b a r
ax = sqrt ( k * R * Tx ) // V e l o c i t y o f sound b e f o r e t h e s h o c k
i n m/ s
Cx = Mx * ax // V e l o c i t y o f a i r b e f o r e t h e s h o c k i n m/ s
Csh = Cx // S i n c e Csh=Cx , s e e d i g .
ay = sqrt ( k * R * Ty ) // V e l o c i t y o f sound a f t e r t h e s h o c k
i n m/ s
Cy = My * ay // V e l o c i t y o f a i r a f t e r t h e s h o c k i n m/ s
C_y = Cx - Cy // A i r v e l o c i t y j u s t i n s i d e t h e s h o c k i n m/
s
P_y = Py // P r e s s u r e o f a i r i n bar , S i n c e a p o w e r f u l
e x p l o s i o n c r e a t e s a b r i e f but i n t e n s e b l a s t wind
as i t passes
a_y = sqrt ( k * R * Ty ) // // V e l o c i t y o f sound a f t e r t h e
s h o c k i n m/ s
M_y = C_y / a_y // Mach number
// Output
printf ( (A) Shock s p e e d i s %3 . 2 f m/ s \n (B) A i r
v e l o c i t y j u s t i n s i d e t h e s h o c k i s %3 . 2 f m/ s ,Cx ,
C_y )
Scilab code Exa 5.18 To compute speed of wave pressure and temperature
of air at rest
1
2
3
4
5
6
7
clc
clear
// I n p u t d a t a
T =300 // T e m p e r a t u r e i n K
P =1.5 // P r e s s u r e i n b a r
C_y =150 // A i r v e l o c i t y j u s t i n s i d e t h e s h o c k i n m/ s
150
8 k =1.4 // A d i a b a t i c c o n s t a n t
9 R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
10
11 // C a l c u l a t i o n
12 ax = sqrt ( k * R * T ) // V e l o c i t y o f sound b e f o r e t h e s h o c k
13
14
15
16
17
18
19
20
21
22
23
24
i n m/ s
Mx = sqrt ((( C_y *( k +1) ) /(2* ax ) ) +1) // Mach number b e f o r e
the shock
My =0.79 // // Mach number a f t e r t h e s h o c k from n o r m a l
shock gas t a b l e s
Cx = Mx * ax // V e l o c i t y o f g a s b e f o r e t h e s h o c k i n m/ s
p1 =1.775 // S t a g n a t i o n p r e s s u r e r a t i o a f t e r and
b e f o r e t h e s h o c k from g a s t a b l e s @My
Py = P * p1 // P r e s s u r e j u s t a f t e r t h e s h o c k i n b a r
t1 =1.1845 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @My
Ty = T * t1 // T e m p e r a t u r e r a t i o a f t e r t h e s h o c k i n K
ay = sqrt ( k * R * Ty ) // V e l o c i t y o f sound a f t e r t h e s h o c k
i n m/ s
Csh = My * ay // Speed o f t h e wave i n m/ s
// Output
printf ( (A) Speed o f t h e wave i s %3 . 1 f m/ s \n (B) At
rest condition :\n
P r e s s u r e i s %3 . 4 f b a r \n
T e m p e r a t u r e i s %3 . 2 f K ,Csh , Py , Ty )
Scilab code Exa 5.19 To find Mach number pressure temperature at exit
and diffuser efficiency
1 clc
2 clear
3
4 // I n p u t d a t a
5 Mx =2 // Mach number b e f o r e t h e s h o c k
6 a1 =3 // D i f f u s e r a r e a r a t i o
151
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
Pox =0.1 // S t a g n a t i o n p r e s s u r e b e f o r e s h o c k i n b a r
Tx =300 // T e m p e r a t u r e b e f o r e t h e s h o c k i n K
k =1.4 // A d i a b a t i c c o n s t a n t
// C a l c u l a t i o n
t1 =0.555 // S t a t i c t o s t a g n a t i o n t e m p e r a t u r e r a t i o
b e f o r e s h o c k from i s e n t r o p i c g a s t a b l e s @Mx, k =1.4
Tox = Tx / t1 // S t a g n a t i o n t e m p e r a t u r e b e f o r e s h o c k i n K
p1 =0.128 // S t a t i c t o s t a g n a t i o n p r e s s u r e r a t i o
b e f o r e s h o c k from i s e n t r o p i c g a s t a b l e s @Mx, k =1.4
Px = Pox * p1 // P r e s s u r e b e f o r e t h e s h o c k i n b a r
My =0.577 // Mach number a f t e r t h e s h o c k
p2 =4.5 // P r e s s u r e r a t i o a f t e r and b e f o r e t h e s h o c k
from g a s t a b l e s @Mx
Py = Px * p2 // P r e s s u r e j u s t a f t e r t h e s h o c k i n b a r
t2 =1.687 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @Mx
Ty = Tx * t2 // T e m p e r a t u r e r a t i o a f t e r t h e s h o c k i n K
p3 =0.721 // S t a g n a t i o n p r e s s u r e r a t i o a f t e r and
b e f o r e s h o c k from g a s t a b l e s @Mx
Poy = Pox * p3 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n kPa
a2 =1.2195 // R a t i o o f a r e a a f t e r s h o c k t o t h r o a t a r e a
a f t e r s h o c k from g a s t a b l e s @My
a3 = a2 * a1 // R a t i o o f e x i t a r e a t o t h r o a t a r e a a t e x i t
M2 =0.16 // E x i t mach number from g a s t a b l e s @a3
t3 =0.9946 // S t a t i c t o s t a g n a t i o n t e m p e r a t u r e r a t i o
a t e x i t from i s e n t r o p i c g a s t a b l e s @Mx
T2 = Tox * t3 // E x i t T e m p e r a t u r e i n K, S i n c e Tox=Toy=T02
in case of d i f f u s e r
p4 =0.982 // S t a t i c t o s t a g n a t i o n p r e s s u r e r a t i o a t
e x i t from i s e n t r o p i c g a s t a b l e s @Mx
P2 = Poy * p4 // E x i t p r e s s u r e i n bar , C a l c u l a t i o n
mistake in textbook
eff =(((( Tox / Tx ) *( Poy / Pox ) ^(( k -1) / k ) ) -1) /((( k -1) /2) *
Mx ^2) ) *100 // D i f f u s e r e f f i c i e n c y i n c l u d i n g s h o c k
in percent
// Output
152
33
printf ( (A) At t h e d i f f u s e r e x i t : \ n
Mach number i s
%3 . 2 f \n
P r e s s u r e i s %3 . 3 f b a r \n
T e m p e r a t u r e i s %3 . 2 f K\n (B) D i f f u s e r e f f i c i e n c y
i n c l u d i n g s h o c k i s %3 . 3 f p e r c e n t ,M2 , P2 , T2 , eff )
Scilab code Exa 5.20 To find length of duct across shock mass flow rate
entropy change across and downstream of shock
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
clc
clear
// I n p u t d a t a
k =1.3 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
P1 =1 // I n l e t p r e s s u r e i n b a r
T1 =400 // I n l e t t e m p e r a t u r e i n K
D =0.3 // Duct d i a m e t e r i n m
M1 =2 // Mach number a t e n t r y
Mx =1.5 // Mach number u p s t r e a m o f s h o c k
M2 =1 // Mach number a t o u t l e t
f =0.003 // F r i c t i o n f a c t o r
// C a l c u l a t i o n
d1 = P1 *10^5/( R * T1 ) // D e n s i t y a t i n l e t i n kg /m3
a1 = sqrt ( k * R * T1 ) // V e l o c i t y o f sound a t i n l e t i n m/ s
C1 = M1 * a1 // Gas v e l o c i t y a t i n l e t i n m/ s
A1 = %pi * D ^2/4 // I n l e t Area o f t h e d u c t i n m2
m = d1 * C1 * A1 // Mass f l o w r a t e i n kg / s
p1 =0.131 // S t a t i c t o S t a g n a t i o n p r e s s u r e r a t i o a t
e n t r y from g a s t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
Po1 = P1 / p1 // S t a g a n t i o n p r e s s u r e a t i n l e t i n b a r
t1 =0.625 // S t a t i c t o S t a g n a t i o n t e m p e r a t u r e r a t i o a t
e n t r y from g a s t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
To1 = T1 / t1 // S t a g n a t i o n t e m p e r a t u r e a t i n l e t i n K
p2 =0.424 // S t a t i c t o C r i t i c a l p r e s s u r e r a t i o a t
153
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 p7 =0.926 // S t a g n a t i o n
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
p r e s s u r e r a t i o a f t e r and
b e f o r e t h e s h o c k from g a s t a b l e s @My
Poy = Pox * p7 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n b a r
p8 =1.479 // R a t i o o f p r e s s u r e a f t e r s h o c k t o p r e s s u r e
a t c r i t i c a l s t a t e from g a s t a b l e s @My
Pt = Py / p8 // C r i t i c a l p r e s s u r e i n b a r
p9 =1.097 // R a t i o o f S t a g n a t i o n p r e s s u r e a f t e r s h o c k
t o S t a g n a t i o n p r e s s u r e a t c r i t i c a l s t a t e from g a s
t a b l e s @My
Pot = Poy / p9 // S t a g n a t i o n p r e s s u r e a t c r i t i c a l s t a t e
in bar
t5 =1.071 // R a t i o o f t e m p e r a t u r e a f t e r s h o c k t o
t e m p e r a t u r e a t c r i t i c a l s t a t e from g a s t a b l e s @My
Tt = Ty / t5 // C r i t i c a l t e m p e r a t u r e i n K
Xy =0.231 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @My, k =1.4
X2 =0 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from g a s
t a b l e s , f a n n o f l o w t a b l e s @M=1 , k =1.4
X4 = Xy - X2 // O v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
p a r a m e t e r downstream o f d u c t
L2 =( X4 * D ) /(4* f ) // Length downstream o f d u c t i n m
ds1 = R * log ( Po1 / Pox ) // Change o f e n t r o p y u p s t r e a m o f
t h e s h o c k i n J / kgK
ds2 = R * log ( Pox / Poy ) // Change o f e n t r o p y a c r o s s t h e
s h o c k i n J / kgK
ds3 = R * log ( Poy / Pot ) // Change o f e n t r o p y downstream o f
t h e s h o c k i n J / kgK
// Output
printf ( (A) Length o f t h e d u c t u p s t r e a m and
downstream o f t h e d u c t i s %3 . 3 f m and %3 . 3 f m
r e s p e c t i v e l y \n (B) Mass f l o w r a t e o f t h e g a s i s %3
. 3 f kg / s \n (C) Change o f e n t r o p y : \ n
Upstream o f
t h e s h o c k i s %3 . 2 f J / kgK\n
Across the shock
i s %3 . 3 f J / kgK\n
Downstream o f t h e s h o c k i s
%3 . 4 f J / kgK ,L1 , L2 ,m , ds1 , ds2 , ds3 )
155
Scilab code Exa 5.21 To find length across the shock properties of air at
exit and mass flow rate through the duct
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
clc
clear
// I n p u t d a t a
P1 =0.685 // I n l e t p r e s s u r e i n b a r
T1 =310 // I n l e t t e m p e r a t u r e i n K
D =0.6 // Duct d i a m e t e r i n m
M1 =3 // Mach number a t e n t r y
Mx =2.5 // Mach number u p s t r e a m o f s h o c k
M2 =0.8 // Mach number a t o u t l e t
f =0.005 // F r i c t i o n f a c t o r
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
d1 = P1 *10^5/( R * T1 ) // D e n s i t y a t i n l e t i n kg /m3
a1 = sqrt ( k * R * T1 ) // V e l o c i t y o f sound a t i n l e t i n m/ s
C1 = M1 * a1 // A i r v e l o c i t y a t i n l e t i n m/ s
A1 = %pi * D ^2/4 // I n l e t Area o f t h e d u c t i n m2
m = d1 * C1 * A1 // Mass f l o w r a t e i n kg / s
p1 =0.218 // S t a t i c t o C r i t i c a l p r e s s u r e r a t i o a t
i n l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
Pt1 = P1 / p1 // C r i t i c a l p r e s s u r e i n b a r
t1 =0.428 // S t a t i c t o C r i t i c a l t e m p e r a t u r e r a t i o a t
i n l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
Tt1 = T1 / t1 // C r i t i c a l t e m p e r a t u r e i n K
X1 =0.522 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
p2 =0.292 // R a t i o o f S t a t i c p r e s s u r e b e f o r e s h o c k t o
c r i t i c a l p r e s s u r e a t e n t r y from g a s t a b l e s ( f a n n o
f l o w , Mx, k = 1 . 4 )
156
27 Px = Pt1 * p2 // p r e s s u r e b e f o r e s h o c k i n b a r
28 t2 =0.533 // R a t i o o f S t a t i c t e m p e r a t u r e b e f o r e s h o c k
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
t o c r i t i c a l t e m p e r a t u r e a t e n t r y from g a s t a b l e s
( f a n n o f l o w , Mx, k = 1 . 4 )
Tx = Tt1 * t2 // T e m p e r a t u r e b e f o r e s h o c k i n K
Xx =0.432 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @Mx, k =1.4
X3 = X1 - Xx // O v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
parameter upstream o f duct
L1 =( X3 * D ) /(4* f ) // Length u p s t r e a m o f d u c t i n m
My =0.513 // Mach number downstream o f s h o c k from g a s
t a b l e s @Mx
p3 =7.125 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @My
Py = Px * p3 // P r e s s u r e a f t e r s h o c k i n b a r
t3 =2.138 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @My
Ty = Tx * t3 // t e m p e r a t u r e a f t e r s h o c k i n K
p4 =2.138 // R a t i o o f p r e s s u r e a f t e r s h o c k t o p r e s s u r e
a t c r i t i c a l s t a t e from g a s t a b l e s @My
Pt = Py / p4 // C r i t i c a l p r e s s u r e i n b a r
t4 =1.143 // R a t i o o f t e m p e r a t u r e a f t e r s h o c k t o
t e m p e r a t u r e a t c r i t i c a l s t a t e from g a s t a b l e s @My
Tt = Ty / t4 // C r i t i c a l t e m p e r a t u r e i n K
p5 =1.289 // R a t i o o f p r e s s u r e a t e x i t t o p r e s s u r e a t
c r i t i c a l s t a t e from g a s t a b l e s @M2
P2 = Pt * p5 // E x i t p r e s s u r e i n b a r
t5 =1.064 // R a t i o o f t e m p e r a t u r e a t e x i t t o
t e m p e r a t u r e a t c r i t i c a l s t a t e from g a s t a b l e s @M2
T2 = Tt * t5 // E x i t t e m p e r a t u r e i n K
Xy =1.069 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @My, k =1.4
X2 =0.073 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M2, k =1.4
X4 = Xy - X2 // O v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
p a r a m e t e r downstream o f d u c t
L2 =( X4 * D ) /(4* f ) // Length downstream o f d u c t i n m
157
51
52
// Output
printf ( (A) Length L1 and L2 a r e %3 . 1 f m and %3 . 2 f m
r e s p e c t i v e l y \n (B) S t a t e o f a i r a t e x i t : \ n
P r e s s u r e i s %3 . 3 f b a r \n
T e m p e r a t u r e i s %3 . 1 f K
\n (C) Mass f l o w r a t e t h r o u g h t h e d u c t i s %3 . 2 f kg
/ s ,L1 , L2 , P2 , T2 , m )
Scilab code Exa 5.22 To find properties after shock and exit and exit
Mach number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
clc
clear
// I n p u t d a t a
At =24 // T h r o a t a r e a i n cm2
A2 =50 // E x i t a r e a i n cm2
Po =700 // S t a g n a t i o n p r e s s u r e i n kPa
To =100+273 // S t a g n a t i o n t e m p e r a t u r e i n K
Ax =34 // Area b e f o r e t h e s h o c k i n cm2
Ay =34 // Area a f t e r t h e s h o c k i n cm2
// C a l c u l a t i o n
a1 = Ax / At // R a t i o o f a r e a s
Mx =1.78 // Mach number u p s t r e a m o f s h o c k from g a s
t a b l e s @a1
t1 =0.61212 // R a t i o o f t e m p e r a t u r e b e f o r e s h o c k t o
c r i t i c a l s t a t e from i s e n t r o p i c g a s t a b l e s @Mx
Tx = To * t1 // t e m p e r a t u r e b e f o r e s h o c k i n K
p1 =0.179 // R a t i o o f p r e s s u r e b e f o r e s h o c k t o
c r i t i c a l s t a t e from i s e n t r o p i c g a s t a b l e s @Mx
Px = Po * p1 // p r e s s u r e b e f o r e s h o c k i n kPa
My =0.621 // Mach number downstream o f s h o c k from g a s
t a b l e s @Mx
p2 =3.5298 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @My
158
21 Py = Px * p2 // P r e s s u r e a f t e r s h o c k i n kPa
22 t2 =1.51669 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
23
24
25
26
27
28
29
30
31
32
33
34
35
36
s h o c k from g a s t a b l e s @My
Ty = Tx * t2 // t e m p e r a t u r e a f t e r s h o c k i n K
p3 =4.578 // R a t i o o f S t a g n a t i o n p r e s s u r e a f t e r t h e
s h o c k t o s t a t i c p r e s s u r e b e f o r e s h o c k from g a s
t a b l e s @My
Po2 = Px * p3 // S t a g n a t i o n p r e s s u r e a t e x i t i n b a r
a2 =1.16565 // R a t i o o f a r e a a f t e r s h o c k t o c r i t i c a l
a r e a a c r o s s s h o c k from i s e n t r o p i c g a s t a b l e s @My
At2 = Ay / a2 // c r i t i c a l a r e a a t e x i t i n cm2
a3 = A2 / At2 // R a t i o o f a r e a s
M2 =0.36 // E x i t mach number from g a s t a b l e s ( a3 , k
=1.4 , i s e n t r o p i c )
p4 =0.914 // S t a t i c t o S t a g n a t i o n p r e s s u r e r a t i o a t
e x i t from g a s t a b l e s ( a3 , k = 1 . 4 , i s e n t r o p i c )
P2 = Po2 * p4 // S t a g n a t i o n p r e s s u r e r a t i o a t e x i t i n kPa
t3 =0.975 // S t a t i c t o S t a g n a t i o n t e m p e r a t u r e r a t i o a t
e x i t from g a s t a b l e s ( a3 , k = 1 . 4 , i s e n t r o p i c )
T2 = To * t3 // S t a g n a t i o n t e m p e r a t u r e a t e x i t i n K
// Output
printf ( (A) P r o p e r t i e s o f f l u i d j u s t a f t e r s h o c k : \ n
Mach number My=%3 . 3 f \n
T e m p e r a t u r e i s %3 . 2 f
K\n
P r e s s u r e i s %3 . 2 f kPa \n (B) E x i t mach
number i s %3 . 2 f \n (C) P r o p e r t i e s o f f l u i d a t e x i t
:\n
P r e s s u r e i s %3i kPa \n
T e m p e r a t u r e i s %3
. 3 f K ,My , Ty , Py , M2 , P2 , T2 )
Scilab code Exa 5.23 To find length diameter of pipe and properties at
pipe exit
1 clc
2 clear
3
159
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
// I n p u t d a t a
D =0.4 // Duct d i a m e t e r i n m
Po =12 // S t a g n a t i o n p r e s s u r e i n kPa
To =600 // S t a g n a t i o n t e m p e r a t u r e i n K
f =0.0025 // F r i c t i o n f a c t o r
M1 =1.8 // Mach number a t e n t r y
M2 =1 // Mach number a t o u t l e t
Mx =1.22 // Mach number u p s t r e a m o f s h o c k
// C a l c u l a t i o n s
A2 = %pi * D ^2/4 // E x i t a r e a i n cm2
p1 =0.174 // S t a t i c t o S t a g n a t i o n p r e s s u r e r a t i o a t
e n t r y from g a s t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
P1 = Po * p1 // I n l e t p r e s s u r e i n b a r
t1 =0.607 // S t a t i c t o S t a g n a t i o n t e m p e r a t u r e r a t i o a t
e n t r y from g a s t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
T1 = To * t1 // I n l e t t e m p e r a t u r e i n K
a1 =1.094 // R a t i o o f a r e a a t e x i t t o c r i t i c a l a r e a
a c r o s s s h o c k from i s e n t r o p i c g a s t a b l e s @M1, k =1.4
Ax = A2 / a1 // Area b e f o r e t h e s h o c k i n cm2
Dt = sqrt (( Ax *4) /( %pi ) ) *10^2 // Duct d i a m e t e r a t t h r o a t
i n cm
p2 =0.474 // S t a t i c t o C r i t i c a l p r e s s u r e r a t i o a t
i n l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
Pt = P1 / p2 // C r i t i c a l p r e s s u r e i n b a r
t2 =0.728 // S t a t i c t o C r i t i c a l t e m p e r a t u r e r a t i o a t
i n l e t from g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
Tt = T1 / t2 // C r i t i c a l t e m p e r a t u r e i n K
X1 =0.242 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @M1, k =1.4
p3 =0.788 // R a t i o o f S t a t i c p r e s s u r e b e f o r e s h o c k t o
c r i t i c a l p r e s s u r e a t e n t r y from g a s t a b l e s ( f a n n o
f l o w , Mx, k = 1 . 4 )
Px = Pt * p3 // p r e s s u r e b e f o r e s h o c k i n b a r
t3 =0.925 // R a t i o o f S t a t i c t e m p e r a t u r e b e f o r e s h o c k
t o c r i t i c a l t e m p e r a t u r e a t e n t r y from g a s t a b l e s
( f a n n o f l o w , Mx, k = 1 . 4 )
Tx = Tt * t3 // T e m p e r a t u r e b e f o r e s h o c k i n K
160
31 Xx =0.039 // f r i c t i o n a l
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @Mx, k =1.4
X3 = X1 - Xx // O v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
parameter upstream o f duct
L1 =( X3 * D ) /(4* f ) // Length u p s t r e a m o f d u c t i n m
My =0.83 // Mach number downstream o f s h o c k from g a s
t a b l e s @Mx
p4 =1.57 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @My
Py = Px * p4 // P r e s s u r e a f t e r s h o c k i n b a r
t4 =1.141 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @My
Ty = Tx * t4 // t e m p e r a t u r e a f t e r s h o c k i n K
p5 =1.2375 // R a t i o o f p r e s s u r e a f t e r s h o c k t o
p r e s s u r e a t c r i t i c a l s t a t e from g a s t a b l e s @My
Pt = Py / p5 // C r i t i c a l p r e s s u r e i n b a r
t5 =1.055 // R a t i o o f t e m p e r a t u r e a f t e r s h o c k t o
t e m p e r a t u r e a t c r i t i c a l s t a t e from g a s t a b l e s @My
Tt = Ty / t5 // C r i t i c a l t e m p e r a t u r e i n K
Xy =0.049 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from
g a s t a b l e s , f a n n o f l o w t a b l e s @My, k =1.4
X2 =0 // f r i c t i o n a l c o n s t a n t f a n n o p a r a m e t e r from g a s
t a b l e s , f a n n o f l o w t a b l e s @M=1 , k =1.4
X4 = Xy - X2 // O v e r a l l f r i c t i o n a l c o n s t a n t f a n n o
p a r a m e t e r downstream o f d u c t
L2 =( X4 * D ) /(4* f ) // Length downstream o f d u c t i n m
L = L1 + L2 // Length o f d u c t i n m
// Output
printf ( (A) Length o f t h e p i p e i s %3 . 2 f m\n (B)
D i a m e t e r o f t h e n o z z l e t h r o a t i s %3 . 3 f cm\n (C) At
the pipe e x i t :\ n
P r e s s u r e i s %3 . 3 f b a r \n
T e m p e r a t u r e i s %3 . 2 f K ,L , Dt , Pt , Tt )
161
Scilab code Exa 5.24 To estimate amount of heat added in two pipe section and properties
1
2
3
4
5
6
7
8
9
clc
clear
// I n p u t d a t a
Po =700 // S t a g n a t i o n p r e s s u r e i n kPa
To =500+273 // S t a g n a t i o n t e m p e r a t u r e i n K
a1 =3.5 // R a t i o o f e x i t a r e a t o t h r o a t a r e a
m =5.5 // Mass f l o w r a t e i n kg / s
Cp =1.005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n kJ / kgK
10 k =1.4 // A d i a b a t i c c o n s t a n t
11
12 // C a l c u l a t i o n
13 My =1/ sqrt ( k ) // Mach number downstream o f s h o c k
14 M2 =2.8 // Mach number a t o u t l e t from g a s t a b l e s @a1
15 t1 =0.389 // S t a t i c t o S t a g n a t i o n t e m p e r a t u r e r a t i o a t
e x i t from g a s t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
16 T2 = To * t1 // E x i t t e m p e r a t u r e i n K
17 p1 =0.0369 // S t a t i c t o S t a g n a t i o n p r e s s u r e
18
19
20
21
22
23
24
25
r a t i o at
e x i t from g a s t a b l e s (M1, k = 1 . 4 , i s e n t r o p i c )
P2 = Po * p1 // e x i t p r e s s u r e i n kPa
p2 =0.2 // R a t i o o f p r e s s u r e a t e x i t t o p r e s s u r e a t
c r i t i c a l s t a t e a t e x i t from R a y l e i g h f l o w g a s
t a b l e s @M2
Pt2 = P2 / p2 // E x i t p r e s s u r e a t c r i t i c a l s t a t e i n kPa
t2 =0.315 // R a t i o o f t e m p e r a t u r e a t e x i t t o
t e m p e r a t u r e a t c r i t i c a l s t a t e a t e x i t from
R a y l e i g h f l o w g a s t a b l e s @M2
Tt2 = T2 / t2 // E x i t t e m p e r a t u r e a t c r i t i c a l s t a t e i n K
t3 =0.674 // R a t i o o f S t a g n a t i o n t e m p e r a t u r e a t e x i t
to stagnation temperature at c r i t i c a l s t a t e at
e x i t from R a y l e i g h f l o w g a s t a b l e s @M2
Tto2 = To / t3 // E x i t s t a g n a t i o n t e m p e r a t u r e a t c r i t i c a l
state in K
Mx =1.2 // Mach number u p s t r e a m o f s h o c k from g a s
162
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
t a b l e s @My
p3 =0.796 // R a t i o o f S t a t i c p r e s s u r e b e f o r e s h o c k t o
c r i t i c a l p r e s s u r e a t e x i t from g a s t a b l e s (
R a y l e i g h f l o w , Mx, k = 1 . 4 )
Px = Pt2 * p3 // S t a t i c p r e s s u r e b e f o r e s h o c k i n kPa
t4 =0.912 // R a t i o o f S t a t i c t e m p e r a t u r e b e f o r e s h o c k
t o c r i t i c a l t e m p e r a t u r e a t e x i t from g a s t a b l e s (
R a y l e i g h f l o w , Mx, k = 1 . 4 )
Tx = Tt2 * t4 // S t a t i c t e m p e r a t u r e b e f o r e s h o c k i n K
t5 =0.978 // R a t i o o f S t a g n a t i o n t e m p e r a t u r e b e f o r e
shock to c r i t i c a l Stagnation temperature at e x i t
from g a s t a b l e s ( R a y l e i g h f l o w , Mx, k = 1 . 4 )
Tox = Tto2 * t5 // S t a g n a t i o n t e m p e r a t u r e b e f o r e s h o c k i n
K
p4 =1.513 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @Mx
Py = Px * p4 // P r e s s u r e a f t e r s h o c k i n kPa
t6 =1.128 // T e m p e r a t u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @Mx
Ty = Tx * t6 // t e m p e r a t u r e a f t e r s h o c k i n K
t7 =0.875 // R a t i o o f T e m p e r a t u r e a f t e r t h e s h o c k t o
S t a g n a t i o n t e m p e r a t u r e a f t e r s h o c k from g a s
t a b l e s @Mx
Toy = Ty / t7 // S t a g n a t i o n t e m p e r a t u r e a f t e r s h o c k i n K,
p5 =1.207 // R a t i o o f p r e s s u r e a f t e r s h o c k t o p r e s s u r e
a t c r i t i c a l s t a t e from g a s t a b l e s @My
Pt = Py / p5 // C r i t i c a l p r e s s u r e i n kPa
t8 =1.028 // R a t i o o f t e m p e r a t u r e a f t e r s h o c k t o
t e m p e r a t u r e a t c r i t i c a l s t a t e from g a s t a b l e s @My
Tt = Ty / t8 // C r i t i c a l t e m p e r a t u r e i n K
t9 =0.978 // R a t i o o f S t a g n a t i o n t e m p e r a t u r e a f t e r
shock to Stagnation temperature at c r i t i c a l s t a t e
from g a s t a b l e s @My
Tot = Toy / t9 // S t a g n a t i o n t e m p e r a t u r e a t c r i t i c a l
s t a t e i n K, c a l c u l a t i o n m i s t a k e i n t e x t b b o k
q1 = Cp *( Tox - To ) // Amount o f h e a t added i n u p s t r e a m o f
s h o c k i n kJ / s
q2 = Cp *( Tot - Toy ) // Amount o f h e a t added i n downstream
163
o f s h o c k i n kJ / s
46 Q = m *( q1 + q2 ) // Amount o f h e a t added i n two p i p e
s e c t i o n i n kJ / s
47
48
49
// Output
printf ( (A) Amount o f h e a t added i n two p i p e s e c t i o n
i s %3 . 2 f kJ / s \n (B) P r o p e r t i e s : \ n Upstream o f
shock :\ n
P r e s s u r e i s %3 . 1 f kPa \n
T e m p e r a t u r e i s %3 . 3 f K\n
Stagnation
t e m p e r a t u r e i s %3 . 2 f K\n
Mach number i s %3 . 1 f \
n Downstream o f s h o c k : \ n
P r e s s u r e i s %3 . 3 f kPa
\n
T e m p e r a t u r e i s %3 . 3 f K\n
Stagnation
t e m p e r a t u r e i s %3 . 1 f K\n
Mach number i s %3 . 3 f \
n At t h e t h r o a t : \ n
P r e s s u r e i s %3 . 2 f kPa \n
T e m p e r a t u r e i s %3 . 3 f K\n
Stagnation
t e m p e r a t u r e i s %3 . 2 f K\n At t h e e x i t : \ n
P r e s s u r e i s %3 . 2 f kPa \n
T e m p e r a t u r e i s %3 . 2 f K
\n
Mach number i s %3 . 2 f ,Q , Px , Tx , Tox , Mx , Py , Ty ,
Toy , My , Pt , Tt , Tot , P2 , T2 , M2 )
Scilab code Exa 5.25 To find deflection angle Downstream Mach number
Static pressure and total pressure loss through the shock
1
2
3
4
5
6
7
8
9
10
11
12
clc
clear
// I n p u t d a t a
M1 =2.8 // I n l e t mach number
sig =42 // Shock wave a n g l e i n d e g r e e
Px =1 // P r e s s u r e u p s t r e a m o f s h o c k i n b a r ( Assuming )
k =1.4 // A d i a b a t i c c o n s t a n t
// C a l c u l a t i o n s
Mx = M1 * sind ( sig ) // Mach number b e f o r e t h e s h o c k
My =0.601 // Mach number a f t e r t h e s h o c k from g a s
164
13
14
15
16
17
18
19
20
21
22
23
24
t a b l e s @Mx
p1 =3.98 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e t h e
s h o c k from g a s t a b l e s @Mx
Py = Px * p1 // P r e s s u r e a f t e r s h o c k i n b a r
p2 =4.994 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k t o S t a t i c
p r e s s u r e b e f o r e s h o c k from g a s t a b l e s @Mx
Poy = Px * p2 // S t a g n a t i o n p r e s s u r e a f t e r s h o c k i n b a r
p3 =0.788 // S t a g n a t i o n p r e s s u r e r a t i o a f t e r and
b e f o r e t h e s h o c k from g a s t a b l e s @Mx
Pox = Poy / p3 // S t a g n a t i o n p r e s s u r e b e f o r e s h o c k i n kPa
dPl = Pox - Poy // T o t a l p r e s s u r e l o s s i n b a r
def = atand ((( M1 ^2* sind (2* sig ) ) -(2/ tand ( sig ) ) ) /(2+( M1
^2*( k + cosd (2* sig ) ) ) ) ) // D e f l e c t i o n a n g l e i n
degree
M2 = My /( sind ( sig - def ) ) // Downstream mach number
// Output
printf ( (A) D e f l e c t i o n a n g l e i s %3i d e g r e e \n (B)
Downstream mach number i s %3 . 3 f \n (C) S t a t i c
p r e s s u r e i s %3 . 3 f b a r \n (D) T o t a l p r e s s u r e l o s s i s
%3 . 3 f b a r ,def , M2 , Py , dPl )
clc
clear
// I n p u t d a t a
M1 =2 // I n l e t mach number
sig =40 // Shock wave a n g l e i n d e g r e e
Px =0.5 // P r e s s u r e u p s t r e a m o f s h o c k i n b a r
Tx =273 // T e m p e r a t u r e u p s t r e a m o f s h o c k i n K
k =1.4 // A d i a b a t i c c o n s t a n t
165
11 // C a l c u l a t i o n
12 Mx = M1 * sind ( sig ) // Mach number b e f o r e t h e s h o c k
13 My =0.796 // Mach number a f t e r t h e s h o c k from g a s
t a b l e s @Mx
14 p1 =1.745 // S t a t i c
15
16
17
18
19
20
21
22
p r e s s u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @Mx
Py = p1 * Px // P r e s s u r e a f t e r s h o c k i n b a r
t1 =1.178 // S t a t i c t e m p e r a t u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @Mx
Ty = Tx * t1 // T e m p e r a t u r e a f t e r s h o c k i n K
Ws = atand ((( M1 ^2* sind (2* sig ) ) -(2/ tand ( sig ) ) ) /(2+( M1
^2*( k + cosd (2* sig ) ) ) ) ) // Wedge s e m i a n g l e i n
degree
W =2* Ws // Wedge a n g l e i n d e g r e e
// Output
printf ( (A) S t a t i c p r e s s u r e i s %3 . 4 f b a r \n (B)
T e m p e r a t u r e b e h i n d t h e wave i s %3 . 2 f K\n (C) Mach
number o f f l o w p a s s i n g o v e r wedge i s %3 . 3 f \n (D)
Wedge a n g l e i s %3 . 2 f d e g r e e ,Py , Ty , Mx , W )
Scilab code Exa 5.27 To find property ratios at strong and weak shock at
wedge
1
2
3
4
5
6
7
8
9
10
clc
clear
// I n p u t d a t a
def =15
M1 =2
k =1.4
// C a l c u l a t i o n
// U s i n g r e l a t i o n d e f=a t a n d ( ( ( M12 s i n d ( 2 s i g ) ) (2/
t a n d ( s i g ) ) ) /(2+(M1 2 ( k+c o s d ( 2 s i g ) ) ) ) ) and
166
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
c o n v e r t i n g i n t o 6 th d e g r e e p ol yn o mi al o f s i n d ( s i g
)=x
C =((2* tand ( def ) ) +(( M1 ^2) * k * tand ( def ) ) +(( M1 ^2) * tand (
def ) ) ) // C o n s t a n t v a l u e f o r c o n v e n i e n c e
D =(2* M1 ^2* tand ( def ) ) // C o n s t a n t v a l u e f o r
convenience
a =4 // V a l u e o f c o n s t a n t i n p o l y n o m i a l
b =0 // C o e f f i c i e n t o f power 1 i . e . x 1
c =(4+ C ^2+(8* M1 ^2) ) // C o e f f i c i e n t o f power 2 i . e . x 2
d =0 // C o e f f i c i e n t o f power 3 i . e . x 3
e =(4*( M1 ^4) ) +(2* C * D ) +(8* M1 ^2) // C o e f f i c i e n t o f power
4 i . e . x 4
f =0 // C o e f f i c i e n t o f power 5 i . e . x 5
g =(4* M1 ^4) + D ^2 // C o e f f i c i e n t o f power 6 i . e . x 6
p4 = poly ([ a b -c -d e f -g ] , x , c ) // E x p r e s s i o n f o r
s o l v i n g 6 th d e g r e e polynomial
disp ( V a l u e s f o r s i n e o f wave a n g l e a r e : \ n )
disp ( roots ( p4 ) )
sig1 = asind (0.9842) // S t r o n g s h o c k wave a n g l e i n
d e g r e e , n e a r e r t o 90 d e g r e e
sig2 = asind (0.7113) //Weak s h o c k wave a n g l e i n d e g r e e
, n e a r e r t o 45 d e g r e e
// ( a ) S t r o n g Shock Wave
Mx_1 = M1 * sind ( sig1 ) // Mach number b e f o r e t h e s h o c k o f
s t o n g s h o c k wave
My_1 =0.584 // Mach number a f t e r t h e s h o c k from g a s
t a b l e s @Mx 1
p1 =4.315 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @Mx 1
t1 =1.656 // S t a t i c t e m p e r a t u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @Mx 1
d1 = p1 / t1 // D e n s i t y r a t i o a f t e r and b e f o r e t h e s h o c k
o f s t o n g s h o c k wave
M2_1 = My_1 /( sind ( sig1 - def ) ) // E x i t mach number o f
s t o n g s h o c k wave
Mx_2 = M1 * sind ( sig2 ) // Mach number b e f o r e t h e s h o c k o f
weak s h o c k wave
My_2 =0.731 // Mach number a f t e r t h e s h o c k from g a s
167
34
35
36
37
38
39
40
t a b l e s @Mx 2
p2 =2.186 // S t a t i c p r e s s u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @Mx 2
t2 =1.267 // S t a t i c t e m p e r a t u r e r a t i o a f t e r and b e f o r e
t h e s h o c k from g a s t a b l e s @Mx 2
d2 = p2 / t2 // D e n s i t y r a t i o a f t e r and b e f o r e t h e s h o c k
o f weak s h o c k wave
M2_2 = My_2 /( sind ( sig2 - def ) ) // E x i t mach number o f
weak s h o c k wave
// Output
printf ( \ n S t r o n g Shock Wave : \ n
(A) Wave a n g l e i s
%3 . 1 f d e g r e e \n
(B) P r e s s u r e r a t i o i s %3 . 3 f \n
(C) D e n s i t y r a t i o i s %3 . 3 f \n
(D) T e m p e r a t u r e
r a t i o i s %3 . 3 f \n
(E) Downstream Mach number i s
%3 . 3 f \n Weak Shock Wave : \ n
(A) Wave a n g l e i s %3
. 1 f d e g r e e \n
(B) P r e s s u r e r a t i o i s %3 . 3 f \n
(
C) D e n s i t y r a t i o i s %3 . 3 f \n
(D) T e m p e r a t u r e
r a t i o i s %3 . 3 f \n
(E) Downstream Mach number i s
%3 . 3 f , sig1 , p1 , d1 , t1 , M2_1 , sig2 , p2 , d2 , t2 , M2_2 )
Scilab code Exa 5.28 To find deflection angle final Mach number and temperature of gas
1
2
3
4
5
6
7
8
9
10
11
clc
clear
// I n p u t d a t a
k =1.3 // A d i a b a t i c c o n s t a n t
P1 =0.345 // I n l e t p r e s s u r e i n b a r
T1 =350 // I n l e t t e m p e r a t u r e i n K
M1 =1.5 // I n l e t mach number
P2 =0.138 // E x i t p r e s s u r e i n b a r
// C a l c u l a t i o n
168
12 p1 =0.284 // P r e s s u r e
r a t i o a t e n t r y from g a s t a b l e s
@M1, k =1.3
13 Po = P1 / p1 // S t a g n a t i o n P r e s s u r e i n b a r
14 t1 =0.748 // T e m p e r a t u r e r a t i o a t e n t r y from g a s
15
16
17
18
19
20
21
22
23
24
25
t a b l e s @M1, k =1.3
To = T1 / t1 // S t a g n a t i o n t e m p e r a t u r e i n K
p2 = P2 / Po // P r e s s u r e r a t i o
M2 =2.08 // F i n a l Mach number from i s e n t r o p i c g a s
t a b l e s @p2
t2 =0.606 // T e m p e r a t u r e r a t i o a t e x i t from g a s t a b l e s
@M2, k =1.3
T2 = To * t2 // The t e m p e r a t u r e o f t h e g a s i n K
w1 =12.693 // P r a n d t l Merger f u n c t i o n a t M1
w2 =31.12 // P r a n d t l Merger f u n c t i o n a t M2
def = w2 - w1 // D e f l e c t i o n A n g l e i n d e g r e e
// Output
printf ( (A) D e f l e c t i o n A n g l e i s %3 . 3 f d e g r e e \n (B)
F i n a l Mach number i s %3 . 2 f \n (C) The t e m p e r a t u r e
o f t h e g a s i s %3 . 3 f K ,def , M2 , T2 )
169
Chapter 6
Aircraft Propulsion
Scilab code Exa 6.1 To calculate thrust and specific thrust of jet propulsion
1 clc
2 clear
3
4 // I n p u t d a t a
5 eff_com =0.8 // C o m p r e s s o r e f f i c i e n c y
6 eff_t =0.85 // T u r b i n e e f f i c i e n c y
7 pr =4 // P r e s s u r e r a t i o i n c l u d i n g c o m b u s t i o n p r e s s u r e
8
9
10
11
12
13
14
15
16
l o s s ( Po2s / Po1 )
eff_c =0.98 // Combustion e f f i c i e n c y
eff_m =0.99 // M e c h a n i c a l t r a n s m i s s i o n e f f i c i e n c y
eff_n =0.9 // N o z z l e e f f i c i e n c y
Tmax =1000 //Maximum c y c l e t e m p e r a t u r e i n K
To3 = Tmax // S t a g n a t i o n t e m p e r a t u r e b e f o r e t u r b i n e
i n l e t in K
w =220 // mass f l o w r a t e i n N/ s
Cp_air =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
k =1.4 // A d i a b a t i c c o n s t a n t f o r a i r
Cp_gas =1153 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
170
17 k_gas =1.3 // A d i a b a t i c c o n s t a n t
18 To1 =15+273 // I n l e t S t a g n a t i o n t e m p e r a t u r e o f
compressor in K
19 Po1 =1 // I n l e t S t a g n a t i o n p r e s s u r e i n b a r
20 Poe = Po1 // E x i t s t a g n a t i o n p r e s s u r e i n bar , S i n c e
e x i t at ambient c o n d i t i o n s
21 g =9.81 // A c c e l e r a t i o n due t o g r a v i t y i n m/ s 2
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// C a l c u l a t i o n
To2s = To1 *( pr ) ^(( k -1) / k ) // E x i t S t a g n a t i o n
temperature of compressor at i s e n t r o p i c p rocess
in K
To2 =(( To2s - To1 ) / eff_com ) + To1 // E x i t S t a g n a t i o n
temperature of compressor in K
Wc =( Cp_air *( To2 - To1 ) ) // Work g i v e n t o c o m p r e s s o r i n
J / kg , Cp i n J / kgK
To4 = To3 -( Wc / Cp_gas * eff_m ) // E x i t S t a g n a t i o n
temperature of turbine in K
To4s = To3 -(( To3 - To4 ) / eff_t ) // E x i t S t a g n a t i o n
temperature of turbine at i s e n t r o p i c proce ss in K
Po2 = Po1 * pr // E x i t S t a g n a t i o n p r e s s u r e o f c o m p r e s s o r
in bar
Po3 = Po2 // E x i t S t a g n a t i o n p r e s s u r e o f c o m b u s t i o n
chamber i n bar , S i n c e t h e p r o c e s s t a k e s p l a c e a t
constant pressure process
p1 =( To3 / To4s ) ^( k_gas /( k_gas -1) ) // S t a g n a t i o n
P r e s s u r e r a t i o o f i n l e t and o u t l e t o f t u r b i n e
Po4s = Po3 / p1 // S t a g n a t i o n P r e s s u r e a t o u t l e t o f
t u r b i n e at i s e n t r o p i c p r o c e s s in bar
pr_n = Po4s / Poe // P r e s s u r e r a t i o o f n o z z l e
Toes = To4 /(( pr_n ) ^(( k_gas -1) / k_gas ) ) // E x i t
Stagnation temperature of nozzle at i s e n t r o p i c
process in K
Toe = To4 -(( To4 - Toes ) * eff_n ) // E x i t S t a g n a t i o n
temperature of nozzle in K
Cj = sqrt (2* Cp_gas *( To4 - Toe ) ) // J e t v e l o c i t y i n m/ s
m = w / g // Mass f l o w r a t e o f a i r i n kg / s
F = m * Cj *10^ -3 // T h r u s t i n kN
171
39 Fs =( F *10^3) / m
// S p e c i f i c t h r u s t i n Ns / kg , F i n N
40 Is = F / w // S p e c i f i c i m p u l s e i n s e c
41
42 // Output
43 printf ( (A) T h r u s t i s %3 . 3 f kN\n (B) S p e c i f i c t h r u s t
i s %3 . 2 f Ns / kg ,F , Fs )
Scilab code Exa 6.2 To find thrust developed thrust power and propulsive
efficiency
1
2
3
4
5
6
7
8
9
10
clc
clear
// I n p u t d a t a
u =800*(5/18) // F l i g h t v e l o c i t y i n m/ s
Pe =60 // Ambient p r e s s u r e i n kPa
Pn =300 // P r e s s u r e e n t e r i n g n o z z l e i n kPa
Tn =200+273 // T e m p e r a t u r e e n t e r i n g n o z z l e i n K
m =20 // Mass f l o w r a t e o f a i r i n kg / s
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e i n J / kgK
11 k =1.4 // A d i a b a t i c c o n s t a n t f o r a i r
12
13 // C a l c u l a t i o n
14 Te = Tn *( Pe / Pn ) ^(( k -1) / k ) // E x i t t e m p e r a t u r e o f
15
16
17
18
19
20
21
22
nozzle
in K
Cj = sqrt (2* Cp *( Tn - Te ) ) // J e t v e l o c i t y i n m/ s
F = m *( Cj - u ) // T h r u s t i n N
P = F * u *10^ -3 // T h r u s t power i n kW
eff =((2* u ) /( Cj + u ) ) *100 // P r o p u l s i v e e f f i c i e n c y i n
percent
// Output
printf ( (A) T h r u s t d e v e l o p e d i s %3 . 1 f N\n (B) T h r u s t
172
d e v e l o p e d i s %3 . 2 f kW\n (C) P r o p u l s i v e e f f i c i e n c y
i s %3 . 3 f p e r c e n t ,F ,P , eff )
Scilab code Exa 6.3 To determine specific thrust and thrust specific fuel
consumption for turbojet engine
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
clc
clear
// I n p u t d a t a
Mi =0.8 // I n l e t mach number
h =10000 // A l t i t u d e i n m
pr_c =8 // P r e s s u r e r a t i o o f c o m p r e s s o r
To3 =1200 // S t a g n a t i o n t e m p e r a t u r e a t t u r b i n e i n l e t
in K
eff_c =0.87 // C o m p r e s s o r e f f i c i e n c y
eff_t =0.9 // T u r b i n e e f f i c i e n c y
eff_d =0.93 // D i f f u s e r e f f i c i e n c y
eff_n =0.95 // N o z z l e e f f i c i e n c y
eff_m =0.99 // M e c h a n i c a l t r a n s m i s s i o n e f f i c i e n c y
eff_cc =0.98 // Combustion e f f i c i e n c y
pl =0.04 // R a t i o o f c o m b u s t i o n p r e s s u r e l o s s t o
compressor d e l i v e r y pressure
k =1.4 // A d i a b a t i c c o n s t a n t o f a i r
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
k_g =1.33 // A d i a b a t i c c o n s t a n t o f g a s
Cp_a =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e o f a i r i n J / kgK
Cp_g =1100 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e o f g a s i n J / kgK
CV =43000000 // C a l o r i f i c v a l u e i n J / kg ( Assume )
21
22
23 // C a l c u l a t i o n
24 Ti =223.15 // I n l e t t e m p e r a t u r e i n K from g a s t a b l e s
25 Pi =26.4 // I n l e t p r e s s u r e i n kPa from g a s t a b l e s
173
26 ai = sqrt ( k * R * Ti ) // Sound v e l o c i t y i n m/ s
27 Ci = ai * Mi // V e l o c i t y o f a i r i n m/ s ,
28 u = Ci // F l i g h t v e l o c i t y i n m/ s , S i n c e i t
is reaction
f o r c e o f Ci
29 t1 =0.886 // R a t i o o f
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
s t a t i c to stagnation temperature
a e n t r y from g a s t a b l e s a t M=0.8
To1s = Ti / t1 // S t a g n a t i o n t e m p e r a t u r e a t i n l e t o f
compressor at i s e n t r o p i c proce ss in K
To1 =(( To1s - Ti ) / eff_d ) + Ti // S t a g n a t i o n t e m p e r a t u r e a t
i n l e t of compressor in K
p1 =( To1s / Ti ) ^( k /( k -1) ) // P r e s s u r e r a t i o i . e . ( Po1s /
Pi )
Po1s = Pi * p1 // i n l e t S t a g n a t i o n p r e s s u r e o f c o m p r e s s o r
a t i s e n t r o p i c p r o c e s s i n kPa
Po1 = Po1s // I n l e t S t a g n a t i o n p r e s s u r e o f c o m p r e s s o r
i n kPa
Po2 = pr_c * Po1 // E x i t S t a g n a t i o n p r e s s u r e o f
c o m p r e s s o r i n kPa
To2s = To1s *( Po2 / Po1 ) ^(( k -1) / k ) // E x i t S t a g n a t i o n
temperature of compressor at i s e n t r o p i c p rocess
in K
To2 =(( To2s - To1 ) / eff_c ) + To1 // E x i t S t a g n a t i o n
temperature of compressor in K
P_los = pl * Po2 // c o m b u s t i o n p r e s s u r e l o s s i n kPa
Po3 = Po2 - P_los // E x i t S t a g n a t i o n p r e s s u r e o f
c o m b u s t i o n chamber i n kPa
To4 = To3 -(( Cp_a *( To2 - To1 ) ) /( eff_m * Cp_g ) ) // E x i t
Stagnation temperature of turbine in K
To4s = To3 -(( To3 - To4 ) / eff_t ) // E x i t S t a g n a t i o n
temperature of turbine at i s e n t r o p i c proce ss in K
p1 =( To3 / To4s ) ^( k_g /( k_g -1) ) // P r e s s u r e r a t i o i . e . (
Po3 / Po4s )
Po4s = Po3 / p1 // S t a g n a t i o n P r e s s u r e a t o u t l e t o f
t u r b i n e a t i s e n t r o p i c p r o c e s s i n kPa
Poe = Pi // E x i t s t a g n a t i o n p r e s s u r e i n kPa , S i n c e e x i t
i s at ambient c o n d i t i o n s
pr_n = Po4s / Poe // P r e s s u r e r a t i o o f n o z z l e
Toes = To4 /(( pr_n ) ^(( k_g -1) / k_g ) ) // E x i t S t a g n a t i o n
174
47
48
49
50
51
52
53
54
Scilab code Exa 6.4 To estimate properties at exit and propulsive efficiency of a turbojet aircraft
1
2
3
4
5
6
7
8
9
10
11
12
clc
clear
// I n p u t d a t a
u =300 // F l i g h t v e l o c i t y i n m/ s
Pi =35 // I n l e t p r e s s u r e i n kPa
Ti = -40+273 // I n l e t t e m p e r a t u r e i n K
pr_c =10 // P r e s s u r e r a t i o o f c o m p r e s s o r
T3 =1100+273 // I n l e t t u r b i n e t e m p e r a t u r e i n K
m =50 // Mass f l o w r a t e o f a i r i n kg / s
k =1.4 // A d i a b a t i c c o n s t a n t o f a i r
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e o f a i r i n J / kgK
13 R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
14
15 // C a l c u l a t i o n
16 ai = sqrt ( k * R * Ti ) // Sound v e l o c i t y
175
a t d i f f u s e r i n m/ s
17 C1 = u // V e l o c i t y
o f a i r i n m/ s , S i n c e i t
is reaction
force of u
18 T1 = Ti +( C1 ^2/(2* Cp ) ) // T e m p e r a t u r e a t
i n l e t of
compressor in K
19 P1 = Pi *(( T1 / Ti ) ^( k /( k -1) ) ) // I n l e t
20
21
22
23
24
25
26
27
28
29
30
31
32
33
pressure of
c o m p r e s s o r i n kPa
P2 = pr_c * P1 // E x i t p r e s s u r e o f c o m p r e s s o r i n kPa
P3 = P2 // E x i t p r e s s u r e o f c o m b u s t i o n chamber i n kPa ,
Since the p r o c e s s takes place at constant
pressure process
T2 = T1 *( P2 / P1 ) ^(( k -1) / k ) // E x i t t e m p e r a t u r e o f
compressor in K
T4 = T3 -( T2 - T1 ) // E x i t t e m p e r a t u r e o f t u r b i n e i n K
P4 = P3 /(( T3 / T4 ) ^( k /( k -1) ) ) // P r e s s u r e a t o u t l e t o f
t u r b i n e i n kPa
Pe = Pi // E x i t p r e s s u r e i n kPa , S i n c e e x i t i s a t
ambient c o n d i t i o n s
pr_n = P4 / Pe // P r e s s u r e r a t i o o f n o z z l e
Te = T4 /(( pr_n ) ^(( k -1) / k ) ) // E x i t t e m p e r a t u r e o f
nozzle in K
Cj = sqrt (2* Cp *( T4 - Te ) ) // J e t v e l o c i t y i n m/ s
sig = u / Cj // J e t s p e e d r a t i o
eff_prop =((2* sig ) /(1+ sig ) ) *100 // P r o p u l s i v e
e f f i c i e n c y of the c y c l e in %
// Output
printf ( (A) T e m p e r a t u r e and p r e s s u r e o f g a s e s a t
t u r b i n e e x i t i s %3 . 2 f K and %3i kPa \n (B) V e l o c i t y
o f g a s e s i s %3 . 2 f m/ s \n (C) P r o p u l s i v e e f f i c i e n c y
o f t h e c y c l e i s %3 . 2 f p e r c e n t ,T4 , P4 , Cj , eff_prop
)
Scilab code Exa 6.5 To calculate absolute velocity drag overall and turbine efficiency of jet
176
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
clc
clear
// I n p u t d a t a
n =2 // Number o f j e t s
D =0.25 // D i a m e t e r o f t u r b o j e t i n m
P =3000 // Net power a t t u r b o j e t i n W
mf_kWh =0.42 // F u e l c o n s u m p t i o n i n kg /kWh
CV =49000 // C a l o r i f i c v a l u e i n kJ / kg
u =300 // F l i g h t v e l o c i t y i n m/ s
d =0.168 // D e n s i t y i n kg /m3
AFR =53 // A i r f u e l r a t i o
// C a l c u l a t i o o n
mf = mf_kWh * P /3600 // Mass f l o w r a t e o f f u e l i n kg / s
ma = AFR * mf // Mass f l o w r a t e o f a i r i n kg / s
m = ma + mf // Mass f l o w r a t e o f g a s i n kg / s
Q = m / d // Volume f l o w r a t e i n m3/ s
Cj =( Q *4) /(2* %pi * D ^2) // J e t v e l o c i t y i n m/ s
Ca = Cj - u // A b s o l u t e J e t v e l o c i t y i n m/ s
F =(( m * Cj ) -( ma * u ) ) *10^ -3 // T h r u s t i n kN
eff =(( F * u ) /( mf * CV ) ) *100 // O v e r a l l e f f i c i e n c y i n %
eff_prop =((2* u ) /( Cj + u ) ) *100 // P r o p u l s i v e e f f i c i e n c y
of the c y c l e in %
24 eff_ther =( eff / eff_prop ) *100 // E f f i c i e n c y o f t u r b i n e
in %
25
26
27
// Output
printf ( (A) A b s o l u t e v e l o c i t y o f j e t i s %3 . 3 f m/ s \n (
B) R e s i s t a n c e o f t h e p l a n e i s %3 . 4 f kN\n (C)
O v e r a l l e f f i c i e n c y i s %3 . 2 f p e r c e n t \n (D)
E f f i c i e n c y o f t u r b i n e i s %3 . 3 f p e r c e n t ,Ca ,F , eff ,
eff_ther )
177
Scilab code Exa 6.6 To Calculate propulsive and thrust power total fuel
consumption and propulsive thermal and overall efficiency
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
clc
clear
// I n p u t d a t a
u =900*(5/18) // F l i g h t v e l o c i t y i n m/ s
ma =3000/60 // Mass f l o w r a t e o f a i r i n kg / s
dh =200 // E n t h a l p y d r o p o f n o z z l e i n kJ / kg
eff_n =0.9 // N o z z l e e f f i c i e n c y
AFR =85 // A i r f u e l r a t i o
eff_cc =0.95 // Combustion e f f i c i e n c y
CV =42000 // C a l o r i f i c v a l u e i n kJ / kg
// C a l c u l a t i o n
mf = ma / AFR // Mass f l o w r a t e o f f u e l i n kg / s
m = ma + mf // Mass f l o w r a t e o f g a s i n kg / s
Cj = sqrt (2* eff_n * dh *10^3) // J e t v e l o c i t y i n m/ s
sig = u / Cj // J e t s p e e d r a t i o
F =(( m * Cj ) -( ma * u ) ) *10^ -3 // T h r u s t i n kN
Pt = F * u // T h r u s t power i n kW
Pp =0.5*(( m * Cj ^2) -( ma * u ^2) ) *10^ -3 // P r o p u l s i v e power
i n kW
HS = eff_cc * mf * CV // Heat s u p p l i e d i n kW
eff_ther =( Pp / HS ) *100 // E f f i c i e n c y o f t u r b i n e i n %
eff_prop =( Pt / Pp ) *100 // P r o p u l s i v e e f f i c i e n c y o f t h e
cycle in %
eff =( Pt / HS ) *100 // O v e r a l l e f f i c i e n c y i n %
// Output
printf ( (A) P r o p u l s i v e power i s %3 . 2 f kW\n (B) T h r u s t
power i s %3 . 1 f kW\n (C) P r o p u l s i v e e f f i c i e n c y i s
%3 . 3 f p e r c e n t \n (D) Thermal e f f i c i e n c y i s %3 . 2 f
p e r c e n t \n (E) T o t a l f u e l c o n s u m p t i o n i s %3 . 3 f kg / s
\n ( F ) O v e r a l l e f f i c i e n c y i s %3 . 3 f p e r c e n t ,Pp , Pt ,
eff_prop , eff_ther , mf , eff )
178
Scilab code Exa 6.7 To find specific thrust jet velocity TSFC and propulsive thermal and overall efficiency
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
clc
clear
// I n p u t d a t a
M =0.8 // Mach number
CV =42800 // C a l o r i f i c v a l u e i n kJ / kg
h =10 // A l t i t u d e i n km
F =50 // T h r u s t i n kN
ma =45 // Mass f l o w r a t e o f a i r i n kg / s
mf =2.65 // Mass f l o w r a t e o f f u e l i n kg / s
// C a l c u l a t i o n
m = ma + mf // Mass f l o w r a t e o f g a s i n kg / s
a =299.6 // Sound v e l o c i t y i n m/ s , from g a s t a b l e s
T =233.15 // I n l e t t e m p e r a t u r e i n K
u = a * M // F l i g h t v e l o c i t y i n m/ s
Cj =(( F *10^3) +( ma * u ) ) / m // J e t v e l o c i t y i n m/ s
sig = u / Cj // J e t s p e e d r a t i o
Fs = F *10^3/ m // S p e c i f i c t h r u s t i n Ns / kg , F i n N
TSFC = mf *3600/( F *10^3) // T h r u s t s p e c i f i c f u e l
c o n s u m p t i o n i n kg /Nhr , F i n N
Pt = F * u // T h r u s t power i n kW
Pp =0.5*(( m * Cj ^2) -( ma * u ^2) ) *10^ -3 // P r o p u l s i v e power
i n kW
HS = mf * CV // Heat s u p p l i e d i n kW
eff_ther =( Pp / HS ) *100 // E f f i c i e n c y o f t u r b i n e i n %
eff_prop =( Pt / Pp ) *100 // P r o p u l s i v e e f f i c i e n c y o f t h e
cycle in %
eff =( Pt / HS ) *100 // O v e r a l l e f f i c i e n c y i n %
// Output
179
29
Scilab code Exa 6.8 To calculate fuel air and pressure ratios and Mach
number of jet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
clc
clear
// I n p u t d a t a
Mi =0.8 // I n l e t mach number
h =10 // A l t i t u d e i n km
To3 =1200 // S t a g n a t i o n t e m p e r a t u r e b e f o r e t u r b i n e
i n l e t in K
dTc =175 // S t a g n a t i o n t e m p e r a t u r e r i s e t h r o u g h t h e
compressor in K
CV =43000 // C a l o r i f i c v a l u e i n kJ / kg
eff_c =0.75 // C o m p r e s s o r e f f i c i e n c y
eff_cc =0.75 // Combustion e f f i c i e n c y
eff_t =0.81 // T u r b i n e e f f i c i e n c y
eff_m =0.98 // M e c h a n i c a l t r a n s m i s s i o n e f f i c i e n c y
eff_n =0.97 // N o z z l e e f f i c i e n c y
Is =25 // S p e c i f i c i m p u l s e i n s e c
k =1.4 // A d i a b a t i c c o n s t a n t o f a i r
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e o f a i r i n J / kgK
g =9.81 // A c c e l e r a t i o n due t o g r a v i t y i n m/ s 2
19
20
21 // C a l c u l a t i o n
22 Ti =223.15 // I n l e t
t e m p e r a t u r e i n K from g a s t a b l e s
180
23 ai = sqrt ( k * R * Ti ) // Sound v e l o c i t y i n m/ s
24 Toi =(1+((0.5*( k -1) * Mi ^2) ) ) * Ti // S t a g n a t i o n
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
temperature at d i f f u s e r i n l e t in K
To1 = Toi // I n l e t S t a g n a t i o n t e m p e r a t u r e o f c o m p r e s s o r
i n K, s i n c e h o i=ho1
To2 = dTc + To1 // E x i t S t a g n a t i o n t e m p e r a t u r e o f
compressor in K
pr_c =(1+( eff_c *(( To2 - To1 ) / To1 ) ) ) ^( k /( k -1) ) //
Compressor p r e s s u r e r a t i o
f =(( Cp * To3 ) -( Cp * To2 ) ) /(( eff_cc * CV *10^3) -( Cp * To3 ) ) //
Fuel a i r r a t i o , c a l c u l a t i o n m i s t a k e i n t e x t b o o k
dTt = dTc /( eff_m *(1+ f ) ) // T e m p e r a t u r e d i f f e r e n c e
across turbine
pr_t =1/((1 -( dTt /( To3 * eff_t ) ) ) ^( k /( k -1) ) ) // T u r b i n e
pressure ratio
To4 = To3 - dTc // E x i t S t a g n a t i o n t e m p e r a t u r e o f t u r b i n e
in K
u = ai * Mi // F l i g h t v e l o c i t y i n m/ s
sig =1/((( Is * g ) / u ) +1) // J e t s p e e d r a t i o
Ce = u / sig // E x i t v e l o c i t y i n m/ s
Cj = Ce // J e t v e l o c i t y i n m/ s , S i n c e Cj i s due t o e x i t
velociy
Te = To4 -( Ce ^2/(2* Cp ) ) // E x i t t e m p e r a t u r e i n K
Tes = To4 -(( To4 - Te ) * eff_n ) // E x i t t e m p e r a t u r e i n K, (
At i s e n t r o p i c p r o c e s s )
pr_n =( To4 / Te ) ^( k /( k -1) ) // N o z z l e p r e s s u r e r a t i o
ae = sqrt ( k * R * Te ) // E x i t Sound v e l o c i t y i n m/ s
Me = Ce / ae // E x i t mach number
printf ( (A) Fuel a i r r a t i o i s %3 . 5 f \n (B) Compressor ,
t u r b i n e , n o z z l e p r e s s u r e r a t i o a r e %3 . 3 f , %3 . 3 f ,
%3 . 2 f r e s p e c t i v e l y \n (C) Mach number a t e x h a u s t
j e t i s %3 . 3 f ,f , pr_c , pr_t , pr_n , Me )
181
Scilab code Exa 6.9 To determine air flow rate thrust power thrust produced specific thrust and specific impulse
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
clc
clear
// I n p u t d a t a
D =2.5 // D i a m e t e r i n m
u =500*(5/18) // F l i g h t v e l o c i t y i n m/ s
h =8000 // A l t i t u d e i n m
sig =0.75 // J e t s p e e d r a t i o
g =9.81 // A c c e l e r a t i o n due t o g r a v i t y i n m/ s 2
// C a l c u l a t i o n
d =0.525 // from g a s t a b l e s
A = %pi * D ^2*0.25 // Area o f f l o w i n m2
Cj = u / sig // J e t v e l o c i t y i n m/ s
Vf =( u + Cj ) /2 // V e l o c i t y o f f l o w i n m/ s
ma = d * A * Vf // Mass f l o w r a t e o f a i r i n kg / s
F = ma *( Cj - u ) *10^ -3 // T h r u s t i n kN
P = F * u // T h r u s t power i n kW
Fs = F *10^3/ ma // S p e c i f i c t h r u s t i n Ns / kg
Is = Fs / g // S p e c i f i c i m p u l s e i n s e c
// Output
printf ( (A) Flow r a t e o f a i r t h r o u g h t h e p r o p e l l e r i s
%3 . 3 f m/ s \n (B) T h r u s t p r o d u c e d i s %3 . 3 f kN\n (C)
S p e c i f i c t h r u s t i s %3 . 2 f Ns / kg \n (D) S p e c i f i c
i m p u l s e i s %3 . 3 f s e c \n (E) T h r u s t power i s %3 . 1 f
kW ,ma ,F , Fs , Is , P )
182
2
3
4
5
6
7
8
9
10
11
12
13
14
clear
// I n p u t d a t a
h =3000 // A l t i t u d e i n m
Pi =0.701 // I n l e t p r e s s u r e i n b a r
Ti =268.65 // I n l e t t e m p e r a t u r e i n K
u =525*(5/18) // F l i g h t v e l o c i t y i n m/ s
eff_d =0.875 // D i f f u s e r e f f i c i e n c y
eff_c =0.79 // C o m p r e s s o r e f f i c i e n c y
C1 =90 // V e l o c i t y o f a i r a t c o m p r e s s o r i n m/ s
dTc =230 // T e m p e r a t u r e r i s e t h r o u g h c o m p r e s s o r
k =1.4 // A d i a b a t i c c o n s t a n t o f a i r
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e o f a i r i n J / kgK
15 R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
16
17 // C a l c u l a t i o n
18 ai = sqrt ( k * R * Ti ) // Sound v e l o c i t y i n m/ s
19 Mi = u / ai // I n l e t mach number
20 Toi =(1+((0.5*( k -1) * Mi ^2) ) ) * Ti // S t a g n a t i o n
21
22
23
24
25
26
27
28
29
30
temperature at d i f f u s e r i n l e t in K
To1 = Toi // I n l e t S t a g n a t i o n t e m p e r a t u r e o f c o m p r e s s o r
i n K, s i n c e h o i=ho1
T1 = To1 -( C1 ^2/(2* Cp ) ) // T e m p e r a t u r e a t i n l e t o f
compressor in K
P1 = Pi *((1+( eff_d *(( T1 / Ti ) -1) ) ) ^( k /( k -1) ) ) // I n l e t
p r e s s u r e o f compressor in bar
dPc = P1 - Pi // P r e s s u r e r i s e t h r o u g h i n l e t d i f f u s e r i n
bar
pr_c =((( eff_c * dTc ) / To1 ) +1) ^( k /( k -1) ) // P r e s s u r e
r a t i o of compressor
P = Cp *( dTc ) // Power r e q u i r e d by t h e c o m p r e s s o r i n kW
/ ( kg / s )
eff =1 -(1/ pr_c ^(( k -1) / k ) ) // A i r s t a n d a r d e f f i c i e n c y
// Output
printf ( (A) P r e s s u r e r i s e t h r o u g h d i f f u s e r i s %3 . 4 f
b a r \n (B) P r e s s u r e d e v e l o p e d by c o m p r e s s u r e i s %3
183
. 4 f b a r \n (C) A i r s t a n d a r d e f f i c i e n c y o f t h e
e n g i n e i s %3 . 4 f ,dPc , P1 , eff )
Scilab code Exa 6.11 To estimate diameter power output AFR and absolute velocity of the jet
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
clc
clear
// I n p u t d a t a
h =9500 // A l t i t u d e i n m
u =800*(5/18) // F l i g h t v e l o c i t y i n m/ s
eff_prop =0.55 // P r o p u l s i v e e f f i c i e n c y o f t h e c y c l e
eff_o =0.17 // O v e r a l l e f f i c i e n c y
F =6100 // T h r u s t i n N
d =0.17 // D e n s i t y i n kg /m3
CV =46000 // C a l o r i f i c v a l u e i n kJ / kg
// C a l c u l a t i o n
mf =( F * u ) /( eff_o * CV *10^3) // Mass f l o w r a t e o f f u e l i n
kg / s
Cj =((2* u ) /( eff_prop ) ) -u // J e t v e l o c i t y i n m/ s , wrong
c a l c u l a t i o n in textbook
Ca = Cj - u // A b s o l u t e J e t v e l o c i t y i n m/ s
ma =( F -( mf * Cj ) ) /( Ca ) // Mass f l o w r a t e o f a i r i n kg / s
m = ma + mf // Mass f l o w r a t e o f g a s i n kg / s
f = ma / mf // A i r f u e l r a t i o
Q = m / d // Volume f l o w r a t e i n m3/ s
Dj = sqrt ((4* Q ) /( %pi * Cj ) ) *10^3 // D i a m e t e r o f j e t i n mm
, Cj v a l u e wrong i n t e x t b o o k
P =(( F * u ) / eff_prop ) *10^ -3 // Power o u t p u t o f e n g i n e i n
kW
// Output
printf ( (A) Diamter o f t h e j e t i s %3 . 1 f mm\n (B) Power
184
Scilab code Exa 6.12 To determine jet velocity thrust specific thrust TSFC
thrust power and efficiencies
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
clc
clear
// I n p u t d a t a
u =960*(5/18) // F l i g h t v e l o c i t y i n m/ s
ma =40 // Mass f l o w r a t e o f a i r i n kg / s
AFR =50 // A i r f u e l r a t i o
sig =0.5 // J e t s p e e d r a t i o , f o r maximum t h r u s t power
CV =43000 // C a l o r i f i c v a l u e i n kJ / kg
// C a l c u l a t i o n
mf = ma / AFR // Mass f l o w r a t e o f f u e l i n kg / s
m = ma + mf // Mass f l o w r a t e o f g a s i n kg / s
Cj = u / sig // J e t v e l o c i t y i n m/ s
F =(( m * Cj ) -( ma * u ) ) *10^ -3 // T h r u s t i n kN
Fs = F *10^3/ m // S p e c i f i c t h r u s t i n Ns / kg , F i n N
Pt = F * u // T h r u s t power i n kW
eff_prop =((2* sig ) /(1+ sig ) ) *100 // P r o p u l s i v e
e f f i c i e n c y of the c y c l e in %
19 eff_ther =((0.5* m *( Cj ^2 - u ^2) ) /( mf * CV *10^3) ) *100 //
E f fi c i e n cy of turbine in %
20 eff =( eff_prop /100) *( eff_ther /100) *100 // O v e r a l l
e f f i c i e n c y in %
21 TSFC = mf *3600/( F *10^3) // T h r u s t s p e c i f i c f u e l
c o n s u m p t i o n i n kg / Nhr
22
23
24
// Output
printf ( (A) J e t v e l o c i t y i s %3 . 1 f m/ s \n (B) T h r u s t i s
185
%3 . 3 f kN\n (C) S p e c i f i c t h r u s t i s %3 . 2 f Ns / kg \n (
D) T h r u s t power i s %3 . 2 f kW\n (E) p r o p u l s i v e ,
t h e r m a l and o v e r a l l e f f i c i e n c y i s %3 . 2 f , %3 . 2 f
and %3 . 3 f r e s p e c t i v e l y \n ( F ) T h r u s t s p e c i f i c f u e l
c o n s u m p t i o n i s %3 . 4 f kg / Nhr ,Cj ,F , Fs , Pt , eff_prop ,
eff_ther , eff , TSFC )
Scilab code Exa 6.13 To jet velocity fuel rate TSFC propulsive power and
efficiencies
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
clc
clear
// I n p u t d a t a
u =960*(5/18) // F l i g h t v e l o c i t y i n m/ s
ma =54.5 // Mass f l o w r a t e o f a i r i n kg / s
dh =200 // Change o f e n t h a l p y f o r n o z z l e i n kJ / kg
Cv =0.97 // V e l o c i t y c o e f f i c i e n t
AFR =75 // A i r f u e l r a t i o
eff_cc =0.93 // Combustion e f f i c i e n c y
CV =45000 // C a l o r i f i c v a l u e i n kJ / kg
// C a l c u l a t i o n
mf = ma / AFR // Mass f l o w r a t e o f f u e l i n kg / s
Cj = Cv * sqrt (2* dh *10^3) // J e t v e l o c i t y i n m/ s
F = ma *( Cj - u ) // T h r u s t i n kN
TSFC = mf *3600/( F ) // T h r u s t s p e c i f i c f u e l c o n s u m p t i o n
i n kg / Nhr
HS = mf * eff_cc * CV // Heat s u p p l i e d i n kJ / s
Pp =0.5* ma *( Cj ^2 - u ^2) *10^ -3 // P r o p u l s i v e power i n kW
Pt = F * u // T h r u s t power i n kW
eff_p = Pt /( Pp *10^3) // P r o p u l s i v e e f f i c i e n c y o f t h e
cycle
eff_t = Pp / HS // E f f i c i e n c y o f t u r b i n e
eff_o = Pt *10^ -3/ HS // O v e r a l l e f f i c i e n c y
186
24
25
26
// Output
printf ( (A) E x i t v e l o c i t y o f t h e j e t i s %3 . 2 f m/ s \n (
B) F u e l r a t e i s %3 . 4 f kg / s \n (C) T h r u s t s p e c i f i c
f u e l c o n s u m p t i o n i s %3 . 5 f kg / Nhr \n (D) Thermal
e f f i c i e n c y i s %3 . 3 f \n (E) P r o p u l s i v e power i s %3 . 2
f kW\n ( F ) P r o p u l s i v e e f f i c i e n c y i s %3 . 4 f \n (G)
O v e r a l l e f f i c i e n c y i s %3 . 5 f ,Cj , mf , TSFC , eff_t , Pp ,
eff_p , eff_o )
Scilab code Exa 6.14 To find absolute jet velocity volume of air compressed diameter power output and air fuel ratio of the jet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
clc
clear
// I n p u t d a t a
u =750*(5/18) // F l i g h t v e l o c i t y i n m/ s
h =10000 // A l t i t u d e i n m
eff_p =0.5 // P r o p u l s i v e e f f i c i e n c y o f t h e c y c l e
eff_o =0.16 // O v e r a l l e f f i c i e n c y
d =0.173 // D e n s i t y i n kg /m3
F =6250 // T h r u s t i n N
CV =45000 // C a l o r i f i c v a l u e i n kJ / kg
// C a l c u l a t i o n
sig = eff_p /(2 - eff_p ) // J e t s p e e d r a t i o
Cj = u / sig // J e t v e l o c i t y i n m/ s
Ca = Cj - u // A b s o l u t e J e t v e l o c i t y i n m/ s
ma = F / Ca // Mass f l o w r a t e o f a i r i n kg / s
Q = ma *60/ d // Volume f l o w r a t e i n m3/ min
A = Q /( Cj *60) // Area o f f l o w i n m2
D = sqrt ((4* A ) /( %pi ) ) *10^3 // D i a m e t e r i n mm
Pt = F * u // T h r u s t power i n W
Pp =( Pt / eff_p ) *10^ -3 // P r o p u l s i v e power i n kW
187
\n (B) Volume o f a i r c o m p r e s s e d p e r m i n u t e i s %3 . 2
f m3/ min \n (C) D i a m e t e r o f t h e j e t i s %3i mm\n (D
) Power u n i t o f t h e u n i t i s %3 . 3 f kW\n (E) A i r f u e l
r a t i o i s %3 . 1 f ,Ca ,Q ,D , Pp , AFR )
Scilab code Exa 6.15 To estimate AFR nozzle thrust propeller thrust and
mass flow rate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
clc
clear
// I n p u t d a t a
P1 =0.56 // I n l e t p r e s s u r e o f c o m p r e s s o r i n b a r
T1 =260 // T e m p e r a t u r e a t i n l e t o f c o m p r e s s o r i n K
pr_c =6 // P r e s s u r e r a t i o o f c o m p r e s s o r
eff_c =0.85 // C o m p r e s s o r e f f i c i e n c y
u =360*(5/18) // F l i g h t v e l o c i t y i n m/ s
D =3 // P r o p e l l e r d i a m e t e r i n m
eff_p =0.8 // E f f i c i e n c y o f p r o p e l l e r
eff_g =0.95 // Gear r e d u c t i o n e f f i c i e n c y
pr_t =5 // E x p a n s i o n r a t i o
eff_t =0.88 // T u r b i n e e f f i c i e n c y
T3 =1100 // t e m p e r a t u r e a t t u r b i n e i n l e t i n K
eff_n =0.9 // N o z z l e e f f i c i e n c y
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e o f a i r i n J / kgK
18 CV =40000 // C a l o r i f i c v a l u e i n kJ / kg
19 k =1.4 // A d i a b a t i c c o n s t a n t o f a i r
188
20 R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
21
22 // C a l c u l a t i o n
23 P2 = pr_c * P1 // E x i t p r e s s u r e o f c o m p r e s s o r i n b a r
24 T2s = T1 *( pr_c ) ^(( k -1) / k ) // E x i t t e m p e r a t u r e o f
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
compressor at i s e n t r o p i c proces in K
T2 = T1 +(( T2s - T1 ) / eff_c ) // E x i t t e m p e r a t u r e o f
compressor in K
Wc = Cp *( T2 - T1 ) *10^ -3 // Power i n p u t t o c o m p r e s s o r i n
kJ / kg o f a i r
C1 = u // A i r v e l o c i t y i n m/ s , s i n c e C1 i s r e s u l t a n t o f
u
C = C1 / eff_p // A v e r a g e v e l o c i t y i n m/ s
C2 =(2* C ) - C1 // E x i t v e l o c i t y from c o m p r e s s o r i n m/ s
Ap =0.25* %pi * D ^2 // Area o f p r o p e l l e r p a s s a g e i n m2
Q = Ap * C // Q u a n t i t y o f a i r i n d u c t e d i n m3/ s
mf =(( T3 - T2 ) * Cp ) /(( CV *10^3) -( Cp * T3 ) ) // Mass f l o w r a t e
o f f u e l i n kg / s
f = mf // F u e l c o n s u m p t i o n i n kg / kg o f a i r
AFR =1/ mf // A i r f u e l r a t i o
P3 = P2 // E x i t p r e s s u r e o f c o m b u s t i o n chamber i n bar ,
Since proc ess i s at constant p r e s s u r e
P4 = P3 / pr_t // E x i t p r e s s u r e o f t u r b i n e i n b a r
T4s = T3 /(( pr_t ) ^(( k -1) / k ) ) // E x i t t e m p e r a t u r e o f
t u r b i n e a t i s e n t r o p i c p r o c e s i n K, wrong
calculation
T4 = T3 -( eff_t *( T3 - T4s ) ) // E x i t t e m p e r a t u r e o f t u r b i n e
in K
Po =(1+ f ) * Cp *( T3 - T4 ) *10^ -3 // Power o u t p u t p e r kg o f
a i r i n kJ / kg o f a i r
Pa = Po - Wc // Power a v a i l a b l e f o r p r o p e l l e r i n kJ / kg o f
air
Pe = P1 // E x i t p r e s s u r e i n bar , S i n c e e x i t i s a t
ambient c o n d i t i o n s
Tes = T4 /(( P4 / Pe ) ^(( k -1) / k ) ) // E x i t t e m p e r a t u r e o f
nozzle at i s e n t r o p i c proces in K
Cj = sqrt (2* Cp * eff_n *( T4 - Tes ) ) // J e t v e l o c i t y i n m/ s
Fs =((1+ f ) * Cj ) -u // S p e c i f i c t h r u s t i n Ns / kg , F i n N
189
P r o p u l s i v e power by p r o p e l l e r i n kJ / s
46 Ps = Pp / eff_g // Power s u p p l i e d by t h e t u r b i n e i n kW
47 ma = Ps / Pa // A i r f l o w r a t e i n kg / s
48 Fj = ma * Cj *10^ -3 // J e t t h r u s t i n kN , c a l c u l a t i o n
mistake
49 Fp =( Pp * eff_p ) / u // T h r u s t p r o d u c e d by p r o p e l l e r i n kN
50
51
52
// Output
printf ( (A) A i r f u e l r a t i o
p r o d u c e d by t h e n o z z l e
t h e p r o p e l l e r i s %3 . 3 f
through the compressor
ma )
i s %3 . 2 f \n (B) T h r u s t
i s %3 . 3 f kN\n (C) T h r u s t by
kN\n (D) mass f l o w r a t e
i s %3 . 2 f kg / s ,AFR , Fj , Fp ,
Scilab code Exa 6.16 To find various parameters of ramjet engine through
out its operation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
clc
clear
// I n p u t d a t a
M1 =1.5 // Mach number
h =6500 // A l t i t u d e i n m
D =0.5 // D i a m e t e r i n m
To4 =1600 // S t a g n a t i o n t e m p e r a t u r e a t n o z z l e i n l e t i n
K
CV =40000 // C a l o r i f i c v a l u e i n kJ / kg
k =1.4 // A d i a b a t i c c o n s t a n t o f a i r
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
eff_d =0.9 // D i f f u s e r e f f i c i e n c y
eff_cc =0.98 // Combustion e f f i c i e n c y
eff_n =0.96 // N o z z l e e f f i c i e n c y
pr_l =0.02 // P r e s s u r e r a t i o i . e . S t a g n a t i o n p r e s s u r e
l o s s to Exit presure of compressor
190
16 Cp =1005 // S p e c i f i c
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// C a l c u l a t i o n
P1 =0.44 // I n l e t p r e s s u r e o f c o m p r e s s o r i n b a r
T1 =245.9 // T e m p e r a t u r e a t i n l e t o f c o m p r e s s o r i n K
a1 =314.5 // Sound v e l o c i t y a t c o m p r e s s o r i n m/ s
d1 =0.624 // D e n s i t y a t c o m p r e s s o r i n kg /m3
A1 =0.25* %pi * D ^2 // Area a t d i f f u s e r i n l e t i n m2
u1 = M1 * a1 // F l i g h t v e l o c i t y i n m/ s
ma = d1 * A1 * u1 // Mass f l o w r a t e o f a i r i n kg / s
To2 = T1 *(1+((( k -1) /2) * M1 ^2) ) // S t a g n a t i o n t e m p e r a t u r e
at commpressor i n l e t i n K
To1 = To2 // S t a g n a t i o n t e m p e r a t u r e a t c o m m p r e s s o r
o u t l e t i n K, ( I t i s i n c a s e o f d i f f u s e r )
pr_d =(( eff_d *((( k -1) /2) * M1 ^2) ) +1) ^( k /( k -1) ) //
Pressure ratio of d i f f u s e r
P2 = pr_d * P1 // E x i t p r e s s u r e o f c o m p r e s s o r i n b a r
Po2 = P2 // S t a g n a t i o n p r e s s u r e a t e x i t o f c o m p r e s s o r
in bar
Po3 =( Po2 -( pr_l * Po2 ) ) // S t a g n a t i o n p r e s s u r e a t e x i t
o f c o m b u s t i o n chamber i n b a r
Poe = P1 // E x i t s t a g n a t i o n p r e s s u r e i n kPa , S i n c e e x i t
i s at ambient c o n d i t i o n s
pr_n = Po3 / Poe // P r e s s u r e r a t i o o f n o z z l e
p1 =1/ pr_n // I n v e r s e o f p r n t o f i n d i n g a s t a b l e s
M4s =1.41 // Mach number a t t u r b i n e e x i t
from g a s
tables
T4s = To4 /(1+((0.5*( k -1) * M4s ^2) ) ) // E x i t t e m p e r a t u r e
of turbine at i s e n t r o p i c p r o c e s s in K
To3 = To4 // S t a g n a t i o n t e m p e r a t u r e a t i n l e t t u r b i n e i n
K,
T4 = To3 -( eff_n *( To3 - T4s ) ) // E x i t t e m p e r a t u r e o f
turbine in K
C4 = sqrt (2* Cp *( To4 - T4 ) ) // F l i g h t v e l o c i t y o f a i r i n m
/s
a4 = sqrt ( k * R * T4 ) // Sound v e l o c i t y i n m/ s
Me = C4 / a4 // N o z z l e j e t mach number
191
of the i d e a l c y c l e in %
46 sig = u1 / C4 // J e t s p e e d r a t i o
47 eff_p =((2* sig ) /(1+ sig ) ) // P r o p u l s i v e e f f i c i e n c y i n %
48 F =(( m * C4 ) -( ma * u1 ) ) *10^ -3 // T h r u s t i n kN
49
50
51
// Output
printf ( (A) E f f i c i e n c y o f t h e i d e a l c y c l e i s %3i
p e r c e n t \n (B) F l i g h t s p e e d i s %3 . 3 f m/ s \n (C) A i r
f l o w r a t e i s %3 . 3 f kg / s \n (D) D i f f u s e r p r e s s u r e
r a t i o i s %3 . 4 f \n (E) F u e l a i r r a t i o i s %3 . 5 f \n ( F )
N o z z l e p r e s s u r e r a t i o i s %3 . 2 f \n (G) N o z z l e j e t
mach number i s %3 . 3 f \n (H) P r o p u l s i v e e f f i c i e n c y
i s %3 . 4 f p e r c e n t \n ( I ) T h r u s t i s %3 . 3 f kN , eff_i ,
C4 , ma , pr_d ,f , pr_n , Me , eff_p , F )
Scilab code Exa 6.17 To find power input power output Fuel air ratio Exit
Mach number thrust and thrust power developed in the jet
1
2
3
4
5
6
7
8
9
10
11
12
13
clc
clear
// I n p u t d a t a
ma =18 // Mass f l o w r a t e o f a i r i n kg / s
Mi =0.6 // I n l e t mach number
h =4600 // A l t i t u d e i n m
Pi =55 // I n l e t p r e s s u r e i n
Ti = -20+273 // I n l e t t e m p e r a t u r e i n K
eff_d =0.9 // D i f f u s e r e f f i c i e n c y
pr_d =5 // D i f f u s e r p r e s s u r e r a t i o
T3 =1000+273 // I n l e t t u r b i n e t e m p e r a t u r e i n K
Pe =60 // E x i t p r e s s u r e i n kPa
192
14 eff_c =0.81 // C o m p r e s s o r e f f i c i e n c y
15 eff_t =0.85 // T u r b i n e e f f i c i e n c y
16 eff_n =0.915 // N o z z l e e f f i c i e n c y
17 CV =46520 // C a l o r i f i c v a l u e i n kJ / kg
18 Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t a n t
p r e s s u r e o f a i r i n J / kgK
19 k =1.4 // A d i a b a t i c c o n s t a n t
20 R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
21
22 // C a l c u l a t i o n
23 Ci = Mi * sqrt ( k * R * Ti ) // V e l o c i t y o f a i r i n m/ s ,
24 u = Ci // F l i g h t v e l o c i t y i n m/ s , S i n c e i t i s r e a c t i o n
25
26
27
28
29
30
31
32
33
34
35
36
37
38
f o r c e o f Ci
T1 = Ti +( Ci ^2/(2* Cp ) ) // T e m p e r a t u r e a t i n l e t o f
compressor in K
P1s = Pi *( T1 / Ti ) ^( k /( k -1) ) // I n l e t p r e s s u r e o f
c o m p r e s s o r a t i s e n t r o p i c p r o c e s s i n kPa
P1 = Pi +( eff_d *( P1s - Pi ) ) // I n l e t p r e s s u r e o f
c o m p r e s s o r i n kPa
P2 = P1 * pr_d // O u t l e t p r e s s u r e o f c o m p r e s s o r i n kPa
T2s = T1 *( pr_d ) ^(( k -1) / k ) // O u t l e t t e m p e r a t u r e o f
compressor at i s e n t r o p i c proce ss in K
T2 = T1 +(( T2s - T1 ) / eff_c ) // E x i t t e m p e r a t u r e o f
compressor in K
Wc = Cp *( T2 - T1 ) *10^ -3 // Workdone on c o m p r e s s o r i n kJ /
kg o f a i r
Pc = ma * Wc // Power i n p u t i n kW
Pt = Pc // Power o u t put o f t u r b i n e f o r i s e n t r o p i c
p r o c e s s i n kW
f =( T3 - T2 ) /(( CV *10^3/ Cp ) - T3 ) // F u e l a i r r a t i o
Wt = Wc // Workdone by t h e t u r b i n e i n kJ / kg o f a i r
T4 = T3 -( Wt *10^3/ Cp ) // E x i t t e m p e r a t u r e o f t u r b i n e i n
K
T4s = T3 -(( T3 - T4 ) / eff_t ) // E x i t t e m p e r a t u r e o f t u r b i n e
at i s e n t r o p i c process in K
P3 = P2 // E x i t p r e s s u r e o f c o m b u s t i o n chamber i n kPa ,
Since the p r o c e s s takes place at constant
pressure process
193
39 P4 = P3 *( T4s / T3 ) ^( k /( k -1) ) // P r e s s u r e a t o u t l e t
of
t u r b i n e i n kPa
40 pr_n = P4 / Pe // P r e s s u r e r a t i o o f n o z z l e
41 Tes = T4 /( pr_n ) ^(( k -1) / k ) // E x i t t e m p e r a t u r e o f
42
43
44
45
46
47
48
49
50
51
nozzle
at i s e n t r o p i c p r o c e s s in K
Te = T4 -( eff_n *( T4 - Tes ) ) // E x i t t e m p e r a t u r e o f n o z z l e
in K
Cj = sqrt (2* Cp *( T4 - Te ) ) // J e t v e l o c i t y i n m/ s
Ce = Cj // F l i g h t v e l o c i t y i n m/ s
ae = sqrt ( k * R * Te ) // Sound v e l o c i t y a t n o z z l e i n m/ s
Me = Ce / ae // N o z z l e j e t mach number
F = ma *(((1+ f ) * Cj ) -u ) // T h r u s t i n N
P = F * u *10^ -3 // T h r u s t power i n kW
// Output
printf ( (A) Power i n p u t o f c o m p r e s s o r i s %3 . 2 f kW\n (
B) Power o u t p u t o f t u r b i n e i s %3 . 2 f kW\n (C) F/A
r a t i o on mass b a s i s i s %3 . 4 f \n (D) E x i t mach
number i s %3 . 3 f \n (E) T h r u s t i s %3 . 2 f N\n ( F )
T h r u s t power i s %3 . 1 f kW ,Pc , Pt ,f , Me ,F , P )
194
Chapter 7
Rocket Propulsion
clc
clear
// i n p u t d a t a
mp =12 // f l o w r a t e i n kg / s
Ae =335*10^ -4 // e x i t a r e a i n m2
Ce =2000 // e x h a u s t v e l o c i t y i n m/ s
h =10 // a l t i t u d e i n km
Pe =1*10^5 // e x h a u s t p r e s s u r e i n Pa
P0 =1*10^5 // p0=a t o m s p h e r i c p r e s s u r e i n Pa a t h =0.
P10 =0.25*10^5 // a t m o s p h e r i c p r e s s u r e i n Pa u s i n g g a s
tables
12
13 // c a l c u l a t i o n s
14 Fs = mp * Ce *10^ -3 // t h r u s t
o f motor a t s e a l e v e l s i n c e
pe=p0 i n kN
15 F10 =(( mp * Ce ) + Ae *( Pe - P10 ) ) *10^ -3 // t h r u s t o f motor
a t a l t i t u d e o f 10km i n kN
16
17
18
// o u t p u t
printf ( (A) t h r u s t o f motor a t s e a l e v e l
195
i s %3i kN (
Scilab code Exa 7.2 To calculate area ratio thrust characteristic velocity
thrust coefficient exit velocity and possible maximum velocity
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
clc
clear
// i n p u t d a t a
P0 =38*10^5 // c o m b u s t i o n chamber p r e s s u r e i n Pa
T0 =3500 // c o m b u s t i o n chamber t e m p e r a t u r e i n K
ma =41.67 // o x i d i z e r f l o w r a t e i n kg / s
MR =5 // m i x t u r e r a t i o
k =1.3 // a d i a b a t i c c o n s t a n t
R =287 // g a s c o n s t a n t i n J / kgK
Pamb =0.0582*10^5 // a m b i e n t p r e s s u r e i n Pa
Pe = Pamb // e x h a u s t p r e s s u r e a t s e a l e v e l i n Pa
// c a l c u l a t i o n
mf = ma / MR // mass f l o w o f f u e l i n kg / s
mp = mf + ma // p r o p e l l a n t mass f l o w i n kg / s
Cp =( k * R ) /( k -1) // s p e c i f i c h e a t a t c o n s t a n t p r e s s u r e
i n J / kgk
p = P0 / Pe // r a t i o o f p r e s s u r e s a t c o m b u s t i o n chamber
and e x h a u s t
Me =(((( p ^(( k -1) / k ) ) -1) *2) /( k -1) ) ^0.5 // Mach number
t =1/(1+((( k -1) /2) * Me ^2) ) // r a t i o o f e x h a u s t
temperature to combustion temperature
Te = t * T0 // e x h a u s t t e m p e r a t u r e i n K e l v i n
a =(1/ Me ) *(((2/( k +1) ) +((( k -1) /( k +1) ) * Me ^2) ) ^(( k +1)
/(2*( k -1) ) ) ) // r a t i o o f a r e a s a t e x i t s e c t i o n and
throat s e c t i o n of the nozzle
Ce =( k * R * Te ) ^0.5* Me // e x i t v e l o c i t y i n t h e e x h a u s t i n
m/ s
196
24 Cj = Ce // a v e r a g e
effective
j e t v e l o c i t y i n m/ s , s i n c e
Pe=Pamb
25 P1 = P0 *(2/( k +1) ) ^( k /( k -1) ) // p r e s s u r e a t t h r o a t
s e c t i o n i n Pa
26 T1 = T0 *(2/( k +1) ) // t e m p e r a t u r e a t t h r o a t s e c t i o n i n K
27 d1 = P1 /( R * T1 ) // d e n s i t y o f f u e l a t t h r o a t s e c t i o n i n
kg /m3
C1 =( k * R * T1 ) ^0.5 // v e l o c i t y a t t h r o a t s e c t i o n i n m/ s
A1 =( mp /( d1 * C1 ) ) *10^4 // n o z z l e t h r o a t a r e a i n cm2
Ae = a * A1 // e x i t a r e a i n cm2
F =( mp * Ce ) *10^ -3 // t h r u s t i n kN
Cmax1 =(2* Cp * T0 ) ^0.5 //maximum p o s s i b l e v e l o c i t y i n m
/s
33 Cf =( F *10^3) /( P0 * A1 *10^ -4) // t h r u s t c o e f f i c i e n t , F i n
kN and A1 i n m2
34 Cch1 = Cj / Cf // c h a r a c t e r i s t i c v e l o c i t y i n m/ s
28
29
30
31
32
35
36
37
// o u t p u t
printf ( (A) n o z z l e t h r o a t a r e a i s %3 . 2 f cm2 \n (B)
t h r u s t i s %3 . 1 f kN \n (C) t h r u s t c o e f f i c i e n t i s %3
. 2 f \n (D) c h a r a c t e r i s t i c v e l o c i t y i s %3i m/ s \n (
E) e x i t v e l o c i t y i n e x h a u s t i s %3i m/ s \n ( F )
maximum p o s s i b l e e x h a u s t v e l o c i t y i s %3i m/ s \n ,
A1 ,F , Cf , Cch1 , Ce , Cmax1 )
Scilab code Exa 7.3 To estimate thrust per unit area and specific impulse
1
2
3
4
5
6
7
8
clc
clear
// i n p u t d a t a
a =3 // e x i t a r e a t o t h r o a t a r e a r a t i o
T0 =2973 // c o m b u s t i o n chamber t e m p e r a t u r e i n K
P0 =20*10^5 // c o m b u s t i o n chamber p r e s s u r e i n Pa
k =1.3 // a d i a b a t i c c o n s t a n t
197
9 R =248 // g a s c o n s t a n t i n J / kgK
10 Pamb =1*10^5 // a m b i e n t p r e s s u r e i n Pa
11 Me =2.52 // mach number f o r k =1.3 and a=3 u s i n g g a s
tables
12 g =9.81 // a c c e l e r a t i o n due t o g r a v i t y i n m/ s 2
13
14 // c a l c u l a t i o n
15 p =1/((1+((( k -1) /2) * Me ^2) ) ^( k /( k -1) ) ) // r a t i o o f
p r e s s u r e s a t e x h a u s t and c o m b u s t i o n chamber
16 Pe = p * P0 // e x h a u s t p r e s s u r e i n Pa
17 t =1/(1+((( k -1) /2) * Me ^2) ) // r a t i o o f e x h a u s t
m/ s
20 M =( Pe * Ce ) /( R * Te ) // p r o p e l l a n t mass f l o w p e r u n i t
a r e a o f e x i t i n kg /m2 s
21 Fa =(( M * Ce ) +( Pe - Pamb ) ) *10^ -3 // t h r u s t p e r u n i t a r e a
o f e x i t i n N/m2
22 Is =( Fa *10^3) /( M * g ) // s p e c i f i c i m p u l s e i n s e c
23
24
25
// o u t p u t
printf ( (A) t h r u s t p e r u n i t a r e a o f e x i t i s %3 . 2 f kN/
m2 \n (B) s p e c i f i c i m p u l s e i s %3 . 2 f s e c ,Fa , Is )
Scilab code Exa 7.4 To find specific impulse specific propellant consumption effective and absolute jet velocity of rocket
1
2
3
4
5
6
7
clc
clear
// i n p u t d a t a
mp =5 // p r o p e l l e n t f l o w r a t e i n kg / s ( m i s s i n g d a t a )
de =0.10 // n o z z l e e x i t d i a m e t e r i n m
Pe =1.02*10^5 // n o z z l e e x i t p r e s s u r e i n Pa
198
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Pamb =1.013*10^5 // a m b i e n t p r e s s u r e i n Pa
P0 =20 // t h r u s t chamber p r e s s u r e i n Pa
F =7000 // t h r u s t i n N
u =1000 // r o c k e t s p e e d i n m/ s
g =9.81 // a c c e l e r a t i o n due t o g r a v i t y i n m/ s 2
// c a l c u l a t i o n
Cj = F / mp // e f f e c t i v e j e t v e l o c i t y i n m/ s
Ca = Cj - u // a b s o l u t e j e t v e l o c i t y i n m/ s
wp = mp * g // w e i g h t f l o w r a t e o f p r o p e l l e n t i n N/ s
Is = F /( wp ) // s p e c i f i c i m p u l s e i n s e c
SPC =1/ Is // s p e c i f i c p r o p e l l e n t c o n s u m p t i o n i n s e c 1
// o u t p u t
printf ( (A) e f f e c t i v e j e t v e l o c i t y i s %3i m/ s \n (B)
s p e c i f i c i m p u l s e i s %3 . 2 f s e c \n (C) s p e c i f i c
p r o p e l l e n t c o n s u m p t i o n i s %3 . 3 f s 1 \n (D)
a b s o l u t e j e t v e l o c i t y i s %3i m/ s ,Cj , Is , SPC , Ca )
Scilab code Exa 7.5 To find propulsive efficiency thrust and thrust power
of rocket
1
2
3
4
5
6
7
8
9
10
11
12
13
clc
clear
// i n p u t d a t a
Cj =2700 // a v e r a g e e f f e c t i v e j e t v e l o c i t y i n m/ s
u =1350 // f o r w a r d f l i g h t v e l o c i t y i n m/ s
mp =78.6 // p r o p e l l a n t mass f l o w i n kg / s
// c a l c u l a t i o n
s = u / Cj // e f f e c t i v e j e t s p e e d r a t i o
np =(2* s ) /(1+ s ^2) // p r o p u l s i v e e f f i c i e n c y
F = Cj * mp *10^ -3 // t h r u s t i n kN
Pt = F * u *10^ -3 // T h r u s t power i n MW, F i n N
199
14
15
16
// o u t p u t
printf ( (A) t h r u s t i s %3 . 2 f kN \n (B) T h r u s t power i s
%3 . 3 f MW \n (C) p r o p u l s i v e e f f i c i e n c y i s %3 . 1 f ,F ,
Pt , np )
Scilab code Exa 7.6 To find velocity and maximum height that rocket will
reach
1
2
3
4
5
6
7
8
9
10
11
12
13
14
clc
clear
// i n p u t d a t a
mi =15000 // mass o f t h e r o c k e t i n kg
mp =125 // p r o p e l l a n t mass f l o w i n kg / s
Cj =2000 // v e l o c i t y o f g a s e s coming o u t i n m/ s
t =70 // t i m e i n t e r v a l i n s e c
t0 =0 // l o w e r l i m i t i n i n t e g r a t i o n i n s e c
t1 =70 // u p p e r l i m i t i n i n t e g r a t i o n i n s e c
g =9.81 // a c c e l e r a t i o n due t o g r a v i t y i n m/ s 2
// c a l c u l a t i o n
u =( - Cj *( log (1 -(( mp * t ) / mi ) ) ) ) -( g * t ) // v e l o c i t y
a t t a i n e d i n 70 s e c i n m/ s
15 h1 =( integrate ( ( ( 2 0 0 0 ( l o g ( 1 ( ( 1 2 5 t ) / 1 5 0 0 0 ) ) ) ) (g
t ) ) , t ,t0 , t1 ) ) *10^ -3 // d i s t a n c e t r a v e l l e d
t h r o u g h 70 s e c o b t a i n e d by i n t e g r a t i n g u w . r . t
t i m e w i t h i n t e r v a l s 0 t o 70 i n km
16 h2 =( u ^2/(2* g ) ) *10^ -3 // d i s t a n c e r e a c h e d a f t e r f u e l
l a s t i . e . a f t e r 70 s e c due t o k i n e t i c e n e r g y by
u s i n g KE=PE i n km
17 h = h1 + h2 //maximum h e i g h t t h e r o c k e t w i l l r e a c h i n km
18
19
20
// o u t p u t
printf ( (A) v e l o c i t y a t t a i n e d i n %i s e c i s %3 . 2 f m/ s \
200
n (B) maximum h e i g h t t h e r o c k e t w i l l r e a c h i s %3 . 3
f km ,t ,u , h )
Scilab code Exa 7.7 To determine thrust coefficient propellant weight flow
coefficient SPC and characteristic velocity of rocket
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
clc
clear
// i n p u t d a t a
A1 =18*10^ -4 // t h r o a t a r e a i n m2
P0 =25*10^5 // c o m b u s t i o n chamber p r e s s u r e i n Pa
Is =127.42 // s p e c i f i c i m p u l s e i n s e c
wp =44.145 // w e i g h t f l o w r a t e o f p r o p e l l e n t i n N/ s
g =9.81 // a c c e l e r a t i o n due t o k r a v i t y i n m/ s 2
// c a l c u l a t i o n
F = Is * wp // t h r u s t i n N
mp = wp / g // p r o p e l l a n t mass f l o w i n kg / s
Cj = F / mp // a v e r a g e e f f e c t i v e j e t v e l o c i t y i n m/ s
Cf = F /( P0 * A1 ) // t h r u s t c o e f f i c i e n t
Cw = wp /( P0 * A1 ) /10^ -3 // p r o p e l l e n t w e i g h t f l o w
c o e f f i c e n t 10 3
17 SPC =( wp / F ) /10^ -3 // s p e c i f i c p r o p e l l e n t c o n s u m p t i o n
i n s e c 1 10 3
18 Cch1 = Cj / Cf // c h a r a c t e r i s t i c v e l o c i t y i n m/ s
19
20
21
// o u t p u t
printf ( (A) t h r u s t c o e f f i c i e n t i s %3 . 2 f \n (B)
p r o p e l l e n t w e i g h t f l o w c o e f f i c e n t i s %3 . 2 f 10 3
\n (C) s p e c i f i c p r o p e l l e n t c o n s u m p t i o n i s %3 . 2 f
10 3 s 1 \n (D) c h a r a c t e r i s t i c v e l o c i t y i s %3 . 0
f m/ s ,Cf , Cw , SPC , Cch1 )
201
Scilab code Exa 7.8 To find various parameters of rocket projectile during
its operation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
clc
clear
// i n p u t d a t a
m1 =200 // i n t e r n a l mass i n kg
m2 =130 // mass a f t e r r o c k e t o p e r a t i o n i n kg
m3 =110 // p a y l o a d , nonp r o p u l s i v e s t r u c t u r e , e t c i n kg
tp =3 // r o c k e t o p e r a t i o n d u r a t i o n i n s e c
Is =240 // s p e c i f i c i m p u l s e i n s e c
g =9.81 // a c c e l e r a t i o n due t o k r a v i t y i n m/ s 2
// c a l c u l a t i o n
MR = m2 / m1 // mass r a t i o
Mp = m1 - m2 // mass o f p r o p e l l a n t i n kg
mp = Mp / tp // p r o p e l l e n t f l o w r a t e i n kg / s
wp = mp * g // w e i g h t f l o w r a t e o f p r o p e l l e n t i n N/ s
IMF =( m2 - m3 ) /( m1 - m3 ) // i n i t i a l mass f r a c t i o n
PMF =1 - IMF // p r o p e l l a n t mass f r a c t i o n
F = Is * wp // t h r u s t i n N
TWRi = F /( m1 * g ) // i n i t i a l t h r u s t t o w e i g h t r a t i o
TWRf = F /( m2 * g ) // f i n a l t h r u s t t o w e i g h t r a t i o
av = F / m2 //Maximum a c c e l a r a t i o n o f t h e v e c h i c l e i n m/
s 2
23 Cj = Is * g // e f f e c t i v e e x h a u s t v e l o c i t y i n m/ s
24 It = Is * Mp * g *10^ -3 // t o t a l i m p u l s e i n kNs , u n i t s o f
t h e a n s w e r g i v e n i n t h e book i s wrong
25 IWR =( It *10^3) /(( m1 - m3 ) * g ) // i m p u l s e t o w e i g h r r a t i o ,
I t i n Ns
26
27
28
// o u t p u t
printf ( (A) mass r a t i o i s %3 . 2 f \n (B) p r o p e l l e n t mass
202
f r a c t i o n i s %3 . 3 f \n (C) p r o p e l l e n t f l o w r a t e i s
%3 . 1 f kg / s \n (D) t h r u s t i s %3 . 1 f N\n (E) t h r u s t t o
w e i g h t r a t i o i s %3 . 2 f ( i n t i a l ) and %3 . 2 f ( f i n a l ) \
n ( F ) a c c e l a r a t i o n o f t h e v e c h i c l e i s %3 . 2 f m/ s 2\
n (G) e f f e c t i v e e x h a u s t v e l o c i t y i s %3 . 1 f m/ s \n (H
) t o t a l i m p u l s e i s %3 . 3 f kNs \n ( I ) i m p u l s e t o
w e i g h r r a t i o i s %3 . 2 f ,MR , PMF , mp ,F , TWRi , TWRf , av ,
Cj , It , IWR )
Scilab code Exa 7.9 To propulsive power engine output and efficiencies
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
clc
clear
// i n p u t d a t a
u =2800 // r o c k e t s p e e d i n m/ s
Cj =1400 // e f f e c t i v e e x h a u s t v e l o c i t y i n m/ s
mp =5 // p r o p e l l e n t f l o w r a t e i n kg / s
q =6500 // h e a t o f p r o p e l l e n t p e r kg o f p r o p e l l a n t
m i x t u r e i n kJ / kg
// c a l c u l a t i o n
s = u / Cj // e f f e c t i v e j e t s p e e d r a t i o
np =(2* s ) /(1+ s ^2) // p r o p u l s i v e e f f i c i e n c y
F = Cj * mp *10^ -3 // t h r u s t i n kN
Pt = F *10^3* u *10^ -6 // T h r u s t power i n MW, F i n N
Pe = Pt / np // e n g i n e o u t p u t i n MW
nth = Pe *10^3/( mp * q ) // t h e r m a l e f f i c i e n c y , Pe i n kW
no = np * nth // o v e r a l l e f f i c i e n c y
// o u t p u t
printf ( (A) p r o p u l s i v e e f f i c i e n c y i s %3 . 1 f \n (B)
p r o p u l s i v e power i s %3 . 1 f MW\n (C) e n g i n e o u t u t i s
%3 . 1 f MW\n (D) t h e r m a l e f f i c i e n c y i s %3 . 4 f \n (E)
o v e r a l l e f f i c i e n c y i s %3 . 3 f ,np , Pt , Pe , nth , no )
203
Scilab code Exa 7.10 To find thrust specific impulse and efficiencies
1 clc
2 clear
3
4 // i n p u t d a t a
5 Cj =1250 // e f f e c t i v e e x h a u s t
6 s =0.8 // e f f e c t i v e j e t s p e e d
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
v e l o c i t y i n m/ s
r a t i o i . e . f l i g h t to j e t
speed r a t i o
ma =3.5 // o x i d i z e r f l o w r a t e i n kg / s
mf =1 // f u e l f l o w r a t e i n kg / s
g =9.81 // a c c e l e r a t i o n due t o g r a v i t y i n m/ s 2
q =2500*10^3 // h e a t o f p r o p e l l e n t p e r kg o f
p r o p e l l a n t m i x t u r e i n J / kg
// c a l c u l a t i o n
u = s * Cj // f l i g h t v e l o c i t y i n m/ s
mp = ma + mf // p r o p e l l a n t mass f l o w i n kg / s
F = Cj * mp *10^ -3 // t h r u s t i n kN
wp = mp * g // w e i g h t f l o w r a t e o f p r o p e l l e n t i n N/ s
Is =( F *10^3) /( wp ) // s p e c i f i c i m p u l s e i n s e c , F i n N
np =(2* s ) /(1+ s ^2) // p r o p u l s i v e e f f i c i e n c y
nth =0.5* mp *(( Cj ^2+ u ^2) /( mp * q ) ) // t h e r m a l e f f i c i e n c y
no = np * nth // o v e r a l l e f f i c i e n c y
// o u t p u t
printf ( (A) t h r u s t i s %3 . 3 f kN\n (B) s p e c i f i c i m p u l s e
i s %3 . 2 f s e c \n (C) p r o p u l s i v e e f f i c i e n c y i s %3 . 4 f
\n (D) t h e r m a l e f f i c i e n c y i s %3 . 4 f \n (E) o v e r a l l
e f f i c i e n c y i s %3 . 1 f ,F , Is , np , nth , no )
204
Scilab code Exa 7.11 To find specific impulse SPC effective and actual jet
velocity and efficiencies
1
2
3
4
5
6
7
8
9
10
11
12
13
14
clc
clear
// i n p u t d a t a
mp =193 // p r o p e l l e n t f l o w r a t e i n kg / s
P1 =27*10^5 // p r e s s u r e a t t h r o a t s e c t i o n i n Pa
T1 =3000 // t e m p e r a t u r e a t t h r o a t s e c t i o n i n K
de =0.6 // n o z z l e e x i t d i a m e t e r i n m
Pe =1.1*10^5 // e x h a u s t p r e s s u r e i n Pa
Pamb =1.013*10^5 // a m b i e n t p r e s s u r e i n Pa
F =380*10^3 // t h r u s t o f motor i n N
u =694.44 // f l i g h t v e l o c i t y i n m/ s
g =9.81 // a c c e l e r a t i o n due t o g r a v i t y i n m/ s 2
q =6500*10^3 // h e a t o f p r o p e l l e n t p e r kg o f
p r o p e l l a n t m i x t u r e i n J / kg
15
16 // c a l c u l a t i o n
17 Ae =( %pi *0.6^2) /4 // e x i t a r e a i n m2
18 Cj = F / mp // a v e r a g e e f f e c t i v e j e t v e l o c i t y i n m/ s
19 Ce =( F -(( Pe - Pamb ) * Ae ) ) / mp // e x h a u s t v e l o c i t y i n m/ s ,
20
21
22
23
24
25
26
27
28
29
30
wrong a n s w e r i n t e x t b o o k
wp = mp * g // w e i g h t f l o w r a t e o f p r o p e l l e n t i n N/ s
Is =( F ) /( wp ) // s p e c i f i c i m p u l s e i n s e c
SPC =( wp / F ) /10^ -3 // s p e c i f i c p r o p e l l e n t c o n s u m p t i o n
i n s e c 1 10 3
Pt = F * u *10^ -6 // T h r u s t power i n MW
Pl =(0.5* mp *(( Cj - u ) ^2) ) *10^ -6 // Power l o s s i n e x h a u s t
i n MW
Pe = Pt + Pl // e n g i n e o u t p u t i n MW
np = Pt / Pe // p r o p u l s i v e e f f i c i e n c y
nth = Pe *10^3/( mp * q *10^ -3) // t h e r m a l e f f i c i e n c y and Pe
, q i n kW
no = np * nth // o v e r a l l e f f i c i e n c y
// o u t p u t
205
31
Scilab code Exa 7.12 To find propellant flow rate thrust developed and
height attained during powered and coasting flights
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
clc
clear
// i n p u t d a t a
m1 =3600 // i n t e r n a l mass i n kg
Cj =2070 // a v e r a g e e f f e c t i v e j e t v e l o c i t y i n m/ s
tp =80 // r o c k e t o p e r a t i o n d u r a t i o n i n s e c
g =9.81 // a c c e l e r a t i o n due t o g r a v i t y i n m/ s 2
// c a l c u l a t i o n
up =2* Cj // f l i g h t v e l o c i t y i n m/ s
MR =1/ exp (( up +( g * tp ) ) / Cj ) // mass r a t i o
m2 = MR * m1 // mass a f t e r r o c k e t o p e r a t i o n i n kg
PMF =1 - MR // p r o p e l l a n t mass f r a c t i o n
Mp = m1 - m2 // mass o f p r o p e l l a n t i n kg
mp = Mp / tp // p r o p e l l e n t f l o w r a t e i n kg / s
F = Cj * mp *10^ -3 // t h r u s t i n kN
Zp =(((1+((1 -(1/ PMF ) ) * log (1/ MR ) ) ) * Cj * tp ) -(0.5* g * tp ^2)
) *10^ -3 // powered a l t i t u d e g a i n i n km
19 Zc =((0.5* up ^2) / g ) *10^ -3 // c o a s t i n g a l t i t u d e g a i n i n
km
20 Z = Zp + Zc //maximum a l t i t u d e i n km
21
22
// o u t p u t
206
23
printf ( (A) f l o w r a t e o f p r o p e l l e n t i s %3 . 2 f kg / s \n (
B) t h r u s t d e v e l o p e d i s %3 . 3 f kN\n (C) a l t i t u d e
g a i n s d u r i n g powered and c o a s t i n g f l i g h t s a r e %3
. 3 f km and %3 . 3 f km r e s p e c t i v e l y ,mp ,F , Zp , Zc )
Scilab code Exa 7.13 To find effective jet velocity mass ratio and propellant mass fraction maximum slight speed Altitude gain during powered and
coasting flights
1
2
3
4
5
6
7
clc
clear
// i n p u t d a t a
s =0.2105 // e f f e c t i v e j e t s p e e d r a t i o
Is =203.88 // s p e c i f i c i m p u l s e i n s e c
tp =8 // r o c k e t o p e r a t i o n d u r a t i o n i . e . burn o u t t i m e
in sec
8 g =9.81 // a c c e l e r a t i o n due t o k r a v i t y i n m/ s 2
9
10
11
12
13
14
15
// c a l c u l a t i o n
Cj = g * Is // a v e r a g e e f f e c t i v e j e t v e l o c i t y i n m/ s
up = s * Cj //maximum f l i g h t s p e e d i n m/ s
MR =1/ exp (( up +( g * tp ) ) / Cj ) // mass r a t i o
PMF =1 - MR // p r o p e l l a n t mass f r a c t i o n
Zp =(((1+((1 -(1/ PMF ) ) * log (1/ MR ) ) ) * Cj * tp ) -(0.5* g * tp ^2)
) *10^ -3 // powered a l t i t u d e g a i n i n km
16 Zc =((0.5* up ^2) / g ) *10^ -3 // c o a s t i n g a l t i t u d e g a i n i n
km
17 Z = Zp + Zc //maximum a l t i t u d e i n km
18
19
20
// o u t p u t
printf ( (A) e f f e c t i v e j e t v e l o c i t y i s %3i m/ s \n (B)
mass r a t i o and p r o p e l l e n t mass f r a c t i o n a r e %3 . 2 f
and %3 . 2 f r e s p e c t i v e l y \n (C) maximum f l i g h t s p e e d
i s %3 . 2 f m/ s \n (D) ) a l t i t u d e g a i n s d u r i n g powered
207
and c o a s t i n g f l i g h t s a r e %3 . 3 f km and %3 . 3 f km
r e s p e c t i v e l y ,Cj , MR , PMF , up , Zp , Zc )
Scilab code Exa 7.14 To find orbital and escape velocities of a rocket
1 clc
2 clear
3
4 // i n p u t d a t a
5 R0 =6341.6*10^3 // r a d i u s
o f e a r t h a t mean s e a l e v e l
in m
6 g =9.809 // a c c e l e r a t i o n due t o g r a v i t y i n m/ s 2
7 Z1 =0 // a l t i t u d e a t s e a l e v e l i n m
8 Z2 =300*10^3 // a l t i t u d e a b o v e s e a l e v e l i n m
9
10 // c a l c u l a t i o n
11 uorb1 = R0 * sqrt ( g /( R0 + Z1 ) ) // o r b i t v e l o c i t y o f a
r o c k e t a t mean s e a l e v e l i n m/ s
12 uesc1 = sqrt (2) * uorb1 // e s c a p e v e l o c i t y o f a r o c k e t a t
mean s e a l e v e l i n m/ s
13 uorb2 = R0 * sqrt ( g /( R0 + Z2 ) ) // o r b i t v e l o c i t y o f a
r o c k e t a t an a l t i t u d e o f 300 km i n m/ s
14 uesc2 = sqrt (2) * uorb2 // e s c a p e v e l o c i t y o f a r o c k e t a t
an a l t i t u d e o f 300 km i n m/ s
15
16
17
// o u t p u t
printf ( (A) o r b i t and e s c a p e v e l o c i t i e s o f a r o c k e t
a t mean s e a l e v e l a r e %3i m/ s and %3i m/ s \n (B)
o r b i t and e s c a p e v e l o c i t i e s o f a r o c k e t a t an
a l t i t u d e o f 300 km a r e %3 . 1 f m/ s and %3 . 2 f m/ s ,
uorb1 , uesc1 , uorb2 , uesc2 )
208
Chapter 8
Two Marks Questions and
Answers
clc
clear
// I n p u t d a t a
C =500 // A i r p l a n e v e l o c i t y i n m/ s
T =20+273 // T e m p e r a t u r e i n K
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
a = sqrt ( k * R * T ) // Sound v e l o c i t y i n m/ s
M = C / a // Mach number
alp = asind (1/ M ) // Mach a n g l e i n d e g r e e
// Output
printf ( Mach a n g l e i s %3 . 3 f d e g r e e , alp )
209
clc
clear
// I n p u t d a t a
a1 =2.2 // Area r a t i o (A/ At )
Po =10 // S t a g n a t i o n P r e s s u r e i n b a r
// C a l c u l a t i o n
//Two v a l u e s o f mach number a t a1 from g a s t a b l e s
M1 =0.275 // Mach number from g a s t a b l e s
p1 =0.949 // P r e s u r e r a t i o (P/Po )
P1 = Po * p1 // back p r e s s u r e i n b a r
M2 =2.295 // Mach number from g a s t a b l e s
p2 =0.0806 // P r e s u r e r a t i o (P/Po )
P2 = Po * p2 // back p r e s s u r e i n b a r
// Output
printf ( (A) When M=%3 . 3 f , back p r e s s u r e i s %3 . 2 f b a r \
n (B) When M=%3 . 3 f , back p r e s s u r e i s %3 . 3 f b a r ,M1
, P1 , M2 , P2 )
clc
clear
// I n p u t d a t a
M =0.8 // Mach number
T =20+273 // T e m p e r a t u r e i n K
k =1.4 // A d i a b a t i c c o n s t a n t
210
9 // C a l c u l a t i o n
10 To = T *(1+((( k -1) /2) * M ^2) ) // T e m p e r a t u r e o f
a i r at
nose of a i r c r a f t in K
11 To1 = To -273 // T e m p e r a t u r e o f a i r a t n o s e o f a i r c r a f t
in degree Centigrade
12
13
14
// Output
printf ( T e m p e r a t u r e o f a i r a t n o s e o f a i r c r a f t
. 1 f d e g r e e C e n t i g r a d e , To1 )
i s %3
clc
clear
// I n p u t d a t a
P =1 // P r e s s u r e i n b a r
T =400 // T e m p e r a t u r e i n K
C =400 // A i r v e l o c i t y i n m/ s
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t n a t
p r e s s u r e i n J / kgK
11
12 // C a l c u l a t i o n
13 To = T +( C ^2/(2* Cp ) ) // S t a g n a t i o n T e m p e r a t u r e i n K
14 Poi = P +(( P * C ^2) /( R * T *2) ) // S t a g n a t i o n P r e s s u r e ( i f
it
i s i n c o m p r e s s i b l e ) in bar
15 Poc = P *( To / T ) ^( k /( k -1) ) // S t a g n a t i o n P r e s s u r e ( i f
it
i s c o m p r e s s i b l e ) in bar
16
17
18
// Output
printf ( ( S t a g n a t i o n T e m p e r a t u r e i s %3 . 1 f K\n (C)
Stagnation Pressure :\ n
If it is incompressible
211
i s %3 . 4 f b a r \n
b a r ,To , Poi , Poc )
If
it
i s c o m p r e s s i b l e i s %3 . 4 f
clc
clear
// I n p u t d a t a
v1 =8 // I n t i a l volume i n l i t r e s
P1 =0.7 // I n t i a l p r e s s u r e i n MPa
v2 =7.8 // F i n a l volume i n l i t r e s
P2 =2.7 // F i n a l p r e s s u r e i n MPa
// C a l c u l a t i o n
k =( P2 - P1 ) /( log ( v1 / v2 ) ) // Bulk modulus o f e l a s t i c i t y
o f a l i q u i d i n MPa
// Output
printf ( Bulk modulus o f e l a s t i c i t y o f a l i q u i d i s %3
. 3 f MPa ,k )
p r e s s u r e i n J / kgK
7
8
// C a l c u l a t i o n
212
9
10
11
12
clc
clear
// I n p u t d a t a
M =0.25 // mach number
D =0.04 // Diamter i n m
f =0.002 // f r i c t i o n a l f a c t o r
// C a l c u l a t i o n
X =8.483 // f a n n o p a r a m e t e r from g a s t a b l e s a t M
Lmax =( X * D ) /(4* f ) // L e n g g t h o f t h e p i p e i n m
// Output
printf ( Length o f t h e p i p e i s %3 . 3 f m , Lmax )
Scilab code Exa 8.3.15 To find length of the pipe to achieve deceleration
1
2
3
4
5
6
7
clc
clear
// I n p u t d a t a
M =3 // mach number
D =0.04 // Diamter i n m
f =0.002 // f r i c t i o n a l f a c t o r
213
8
9 // C a l c u l a t i o n
10 X =0.522 // f a n n o p a r a m e t e r from g a s t a b l e s a t M
11 L =( X * D ) /(4* f ) // L e n g g t h o f t h e p i p e i n m
12
13 // Output
14 printf ( L e n g g t h o f t h e p i p e i s %3 . 2 f m ,L )
Scilab code Exa 8.3.31 To find maximum possible amount of heat transfer of combustion chamber
1
2
3
4
5
6
7
clc
clear
// I n p u t d a t a
M =0.2 // Mach number
To =120+273 // S t a g n a t i o n T e m p e r a t u r e i n K
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t n a t
p r e s s u r e i n J / kgK
8
9 // C a l c u l a t i o n
10 t1 =0.174 // T e m p e r a t u r e r a t i o
gas t a b l e s
11 Tot = To / t1 // C r i t i c a l s t a g n a t i o n t e m p e r a t u r e i n K
12 q = Cp *( Tot - To ) *10^ -3 //Maximum amount o f h e a t
t r a n s f e r i n kJ / kg
13
14
15
// Output
printf ( Maximum amount o f h e a t t r a n s f e r i s %3 . 2 f kJ /
kg ,q )
Scilab code Exa 8.3.32 To find increase in specific entropy of the fluid
214
1 clc
2 clear
3
4 // I n p u t d a t a
5 p1 =0.75 // P r e s s u r e
r a t i o ( Po2 / Po1 ) S i n c e S t a g n a t i o n
p r e s s u r e d r o p i s 25%
6 Cp =1150 // S p e c i f i c h e a t c a p a c i t y a t c o n s t n a t
p r e s s u r e i n J / kgK
7 k =1.33 // A d i a b a t i c c o n s t a n t
8
9 // C a l c u l a t i o n
10 ds =(( k -1) / k ) * Cp * log (1/ p1 ) // I n c r e a s e
in entropy in J
/ kgK
11
12
13
// Output
printf ( I n c r e a s e i n e n t r o p y i s %3 . 2 f J / kgK , ds )
clc
clear
// I n p u t d a t a
Mi =2.2 // I n l e t Mach number
T =100+273 // T e m p e r a t u r e i n K
Cp =1005 // S p e c i f i c h e a t c a p a c i t y a t c o n s t n a t
p r e s s u r e i n J / kgK
8
9 // C a l c u l a t i o n
10 t1 =0.508 // T e m p e r a t u r e r a t i o
i s e n t r o p i c g a s t a b l e s @Mi
11 To = T / t1 // S t a g n a t i o n T e m p e r a t u r e i n K
12 t2 =0.756 // T e m p e r a t u r e r a t i o ( To/ Tot ) from R a y l e i g h
g a s t a b l e s @Mi
13 Tot = To / t2 // C r i t i c a l
stagnation temperature in K
215
t r a n s f e r i n kJ / kg
15
16
17
// Output
printf ( Maximum amount o f h e a t t r a n s f e r i s %3 . 4 f kJ /
kg ,q )
Scilab code Exa 8.5.16 To find pressure acting on the front of the body
1
2
3
4
5
6
7
8
9
clc
clear
// I n p u t d a t a
Mx =1.5 // Mach number
P =40 // S t a t i c p r e s s u r e i n kPa
// C a l c u l a t i o n
p1 =3.413 // P r e s s u r e r a t i o i n ( Poy /Px ) from n o r m a l
s h o c k g a s t a b l e s @Mx
10 Poy = p1 * P // P r e s s u r e a c t i n g on f r o n t o f t h e body i n
kPa
11
12
13
// Output
printf ( P r e s s u r e a c t i n g on f r o n t o f t h e body i s %3 . 1
f kPa , Poy )
216
6
7 // C a l c u l a t i o n
8 p1 =4.5 // P r e s s u r e
r a t i o ( Py/Px ) from n o r m a l s h o c k
g a s t a b l e s @M
9 e = p1 -1 // S t r e n g t h o f s h o c k wave
10
11 // Output
12 printf ( S t r e n g t h o f s h o c k wave i s %3 . 1 f ,e )
clc
clear
// I n p u t d a t a
Mx =7 // mach number u p s t r e a m o f s h o c k
P =2 // p r e s s u r e @Mx i n b a r
T =57+273 // T e m p e r a t u r e @Mx i n K
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
p1 =0.72 // P r e s s u r e r a t i o ( Poy / Pox ) from n o r m a l s h o c k
g a s t a b l e s @Mx
12 ds = R * log (1/ p1 ) // I r r e v e r s i b i l i t y i n J / kgK
13
14
15
// Output
printf ( I r r e v e r s i b i l i t y
i s %3 . 2 f J / kgK , ds )
Scilab code Exa 8.5.21 To find mach number and air velocity of pitot
tube
1 clc
2 clear
217
3
4
5
6
7
8
9
10
11
12
13
// I n p u t d a t a
Px =45 // S t a t i c p r e s s u r e i n kPa
T = -20+273 // S t a t i c t e m p e r a t u r e i n K
Poy =395 // S t a g n a t i o n p r e s s u r e i n kPa
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
p1 = Poy / Px // P r e s s u r e r a t i o
Mx =2.536 // Mach number from n o r m a l s h o c k g a s t a b l e s
@p1
14 Cx = Mx * sqrt ( k * R * T ) // A i r v e l o c i t y i n m/ s
15
16
17
// Output
printf ( Mach number i s %3 . 3 f \n A i r v e l o c i t y i s %3i m
/ s ,Mx , Cx )
clc
clear
// I n p u t d a t a
Cx =750 // v e l o c i t y u p s t r e a m o f s h o c k i n m/ s
Px =1 // P r e s s u r e u p s t r e a m o f s h o c k i n b a r
Tx =10+273 // T e m p e r a t u r e u p s t r e a m o f s h o c k i n K
k =1.4 // A d i a b a t i c c o n s t a n t
R =287 // S p e c i f i c g a s c o n s t a n t i n J / kgK
// C a l c u l a t i o n
Mx = Cx / sqrt ( k * R * Tx ) // Mach number u p s t r e a m o f s h o c k
My =0.545 // Mach number downstream o f s h o c k from
normal shock gas t a b l e s , Mistake i n t e x t bo o k
14 t1 =1.875 // T e m p e r a t u r e r a t i o ( Ty/Tx )
218
15 Ty = Tx * t1 // S t a t i c
t e m p e r a t u r e downstream o f s h o c k i n
K
16 p1 =5.583 // P r e s s u r e r a t i o ( Py/Px )
17 Py = Px * p1 // S t a t i c p r e s s u r e downstream o f s h o c k i n
bar
18 Cy = My * sqrt ( k * R * Ty ) // v e l o c i t y downstream o f s h o c k i n
m/ s
19
20
21
// Output
printf ( Downstream o f s h o c k : \ n
V e l o c i t y i s %3 . 3 f
m/ s \n
P r e s s u r e i s %3 . 3 f b a r \n
Temperature
i s %3 . 3 f K ,Cy , Py , Ty )
Scilab code Exa 8.6.41 To find propulsive efficiency for an optimum thrust
power
1 clc
2 clear
3
4 // C a l c u l a t i o n
5
6 // D i f f e r e n t i a t i n g P=m ( Cju ) u and e q u a t i n g
i t to
z e r o we g e t j e t s p e e d r a t i o a s 0 . 5
7 sig =0.5 // J e t s p e e d r a t i o
8 eff_max =((2* sig ) /(1+ sig ) ) // P r o p u l s i v e e f f i c i e n c y
f o r optimum t h r u s t power , wrong n o t a t i o n i n
textbook .
9
10
11
// Output
printf ( P r o p u l s i v e e f f i c i e n c y f o r optimum t h r u s t
power i s %3 . 3 f , eff_max )
1
2
3
4
5
6
7
8
9
10
11
12
13
clc
clear
// I n p u t d a t
u =1200*(5/18) // F l i g h t v e l o c i t y i n m/ s
Cj =800 // E f f e c t i v e j e t v e l o c i t y i n m/ s
// C a l c u l a t i o n
sig = u / Cj // j e t s p e e d r a t i o
eff =((2* sig ) /(1+ sig ) ) *100 // P r o p u l s i v e e f f i c i e n c y i n
%
// Output
printf ( P r o p u l s i v e e f f i c i e n c y
i s %3 . 1 f p e r c e n t , eff )
clc
clear
// I n p u t d a t a
m =5 // P r o p e l l e n t r a t e i n kg / s
Pamb =1.013 // Ambient p r e s s u r e i n b a r
Pe =1.02 // N o z z l e e x i t p r e s s u r e i n b a r
D =0.1 // N o z z l e e x i t d i a m e t e r i n m
Ce =1400 // E x i t j e t v e l o c i t y i n m/ s
// C a l c u l a t i o n
Ae = %pi * D ^2/4 // E x i t a r e a i n m2
F =( m * Ce ) +(( Pe - Pamb ) * Ae ) // T h r u s t i n N
// Output
printf ( T h r u s t i s %3i N ,F )
220
clc
clear
// I n p u t d a t a
Is =230 // S p e c i f i c I m p u l s e i n s e c
m =1 // P r o p e l l e n t f l o w i n kg / s
g =9.81 // A c c e l e r a t i o n due t o g r a v i t y i n m/ s 2
// C a l c u l a t i o n
F = m * Is * g // T h r u s t i n N
// Output
printf ( T h r u s t i s %3 . 1 f N ,F )
degree polynomial of s i g
10 sig =((2 -( sqrt (4 -(4* eff * eff ) ) ) ) /(2* eff ) ) // J e t s p e e d
ratio
11 Cj = u / sig // J e t v e l o c i t y i n m/ s
12
221
13
14
// Output
printf ( J e t v e l o c i t y i s %3 . 2 f m/ s , Cj )
Scilab code Exa 8.7.46 To calculate thrust propulsive efficiency and thrust
power of a rocket
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
clc
clear
// I n p u t d a t a
Cj =2700 // J e t v e l o c i t y i n m/ s
u =1350 // F l i g h t v e l o c i t y i n m/ s
m =78.6 // P r o p e l l e n t f l o w i n kg / s
// C a l c u l a t i o n
F = m * Cj *10^ -3 // T h r u s t i n kN
P = F * u *10^ -3 // T h r u s t power i n MW
sig = u / Cj // J e t s p e e d r a t i o
eff =((2* sig ) /(1+ sig ^2) ) *100 // P r o p u l s i v e e f f i c i e n c y
in %
// Output
printf ( T h r u s t i s %3 . 1 f kN\n T h r u s t power i s %3 . 2 f
MW\n P r o p u l s i v e e f f i c i e n c y i s %3i p e r c e n t ,F ,P ,
eff )
Scilab code Exa 8.7.47 To determine orbital velocity and escape velocity
of a rocket
1 clc
2 clear
3
4 // I n p u t d a t a
222
5 D =12683*1000 // D i a m e t e r o f E a r t h i n m
6 g =9.81 // A c c e l e r a t i o n due t o g r a v i t y i n m/ s
7 h =500*1000 // A l t i t u d e i n m
8
9 // C a l c u l a t i o n
10 Uorb =( D /2) * sqrt ( g /(( D /2) + h ) ) // O r b i t a l v e l o c i t y
11
12
13
14
in m
/s
Uesc = sqrt (2) * Uorb // E s c a p e v e l o c i t y i n m/ s
// Output
printf ( O r b i t a l v e l o c i t y i s %3 . 2 f m/ s \n E s c a p e
v e l o c i t y i s %3 . 2 f m/ s , Uorb , Uesc )
clc
clear
// I n p u t d a t a
u =10080*(5/18) // F l i g h t v e l o c i t y i n m/ s
Cj =1400 // J e t v e l o c i t y i n m/ s
m =5 // P r o p e l l e n t f l o w i n kg / s
// c a l c u l a t i o n
F = m * Cj *10^ -3 // T h r u s t i n kN
P = F * u *10^ -3 // T h r u s t power i n MW
sig = u / Cj // J e t s p e e d r a t i o
eff =((2* sig ) /(1+ sig ^2) ) // P r o p u l s i v e e f f i c i e n c y
// Output
printf ( P r o p u l s i v e power i s %3 . 1 f MW\n P r o p u l s i v e
e f f i c i e n c y i s %3 . 1 f ,P , eff )
223