summaryrefslogtreecommitdiff
path: root/896/CH2/EX2.5/5.sce
blob: 03c23ebf3958790c79d59df42a3b4bd762af4d97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
clc
//calc pressuer at different heights considering on density change in air
p_atm=14.7;//psia
g=9.81;//m/s^2
//P2=P1*[1-(acc. due to gravity)*(mass of air)*(height)/(univ. gas const.)/(temp.)]
T=289;//K
R=8314//N.m^2/Kmol/K
//for height of 1000ft=304.8m
h=304.8//m
p_1000=p_atm*[1-g*29*h/R/T];
disp("pressure at 1000ft is")
disp(p_1000)
disp("psia")
//for height of 10000ft=3048m
h=3048//m
p_10000=p_atm*[1-g*29*h/R/T];
disp("pressure at 10000ft is")
disp(p_10000)
disp("psia")
//for height of 100000ft=30480m
h=30480//m
p_100000=p_atm*[1-g*29*h/R/T];
disp("pressure at 100000ft is")
disp(p_100000)
disp("psia")
//NOTE that the pressure comes out to be negative at 100000ft justifying that density of air changes with altitude