diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /557/CH2/EX2.4 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '557/CH2/EX2.4')
-rwxr-xr-x | 557/CH2/EX2.4/4.sce | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/557/CH2/EX2.4/4.sce b/557/CH2/EX2.4/4.sce new file mode 100755 index 000000000..f744daeab --- /dev/null +++ b/557/CH2/EX2.4/4.sce @@ -0,0 +1,17 @@ +clc ;funcprot(0);
+//Example 2.4
+
+//Initializing the variables
+p1 = 101*10^3;//Initial Pressure
+z1 = 0;//Initial Height
+z2 = 7000;//Final Height
+T1 = 15+273;//Initial Temperature
+g = 9.81;//Acceleration due to gravity
+R = 287;//Gas Constant
+dT = 6.5/1000;//Rate of Variation of Temperature
+
+//Calculations
+p2 = p1*(1-dT*(z2-z1)/T1)^(g/(R*dT));
+T2 = T1 - dT*(z2-z1);
+rho2 = p2/(R*T2);
+disp(rho2,"Final Density (kg/m3 ):",p2/1000,"Final Pressure (kN/m2) :");
|