{ "metadata": { "name": "", "signature": "sha256:212c0541b9caea0b5d9cbe6f4e974823840fe54ed8111103a6fd50c8f12ea407" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Ch-5 : Flow Through Nozzles and Diffusers " ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex - 5.1 : Pg - 214" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "c=300 #velocity in m/s\n", "cp=1.005 #kj/kgk\n", "g=1.4\n", "t=478 #static temparature in k\n", "p=15 #static pressure in bar\n", "#CALCULATIONS\n", "t0=t+((c)**2/(2*cp*1000))\n", "x=(t0/t)**(g/(g-1))*p\n", "#RESULTS\n", "print 'stagnation temparature and stagnation pressure is %0.1f k and %0.2f bar'%(t0,x)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "stagnation temparature and stagnation pressure is 522.8 k and 20.52 bar\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex - 5.2 : Pg - 215" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "hg=2803.4 #kj/kg\n", "c=300 #m/s\n", "sg=6.1253 #kj/kgk\n", "h2=2090.0 #kj/kg\n", "#CALCULATIONS\n", "h0=hg+((c)**2)/2000\n", "c2=44.72*(h0-h2)**0.5\n", "#RESULTS\n", "print 'total enthalpy is %0.2f kj/kg'%(h0) #textbook answer is wrong\n", "print '\\nfinal stream is %0.2f m/s'%(c2) #textbook answer is wrong" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "total enthalpy is 2848.40 kj/kg\n", "\n", "final stream is 1231.55 m/s\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex - 5.3 : Pg - 224" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "#initialisation of variables\n", "R=0.2897 #kj/kgk\n", "g=1.4\n", "t1=313 #temparature in k\n", "p1=20 #pressure in bar\n", "p2=13 #pressure im bar\n", "cp=1.0138 #kj/kgk\n", "a=5*10**-4\n", "#CALCULATIONS\n", "rc=(2/(g+1))**(g/0.4)\n", "t2=t1*(p2/p1)**((g-1)/g)\n", "c2=44.72*(cp*(t1-t2))**(0.5)\n", "rho=p2*100/(R*t2)\n", "m=rho*c2*a\n", "#RESULTS\n", "print 'mass flow rate and velocity of air at exit are %0.3f kg/s and %0.2f kg/m*m*m'%(m,rho) #textbook answer slightly varies" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "mass flow rate and velocity of air at exit are 2.198 kg/s and 16.21 kg/m*m*m\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex - 5.4 : Pg - 225" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "x=100 #x=h1-h* in kj/kg\n", "m=120 #mass in kg\n", "pi=(22/7)\n", "y=501.5 #y=h1-h2 in kj/kg\n", "v1=0.607 #volume\n", "v2=6.477 #volume\n", "#CALCULATIONS\n", "c1=44.72*(x)**(0.5)\n", "a1=m*v1/(c1*60)\n", "d1=(4*a1/pi)**0.5\n", "c2=44.72*(y)**(0.5)\n", "a2=m*v2/(c2*60)\n", "d2=(4*a2/pi)**0.5\n", "#RESULTS\n", "print 'area of cross section of throat and diameter of throat are %0.6f m*m and %0.4f m'%(a1,d1)\n", "print '\\narea of cross section at exit and diameter at exit are %0.5f m*m and %0.4f m'%(a2,d2)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "area of cross section of throat and diameter of throat are 0.002715 m*m and 0.0588 m\n", "\n", "area of cross section at exit and diameter at exit are 0.01294 m*m and 0.1283 m\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex - 5.5 : Pg - 226" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "t1=593 #temparature in k\n", "p2=1.05 #pressure in bar\n", "p1=7 #pressure in bar\n", "cp=1.005\n", "p3=3.696 #pressure in bar\n", "r=0.287 #kj/kgk\n", "a=6.25*10**-4\n", "g= 1.4 #ft/sec**2\n", "R= 8.314\n", "#CALCULATIONS\n", "t2=t1*(p2/p1)**((g-1)/g)\n", "c2=44.72*(cp*(t1-t2))**(0.5)\n", "rho2=p2*100/(r*t2)\n", "m2=rho2*c2*a\n", "t3=t1*(p3/p1)**((g-1)/g)\n", "\n", "c3=44.72*(cp*(t1-t3))**(0.5)\n", "\n", "rho3=p3*100/(r*t3)\n", "a3=m2/(rho3*c3)\n", "#RESULTS\n", "print 'exit velocity and mass flow rate are %0.f m/s and %0.3f kg/s'%(c2,m2)\n", "print '\\nthroat area is %0.4f m*m'%(a3)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "exit velocity and mass flow rate are 706 m/s and 0.468 kg/s\n", "\n", "throat area is 0.0004 m*m\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex - 5.6 : Pg - 229" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "g=1.4 #gamma-const value\n", "p1=4.5 #pressure in bar\n", "p3=1.1 #pressure in bar\n", "cp=1.005 #kj/kgk\n", "rho4=0.5405 #density\n", "rho3=0.9725 #density\n", "t1=1023 #temparature in k\n", "t2=852.16 #temparature in k\n", "r=0.287 #cp-cv=const value\n", "m=0.5 #mass\n", "ieff=0.85 #isentropic efficiency\n", "R= 8.314 \n", "#CALCULATIONS\n", "p2=0.528*p1\n", "t2=0.833*t1\n", "c2=44.72*(cp*(t1-t2))**(0.5)\n", "rho2=p2*100/(R*t2)\n", "a2=m/(rho3*c2)\n", "t3=t2*(p3/p2)**((g-1)/g)\n", "t4=t2-(ieff*(t2-t3))\n", "c3=44.72*(cp*(t1-t4))**(0.5)\n", "rho3=p2*100/(R*t4)\n", "a3=m/(rho4*c3)\n", "#RESULTS\n", "print 'throat area is %0.5f m*m'%(a2)\n", "print '\\nvelocity at exit,area at exit are %0.2f m/s and %0.6f m*m'%(c3,a3)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "throat area is 0.00088 m*m\n", "\n", "velocity at exit,area at exit are 794.29 m/s and 0.001165 m*m\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex - 5.7 : Pg - 231" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "p1=5 #pressure in bars\n", "h1=2709 #kj/kg\n", "h2=2649.5 #kj/kg\n", "v2=0.6059 #volume flowrate in m*m*m/kg\n", "m=2 #mass in kg\n", "v3=6.5098 #volume flowrate in m*m*m/kg\n", "h1=2714.0 #kj/kg\n", "h2=2649.5 #kj/kg\n", "h3=2247.4 #kj/kg\n", "eff=0.9 #efficiency\n", "#CALCULATIONS\n", "p2=0.578*p1\n", "c2=44.72*(h1-h2)**(0.5)\n", "a2=m*v2/c2\n", "x=eff*(h1-h3) #x=h1-h3\n", "c3=44.72*(x)**(0.5)\n", "a3=m*v3/c3\n", "#RESULTS \n", "print 'velocity and area at throat are %0.1f m/s and %0.6f m*m'%(c2,a2)\n", "print '\\nvelocity and area at exit are %0.2f m/s and %0.5f m*m'%(c3,a3)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "velocity and area at throat are 359.2 m/s and 0.003374 m*m\n", "\n", "velocity and area at exit are 916.42 m/s and 0.01421 m*m\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex - 5.8 : Pg - 233" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "t1=323 #temp in k\n", "c1=300 #velocity in m/s\n", "c2=100 #velocity in m/s\n", "cp=1.005 #kj/kgk\n", "p1=10 #pressure in bar\n", "p3=14 # pressure in bar\n", "g= 1.4#ft/sec**2\n", "#CALCULATIONS\n", "t2=t1+(c1**2-c2**2)/(2*cp*1e3)\n", "p2=p1*(t2/t1)**(g/(g-1))\n", "t2s=t1*(p3/p1)**((g-1)/g)\n", "h3=cp*t2s\n", "x=(0.5*((c1)**2-(c2)**2))/1000 #x=h2-h1\n", "h1=cp*t1\n", "eff=(h3-h1)/(x)\n", "#RESULTS\n", "print 'diffuser efficiency is %0.4f '%(eff)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "diffuser efficiency is 0.8189 \n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex - 5.9 : Pg - 232" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "t1=323 #temparature in k\n", "t2=362.8 #temparature in k\n", "c1=300 #velocity in m/s\n", "c2=100 #velocity in m/s\n", "cp=1.005 #kj/kgk\n", "p1=10 #pressure in bar\n", "p3=14 # pressure in bar\n", "g=1.4\n", "#CALCULATIONS\n", "tx=t1+((c1)**2/(2*cp*1000))\n", "po1=p1*(tx/t1)**(g/(g-1))\n", "po2=p3*(tx/t2)**(g/(g-1))\n", "tpr=po2/po1\n", "rrr=(po2-p1)/(po1-p1)\n", "#RESULTS\n", "print 'total pressure ratio and ram recovery ratio are %0.3f and %0.4f '%(tpr,rrr)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "total pressure ratio and ram recovery ratio are 0.932 and 0.8143 \n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex - 5.10 : Pg - 235" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initialisation of variables\n", "h1=2724.7 #kj/kg under 3 bar pressure\n", "s1=6.991 #kj/kgk under 3 bar pressure\n", "sf2=1.530 #kj/kgk\n", "sfg2=5.597 #kj/kgk\n", "hf2=504.7 #kj/kg\n", "hfg2=2201.6 #kj/kg\n", "vg2=0.8854\n", "a2=3*10**-4 #area in m*m\n", "v1=0.6056 #m*m*m/kg\n", "p1=3 #bar\n", "p2=2 #bar\n", "n=1.3\n", "t1=406.54 #temparature in k\n", "ps=0.917 #bar\n", "v2=0.8273 #m*m*m/kg\n", "#CALCULATIONS\n", "x2=(s1-sf2)/(sfg2)\n", "h2=hf2+(x2*hfg2)\n", "v2=x2*vg2\n", "c2=44.72*(h1-h2)**(0.5)\n", "m1=a2*c2/v2\n", "v2=v1*(p1/p2)**(1/n)\n", "c3=((-2*n/n-1)*p1*v1*((p2/p1)**((n-1)/n)-1))**0.5*543.53\n", "m2=a2*c3/v2\n", "t2=t1*(p2/p1)**((n-1)/n)\n", "de=2/ps\n", "#RESULTS\n", "print 'mass flow rate is %0.4f '%(m2)\n", "print '\\ndegree of super saturation is %0.2f '%(de)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "mass flow rate is 0.1375 \n", "\n", "degree of super saturation is 2.18 \n" ] } ], "prompt_number": 10 } ], "metadata": {} } ] }