summaryrefslogtreecommitdiff
path: root/Theory_Of_Machines/ch5.ipynb
blob: 2ebeaf215e46e0119d9c278024d2b9463ea8901b (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
{
 "metadata": {
  "name": "",
  "signature": "sha256:a49d3045051d18d945c16a76ba66d562e97f6c140e0b1e26e143c1e463c579f5"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 5 : Simple Mechanisms"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.1 Page No : 110"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables:\n",
      "AC = 300.\n",
      "CB1 = 120. \t\t\t#mm\n",
      "\n",
      "#Solution:\n",
      "#Refer Fig. 5.28\n",
      "#Calculating the sine of inclination of the slotted bar with the vertical\n",
      "sineCAB1 = CB1/AC\n",
      "#Calculating the inclination of the slotted bar with the vertical\n",
      "angleCAB1 = math.sin(sineCAB1)*180/math.pi \t\t\t#degrees\n",
      "#Calculating the angle alpha\n",
      "alpha = 2*(90-angleCAB1) \t\t\t#degrees\n",
      "#Calculating the ratio of time of cutting stroke to time of return stroke\n",
      "r = (360-alpha)/alpha \t\t\t#Ratio of time of cutting stroke to time of return stroke\n",
      "\n",
      "#Results:\n",
      "print \" The ratio of the time of cutting stroke to the time of return stroke is %.1f\"%(r)\n",
      "\n",
      "# rounding off error"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The ratio of the time of cutting stroke to the time of return stroke is 1.7\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.2 Page No : 110"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables:\n",
      "AC = 240.\n",
      "CB1 = 120.\n",
      "AP1 = 450. \t\t\t#mm\n",
      "\n",
      "#Solution:\n",
      "#Refer Fig. 5.29\n",
      "#Calculating the math.sine of inclination of the slotted bar with the vertical\n",
      "sineCAB1 = CB1/AC\n",
      "#Calculating the inclination of the slotted bar with the vertical\n",
      "angleCAB1 = math.sin(sineCAB1)*180/math.pi \t\t\t#degrees\n",
      "#Calculating the angle alpha\n",
      "alpha = 2*(90-angleCAB1) \t\t\t#degrees\n",
      "#Calculating the time ratio of cutting stroke to the return stroke\n",
      "r = (360-alpha)/alpha \t\t\t#Time ratio of cutting stroke to the return stroke\n",
      "#Calculating the length of the stroke\n",
      "R1R2 = 2*AP1*round(math.sin(math.pi/2-alpha/2*math.pi/180),1) \t\t\t#mm\n",
      "\n",
      "#Results:\n",
      "print \" The time ratio of cutting stroke to the return stroke is %.f.\"%(r)\n",
      "print \" The length of the stroke R1R2  =  P1P2  =  %d mm.\"%(R1R2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The time ratio of cutting stroke to the return stroke is 2.\n",
        " The length of the stroke R1R2  =  P1P2  =  450 mm.\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.3 Page No : 112"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables:\n",
      "#Refer Fig. 5.30 and Fig. 5.31\n",
      "BC = 30.\n",
      "R1R2 = 120. \t\t\t#mm\n",
      "r = 1.7 \t\t\t#Time ratio of working stroke to the return stroke\n",
      "\n",
      "#Solution:\n",
      "#Calculating the angle alpha\n",
      "alpha = 360/(1.7+1) \t\t\t#degrees\n",
      "#Calculating the length of the link AC\n",
      "B1C = BC\n",
      "AC = B1C/math.cos(math.radians(alpha/2)) \t\t\t#mm\n",
      "#Calculating the length of the link AP\n",
      "AP1 = R1R2/(2*math.cos(math.radians(alpha/2))) \t\t\t#mm\n",
      "AP = AP1\n",
      "\n",
      "#Results:\n",
      "print \" The length of AC  =  %.1f mm.\"%(AC)\n",
      "print \" The length of AP  =  %.2f mm.\"%(AP)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The length of AC  =  75.7 mm.\n",
        " The length of AP  =  151.48 mm.\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.4 Page No : 112"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables:\n",
      "CD = 50.  #mm\n",
      "CA = 75.  #mm\n",
      "PA = 150. #mm\n",
      "PR = 135. #mm\n",
      "\n",
      "#Solution:\n",
      "#Refer Fig. 5.32 and Fig. 5.33\n",
      "#Calculating the cosine of angle beta\n",
      "CA2 = CA\n",
      "cosbeta = CD/CA2\n",
      "#Calculating the angle beta\n",
      "beta = 2*math.degrees(math.acos(cosbeta)) \t\t\t#degrees\n",
      "#Calculating the ratio of time of cutting stroke to time of return stroke\n",
      "r = (360-beta)/beta            \t\t\t#Ratio of time of cutting stroke to time of return stroke\n",
      "#Calculating the length of effective stroke\n",
      "R1R2 = 87.5 \t\t\t#mm\n",
      "\n",
      "#Results:\n",
      "print \" The ratio of time of cutting stroke to time of return stroke is %.3f.\"%(r)\n",
      "print \" The length of effective stroke R1R2  =  %.1f mm.\"%(R1R2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The ratio of time of cutting stroke to time of return stroke is 2.735.\n",
        " The length of effective stroke R1R2  =  87.5 mm.\n"
       ]
      }
     ],
     "prompt_number": 5
    }
   ],
   "metadata": {}
  }
 ]
}