summaryrefslogtreecommitdiff
path: root/The_Theory_of_Machines_by_T._Bevan/ch4.ipynb
blob: bda395477ebb58825d5ab1d4cda428416f890228 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 4: Mechanisms with Lower Pairs"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1, Page 138"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "rpm=1000\n",
      "angle=20#degree\n",
      "\n",
      "#Calculations&Results\n",
      "ang=(angle*math.pi)/180\n",
      "w=2*math.pi*rpm/60\n",
      "print \"The angular velocity of the driving shaft is %.1f rad/s\"%w\n",
      "#maximum value of w1=w/cos(angle) and minimum value w2=w*cos(angle)\n",
      "w1=w/math.cos(ang)\n",
      "w2=w*math.cos(ang)\n",
      "print \"\\nExtreme angular velocities :-\"\n",
      "print \"maximum value of angular velocity w1=%.1f rad/s \\nminimum value of angular velocity w2=%.1f rad/s\"%(w1,w2)\n",
      "#using equation 4.11, cos(2x)=(2*sin(angle)**2)/(2-sin(angle)**2)\n",
      "x=math.acos((2*math.sin(ang)**2)/(2-math.sin(ang)**2))*180/(math.pi)\n",
      "y=360-x#for cosine inverse, angle and 360-angle are same and must be considered\n",
      "x1=x/2\n",
      "y1=y/2\n",
      "print \"The acceleration of driven shaft is a maximum when theta =%.2f or %.2f degrees\"%(x1,y1)\n",
      "amax=(w**2*math.cos(ang)*(math.sin(ang)**2)*math.sin(x*math.pi/180))/((1-((math.cos(x1*math.pi/180)**2)*(math.sin(ang)**2)))**2)#maximum angular acceleration, numerically\n",
      "print \"Maximum angular acceleration is %.f rad/s^2\"%amax\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The angular velocity of the driving shaft is 104.7 rad/s\n",
        "\n",
        "Extreme angular velocities :-\n",
        "maximum value of angular velocity w1=111.4 rad/s \n",
        "minimum value of angular velocity w2=98.4 rad/s\n",
        "The acceleration of driven shaft is a maximum when theta =41.43 or 138.57 degrees\n",
        "Maximum angular acceleration is 1370 rad/s^2\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}