summaryrefslogtreecommitdiff
path: root/839/CH6/EX6.2
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /839/CH6/EX6.2
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '839/CH6/EX6.2')
-rwxr-xr-x839/CH6/EX6.2/Example_6_2.sce57
1 files changed, 57 insertions, 0 deletions
diff --git a/839/CH6/EX6.2/Example_6_2.sce b/839/CH6/EX6.2/Example_6_2.sce
new file mode 100755
index 000000000..4abb1d09a
--- /dev/null
+++ b/839/CH6/EX6.2/Example_6_2.sce
@@ -0,0 +1,57 @@
+//clear//
+clear;
+clc;
+
+//Example 6.2
+//Given
+Tr = 1000; //[R]
+pr = 20; //[atm]
+Ma_a = 0.05;
+gama = 1.4;
+gc = 32.174; //[ft-lb/lbf-s^2]
+M = 29;
+R = 1545;
+//(a)
+//Using Eq.(6.45)
+A = 2*(1+((gama-1)/2)*Ma_a^2)/((gama+1)*Ma_a^2);
+fLmax_rh = (1/Ma_a^2-1-(gama+1)*log(A)/2)/gama
+
+//(b)
+//Using Eq.(6.28), the pressure at the end of the isentropic nozzle pa
+A = (1+(gama-1)*(Ma_a^2)/2);
+pa = pr/(A^(gama/(gama-1))) // [atm]
+//From Example 6.1, the density of air at 20atm and 1000R is 0.795 lb/ft^3
+//Using Eq.(6.17), the acoustic velocity
+Aa = sqrt(gc*gama*Tr*R/M) //[m/s]
+//The velocity at the entrance of the pipe
+ua = Ma_a*Aa //[m/s]
+//When L_b = L_max, the gas leaves the pipe at the asterisk conditions, where
+Ma_b = 1;
+// Using Eq.(6.43)
+A = (gama-1)/2;
+Tstar = Tr *(1+A*Ma_a^2)/(1+A*Ma_b^2) // [K]
+// Using Eq.(6.44)
+rho_star = 0.795*Ma_a/sqrt(2*(1+(gama-1)*Ma_a^2/2)/(2.4)) //[lb/ft^3]
+//Using Eq.(6.39)
+pstar = p0*Ma_a/sqrt(1.2) // [atm]
+//Mass velocity through the entire pipe
+G = 0.795*ua //[lb/ft^2-s]
+ustar = G/rho_star //[ft/s]
+
+//(c)
+//Using Eq.(6.45) with f_Lmax_rh = 400
+
+err = 1;
+eps = 10^-3;
+Ma_ac = rand(1,1);
+i =1;
+while((err>eps))
+ A = 2*(1+((gama-1)/2)*Ma_ac^2)/((gama+1)*Ma_ac^2);
+ B = gama*400+1+(gama+1)*log(A)/2;
+ Ma_anew = sqrt(1/B);
+ err = Ma_ac-Ma_anew;
+ Ma_ac = Ma_anew;
+end
+Ma_ac;
+uac = Ma_ac*ua/Ma_a //[ft/s]
+Gc = uac*0.795 //[lb/ft^2-s]