diff options
Diffstat (limited to 'Industrial_Instrumentation/Chapter_4.ipynb')
-rw-r--r-- | Industrial_Instrumentation/Chapter_4.ipynb | 798 |
1 files changed, 411 insertions, 387 deletions
diff --git a/Industrial_Instrumentation/Chapter_4.ipynb b/Industrial_Instrumentation/Chapter_4.ipynb index f58d6ec6..ea3f076f 100644 --- a/Industrial_Instrumentation/Chapter_4.ipynb +++ b/Industrial_Instrumentation/Chapter_4.ipynb @@ -1,554 +1,578 @@ { "metadata": { - "name": "Chapter_4" - }, - "nbformat": 2, + "name": "", + "signature": "sha256:81d0436ef2f36f55ad662ab91b6d5e2e47a4c3c61b8080d3706a64417c68403d" + }, + "nbformat": 3, + "nbformat_minor": 0, "worksheets": [ { "cells": [ { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h1>Chapter 4: Acceleration Vibration and Density<h1>" ] - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 4.1, Page Number:209 <h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "''''mechanical system for a seismic instrument'''", - "", - "import math", - "#(a)", - "", - "#variable Declaration", - "k=50.0 #Spring constant ", - "m=0.005 # mass in kg", - "", - "#calculation", - "wn=math.sqrt(k/m)", - "", - "#result", - "print('(a)\\nNatural frequency(wn)= %d rad/s' %wn)", - "", - "", - "#(b)", - "", - "#calculation", - "Cc=2*(m*k)**(0.5)", - "", - "#result", + "\n", + "import math\n", + "#(a)\n", + "\n", + "#variable Declaration\n", + "k=50.0 #Spring constant \n", + "m=0.005 # mass in kg\n", + "\n", + "#calculation\n", + "wn=math.sqrt(k/m)\n", + "\n", + "#result\n", + "print('(a)\\nNatural frequency(wn)= %d rad/s' %wn)\n", + "\n", + "\n", + "#(b)\n", + "\n", + "#calculation\n", + "Cc=2*(m*k)**(0.5)\n", + "\n", + "#result\n", "print('\\n(b)\\nCc=%d' %Cc)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(a)", - "Natural frequency(wn)= 100 rad/s", - "", - "(b)", + "(a)\n", + "Natural frequency(wn)= 100 rad/s\n", + "\n", + "(b)\n", "Cc=1" ] } - ], + ], "prompt_number": 1 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 4.2, Page Number:209<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Frequency and phase angle of motion'''", - "", - "#(a)", - "import math", - "", - "#variable Declaration", - "Cc=1.0 # damping ratio ", - "C=0.7*Cc # Critical damping ratio ", - "m=0.005 # mass", - "k=50.0 # spring constant", - "", - "#calculation", - "w=math.sqrt((k/m)-(C/(2*m))**2)", - "", - "#result", - "print('(a)\\nw=%.1f rad/s' %w)", - "", - "#(b)", - "", - "#variable Declaration", - "w1=250.0 # angular velocity", - "", - "#calculation", - "theta=C*w1/(k-m*w1**2)", - "print('\\ntheta=%f' %theta)", - "fi=math.atan(-theta)", - "fi=fi*180.0/math.pi", - "", - "#result", + "\n", + "\n", + "#(a)\n", + "import math\n", + "\n", + "#variable Declaration\n", + "Cc=1.0 # damping ratio \n", + "C=0.7*Cc # Critical damping ratio \n", + "m=0.005 # mass\n", + "k=50.0 # spring constant\n", + "\n", + "#calculation\n", + "w=math.sqrt((k/m)-(C/(2*m))**2)\n", + "\n", + "#result\n", + "print('(a)\\nw=%.1f rad/s' %w)\n", + "\n", + "#(b)\n", + "\n", + "#variable Declaration\n", + "w1=250.0 # angular velocity\n", + "\n", + "#calculation\n", + "theta=C*w1/(k-m*w1**2)\n", + "print('\\ntheta=%f' %theta)\n", + "fi=math.atan(-theta)\n", + "fi=fi*180.0/math.pi\n", + "\n", + "#result\n", "print('\\nfi = %d\u00b0'%fi)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(a)", - "w=71.4 rad/s", - "", - "theta=-0.666667", - "", + "(a)\n", + "w=71.4 rad/s\n", + "\n", + "theta=-0.666667\n", + "\n", "fi = 33\u00b0" ] } - ], + ], "prompt_number": 2 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 4.3, PAge Number: 210<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''time calculation for exponetial transient term'''", - "import math", - "", - "#variable Declaration", - "m=0.005 # mass ", - "c=0.7 # damping ratio", - "", - "#calculation", - "y=-math.log(0.01)", - "t=y*2*m/c", - "", - "#result", + "\n", + "import math\n", + "\n", + "#variable Declaration\n", + "m=0.005 # mass \n", + "c=0.7 # damping ratio\n", + "\n", + "#calculation\n", + "y=-math.log(0.01)\n", + "t=y*2*m/c\n", + "\n", + "#result\n", "print('t=%.4f Secs' %t)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "t=0.0658 Secs" ] } - ], + ], "prompt_number": 3 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 4.4, Page Number:210<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Acceleration measurement'''", - "", - "#variable Declaration", - "rg1=1200.0 #resistance in Ohm", - "rg2=1200.0 #resistance in Ohm", - "rg3=1200.0 #resistance in Ohm", - "rg4=1200.0 #resistance in Ohm", - "", - "#calculation", - "D1=rg1*5.0/100.0", - "D2=rg2*5.0/100.0", - "D3=rg3*5.0/100.0", - "D4=rg4*5.0/100.0", - "E=12.0", - "v=E*(((rg1+D1)/(rg1+D1+rg2-D2))-((rg4-D4)/(rg3+D3+rg4-D4)))", - "v=v*1000.0", - "", - "#result", + "\n", + "\n", + "#variable Declaration\n", + "rg1=1200.0 #resistance in Ohm\n", + "rg2=1200.0 #resistance in Ohm\n", + "rg3=1200.0 #resistance in Ohm\n", + "rg4=1200.0 #resistance in Ohm\n", + "\n", + "#calculation\n", + "D1=rg1*5.0/100.0\n", + "D2=rg2*5.0/100.0\n", + "D3=rg3*5.0/100.0\n", + "D4=rg4*5.0/100.0\n", + "E=12.0\n", + "v=E*(((rg1+D1)/(rg1+D1+rg2-D2))-((rg4-D4)/(rg3+D3+rg4-D4)))\n", + "v=v*1000.0\n", + "\n", + "#result\n", "print('V0=%d mV' %v)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "V0=600 mV" ] } - ], + ], "prompt_number": 4 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 4.5, Page Number:211<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''output voltage of quartz piezoelectric crystal'''", - "", - "#variable declaration", - "g=0.06 # voltage sensitivity", - "", - "#calculation", - "t=2.5*10**-3", - "p=20*9.8*10**4", - "E=g*t*p", - "", - "#Result", + "\n", + "\n", + "#variable declaration\n", + "g=0.06 # voltage sensitivity\n", + "\n", + "#calculation\n", + "t=2.5*10**-3\n", + "p=20*9.8*10**4\n", + "E=g*t*p\n", + "\n", + "#Result\n", "print('E=%d V' %E)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "E=294 V" ] } - ], + ], "prompt_number": 5 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 4.6, Page Number: 211<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Differential values of capacitor'''", - "", - "#resistance in Ohm", - "c0=25.0 # capacitance in pF", - "x0=0.5 # distance between plates", - "x1=0.05 # steady state displacement ", - "", - "#calculations", - "c1=c0*x0/(x0-x1)", - "c2=c0*x0/(x0+x1)", - "", - "#result", + "\n", + "\n", + "#resistance in Ohm\n", + "c0=25.0 # capacitance in pF\n", + "x0=0.5 # distance between plates\n", + "x1=0.05 # steady state displacement \n", + "\n", + "#calculations\n", + "c1=c0*x0/(x0-x1)\n", + "c2=c0*x0/(x0+x1)\n", + "\n", + "#result\n", "print('C1=%.2f pF\\nC2=%.2f pF'%(c1,c2))" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "C1=27.78 pF", + "C1=27.78 pF\n", "C2=22.73 pF" ] } - ], + ], "prompt_number": 6 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 4.7, Page Number: 211<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Specific Gravity Conversion'''", - "", - "#(a)", - "", - "#Specific gravity at 60 degree F", - "sg_at_60=1.02", - "", - "#calculation", - "API=(141.5/sg_at_60)-131.5", - "", - "#result", - "print('(a)\\nDegrees API = %.2f\u00b0API' %API)", - "", - "#(b)", - "", - "#calculation", - "Be=145-145/sg_at_60", - "", - "#result", - "print('\\n(b)\\nDegrees Baume(heavy) = %.1f\u00b0Be' %Be)", - "", - "", - "#(c)", - "", - "#calculation", - "Bk=(sg_at_60-1)*1000", - "", - "#result", - "print('\\n(c)\\nDegrees Barkometer = %d\u00b0Bk' %Bk)", - "", - "#(d)", - "", - "#calculation", - "Q=(sg_at_60-1)*1000", - "", - "#result", - "print('\\n(c)\\nDegrees Quevenne = %d\u00b0Q' %Q)", - "", - "#(e)", - "", - "#calculation", - "Tw=200*(sg_at_60-1.0)", - "", - "#result", + "\n", + "\n", + "#(a)\n", + "\n", + "#Specific gravity at 60 degree F\n", + "sg_at_60=1.02\n", + "\n", + "#calculation\n", + "API=(141.5/sg_at_60)-131.5\n", + "\n", + "#result\n", + "print('(a)\\nDegrees API = %.2f\u00b0API' %API)\n", + "\n", + "#(b)\n", + "\n", + "#calculation\n", + "Be=145-145/sg_at_60\n", + "\n", + "#result\n", + "print('\\n(b)\\nDegrees Baume(heavy) = %.1f\u00b0Be' %Be)\n", + "\n", + "\n", + "#(c)\n", + "\n", + "#calculation\n", + "Bk=(sg_at_60-1)*1000\n", + "\n", + "#result\n", + "print('\\n(c)\\nDegrees Barkometer = %d\u00b0Bk' %Bk)\n", + "\n", + "#(d)\n", + "\n", + "#calculation\n", + "Q=(sg_at_60-1)*1000\n", + "\n", + "#result\n", + "print('\\n(c)\\nDegrees Quevenne = %d\u00b0Q' %Q)\n", + "\n", + "#(e)\n", + "\n", + "#calculation\n", + "Tw=200*(sg_at_60-1.0)\n", + "\n", + "#result\n", "print('\\n(d)\\nDegrees Twaddel = %d\u00b0Tw' %Tw)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(a)", - "Degrees API = 7.23\u00b0API", - "", - "(b)", - "Degrees Baume(heavy) = 2.8\u00b0Be", - "", - "(c)", - "Degrees Barkometer = 20\u00b0Bk", - "", - "(c)", - "Degrees Quevenne = 20\u00b0Q", - "", - "(d)", + "(a)\n", + "Degrees API = 7.23\u00b0API\n", + "\n", + "(b)\n", + "Degrees Baume(heavy) = 2.8\u00b0Be\n", + "\n", + "(c)\n", + "Degrees Barkometer = 20\u00b0Bk\n", + "\n", + "(c)\n", + "Degrees Quevenne = 20\u00b0Q\n", + "\n", + "(d)\n", "Degrees Twaddel = 4\u00b0Tw" ] } - ], + ], "prompt_number": 7 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 4.8, Page NUmber: 212<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''calculation of the volume of displacer'''", - "", - "import math", - "", - "#variable Declaration", - "T=0.5 # Torque Tube Force", - "sg1=1.02 # Maximum spe.gravity to be measured", - "sg2=0.98 # Minimum spe.gravity to be measured", - "wt=1000*10**-6", - "", - "#calculation", - "v=T/((sg1-sg2)*wt)", - "v=math.ceil(v)", - "", - "#result", + "\n", + "\n", + "import math\n", + "\n", + "#variable Declaration\n", + "T=0.5 # Torque Tube Force\n", + "sg1=1.02 # Maximum spe.gravity to be measured\n", + "sg2=0.98 # Minimum spe.gravity to be measured\n", + "wt=1000*10**-6\n", + "\n", + "#calculation\n", + "v=T/((sg1-sg2)*wt)\n", + "v=math.ceil(v)\n", + "\n", + "#result\n", "print('V=%d cm^3' %v)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "V=12500 cm^3" ] } - ], + ], "prompt_number": 8 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 4.9, Page Number: 212<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Differential pressure Sensor'''", - "", - "import math", - "", - "#variavle declaration", - "sg1=0.85 # Maximum spe.gravity to be measured", - "sg2=0.8 # Minimum spe.gravity to be measured", - "span=150.0 # D/P cell span", - "", - "", - "#a", - "", - "#calculation", - "H=span/(sg1-sg2)", - "", - "#result", - "print('(a)\\nH=%d mm = %dm' %(H,H/1000))", - "", - "#b", - "", - "#calculation", - "span_min=1500.0", - "span2=span_min*(sg1-sg2)", - "span2=math.ceil(span2)", - "", - "#result", + "\n", + "\n", + "import math\n", + "\n", + "#variavle declaration\n", + "sg1=0.85 # Maximum spe.gravity to be measured\n", + "sg2=0.8 # Minimum spe.gravity to be measured\n", + "span=150.0 # D/P cell span\n", + "\n", + "\n", + "#a\n", + "\n", + "#calculation\n", + "H=span/(sg1-sg2)\n", + "\n", + "#result\n", + "print('(a)\\nH=%d mm = %dm' %(H,H/1000))\n", + "\n", + "#b\n", + "\n", + "#calculation\n", + "span_min=1500.0\n", + "span2=span_min*(sg1-sg2)\n", + "span2=math.ceil(span2)\n", + "\n", + "#result\n", "print('\\n(b)\\nD/P span = %d mm' %span2)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(a)", - "H=3000 mm = 3m", - "", - "(b)", + "(a)\n", + "H=3000 mm = 3m\n", + "\n", + "(b)\n", "D/P span = 75 mm" ] } - ], + ], "prompt_number": 9 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 4.10, Page Number:212<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''Specific Gravity of unknown liquid'''", - "", - "#variable declaration", - "Ww=12-2 # Width of water", - "dw=1000.0 # density of water", - "", - "#calculation", - "v=Ww/dw", - "dx=(10-2)/v", - "sg=dx/dw ", - "", - "#result", + "\n", + "#variable declaration\n", + "Ww=12-2 # Width of water\n", + "dw=1000.0 # density of water\n", + "\n", + "#calculation\n", + "v=Ww/dw\n", + "dx=(10-2)/v\n", + "sg=dx/dw \n", + "\n", + "#result\n", "print('Specific Gravity of X =%.1f' %sg)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ "Specific Gravity of X =0.8" ] } - ], + ], "prompt_number": 10 - }, + }, { - "cell_type": "markdown", + "cell_type": "markdown", + "metadata": {}, "source": [ "<h3>Example 4.11, PAge Number: 213<h3>" ] - }, + }, { - "cell_type": "code", - "collapsed": false, + "cell_type": "code", + "collapsed": false, "input": [ - "'''calculation of specific gravity'''", - "", - "#(a)", - "", - "#variable declaration", - "wt=1.5 # weight of object", - " ", - "#calculation", - "v_obj=2.0/1000", - "dx=wt/v_obj", - "sg=dx/1000", - "", - "#result", - "print('(a)\\nSpecific Gravity = %.2f' %sg)", - "", - "#(b)", - "", - "sgl=0.8 # specific grav of liquid", - "dens=800.0 # density", - "", - "#calculation", - "W1=dens*v_obj-wt", - "", - "#result", - "print('\\n(b)\\nW1 = %.1f kg' %W1)", - "", - "", - "#(c)", - "", - "#variable declaration", - "sg2=1.2 # spe. grav.", - "dens2=1200.0 # density", - "", - "#calculation", - "W2=dens2*v_obj-wt", - "", - "#result", + "\n", + "\n", + "#(a)\n", + "\n", + "#variable declaration\n", + "wt=1.5 # weight of object\n", + " \n", + "#calculation\n", + "v_obj=2.0/1000\n", + "dx=wt/v_obj\n", + "sg=dx/1000\n", + "\n", + "#result\n", + "print('(a)\\nSpecific Gravity = %.2f' %sg)\n", + "\n", + "#(b)\n", + "\n", + "sgl=0.8 # specific grav of liquid\n", + "dens=800.0 # density\n", + "\n", + "#calculation\n", + "W1=dens*v_obj-wt\n", + "\n", + "#result\n", + "print('\\n(b)\\nW1 = %.1f kg' %W1)\n", + "\n", + "\n", + "#(c)\n", + "\n", + "#variable declaration\n", + "sg2=1.2 # spe. grav.\n", + "dens2=1200.0 # density\n", + "\n", + "#calculation\n", + "W2=dens2*v_obj-wt\n", + "\n", + "#result\n", "print('\\n(c)\\nW2 = %.1f kg' %W2)" - ], - "language": "python", + ], + "language": "python", + "metadata": {}, "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "stream", + "stream": "stdout", "text": [ - "(a)", - "Specific Gravity = 0.75", - "", - "(b)", - "W1 = 0.1 kg", - "", - "(c)", + "(a)\n", + "Specific Gravity = 0.75\n", + "\n", + "(b)\n", + "W1 = 0.1 kg\n", + "\n", + "(c)\n", "W2 = 0.9 kg" ] } - ], + ], "prompt_number": 11 } - ] + ], + "metadata": {} } ] }
\ No newline at end of file |