{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 4 : Bernoulli's Equation and Measurement of Flow of Incompressible Fluids" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.1.1 page no : 74" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "#initialisation of variables\n", "\n", "H= 33. \t\t\t#ft lbf/lbf\n", "Q= 100. \t\t\t#ft**3/min\n", "w= 62.4 \t\t\t#lbf/ft**3\n", "s= 0.8\n", "\t\t\t\n", "#CALCULATIONS\n", "P= s*w*Q*H/33000.\n", "\t\t\t\n", "#RESULTS\n", "print ' power required= %.2f h.p'%(P)\n", " " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " power required= 4.99 h.p\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.2.2 page no : 78" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "#initialisation of variables\n", "\n", "import math \n", "g= 32.2 \t\t\t#ft/sec**2\n", "h= 1. \t\t\t #in\n", "ww= 62.4 \t\t\t#lbf/ft**3\n", "w= 0.0764 \t\t\t#lbf/ft**3\n", "\t\t\t\n", "#CALCULATIONS\n", "u= math.sqrt(2*g*h*(1./12)*(ww/w))\n", "\t\t\t\n", "#RESULTS\n", "print ' speed of air through the tunnel= %.1f ft/sec'%(u)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " speed of air through the tunnel= 66.2 ft/sec\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.3.1. page no : 82" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "#initialisation of variables\n", "import math \n", "za= 0. \t\t\t#ft\n", "zb= 12. \t\t\t#ft\n", "w= 62.3 \t\t\t#lbf/ft**2\n", "pa= 750. \t\t\t#lbf/in**2\n", "p= 700. \t\t\t#lbf/in**2\n", "ua= 3. \t\t\t#ft/sec\n", "g= 32.2 \t\t\t#ft/sec**2\n", "d= 2. \t\t\t#in**2\n", "\t\t\t\n", "#CALCULATIONS\n", "ub= 4*ua\n", "Hl= (za-zb)+((pa-p)*144/w)+(ua**2-ub**2)/(2*g)\n", "P= (w*ua*(math.pi/4)*Hl*d**2)/(144*550.)\n", "\t\t\t\n", "#RESULTS\n", "print ' horse-power expended in over coming losses= %.2f h.p'%(P)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " horse-power expended in over coming losses= 0.75 h.p\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.4.1 pageno : 85" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "#initialisation of variables\n", "import math \n", "d= 1. \t\t\t#in\n", "d1= 3. \t\t\t#in\n", "h= 9. \t\t\t#in\n", "p= 3. \t\t\t#percent\n", "g= 32.2 \t\t\t#ft/sec**2\n", "s= 13.6 \t\t\t#gm/cm**3\n", "a= 0.97\n", "\t\t\t\n", "#CALCULATIONS\n", "Ka= 1./(1-(d/d1)**2)\n", "C= Ka*math.pi*(d/2)**2*math.sqrt(2*g*(s-1))/144\n", "C1= a*C\n", "Q= C1*h/12.\n", "\t\t\t\n", "#RESULTs\n", "print ' flow rate = %.2f ft**3/sec '%(Q)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " flow rate = 0.13 ft**3/sec \n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.4.2 page no : 86" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "#initialisation of variables\n", "import math \n", "Q= 1.4 \t\t\t#ft**3/sec\n", "d= 6. \t\t\t#in\n", "d1= 3. \t\t\t#in\n", "h= 9. \t\t\t#in\n", "s= 13.6/0.78\n", "Cd= 0.96\n", "g= 32.2 \t\t\t#ft/sec**2\n", "w= 62.3 \t\t\t#lb/ft**3\n", "\t\t\t\n", "#CALCULATIONS\n", "h1= (Q*4.*12**2/(Cd*math.pi*d1**2))**2*(1-(d1/(2*d))**2)/(2*g*(s-1))\n", "dpbyw= (h/12.)+((s)-1)*h1\n", "dp= dpbyw*h1*w/144.\n", "\t\t\t\n", "#RESULTS\n", "print ' pressure difference = %.2f lbf/in**2 '%(dp)\n", "\n", "# Note : answer may be vary because of rounding error." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " pressure difference = 4.60 lbf/in**2 \n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.5.1 page no : 88" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "#initialisation of variables\n", "import math \n", "C= 0.6\n", "s= 0.0767 \t\t\t#lbf/ft**3\n", "g= 32.2 \t\t\t#ft/sec**2\n", "w= 62.4 \t\t\t#lbf/ft**3\n", "Hw= 0.7 \t\t\t#in\n", "\t\t\t\n", "#CALCULATIONS\n", "Ha= Hw*w/(s*12)\n", "Q= C*math.pi*math.sqrt(2*g*Ha)/144.\n", "\t\t\t\n", "#RESULTS\n", "print ' volumetric flow rate = %.3f ft**3/sec '%(Q)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " volumetric flow rate = 0.724 ft**3/sec \n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.5.3 pageno : 89" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "#initialisation of variables\n", "import math \n", "g= 32.2 \t\t#ft/sec**2\n", "h= 5. \t\t\t#ft\n", "Q= 0.6 \t\t\t#ft**3/sec\n", "Cd= 0.6\n", "d= 2. \t\t\t#in\n", "Q1= 0.315 \t\t#ft**3/sec\n", "h1= 8. \t\t\t#ft\n", "h2= 2. \t\t\t#ft\n", "A= 9. \t\t\t#ft**2\n", "\t\t\t\n", "#CALCULATIONS\n", "H= Q1**2./((Cd*math.pi*(d/24.)**2.)**2.*2*g)\n", "T= A*2*(math.sqrt(h1)-math.sqrt(h2))/(Cd*math.sqrt(2.*g)*60.*(d/24.)**2)\n", "dhbyt= (Q-Cd*math.pi*(d/24.)**2*math.sqrt(2*g*h))*60*12/(math.pi*A)\n", "\t\t\t\n", "#RESULTS\n", "print 'depth of the water = %.f ft '%(H)\n", "print 'time taken = %.1f min '%(T)\n", "print 'rate of rise in water = %.1f in/min '%(dhbyt)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "depth of the water = 9 ft \n", "time taken = 12.7 min \n", "rate of rise in water = 9.3 in/min \n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.6.1 page no : 91" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "#initialisation of variables\n", "import math \n", "d= 8. \t\t\t#in\n", "d1= 1.5 \t\t#in\n", "Cd= 0.65\n", "w= 62.3 \t\t#lbf.ft**3\n", "W= 25. \t\t\t#tonf\n", "u= 5. \t\t\t#miles/hour\n", "u1= 20.5 #miles/hour\n", "\t\t\t\n", "#CALCULATIONS\n", "ds= W*2240*d1**4*Cd**2*math.log(u1/u)/(w*d**4*math.pi*(d/24)**2)\n", "T= W*2240*d1**4*Cd**2*((5/(u*7.33))-(20/(u1*29.35)))/(w*d**4*math.pi*(d/24)**2)\n", "\n", "\n", "#RESULTS\n", "print ' Distance that piston moves= %.2f ft '%(ds)\n", "print ' time taken = %.4f sec '%(T)\n", "print \" Answers may vary because of rounding error.\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Distance that piston moves= 1.90 ft \n", " time taken = 0.1388 sec \n", " Answers may vary because of rounding error.\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.7.1 page no : 94" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "#initialisation of variables\n", "\n", "c= 0.002378 \t\t\t#slug/ft**3\n", "u= 420. \t\t\t#mile/hour.\n", "\t\t\t\n", "#CALCULATIONS\n", "P= 0.5*c*u*616**2/420.\n", "\t\t\t\n", "#RESULTS\n", "print ' Dynamic pressure= %.f lbf/ft**2 '%(P)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Dynamic pressure= 451 lbf/ft**2 \n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 4.8.2 page no : 97" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "#initialisation of variables\n", "import math \n", "g= 32.2 \t\t\t#ft/sec**2\n", "A= 13. \t\t\t#in**2\n", "l= 10. \t\t\t#in**1.5\n", "\t\t\t\n", "#CALCULATIONS\n", "Q= 2*math.pi*1.05*math.sqrt(2*g*12.)*A*l/1728.\n", "\t\t\t\n", "#RESULTS\n", "print ' Rate of flow= %.1f ft**3/sec '%(Q)\n", "print 'Answer may vary because of rounding error'" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Rate of flow= 13.8 ft**3/sec \n", "Answer may vary because of rounding error\n" ] } ], "prompt_number": 13 } ], "metadata": {} } ] }