{
 "metadata": {
  "name": "",
  "signature": "sha256:1f988043aec4c9b9b6e84d06631278db6c5ded6c7354777cfc3020424bf624d7"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter12-Balancing of reciprocating of masses"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg310"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##CHAPTER 12 ILLUSRTATION 1 PAGE NO 310\n",
      "##TITLE:Balancing of reciprocating of masses\n",
      "import math\n",
      "#calculate the magnitude of balance mass required and residual balance error\n",
      "pi=3.141\n",
      "N=250.##               speed of the reciprocating engine in rpm\n",
      "s=18.##              length of stroke in mm\n",
      "mR=120.##             mass of reciprocating parts in kg\n",
      "m=70.##               mass of revolving parts in kg\n",
      "r=.09##                radius of revolution of revolving parts in m\n",
      "b=.15##               distance at which balancing mass located in m\n",
      "c=2./3.##              portion of reciprocating mass balanced \n",
      "teeta=30.##           crank angle from inner dead centre in degrees\n",
      "##===============================\n",
      "B=r*(m+c*mR)/b##             balance mass required in kg\n",
      "w=2.*math.pi*N/60.##     angular speed in rad/s\n",
      "F=mR*w**2.*r*(((1.-c)**2.*(math.cos(teeta/57.3))**2.)+(c**2.*(math.sin(teeta/57.3))**2.))**.5##      residual unbalanced forces in N\n",
      "print'%s %.1f %s %.3f %s'%('Magnitude of balance mass required= ',B,'kg' and 'Residual unbalanced forces= ',F,' N')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Magnitude of balance mass required=  90.0 Residual unbalanced forces=  3263.971  N\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg310"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##CHAPTER 12 ILLUSRTATION 2 PAGE NO 310\n",
      "##TITLE:Balancing of reciprocating of masses\n",
      "#calculate speed and swaying couples \n",
      "pi=3.141\n",
      "g=10.##    acceleration due to gravity approximately in m/s**2\n",
      "mR=240.##    mass of reciprocating parts per cylinder in kg\n",
      "m=300.##     mass of rotating parts per cylinder in kg\n",
      "a=1.8##distance between cylinder centres in m\n",
      "c=.67##   portion of reciprocating mass to be balanced\n",
      "b=.60##       radius of balance masses in m\n",
      "r=24.##       crank radius in cm\n",
      "R=.8##radius of thread of wheels in m\n",
      "M=40.\n",
      "##=======================================\n",
      "Ma=m+c*mR##            total mass to be balanced in kg\n",
      "mD=211.9##      mass of wheel D from figure in kg\n",
      "mC=211.9##..... mass of wheel C from figure in kg\n",
      "theta=171.##     angular position of balancing mass C in degrees\n",
      "Br=c*mR/Ma*mC##       balancing mass for reciprocating parts in kg\n",
      "w=(M*g**3./Br/b)**.5##   angular speed in rad/s\n",
      "v=w*R*3600./1000.## speed in km/h\n",
      "S=a*(1.-c)*mR*w**2*r/2.**.5/100./1000.##   swaying couple in kNm\n",
      "print'%s %.3f %s %.3f %s'%('speed=',v,' kmph'and ' swaying couple=',S,' kNm')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "speed= 86.476  swaying couple= 21.812  kNm\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg313"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##CHAPTER 12 ILLUSRTATION 3 PAGE NO 313\n",
      "##TITLE:Balancing of reciprocating of masses\n",
      "#calculate hammer blow and tractive effort and swaying couple\n",
      "import math\n",
      "pi=3.141\n",
      "g=10.##    acceleration due to gravity approximately in m/s**2\n",
      "a=.70##distance between cylinder centres in m\n",
      "r=60.## crank radius in cm\n",
      "m=130.##mass of rotating parts per cylinder in kg\n",
      "mR=210.## mass of reciprocating parts per cylinder in kg\n",
      "c=.67## portion of reciprocating mass to be balanced\n",
      "N=300.##e2engine speed in rpm\n",
      "b=.64##       radius of balance masses in m\n",
      "##============================\n",
      "Ma=m+c*mR##            total mass to be balanced in kg\n",
      "mA=100.44##         mass of wheel A from figure in kg\n",
      "Br=c*mR/Ma*mA##       balancing mass for reciprocating parts in kg\n",
      "H=Br*(2.*math.pi*N/60.)**2*b##   hammer blow in N\n",
      "w=(2.*math.pi*N/60.)##    angular speed\n",
      "T=2**.5*(1.-c)*mR*w**2.*r/2./100.##tractive effort in N\n",
      "S=a*(1.-c)*mR*w**2.*r/2./2.**.5/100.##   swaying couple in Nm\n",
      "\n",
      "print'%s %.3f %s %.3f %s %.3f %s'%('Hammer blow=',H,' in N' 'tractive effort= ',T,' in N' 'swaying couple= ',S,' in Nm')\n",
      "print '%s'%(\"The answer is a bit different due to rounding off error in textbook\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Hammer blow= 32975.566  in Ntractive effort=  29018.117  in Nswaying couple=  10156.341  in Nm\n",
        "The answer is a bit different due to rounding off error in textbook\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg314"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##CHAPTER 12 ILLUSRTATION 4 PAGE NO 314\n",
      "##TITLE:Balancing of reciprocating of masses\n",
      "import math\n",
      "#calculate maximum unbalanced primary couples\n",
      "pi=3.141\n",
      "mR=900.##   mass of reciprocating parts in kg\n",
      "N=90.##     speed of the engine in rpm\n",
      "r=.45##crank radius in m\n",
      "cP=.9*mR*(2.*math.pi*N/60.)**2.*r*2.**.5/1000.##    maximum unbalanced primary couple in kNm\n",
      "print'%s %.3f %s'%('maximum unbalanced primary couple=',cP,'  k Nm')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "maximum unbalanced primary couple= 45.788   k Nm\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5-pg315"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##CHAPTER 12 ILLUSRTATION 5 PAGE NO 315\n",
      "##TITLE:Balancing of reciprocating of masses\n",
      "import math\n",
      "#calculate maximum unbalanced secondary force and with reasons\n",
      "pi=3.141\n",
      "mRA=160.##   mass of reciprocating cylinder A in kg\n",
      "mRD=160.##   mass of reciprocating cylinder D in kg\n",
      "r=.05## stroke lenght in m\n",
      "l=.2##  connecting rod length in m\n",
      "N=450.##   engine speed in rpm\n",
      "##===========================\n",
      "theta2=78.69##           crank angle between A & B  cylinders in degrees\n",
      "mRB=576.88##  mass of cylinder B in kg\n",
      "n=l/r##    ratio between connecting rod length and stroke length\n",
      "w=2.*math.pi*N/60.##   angular speed in rad/s\n",
      "F=mRB*2.*w**2.*r*math.cos((2.*theta2)/57.3)/n\n",
      "print'%s %.3f %s'%('Maximum unbalanced secondary force=',F,' N in anticlockwise direction thats why - sign')\n",
      "print '%s'%(\"The answer is a bit different due to rounding off error in textbook\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum unbalanced secondary force= -29560.284  N in anticlockwise direction thats why - sign\n",
        "The answer is a bit different due to rounding off error in textbook\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg316"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##CHAPTER 12 ILLUSRTATION 6 PAGE NO 316\n",
      "##TITLE:Balancing of reciprocating of masses\n",
      "import math\n",
      "pi=3.141\n",
      "rA=.25##     stroke length of A piston  in m\n",
      "rB=.25##    stroke length of B piston  in m\n",
      "rC=.25## stroke length C piston  in m\n",
      "N=300.## engine speed in rpm\n",
      "mRL=280.## mass of reciprocating parts in inside cylinder kg\n",
      "mRO=240.##   mass of reciprocating parts in outside cylinder kg\n",
      "c=.5##  portion ofreciprocating masses to be balanced \n",
      "b1=.5##  radius at which masses to be balanced in m\n",
      "##======================\n",
      "mA=c*mRO##    mass of the reciprocating parts to be balanced foreach outside cylinder in kg\n",
      "mB=c*mRL##    mass of the reciprocating parts to be balanced foreach inside cylinder in kg\n",
      "B1=79.4##         balancing mass for reciprocating parts in kg\n",
      "w=2.*math.pi*N/60.##   angular speed in rad/s\n",
      "H=B1*w**2*b1##   hammer blow per wheel in N\n",
      "print'%s %.1f %s'%('Hammer blow per wheel= ',H,' N')\n",
      "print '%s'%(\"The answer is a bit different due to rounding off error in textbook\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Hammer blow per wheel=  39182.3  N\n",
        "The answer is a bit different due to rounding off error in textbook\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex7-pg318"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##CHAPTER 12 ILLUSRTATION 7 PAGE NO 318\n",
      "##TITLE:Balancing of reciprocating of masses\n",
      "import math\n",
      "\n",
      "pi=3.141\n",
      "mR=300.##    reciprocating mass per cylinder in kg\n",
      "r=.3##   crank radius in m\n",
      "D=1.7##  driving wheel diameter in m\n",
      "a=.7##  distance between cylinder centre lines in m\n",
      "H=40.##  hammer blow in kN\n",
      "v=90.##   speed in kmph\n",
      "##=======================================\n",
      "R=D/2.##     radius of driving wheel in m\n",
      "w=90.*1000./3600./R##        angular velocity in rad/s\n",
      "##Br*b=69.625*c  by mearument from diagram\n",
      "c=H*1000./(w**2.)/69.625##   portion of reciprocating mass to be balanced\n",
      "T=2.**.5*(1-c)*mR*w**2.*r##   variation in tractive effort in N\n",
      "M=a*(1.-c)*mR*w**2.*r/2.**.5##     maximum swaying couple in N-m\n",
      "print'%s %.3f %s %.3f %s %.3f %s'%('portion of reciprocating mass to be balanced=',c,' ''variation in tractive effort=',T,' N'' maximum swaying couple=',M,' N-m')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "portion of reciprocating mass to be balanced= 0.664  variation in tractive effort= 36980.420  N maximum swaying couple= 12943.147  N-m\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex8-pg320"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##CHAPTER 12 ILLUSRTATION 8 PAGE NO 320\n",
      "##TITLE:Balancing of reciprocating of masses\n",
      "import math\n",
      "pi=3.141\n",
      "N=1800.##       speed of the engine in rpm\n",
      "r=6.##     length of crank in cm\n",
      "l=24.##    length of connecting rod in cm\n",
      "m=1.5##   mass of reciprocating cylinder in kg\n",
      "##====================\n",
      "w=2.*math.pi*N/60.##        angular speed in rad/s\n",
      "UPC=.019*w**2.##      unbalanced primary couple in N-m\n",
      "n=l/r##   ratio of length of crank to the connecting rod \n",
      "USC=.054*w**2./n##    unbalanced secondary couple in N-m\n",
      "print'%s %.f %s %.3f %s '%('unbalanced primary couple=',UPC,'N-m' 'unbalanced secondary couple=',USC,' N-m')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "unbalanced primary couple= 675 N-munbalanced secondary couple= 479.663  N-m \n"
       ]
      }
     ],
     "prompt_number": 8
    }
   ],
   "metadata": {}
  }
 ]
}