summaryrefslogtreecommitdiff
path: root/3765/CH3
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3765/CH3
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '3765/CH3')
-rw-r--r--3765/CH3/EX3.10/Ex3_10.sce23
-rw-r--r--3765/CH3/EX3.13/Ex3_13.sce18
-rw-r--r--3765/CH3/EX3.2/Ex3_2.sce31
-rw-r--r--3765/CH3/EX3.3/Ex3_3.sce30
-rw-r--r--3765/CH3/EX3.4/Ex3_4.sce37
-rw-r--r--3765/CH3/EX3.6/Ex3_6.sce17
-rw-r--r--3765/CH3/EX3.7/Ex3_7.sce20
7 files changed, 176 insertions, 0 deletions
diff --git a/3765/CH3/EX3.10/Ex3_10.sce b/3765/CH3/EX3.10/Ex3_10.sce
new file mode 100644
index 000000000..4becf3099
--- /dev/null
+++ b/3765/CH3/EX3.10/Ex3_10.sce
@@ -0,0 +1,23 @@
+clc
+// Example 3.10.py
+// In example 3.9, how much heat per unit mass must be added to choke the flow//
+
+
+// Variable declaration from example 3.9
+To1 = 840 // upstream total temperature (in K)
+M1 = 3.0 // upstream mach number
+To1_by_Tostar = 0.6540 // To1/Tostar from Table A3
+cp = 1004.5 // specific heat at constant pressure for air (in J/Kg K)
+
+// Calculations
+Tostar = To1 / To1_by_Tostar // Tostar = To1 * Tostar/To1 (in K)
+
+M2 = 1.0 // for choked flow
+To2 = Tostar // since M2 = 1.0
+
+q = cp * (To2 - To1) // required heat = cp(To2 - To1) (in J/kg)
+
+
+// Result
+printf("\n Heat require to choke the flow is %.2e J/kg", q)
+
diff --git a/3765/CH3/EX3.13/Ex3_13.sce b/3765/CH3/EX3.13/Ex3_13.sce
new file mode 100644
index 000000000..f4d3590d0
--- /dev/null
+++ b/3765/CH3/EX3.13/Ex3_13.sce
@@ -0,0 +1,18 @@
+clc
+// Example 3.13.py
+// In example 3.12, what is the length of the duct required to choke the flow//
+
+
+// Variable declaration from example 3.12
+M1 = 3.0 // mach number
+C1 = 0.5222 // C1 = 4*f*L1star/D
+f = 0.005 // friction coefficient
+D = 0.4 // diameter of pipe (in ft)
+
+// Calculations
+L1star = 0.5222 * D/4.0/f
+
+
+// Result
+printf("\n Length required to choke the flow is %.2f ft", L1star)
+
diff --git a/3765/CH3/EX3.2/Ex3_2.sce b/3765/CH3/EX3.2/Ex3_2.sce
new file mode 100644
index 000000000..b845282e5
--- /dev/null
+++ b/3765/CH3/EX3.2/Ex3_2.sce
@@ -0,0 +1,31 @@
+clc
+// Example 3.2.py
+// Return to Example 1.6, Calculate the Mach Number and velocity at the exit of the rocket
+// nozzle.
+
+// Variable declaration from example 1.6
+pc = 15.0 // pressure combustion chamber (atm)
+Tc = 2500.0 // temperature combustion chamber (K)
+mol_wt = 12.0 // molecular weight (gm)
+cp = 4157.0 // specific heat at constant pressure (J/Kg/K)
+
+Tn = 1350.0 // temperature at nozzle exit (K)
+
+// Calculations
+R = 8314.0/mol_wt // gas constant = R_prime/mo_wt, R_prime = 8314 J/K
+cv = cp - R // specific heat at constant volume (J/Kg k)
+gamma1 = cp/cv // ratio of specific heat
+
+pn_by_pc = (Tn/Tc** gamma1/(gamma1-1)) // ratio of pressure for isentropic process** pn/pc
+
+Mn = (2/(gamma1-1)*((1/pn_by_pc**(gamma1-1)/gamma1) - 1)** 0.5) // Mach number at exit** from isentropic flow relation
+
+an = (gamma1*R*Tn** 0.5) // Speed of sound at exit (m/s)
+Vn = Mn*an // Velocity at exit (m/s)
+
+
+// Result
+printf("\n Mach number at the exit of the rocket nozzle is %.3f",(Mn))
+
+printf("\n Velocity at the exit of the rocket nozzle is %.1f m/s",(Vn))
+
diff --git a/3765/CH3/EX3.3/Ex3_3.sce b/3765/CH3/EX3.3/Ex3_3.sce
new file mode 100644
index 000000000..91e85eaf0
--- /dev/null
+++ b/3765/CH3/EX3.3/Ex3_3.sce
@@ -0,0 +1,30 @@
+clc
+// Example 3.3.py
+// Return to Example 1.1, calculate the percentage density change between the given point
+// on the wing and the free-stream, assuming compressible flow.
+
+// Variable declaration from example 1.1
+rho_1 = 0.002377 // density at sea level (slug/ft^3)
+T_1 = 519.0 // temperature at sea level (R)
+v_1 = 100.0 // velocity far ahead of the wing (mi/h)
+v_2 = 150.0 // velocity at some point on the wing (mi/h)
+gamma1 = 1.4 // ratio of specific heat capacity for air
+R = 1716.0 // gas constant (ft lbf/slug/R)
+
+// Calculations
+cp = gamma1*R/(gamma1-1) // specific heat capacity at constant pressure (ft lb/ slug / R)
+u_1 = v_1 * 88.0/60.0 // converting v_1 in ft/s
+u_2 = v_2 * 88.0/60.0 // converting v_2 in ft/s
+
+T_2 = T_1 + (u_1*u_1 - u_2*u_2)/cp/2.0 // temperature at a point from energy equation (R)
+
+rho_2_by_rho_1 = ((T_2/T_1)** 1/(gamma1-1))// density ratio from isentropic flow relation
+
+rho_2 = rho_2_by_rho_1 * rho_1 // density at the point (slug/ ft^3)
+
+delrho = rho_1 - rho_2 // change in density (slug/ ft^3)
+fracrho = delrho/rho_1 // fractional change in density
+
+// Result
+printf("\n Percentage change in density is %.1f",(fracrho*100))
+
diff --git a/3765/CH3/EX3.4/Ex3_4.sce b/3765/CH3/EX3.4/Ex3_4.sce
new file mode 100644
index 000000000..3f4dc9308
--- /dev/null
+++ b/3765/CH3/EX3.4/Ex3_4.sce
@@ -0,0 +1,37 @@
+clc
+// Example 3.4.py
+// A normal shock wave is standing in the test section of a supersonic wind tunnel.
+// Upstream of the wave, M1 = 3, p1 = 0.5 atm, and T1 = 200 K. Find M2, p2, T2 and
+// u2 downstream of the wave
+
+
+// Variable declaration from example 1.1
+M1 = 3.0 // upstream mach number
+p1 = 0.5 // upstream pressure (atm)
+T1 = 200.0 // upstream temperature (K)
+R = 287.0 // gas constant (J/Kg/K)
+gamma1 = 1.4 // ratio of specific heats for air
+
+// Calculations
+
+// from shock relation (Table A2) for M1 = 3.0
+// subscript 2 means downstream of the shock
+p2_by_p1 = 10.33 // p2/p1
+T2_by_T1 = 2.679 // T2/T1
+M2 = 0.4752 // M2
+
+p2 = p2_by_p1 * p1 // downstream pressure (atm)
+T2 = T2_by_T1 * T1 // downstream temperature (K)
+a2 = (gamma1*R*T2** 0.5) // speed of sound downstream of the shock (m/s)
+u2 = M2*a2 // downstream velocity (m/s)
+
+
+// Result
+printf("\n M2 = %.4f",(M2))
+
+printf("\n p2 = %.3f atm",(p2))
+
+printf("\n T2 = %.1f K",(T2))
+
+printf("\n u2 = %.1f m/s",(u2))
+
diff --git a/3765/CH3/EX3.6/Ex3_6.sce b/3765/CH3/EX3.6/Ex3_6.sce
new file mode 100644
index 000000000..0ad8c2aa0
--- /dev/null
+++ b/3765/CH3/EX3.6/Ex3_6.sce
@@ -0,0 +1,17 @@
+clc
+// Example 3.6.py
+// Consider a point in a supersonic flow where the static pressure is 0.4 atm. When
+// a pitot tube is inserted in the at this point, the pressure measured by the
+// pitot tube is 3 atm. Calculate the mach number at this point.
+
+// Variable declaration
+p1 = 0.4 // static pressure (in atm)
+po2 = 3.0 // pressure measured by the pitot tube (in atm)
+
+//Calculations
+// from table A2 for po2/p1 = 7.5
+M1 = 2.35
+
+// Results
+printf("\n Mach number is %.2f",(M1))
+
diff --git a/3765/CH3/EX3.7/Ex3_7.sce b/3765/CH3/EX3.7/Ex3_7.sce
new file mode 100644
index 000000000..72afdaa62
--- /dev/null
+++ b/3765/CH3/EX3.7/Ex3_7.sce
@@ -0,0 +1,20 @@
+clc
+// Example 3.7.py
+// For the normal shock that occurs in front of the pitot tube in Example 3.6,
+// calculate the entropy change across the shock.
+
+
+// Variable declaration
+M1 = 2.34 // mach number from example 3.6
+R = 1716.0 // gas constant (ft lbf/slug/R)
+
+// Calculations
+// subscript 2 means downstream of the shock
+
+po2_by_po1 = 0.5615 // from shock table A2 for mach M1
+//
+dels = -R*log(po2_by_po1) // s2 - s1 (in lb/slug R)
+
+// Result
+printf("\n Change is entropy is %.1f lb/slug R", dels)
+