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
|
{
"metadata": {
"name": "chapter 1.ipynb"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 1:Vectors"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.1-1,Page no 8"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Initialisation of Variables\n",
"f1=120 #lb\n",
"f2=100 #lb\n",
"theta=((60*pi)/180) #radians\n",
"#Calculations\n",
"R=sqrt(120**2+100**2-(2*120*100*cos(theta))) #Applying Thr rule of Cosines\n",
"alpha1=(((arcsin(120*sin(theta)/111))*180)/pi) #Applying the Law of Sines\n",
"alpha=alpha1+270 #As the vector lies in the fourth Quadrant by obsrevaton\n",
"#Results\n",
"print'The Resultant of The force system is equal to',round(R,3),\"lb\" #lb\n",
"print'The Resultant is at',round(alpha,3),\"degrees\" #degrees\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Resultant of The force system is equal to 111.355 lb\n",
"The Resultant is at 339.43 degrees\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 1.2-2,Page no 9"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#Initilization of variables\n",
"P=100 #lb\n",
"Q=120 #lb\n",
"theta=((30*pi)/180) #radians\n",
"#Calculations\n",
"R_x=Q*cos(theta) #lb\n",
"R_y=Q*sin(theta)-P #lb\n",
"R=sqrt(R_x**2+R_y**2) #lb Triangle law\n",
"Theta_1=((arctan(R_y/R_x))*180)/pi #degrees\n",
"Theta_R=360+Theta_1 #degrees\n",
"#Result\n",
"print'The resultant of the force system is',round(R,3),\"lb\"\n",
"print'The resultant is at',round(Theta_R,3),\"degrees\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The resultant of the force system is 111.355 lb\n",
"The resultant is at 338.948 degrees\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
|