{
 "metadata": {
  "name": "",
  "signature": "sha256:981874370471c716824dfdef461e37258f322dfc13d6037062140fc3ad5e0ae2"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h1>Chapter 5: Flow <h1>"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5.1, Page Number: 310<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(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",
     "metadata": {},
     "source": [
      "<h3>Example 5.2, page Number:310<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Volumetric flow rate Q= 4.2649 m^3/hr"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5.3, Page Number: 310<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "V2=10.0 m/sec"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5.4, Page Number: 311<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "P1-P2 = 1.28 kg/cm^2"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5.5, Page Number: 312<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(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",
     "metadata": {},
     "source": [
      "<h3>Example 5.6, Page Number: 312<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(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",
     "metadata": {},
     "source": [
      "<h3>Example 5.7, Page Number: 313<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "import math\n",
      "\n",
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Q = 1.387 m^3/sec"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5.8, Page Number:313<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "V = 1.68 m/sec"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5.9, Page Number: 314<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "V = 4.11 m/sec"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5.10, Page Number:314<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\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",
     "metadata": {},
     "source": [
      "<h3>Example 5.11, Page Number: 314<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "V=6.98 m/sec =25.131 km/hr"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5.12, Page Number: 314<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "V=139.21 m/sec =501.16 km/hr"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5.13, Page Number: 315<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Volumetric flow Q=8.4652 *10^-4 m^3/sec"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5.14, Page number: 315<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "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",
     "metadata": {},
     "source": [
      "<h3>Example 5.15, Page Number:316<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Flow Rate Q=3382.50 kg/min =56.4 kg/hour"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5.16, Page Number:316<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Fluid Velocity V=21.2 m/sec"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5.17, Page Number: 316<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Volume flow rate Q=72000 cm^3/min = 72 litres/min"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5.18, Page Number: 317<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Induced emf e =0.1157 V=115.7 mV"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5.19, Pae Number:317<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "V = 0.025 m/sec = 2.50 cm/sec"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "<h3>Example 5.20, Page Number: 317<h3>"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\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",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Velocity of flow V = 0.05 m/sec = 5.0 cm/sec"
       ]
      }
     ],
     "prompt_number": 20
    }
   ],
   "metadata": {}
  }
 ]
}