{ "metadata": { "name": "", "signature": "sha256:b5106ea5cae253fe059288e745550627fa4df81e4cd0d1b81237c843ab3f804d" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 3 : Hydrodynamics" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.1 Page No : 39" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "\n", "#initialisation of variables\n", "# points\n", "hob= 34. \t#ft\n", "hoc= 5. \t#ft\n", "hoa= 50. \t#ft\n", "\n", "hod= 80. \t#ft height\n", "g= 32.2 \t#ft/sec**2\n", "\n", "# sectional areas\n", "A= 2.1 \t#in**2\n", "A1= 4.8 \t#in**2\n", "A2= 9.6 \t#in**2\n", "\n", "#CALCULATIONS\n", "v= math.sqrt(2*g*(hod-hoc))\n", "Q= v*A/144\n", "va= v*A/A1\n", "vb= v*A/A2\n", "Va= va**2/(2*g)\n", "Vb= vb**2/(2*g)\n", "r= hob+hod-hoa-(va**2/(2*g))\n", "r1=hob+hod-hob-(vb**2/(2*g))\n", "\n", "#RESULTS\n", "print 'Discharge = %.2f cuses'%(Q) \n", "print ' Velocity head at A = %.2f ft-lb/lb'%(Va)\n", "print ' Velocity head at B = %.2f ft-lb/lb'%(Vb)\n", "print ' Pressure head at A = %.2f ft-lb/lb'%(r) \n", "print ' Pressure head at B = %.2f ft-lb/lb'%(r1) \n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Discharge = 1.01 cuses\n", " Velocity head at A = 14.36 ft-lb/lb\n", " Velocity head at B = 3.59 ft-lb/lb\n", " Pressure head at A = 49.64 ft-lb/lb\n", " Pressure head at B = 76.41 ft-lb/lb\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.2 Page No : 40" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\n", "#initialisation of variables\n", "w= 62.4 \t#lb/ft**3\n", "P= 1.7 \t#lb/in**2 pressure\n", "d1= 6. \t #in diameters\n", "d2= 3. \t #in diameters\n", "hab= 8. \t#ft\n", "Q= 0.75 \t#cuses\n", "sm= 13.6 # gravity\n", "g= 32.2 \t#ft/sec**2\n", "\n", "#CALCULATIONS\n", "dP= P*144/w\n", "va= Q*(d1/d2)**4/math.pi\n", "k= -(((d1/d2)**4-1)-((-dP+hab)*2*g/va**2))\n", "h= (-dP+hab)*12/(sm-1)\n", "\n", "#RESULTS\n", "print 'k = %.f '%(k)\n", "print 'height difference = %.2f in'%(h) \n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "k = 3 \n", "height difference = 3.88 in\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.3 Page No : 42" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "\n", "#initialisation of variables\n", "h= 20. \t #ft pressure head\n", "Q= 4.81 \t#cuses \n", "C= 1.\n", "g= 32.2 \t#ft/sec**2\n", "d= 10. \t#indiameter\n", "\n", "#CALCULATIONS\n", "d= ((Q*4*144/(d**2*math.pi))**2*100**2/((Q*4*144/(d**2*math.pi))**2+2*g*h))**0.25\n", "\n", "#RESULTS\n", "print 'Smallest Diameter = %.1f in'%(d)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Smallest Diameter = 4.9 in\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.4 Page No : 43" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "\n", "#initialisation of variables\n", "d= 1./3 \t#ft\n", "g= 32.2 \t#ft/sec**2\n", "d1= 4. \t #in\n", "d2= 1.6 \t#in diameter\n", "\n", "# guage readings\n", "h1= 5.7 \t#ft\n", "h2= -1.9 \t#ft\n", "\n", "Q= 0.3 \t#cuses\n", "H1= 34. \t#ft height of water\n", "H2= 19. \t#ft\n", "H3= 7. \t #ft\n", "H4= 9.2 \t#ft\n", "h3= 2.9 \t#ft\n", "h4= 3.9 \t#ft\n", "Et= 54. \t#ft-lb/lb\n", "\n", "#CALCULATIONS\n", "v1= math.sqrt(2*g*(h1-h2)/((d1/d2)**4-1))\n", "Q1= math.pi*v1*d**2/4\n", "k= Q/Q1\n", "P= (H1+H2)*H3/H4\n", "P1= P-h3\n", "r= P+h1-h2-h4\n", "V= v1**2/(2*g)\n", "E= r+V\n", "dE= Et-E\n", "\n", "#RESULTS\n", "print 'Coefficienct of venturi meter = %.4f '%(k)\n", "print ' Pressure of venturi throat = %.2f ft of water'%(P1)\n", "print ' Loss in energy = %.1f ft-lb/lb'%(dE)\n", "\n", "# Note : The answer is a bit different due to rounding off error in textbook\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Coefficienct of venturi meter = 0.9587 \n", " Pressure of venturi throat = 37.43 ft of water\n", " Loss in energy = 9.8 ft-lb/lb\n" ] } ], "prompt_number": 4 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }