diff options
author | Jovina Dsouza | 2014-06-18 12:43:07 +0530 |
---|---|---|
committer | Jovina Dsouza | 2014-06-18 12:43:07 +0530 |
commit | 206d0358703aa05d5d7315900fe1d054c2817ddc (patch) | |
tree | f2403e29f3aded0caf7a2434ea50dd507f6545e2 /Industrial_Instrumentation/Chapter_6.ipynb | |
parent | c6f0d6aeb95beaf41e4b679e78bb42c4ffe45a40 (diff) | |
download | Python-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.tar.gz Python-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.tar.bz2 Python-Textbook-Companions-206d0358703aa05d5d7315900fe1d054c2817ddc.zip |
adding book
Diffstat (limited to 'Industrial_Instrumentation/Chapter_6.ipynb')
-rw-r--r-- | Industrial_Instrumentation/Chapter_6.ipynb | 534 |
1 files changed, 534 insertions, 0 deletions
diff --git a/Industrial_Instrumentation/Chapter_6.ipynb b/Industrial_Instrumentation/Chapter_6.ipynb new file mode 100644 index 00000000..d3a9a093 --- /dev/null +++ b/Industrial_Instrumentation/Chapter_6.ipynb @@ -0,0 +1,534 @@ +{ + "metadata": { + "name": "Chapter_6" + }, + "nbformat": 2, + "worksheets": [ + { + "cells": [ + { + "cell_type": "markdown", + "source": [ + "<h1>Chapter 6: Level<h1>" + ] + }, + { + "cell_type": "markdown", + "source": [ + "<h3>Example 6.1,Page Number:370<h3>" + ] + }, + { + "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')", + "print('Water head applied to the transmitter =%d mA'%wh3)" + ], + "language": "python", + "outputs": [ + { + "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", + "Water head applied to the transmitter =12 mA" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "markdown", + "source": [ + "<h3>Example 6.2, Page Number:371<h3>" + ] + }, + { + "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", + "print('\\n(c)\\nTransmitter output =%d mA'%t_op1)" + ], + "language": "python", + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)", + "h = 8m", + "", + "(b)", + "Transmitter output =12 mA", + "", + "(c)", + "Transmitter output =8 mA" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "markdown", + "source": [ + "<h3>Example 6.3, Page Number: 372<h3>" + ] + }, + { + "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", + "print('\\n(c)\\nHead Applied = %d cm\\nLevel corresponding to 50 cm head =0 cm' %H)" + ], + "language": "python", + "outputs": [ + { + "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", + "Level corresponding to 50 cm head =0 cm" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "markdown", + "source": [ + "<h3>Example 6.4, Page Number: 373<h3>" + ] + }, + { + "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", + "print('\\n(b):when the tank is full\\nSpring Balance reading = %d kg'%spring)" + ], + "language": "python", + "outputs": [ + { + "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", + "Spring Balance reading = 20 kg" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "markdown", + "source": [ + "<h3>Example 6.5, Page Number: 374<h3>" + ] + }, + { + "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", + "print('Buoyance Force(Bw) = %d kg'%Bw)" + ], + "language": "python", + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Buoyance Force(Bw) = 3000 kg" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "markdown", + "source": [ + "<h3>Example 6.6, Page Number: 374<h3>" + ] + }, + { + "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", + "print('V = %d m^3' %v)" + ], + "language": "python", + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V = 5 m^3" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "markdown", + "source": [ + "<h3>Example 6.7, Page Number: 374<h3>" + ] + }, + { + "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", + "print('P = %d kg/m^2 = %d kg/cm^2 '%(P,P/10000))" + ], + "language": "python", + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P = 10000 kg/m^2 = 1 kg/cm^2 " + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "markdown", + "source": [ + "<h3>Example 6.8, Page Number: 374<h3>" + ] + }, + { + "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", + "print('P = %.1f kg/cm^2' %P)" + ], + "language": "python", + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P = 2.5 kg/cm^2" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "markdown", + "source": [ + "<h3>Example 6.9, Page Number:374<h3>" + ] + }, + { + "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", + "print('h = %d m' %h)" + ], + "language": "python", + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "h = 11 m" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "markdown", + "source": [ + "<h3>Example 6.10, Page Number:375<h3>" + ] + }, + { + "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", + "print('\\nLevel on the probe = %dm'%l)" + ], + "language": "python", + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cx = 20 microFarad", + "", + "Level on the probe = 4m" + ] + } + ], + "prompt_number": 10 + } + ] + } + ] +}
\ No newline at end of file |