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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
|
{
"metadata": {
"name": "chapter4.ipynb"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 4: Resultants of Non-coplanar Force Systems"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.4-1, Page no: 48"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"import numpy as np\n",
"#Initilization Of Variables\n",
"\n",
"F1=20 #lb\n",
"F2=15 #lb\n",
"F3=30 #lb\n",
"F4=50 #lb\n",
"#Co-ordinates of Forces\n",
"C1=np.array([2,1,6])\n",
"C2=np.array([4,-2,5])\n",
"C3=np.array([-3,-2,1])\n",
"C4=np.array([5,1,-2])\n",
"\n",
"#Calculations\n",
"\n",
"A=(C1[0]**2+C1[1]**2+C1[2]**2)**0.5\n",
"B=(C2[0]**2+C2[1]**2+C2[2]**2)**0.5\n",
"C=(C3[0]**2+C3[1]**2+C3[2]**2)**0.5\n",
"D=(C4[0]**2+C4[1]**2+C4[2]**2)**0.5\n",
"#Calculations for cos(thetax),cos(thetay) and cos(thetaz)\n",
"theta1=(A**-1)*np.array([C1[0],C1[1],C1[2]])\n",
"theta2=(B**-1)*np.array([C2[0],C2[1],C2[2]])\n",
"theta3=(C**-1)*np.array([C3[0],C3[1],C3[2]])\n",
"theta4=(D**-1)*np.array([C4[0],C4[1],C4[2]])\n",
"#Calculations for forces (in form of force vectors)\n",
"Fa=F1*np.array([theta1[0],theta1[1],theta1[2]]) #lb\n",
"Fb=F2*np.array([theta2[0],theta2[1],theta2[2]]) #lb\n",
"Fc=F3*np.array([theta3[0],theta3[1],theta3[2]]) #lb\n",
"Fd=F4*np.array([theta4[0],theta4[1],theta4[2]]) #lb\n",
"Fx=Fa[0]+Fb[0]+Fc[0]+Fd[0] #lb\n",
"Fy=Fa[1]+Fb[1]+Fc[1]+Fd[1] #lb\n",
"Fz=Fa[2]+Fb[2]+Fc[2]+Fd[2] #lb\n",
"R=(Fx**2+Fy**2+Fz**2)**0.5 #lb\n",
"thetax=arccos(Fx*R**-1)*(180/pi) #degrees\n",
"thetay=180-((180*arccos(Fy*R**-1))/pi) #degrees\n",
"thetaz=(180*arccos(Fz*R**-1))/pi #degrees\n",
"\n",
"#Result\n",
"\n",
"print'The resultant of the force system is',round(R,1),\"lb\"\n",
"print'The angle of the resultant with respect to x axis is',round(thetax,1),\"degree\"\n",
"print'The angle of the resultant with respect to y axis is',round(thetay),\"degree\"\n",
"print'The angle of the resultant with respect to a axis is',round(thetaz,1),\"degree\"\n",
"\n",
"# Thetax is off by 0.1 degrees"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The resultant of the force system is 42.5 lb\n",
"The angle of the resultant with respect to x axis is 30.1 degree\n",
"The angle of the resultant with respect to y axis is 79.0 degree\n",
"The angle of the resultant with respect to a axis is 62.4 degree\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.4-2, Page no: 49"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Initilization of variables\n",
"\n",
"F=[20,-10,30] #N\n",
"#co-ordinates in meters\n",
"a=2 #m\n",
"b=4 #m\n",
"c=7 #m\n",
"d=3 #m\n",
"e=2 #m\n",
"f=4 #m\n",
"\n",
"#Calculations\n",
"\n",
"R=F[0]+F[1]+F[2] #N\n",
"M_o=F[0]*a+F[1]*b+F[2]*c #N.m\n",
"x=M_o*R**-1 #m\n",
"M_x=-F[2]*f-F[0]*d-F[1]*e #N.m\n",
"z=-M_x/R #m\n",
"\n",
"#Result\n",
"\n",
"print'The resultant is +',round(R),\"N\"\n",
"print'The moment about point O is +',round(M_o),\"N.m\"\n",
"print'The position of R is at',round(x,2),\"m (from origin)\"\n",
"print'The moment is',round(M_x),\"N.m\"\n",
"print'The z co-ordinate is +',round(z),\"m\"\n",
"\n",
"# Here the value of R & M_o is correct which should yeild the vaue of x (M_o/R) correctly. However dueto some error in the software the correct value is not being printed.\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The resultant is + 40.0 N\n",
"The moment about point O is + 210.0 N.m\n",
"The position of R is at 5.25 m (from origin)\n",
"The moment is -160.0 N.m\n",
"The z co-ordinate is + 4.0 m\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.4-3, Page No: 49"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Initilization of variables\n",
"\n",
"F=[100,50,-150] #Force vector N\n",
"a=2 #m\n",
"b=2 #m \n",
"c=3 #m\n",
"d=2 #m\n",
"e=4 #m\n",
"f=8 #m\n",
"\n",
"#Calculations\n",
"\n",
"R=F[0]+F[1]+F[2] #N\n",
"M_x=-F[0]*a+F[1]*b-F[2]*c #N.m\n",
"M_z=F[0]*d+F[1]*e+F[2]*f #N.m\n",
"C=sqrt(M_x**2+M_z**2) #N-m\n",
"thetax=arctan(M_x*-M_z**-1)*(180/pi) #degrees\n",
"\n",
"#Result\n",
"\n",
"print'The resultant is',round(R),\"N\"\n",
"print'The moment about x axis is +',round(M_x),\"N.m\"\n",
"print'The moment about z axis is',round(M_z),\"N.m\"\n",
"print'The couple acting is',round(C),\"N.m\"\n",
"print'The trace makes an angle with x axis of',round(thetax,1),\"degrees\"\n",
"\n",
"# The answer for C waries by 1 N.m as compared to the book."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The resultant is 0.0 N\n",
"The moment about x axis is + 350.0 N.m\n",
"The moment about z axis is -800.0 N.m\n",
"The couple acting is 873.0 N.m\n",
"The trace makes an angle with x axis of 23.6 degrees\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.4-4, Page No: 50"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"import numpy as np\n",
"\n",
"#Initilization of variables\n",
"x1=-2\n",
"y1=2\n",
"z1=-2\n",
"x2=3\n",
"y2=0\n",
"z2=-4\n",
"x3=3\n",
"y3=2\n",
"z3=2\n",
"F1=40 #lb\n",
"F2=30 #lb\n",
"F3=20 #lb\n",
"Mxm=np.array([-92.4,-48,-19.4])\n",
"Mym=np.array([-46.2,72,9.8])\n",
"Mzm=np.array([46.2,-36,19.4])\n",
"\n",
"#Calculations\n",
"mag1=(x1**2+y1**2+z1**2)**0.5\n",
"mag2=(x2**2+y2**2+z2**2)**0.5\n",
"mag3=(x3**2+y3**2+z3**2)**0.5\n",
"thetax1=(x1*mag1**-1) #degrees\n",
"thetay1=(y1*mag1**-1) #degrees\n",
"thetaz1=(z1*mag1**-1) #degrees\n",
"thetax2=(x2*mag2**-1) #degrees\n",
"thetay2=(y2*mag2**-1) #degrees\n",
"thetaz2=(z2*mag2**-1) #degrees\n",
"thetax3=(x3*mag3**-1) #degrees\n",
"thetay3=(y3*mag3**-1) #degrees\n",
"thetaz3=(z3*mag3**-1) #degrees\n",
"#Now we will define all the components in terms of matrices for simplicity of computation\n",
"F=np.array([F1,F2,F3]) #lb\n",
"Fx1=F[0]*thetax1\n",
"Fy1=F[0]*thetay1\n",
"Fz1=F[0]*thetaz1\n",
"Fx2=F[1]*thetax2\n",
"Fy2=F[1]*thetay2\n",
"Fz2=F[1]*thetaz2\n",
"Fx3=F[2]*thetax3\n",
"Fy3=F[2]*thetay3\n",
"Fz3=F[2]*thetaz3\n",
"Fx=Fx1+Fx2+Fx3 #lb\n",
"Fy=Fy1+Fy2+Fy3 #lb\n",
"Fz=Fz1+Fz2+Fz3 #lb\n",
"R=(Fx**2+Fy**2+Fz**2)**0.5 #lb\n",
"thetax=arccos(Fx*R**-1)*(180/pi) #degrees\n",
"thetay=arccos(Fy*R**-1)*(180/pi) #degrees\n",
"thetaz=arccos(Fz*R**-1)*(180/pi) #degrees\n",
"#Moment calculations\n",
"Mx=Mxm[0]+Mxm[1]+Mxm[2] #lb-ft\n",
"My=Mym[0]+Mym[1]+Mym[2] #lb-ft\n",
"Mz=Mzm[0]+Mzm[1]+Mzm[2] #lb-ft\n",
"C=(Mx**2+My**2+Mz**2)**0.5 #lb-ft\n",
"#Direction cosines\n",
"PHIx=arccos(Mx*C**-1)*(180/pi) #degrees\n",
"PHIy=arccos(My*C**-1)*(180/pi) #degrees\n",
"PHIz=arccos(Mz*C**-1)*(180/pi) #degrees\n",
"\n",
"#Result\n",
"print'The result of the force is',round(R,1),\"lb\"\n",
"print'The angles with respect to X-Axis,Y-Axis and Z-axis are:',round(thetax,1),\"degrees\",',',round(thetay,1),\"degrees\",'and',round(thetaz,1),\"degrees respectively.\"\n",
"print'The magnitude of resultant couple is',round(C),\"lb-ft\"\n",
"print'The angles are as follows: Cosphix=',round(PHIx,1),\"degrees\",',Cosphiy=',round(PHIy,1),\"degrees\",'and Cosphiz=',round(PHIz,1),\"degrees\"\n",
"\n",
"# The answers may wary due to decimal point descrepancy"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The result of the force is 50.6 lb\n",
"The angles with respect to X-Axis,Y-Axis and Z-axis are: 79.2 degrees , 49.6 degrees and 137.6 degrees respectively.\n",
"The magnitude of resultant couple is 166.0 lb-ft\n",
"The angles are as follows: Cosphix= 163.8 degrees ,Cosphiy= 77.6 degrees and Cosphiz= 79.8 degrees\n"
]
}
],
"prompt_number": 22
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.4-5, Page no 52"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"import numpy as np\n",
"\n",
"#Initilization of variables\n",
"F=np.array([150,90,160]) #lb force vector kind of decleration\n",
"# Co-ordinates defined as [x,y,z] all the co-ordinates are in feet\n",
"C_1=np.array([2,0,0]) \n",
"C_2=np.array([0,0,1])\n",
"C_3=np.array([0,-2,-1])\n",
"C_4=np.array([-1,0,-1])\n",
"\n",
"#Calculations\n",
"A=C_2-C_1\n",
"B=C_4-C_3\n",
"F1=(F[0]*A)/(A[0]**2+A[1]**2+A[2]**2)**0.5\n",
"F2=(F[1]*B)/(B[0]**2+B[1]**2+B[2]**2)**0.5\n",
"R=F1+F2\n",
"# Determine C1 & C2\n",
"# Calculating the cross products of C1 & C2 as,\n",
"C1=np.array([[C_1[1]*F1[2]-C_1[2]*F1[1]],[-(C_1[0]*F1[2]-C_1[2]*F1[0])],[C_1[0]*F1[1]-C_1[1]*F1[0]]]) # lb-ft\n",
"C2=np.array([[C_3[1]*F2[2]-C_3[2]*F2[1]],[-(C_3[0]*F2[2]-C_3[2]*F2[0])],[C_3[0]*F2[1]-C_3[1]*F2[0]]]) # lb-ft\n",
"C3=np.array([[0],[0],[160]]) # lb-ft\n",
"C=C1+C2+C3\n",
"\n",
"#Result\n",
"print'The resultant force couple is',round(C[0],1),\"i\",round(C[1],1),\"j +\",round(C[2],1),\"k lb-ft\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The resultant force couple is 80.5 i -93.9 j + 79.5 k lb-ft\n"
]
}
],
"prompt_number": 48
}
],
"metadata": {}
}
]
}
|