{ "metadata": { "name": "", "signature": "sha256:27a0e041deb7edcaeea4eb9e050cf5ed492f728315d53e300990f2d773461266" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 5 : Fundamentals of Flow" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.1 Page No : 121" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "m = 2000.;\t\t\t#litre or kg(1litre water = 1kg)\n", "M = m/60;\t\t\t#kg/s\n", "p = 4.5;\t\t\t#bar\n", "p = p*10**5;\t\t\t#N/m**2\n", "g = 9.81;\t\t\t#consmath.tant\n", "w = g*1000;\t\t\t#N/m**3\n", "\n", "# Calculations\n", "H = p/w;\t\t\t#m\n", "Power = M*g*H/1000;\t\t\t#kW\n", "\n", "# Results\n", "print \"Power required in kW : %.f\"%Power\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Power required in kW : 15\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.2 Page No : 122" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "v1 = 400.*10**-3;\t\t\t#m/s\n", "d1 = 300./1000;\t\t\t#meter\n", "d2 = 450./1000;\t\t\t#meter\n", "\n", "# Calculations and Results\n", "A1 = math.pi*d1**2/4;\t\t\t#m**2\n", "A2 = math.pi*d2**2/4;\t\t\t#m**2\n", "Q1 = A1*v1*100;\t\t\t#litres/sec(1m**3 = 1000litres)\n", "print \"Discharge of pipe in litres/sec : %.2f\"%Q1\n", "v2 = (Q1/100)/A2;\t\t\t#m/s(Q1 = Q2)\n", "print \"Mean velocity of flow in m/s : %.3f\"%v2\n", "\n", "#Answer of discharge is wrong in the book.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Discharge of pipe in litres/sec : 2.83\n", "Mean velocity of flow in m/s : 0.178\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.3 Page No : 123" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "PotentialHead = 2;\t\t\t#meter of fluid\n", "print \"Potential Head is \",(PotentialHead),\" meter of fluid.\"\n", "v = 5.;\t\t\t\t#m/s\n", "g = 9.81;\t\t\t#constant\n", "\n", "# Calculations and Results\n", "VelocityHead = v**2/2/g;\t\t\t#m\n", "print \"Velocity Head is \",round(VelocityHead,3),\" meter of fluid.\"\n", "\n", "w = g*1000;\t\t\t#N/m**3\n", "S = 0.8;\t\t\t#sp. gravity of fluid\n", "p = 200;\t\t\t#kPa\n", "PressureHead = p*10**3/w/S;\t\t\t#meter of fluid\n", "print \"Pressure Head is \",round(PressureHead,3),\" meter of fluid.\"\n", "\n", "TotalHead = PotentialHead+VelocityHead+PressureHead;\t\t\t#meter of fluid\n", "print \"Total Head is \",round(TotalHead,3),\" meter of fluid.\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Potential Head is 2 meter of fluid.\n", "Velocity Head is 1.274 meter of fluid.\n", "Pressure Head is 25.484 meter of fluid.\n", "Total Head is 28.758 meter of fluid.\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.4 Page No : 124" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "p = 0.8/10**-4;\t\t\t#kg/m**2\n", "datumH = 4.;\t\t\t#meter\n", "v = 0.8;\t\t\t#m/s\n", "g = 9.81;\t\t\t#consmath.tant\n", "\n", "# Calculations\n", "VelocityH = v**2/2/g;\t\t\t#m\n", "w = 1000;\t\t\t#kg/m**3\n", "PressureH = p/w;\t\t\t#meter of fluid\n", "TotalH = datumH+VelocityH+PressureH;\t\t\t#meter of fluid\n", "\n", "# Results\n", "print \"Total Energy is \",round(TotalH,4),\" meter.\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Total Energy is 12.0326 meter.\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.5 Page No : 125" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "D1 = 800./1000;\t\t\t#m**2\n", "D2 = 600./1000;\t\t\t#m**2\n", "p1 = 100.;\t\t\t#kPa\n", "p2 = 40.;\t\t\t#kPa\n", "v1 = 4000.*10**-3;\t\t\t#m/s\n", "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", "Z1 = 4.;\t\t\t#meter\n", "Z2 = 7.;\t\t\t#meter\n", "rho = 1.;\t\t\t#sp. gravity\n", "g = 9.81;\t\t\t#constant\n", "\n", "# Calculations\n", "PHeadA = p1/rho/g;\t\t\t#meter of fluid\n", "PHeadB = p2/rho/g;\t\t\t#meter of fluid\n", "v2 = A1*v1/A2;\t\t\t#m/s\n", "VHeadA = v1**2/2/g;\t\t\t#meter\n", "VHeadB = v2**2/2/g;\t\t\t#meter\n", "E1 = Z1+PHeadA+VHeadA;\t\t\t#meter\n", "E2 = Z2+PHeadB+VHeadB;\t\t\t#meter\n", "\n", "# Results\n", "if E1>E2:\n", " print \"Total Energy at A(\",round(E1,4),\" meter) is greater than total energy at B(\",round(E2,4),\" meter). \\\n", " \\nFlow of water is from A to B.\"\n", "else:\n", " print \"Total Energy at B(\",(E2),\" meter) is greater than total energy at A(\",(E1),\" meter). Flow of water is from B to A.\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Total Energy at A( 15.0092 meter) is greater than total energy at B( 13.6548 meter). \n", "Flow of water is from A to B.\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.6 Page No : 130" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "D1 = 1.25;\t\t\t#meter\n", "D2 = 0.625;\t\t\t#meter\n", "slope = 100.;\n", "L = 300.;\t\t\t#/meter\n", "g = 9.81;\t\t\t#consmath.tant\n", "Z12 = L/slope;\t\t\t#meter\n", "Q = 100.;\t\t\t#litres/sec\n", "Q = Q*10**-3;\t\t\t#m**3/sec\n", "\n", "# Calculations\n", "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", "v1 = Q/A1;\t\t\t#m/s\n", "v2 = Q/A2;\t\t\t#m/s\n", "p1 = 100.;\t\t\t#kN/m**2\n", "#Higher End : \n", "w = 9.81;\t\t\t#kN/m**3\n", "Phead = p1/w;\t\t\t#meter\n", "Vhead = v1**2/2/g;\t\t\t#meter\n", "\t\t\t#Lower End : \n", "w = 9.81;\t\t\t#kN/m**3\n", "\t\t\t#Phead = p1/w;\t\t\t#meter\n", "Vhead = v2**2/2/g;\t\t\t#meter\n", "p2 = (Z12+v1**2/2/g+p1/w-v2**2/2/g)*w;\t\t\t#kN/m**2(By Bernoulli's theorem)\n", "\n", "# Results\n", "print \"Pressure at the lower end in kN per m**2 : %.2f\"%p2\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Pressure at the lower end in kN per m**2 : 129.38\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.7 Page No : 132" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "Z1 = 0.;\t\t\t#meter\n", "Z2 = 5.;\t\t\t#meter\n", "Q = 300.*10**-3;\t\t\t#m/s\n", "D1 = 0.3;\t\t\t#meter\n", "D2 = 0.6;\t\t\t#meter\n", "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", "v1 = Q/A1;\t\t\t#m/s\n", "v2 = Q/A2;\t\t\t#m/s\n", "p1 = 100.;\t\t\t#kN/m**2\n", "p2 = 600.;\t\t\t#kN/m**2\n", "g = 9.81;\t\t\t#consmath.tant\n", "\n", "# Calculations and Results\n", "Vhead11 = v1**2/2/g;\t\t\t#meter\n", "Vhead22 = v2**2/2/g;\t\t\t#meter\n", "Phead11 = p1/g;\t\t\t#meter\n", "Phead22 = p2/g;\t\t\t#meter\n", "E1_11 = Z1+Vhead11+Phead11;\t\t\t#meter\n", "E2_22 = Z2+Vhead22+Phead22;\t\t\t#meter\n", "\n", "if E1_11>E2_22:\n", " print \"Energy at section 1-1(\",round(E1_11,3),\" meter) is greater than energy at section 2-2(\",(E2_22),\" meter). Flow of water is from section 1-1 to 2-2.\"\n", " HeadLoss = E1_11-E2_22;\t\t\t#meter\n", " print \"Head Loss in meter : \",HeadLoss\n", "else:\n", "\tprint \"Energy at section 2-2(\",round(E2_22,3),\" meter) is greater than energy at section 1-1(\",round(E1_11,3),\" meter). Flow of water is from section 2-2 to 1-1.\"\n", "\tHeadLoss = E2_22-E1_11;\t\t\t#meter\n", "\tprint \"Head Loss in meter : %.3f\"%HeadLoss\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Energy at section 2-2( 66.219 meter) is greater than energy at section 1-1( 11.112 meter). Flow of water is from section 2-2 to 1-1.\n", "Head Loss in meter : 55.108\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.8 Page No : 133" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "D = 400./1000;\t\t\t#meter\n", "v1 = 20.;\t\t\t#m/s\n", "Z1 = 28.;\t\t\t#meter\n", "Z2 = 31.;\t\t\t#meter\n", "p1 = 4./10**-4;\t\t\t#kg/m**2\n", "p2 = 3./10**-4;\t\t\t#kg/m**2\n", "g = 9.81;\t\t\t#consmath.tant\n", "w = 1000.;\t\t\t#kg/m**3\n", "\n", "# Calculations\n", "Vhead1 = v1**2/2/g;\t\t\t#meter\n", "Phead1 = p1/w;\t\t\t#meter\n", "Vhead2 = Vhead1;\t\t\t#meter\n", "Phead2 = p2/w;\t\t\t#meter\n", "E1 = Z1+Vhead1+Phead1;\t\t\t#meter\n", "E2 = Z2+Vhead2+Phead2;\t\t\t#meter\n", "HL = E1-E2;\t\t\t#meter\n", "\n", "# Results\n", "print \"Loss of head between P & Q in meter : \",HL\n", " \n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Loss of head between P & Q in meter : 7.0\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.9 Page No : 134" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\n", "\t\t\t\n", "# Variables :\n", "Z1 = 0.;\t\t\t#meter\n", "Z2 = 4.;\t\t\t#meter\n", "rho = 0.8;\t\t\t#sp. gravity\n", "\n", "# Calculations and Results\n", "Q = 250.*10**-3;\t\t\t#m/s or cumec\n", "D1 = 250./1000;\t\t\t#meter\n", "D2 = 500./1000;\t\t\t#meter\n", "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", "v1 = Q/A1;\t\t\t#m/s\n", "v2 = Q/A2;\t\t\t#m/s\n", "p1 = 0.1*10**3;\t\t\t#N/m**2\n", "p2 = 0.06*10**3;\t\t\t#N/m**2\n", "g = 9.81;\t\t\t#consmath.tant\n", "Vhead1 = v1**2/2/g;\t\t\t#meter\n", "Phead1 = p1/rho/g;\t\t\t#meter\n", "Vhead2 = v2**2/2/g;\t\t\t#meter\n", "Phead2 = p2/rho/g;\t\t\t#meter\n", "H1 = Z1+Vhead1+Phead1;\t\t\t#meter\n", "H2 = Z2+Vhead2+Phead2;\t\t\t#meter\n", "if H1>H2 :\n", " print \"Total head at A(\",round(H1,3),\" meter) is greater than total head at B(\",round(H2,3),\" meter). Flow will take place from A-B.\"\n", " HeadLoss = H1-H2;\t\t\t#meter\n", " print \"Head Loss in meter : %.3f\"%HeadLoss\n", "else:\n", " print \"Total head at B(\",(H2),\" meter) is greater than total head at A(\",(H1),\" meter). Flow will take place from B-A.\"\n", " HeadLoss = H2-H1;\t\t\t#meter\n", " print \"Head Loss in meter : \",HeadLoss\n", " \n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Total head at A( 14.064 meter) is greater than total head at B( 11.728 meter). Flow will take place from A-B.\n", "Head Loss in meter : 2.336\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.10 Page No : 135" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\n", "\t\t\t\n", "# Variables :\n", "Q = 200.*10**-3;\t\t\t#m**3/s\n", "D1 = 250./1000;\t\t\t#meter\n", "D2 = 200./1000;\t\t\t#meter\n", "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", "v1 = Q/A1;\t\t\t#m/s\n", "v2 = Q/A2;\t\t\t#m/s\n", "Z1 = 2.;\t\t\t#meter\n", "Z2 = 8.;\t\t\t#meter\n", "g = 9.81;\t\t\t#consmath.tant\n", "w = 1000;\t\t\t#kg/m**3\n", "\n", "# Calculations\n", "p1 = w*(Z1-v1**2/2/g);\t\t\t#kg/m**2\n", "p2 = v1**2/2/g*w+p1+Z2*w-v2**2/2/g*w-4*w;\t\t\t#kg/m**2(by Bernolli's theorem)\n", "p1 = p1*g;\t\t\t#N/m**2\n", "p2 = p2*g;\t\t\t#N/m**2\n", "\n", "# Results\n", "print \"Pressure intensity at point P in N/m**2 : \",p1\n", "print \"Pressure intensity at point Q in N/m**2 : \",p2\n", "\t\t\t\n", "\n", "# Note :Answer in the book is not accurate.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Pressure intensity at point P in N/m**2 : 11319.768636\n", "Pressure intensity at point Q in N/m**2 : 38595.7632715\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.11 Page No : 137" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\n", "# Variables :\n", "slope = 1./10;\n", "Z1 = 0.;\t\t\t#meter\n", "Z2 = 40.*slope;\t\t\t#meter\n", "p1 = 1.5/10**-4;\t\t\t#kg/cm**2\n", "v2 = 4.1;\t\t\t#m/s\n", "D1 = 600./1000;\t\t\t#meter\n", "D2 = 300./1000;\t\t\t#meter\n", "\n", "# Calculations\n", "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", "v1 = A2*v2/A1;\t\t\t#m/s\n", "g = 9.81;\t\t\t#consmath.tant\n", "w = 1000;\t\t\t#kg/m**3\n", "p2 = (p1/w+v1**2/2/g+Z1-v2**2/2/g-Z2)*w;\t\t\t#kg/m**2(by Bernolli's theorem)\n", "p2 = p2*10**-4;\t\t\t#kg/cm**2\n", "Q1 = A1*v1;\t\t\t#m**3/sec\n", "Q1 = Q1*1000;\t\t\t#litre/sec\n", "\n", "# Results\n", "print \"Pressure intensity at point Q in kg/cm**2 : %.3f\"%p2\n", "print \"Discharge of pipe in litres/sec : %.3f\"%Q1\n", "\n", "#Answer in the book is not accurate. calculation for A1 & A2 is wrong.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Pressure intensity at point Q in kg/cm**2 : 1.020\n", "Discharge of pipe in litres/sec : 289.812\n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.12 Page No : 143" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\n", "\t\t\t\n", "# Variables :\n", "D1 = 180./1000;\t\t\t#meter\n", "D2 = 90./1000;\t\t\t#meter\n", "g = 9.81;\t\t\t#gravity consmath.tant\n", "S = 0.8;\t\t\t#sp. gravity of oil\n", "Sm = 13.6;\t\t\t#sp. gravity of mercury\n", "x = 300./1000;\t\t\t#meter\n", "K = 0.97;\t\t\t#coeff. of meter\n", "\n", "# Calculations\n", "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", "C = A1*A2*math.sqrt(2*g)/math.sqrt(A1**2-A2**2)\n", "h = x*(Sm/S-1);\t\t\t#meter of oil\n", "Q = K*C*math.sqrt(h);\t\t\t#m**3/sec\n", "Q = Q*1000;\t\t\t#litre/sec\n", "\n", "# Results\n", "print \"Discharge of oil in litres/sec : %.2f\"%Q\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Discharge of oil in litres/sec : 61.85\n" ] } ], "prompt_number": 20 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.13 Page No : 145" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "D1byD2 = 1/0.7;\n", "D1 = 320./1000;\t\t\t#meter\n", "D2 = 320.*0.7/1000;\t\t\t#meter\n", "g = 9.81;\t\t\t#gravity consmath.tant\n", "Q = 30.6/60;\t\t\t#m**3/sec\n", "\n", "# Calculations\n", "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", "C = A1*math.sqrt(2*g)/math.sqrt((D1byD2)**4-1);\n", "h = 1.2;\t\t\t#meter of water\n", "K = Q/C/math.sqrt(h);\t\t\t#Coeff. of meter\n", "\n", "# Results\n", "print \"Coefficient of meter : %.3f\"%K\n", "\n", "#Answer in the book is wrong.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Coefficient of meter : 2.325\n" ] } ], "prompt_number": 21 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.14 Page No : 146" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "D1 = 320./1000;\t\t\t#meter\n", "D2 = 224./1000;\t\t\t#meter\n", "g = 9.81;\t\t\t#gravity consmath.tant\n", "Q = 25000./1000./60;\t\t\t#m**3/sec\n", "\n", "# Calculations\n", "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", "C = 0.4984;\t\t\t#venturi consmath.tant\n", "K = 0.92;\t\t\t#Coeff. of meter\n", "h = (Q/K/C)**2\n", "S = 1;\t\t\t#sp. gravity\n", "Sm = 13.6;\t\t\t#sp. gravity\n", "x = h/(Sm/S-1);\t\t\t#meter of water\n", "\n", "# Results\n", "print \"Deflection in manometer(mm) : %.1f\"%(x*1000)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Deflection in manometer(mm) : 65.5\n" ] } ], "prompt_number": 22 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.15 Page No : 146" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "D1 = 120./1000;\t\t\t#meter\n", "D2 = 120*0.55/1000;\t\t\t#meter\n", "g = 9.81;\t\t\t#gravity consmath.tant\n", "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", "Q = 30./1000;\t\t\t#m**3/sec\n", "\n", "# Calculations\n", "C = A1*math.sqrt(2*g)/math.sqrt((D1/D2)**4-1);\t\t\t#venturi consmath.tant\n", "K = 0.94;\t\t\t#Coeff. of meter\n", "h = (Q/K/C)**2;\t\t\t#meter\n", "Z1 = 0;\t\t\t#meter\n", "Z2 = 0.3;\t\t\t#meter\n", "S = 0.79;\t\t\t#sp. gravity\n", "w = 1000*S;\t\t\t#kg/m**3\n", "delta_p = (h+Z1-Z2)*w;\t\t\t#kg/m**2\n", "delta_p = delta_p*g;\t\t\t#N/m**2\n", "\n", "# Results\n", "print \"Pressure difference in N/m**2 : %.3f\"%delta_p\n", "\n", "#answer is wrong in the book.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Pressure difference in N/m**2 : 28903.473\n" ] } ], "prompt_number": 23 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.16 Page No : 147" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "D1 = 160./1000;\t\t\t#meter\n", "D2 = 60./1000;\t\t\t#meter\n", "g = 9.81;\t\t\t#gravity consmath.tant\n", "S = 0.8;\t\t\t#sp. gravity\n", "Sm = 13.6;\t\t\t#sp. gravity of mercury\n", "Q = 0.05;\t\t\t#m**3/sec\n", "K = 0.98;\t\t\t#Coeff. of meter\n", "\n", "# Calculations\n", "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", "C = A1*math.sqrt(2*g)/math.sqrt((A1/A2)**2-1);\t\t\t#venturi consmath.tant\n", "h = (Q/K/C)**2;\t\t\t#meter\n", "x = h/(Sm/S-1);\t\t\t#meter\n", "\n", "# Results\n", "print \"Deflection in meter : %.2f\"%x\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Deflection in meter : 1.02\n" ] } ], "prompt_number": 24 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.17 Page No : 149" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "D1 = 200./1000;\t\t\t#meter\n", "D2 = 100./1000;\t\t\t#meter\n", "x = 220./1000;\t\t\t#meter\n", "g = 9.81;\t\t\t#gravity consmath.tant\n", "K = 0.98;\t\t\t#Coeff. of meter\n", "S = 1.;\t\t\t#sp. gravity\n", "Sm = 13.6;\t\t\t#sp. gravity of mercury\n", "\n", "# Calculations\n", "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", "C = A1*math.sqrt(2*g)/math.sqrt((A1/A2)**2-1);\t\t\t#venturi consmath.tant\n", "h = x*(Sm/S-1);\t\t\t#meter\n", "Q = K*C*math.sqrt(h);\t\t\t#m**3/sec\n", "Q = Q*1000;\t\t\t#litres/sec\n", "\n", "# Results\n", "print \"Rate of flow in litres/sec : %.f\"%Q\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Rate of flow in litres/sec : 59\n" ] } ], "prompt_number": 25 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.18 Page No : 150" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\n", "\t\t\t\n", "# Variables :\n", "D1 = 40./100;\t\t\t#meter\n", "D2 = 15./100;\t\t\t#meter\n", "x = 25./100;\t\t\t#meter\n", "g = 9.81;\t\t\t#gravity consmath.tant\n", "K = 0.98;\t\t\t#Coeff. of meter\n", "S = 1.;\t\t\t#sp. gravity\n", "Sm = 13.6;\t\t\t#sp. gravity of mercury\n", "\n", "# Calculations\n", "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", "C = A1*A2*math.sqrt(2*g)/math.sqrt(A1**2-A2**2);\t\t\t#venturi consmath.tant\n", "h = x*(Sm/S-1);\t\t\t#meter\n", "Q = K*C*math.sqrt(h);\t\t\t#m**3/sec\n", "Q = Q*1000*3600;\t\t\t#litres/hour\n", "\n", "# Results\n", "print \"Flow of water in litres/hour : %.f\"%Q\n", "\n", "#Answer in the book is wrong.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Flow of water in litres/hour : 495043\n" ] } ], "prompt_number": 26 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.19 Page No : 151" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "D1 = 15./100;\t\t\t#meter\n", "D2 = 7.5/100;\t\t\t#meter\n", "g = 9.81;\t\t\t#gravity consmath.tant\n", "p1 = 4*g*10**4;\t\t\t#N/m**2\n", "p2 = 1.5*g*10**4;\t\t\t#kg/cm**2\n", "w = 9.81;\t\t\t#kg/m**2\n", "\n", "# Calculations\n", "A1 = math.pi*D1**2/4;\t\t\t#m**2\n", "A2 = math.pi*D2**2/4;\t\t\t#m**2\n", "v1BYv2 = A2/A1;\n", "\t\t\t#v1**2/2/g+p1/w = v2**2/2/g+p2/w\n", "\t\t\t#v1**2 = v2**2-50*g\n", "v2 = math.sqrt(50*g/(1-v1BYv2**2));\t\t\t#m/s\n", "Q = A2*v2;\t\t\t#m**3/sec\n", "Q = Q*1000;\t\t\t#litres/sec\n", "\n", "# Results\n", "print \"Flow of water in litres/sec : %.f\"%Q\n", "\t\t\t#Answer is wrong in the book.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Flow of water in litres/sec : 101\n" ] } ], "prompt_number": 27 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.20 Page No : 152" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\n", "\t\t\t\n", "# Variables :\n", "D1 = 20./100;\t\t\t#meter\n", "D2 = 15./100;\t\t\t#meter\n", "A1 = math.pi/4*D1**2;\t\t\t#m**2\n", "A2 = math.pi/4*D2**2;\t\t\t#m**2\n", "\n", "# Calculations and Results\n", "v1 = 2;\t\t\t#m/s\n", "v2 = A1*v1/A2;\t\t\t#m/s\n", "print \"Velocity at another section in m/s : %.2f\"%v2\n", "FlowRate = A1*v1;\t\t\t#m**3/s\n", "FlowRate = FlowRate*1000;\t\t\t#litres/s\n", "print \"Flow Rate in litres/sec : %.1f\"%FlowRate\n", "\n", "#Answer of velocity in the book is not accurate.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Velocity at another section in m/s : 3.56\n", "Flow Rate in litres/sec : 62.8\n" ] } ], "prompt_number": 28 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.21 Page No : 153" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "rd = 0.75;\t\t\t#relative density\n", "D = 12.5/100;\t\t\t#meter\n", "p = 1.;\t\t\t#bar\n", "p = p*1.02;\t\t\t#kg/cm**2\n", "\n", "# Calculations\n", "p = p*9.81*10**4/1000;\t\t\t#kPa\n", "g = 9.81;\t\t\t#gravity consmath.tant\n", "w = g*rd;\t\t\t#N/m**3\n", "pH = p/w;\t\t\t#meter\n", "Z = 2.5;\t\t\t#meter\n", "Et = 20;\t\t\t#Nm\n", "v = math.sqrt((Et-p/w-Z)*2*g);\t\t\t#m/s\n", "A = math.pi/4*D**2;\t\t\t#m**2\n", "Q = A*v;\t\t\t#m**3/sec\n", "Q = A*v*1000;\t\t\t#litres/sec\n", "\n", "# Results\n", "print \"Flow Rate of oil in litres/sec : %.f\"%Q\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Flow Rate of oil in litres/sec : 107\n" ] } ], "prompt_number": 29 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.22 Page No : 154" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "rd = 0.75;\t\t\t#relative density\n", "d1 = 0.3;\t\t\t#meter\n", "d2 = 0.1;\t\t\t#meter\n", "Q = 50./1000;\t\t\t#m**3/sec\n", "\n", "# Calculations\n", "A1 = math.pi/4*d1**2;\t\t\t#m**2\n", "A2 = math.pi/4*d2**2;\t\t\t#m**2\n", "v1 = Q/A1;\t\t\t#m/s\n", "v2 = A1*v1/A2;\t\t\t#m/s\n", "p1 = 200;\t\t\t#kN/m**2\n", "p2 = 100;\t\t\t#kN/m**2\n", "w = 9.81;\t\t\t#kN/m**3\n", "g = 9.81;\t\t\t#gravity consmath.tant\n", "Z1 = 0;\t\t\t#meter\n", "Z2 = Z1+p1/w+v1**2/2/g-p2/w-v2**2/2/g;\t\t\t#meter\n", "\n", "# Results\n", "print \"Z in meter : %.2f\"%Z2\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Z in meter : 8.15\n" ] } ], "prompt_number": 30 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 5.23 Page No : 155" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "\t\t\t\n", "# Variables :\n", "D1 = 300./1000;\t\t\t#meter\n", "D2 = 150./1000;\t\t\t#meter\n", "Q = 50./1000;\t\t\t#m**3/sec\n", "\n", "# Calculations\n", "A1 = math.pi/4*D1**2;\t\t\t#m**2\n", "A2 = math.pi/4*D2**2;\t\t\t#m**2\n", "delpBYw = 3;\t\t\t#p1/w-p2/w = 3;\t\t\t#m\n", "v1BYv2 = A2/A1;\n", "Z1 = 0;\t\t\t#meter\n", "Z2 = 0;\t\t\t#meter\n", "g = 9.81;\t\t\t#gravity consmath.tant\n", "\t\t\t#HeadLoss = 1/8*v**2/2/g\n", "\t\t\t#Z1+p1/w+v1**2/2/g = Z2+p2/w+v2**2/2/g+HeadLoss\n", "v2 = math.sqrt((Z1-Z2+delpBYw)/(1./2/g-v1BYv2**2/2/g+1/8/2/g));\t\t\t#m/s\n", "Q = A2*v2;\t\t\t#m**3/s\n", "Q = Q*1000;\t\t\t#litres/sec\n", "\n", "# Results\n", "print \"Discharge in pipe in litres/sec : %.1f\"%Q\n", "\n", "# note : rounding off error" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Discharge in pipe in litres/sec : 140.0\n" ] } ], "prompt_number": 31 } ], "metadata": {} } ] }