{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 11 : Flow and Power Transmission through Pipe-lines" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 11.2.1 page no : 307" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "#initialisation of variables\n", "Q= 0.5 \t\t\t#ft**3/sec\n", "d= 3. \t\t\t#in\n", "d1= 4. \t\t\t#in\n", "d2= 2. \t\t\t#in\n", "h= 12.7 \t\t\t#in\n", "g= 32.2 \t\t\t#ft/sec**2\n", "s= 13.6 \t\t\t#kg/m**3\n", "\t\t\t\n", "#CALCULATIONS\n", "k = (s-1)*(h/2.)*2.*g*(math.pi/(Q*d**2*4))**2.+((d1/d)**4.-1)\n", "Cc = (d1/d2)**2./(math.sqrt(k)+1.)\n", "\t\t\t\n", "#CALCULATIONS\n", "print ' contraction coefficient= %.3f '%(Cc)\n", "print ' ANSWER GIVEN IN THE TEXTBOOK IS WRONG'\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " contraction coefficient= 0.294 \n", " ANSWER GIVEN IN THE TEXTBOOK IS WRONG\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 11.3.1 page no : 310" ] }, { "cell_type": "code", "collapsed": false, "input": [ " \n", "import math \n", "#initialisation of variables\n", "Q= 400. \t\t\t#gallons\n", "d= 4. \t\t\t#in\n", "d1=6. \t\t\t#in\n", "C= 0.66\n", "g= 32.2 \t\t\t#ft/sec**2\n", "w=62.4\t\t\t#lbf/ft**3\n", "\t\t\t\n", "#CALCULATIONS\n", "u1= (Q/60.)*d1**2./(math.pi*6.23)\n", "u2= (d/d1)**2.*u1\n", "h= (u1-u2)**2./(2*g)\n", "w=62.4\t\t\t#lbf/ft**3\n", "p= (((u1**2-u2**2)/(2*g))-h)*w\n", "h1= ((1/C)-1.)**2*(u1**2/(2*g))\n", "p1= (((u1**2.-u2**2)/(2*g))+h1)*w\n", "p2= (u1**2.-u2**2)\n", "\t\t\t\n", "#RESULTS\n", "print ' Loss of head due to the sudden enlargement= %.3f ft'%(h)\n", "print ' difference in pressure = %.1f lbf/ft**2'%(p)\n", "print ' difference in pressure = %.f lbf/ft**2'%round(p1,-1)\n", "print ' difference in pressure = %d lbf/ft**2'%(p2)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Loss of head due to the sudden enlargement= 0.721 ft\n", " difference in pressure = 71.9 lbf/ft**2\n", " difference in pressure = 160 lbf/ft**2\n", " difference in pressure = 120 lbf/ft**2\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 11.8.1 page no : 323" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "f = .0075\n", "H = 96 # ft\n", "u1 = 25. # ft\n", "g = 64.4 \n", "l1 = 5280 # ft\n", "\n", "\n", "# calculations\n", "d = (4*f*u1*(3*l1+(4*l1)/4))/(H*g)\n", "\n", "# results\n", "print \"Diameter of Pipe = %.2f ft\"%d" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Diameter of Pipe = 2.56 ft\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 11.8.2 page no : 324" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "#initialisation of variables\n", "l= 9. \t\t\t#ft\n", "g= 32.2 \t\t\t#ft/sec**2\n", "Q= 160.\n", "A= 21.*math.pi\n", "\t\t\t\n", "#CALCULATIONS\n", "d= 6./(l*2*g*(A/Q)**2-1.5)\n", "\t\t\t\n", "#RESULTS\n", "print 'diameter = %.2f ft'%(d)\n", "\n", "#ANSWER GIVEN IN THE TEXTBOOKIS WRONG\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "diameter = 0.06 ft\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 11.8.3 pageno :325" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "#initialisation of variables\n", "a= 2.493\n", "b= 6.8\n", "c= -393./(4*2.493)\n", "d= 0.75 \t\t\t#ft\n", "\t\t\t\n", "#CALCULATIONS\n", "u2= (-b+math.sqrt(b**2-4*a*c))/(2*a)\n", "Q= math.pi*d**2*u2/4.\n", "\t\t\t\n", "#RESULTS\n", "print ' Rate of flow = %.2f ft**3/sec'%(Q)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Rate of flow = 1.25 ft**3/sec\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 11.10.2 page no : 332" ] }, { "cell_type": "code", "collapsed": false, "input": [ " \n", "import math \n", "#initialisation of variables\n", "g= 32.2 \t\t\t#ft/sec**2\n", "H= 100. \t\t\t#ft\n", "L= 1000. \t\t\t#ft\n", "h1= 0.03\n", "h= 0.05\n", "h2= 0.4\n", "d= 6. \t\t\t#in\n", "le= 1021. \t\t\t#ft\n", "\t\t\t\n", "#CALCULATIONS\n", "u1= math.sqrt((2*g*H)/(1+h+h2+(h1*L/0.5)))\n", "Q= math.pi*(d/12.)**2*u1/4.\n", "u2= math.sqrt((H*2*g)/(1+h+(1./16)*(1+h+h2+(h1*L/0.5))))\n", "Q1= math.pi*(d/24)**2*u2/4\n", "r= math.sqrt((d/12)/(2*h1*le))\n", "\t\t\t\n", "#RESULTS\n", "print ' rate of discharge without a nozzle= %.2f ft**3/sec'%(Q)\n", "print ' rate of discharge= %.2f ft**3/sec'%(Q1)\n", "print ' diameter of nozzle= %.2f in'%(r)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " rate of discharge without a nozzle= 2.01 ft**3/sec\n", " rate of discharge= 1.78 ft**3/sec\n", " diameter of nozzle= 0.09 in\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 11.10.3 pageno : 332" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "#initialisation of variables\n", "\n", "L= 1730. \t\t\t#ft\n", "l= 104. \t\t\t#ft\n", "hl= 234. \t\t\t#ft\n", "u= 2.3 \t\t\t#ft/sec\n", "g= 32.2 \t\t\t#ft/sec**2\n", "p1 = 750*144.\n", "w = 62.3\n", "\t\t\t\n", "#CALCULATIONS\n", "Q = round(3*math.pi/4.*1./4 *u,3) # ft**3/sec\n", "H1 = round(p1/w + (u**2)/(2*g),-1) # ft\n", "Pi = round(w*Q*H1/550) # h.p.\n", "H2= L-l\n", "R= u**2/(2*g)\n", "H1= round(H2+R+hl)\n", "z = H2*100./H1\n", "\t\t\t\n", "#RESULTS\n", "print ' efficiency of tramsmission = %.1f per cent'%(z)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " efficiency of tramsmission = 87.4 per cent\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 11.11.1 page no : 335" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "#initialisation of variables\n", "g= 32.2 \t\t\t#ft/sec**2\n", "w= 62.3 \t\t\t#lbf/ft**3\n", "p= 40. \t\t\t#lbf/in**2\n", "k= 0.44\n", "d= 2. \t\t\t#in\n", "\t\t\t\n", "#CALCULATIONS\n", "Cu = math.sqrt(1/1.44)\n", "Q= (math.pi*(d/2)**2./144.)*math.sqrt(2*g*p*144/(w*0.981))\n", "P= w*Q**3*(144./math.pi)**2/(2*g*550)\n", "\t\t\t\n", "#RESULTS\n", "print ' Coefficient of velocity = %.3f'%Cu\n", "print ' discharge rate = %.2f ft**3/min'%(Q)\n", "print ' Power of jet = %.2f h.p'%(P)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Coefficient of velocity = 0.833\n", " discharge rate = 1.70 ft**3/min\n", " Power of jet = 18.14 h.p\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 11.11.2 page no : 336" ] }, { "cell_type": "code", "collapsed": false, "input": [ " \n", "import math \n", "#initialisation of variables\n", "u= 80. \t\t\t#ft/sec\n", "d= 1.5 \t\t\t#in\n", "Cu= 0.97\n", "f= 0.007\n", "l= 150. \t\t\t#ft\n", "g= 32.2 \t\t\t#ft/sec**2\n", "n= 70. \t\t\t#percent\n", "Ho= -10. \t\t\t#ft\n", "w= 62.3 \t\t\t#lb/ft**3\n", "\t\t\t\n", "#CALCULATIONS\n", "Q=math.pi*d**2*u/(4*144.)\n", "ut= u/Cu\n", "H2= ut**2/(2*g)\n", "H1= 5*H2/4\n", "hf= H1/5\n", "D= ((4/math.pi)**2*4*f*l*Q**2*0.00237/(hf*2*g))**(1/5.)*12*(3.95/1.18)\n", "Ps= w*2*Q*(H1-Ho)*100/(n*550.)\n", "\t\t\t\n", "#RESULTS\n", "print ' Diameter = %.2f in'%(D)\n", "print ' shaft power of the pump = %.1f h.p'%(Ps)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Diameter = 3.95 in\n", " shaft power of the pump = 45.1 h.p\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 11.13.1 pageno : 342" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "#initialisation of variables\n", "\n", "v= 10. \t\t\t#ft/sec\n", "g= 32. \t\t\t#ft/sec**2\n", "w= 62.3 \t\t\t#lbf/ft**3\n", "l= 200. \t\t\t#ft\n", "t= 0.5 \t\t\t#sec\n", "\t\t\t\n", "#CALCULATIONS\n", "dp= w*l*v/(g*t*144)\n", "\t\t\t\n", "#RESULTS\n", "print ' Rise in pressure = %.1f lbf/in**2'%(dp)\n", "\n", "# Answer may vary because of rounding error." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Rise in pressure = 54.1 lbf/in**2\n" ] } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 11.14.1 page no : 343" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "#initialisation of variables\n", "w= 62.3 \t\t\t#lb/ft**3\n", "g= 32.2\t\t\t#ft/se**2\n", "k= 3.*10.**5 \t\t\t#lbf/in**2\n", "u= 10.\t\t\t#ft/sec\n", "\t\t\t\n", "#CALCULATIONS\n", "P= u*math.sqrt(w*k/g)/12.\n", "\t\t\t\n", "#RESULTS\n", "print ' Rise in pressure = %.f lbf/in**2'%(P)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Rise in pressure = 635 lbf/in**2\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 11.14.2 page no: 344" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "#initialisation of variables\n", "g= 32.2 \t\t\t#ft/sec**2\n", "w= 62.3 \t\t\t#lb/ft**3\n", "k= 3.*10.**5 \t\t\t#lbf/in**2\n", "\t\t\t\n", "#CALCULATIONS\n", "v= math.sqrt(k*g*144/w)\n", "\t\t\t\n", "#RESULTS\n", "print ' velocity of sound in the fluid = %.f ft/sec'%(v)\n", "\n", "# answer may vary because of rounding error" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " velocity of sound in the fluid = 4725 ft/sec\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 11.14.4 pageno : 347" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "#initialisation of variables\n", "w= 62.3 \t\t\t#lb/ft**3\n", "d= 6. \t\t\t#in\n", "t= 5./8 \t\t\t#in\n", "k= 3.*10**5 \t\t\t#lbf/in**2\n", "E= 18.*10**6 \t\t\t#lbf/in**2\n", "M= 3. \t\t\t#tonf\n", "\t\t\t\n", "#CALCULATIONS\n", "u= math.sqrt(((M*2240)**2/w)*(t*2/d)*32.2*114*((t*2/(d*k))+(2/E)))\n", "Q= (math.pi*(d/2)**2/144)*u\n", "\t\t\t\n", "#RESULTS\n", "print ' maximum permissible flow = %.2f ft**3/sec'%(Q)\n", "\n", "# answer may vary because of rounding error." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " maximum permissible flow = 4.15 ft**3/sec\n" ] } ], "prompt_number": 19 } ], "metadata": {} } ] }