{ "metadata": { "name": "", "signature": "sha256:e6fd288db6f632d2f9db4681e283b542c5b7c72c7f4eb7e9aa016cd430f69af5" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 6 : Fluid Mechanics and Hydraulic Machines" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.1 Page No : 116" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "Rn = 1700.\n", "v = 0.744*(10**-4)\n", "d = 0.05\n", "\n", "# Calculations \n", "V = (Rn*v)/d\n", "Vmax = 2*V\n", "x = 0.00625\n", "r = (d/2)-x\n", "V1 = Vmax*(1-(2*r/d)**2)\n", "\n", "# Results \n", "print \"velocity at the point 6.25 mm from the wall in m/sec\",V1\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "velocity at the point 6.25 mm from the wall in m/sec 2.2134\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.2 Page No : 117" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Variables\n", "d = 0.3\n", "p = 787.\n", "v = 1.6*(10**-6)\n", "Rn = 2000.\n", "\n", "# Calculations \n", "V = Rn*v/d\n", "a = math.pi*d*d/4\n", "Q = a*V\n", "\n", "# Results \n", "print \"maximum flow rate for which the flow is maximium %.3e\"%Q,\"m**3/s\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "maximum flow rate for which the flow is maximium 7.540e-04 m**3/s\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.3 Page No : 118" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "vd = 8*(10**-3)*0.1\n", "p = 996.\n", "\n", "# Calculations \n", "vk = vd/p\n", "\n", "# Results \n", "print \"kinematic vismath.cosity in m2/sec %.3e\"%vk\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "kinematic vismath.cosity in m2/sec 8.032e-07\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.4 Page No : 118" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Variables\n", "u = 1.5/98.1\n", "s = 0.81\n", "d = 0.14\n", "Q = 0.03\n", "g = 9.81\n", "\n", "# Calculations \n", "p = s*1000/g\n", "a = math.pi*d*d/4\n", "V = Q/a\n", "Rn = V*p*d/u\n", "\n", "# Results \n", "print \"Rn less than 2000, flow is laminar\",round(Rn,2)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Rn less than 2000, flow is laminar 1473.32\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.5 Page No : 119" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "d = 0.2\n", "Q = 0.088\n", "l = 5.\n", "vd = 0.01\n", "p = 1000.\n", "\n", "# Calculations \n", "v = vd/(p*10)\n", "a = 3.142*d*d/4\n", "g = 9.81\n", "V = Q/a\n", "Re = V*d/v\n", "f = 0.0018+(0.092/(3*(Re**0.5)))\n", "Hf = (4*f*l*V*V)/(d*2*g)\n", "\n", "# Results \n", "print \"head lost due to friction in m\",round(Hf,5)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "head lost due to friction in m 0.0736\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.6 Page No : 120" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Variables\n", "s = 0.75\n", "d = 0.2\n", "l = 1000.\n", "Q = 3/60.\n", "f = 0.01\n", "a = math.pi*d*d/4\n", "V = Q/a\n", "g = 9.81\n", "\n", "# Calculations \n", "Hf = (4*f*l*V*V)/(d*2*g)\n", "w = g*s*1000\n", "dp = w*Hf\n", "\n", "# Results \n", "print \"pressure drop along its entire lenght in N/m2 %.2f\"%dp\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "pressure drop along its entire lenght in N/m2 189977.22\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.7 Page No : 121" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "d = 0.3\n", "g = 9.81\n", "l = 400\n", "Q = 0.3\n", "f = 0.032\n", "\n", "# Calculations \n", "a = 3.142*d*d/4\n", "V = Q/a\n", "Lentrance = (0.5*V*V)/(2*g)\n", "Hf = (4*f*l*V*V)/(d*2*g)\n", "Lexit = (V*V)/(2*g)\n", "Totalloss = Lentrance+Hf+Lexit\n", "\n", "# Results \n", "print \"diffrenc in elevation in m\",round(Totalloss,2)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " diffrenc in elevation in m 158.02\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.8 Page No : 112" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "l = 40.\n", "l1 = 20.\n", "l2 = 20.\n", "d1 = 0.15\n", "d2 = 0.3\n", "H = 8.\n", "f = 0.01\n", "\n", "# Calculations \n", "h1 = (2*d2*d2)/(d1*d1)\n", "h2 = 4*f*l1*16/d1\n", "h3 = 9\n", "h4 = 4*f*l2/d2\n", "g = 9.81\n", "ht = h1+h2+h3+h4+1\n", "V2 = (H*2*g/ht)**0.5\n", "a2 = 3.142*d2*d2/4\n", "Q = V2*a2\n", "\n", "# Results \n", "print \"rate of low in litres/sec\",round((Q*1000),0)\n", "\n", " \n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "rate of low in litres/sec 86.0\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.9 Page No : 124" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "l = 2000.\n", "d = 0.2\n", "V = 0.8\n", "f = 0.01\n", "g = 9.81\n", "\n", "# Calculations \n", "hf = (4*f*l*V*V)/(d*2*g)\n", "\n", "# Results \n", "print \"Head loss due to friction in pipeline\",round(hf,4)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Head loss due to friction in pipeline 13.0479\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.10 Page No : 124" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Variables\n", "d1 = 0.15\n", "d2 = 0.1\n", "Q = 0.03\n", "a1 = math.pi*d1*d1/4\n", "a2 = math.pi*d2*d2/4\n", "V1 = Q/a1\n", "V2 = Q/a2\n", "c = 0.6\n", "g = 9.81\n", "\n", "# Calculations \n", "dz = (V2*V2/(2*g))-(V1*V1/(2*g))+(V2*V2/(2*g))*((1/c-1)**2)\n", "w = 9810\n", "dp = dz*w\n", "\n", "# Results \n", "print \"pressure loss across the contraction in N/m2\",round(dp,1)\n", "\n", "# note : rounding off error" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "pressure loss across the contraction in N/m2 9096.4\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.11 Page No : 125" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Variables\n", "d1 = 0.5\n", "d2 = 0.25\n", "p1 = 103005.\n", "p2 = 67689.\n", "p3 = p2\n", "w = 9810.\n", "g = 9.81\n", "c = 0.65\n", "\n", "# Calculations and Results\n", "z = 1-(1./16)+((1/c-1)**2)\n", "dp = p1-p2\n", "v2 = ((dp*2*g)/(w*z))**0.5\n", "a2 = math.pi*d2*d2/4\n", "Q = v2*a2\n", "print \"rate of flow in m3/sec\",round((Q*1000),2)\n", "\n", "v3 = v2\n", "v1 = v3/4\n", "v4 = v1\n", "he = (v3-v4)**2/(2*g)\n", "p4 = w*((p3/w)+((v3*v3-v4*v4)/(2*g))-he)\n", "print \"pressure at the 50 cm enlarge section in N/m2\",round(p4,3)\n", "\n", "# note : rouding off error." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "rate of flow in m3/sec 372.37\n", "pressure at the 50 cm enlarge section in N/m2 78478.522\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.12 Page No : 127" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "d = 0.04\n", "v = 2.\n", "dp = 20000.\n", "l = 8.\n", "w = 9810.\n", "\n", "# Calculations \n", "u = (dp*d*d)/(32*l*v)\n", "\n", "# Results \n", "print \"viscosity of the flowing oil\",u,\"N/m**2\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "viscosity of the flowing oil 0.0625 N/m**2\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.13 Page No : 128" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Variables\n", "d = 0.25\n", "l = 12.*1000\n", "w = 9320.\n", "i = 1./300\n", "v = 20.*(10**-4)\n", "a = math.pi*d*d/4\n", "q = 0.015\n", "\n", "# Calculations \n", "V = q/a\n", "g = 9.81\n", "Rn = V*d/v\n", "f = 16/Rn\n", "hf = (4*f*l*V*V)/(2*d*g)\n", "H = hf+(i*l)\n", "p = (w*q*H)/1000\n", "\n", "# Results \n", "print \"power required to pump the oil\",round(p,4),\"kW\"\n", "\n", "# note : rounding off error." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "power required to pump the oil 59.1027 kW\n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.14 Page No : 129" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "l = 600.\n", "H = 160.\n", "p = 1200.*1000\n", "n = 0.85\n", "f = 0.005\n", "\n", "# Calculations \n", "hf = H/3\n", "w = 9810\n", "H1 = H-hf\n", "q = p/(w*H1*n)\n", "d = ((f*l*q*q)/(3*hf))**0.2\n", "\n", "\n", "# Results \n", "print \"minimium diameter of the pipe in cm\",round((d*100),2)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "minimium diameter of the pipe in cm 50.89\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.15 Page No : 129" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Variables\n", "d = 0.25\n", "l = 500.\n", "a = math.pi*d*d/4\n", "f = 0.006\n", "q = 0.04\n", "g = 9.81\n", "p2 = 250.*1000\n", "\n", "# Calculations \n", "V = q/a\n", "hf = (4*f*l*V*V)/(d*2*g)\n", "z1 = 0\n", "z2 = 25\n", "w = 9810\n", "p1 = ((p2/w)+z2+hf)*w\n", "\n", "# Results \n", "print \"pressure at point A is N/m2\",round(p1,2),\"N/m**2\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "pressure at point A is N/m2 511186.44 N/m**2\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.16 Page No : 130" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "q = 0.15/(2.5*60)\n", "d = 0.03\n", "p1 = 9810.\n", "p2 = 6867.\n", "l = 2.\n", "w = 9810.\n", "\n", "# Calculations \n", "hf = (p1-p2)/w\n", "a = 3.142*d*d/4\n", "V = q/a\n", "g = 9.81\n", "f = (hf*2*g*d)/(4*l*V*V)\n", "C = V*((4*l)/(d*hf))**0.5\n", "\n", "# Results \n", "print \"darcy co-efficient\",round(f,3)\n", "print \"Chezy formula\",round(C,3)\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "darcy co-efficient 0.011\n", "Chezy formula 42.173\n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.17 Page No : 131" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "a = 90.\n", "H1 = 10.\n", "d = 0.15\n", "l = 400.\n", "H2 = 7.\n", "g = 9.81\n", "f = 0.008\n", "\n", "# Calculations \n", "z = 3.142*d*d*((2*g)**0.5)\n", "z1 = (1.5+(4*f*l/d))**0.5\n", "T = (8*a*z1*(H1**0.5-H2**0.5))/z\n", "\n", "# Results \n", "print \"time to lower the level from 10m to 7m in hr\",round((T/3600),4)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "time to lower the level from 10m to 7m in hr 3.0742\n" ] } ], "prompt_number": 20 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 6.18 Page No : 132" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "\n", "# Variables\n", "q = 0.08\n", "d1 = 0.25\n", "d2 = 1.\n", "l1 = 1500.\n", "l2 = 1500.\n", "\n", "# Calculations \n", "a1 = math.pi*d1*d1/4\n", "a2 = math.pi*d2*d2/4\n", "v2 = q*4/(math.pi*((1./32)+1))\n", "v1 = v2*0.5\n", "q1 = v1*a1\n", "q2 = v2*a2\n", "\n", "# Results \n", "print \"disharge through pipe in m3/sec\",round((q2*1000),2),round((q1*1000),4)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "disharge through pipe in m3/sec 77.58 2.4242\n" ] } ], "prompt_number": 15 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }