{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 15: Vibrations"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1, Page 535"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "W=.3*2240#lb\n",
      "l=36#in\n",
      "D=3.#in\n",
      "k=15#in\n",
      "A=math.pi*(D/2)**2\n",
      "E=30*10**6#youngs modulus\n",
      "C=12*10**6\n",
      "g=32.2#ft/s^2\n",
      "\n",
      "#Calculations\n",
      "d=W*l/(A*E)\n",
      "Fl=187.8/(d)**(1./2)\n",
      "I=math.pi*(d/2)**4\n",
      "d1=W*(l**3)*64/(3*E*math.pi*(3**4))\n",
      "Ft=187.8/(d1)**(1./2)\n",
      "j=math.pi*3**4./32\n",
      "q=C*j/l\n",
      "Ftor=(1/(2*math.pi))*(q*g*12/(W*k**2))**(1./2)\n",
      "F1=Ftor*60\n",
      "\n",
      "#Results\n",
      "print \"a) Frequency of Longitudinal vibrations = %.f per min\\nb) Frequency of the transverse vibrations = %.f per min\"\\\n",
      "    \"\\nc) Frequency of the torsional vibration = %.f per min\"%(Fl,Ft,F1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a) Frequency of Longitudinal vibrations = 17583 per min\n",
        "b) Frequency of the transverse vibrations = 634 per min\n",
        "c) Frequency of the torsional vibration = 786 per min\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2, Page 536"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "l1=3#ft\n",
      "l2=2.#ft\n",
      "l=l1+l2#ft\n",
      "W=.5*2240#lb\n",
      "k=20#in\n",
      "d=2.#in\n",
      "\n",
      "#Calculations\n",
      "Wa=2*W/5\n",
      "E=30*10**6\n",
      "d1=(Wa*l1*12)/(math.pi*E)\n",
      "N1=187.8/math.sqrt(d1)\n",
      "\n",
      "I=math.pi*(d)**4./64\n",
      "d2=W*(l1*12)**3*(l2*12)**3/(3*E*(l*12)**3*I)\n",
      "N2=187.8/(d2)**(1./2)\n",
      "C=12*10**6#given\n",
      "g=32.2#given\n",
      "J=math.pi*d**4/32\n",
      "q=C*J*((1./(l1*12))+(1./(l2*12)))\n",
      "n=(1./(2*math.pi))*(q*g*12/(W*k**2))**(1./2)\n",
      "N3=n*60\n",
      "\n",
      "#Results\n",
      "print \"a)Longitudinal vibration = %.f per min\\nb)Transverse Vibration = %.f per min\\nc)Torsional Vibration = %.f per min\"%(N1,N2,N3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a)Longitudinal vibration = 14356 per min\n",
        "b)Transverse Vibration = 863 per min\n",
        "c)Torsional Vibration = 321 per min\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3, Page 547"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "l=10#ft\n",
      "d=4#in\n",
      "E=30*10**6#youngs modulus\n",
      "d1=0.0882#inches; maximum deflection as shown in the figure\n",
      "\n",
      "#Calculations\n",
      "N=207./(d1)**(1./2)#From 15.20\n",
      "\n",
      "#Result\n",
      "print \"Frequency of natural transverse vibration = %.f per min\"%N\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Frequency of natural transverse vibration = 697 per min\n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4, Page 552"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "m=50.#lb\n",
      "k=100#lb/in\n",
      "g=32.2#ft/s\n",
      "\n",
      "#Calculations\n",
      "d=m/k#static deflection\n",
      "n=(1/(2*math.pi))*(g*12/d)**(1./2)\n",
      "#part 2\n",
      "b=g*12./d\n",
      "a=(b/20.79)**(1./2)\n",
      "nd=(1./(2*math.pi))*((b-(a/2)**2))**(1./2)\n",
      "A=nd/n\n",
      "\n",
      "#Results\n",
      "print \"Frequency of free vibrations = %.3f per sec\\nFrequency of damped vibrations = %.3f per sec\"\\\n",
      "      \"\\nThe ratio of the frequencies of damped and free vibrationsis %.3f\"%(n,nd,A)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Frequency of free vibrations = 4.424 per sec\n",
        "Frequency of damped vibrations = 4.398 per sec\n",
        "The ratio of the frequencies of damped and free vibrationsis 0.994\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5, Page 553"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "#damping torque is directly proposrtional to the angular velocity\n",
      "C=12*10**6#Modulus of rigidity\n",
      "l=3#ft\n",
      "d=1#in\n",
      "g=32.2#ft/s**2\n",
      "I=500#lb ft^2 ; moment of inertia\n",
      "\n",
      "#Calculations\n",
      "J=math.pi*d**4/32\n",
      "q=C*J/(l*12)\n",
      "n=(1./(2*math.pi))*(q*g*12/(I*12**2))**(1./2)\n",
      "#part 2 \n",
      "b1=(q*g*12/(I*12**2))\n",
      "a1=(b1/10.15)**(1./2)#by reducing equation 15.28\n",
      "nd=(1./(2*math.pi))*(b1-(a1/2)**2)**(1./2)\n",
      "A=nd/n\n",
      "\n",
      "#Results\n",
      "print \"The frequency of natural vibration = %.2f per sec\\nThe frequency of damped vibration = %.2f per sec\"\\\n",
      "      \"\\nThe ratio nd/n = %.3f\"%(n,nd,A)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The frequency of natural vibration = 2.11 per sec\n",
        "The frequency of damped vibration = 2.08 per sec\n",
        "The ratio nd/n = 0.988\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6, Page 560"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "m=20.#lb\n",
      "k=50#lb/in\n",
      "F=30.#lb\n",
      "w=50#sec^-1 \n",
      "g=32.2#ft/s^2\n",
      "\n",
      "#Calculations\n",
      "d=m/k\n",
      "x=F/k#extension of the spring\n",
      "b=g*12./d\n",
      "a=(b/30.02)**(1./2)#from equation 15.28\n",
      "D=1/((1-w**2/b)**2+a**2*w**2/b**2)**(1./2)\n",
      "Af=D*x#amplitude of forced vibration \n",
      "D=(b/a**2)**(1./2)#At resonance\n",
      "A=D*x#amplitude at resonance\n",
      "\n",
      "#Results\n",
      "print \"Amplitude of forced vibrations = %.3f in\\nAmplitude of the forced vibrations at resonance = %.2f in\"%(Af,A)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Amplitude of forced vibrations = 0.372 in\n",
        "Amplitude of the forced vibrations at resonance = 3.29 in\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7, Page 563"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "e=1./30\n",
      "n=1200.#rpm\n",
      "w=math.pi*n/30\n",
      "m=3.#lb\n",
      "g=32.2#ft/s^2\n",
      "stroke=3.5#in\n",
      "\n",
      "#Calculations\n",
      "r=stroke/2\n",
      "k=(1+1./e)**(1./2)#nf/n=k\n",
      "d=(k/187.7)**2\n",
      "W=200.#lb ; given\n",
      "s=W/d#combined stiffness\n",
      "p=1./14.1#As a^2/b=1/198\n",
      "T=((1+p**2*k**2/((1-k**2)**2+p**2*k**2)))**(1./2)#actual value of transmissibility\n",
      "F=(m/g)*w**2*r/12#maximum unbalanced force transmitted on the machine\n",
      "Fmax=F*T#maximum force transmitted to the foundation\n",
      "#case b\n",
      "E=((1+p**2)/(p**2))**(1./2)\n",
      "Nreso=215.5#rpm\n",
      "Fub=F*(Nreso/n)**2\n",
      "Ftmax=E*Fub\n",
      "D=E#dynamic magnifier\n",
      "deln=Fub/152#static deflection\n",
      "A=deln*D\n",
      "\n",
      "#Results\n",
      "print \"a) Maximum force transmitted at 1200 rpm = %.1f lb\\nb) The amplitude of the forced vibrations of the machine at\"\\\n",
      "      \"resonance = %.3f in\\n   Force transmitted = %.f lb\"%(Fmax,A,Fub)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a) Maximum force transmitted at 1200 rpm = 214.6 lb\n",
        "b) The amplitude of the forced vibrations of the machine atresonance = 0.643 in\n",
        "   Force transmitted = 7 lb\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8, Page 570"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "l1=11#in\n",
      "l2=10#in\n",
      "l3=15#in\n",
      "l4=4#in\n",
      "l5=10#in\n",
      "d1=3#in\n",
      "d2=5#in\n",
      "d3=3.5#in\n",
      "d4=7#in\n",
      "d5=5#in\n",
      "I1=1500#lb ft^2\n",
      "I2=1000#lb ft^2\n",
      "leq=3#in from 15.49\n",
      "g=32.2#ft/s^2\n",
      "C=12*10**6\n",
      "\n",
      "#Calculations\n",
      "J=math.pi*leq**4./32\n",
      "l=l1+l2*(leq/d2)**4+l3*(leq/d3)**4+l4*(leq/d4)**4+l5*(leq/d5)**4\n",
      "la=I2*l/(I1+I2)\n",
      "qa=C*J/la\n",
      "n=(1./(2*math.pi))*(qa*g*12/(I1*12**2))**(1./2)\n",
      "\n",
      "#Results\n",
      "print \"The frequency of the natural torsional oscillation of the system = %.1f per sec\"%n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The frequency of the natural torsional oscillation of the system = 23.8 per sec\n"
       ]
      }
     ],
     "prompt_number": 27
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9, Page 572"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "Ia=2.5#ton ft^2\n",
      "Ib=7.5#ton ft^2\n",
      "Ic=3.#ton ft^2\n",
      "g=32.2#ft/s^2\n",
      "AB=9.5#ft\n",
      "BC=25#ft\n",
      "d=8.5#in\n",
      "C=11.8*10**6#lb/in^2\n",
      "\n",
      "#Calculations\n",
      "k=Ic/Ia#la/lc=k\n",
      "lc1=(25.6+(25.6**2-4*114.1)**(1./2))/2#from 1 and 2 , reducing using quadratic formula\n",
      "lc2=(25.6-(25.6**2-4*114.1)**(1./2))/2#from 1 and 2 , reducing using quadratic formula\n",
      "la1=lc1*k\n",
      "la2=lc2*k\n",
      "J=math.pi*d**4/32\n",
      "q=C*J/(lc1*12)#torsional stiffness\n",
      "IC=Ic*2240*12**2/(g*12)#moment of inertia\n",
      "nc=(1./(2*math.pi))*(q/IC)**(1./2)#fundamental frequency of vibration\n",
      "a1=nc*60\n",
      "a=math.floor(a1)\n",
      "n=16*(lc1/lc2)**(1./2)\n",
      "b=n*60\n",
      "\n",
      "#Results\n",
      "print \"Fundamental frequency of vibration = %.f per min\\nTwo node frequency = %.f per min\"%(a,b)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Fundamental frequency of vibration = 961 per min\n",
        "Two node frequency = 1784 per min\n"
       ]
      }
     ],
     "prompt_number": 28
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11, Page 587"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "g=32.3#ft/s^2\n",
      "l2=25.5#in\n",
      "d1=2.75#in\n",
      "d2=3.5#in\n",
      "C=12*10**6#modulus of rigidity\n",
      "G=1/0.6#given speed ratio\n",
      "Ib=54.#lb in^2\n",
      "Ic=850.#lb in^2\n",
      "Id=50000.#lb in^2\n",
      "\n",
      "#Calculations\n",
      "Id1=Id/G**2#15.62\n",
      "Ia=1500#lb in^2\n",
      "la=Id1/(Id1+Ia)*66.5\n",
      "J=math.pi*d1**4/32\n",
      "q=C*J/la#torsional stiffness\n",
      "n=(1/(2*math.pi))*(q*g*12/Ia)**(1./2)\n",
      "nf=n*60#for minutes\n",
      "#case b)\n",
      "Ib1=Ib+Ic/(G**2)\n",
      "a=63.15#in; distance of the node from rotor A (given)\n",
      "b=3.661#in; distance of the node from rotor A (given)\n",
      "N1=n*(la/a)**(1./2)\n",
      "N2=n*(la/b)**(1./2)\n",
      "N1f=N1*60#for minutes\n",
      "N2f=N2*60#for minutes\n",
      "\n",
      "#Results\n",
      "print \"a) The frequency of torsional vibrations n = %.1f per sec or %.f per min\\nb) The fundamental frquency = %.1f per sec\"\\\n",
      "      \"or %.f per min\\n   and the two node frequency = %.f per sec or %.f per min\"%(n,nf,N1,N1f,N2,N2f)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a) The frequency of torsional vibrations n = 84.8 per sec or 5086 per min\n",
        "b) The fundamental frquency = 83.6 per secor 5014 per min\n",
        "   and the two node frequency = 347 per sec or 20824 per min\n"
       ]
      }
     ],
     "prompt_number": 29
    }
   ],
   "metadata": {}
  }
 ]
}