summaryrefslogtreecommitdiff
path: root/914/CH7/EX7.22/ex7_22.sce
blob: 58cd4271fde4d878da197727936c7249f45725c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
clc;
warning("off");
printf("\n\n example7.22 - pg321");
// given
To=545.67;  //[degR] -  air temperature at beach level
betaa=-0.00357;  //[degR/ft] - constant
R=1545;  //[Torr*ft^3/degR*mole] - gas constant
M=29;
deltaz=25000;  //[ft]
// using the equation ln(p/po)=((M)/(R*betaa))*ln(To/(To+betaa*deltaz)
p=po*exp(((M)/(R*betaa))*log(To/(To+betaa*deltaz)));
printf("\n\n p=%fTorr",p);
// using the equation T=To+betaa*deltaz
T=To+betaa*deltaz;
printf("\n\n T=%fdegR",T);