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 /494/CH8 | |
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 '494/CH8')
-rwxr-xr-x | 494/CH8/EX8.1/8_1.sce | 38 | ||||
-rwxr-xr-x | 494/CH8/EX8.10/8_10.sce | 25 | ||||
-rwxr-xr-x | 494/CH8/EX8.11/8_11.sce | 26 | ||||
-rwxr-xr-x | 494/CH8/EX8.13/8_13.sce | 12 | ||||
-rwxr-xr-x | 494/CH8/EX8.14/8_14.sce | 19 | ||||
-rwxr-xr-x | 494/CH8/EX8.2/8_2.sce | 14 | ||||
-rwxr-xr-x | 494/CH8/EX8.3/8_3.sce | 19 | ||||
-rwxr-xr-x | 494/CH8/EX8.4/8_4.sce | 14 | ||||
-rwxr-xr-x | 494/CH8/EX8.5/8_5.sce | 23 | ||||
-rwxr-xr-x | 494/CH8/EX8.6/8_6.sce | 19 | ||||
-rwxr-xr-x | 494/CH8/EX8.7/8_7.sce | 18 | ||||
-rwxr-xr-x | 494/CH8/EX8.8/8_8.sce | 26 | ||||
-rwxr-xr-x | 494/CH8/EX8.9/8_9.sce | 27 |
13 files changed, 280 insertions, 0 deletions
diff --git a/494/CH8/EX8.1/8_1.sce b/494/CH8/EX8.1/8_1.sce new file mode 100755 index 000000000..b29ab05eb --- /dev/null +++ b/494/CH8/EX8.1/8_1.sce @@ -0,0 +1,38 @@ +//All the quantities are expressed in SI units
+
+R = 287;
+gam = 1.4;
+V_inf = 250;
+
+//(a)
+//At sea level
+T_inf = 288;
+
+//the velocity of sound is given by
+a_inf = sqrt(gam*R*T_inf);
+
+//thus the mach number can be calculated as
+M_inf = V_inf/a_inf;
+
+printf("\n(a)\nThe Mach number at sea level is:\n M_inf = %1.3f\n",M_inf)
+
+//similarly for (b) and (c)
+//(b)
+//at 5km
+T_inf = 255.7;
+
+a_inf = sqrt(gam*R*T_inf);
+
+M_inf = V_inf/a_inf;
+
+printf("\n(b)\nThe Mach number at 5 km is:\n M_inf = %1.2f\n",M_inf)
+
+//(c)
+//at 10km
+T_inf = 223.3;
+
+a_inf = sqrt(gam*R*T_inf);
+
+M_inf = V_inf/a_inf;
+
+printf("\n(c)\nThe Mach number at 10 km is:\n M_inf = %1.3f\n",M_inf)
\ No newline at end of file diff --git a/494/CH8/EX8.10/8_10.sce b/494/CH8/EX8.10/8_10.sce new file mode 100755 index 000000000..c09469861 --- /dev/null +++ b/494/CH8/EX8.10/8_10.sce @@ -0,0 +1,25 @@ +//All the quantities are expressed in SI units
+
+M_inf = 2; //freestream mach number
+p_inf = 2.65e4; //freestream pressure
+T_inf = 223.3; //freestream temperature
+
+//from Appendix A, for M = 2
+p0_inf = 7.824*p_inf; //freestream total pressure
+T0_inf = 1.8*T_inf; //freestream total temperature
+
+//from Appendix B, for M = 2
+p0_1 = 0.7209*p0_inf; //total pressure downstream of the shock
+T0_1 = T0_inf; //total temperature accross the shock is conserved
+
+//since the flow downstream of the shock is isentropic
+p0_2 = p0_1;
+T0_2 = T0_1;
+
+//from Appendix A, for M = 0.2 at point 2
+p2 = p0_2/1.028;
+T2 = T0_2/1.008;
+
+p2_atm = p2/102000;
+
+printf("\nRESULTS\n---------\nThe pressure at point 2 is:\n p2 = %1.2f atm\n",p2_atm)
\ No newline at end of file diff --git a/494/CH8/EX8.11/8_11.sce b/494/CH8/EX8.11/8_11.sce new file mode 100755 index 000000000..ad6ae69c3 --- /dev/null +++ b/494/CH8/EX8.11/8_11.sce @@ -0,0 +1,26 @@ +//All the quantities are expressed in SI units
+
+M_inf = 10; //freestream mach number
+p_inf = 2.65e4; //freestream pressure
+T_inf = 223.3; //freestream temperature
+
+//from Appendix A, for M = 2
+p0_inf = 0.4244e5*p_inf; //freestream total pressure
+T0_inf = 21*T_inf; //freestream total temperature
+
+//from Appendix B, for M = 2
+p0_1 = 0.003045*p0_inf; //total pressure downstream of shock
+T0_1 = T0_inf; //total temperature downstream of shock is conserved
+
+//since the flow downstream of the shock is isentropic
+p0_2 = p0_1;
+T0_2 = T0_1;
+
+//from Appendix A, for M = 0.2 at point 2
+p2 = p0_2/1.028;
+T2 = T0_2/1.008;
+
+p2_atm = p2/102000;
+
+
+printf("\nRESULTS\n---------\nThe pressure at point 2 is:\n p2 = %2.1f atm\n",p2_atm)
\ No newline at end of file diff --git a/494/CH8/EX8.13/8_13.sce b/494/CH8/EX8.13/8_13.sce new file mode 100755 index 000000000..3d49c216e --- /dev/null +++ b/494/CH8/EX8.13/8_13.sce @@ -0,0 +1,12 @@ +//All the quantities are expressed in SI units
+
+p1 = 4.66e4; //ambient pressure
+M = 8; //mach number
+
+//from Appendix B, for M = 8
+p0_2 = 82.87*p1; //total pressure downstream of the shock
+
+//since the flow is isentropic downstream of the shock, total pressure is conserved
+ps_atm = p0_2/101300; //pressure at the stagnation point
+
+printf("\nRESULTS\n---------\nThe pressure at the nose is:\n p_s = %2.1f atm\n",ps_atm)
\ No newline at end of file diff --git a/494/CH8/EX8.14/8_14.sce b/494/CH8/EX8.14/8_14.sce new file mode 100755 index 000000000..335e585d9 --- /dev/null +++ b/494/CH8/EX8.14/8_14.sce @@ -0,0 +1,19 @@ +//All the quantities are expressedin SI units
+
+p1 = 2527.3; //ambient pressure at the altitude of 25 km
+T1 = 216.66; //ambient temperature at the altitude of 25 km
+p0_1 = 38800; //total pressure
+gam = 1.4; //ratio of specific heats
+R = 287; //universal gas constant
+pressure_ratio = p0_1/p1; //ratio of total to static pressure
+
+//for this value of pressure ratio, mach number is
+M1 = 3.4;
+
+//the speed of sound is given by
+a1 = sqrt(gam*R*T1)
+
+//thus the velocity can be calculated as
+V1 = M1*a1;
+
+printf("\nRESULTS\n---------\nThe Velocity of the airplane is:\n V1 = %4.0f m/s\n",V1)
\ No newline at end of file diff --git a/494/CH8/EX8.2/8_2.sce b/494/CH8/EX8.2/8_2.sce new file mode 100755 index 000000000..172a95fd3 --- /dev/null +++ b/494/CH8/EX8.2/8_2.sce @@ -0,0 +1,14 @@ +//All the quantities are expressed in SI units
+
+T = 320; //static temperature
+V = 1000; //velocity
+gam = 1.4; //ratio of specific heats
+R = 287; //universal gas constant
+
+//the speed of sound is given by
+a = sqrt(gam*R*T);
+
+//the mach number can be calculated as
+M = V/a;
+
+printf("\nRESULTS\n---------\nThe Mach number is:\n M = %1.2f\n",M)
\ No newline at end of file diff --git a/494/CH8/EX8.3/8_3.sce b/494/CH8/EX8.3/8_3.sce new file mode 100755 index 000000000..e914df910 --- /dev/null +++ b/494/CH8/EX8.3/8_3.sce @@ -0,0 +1,19 @@ +//All the quantities are expressed in SI units
+
+gam = 1.4; //ratio of specific heats
+
+//(a)
+M = 2; //Mach number
+
+//the ratio of kinetic energy to internal energy is given by
+ratio = gam*(gam-1)*M*M/2;
+
+printf("\n(a)\nThe ratio of kinetic energy to internal energy is:\n\n %1.2f\n",ratio)
+
+//similarly for (b)
+//(b)
+M = 20;
+
+ratio = gam*(gam-1)*M*M/2;
+
+printf("\n(b)\nThe ratio of kinetic energy to internal energy is:\n\n %3.0f\n",ratio)
\ No newline at end of file diff --git a/494/CH8/EX8.4/8_4.sce b/494/CH8/EX8.4/8_4.sce new file mode 100755 index 000000000..b3ff15b2b --- /dev/null +++ b/494/CH8/EX8.4/8_4.sce @@ -0,0 +1,14 @@ +//All the quantities are expressed in SI units
+
+M = 2.79; //Mach number
+T = 320; //static temperature from ex. 7.3
+p = 1; //static pressure in atm
+gam = 1.4;
+
+//from eq. (8.40)
+T0 = T*(1+((gam-1)/2*M*M));
+
+//from eq. (8.42)
+p0 = p*((1+((gam-1)/2*M*M))^(gam/(gam-1)));
+
+printf("\nRESULTS\n---------\nThe total temperature and pressure are:\n T0 = %3.0f K\n P0 = %2.1f atm\n",T0,p0)
\ No newline at end of file diff --git a/494/CH8/EX8.5/8_5.sce b/494/CH8/EX8.5/8_5.sce new file mode 100755 index 000000000..7013ea9f1 --- /dev/null +++ b/494/CH8/EX8.5/8_5.sce @@ -0,0 +1,23 @@ +//All the quantities are expressed in SI units
+
+M = 3.5; //Mach number
+T = 180; //static temperature from ex. 7.3
+p = 0.3; //static pressure in atm
+gam = 1.4;
+R = 287;
+
+//from eq. (8.40)
+T0 = T*(1+((gam-1)/2*M*M));
+
+//from eq. (8.42)
+p0 = p*((1+((gam-1)/2*M*M))^(gam/(gam-1)));
+
+a = sqrt(gam*R*T);
+V = a*M;
+
+//the values at local sonic point are given by
+T_star = T0*2/(gam+1);
+a_star = sqrt(gam*R*T_star);
+M_star = V/a_star;
+
+printf("\nRESULTS\n---------\n T0 = %3.0f K\n P0 = %2.1f atm\n T* = %3.1f k\n a* = %3.0f m/s\n M* = %1.2f",T0,p0,T_star,a_star,M_star)
\ No newline at end of file diff --git a/494/CH8/EX8.6/8_6.sce b/494/CH8/EX8.6/8_6.sce new file mode 100755 index 000000000..48a5b2593 --- /dev/null +++ b/494/CH8/EX8.6/8_6.sce @@ -0,0 +1,19 @@ +//All the quantities are expressed in SI units
+
+p_inf = 1;
+p1 = 0.7545;
+M_inf = 0.6;
+gam = 1.4;
+
+//from eq. (8.42)
+p0_inf = p_inf*((1+((gam-1)/2*M_inf*M_inf))^(gam/(gam-1)));
+
+p0_1 = p0_inf;
+
+//from eq. (8.42)
+ratio = p0_1/p1;
+
+//from appendix A, for this ratio, the Mach number is
+M1 = 0.9;
+
+printf("\nRESULTS\n---------\nThe mach number at the given point is:\n M1 = %1.1f\n",M1)
\ No newline at end of file diff --git a/494/CH8/EX8.7/8_7.sce b/494/CH8/EX8.7/8_7.sce new file mode 100755 index 000000000..43ffa89fa --- /dev/null +++ b/494/CH8/EX8.7/8_7.sce @@ -0,0 +1,18 @@ +//All the quantities are expressed in SI units
+
+T_inf = 288; //freestream temperature
+p_inf = 1; //freestream pressure
+p1 = 0.7545; //pressure at point 1
+M = 0.9; //mach number at point 1
+gam = 1.4; //ratio of specific heats
+
+//for isentropic flow, from eq. (7.32)
+T1 = T_inf*((p1/p_inf)^((gam-1)/gam));
+
+//the speed of sound at that point is thus
+a1 = sqrt(gam*R*T1);
+
+//thus, the velocity can be given as
+V1 = M*a1;
+
+printf("\nRESULTS\n---------\nThe velocity at the given point is:\n V1 = %3.0f m/s\n",V1)
\ No newline at end of file diff --git a/494/CH8/EX8.8/8_8.sce b/494/CH8/EX8.8/8_8.sce new file mode 100755 index 000000000..8de9622cd --- /dev/null +++ b/494/CH8/EX8.8/8_8.sce @@ -0,0 +1,26 @@ +//All the quantities are expressed in SI units
+
+u1 = 680; //velocity upstream of shock
+T1 = 288; //temperature upstream of shock
+p1 = 1; //pressure upstream of shock
+gam = 1.4; //ratio of specific heats
+R = 287; //universal gas constant
+
+//the speed of sound is given by
+a1 = sqrt(gam*R*T1)
+
+//thus the mach number is
+M1 = 2;
+
+//from Appendix B, for M = 2, the relations between pressure and temperature are given by
+pressure_ratio = 4.5; //ratio of pressure accross shock
+temperature_ratio = 1.687; //ratio of temperature accross shock
+M2 = 0.5774; //mach number downstream of shock
+
+//thus the values downstream of the shock can be calculated as
+p2 = pressure_ratio*p1;
+T2 = temperature_ratio*T1;
+a2 = sqrt(gam*R*T2);
+u2 = M2*a2;
+
+printf("\nRESULTS\n---------\n p2 = %1.1f atm\n T2 = %3.0f K\n u2 = %3.0f m/s",p2,T2,u2)
\ No newline at end of file diff --git a/494/CH8/EX8.9/8_9.sce b/494/CH8/EX8.9/8_9.sce new file mode 100755 index 000000000..ada86a410 --- /dev/null +++ b/494/CH8/EX8.9/8_9.sce @@ -0,0 +1,27 @@ +//All the quantities are expressed in SI units
+
+p1 = 1; //ambient pressure upstream of shock
+
+
+//(a)
+//for M = 2;
+p0_1 = 7.824*p1; //total pressure upstream of shock
+pressure_ratio = 0.7209; //ratio of total pressure accross the shock
+p0_2 = pressure_ratio*p0_1; //total pressure downstream of shock
+
+//thus the total loss of pressure is given by
+pressure_loss = p0_1 - p0_2;
+
+printf("\nRESULTS\n---------\nThe total pressure loss is:\n(a) P0_loss = %1.3f atm\n",pressure_loss)
+
+//similarly
+//(b)
+//for M = 4;
+p0_1 = 151.8*p1;
+pressure_ratio = 0.1388;
+p0_2 = pressure_ratio*p0_1;
+
+//thus the total loss of pressure is given by
+pressure_loss = p0_1 - p0_2;
+
+printf("\n(b) P0_loss = %3.1f atm\n",pressure_loss)
\ No newline at end of file |