summaryrefslogtreecommitdiff
path: root/1271/CH8/EX8.2/example8_2.sce
blob: 3c91cb151098c725a5305fdfc79ca616c2c3e212 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
clc 
// Given that
T = 373 // temperature in kelvin
d = 1.293e-3 // density of air at S.T.P. in gm/cm^3
d_ = 13.6 // density of mercury in gm/cm^3
s = 0.2417 // specific heat of air at constant pressure 
s_ = 0.1715 // specific heat of air at constant volume
g = 980 // gravitational constant i dynes/cm^3
// Sample Problem 2 on page no. 8.18
printf("\n # PROBLEM 2 # \n")
printf(" Standard formula used \n")
printf(" nu = (gamma*p/rho)^1/2  \n gamma = C_p/C_v \n p =rho*g*h \n" )
p = 76 * d_ * g
gama = s / s_
v = sqrt(gama * (p / d))
v_ = v * sqrt(T / 273)
printf("\n Velocity of sound in the air in %f cm/sec.",v_)