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_6.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_6.ipynb')
-rw-r--r-- | Industrial_Instrumentation/Chapter_6.ipynb | 786 |
1 files changed, 405 insertions, 381 deletions
diff --git a/Industrial_Instrumentation/Chapter_6.ipynb b/Industrial_Instrumentation/Chapter_6.ipynb index d3a9a093..bdc5920d 100644 --- a/Industrial_Instrumentation/Chapter_6.ipynb +++ b/Industrial_Instrumentation/Chapter_6.ipynb @@ -1,534 +1,558 @@ { "metadata": { - "name": "Chapter_6" - }, - "nbformat": 2, + "name": "", + "signature": "sha256:6148d2be2796832e7d2e9cefcc5c361a4c9dc07b22c355b627a74bd914199046" + }, + "nbformat": 3, + "nbformat_minor": 0, "worksheets": [ { "cells": [ { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h1>Chapter 6: Level<h1>" ] - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 6.1,Page Number:370<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''output current of two wire pressure transmitter'''", - "", - "#(a)", - "", - "# variable declaration", - "p=1.5 # pressure applied", - "a=4.0 # mA corresponds to 0 kg/cm^2", - "b=20.0 # mA corresponds to 2 kg/cm^2", - "", - "#calculation", - "wh=(((b-a)/2)*p)+a", - "", - "#result", - "print('(a)just at the bottom level of the tank')", - "print('Water head applied to the transmitter =%d mA'%wh)", - "", - "#(b)", - "", - "#calculation", - "wh2=(((b-a)/2)*p)+2*a", - "", - "#result", - "print('\\n\\n(b)5m below the bottom of the tank')", - "print('Water head applied to the transmitter =%d mA' %wh2)", - "", - "#(c)", - "", - "#calculation", - "wh3=(((b-a)/2)*p)", - "", - "#result", - "print('\\n\\n(c)5m above the bottom of the tank')", + "\n", + "\n", + "#(a)\n", + "\n", + "# variable declaration\n", + "p=1.5 # pressure applied\n", + "a=4.0 # mA corresponds to 0 kg/cm^2\n", + "b=20.0 # mA corresponds to 2 kg/cm^2\n", + "\n", + "#calculation\n", + "wh=(((b-a)/2)*p)+a\n", + "\n", + "#result\n", + "print('(a)just at the bottom level of the tank')\n", + "print('Water head applied to the transmitter =%d mA'%wh)\n", + "\n", + "#(b)\n", + "\n", + "#calculation\n", + "wh2=(((b-a)/2)*p)+2*a\n", + "\n", + "#result\n", + "print('\\n\\n(b)5m below the bottom of the tank')\n", + "print('Water head applied to the transmitter =%d mA' %wh2)\n", + "\n", + "#(c)\n", + "\n", + "#calculation\n", + "wh3=(((b-a)/2)*p)\n", + "\n", + "#result\n", + "print('\\n\\n(c)5m above the bottom of the tank')\n", "print('Water head applied to the transmitter =%d mA'%wh3)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(a)just at the bottom level of the tank", - "Water head applied to the transmitter =16 mA", - "", - "", - "(b)5m below the bottom of the tank", - "Water head applied to the transmitter =20 mA", - "", - "", - "(c)5m above the bottom of the tank", + "(a)just at the bottom level of the tank\n", + "Water head applied to the transmitter =16 mA\n", + "\n", + "\n", + "(b)5m below the bottom of the tank\n", + "Water head applied to the transmitter =20 mA\n", + "\n", + "\n", + "(c)5m above the bottom of the tank\n", "Water head applied to the transmitter =12 mA" ] } - ], + ], "prompt_number": 1 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 6.2, Page Number:371<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''water level and current at different positions'''", - "", - "#(a)", - "", - "#variable declaration", - "b=20.0 # Maximum output", - "a=4.0 # minimum output ", - "op=16.0 # output in mA", - "", - "#calculation", - "p=(op-a)*2/(b-a)", - "p_h=p*10.0", - "h=p_h-2-5", - "", - "#result", - "print('(a)\\nh = %dm'%h)", - "", - "#(b)", - "", - "#variable declaration", - "p1=1 # pressure applied", - "", - "#calculation", - "t_op=((b-a)/2)*p1+4", - "", - "#result", - "print('\\n(b)\\nTransmitter output =%d mA'%t_op)", - "", - "#(c)", - "", - "#variable declaration", - "p2=0.5 # applied pressure", - "", - "#calculation", - "t_op1=((b-a)/2)*p2+4", - "", - "#result", + "\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "b=20.0 # Maximum output\n", + "a=4.0 # minimum output \n", + "op=16.0 # output in mA\n", + "\n", + "#calculation\n", + "p=(op-a)*2/(b-a)\n", + "p_h=p*10.0\n", + "h=p_h-2-5\n", + "\n", + "#result\n", + "print('(a)\\nh = %dm'%h)\n", + "\n", + "#(b)\n", + "\n", + "#variable declaration\n", + "p1=1 # pressure applied\n", + "\n", + "#calculation\n", + "t_op=((b-a)/2)*p1+4\n", + "\n", + "#result\n", + "print('\\n(b)\\nTransmitter output =%d mA'%t_op)\n", + "\n", + "#(c)\n", + "\n", + "#variable declaration\n", + "p2=0.5 # applied pressure\n", + "\n", + "#calculation\n", + "t_op1=((b-a)/2)*p2+4\n", + "\n", + "#result\n", "print('\\n(c)\\nTransmitter output =%d mA'%t_op1)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(a)", - "h = 8m", - "", - "(b)", - "Transmitter output =12 mA", - "", - "(c)", + "(a)\n", + "h = 8m\n", + "\n", + "(b)\n", + "Transmitter output =12 mA\n", + "\n", + "(c)\n", "Transmitter output =8 mA" ] } - ], + ], "prompt_number": 2 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 6.3, Page Number: 372<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Differential pressure output at different levels'''", - "", - "#(a)", - "", - "#variable declaration", - "b=20.0 # Maximum output", - "a=4.0 # minimum output", - "op=16.0 # actual output ", - "wt_l1=25.0 # water level (i)", - "", - "#calculation", - "t_op=((b-a)/100)*(100-75)+4", - "", - "#result", - "print('(a)\\nWater level=+25cm\\nTransmitter output = %d mA' %t_op)", - "", - "#(b)", - "", - "#calculation", - "wt_l2=-25.0 # water level (ii)", - "t_op2=((b-a)/100)*(100-25)+4", - "", - "#result", - "print('\\n(b)\\nWater level=-25cm\\nTransmitter output = %d mA' %t_op2)", - "", - "#(c)", - "", - "#Variable declaration", - "t_op3=12.0 # Transmitter output ", - "", - "#calculation", - "H=(100.0/(b-a))*(12-4) ", - "", - "#result", + "\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "b=20.0 # Maximum output\n", + "a=4.0 # minimum output\n", + "op=16.0 # actual output \n", + "wt_l1=25.0 # water level (i)\n", + "\n", + "#calculation\n", + "t_op=((b-a)/100)*(100-75)+4\n", + "\n", + "#result\n", + "print('(a)\\nWater level=+25cm\\nTransmitter output = %d mA' %t_op)\n", + "\n", + "#(b)\n", + "\n", + "#calculation\n", + "wt_l2=-25.0 # water level (ii)\n", + "t_op2=((b-a)/100)*(100-25)+4\n", + "\n", + "#result\n", + "print('\\n(b)\\nWater level=-25cm\\nTransmitter output = %d mA' %t_op2)\n", + "\n", + "#(c)\n", + "\n", + "#Variable declaration\n", + "t_op3=12.0 # Transmitter output \n", + "\n", + "#calculation\n", + "H=(100.0/(b-a))*(12-4) \n", + "\n", + "#result\n", "print('\\n(c)\\nHead Applied = %d cm\\nLevel corresponding to 50 cm head =0 cm' %H)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(a)", - "Water level=+25cm", - "Transmitter output = 8 mA", - "", - "(b)", - "Water level=-25cm", - "Transmitter output = 16 mA", - "", - "(c)", - "Head Applied = 50 cm", + "(a)\n", + "Water level=+25cm\n", + "Transmitter output = 8 mA\n", + "\n", + "(b)\n", + "Water level=-25cm\n", + "Transmitter output = 16 mA\n", + "\n", + "(c)\n", + "Head Applied = 50 cm\n", "Level corresponding to 50 cm head =0 cm" ] } - ], + ], "prompt_number": 3 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 6.4, Page Number: 373<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Displacer with spring balance'''", - "", - "#(a)", - "", - "#variable declaration", - "a=5.0*10**-4 #area", - "l=8.0 #length", - "dens=6.0*1000.0 #density", - "", - "#calculation", - "w=a*l*dens", - "", - "#result", - "print('(a)\\nWeight of the displacer if weighed in air = %d kg'%w)", - "", - "", - "#(i)", - "", - "#variable declaration", - "sbr1=23.0 # spring balance reading", - "", - "#calculation", - "wloss1=w-sbr1", - "L1=wloss1/(1000.0*a)", - "", - "#result", - "print('\\n(i)\\tL1=%dm'%L1)", - "", - "", - "#(ii)", - "", - "#variable declaration", - "sbr2=22.0 # spring balance reading", - "", - "#calculation", - "wloss2=w-sbr2", - "L2=wloss2/(1000.0*a)", - "", - "#result", - "print('\\n(ii)\\tL2=%dm'%L2)", - "", - "#(iii)", - "", - "#variable declaration", - "sbr3=21.0 # spring balance reading", - "", - "#calculation", - "wloss3=w-sbr3", - "L3=wloss3/(1000.0*a)", - "", - "#result", - "print('\\n(iii)\\tL3=%dm'%L3)", - "", - "#(b)", - "", - "#variable declaration", - "level=8.0 # level wen tank is full ", - "", - "#calculation", - "wt=a*level*1000.0", - "spring=w-wt", - "", - "#result", + "\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "a=5.0*10**-4 #area\n", + "l=8.0 #length\n", + "dens=6.0*1000.0 #density\n", + "\n", + "#calculation\n", + "w=a*l*dens\n", + "\n", + "#result\n", + "print('(a)\\nWeight of the displacer if weighed in air = %d kg'%w)\n", + "\n", + "\n", + "#(i)\n", + "\n", + "#variable declaration\n", + "sbr1=23.0 # spring balance reading\n", + "\n", + "#calculation\n", + "wloss1=w-sbr1\n", + "L1=wloss1/(1000.0*a)\n", + "\n", + "#result\n", + "print('\\n(i)\\tL1=%dm'%L1)\n", + "\n", + "\n", + "#(ii)\n", + "\n", + "#variable declaration\n", + "sbr2=22.0 # spring balance reading\n", + "\n", + "#calculation\n", + "wloss2=w-sbr2\n", + "L2=wloss2/(1000.0*a)\n", + "\n", + "#result\n", + "print('\\n(ii)\\tL2=%dm'%L2)\n", + "\n", + "#(iii)\n", + "\n", + "#variable declaration\n", + "sbr3=21.0 # spring balance reading\n", + "\n", + "#calculation\n", + "wloss3=w-sbr3\n", + "L3=wloss3/(1000.0*a)\n", + "\n", + "#result\n", + "print('\\n(iii)\\tL3=%dm'%L3)\n", + "\n", + "#(b)\n", + "\n", + "#variable declaration\n", + "level=8.0 # level wen tank is full \n", + "\n", + "#calculation\n", + "wt=a*level*1000.0\n", + "spring=w-wt\n", + "\n", + "#result\n", "print('\\n(b):when the tank is full\\nSpring Balance reading = %d kg'%spring)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(a)", - "Weight of the displacer if weighed in air = 24 kg", - "", - "(i)\tL1=2m", - "", - "(ii)\tL2=4m", - "", - "(iii)\tL3=6m", - "", - "(b):when the tank is full", + "(a)\n", + "Weight of the displacer if weighed in air = 24 kg\n", + "\n", + "(i)\tL1=2m\n", + "\n", + "(ii)\tL2=4m\n", + "\n", + "(iii)\tL3=6m\n", + "\n", + "(b):when the tank is full\n", "Spring Balance reading = 20 kg" ] } - ], + ], "prompt_number": 4 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 6.5, Page Number: 374<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Buoyancy Force calculation'''", - "", - "#variable declaration", - "rho=1000.0 # density of water ", - "v=3.0 # displaced volume of water ", - "", - "#calculation", - "Bw=rho*v", - "", - "#Result", + "\n", + "\n", + "#variable declaration\n", + "rho=1000.0 # density of water \n", + "v=3.0 # displaced volume of water \n", + "\n", + "#calculation\n", + "Bw=rho*v\n", + "\n", + "#Result\n", "print('Buoyance Force(Bw) = %d kg'%Bw)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "Buoyance Force(Bw) = 3000 kg" ] } - ], + ], "prompt_number": 5 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 6.6, Page Number: 374<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Determination of displaced volume from Buoyancy Force'''", - "", - "#variable declaration", - "rho=1000.0 # density of water", - "Bw=5000.0 # Buoyancy Force", - "", - "#calculation", - "v=Bw/rho", - "", - "#result", + "\n", + "\n", + "#variable declaration\n", + "rho=1000.0 # density of water\n", + "Bw=5000.0 # Buoyancy Force\n", + "\n", + "#calculation\n", + "v=Bw/rho\n", + "\n", + "#result\n", "print('V = %d m^3' %v)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "V = 5 m^3" ] } - ], + ], "prompt_number": 6 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 6.7, Page Number: 374<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Determination of hydrostatic pressure in open tank'''", - "", - "#variable declaration", - "rho=1000.0 # density of water", - "h=10.0 # height of liquid", - "", - "#calculation", - "P=rho*h", - "", - "#result", + "\n", + "\n", + "#variable declaration\n", + "rho=1000.0 # density of water\n", + "h=10.0 # height of liquid\n", + "\n", + "#calculation\n", + "P=rho*h\n", + "\n", + "#result\n", "print('P = %d kg/m^2 = %d kg/cm^2 '%(P,P/10000))" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "P = 10000 kg/m^2 = 1 kg/cm^2 " ] } - ], + ], "prompt_number": 7 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 6.8, Page Number: 374<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Determination of hydrostatic pressure in closed tank'''", - "", - "#variable declaration", - "rho=1000.0 # density of water", - "h=15.0 # height of liquid ", - "ex_p=1.0 # External pressure on liquid", - "", - "#calculation", - "P=(rho*h/10000.0)+ex_p", - "", - "#result", + "\n", + "\n", + "#variable declaration\n", + "rho=1000.0 # density of water\n", + "h=15.0 # height of liquid \n", + "ex_p=1.0 # External pressure on liquid\n", + "\n", + "#calculation\n", + "P=(rho*h/10000.0)+ex_p\n", + "\n", + "#result\n", "print('P = %.1f kg/cm^2' %P)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "P = 2.5 kg/cm^2" ] } - ], + ], "prompt_number": 8 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 6.9, Page Number:374<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Determination of height from hydrostatic pressure'''", - "", - "#variable declaration", - "rho=1000.0 # density of water", - "ex_p=0.5*10**4 # External pressure on liquid ", - "P=1.6*10**4 #(rho*h/10000)+ex_p", - "", - "#calculation", - "h=(P-ex_p)/1000.0", - "", - "#result", + "\n", + "\n", + "#variable declaration\n", + "rho=1000.0 # density of water\n", + "ex_p=0.5*10**4 # External pressure on liquid \n", + "P=1.6*10**4 #(rho*h/10000)+ex_p\n", + "\n", + "#calculation\n", + "h=(P-ex_p)/1000.0\n", + "\n", + "#result\n", "print('h = %d m' %h)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "h = 11 m" ] } - ], + ], "prompt_number": 9 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 6.10, Page Number:375<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''calculation of level on the probe'''", - "", - "#variable declaration", - "c2=100.0*10**-6 # capacitance in capacitance probe", - "r1=10.0*10**3 # value of resistor in bride", - "r2=100.0*10**3 # value of resistor in bride", - "r3=50.0*10**3 # value of resistor in bride", - "", - "#calculation", - "Cx=r1*c2/r3", - "Cx=Cx*10**6", - "", - "#result", - "print('Cx = %d microFarad'%Cx)", - "c=5.0", - "", - "#calculation", - "l=Cx/c", - "", - "#result", + "\n", + "\n", + "#variable declaration\n", + "c2=100.0*10**-6 # capacitance in capacitance probe\n", + "r1=10.0*10**3 # value of resistor in bride\n", + "r2=100.0*10**3 # value of resistor in bride\n", + "r3=50.0*10**3 # value of resistor in bride\n", + "\n", + "#calculation\n", + "Cx=r1*c2/r3\n", + "Cx=Cx*10**6\n", + "\n", + "#result\n", + "print('Cx = %d microFarad'%Cx)\n", + "c=5.0\n", + "\n", + "#calculation\n", + "l=Cx/c\n", + "\n", + "#result\n", "print('\\nLevel on the probe = %dm'%l)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "Cx = 20 microFarad", - "", + "Cx = 20 microFarad\n", + "\n", "Level on the probe = 4m" ] } - ], + ], "prompt_number": 10 } - ] + ], + "metadata": {} } ] }
\ No newline at end of file |