summaryrefslogtreecommitdiff
path: root/3720/CH12/EX12.2/Ex12_2.sce
blob: a64d238c5e8233c31ec13e1e8c1ddccf8af7d51b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//Example 12_2
clc;clear;funcprot(0);
// Given values
V=200;// Velocity in m/s
T=303;// Temperature in K
//Properties
k=1.4;// The specific heat ratio
R=0.287;//The gas constant of air in kJ/(kg.K)

//Calculation
//(a)
c=sqrt(k*R*T*1000);//The speed of sound in air at 30°C in m/s
printf('(a)The speed of sound in air at 30°C ,c=%0.0f m/s\n',c);
//(b)
Ma=V/c;
printf('(b)The Mach number ,Ma=%0.3f \n',Ma);