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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 1: Gravity"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1 pgno:10"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Time period of the pendulum is sec 1.00303620705\n"
]
}
],
"source": [
"#INPUT DATA\n",
"L=1;#Length of the bar in m\n",
"l=0.25;#Length of the pemdulum in m\n",
"from math import sqrt\n",
"#CALCULATIONS\n",
"k=sqrt((L**2)/12);#Radius of gyration m\n",
"T=sqrt(((k**2/l)+l)/9.8)*2*3.14;#Time period of pendulum in s\n",
"\n",
"#OUTPUT\n",
"print'Time period of the pendulum is sec',T\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 2 pgno:11"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The acceleration due to gravity is m s^-2 9.8002855276\n"
]
}
],
"source": [
"import math\n",
"#INPUT DATA\n",
"T=2.223;#Time taken for 1 oscillation in sec\n",
"L=1.228;#Length of the pendulum in m\n",
"\n",
"#CALCULATIONS\n",
"g=((4*3.14**2*L)/(T**2));#Acceleration due to gravity in m.s^-2\n",
"\n",
"#OUTPUT\n",
"print'The acceleration due to gravity is m s^-2',g\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3 pgno:12"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The time period of pendulum is s\n",
"Distance of another point from centre of gravity on bar with same time period is m 1.79428571429 0.2\n"
]
}
],
"source": [
"#INPUT DATA\n",
"l=1.2;#Length of of bar in m\n",
"from math import sqrt\n",
"#CALCULATIONS\n",
"k=sqrt(l**2/12);#Radius of gyration in m\n",
"T=sqrt(((k**2/(l/2))+(l/2))/9.8)*2*3.14;#Time period of the pendulum in s\n",
"L=((9.8*T**2)/(4*3.14**2));#Length in m\n",
"D=L-(l/2);#Another point where pendulum has same timeperiod in m\n",
"\n",
"#OUTPUT\n",
"print'The time period of pendulum is s\\nDistance of another point from centre of gravity on bar with same time period is m',T,D\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1 pgno:14"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The minimum time period is obtained at cm -28.9035753267\n"
]
}
],
"source": [
"\n",
"#INPUT DATA\n",
"L=1;#Length of pendulum in m\n",
"B=0.05;#Width of pendulum in m\n",
"from math import sqrt\n",
"#CALCULATIONS\n",
"k=sqrt((L**2+B**2)/12);#Radius of gyration in m\n",
"D=((L/2)-k)*100;#distance of point of minimum time period from one end in cm\n",
"\n",
"#OUTPUT\n",
"print'The minimum time period is obtained at cm',D\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.9"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|