summaryrefslogtreecommitdiff
path: root/443/CH8/EX8.4/8_4.sce
diff options
context:
space:
mode:
Diffstat (limited to '443/CH8/EX8.4/8_4.sce')
-rwxr-xr-x443/CH8/EX8.4/8_4.sce22
1 files changed, 22 insertions, 0 deletions
diff --git a/443/CH8/EX8.4/8_4.sce b/443/CH8/EX8.4/8_4.sce
new file mode 100755
index 000000000..45a28d7f3
--- /dev/null
+++ b/443/CH8/EX8.4/8_4.sce
@@ -0,0 +1,22 @@
+pathname=get_absolute_file_path('8_4.sce')
+filename=pathname+filesep()+'8_4_data.sci'
+exec(filename)
+h=0:6000
+h1=h/(1)
+[m n]=size(h1)
+for i=1:n
+//Temperature at h(in K)
+Tal(i)=Tsl-0.0065*(h1(i));
+//Variation in air pressure
+pal(i)=1/(10^(h1(i)/19200));
+//Density at sea level
+Psl=(psl*10^5)/(R*Tsl)
+//Density at height h
+Pal(i)=(pal(i)*10^5)/(R*Tal(i));
+//Air fuel ratio at height h
+AFal=AFsl*sqrt(Pal/Psl)
+end;
+//Plotting Air fuel ratio and Height
+plot(h1,AFal)
+legend(['Air fuel ratio';'Height']);
+xtitle('Air fuel ratio vs Height','Height(in m)','Airfuel ratio') \ No newline at end of file