{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Chapter 9 : Turbulent flow in Pipes" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 9.1 Page no 308" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "It is a laminar flow\n", "(a) Head loss due to flow for glycerine = 17.1 m \n", "The flow is turbulent\n", "(a) Head loss due to flow for water = 5.42 m \n" ] } ], "source": [ "# Determine Head loss\n", "\n", "from math import *\n", "\n", "# Given\n", "\n", "S = 1.26 # specific gravity\n", "\n", "mu = 0.826 # kinematic viscosity in Ns/m**2\n", "\n", "# for water\n", "\n", "rho = 998 # density of water in kg/m**3\n", "\n", "mu1 = 1.005*10**-3 # viscosity in Ns/m**2\n", "\n", "# for glycerine\n", "\n", "rho1 = S*rho # density of glycerine in kg/m**3\n", "\n", "Q = 0.1 # discharge in m**3/s\n", "\n", "d1 = 0.2 # diameter in m\n", "\n", "A = pi*d1**2/4 # area in m**2\n", "\n", "g = 9.81 # acceleration due to gravity in m/s**2\n", "\n", "l =100 # length of the pipe\n", "\n", "# Solution\n", "\n", "V = Q/A\n", "\n", "R = rho1*V*d1/mu\n", "\n", "print \"It is a laminar flow\"\n", "\n", "f = 64/R # friction factor\n", "\n", "Hf = f*l*V**2/(2*g*d1) # head loss due to friction\n", "\n", "print \"(a) Head loss due to flow for glycerine =\",round(Hf,1),\"m \"\n", "\n", "R1 = rho*V*d1/mu1\n", "\n", "print \"The flow is turbulent\"\n", "\n", "e = 0.025\n", "\n", "r = e/(d1*100)\n", "\n", "f = 0.021\n", "\n", "hf = f*l*V**2/(2*g*d1)\n", "\n", "print \"(a) Head loss due to flow for water =\",round(hf,2),\"m \"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 9.2 Page no 311" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "3.1853324563\n", "Discharge = 0.1 m**3/s\n" ] } ], "source": [ "# Discharge of water\n", "\n", "from math import *\n", "\n", "# Given\n", "\n", "# for water\n", "\n", "nu = 1.007*10**-6 # viscosity in m**2/s\n", "\n", "e = 0.025 # for cast iron in cm\n", "\n", "L = 100 # length of the pipe in m\n", "\n", "D = 0.2 # diameter in m\n", "\n", "hf = 5.43 # head loss due to friction\n", "\n", "r = e/(D*100)\n", "\n", "g = 9.81 # acceleration due to gravity in m/s**2\n", "\n", "# Solution\n", "\n", "A = sqrt(2*g*D*hf/L)\n", "\n", "B = D/nu\n", "\n", "f = 0.021 # from moodys diagram\n", "\n", "V = A/sqrt(f)\n", "\n", "print V\n", "\n", "R = B*f\n", "\n", "A = pi*D**2/4\n", "\n", "Q = A*V\n", "\n", "print \"Discharge =\",round(Q,2),\"m**3/s\"\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 9.3 Page no 314" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Hence the convergence is attained, D= 0.2 m\n" ] } ], "source": [ "# Size of the case iron\n", "\n", "from math import *\n", "\n", "# Given\n", "\n", "Q =0.1 # discharge in m**3/s\n", "\n", "hf = 5.43 # friction loss head in m\n", "\n", "L = 100 # length of pipe\n", "\n", "nu = 1.00*10**-6 # viscosity in m**2/s\n", "\n", "e = 0.025 # for cast iron in cm\n", "\n", "g = 9.81 # acceleration due to gravity in m/s**2\n", "\n", "# Solution\n", "\n", "A = 8*L*Q**2/(hf*g*pi**2)\n", "\n", "B = 4*Q/(pi*nu)\n", "\n", "# for D = 0.172 ; f=0.01\n", "D = 0.172\n", "\n", "r = e/D\n", "\n", "Re = B/D\n", "\n", "f = 0.022 # for Re and r\n", "\n", "# for D1=0.199 ; f=0.021\n", "\n", "D1 = 0.199\n", "\n", "r1 = e/D1\n", "\n", "R = B/D1\n", "\n", "f = 0.021 # for R and r\n", "\n", "print \"Hence the convergence is attained, D=\",round(D1,1),\"m\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 9.4 Page no 318" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Head loss = 2.0 ft\n" ] } ], "source": [ "# Head loss \n", "\n", "from math import *\n", "\n", "# Given\n", "\n", "L = 500 # length of the pipe in ft\n", "\n", "D= 9*2.54/100 # diameter in cm\n", "\n", "C = 100 # constant\n", "\n", "S = 0.004\n", "\n", "# Solution\n", "\n", "Hf = S*L\n", "\n", "print \"Head loss =\",round(Hf,0),\"ft\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 9.5 Page no 319" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Head loss of water = 3.2 m\n" ] } ], "source": [ "# Head loss of water\n", "\n", "from math import *\n", "\n", "# Given\n", "\n", "Q = 0.1 # water flow rate in m**3/s\n", "\n", "d = 30 # diameter in m\n", "\n", "l = 500 # length in m\n", "\n", "e = 0.025 # for cast iron\n", "\n", "g = 9.81 # acceleration due to gravity in m/s**2\n", "\n", "# Solution\n", "\n", "r = log(d/e,10)\n", "\n", "K = (pi/4)*sqrt(2*g)*(2*r+1.14)*(0.3)**(2.5)\n", " \n", "S = (Q/K)**2\n", "\n", "hf = S*l\n", "\n", "print \"Head loss of water =\",round(hf,1),\"m\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 9.6 Page no 319" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Head loss of water = 0.1 m**3/s\n" ] } ], "source": [ "# Head loss by conveyance method\n", "\n", "from math import *\n", "\n", "# Given\n", "\n", "Q = 0.1 # water flow rate in m**3/s\n", "\n", "d = 20 # diameter in cm\n", "\n", "l = 500 # length in m\n", "\n", "e = 0.025 # for cast iron\n", "\n", "g = 9.81 # acceleration due to gravity in m/s**2\n", "\n", "S = 5.43 \n", "\n", "# Solution\n", "\n", "r = log(d/e,10)\n", "\n", "K = (pi/4)*sqrt(2*g)*(2*r+1.14)*(0.2)**2.5\n", "\n", "Q=K*sqrt(S/100)\n", "\n", "print \"Head loss of water =\",round(Q,2),\"m**3/s\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 9.7 Page no 320" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "K = 0.432 from trial and error\n" ] } ], "source": [ "# Solve using the conveyence method\n", "\n", "from math import *\n", "\n", "# given\n", "\n", "eps = 0.025*10**-2 # for cast iron epsilon = 0.0025 cm\n", "\n", "# we get the value of K = 0.432 m**2/s\n", "# we need to do trial and error to find the value of D\n", "\n", "# we use the value of D = 0.2 m\n", "\n", "D = 0.2 # value in m\n", "\n", "g = 9.81\n", "\n", "# Solution\n", "\n", "K = (pi/4)*sqrt(2*g)*(2*log10(D/(eps))+1.14)*D**(2.5)\n", "\n", "print \"K = \",round(K,3),\" from trial and error\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 9.8 Page no 326" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Total head loss = 83.7 m\n" ] } ], "source": [ "# Determine head loss\n", "\n", "from math import *\n", "\n", "# Given\n", "\n", "d = 0.1 # diameter of the pipe\n", "\n", "Q= 0.075 # discharge in m**3/s\n", "\n", "L = 30 # length in m\n", "\n", "A = pi*d**2/4\n", "\n", "g = 9.81 # acceleration due to gravity in m/s**2\n", "\n", "# for water\n", "\n", "nu = 1.007*10**-6 # viscosity in m**2/s\n", "\n", "e = 0.025\n", "\n", "r = e/(10*d)\n", "\n", "# Solution\n", "\n", "V = Q/A\n", "\n", "Re = V*d/nu\n", "\n", "f = 0.025 # firction factor from moodys diagram\n", "\n", "hf = f*L*V**2/(2*g*d) \n", "\n", "K= 0.5 # contraction constant\n", "\n", "hc = K*V**2/(2*g) \n", "\n", "K1 =10 # loss of the globe valve\n", "\n", "hg = K1*V**2/(2*g)\n", "\n", "Th = hf+hc+hg\n", "\n", "print \"Total head loss =\",round(Th,1),\"m\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 9.9 Page no 328" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Discharge through the pipe = 0.067 m**3/s\n" ] } ], "source": [ "# discharge through the pipe\n", "\n", "from math import *\n", "\n", "# Given\n", "\n", "# for water\n", "\n", "nu = 1.007*10**-6 # viscosity in m**2/s\n", "\n", "d1 = 0.3 # diameter of pipe 1 in m\n", "\n", "d2 = 0.15 # diameter of pipe 2 in m\n", "\n", "d3 = 0.08 # diameter of pipe 3 in m\n", "\n", "g = 9.81 # acclelration due to gravity in m/s**2\n", "\n", "e = 0.025 # for cast iron\n", "\n", "f1 = 0.019 # foe e/d1\n", "\n", "f2 = 0.022 # foe e/d2\n", "\n", "# Solution\n", "\n", "V3 = sqrt(2*g*100/((8.4*(f1)+268.85*(f2)+4.85)))\n", "\n", "V1 = (d3/d1)**2*V3\n", "\n", "V2 = (d3/d2)**2*V3\n", "\n", "# reynolds number for pipe BC\n", "\n", "R1 = V1*d1/nu\n", "\n", "R2 = V2*d2/nu\n", "\n", "Q = V3*pi*d3**2/4\n", "\n", "print \"Discharge through the pipe =\",round(Q,3),\"m**3/s\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 9.10 Page no 332" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Replacement of the flow system = 94.3 m\n" ] } ], "source": [ "# Replace the flow system\n", "\n", "from math import *\n", "\n", "# Given\n", "\n", "D = 0.2 # diameter of pipe 1\n", "\n", "D1 = 0.15 # diameter of pipe 2\n", "\n", "Q = 0.1 # discharge in m**3/s\n", "\n", "nu = 1.007*10**-6 # viscosity in m**2/s\n", "\n", "e = 0.025 # e for cast iron\n", "\n", "r = e/(100*D) \n", "\n", "# Solution\n", "\n", "V = Q/(pi*(0.2)**2/4)\n", "\n", "R = V*D/nu\n", "\n", "f = 0.021 # from moodys law\n", "\n", "r2 = e/D1\n", "\n", "V1 = Q/(pi*D1**2/4)\n", "\n", "R1 = V*D1/nu\n", "\n", "f2 = 0.023 # from moodys law\n", "\n", "L2 = 28562*D1**5/f2\n", "\n", "print \"Replacement of the flow system =\",round(L2,2),\"m\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 9.11 Page no 335" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Discharge through branch 1 = 1.35 m**3/s\n", "Discharge through branch 2 = 0.566 m**3/s\n", "Discharge through branch 3 = 0.082 m**3/s\n", "It is found that hf1=hf2=hf3 = 43.5 The distribution od discharge is correct\n" ] } ], "source": [ "# Discharge through each branch\n", "\n", "from math import *\n", "\n", "# Given\n", "\n", "e = 0.025 # in cm\n", "\n", "nu = 1.007*10**-6 # viscosity in m**2/s\n", "\n", "Q1 = 0.5 # discharge in m**3/s\n", "\n", "D1 = 50\n", "\n", "L1 = 500 # length in m\n", "\n", "g = 9.81\n", "\n", "# Pipe 1\n", "\n", "r1 = e/D # r1 for pipe 1\n", "\n", "V1 = Q1/(pi*(0.5)**2/4)\n", "\n", "R = V*(0.5)/nu\n", "\n", "f1 = 0.018 # for the reynolds no\n", "\n", "hf1 = f*L1*V1**2/(2*g*D1)\n", "\n", "# pipe 2\n", "\n", "hf2 = hf1\n", "\n", "L2 =200 # length in m\n", "\n", "D2 = 0.3 # diameter in m\n", "\n", "r2 = e/D2\n", "\n", "f2 = 0.02 \n", "\n", "V2 = 0.419/sqrt(f2) \n", "\n", "R2 = V2*D2/nu\n", "\n", "Q2 = V2*(pi*D2**2/4)\n", "\n", "#pipe 3\n", "\n", "hf3=hf1\n", "\n", "L3 = 300 # length of pipe 3 in m\n", "\n", "D3 =0.15 # diameter of pipe 3 in m\n", "\n", "r3 = e/D3 \n", "\n", "f = 0.022 # from moody's law\n", "\n", "V3 = 0.242/sqrt(f2)\n", "\n", "R3 = V3*D3/nu\n", "\n", "Q3 = V3*(pi*D3**2/4)\n", "\n", "Td = Q1+Q2+Q3\n", "\n", "q1 = Q1*(2.0/Td)\n", "\n", "q2 = Q2*(2.0/Td)\n", "\n", "q3 = Q3*(2.0/Td)\n", "\n", "print \"Discharge through branch 1 =\",round(q1,2),\"m**3/s\"\n", "\n", "print \"Discharge through branch 2 =\",round(q2,3),\"m**3/s\"\n", "\n", "print \"Discharge through branch 3 =\",round(q3,3),\"m**3/s\"\n", "\n", "# Actual head loss\n", "\n", "d = 0.5\n", "\n", "v1 = q1/(pi*(d)**2/4)\n", "\n", "R4 = v1*d/nu\n", "\n", "r4 = 0.0005 # ratio of e/D\n", "\n", "f = 0.018\n", "\n", "Hf1 = f*L1*v1**2/(2*g*d)\n", "\n", "print \"It is found that hf1=hf2=hf3 =\",round(Hf1,1),\"The distribution od discharge is correct\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 9.14 Page no 349" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Minimum depth = 17.6 ft\n" ] } ], "source": [ "# Find minimum depth below the ridge\n", "\n", "from math import *\n", "\n", "# Given\n", "\n", "e = 0.00015 # from moody's chart\n", "\n", "D = 2 # depth in ft\n", "\n", "r = e/D\n", "\n", "z1 = 100 # elevation in ft\n", "\n", "mu = 1.084*10**-5 # viscosity in Ns/ft**2\n", "\n", "p1 = 34 # pressure head in ft\n", "\n", "p2 = 10 # pressure head in ft\n", "\n", "g = 32.2 # acclelration due to gravity in ft/s**2\n", "\n", "L = 1000 # length in ft\n", "\n", "# Solution\n", "\n", "f = 0.011 # assume\n", "\n", "V = sqrt(100/(10000/(2*2*g)))/sqrt(f)\n", "\n", "R = V*D/mu\n", "\n", "V1 = 10.15\n", "\n", "f1 = 0.0125\n", "\n", "Q = V1*pi*D**2/4\n", "\n", "x = p1-p2-(V1**2/(2*g))-(f1*L*V1**2/(2*g*D))\n", "\n", "Dp = 30 - x\n", "\n", "print \"Minimum depth =\",round(Dp,2),\"ft\"" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.3" } }, "nbformat": 4, "nbformat_minor": 0 }