summaryrefslogtreecommitdiff
path: root/sample_notebooks/AdityaAnand/Chapter_8_-_Gravitation_2.ipynb
blob: b60fb136b1e5f28b0932dc23030281484b17b182 (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
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
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "#  Chapter 8 : Gravitation"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "## Example 8.1 , page : 185"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " The planet will take a longer time to traverse BAC than CPB\n"
     ]
    }
   ],
   "source": [
    "# Importing module\n",
    "\n",
    "import math\n",
    "\n",
    "# Variable declaration\n",
    "\n",
    "mp=1                     # For convenience,mass is assumed to be unity \n",
    "rp=1                     # For convenience,sun-planet distance at perihelton is assumed to be unity \n",
    "vp=1                     # For convenience,speed of the planet at perihelton is assumed to be unity \n",
    "ra=1                     # For convenience,sun-planet distance at aphelton is assumed to be unity \n",
    "va=1                     # For convenience,speed of the planet at aphelton is assumed to be unity \n",
    "Lp=mp*rp*vp              # Angular momentum at perihelton\n",
    "La=mp*ra*va              # Angular momentum at ahelton\n",
    "\n",
    "# Result\n",
    "\n",
    "# From angular momentum conservation, mp*rp*vp = mp*ra*va or vp/va = rp/ra\n",
    "# From Kepler’s second law, equal areas are swept in equal times\n",
    "print(\" The planet will take a longer time to traverse BAC than CPB\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 8.2 , page : 187 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(a) The force acting = [0.0, 2.5849394142282115e-26, 0.0] ≈ 0\n",
      "(b) The force acting = 2 Gm²\n"
     ]
    }
   ],
   "source": [
    "# Importing module\n",
    "\n",
    "import math\n",
    "\n",
    "# Variable declaration\n",
    "\n",
    "G=6.67*pow(10,-11)       # Gravitational constant\n",
    "m=1                      # For convenience,mass is assumed to be unity \n",
    "x=30                     # The angle between GC and the positive x-axis is 30° and so is the angle between GB and the negative x-axis\n",
    "y=math.radians(x)        # The angle in radians\n",
    "a=math.cos(y)\n",
    "b=math.sin(y)\n",
    "v1=(0,1,0)\n",
    "v2=(-a,-b,0)\n",
    "v3=(a,-b,0)\n",
    "c=(2*G*pow(m,2))/1       # 2Gm²/1\n",
    "\n",
    "# Calculation\n",
    "\n",
    "#(a)\n",
    "F1=[y * c for y in v1]   # F(GA)\n",
    "F2=[y * c for y in v2]   # F(GB)\n",
    "F3=[y * c for y in v3]   # F(GC)\n",
    "# From the principle of superposition and the law of vector addition, the resultant gravitational force FR on (2m) is given by\n",
    "Fa=[sum(x) for x in zip(F1,F2,F3)]\n",
    "\n",
    "#(b)\n",
    "# By symmetry the x-component of the force cancels out and the y-component survives\n",
    "Fb=4-2                   # 4Gm² j - 2Gm² j\n",
    "\n",
    "# Result\n",
    "\n",
    "print(\"(a) The force acting =\",Fa,\"≈ 0\")\n",
    "print(\"(b) The force acting =\",Fb,\"Gm²\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 8.3 , page : 192 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Potential energy of a system of four particles = -5.414213562373095 Gm²/l\n",
      "The gravitational potential at the centre of the square = -5.65685424949238 Gm²/l\n"
     ]
    }
   ],
   "source": [
    "# Importing module\n",
    "\n",
    "import math\n",
    "\n",
    "# Variable declaration\n",
    "\n",
    "G=6.67*pow(10,-11)       # Gravitational constant\n",
    "m=1                      # For convenience,mass is assumed to be unity \n",
    "l=1                      # For convenience,side of the square is assumed to be unity \n",
    "c=(G*pow(m,2))/l\n",
    "n=4                      # Number of particles\n",
    "\n",
    "# Calculation\n",
    "\n",
    "d=math.sqrt(2)\n",
    "# If the side of a square is l then the diagonal distance is  √2l\n",
    "# We have four mass pairs at distance l and two diagonal pairs at distance √2l \n",
    "# Since the Potential Energy of a system of four particles is -4Gm²/l) - 2Gm²/dl\n",
    "w=(-n-(2/d))  \n",
    "# If the side of a square is l then the diagonal distance from the centre to corner is \n",
    "# Since the Gravitational Potential at the centre of the square\n",
    "u=-n*(2/d)\n",
    "\n",
    "# Result\n",
    "\n",
    "print (\"Potential energy of a system of four particles =\",w,\"Gm²/l\")\n",
    "print(\"The gravitational potential at the centre of the square =\",u,\"Gm²/l\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 8.4 , page : 193 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Minimum speed of the projectile to reach the surface of the second sphere = ( 0.6 GM/R ) ^(1/2)\n"
     ]
    }
   ],
   "source": [
    "# Importing module\n",
    "\n",
    "import math\n",
    "\n",
    "# Variable declaration\n",
    "\n",
    "R=1                      # For convenience,radii of both the spheres is assumed to be unity \n",
    "M=1                      # For convenience,mass is assumed to be unity \n",
    "m1=M                     # Mass of the first sphere\n",
    "m2=6*M                   # Mass of the second sphere\n",
    "m=1                      # Since the mass of the projectile is unknown,take it as unity\n",
    "d=6*R                    # Distance between the centres of both the spheres\n",
    "r=1                      # The distance from the centre of first sphere to the neutral point N\n",
    "\n",
    "G=6.67*pow(10,-11)       # Gravitational constant\n",
    "\n",
    "# Calculation\n",
    "\n",
    "# Since N is the neutral point; GMm/r² = 4GMm/(6R-r)²  and we get\n",
    "r=2*R\n",
    "# The mechanical energy at the surface of M is; Et = m(v^2)/2 - GMm/R - 4GMm/5R\n",
    "# The mechanical energy at N is; En = -GMm/2R - 4GMm/4R\n",
    "# From the principle of conservation of mechanical energy; Et = En and we get\n",
    "v_sqr=2*((4/5)-(1/2))\n",
    "\n",
    "# Result\n",
    "\n",
    "print(\"Minimum speed of the projectile to reach the surface of the second sphere =\",\"(\",round(v_sqr,5),\"GM/R\",\")\",\"^(1/2)\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 8.5 , page : 195 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(i)  Mass of Mars = 6.475139697520706e+23 kg\n",
      "(ii) Period of revolution of Mars = 684.0033777694376 days\n"
     ]
    }
   ],
   "source": [
    "# Importing module\n",
    "\n",
    "import math\n",
    "\n",
    "# Variable declaration\n",
    "\n",
    "π=3.14                   # Constant pi\n",
    "G=6.67*pow(10,-11)       # Gravitational constant\n",
    "R=9.4*pow(10,3)          # Orbital radius of Mars in km\n",
    "T=459*60\n",
    "Te=365                   # Period of revolution of Earth\n",
    "r=1.52                   # Ratio of  Rms/Res, where Rms is the mars-sun distance and Res is the earth-sun distance. \n",
    "\n",
    "# Calculation\n",
    "\n",
    "# (i) \n",
    "R=R*pow(10,3)\n",
    "# Using Kepler's 3rd law:T²=4π²(R^3)/GMm\n",
    "Mm=(4*pow(π,2)*pow(R,3))/(G*pow(T,2))\n",
    "\n",
    "# (ii)\n",
    "# Using Kepler's 3rd law: Tm²/Te² = (Rms^3/Res^3)\n",
    "Tm=pow(r,(3/2))*365\n",
    "\n",
    "\n",
    "# Result\n",
    "\n",
    "print(\"(i)  Mass of Mars =\",Mm,\"kg\")\n",
    "print(\"(ii) Period of revolution of Mars =\",Tm,\"days\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 8.6 , page : 195 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Mass of the Earth = 5.967906881559221e+24 kg\n",
      "Mass of the Earth = 6.017752855396305e+24 kg\n"
     ]
    }
   ],
   "source": [
    "# Importing module\n",
    "\n",
    "import math\n",
    "\n",
    "# Variable declaration\n",
    "\n",
    "g=9.81                   # Acceleration due to gravity\n",
    "G=6.67*pow(10,-11)       # Gravitational constant\n",
    "Re=6.37*pow(10,6)        # Radius of Earth in m\n",
    "R=3.84*pow(10,8)         # Distance of Moon from Earth in m\n",
    "T=27.3                   # Period of revolution of Moon in days\n",
    "π=3.14                   # Constant pi\n",
    "\n",
    "# Calculation\n",
    "\n",
    "# I Method\n",
    "# Using Newton's 2nd law of motion:g = F/m = GMe/Re²\n",
    "Me1=(g*pow(Re,2))/G\n",
    "\n",
    "# II Method\n",
    "# Using Kepler's 3rd law: T²= 4π²(R^3)/GMe\n",
    "T1=T*24*60*60\n",
    "Me2=(4*pow(π,2)*pow(R,3))/(G*pow(T1,2))\n",
    "\n",
    "#Result\n",
    "\n",
    "print(\"Mass of the Earth =\",Me1,\"kg\")\n",
    "print(\"Mass of the Earth =\",Me2,\"kg\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 8.7 , page : 195 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Period of revolution of Moon = 27.5 days\n"
     ]
    }
   ],
   "source": [
    "# Importing module\n",
    "\n",
    "import math\n",
    "\n",
    "# Variable declaration\n",
    "\n",
    "k=pow(10,-13)           # A constant = 4π² / GME\n",
    "Re=3.84*pow(10,5)       # Distance of the Moon from the Earth in m\n",
    "\n",
    "# Calculation\n",
    "\n",
    "k=pow(10,-13)*(pow(1/(24*60*60),2))*(1/pow((1/1000),3))\n",
    "T2=k*pow(Re,3)\n",
    "T=math.sqrt(T2)         # Period of revolution of Moon in days\n",
    "\n",
    "# Result\n",
    "\n",
    "print(\"Period of revolution of Moon =\",round(T,1),\"days\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 8.8 , page : 196  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Change in Kinetic Energy = 3124485000.0 J\n",
      "Change in Potential Energy = 6248970000.0 J\n"
     ]
    }
   ],
   "source": [
    "# Importing module\n",
    "\n",
    "import math\n",
    "\n",
    "# Variable declaration\n",
    "\n",
    "m=400                   # Mass of satellite in kg\n",
    "Re=6.37*pow(10,6)       # Radius of Earth in m\n",
    "g=9.81                  # Acceleration due to gravity\n",
    "\n",
    "# Calculation\n",
    "\n",
    "# Change in energy is E=Ef-Ei\n",
    "ΔE=(g*m*Re)/8           # Change in Total energy\n",
    "# Since Potential Energy is twice as the change in Total Energy (V = Vf - Vi)\n",
    "ΔV=2*ΔE                 # Change in Potential Energy in J\n",
    "\n",
    "# Result\n",
    "\n",
    "print(\"Change in Kinetic Energy =\",round(ΔE,4),\"J\")\n",
    "print(\"Change in Potential Energy =\",round(ΔV,4),\"J\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.4.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}