summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_S._Mani_Naidu/Chapter4_1.ipynb
blob: aba467a3a31e64804a15876865f78c975906aa2b (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
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#4: Principles of quantum mechanics"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.1, Page number 4.30"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "wavelength is 0.0275 nm\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "e=1.6*10**-19;  \n",
    "m=9.1*10**-31;    #mass(kg)\n",
    "h=6.63*10**-34;    #planck's constant\n",
    "E=2000;     #energy(eV)\n",
    "\n",
    "#Calculation\n",
    "lamda=h/math.sqrt(2*m*E*e);     #wavelength(m)\n",
    "\n",
    "#Result\n",
    "print \"wavelength is\",round(lamda*10**9,4),\"nm\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.2, Page number 4.30"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "velocity is 438.6 *10**4 m/s\n",
      "answer varies due to rounding off errors\n",
      "kinetic energy is 54.71 eV\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "e=1.6*10**-19;  \n",
    "m=9.1*10**-31;    #mass(kg)\n",
    "h=6.626*10**-34;    #planck's constant\n",
    "lamda=1.66*10**-10;    #wavelength(m)\n",
    "\n",
    "#Calculation\n",
    "v=h/(m*lamda);     #velocity(m/s)\n",
    "E=h**2/(2*m*e*lamda**2);    #kinetic energy(eV)\n",
    "\n",
    "#Result\n",
    "print \"velocity is\",round(v/10**4,1),\"*10**4 m/s\"\n",
    "print \"answer varies due to rounding off errors\"\n",
    "print \"kinetic energy is\",round(E,2),\"eV\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.3, Page number 4.31"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "energy value in ground state is 37.7377 eV\n",
      "energy value in 1st state is 150.95 eV\n",
      "energy value in 2nd state is 339.6395 eV\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "n=1;\n",
    "e=1.6*10**-19;  \n",
    "m=9.1*10**-31;    #mass(kg)\n",
    "h=6.63*10**-34;    #planck's constant\n",
    "L=1*10**-10;       #width(m)\n",
    "\n",
    "#Calculation\n",
    "E1=n**2*h**2/(8*m*e*L**2);      #energy value in ground state(eV)\n",
    "E2=4*E1;      #energy value in 1st state(eV)\n",
    "E3=9*E1;      #energy value in 2nd state(eV)\n",
    "\n",
    "#Result\n",
    "print \"energy value in ground state is\",round(E1,4),\"eV\"\n",
    "print \"energy value in 1st state is\",round(E2,2),\"eV\"\n",
    "print \"energy value in 2nd state is\",round(E3,4),\"eV\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.4, Page number 4.31"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "minimum energy is 2.3586 eV\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "n=1;\n",
    "e=1.6*10**-19;  \n",
    "m=9.1*10**-31;    #mass(kg)\n",
    "h=6.63*10**-34;    #planck's constant\n",
    "L=4*10**-10;       #width(m)\n",
    "\n",
    "#Calculation\n",
    "E1=n**2*h**2/(8*m*e*L**2);      #energy value in ground state(eV)\n",
    "\n",
    "#Result\n",
    "print \"minimum energy is\",round(E1,4),\"eV\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.5, Page number 4.32"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "wavelength is 0.01 nm\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "V=15*10**3;    #voltage(V)\n",
    "\n",
    "#Calculation\n",
    "lamda=1.227/math.sqrt(V);     #wavelength(nm)\n",
    "\n",
    "#Result\n",
    "print \"wavelength is\",round(lamda,2),\"nm\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.6, Page number 4.32"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "minimum energy is 150.95 eV\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "n=1;\n",
    "e=1.6*10**-19;  \n",
    "m=9.1*10**-31;    #mass(kg)\n",
    "h=6.63*10**-34;    #planck's constant\n",
    "L=0.05*10**-9;       #width(m)\n",
    "\n",
    "#Calculation\n",
    "E1=n**2*h**2/(8*m*e*L**2);      #energy value in ground state(eV)\n",
    "\n",
    "#Result\n",
    "print \"minimum energy is\",round(E1,2),\"eV\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.8, Page number 4.32"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "minimum energy is 4.2 eV\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "n=1;\n",
    "e=1.6*10**-19;  \n",
    "m=9.1*10**-31;    #mass(kg)\n",
    "h=6.63*10**-34;    #planck's constant\n",
    "L=3*10**-10;       #width(m)\n",
    "\n",
    "#Calculation\n",
    "E1=n**2*h**2/(8*m*e*L**2);      #energy value in ground state(eV)\n",
    "\n",
    "#Result\n",
    "print \"minimum energy is\",round(E1,1),\"eV\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.9, Page number 4.33"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "de broglie wavelength is 8488 nm\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "me=1.676*10**-27;    #mass(kg)  \n",
    "mn=9.1*10**-31;    #mass(kg)\n",
    "h=6.63*10**-34;    #planck's constant\n",
    "\n",
    "#Calculation\n",
    "lamda_n=h/math.sqrt(4*mn*me);      #de broglie wavelength(m)\n",
    "\n",
    "#Result\n",
    "print \"de broglie wavelength is\",int(lamda_n*10**9),\"nm\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.10, Page number 4.33"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "energy value in 2nd quantum state is 37.738 eV\n",
      "energy value in 4th quantum state is 150.95 eV\n",
      "answer varies due to rounding off errors\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "n=1;\n",
    "e=1.6*10**-19;  \n",
    "m=9.1*10**-31;    #mass(kg)\n",
    "h=6.63*10**-34;    #planck's constant\n",
    "L=2*10**-10;       #width(m)\n",
    "\n",
    "#Calculation\n",
    "E1=n**2*h**2/(8*m*e*L**2);      #energy value in ground state(eV)\n",
    "E2=2**2*E1;      #energy value in 2nd quantum state(eV)\n",
    "E4=4**2*E1;      #energy value in 2nd quantum state(eV)\n",
    "\n",
    "#Result\n",
    "print \"energy value in 2nd quantum state is\",round(E2,3),\"eV\"\n",
    "print \"energy value in 4th quantum state is\",round(E4,2),\"eV\"\n",
    "print \"answer varies due to rounding off errors\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.11, Page number 4.34"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "interplanar spacing is 0.382 angstrom\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "e=1.6*10**-19;  \n",
    "m=9.1*10**-31;    #mass(kg)\n",
    "h=6.63*10**-34;    #planck's constant\n",
    "V=344;          #potemtial(V)\n",
    "n=1;\n",
    "theta=60;     #angle(degrees)\n",
    "\n",
    "#Calculation\n",
    "theta=theta*math.pi/180;      #angle(radian)\n",
    "d=n*h/(2*math.sin(theta)*math.sqrt(2*m*V*e));     #interplanar spacing(m)\n",
    "\n",
    "#Result\n",
    "print \"interplanar spacing is\",round(d*10**10,3),\"angstrom\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.12, Page number 4.34"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "energy required to pump an electron is 301.57 eV\n",
      "answer varies due to rounding off errors\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "n=1;\n",
    "e=1.6*10**-19;  \n",
    "m=9.11*10**-31;    #mass(kg)\n",
    "h=6.63*10**-34;    #planck's constant\n",
    "L=1*10**-10;       #width(m)\n",
    "\n",
    "#Calculation\n",
    "E1=n**2*h**2/(8*m*e*L**2);      #energy value in ground state(eV)\n",
    "E3=3**2*E1;      #energy value in 2nd quantum state(eV)\n",
    "E=E3-E1;       #energy required to pump an electron(eV)\n",
    "\n",
    "#Result\n",
    "print \"energy required to pump an electron is\",round(E,2),\"eV\"\n",
    "print \"answer varies due to rounding off errors\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.13, Page number 4.34"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "minimum energy is 9.424 eV\n",
      "answer varies due to rounding off errors\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "n=1;\n",
    "e=1.6*10**-19;  \n",
    "m=9.11*10**-31;    #mass(kg)\n",
    "h=6.63*10**-34;    #planck's constant\n",
    "L=2*10**-10;       #width(m)\n",
    "\n",
    "#Calculation\n",
    "E1=n**2*h**2/(8*m*e*L**2);      #energy value in ground state(eV)\n",
    "\n",
    "#Result\n",
    "print \"minimum energy is\",round(E1,3),\"eV\"\n",
    "print \"answer varies due to rounding off errors\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.14, Page number 4.35"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "wavelength is 0.31 angstrom\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "V=1600;    #voltage(V)\n",
    "\n",
    "#Calculation\n",
    "lamda=1.227/math.sqrt(V);     #wavelength(nm)\n",
    "\n",
    "#Result\n",
    "print \"wavelength is\",round(lamda*10,2),\"angstrom\""
   ]
  }
 ],
 "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
}