diff options
author | debashisdeb | 2014-06-20 15:42:42 +0530 |
---|---|---|
committer | debashisdeb | 2014-06-20 15:42:42 +0530 |
commit | 83c1bfceb1b681b4bb7253b47491be2d8b2014a1 (patch) | |
tree | f54eab21dd3d725d64a495fcd47c00d37abed004 /Industrial_Instrumentation/Chapter_5.ipynb | |
parent | a78126bbe4443e9526a64df9d8245c4af8843044 (diff) | |
download | Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.gz Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.bz2 Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.zip |
removing problem statements
Diffstat (limited to 'Industrial_Instrumentation/Chapter_5.ipynb')
-rw-r--r-- | Industrial_Instrumentation/Chapter_5.ipynb | 1206 |
1 files changed, 625 insertions, 581 deletions
diff --git a/Industrial_Instrumentation/Chapter_5.ipynb b/Industrial_Instrumentation/Chapter_5.ipynb index fa1d0762..4ec568e3 100644 --- a/Industrial_Instrumentation/Chapter_5.ipynb +++ b/Industrial_Instrumentation/Chapter_5.ipynb @@ -1,874 +1,918 @@ { "metadata": { - "name": "Chapter_5" - }, - "nbformat": 2, + "name": "", + "signature": "sha256:6f1ee33190d8c693b6015349dc3ea8fa65731657e9afb9deaa10542a8aa4bde7" + }, + "nbformat": 3, + "nbformat_minor": 0, "worksheets": [ { "cells": [ { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h1>Chapter 5: Flow <h1>" ] - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.1, Page Number: 310<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''flow rate calulation'''", - "", - "import math", - "#(i)", - "", - "#variable declaration", - "d=75.0*10**-3 # diameter of pipe", - "a=math.pi*d**2/4 # area of cross section of pipe", - "v=760.0*10**-3 # flow velocity", - "", - "#calculation", - "Q=v*a", - "Q=Q*10**3", - "print('(i)\\nVolume Flow Rate Q=%.3f *10^-3 m^3/sec' %Q)", - "rho=1000.0", - "W=rho*Q*10**-3", - "", - "#result", + "\n", + "\n", + "import math\n", + "#(i)\n", + "\n", + "#variable declaration\n", + "d=75.0*10**-3 # diameter of pipe\n", + "a=math.pi*d**2/4 # area of cross section of pipe\n", + "v=760.0*10**-3 # flow velocity\n", + "\n", + "#calculation\n", + "Q=v*a\n", + "Q=Q*10**3\n", + "print('(i)\\nVolume Flow Rate Q=%.3f *10^-3 m^3/sec' %Q)\n", + "rho=1000.0\n", + "W=rho*Q*10**-3\n", + "\n", + "#result\n", "print('\\n(ii)\\nMass Flow rate W=%.3f kg/sec' %W)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(i)", - "Volume Flow Rate Q=3.358 *10^-3 m^3/sec", - "", - "(ii)", + "(i)\n", + "Volume Flow Rate Q=3.358 *10^-3 m^3/sec\n", + "\n", + "(ii)\n", "Mass Flow rate W=3.358 kg/sec" ] } - ], + ], "prompt_number": 1 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.2, page Number:310<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Volumetric flow rate calculation'''", - "", - "import math", - "", - "#variable declaration", - "D=40.0 # Diameter of pipe", - "d=20.0 # Diameter of Orifice", - "mr=15.0 # Manometer reading", - "", - "#calculation", - "h=(13.6-1)*15.0*10.0", - "B=d/D", - "M=1/math.sqrt(1-(B**4))", - "Cd=0.5999", - "x=math.sqrt(2*9.8*h*(10**-3))", - "Q=x*Cd*M*(math.pi*((20*(10**-3))**2))/4", - "Q=Q*3600.0", - "", - "#result", - "print('Volumetric flow rate Q= %.4f m^3/hr' %Q)", - "#Answer slightly deviates from answer given in the book because of pi value.", + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "D=40.0 # Diameter of pipe\n", + "d=20.0 # Diameter of Orifice\n", + "mr=15.0 # Manometer reading\n", + "\n", + "#calculation\n", + "h=(13.6-1)*15.0*10.0\n", + "B=d/D\n", + "M=1/math.sqrt(1-(B**4))\n", + "Cd=0.5999\n", + "x=math.sqrt(2*9.8*h*(10**-3))\n", + "Q=x*Cd*M*(math.pi*((20*(10**-3))**2))/4\n", + "Q=Q*3600.0\n", + "\n", + "#result\n", + "print('Volumetric flow rate Q= %.4f m^3/hr' %Q)\n", + "#Answer slightly deviates from answer given in the book because of pi value.\n", "#if pi=3.14, then answer is same as in textbook " - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "Volumetric flow rate Q= 4.2649 m^3/hr" ] } - ], + ], "prompt_number": 2 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.3, Page Number: 310<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Nominal flow velocity'''", - "", - "import math", - "#variable declaration", - "Re=10.0**5 # Reynolds number", - "D=40.0*10**-3 # Diameter of pipe ", - "v=10**-6 # Kinematic viscosity in m^2/sec", - "", - "#calculation", - "V1=Re*v/D", - "A1=(math.pi*(40.0*10**-3)**2)/4", - "A2=(math.pi*(20.0*10**-3)**2)/4", - "V2=V1*A1/A2", - "", - "#result", + "\n", + "\n", + "import math\n", + "#variable declaration\n", + "Re=10.0**5 # Reynolds number\n", + "D=40.0*10**-3 # Diameter of pipe \n", + "v=10**-6 # Kinematic viscosity in m^2/sec\n", + "\n", + "#calculation\n", + "V1=Re*v/D\n", + "A1=(math.pi*(40.0*10**-3)**2)/4\n", + "A2=(math.pi*(20.0*10**-3)**2)/4\n", + "V2=V1*A1/A2\n", + "\n", + "#result\n", "print('V2=%.1f m/sec' %V2)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "V2=10.0 m/sec" ] } - ], + ], "prompt_number": 3 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.4, Page Number: 311<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''pressure difference calculation'''", - "", - "import math", - "", - "#variable declaration", - "Cd=0.61 # discharge coefficient", - "D=40.0*10**-3 # Diameter of pipe", - "d=20.0*10**-3 # Diameter of Orifice ", - "", - "#calculation", - "M=1/math.sqrt(1-(d/D)**4)", - "V2=10.0", - "rho=1000.0", - "g=9.8", - "X=V2*math.sqrt(rho/(2*g))/(Cd*M)", - "p_diff=X**2", - "p_diff=math.floor(p_diff/100)", - "p_diff=p_diff/100.0", - "", - "", - "#result", + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "Cd=0.61 # discharge coefficient\n", + "D=40.0*10**-3 # Diameter of pipe\n", + "d=20.0*10**-3 # Diameter of Orifice \n", + "\n", + "#calculation\n", + "M=1/math.sqrt(1-(d/D)**4)\n", + "V2=10.0\n", + "rho=1000.0\n", + "g=9.8\n", + "X=V2*math.sqrt(rho/(2*g))/(Cd*M)\n", + "p_diff=X**2\n", + "p_diff=math.floor(p_diff/100)\n", + "p_diff=p_diff/100.0\n", + "\n", + "\n", + "#result\n", "print('P1-P2 = %.2f kg/cm^2'%p_diff)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "P1-P2 = 1.28 kg/cm^2" ] } - ], + ], "prompt_number": 4 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.5, Page Number: 312<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''volume flow rate for orifice and venturi Tubes'''", - "", - "import math", - "", - "#variable declaration", - "Cd=0.6 # discharge coefficient", - "D=150.0*10**-3 # Diameter of pipe", - "d=75.0*10**-3 # Diameter of Orifice ", - "p=250.0 # pressure recorded", - "g=9.8 # acceleration due to gravity", - "rho=1000.0 # Water density ", - "s=75.0*10**-3 # venturi tube size", - "", - "#(a)", - "", - "#calculation", - "Q=Cd*math.pi*s**2*math.sqrt(2*g*p/rho)/(4*math.sqrt(1-(d/D)**4)) ", - "", - "#result", - "print('(a) For orifice plate\\nQ=%f m^3/sec = %.3f litres/sec'%(Q,Q*1000))", - "", - "#calculation", - "Cd1=0.99", - "Q2=Cd1*math.pi*s**2*math.sqrt(2*g*p/rho)/(4*math.sqrt(1-(d/D)**4))", - "", - "#result", - "print('\\n\\n(b)For venturi tube\\nQ=%f m^3/sec = %.2f litres/sec'%(Q2,Q2*1000))", - "#Answer slightly deviates from answer given in the book because of pi value.", + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "Cd=0.6 # discharge coefficient\n", + "D=150.0*10**-3 # Diameter of pipe\n", + "d=75.0*10**-3 # Diameter of Orifice \n", + "p=250.0 # pressure recorded\n", + "g=9.8 # acceleration due to gravity\n", + "rho=1000.0 # Water density \n", + "s=75.0*10**-3 # venturi tube size\n", + "\n", + "#(a)\n", + "\n", + "#calculation\n", + "Q=Cd*math.pi*s**2*math.sqrt(2*g*p/rho)/(4*math.sqrt(1-(d/D)**4)) \n", + "\n", + "#result\n", + "print('(a) For orifice plate\\nQ=%f m^3/sec = %.3f litres/sec'%(Q,Q*1000))\n", + "\n", + "#calculation\n", + "Cd1=0.99\n", + "Q2=Cd1*math.pi*s**2*math.sqrt(2*g*p/rho)/(4*math.sqrt(1-(d/D)**4))\n", + "\n", + "#result\n", + "print('\\n\\n(b)For venturi tube\\nQ=%f m^3/sec = %.2f litres/sec'%(Q2,Q2*1000))\n", + "#Answer slightly deviates from answer given in the book because of pi value.\n", "#if pi=3.14, then answer is same as in textbook " - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(a) For orifice plate", - "Q=0.006060 m^3/sec = 6.060 litres/sec", - "", - "", - "(b)For venturi tube", + "(a) For orifice plate\n", + "Q=0.006060 m^3/sec = 6.060 litres/sec\n", + "\n", + "\n", + "(b)For venturi tube\n", "Q=0.009999 m^3/sec = 10.00 litres/sec" ] } - ], + ], "prompt_number": 5 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.6, Page Number: 312<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''determination of Reynolds number'''", - "", - "import math", - "", - "#(i)", - "", - "#variable declaration", - "V=0.02 # volumetric flow rate", - "d=10*10**-2 # Diameter of pipe", - "", - "#calculation", - "A=math.pi*d**2/4", - "v=V/A", - "rho=1000.0", - "Re=rho*v*d/10**-3", - "Re=Re/100000.0", - "", - "#result", - "print('(i)\\nReynolds number(Re) = %.3f * 10^5'%Re)", - "", - "#(ii)", - "", - "#variable declaration", - "Cd=0.98 # discharge coefficient ", - "D=20*10**-2 # Diameter of pipe ", - "d=10*10**-2 # Diameter of orifice", - "", - "#calculation", - "M=1/math.sqrt(1-(d/D)**4)", - "a2=math.pi*d**2/4", - "Q=0.02", - "g=9.8", - "X=Q*math.sqrt(rho)/(M*Cd*a2*math.sqrt(2*g))", - "p_diff=math.ceil(X**2)", - "", - "#result", - "print('\\n(ii)\\nPressur_difference = %d kg/m^2 = %.4f kg/cm^2'%(p_diff,p_diff/10000))", - "#Answer slightly deviates from answer given in the book because of pi value.", + "\n", + "\n", + "import math\n", + "\n", + "#(i)\n", + "\n", + "#variable declaration\n", + "V=0.02 # volumetric flow rate\n", + "d=10*10**-2 # Diameter of pipe\n", + "\n", + "#calculation\n", + "A=math.pi*d**2/4\n", + "v=V/A\n", + "rho=1000.0\n", + "Re=rho*v*d/10**-3\n", + "Re=Re/100000.0\n", + "\n", + "#result\n", + "print('(i)\\nReynolds number(Re) = %.3f * 10^5'%Re)\n", + "\n", + "#(ii)\n", + "\n", + "#variable declaration\n", + "Cd=0.98 # discharge coefficient \n", + "D=20*10**-2 # Diameter of pipe \n", + "d=10*10**-2 # Diameter of orifice\n", + "\n", + "#calculation\n", + "M=1/math.sqrt(1-(d/D)**4)\n", + "a2=math.pi*d**2/4\n", + "Q=0.02\n", + "g=9.8\n", + "X=Q*math.sqrt(rho)/(M*Cd*a2*math.sqrt(2*g))\n", + "p_diff=math.ceil(X**2)\n", + "\n", + "#result\n", + "print('\\n(ii)\\nPressur_difference = %d kg/m^2 = %.4f kg/cm^2'%(p_diff,p_diff/10000))\n", + "#Answer slightly deviates from answer given in the book because of pi value.\n", "#if pi=3.14, then answer is same as in textbook " - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(i)", - "Reynolds number(Re) = 2.546 * 10^5", - "", - "(ii)", + "(i)\n", + "Reynolds number(Re) = 2.546 * 10^5\n", + "\n", + "(ii)\n", "Pressur_difference = 323 kg/m^2 = 0.0323 kg/cm^2" ] } - ], + ], "prompt_number": 6 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.7, Page Number: 313<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Fluid velocity and Volumetric flow rate'''", - "", - "import math", - "", - "#1kg/m^2=10 meters water head", - "", - "#variable declaration", - "g=9.81 #acceleration due to gravity", - "h=20.0 #height", - "", - "#calculation", - "v=math.sqrt(2*g*h)", - "d=300.0*10**-3", - "A=(math.pi*d**2)/4", - "A=math.floor(A*1000)", - "A=A/1000.0", - "Q=A*v", - "", - "#result", + "\n", + "\n", + "import math\n", + "\n", + "#1kg/m^2=10 meters water head\n", + "\n", + "#variable declaration\n", + "g=9.81 #acceleration due to gravity\n", + "h=20.0 #height\n", + "\n", + "#calculation\n", + "v=math.sqrt(2*g*h)\n", + "d=300.0*10**-3\n", + "A=(math.pi*d**2)/4\n", + "A=math.floor(A*1000)\n", + "A=A/1000.0\n", + "Q=A*v\n", + "\n", + "#result\n", "print('Q = %.3f m^3/sec'%Q)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "Q = 1.387 m^3/sec" ] } - ], + ], "prompt_number": 7 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.8, Page Number:313<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Fluid velocity calculation'''", - "", - "import math", - "", - "#variable declaration", - "Cd=0.6 # coefficient of discharge ", - "g=9.8 #acceleration due to gravity", - "h=400*10**-3 #height", - "", - "#calculation", - "V=Cd*math.sqrt(2*g*h)", - "", - "#result", + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "Cd=0.6 # coefficient of discharge \n", + "g=9.8 #acceleration due to gravity\n", + "h=400*10**-3 #height\n", + "\n", + "#calculation\n", + "V=Cd*math.sqrt(2*g*h)\n", + "\n", + "#result\n", "print('V = %.2f m/sec' %V)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "V = 1.68 m/sec" ] } - ], + ], "prompt_number": 8 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.9, Page Number: 314<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''velocity measurement using pilot tube'''", - "", - "import math", - "", - "#variable declaration", - "Cd=0.98 # coefficient of discharge", - "g=9.8 #acceleration due to gravity", - "h=900.0*10**-3 #height", - "", - "#calculation", - "V=Cd*math.sqrt(2*g*h)", - "V=math.floor(V*100)", - "V=(V/100.0)", - "", - "#result", + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "Cd=0.98 # coefficient of discharge\n", + "g=9.8 #acceleration due to gravity\n", + "h=900.0*10**-3 #height\n", + "\n", + "#calculation\n", + "V=Cd*math.sqrt(2*g*h)\n", + "V=math.floor(V*100)\n", + "V=(V/100.0)\n", + "\n", + "#result\n", "print('V = %.2f m/sec' %V)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "V = 4.11 m/sec" ] } - ], + ], "prompt_number": 9 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.10, Page Number:314<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Determination of flow velocity'''", - "", - "import math", - "", - "#Variable declaration", - "del_p=20*10**3 #Pa", - "dens_water=1000 #kg/m^3", - "dens_air=1.29 #kg/m^3", - "", - "#calculations", - "", - "#(i)When flowing fluid is water", - "v=math.sqrt(2*del_p/dens_water)", - "", - "#(ii)When flowing fluid is air", - "v1=math.sqrt(2*del_p/dens_air)", - "", - "#result", - "print('\\n(i)When flowing fluid is water\\n\\tV=%.3f m/sec'%v)", + "\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "del_p=20*10**3 #Pa\n", + "dens_water=1000 #kg/m^3\n", + "dens_air=1.29 #kg/m^3\n", + "\n", + "#calculations\n", + "\n", + "#(i)When flowing fluid is water\n", + "v=math.sqrt(2*del_p/dens_water)\n", + "\n", + "#(ii)When flowing fluid is air\n", + "v1=math.sqrt(2*del_p/dens_air)\n", + "\n", + "#result\n", + "print('\\n(i)When flowing fluid is water\\n\\tV=%.3f m/sec'%v)\n", "print('\\n(ii)When flowing fluid is air\\n\\tV=%.0f m/sec'%v1)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "", - "(i)When flowing fluid is water", - "\tV=6.325 m/sec", - "", - "(ii)When flowing fluid is air", + "\n", + "(i)When flowing fluid is water\n", + "\tV=6.325 m/sec\n", + "\n", + "(ii)When flowing fluid is air\n", "\tV=176 m/sec" ] } - ], + ], "prompt_number": 10 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.11, Page Number: 314<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''detemination of flow velocity'''", - "", - "import math", - "", - "# variable declaration", - "dens=1026.0 # density of see water", - "p=25.0*10**3 # pressure difference in manometer ", - "", - "#calculation", - "V=math.sqrt(2*p/dens)", - "", - "#result", + "\n", + "\n", + "import math\n", + "\n", + "# variable declaration\n", + "dens=1026.0 # density of see water\n", + "p=25.0*10**3 # pressure difference in manometer \n", + "\n", + "#calculation\n", + "V=math.sqrt(2*p/dens)\n", + "\n", + "#result\n", "print('V=%.2f m/sec =%.3f km/hr'%(V,V*18/5))" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "V=6.98 m/sec =25.131 km/hr" ] } - ], + ], "prompt_number": 11 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.12, Page Number: 314<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''calculation of flying speed of aircraft'''", - "import math", - "", - "# variable declaration", - "dens=1.29 # air density at height ", - "", - "#calculation", - "p=12.5*1000", - "V=math.sqrt(2*p/dens)", - "", - "", - "#result", + "\n", + "import math\n", + "\n", + "# variable declaration\n", + "dens=1.29 # air density at height \n", + "\n", + "#calculation\n", + "p=12.5*1000\n", + "V=math.sqrt(2*p/dens)\n", + "\n", + "\n", + "#result\n", "print('V=%.2f m/sec =%.2f km/hr'%(V,V*18/5))" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "V=139.21 m/sec =501.16 km/hr" ] } - ], + ], "prompt_number": 12 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.13, Page Number: 315<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Maximum fluid handling capacity of Rotameter'''", - "", - "import math", - "", - "#variable declaration", - "Cd=0.6 # discharge coefficient", - "Dp=0.05 # inside diameter of metering tube ", - "Df=0.035 # diameter of rotameter ", - "g=9.8 # acceleration due to gravity", - "rho_f=3.9*10**3 # density of cylindrical float", - "rho=1000.0 # water density ", - "Vf=3.36*10**-5 # volume of the float", - "", - "#calculation", - "Q=Cd*((Dp**2-Df**2)/Df)*math.sqrt(math.pi*g*Vf*(rho_f-rho)/(2*rho))", - "Q=Q*10000.0", - "", - "#result", - "print('Volumetric flow Q=%.4f *10^-4 m^3/sec' %Q)", - "#Answer slightly deviates from answer given in the book because of pi value.", + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "Cd=0.6 # discharge coefficient\n", + "Dp=0.05 # inside diameter of metering tube \n", + "Df=0.035 # diameter of rotameter \n", + "g=9.8 # acceleration due to gravity\n", + "rho_f=3.9*10**3 # density of cylindrical float\n", + "rho=1000.0 # water density \n", + "Vf=3.36*10**-5 # volume of the float\n", + "\n", + "#calculation\n", + "Q=Cd*((Dp**2-Df**2)/Df)*math.sqrt(math.pi*g*Vf*(rho_f-rho)/(2*rho))\n", + "Q=Q*10000.0\n", + "\n", + "#result\n", + "print('Volumetric flow Q=%.4f *10^-4 m^3/sec' %Q)\n", + "#Answer slightly deviates from answer given in the book because of pi value.\n", "#if pi=3.14, then answer is same as in textbook " - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "Volumetric flow Q=8.4652 *10^-4 m^3/sec" ] } - ], + ], "prompt_number": 13 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.14, Page number: 315<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Determination of range of flow for ratameter'''", - "", - "import math", - "# variable declaration", - "Cd=1 # discharge coefficient", - "Dp=0.018 # inside diameter of metering tube ", - "Df=0.015 # diameter of rotameter ", - "g=9.81 # acceleration due to gravity", - "rho_f=2.7 # density of cylindrical float", - "rho=0.8 # water density ", - "Vf=520.0*10**-9 # volume of the float", - "", - "#case 1", - "", - "#caculation", - "Qmin=Cd*((Dp**2-Df**2)/Df)*math.sqrt(math.pi*g*Vf*(rho_f-rho)/(2*rho))", - "Qmin=Qmin*100000.0", - "", - "#result", - "print('Case 1: When float is at the bottom\\n Volumetric flow Qmin=%.3f *10^-5 m^3/sec'%Qmin)", - "", - "#case 2", - "", - "#calculation", - "Dp2=0.0617", - "Qmax=Cd*((Dp2**2-Df**2)/Df)*math.sqrt(math.pi*g*Vf*(rho_f-rho)/(2*rho))", - "Qmax=Qmax*100000", - "", - "#result", + "\n", + "\n", + "import math\n", + "# variable declaration\n", + "Cd=1 # discharge coefficient\n", + "Dp=0.018 # inside diameter of metering tube \n", + "Df=0.015 # diameter of rotameter \n", + "g=9.81 # acceleration due to gravity\n", + "rho_f=2.7 # density of cylindrical float\n", + "rho=0.8 # water density \n", + "Vf=520.0*10**-9 # volume of the float\n", + "\n", + "#case 1\n", + "\n", + "#caculation\n", + "Qmin=Cd*((Dp**2-Df**2)/Df)*math.sqrt(math.pi*g*Vf*(rho_f-rho)/(2*rho))\n", + "Qmin=Qmin*100000.0\n", + "\n", + "#result\n", + "print('Case 1: When float is at the bottom\\n Volumetric flow Qmin=%.3f *10^-5 m^3/sec'%Qmin)\n", + "\n", + "#case 2\n", + "\n", + "#calculation\n", + "Dp2=0.0617\n", + "Qmax=Cd*((Dp2**2-Df**2)/Df)*math.sqrt(math.pi*g*Vf*(rho_f-rho)/(2*rho))\n", + "Qmax=Qmax*100000\n", + "\n", + "#result\n", "print('\\n\\nCase 2: When float is at the bottom\\n Volumetric flow Qmax=%.2f *10^-5 m^3/sec'%Qmax)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "Case 1: When float is at the bottom", - " Volumetric flow Qmin=2.879 *10^-5 m^3/sec", - "", - "", - "Case 2: When float is at the bottom", + "Case 1: When float is at the bottom\n", + " Volumetric flow Qmin=2.879 *10^-5 m^3/sec\n", + "\n", + "\n", + "Case 2: When float is at the bottom\n", " Volumetric flow Qmax=104.17 *10^-5 m^3/sec" ] } - ], + ], "prompt_number": 14 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.15, Page Number:316<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''calculation of coal delivery for coal conveyor system'''", - "", - "# variable declaration", - "W=165.0 # weight of material on section of length", - "R=328.0 # Conveyor speed m/min", - "L=16.0 # Length of weighting platform in m", - "", - "#calculation", - "Q=W*R/L", - "", - "#result", + "\n", + "\n", + "# variable declaration\n", + "W=165.0 # weight of material on section of length\n", + "R=328.0 # Conveyor speed m/min\n", + "L=16.0 # Length of weighting platform in m\n", + "\n", + "#calculation\n", + "Q=W*R/L\n", + "\n", + "#result\n", "print('Flow Rate Q=%.2f kg/min =%.1f kg/hour'%(Q,Q/60))" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "Flow Rate Q=3382.50 kg/min =56.4 kg/hour" ] } - ], + ], "prompt_number": 15 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.16, Page Number:316<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Fluid velocity calculation'''", - "", - "import math", - "", - "#variable declaration", - "f=100.0 # beat frequency", - "d=300.0*10**-3 # Sound path", - "a=45.0 #angle between transmeter and receiver in degrees", - "", - "#calculation", - "a_rad=45.0*math.pi/180.0", - "v=f*d/(2*math.cos(a_rad))", - "", - "#Result", + "\n", + "\n", + "import math\n", + "\n", + "#variable declaration\n", + "f=100.0 # beat frequency\n", + "d=300.0*10**-3 # Sound path\n", + "a=45.0 #angle between transmeter and receiver in degrees\n", + "\n", + "#calculation\n", + "a_rad=45.0*math.pi/180.0\n", + "v=f*d/(2*math.cos(a_rad))\n", + "\n", + "#Result\n", "print('Fluid Velocity V=%.1f m/sec'%v)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "Fluid Velocity V=21.2 m/sec" ] } - ], + ], "prompt_number": 16 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.17, Page Number: 316<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''volume flow rate'''", - "", - "# variable declaration", - "r=150.0 # speed of rotation", - "v=120.0 # volume trapped between gears and casting", - "", - "#clculation", - "Q=4.0*v*r", - "", - "#result", + "\n", + "\n", + "# variable declaration\n", + "r=150.0 # speed of rotation\n", + "v=120.0 # volume trapped between gears and casting\n", + "\n", + "#clculation\n", + "Q=4.0*v*r\n", + "\n", + "#result\n", "print('Volume flow rate Q=%d cm^3/min = %d litres/min'%(Q,Q/1000))" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "Volume flow rate Q=72000 cm^3/min = 72 litres/min" ] } - ], + ], "prompt_number": 17 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.18, Page Number: 317<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''induced emf in electromagnetic flow meter'''", - "", - "import math", - "", - "# variable declaration", - "Q=2500.0 # Quantitty flow rate", - "d=2.75 # inner diameter", - "", - "#calculation", - "a=(math.pi*d**2)/4", - "v=Q/(60*a)", - "B=60.0", - "e=B*d*10**-2*v*10**-2", - "", - "#result", + "\n", + "\n", + "import math\n", + "\n", + "# variable declaration\n", + "Q=2500.0 # Quantitty flow rate\n", + "d=2.75 # inner diameter\n", + "\n", + "#calculation\n", + "a=(math.pi*d**2)/4\n", + "v=Q/(60*a)\n", + "B=60.0\n", + "e=B*d*10**-2*v*10**-2\n", + "\n", + "#result\n", "print('Induced emf e =%.4f V=%.1f mV'%(e,e*1000))" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "Induced emf e =0.1157 V=115.7 mV" ] } - ], + ], "prompt_number": 18 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.19, Pae Number:317<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''velocity of flow in electromagnetic flow meter'''", - "", - "# variable declaration", - "e=0.2*10**-3 # voltage of electromagnetic flow meter", - "B=0.08 # Flux density", - "l=10.0*10**-2 # Diameter of pipe", - "", - "#calculation", - "v=e/(B*l)", - "", - "#result", + "\n", + "\n", + "# variable declaration\n", + "e=0.2*10**-3 # voltage of electromagnetic flow meter\n", + "B=0.08 # Flux density\n", + "l=10.0*10**-2 # Diameter of pipe\n", + "\n", + "#calculation\n", + "v=e/(B*l)\n", + "\n", + "#result\n", "print('V = %.3f m/sec = %.2f cm/sec'%(v,v*100))" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "V = 0.025 m/sec = 2.50 cm/sec" ] } - ], + ], "prompt_number": 19 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 5.20, Page Number: 317<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''average velocity of flow in electromagnetic flow meter'''", - "", - "# variable declaration", - "ei=0.15*10**-3 # peak value", - "em=2*ei # p-p amplifier output ", - "B=0.1 # flux density", - "l=60.0*10**-3 # diameter of the pipe", - "", - "#calculation", - "v=em/(B*l)", - "", - "#result", + "\n", + "\n", + "# variable declaration\n", + "ei=0.15*10**-3 # peak value\n", + "em=2*ei # p-p amplifier output \n", + "B=0.1 # flux density\n", + "l=60.0*10**-3 # diameter of the pipe\n", + "\n", + "#calculation\n", + "v=em/(B*l)\n", + "\n", + "#result\n", "print('Velocity of flow V = %.2f m/sec = %.1f cm/sec'%(v,v*100))" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "Velocity of flow V = 0.05 m/sec = 5.0 cm/sec" ] } - ], + ], "prompt_number": 20 } - ] + ], + "metadata": {} } ] }
\ No newline at end of file |