{ "metadata": { "name": "", "signature": "sha256:6875085981d30c40f21af9abe827ee04ccc837d7faa969a757e96f393b389713" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 2 : Flow Through Variable Area Ducts" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.1 page : 19" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\n", "\t\t\t\t\n", "#Input data\n", "do1 = 1.12 \t\t\t\t#Density of air i reservoir in kg/m**3\n", "ao1 = 500 \t\t\t\t#Velocity of sound in reservoir in m/s\n", "d = 0.01 \t\t\t\t#Throat diameter in m \n", "k = 1.4 \t\t\t\t#Adiabatic Consmath.tant \n", "R = 287 \t\t\t\t#Specific gas consmath.tant in J/kg-K\n", "\n", "\t\t\t\t\n", "#Calculation\n", "To1 = ao1**2/(k*R) \t\t\t\t#Stagnation temperature in K\n", "Po1 = do1*R*To1 \t\t\t\t#Stagnation pressure in Pa\n", "p1 = 0.528 \t\t\t\t#Ratio of critical pressure to Stagnation pressure from gas tables @M = 1\n", "Pt = (Po1*p1)*10**-5 \t\t\t\t#Throat pressure in bar\n", "t1 = 0.834 \t\t\t\t#Ratio of critical temperature to Stagnation temperature from gas tables @M = 1\n", "Tt = To1*t1 \t\t\t\t#critical temperature in K\n", "d_t = (Pt*10**5)/(R*Tt) \t\t\t\t#Density of air at throat in kg/m**3\n", "a_t = math.sqrt(k*R*Tt) \t\t\t\t#Sound velocity at throat in m/s \n", "Ct = a_t \t\t\t\t#Air velocity t throat in m/s, Since M = 1\n", "A_t = math.pi*d**2/4 \t\t\t\t#Throat area in m**2 \n", "m = d_t*A_t*Ct \t\t\t\t#Maximum mass flow rate in kg/s\n", "\n", "\t\t\t\t\n", "#Output\n", "print 'A)Maximum mass flow rate is %3.5f kg/s \\\n", "\\nB)Pressure and temperarature at the throat are %3.3f bar and %3.4f K'%(m,Pt,Tt)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "A)Maximum mass flow rate is 0.02543 kg/s \n", "B)Pressure and temperarature at the throat are 1.056 bar and 518.9149 K\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.2 page : 20" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\n", "\t\t\t\t\n", "#Input data\n", "P1 = 2. \t\t\t\t#Intial pressure in bar\n", "C1 = 170. \t\t\t\t#Initial velocity of air in m/s\n", "T1 = 473. \t\t\t\t#Intial temperature in K\n", "A1 = 1000. \t\t\t\t#Inlet area in mm**2\n", "P2 = 0.95 \t\t\t\t#Exit pressure in bar\n", "k = 1.4 \t\t\t\t#Adiabatic Consmath.tant \n", "R = 287. \t\t\t\t#Specific gas consmath.tant in J/kg-K\n", "\n", "\t\t\t\t\n", "#Calculation\n", "a_1 = math.sqrt(k*R*T1) \t\t\t\t#Velocity of sound at inlet in m/s\n", "M1 = C1/a_1 \t\t\t\t#Inlet mach number\n", "t1 = 0.970 \t\t\t\t#Ratio of inlet temperature to Stagnation temperature from gas tables @M = 1\n", "To1 = T1/t1 \t\t\t\t#Stagnation temperature in K\n", "p1 = 0.900 \t\t\t\t#Ratio of inlet pressure to Stagnation pressure from gas tables @M = 1\n", "Po1 = P1/p1 \t\t\t\t#Stagnation pressure in bar\n", "a1 = 1.623 \t\t\t\t#Ratio of inlet area to critical area from isentropic gas tables @M = 1\n", "At = A1/a1 \t\t\t\t#critical area in mm**2\n", "p2 = 0.528 \t\t\t\t#Pressure ratio at critical state from isentropic gas tables @M = 1\n", "Pt = Po1*p2 \t\t\t\t#Throat pressure in bar\n", "t2 = 0.834 \t\t\t\t#Temperature ratio at critical state from isentropic gas tables @M = 1\n", "Tt = To1*t2 \t\t\t\t#Throat temperature in K\n", "a_t = math.sqrt(k*R*Tt) \t\t\t\t#Velocity of sound at throat in m/s\n", "C_t = a_t \t\t\t\t#Critical velocity of air in m/s\n", "p3 = P2/Po1 \t\t\t\t#Pressure ratio at exit \n", "M2 = 1.17 \t\t\t\t#Mach number at exit from isentropic gas tables @p3\n", "t3 = 0.785 \t\t\t\t#Temperature ratio at exit from isentropic gas tables @M2\n", "T2 = To1*t3 \t\t\t\t#Exit temperature in K\n", "a3 = 1.022 \t\t\t\t#Area ratio at exit from isentropic gas tables @M2\n", "A2 = At*a3 \t\t\t\t#Exit area in mm**2, wrong answer in textbook\n", "C2 = M2*math.sqrt(k*R*T2) \t\t\t\t#Exit velocity in m/s\n", "\n", "\t\t\t\t\n", "#Output\n", "print 'A)Stagnation temperature and pressure are %3.2f K and %3.3f bar \\\n", "\\nB)Sonic velocity and mach number at entry are %3.2f m/s and %3.2f \\\n", "\\nC)Velocity, Mach number and flow area at outlet section are %3.2f m/s, %3.2f and %3.2f mm**2 \\\n", "\\nD)Pressure, area at throat of the nozzle are %3.5f bar and %3.3f mm**2'%(To1,Po1,a_1,M1,C2,M2,A2,Pt,At)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "A)Stagnation temperature and pressure are 487.63 K and 2.222 bar \n", "B)Sonic velocity and mach number at entry are 435.95 m/s and 0.39 \n", "C)Velocity, Mach number and flow area at outlet section are 458.85 m/s, 1.17 and 629.70 mm**2 \n", "D)Pressure, area at throat of the nozzle are 1.17333 bar and 616.143 mm**2\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 2.3 page: 21" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\n", "\t\t\t\t\n", "#Input data\n", "Po1 = 10. \t\t\t\t#Stagnation pressure in bar\n", "To1 = 798. \t\t\t\t#Stagnation temperature in K\n", "Pt = 7.6 \t\t\t\t#Throat pressure in bar \n", "m = 1.5 \t\t\t\t#Mass flow rate in kg/s\n", "k = 1.4 \t\t\t\t#Adiabatic Consmath.tant\n", "R = 287. \t\t\t\t#Specific gas consmath.tant in J/kg-K\n", "Cp = 1005. \t\t\t\t#Specific heat capacity at consmath.tant pressure in J/kg-K \n", " \n", "\t\t\t\t\n", "#Calculation\n", "p1 = 0.528 \t\t\t\t#Ratio of critical pressure to Stagnation pressure from isentropic gas tables @M = 1,k = 1.4\n", "Pc = p1*Po1 \t\t\t\t#Critical pressure in bar\n", "P2 = Pt \t\t\t\t#Exit pressure in bar, Since Pc