diff options
Diffstat (limited to '3765/CH5')
-rw-r--r-- | 3765/CH5/EX5.1/Ex5_1.sce | 57 | ||||
-rw-r--r-- | 3765/CH5/EX5.2/Ex5_2.sce | 27 | ||||
-rw-r--r-- | 3765/CH5/EX5.3/Ex5_3.sce | 55 | ||||
-rw-r--r-- | 3765/CH5/EX5.4/Ex5_4.sce | 27 | ||||
-rw-r--r-- | 3765/CH5/EX5.5/Ex5_5.sce | 22 | ||||
-rw-r--r-- | 3765/CH5/EX5.6/Ex5_6.sce | 33 | ||||
-rw-r--r-- | 3765/CH5/EX5.7/Ex5_7.sce | 26 |
7 files changed, 247 insertions, 0 deletions
diff --git a/3765/CH5/EX5.1/Ex5_1.sce b/3765/CH5/EX5.1/Ex5_1.sce new file mode 100644 index 000000000..7f4ced579 --- /dev/null +++ b/3765/CH5/EX5.1/Ex5_1.sce @@ -0,0 +1,57 @@ +clc +// Example 5.1.py +// Consider the subsonic-supersonic flow through a convergent-divergent nozzle. The +// reservoir pressure and temperature are 10 atm and 300 K, repectively. There are +// two locations in the nozzle where A/Astar = 6, one in the convergent section and +// the other in the divergent section. At each location calculate M, p, T, u. + +// Variable declaration +po = 10.0 // reservoir pressure (in atm) +To = 300.0 // reservoir temperature (in K) +A_by_Astar = 6.0 // area ratio +gamma1 = 1.4 // ratio of specific heat +R = 287.0 // gas constant (in J/ Kg K) + +// Calculations + +// from table A1 for subsonic flow with A/Astar = 6.0 +Msub = 0.097 // mach number in converging section +po_by_p = 1.006 // po/p in converging section +To_by_T = 1.002 // To/T in converging section + +psub = 1 / po_by_p * po // pressure (in atm) in converging section +Tsub = 1 / To_by_T * To // temperature (in K) in converging section +asub = (gamma1*R*Tsub** 0.5) // speed of sound (in m/s) in converging section +usub = Msub*asub // velocity (in m/s) in converging section + +// from table A1 for supersonic flow with A/Astar = 6.0 +Msup = 3.368 // mach number in diverging section +po_by_p = 63.13 // po/p in diverging section +To_by_T = 3.269 // To/T in diverging section + +psup = 1 / po_by_p * po // pressure (in atm) in diverging section +Tsup = 1 / To_by_T * To // temperature (in K) in diverging section +asup = (gamma1*R*Tsup** 0.5) // speed of sound (in m/s) in diverging section +usup = Msup*asup // velocity (in m/s) in diverging section + + +// Results +printf("\n Converging section") +printf("\n M = %.3f", Msub) + +printf("\n p = %.2f atm", psub) + +printf("\n T = %.1f K", Tsub) + +printf("\n u = %.2f m/s", usub) + + +printf("\n Divering section") +printf("\n M = %.3f", Msup) + +printf("\n p = %.4f atm", psup) + +printf("\n T = %.2f K", Tsup) + +printf("\n u = %.2f m/s", usup) + diff --git a/3765/CH5/EX5.2/Ex5_2.sce b/3765/CH5/EX5.2/Ex5_2.sce new file mode 100644 index 000000000..197395c2b --- /dev/null +++ b/3765/CH5/EX5.2/Ex5_2.sce @@ -0,0 +1,27 @@ +clc +// Example 5.2.py +// A supersonic wind tunnel is designed to produce Mach 2.5 flow in the test section +// with standard sea level conditions. Calculate the exit area ratio and reservoir +// conditions necessary to achieve these design conditions. + +// Variable declaration +Me = 2.5 // exit mach number +pe = 1.0 // sea level pressure (in atm) +Te = 288.0 // sea level temperature (in K) +// Calculations + +// from table A1 for Me = 2.5 +Ae_by_Astar = 2.637 // Ae/Astar +po_by_pe = 17.09 // po/p +To_by_Te = 2.25 // To/T + +po = po_by_pe * pe // reservoir pressure (in atm) +To = To_by_Te * Te // reservoir temperature (in K) + +// Results +printf("\n Area ratio required %.3f", Ae_by_Astar) + +printf("\n Reservoir pressure required %.2f atm", po) + +printf("\n Reservoir temperature required %.1f K", To) + diff --git a/3765/CH5/EX5.3/Ex5_3.sce b/3765/CH5/EX5.3/Ex5_3.sce new file mode 100644 index 000000000..9ef42e747 --- /dev/null +++ b/3765/CH5/EX5.3/Ex5_3.sce @@ -0,0 +1,55 @@ +clc +// Example 5.3.py +// Consider a rocket engine burning hydrogen and oxygen combustion chamber temper- +// ature and pressure are 3571 K and 25 atm, respectively. The molecular weight of +// the chemically reacting gas in the combustion chamber is 16.0 and gamma1 = 1.22. +// The pressure at the exit of the convergent-divergent rocket nozzle is 1.174*10^-2 +// atm. The area of the throat is 0.4 m^2. Assuming a calorifically perfect gas, +// calculate (a) the exit mach number (b) the exit velocity (c) the mass through the +// nozzle and (d) the area of the exit. + +// Variable declaration +po = 25.0 // combustion chamber pressure (in atm) +To = 3571.0 // combustion chamber temperature (in K) +pe = 1.174e-2 // pressure at the exit of the nozzle (in atm) +Astar = 0.4 // throat area (in m^2) +gamma1 = 1.22 // ratio of specific heats +mol_wt = 16.0 // molecular weight (in gms) + +// Calculations + +// part (a) +Me = (2/(gamma1-1) *((po/pe**(gamma1-1)/gamma1) - 1)** 0.5) // Exit mach number + +// part (b) +Te_by_To = (pe/po** (gamma1-1)/gamma1) // Te/To +Te = Te_by_To * To // exit temperature (in K) + +R = 8314.0/mol_wt // gas constant (in J/Kg K) +ae = (gamma1*R*Te** 0.5) // speed of sound at exit (in m/s) +ve = Me * ae // velocity at exit (in m/s) + +// part (c) +rhoo = po*101325/R/To // density at reservoir (in Kg/m^3) +rhostar_by_rhoo = (2.0/(gamma1+1)**1/(gamma1-1)) // rhostar/rhoo +rhostar = rhostar_by_rhoo * rhoo // rhostar, throat density (in Kg/m^3) + +Tstar_by_To = 2.0/(gamma1+1) // Tstar/To +Tstar = Tstar_by_To * To // Tstar, throat temperature (in K) +astar = (gamma1*R*Tstar** 0.5) // speed of sound at throat (in m/s) +mass = rhostar*Astar*astar // mass flow rate at throat (in Kg/s) + +// part (d) +rhoe = pe*101325/R/Te // density at exit (in Kg/m^3) +Ae = mass/rhoe/ve // exit area (in m^2) + +// Results + +printf("\n Exit mach number %.2f", Me) + +printf("\n Exit velocity %.2f m/s", ve) + +printf("\n Mass flow rate %.2f Kg/s", mass) + +printf("\n Area of the exit %.2f m^2", Ae) + diff --git a/3765/CH5/EX5.4/Ex5_4.sce b/3765/CH5/EX5.4/Ex5_4.sce new file mode 100644 index 000000000..4a06cf437 --- /dev/null +++ b/3765/CH5/EX5.4/Ex5_4.sce @@ -0,0 +1,27 @@ +clc +// Example 5.4.py +// Consider the flow through a convergent-divergent duct with an exit to throat area +// ratio of 2. The reservoir pressure is 1 atm, and the exit pressure is 0.95 atm. +// Calculate the mach numbers at the throat and at the exit. + +// Variable declaration +po = 1.0 // reservoir pressure (in atm) +pe = 0.95 // pressure at the exit (in atm) +Ae_by_At = 2.0 // ratio of exit to throat area + +// Calculations +// from table A1 for po/pe = 1.053 +Me = 0.28 // mach number at exit +Ae_by_Astar = 2.17 // nearest entry + +At_by_Astar = 1 / Ae_by_At * Ae_by_Astar // At/Astar = At/Ae * Ae/Astar + +// from table A1 for At/A* = 1.085 +Mt = 0.72 // mach number at throat + + +// Results +printf("\n Mach number at exit %.2f", Me) + +printf("\n Mach number at throat %.2f", Mt) + diff --git a/3765/CH5/EX5.5/Ex5_5.sce b/3765/CH5/EX5.5/Ex5_5.sce new file mode 100644 index 000000000..754b6d91d --- /dev/null +++ b/3765/CH5/EX5.5/Ex5_5.sce @@ -0,0 +1,22 @@ +clc +// Example 5.5.py +// Consider a convergent divergent duct with an exit to throat area ratio of 1.6. +// Calculate the exit to reservoir pressure ratio required to achieve sonic flow +// at the throat, but subsonic flow everywhere else. + +// Variable declaration +Ae_by_At = 1.6 // ratio of exit to throat area + +// Calculations + +// since M = 1 at the throat Mt = Astar +// Ae/At = Ae/Astar = 1.6 + +// from table A1 for Ae/Astar = 1.6 +po_by_pe = 1.1117 // po/pe +pe_by_po = 1/po_by_pe // pe/po + + +// Results +printf("\n Exit to reservoir required pressure ratio is %.1f", pe_by_po) + diff --git a/3765/CH5/EX5.6/Ex5_6.sce b/3765/CH5/EX5.6/Ex5_6.sce new file mode 100644 index 000000000..2abceb9d5 --- /dev/null +++ b/3765/CH5/EX5.6/Ex5_6.sce @@ -0,0 +1,33 @@ +clc +// Example 5.6.py +// Consider a convergent divergent nozzle with an exit to throat area ratio of 3. +// A normal shock wave is inside the divergent portion at a location where the local +// area ratio is A/At = 2.0. Calculate the exit to reservoir pressure ratio. + +// Variable declaration +Ae_by_At = 3.0 // ratio of exit to throat area + +// Calculations + +// from table A1 for A/At = 2.0 +M1 = 2.2 // mach number in front the shock + +// from table A2 for M1 = 2.2 +M2 = 0.5471 // mach number behind the shock +po2_by_po1 = 0.6281 // stagnation pressure ratio accross the shock + +// from table A1 for M2 = 0.5471 +A2_by_A2star = 1.27 // A2/A2star +At_by_A2 = 1/2.0 // At/A2 +Ae_by_A2star = Ae_by_At * At_by_A2 * A2_by_A2star //Ae/A2star = Ae/At * At/A2 * A2/A2star + +// from table A1 for Ae/A2star = 1.905 +Me = 0.32 // exit mach number +poe_by_pe = 1.074 // poe/pe + +// po = po1 and poe = po2 +pe_by_po = 1 / poe_by_pe * po2_by_po1 // pe/po = pe/poe * poe/po2 * po2/po1 * po1/po + +// Results +printf("\n Exit to reservoir pressure ratio is %.3f", pe_by_po) + diff --git a/3765/CH5/EX5.7/Ex5_7.sce b/3765/CH5/EX5.7/Ex5_7.sce new file mode 100644 index 000000000..a0ffe3e57 --- /dev/null +++ b/3765/CH5/EX5.7/Ex5_7.sce @@ -0,0 +1,26 @@ +clc +// Example 5.7.py +// Consider the wind tunnel described in example 5.2. Estimate the ratio of diffuser +// throat area to nozzle throat area required to allow the tunnel to start. Also, +// assuming that the diffuser efficiency is 1.2 after the tunnel has started, calculate +// the pressure ratio across the tunnel necessary for running i.e. calculate the ratio +// of total pressure at the diffuser exit to the reservoir pressure. + +// Variable declaration + +M = 2.5 // mach number before the shock +eta_d = 1.2 // diffuser efficiency + +// Calculations + +// from table for M = 2.5 +po2_by_po1 = 0.499 // po2/po1 +At2_by_At1 = 1 / po2_by_po1 // At2/At1 = po1/po2 + +Pdo_by_po = eta_d * po2_by_po1 // pdo/po + +// Results +printf("\n Ratio of diffuser throat area to nozzle throat area %.2f", At2_by_At1) + +printf("\n Ratio of total pressure at the diffuser exit to the reservoir pressure, %.3f",(Pdo_by_po)) + |