summaryrefslogtreecommitdiff
path: root/Solid_State_Physics_Principles_And_Applications_by_R._Asokamani/chapter4.ipynb
blob: 0b46d733d46963ef0e0ea3a73163d96512db7a28 (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
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
{
 "metadata": {
  "name": "",
  "signature": "sha256:6f64ae81ab14bf773565224cb22f224628ca2a0e167e3fe9ede8614fd4e3f3d5"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 4: Free Electron Theory of Metals"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.1,Page number 112"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "m = 9.1*10**-31;   # Mass of an electron, kg\n",
      "e = 1.6*10**-19;   # Charge on an electron, C\n",
      "n = 8.5*10**28;   # Concentration of electron in Cu, per metre cube\n",
      "rho = 1.7*10**-8;  # Resistivity of Cu, ohm-m\n",
      "t = m/(n*e**2*rho);  # Collision time for an electron in monovalent Cu, s\n",
      "print\"The collision time for an electron in monovalent Cu =\",\"{0:.3e}\".format(t),\"s\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The collision time for an electron in monovalent Cu = 2.460e-14 s\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.2,Page number 112"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "m = 9.1*10**-31;   # Mass of an electron, kg\n",
      "e = 1.6*10**-19;   # Charge on an electron, C\n",
      "n = 10**29;   # Concentration of electron in material, per metre cube\n",
      "rho = 27*10**-8;  # Resistivity of the material, ohm-m\n",
      "tau = m/(n*e**2*rho);  # Collision time for an electron in the material, s\n",
      "v_F = 1*10**8;    # Velocity of free electron, cm/s\n",
      "lamda = v_F*tau;   # Mean free path of electron in the material, cm\n",
      "print\"The collision time for an electron in monovalent Cu =\",\"{0:.3e}\".format(tau),\"s\";\n",
      "print\"The mean free path of electron at 0K =\",\"{0:.3e}\".format(lamda),\"cm\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The collision time for an electron in monovalent Cu = 1.317e-15 s\n",
        "The mean free path of electron at 0K = 1.317e-07 cm\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.3,Page number 112"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "m = 9.1*10**-31;   # Mass of an electron, kg\n",
      "e = 1.6*10**-19;   # Charge on an electron, C\n",
      "r = 1.28*10**-10;  # Atomic radius of cupper, m\n",
      "a = 4*r/sqrt(2);    # Lattice parameter of fcc structure of Cu, m\n",
      "V = a**3;    # Volume of unit cell of Cu, metre cube\n",
      "n = 4/V;    # Number of atoms per unit volume of Cu, per metre cube\n",
      "tau = 2.7*10**-4;  # Relaxation time for an electron in monovalent Cu, s\n",
      "sigma = n*e**2*tau/m;    # Electrical conductivity of Cu, mho per cm\n",
      "print\"The free electron density in monovalent Cu =\",\"{0:.3e}\".format(n),\"per metre cube\";\n",
      "print\"The electrical conductivity of monovalent Cu =\",\"{0:.3e}\".format(sigma),\"mho per cm\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The free electron density in monovalent Cu = 8.429e+28 per metre cube\n",
        "The electrical conductivity of monovalent Cu = 6.403e+17 mho per cm\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.4,Page number 118"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "m = 9.1*10**-31;   # Mass of an electron, kg\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "h = 6.625*10**-34;     # Planck's constant, Js\n",
      "L = 10*10**-3;     # Length of side of the cube, m\n",
      "# For nth level\n",
      "nx = 1; ny = 1; nz = 1;     # Positive integers along three axis\n",
      "En = h**2/(8*m*L**2)*(nx**2+ny**2+nz**2)/e;      # Energy of nth level for electrons, eV\n",
      "# For (n+1)th level\n",
      "nx = 2; ny = 1; nz = 1;     # Positive integers along three axis\n",
      "En_plus_1 = h**2/(8*m*L**2)*(nx**2+ny**2+nz**2)/e;      # Energy of (n+1)th level for electrons, eV\n",
      "delta_E = En_plus_1 - En;       # Energy difference between two levels for the free electrons\n",
      "print\"The energy difference between two levels for the free electrons =\",\"{0:.3e}\".format( delta_E),\"eV\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The energy difference between two levels for the free electrons = 1.130e-14 eV\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.5,Page number 119"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "T = 300.0;    # Room temperature of tungsten, K\n",
      "k = 1.38*10**-23;  # Boltzmann constant, J/mol/K\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "E_F = 4.5*e;    # Fermi energy of tungsten, J\n",
      "E = E_F-0.1*E_F; # 10% energy below Fermi energy, J\n",
      "f_T = 1.0/(1+exp((E-E_F)/(k*T)));     # Probability of the electron in tungsten at room temperature at an nergy 10% below the Fermi energy\n",
      "print\"The probability of the electron at an energy 10 percent below the Fermi energy in tungsten at 300 K =\",round(f_T,3);\n",
      "E = 2*k*T+E_F; # For energy equal to 2kT + E_F\n",
      "f_T = 1.0/(1+exp((E-E_F)/(k*T)));     # Probability of the electron in tungsten at an energy 2kT above the Fermi energy\n",
      "print\"The probability of the electron at an energy 2kT above the Fermi energy =\",round(f_T,4);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The probability of the electron at an energy 10 percent below the Fermi energy in tungsten at 300 K = 1.0\n",
        "The probability of the electron at an energy 2kT above the Fermi energy = 0.1192\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.6,Page number 121"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "h = 6.625*10**-34; # Planck's constant, Js\n",
      "h_cross = h/(2*pi);    # Reduced Planck's constant, Js\n",
      "m = 9.1*10**-31;   # Mass of an electron, kg\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "a = 5.34*10**-10;      # Lattice constant of monovalent bcc lattice, m\n",
      "V = a**3;    # Volume of bcc unit cell, metre cube\n",
      "n = 2.0/V;    # Number of atoms per metre cube\n",
      "E_F = h_cross**2.0/(2*m*e)*(3*pi**2*n)**(2.0/3);    # Fermi energy of monovalent bcc solid, eV\n",
      "\n",
      "print\"The Fermi energy of a monovalent bcc solid =\",round(E_F,4),\"eV\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Fermi energy of a monovalent bcc solid = 2.0341 eV\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.7,Page number 121"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "h = 6.625*10**-34; # Planck's constant, Js\n",
      "h_cross = h/(2*pi);    # Reduced Planck's constant, Js\n",
      "m = 9.11*10**-31;   # Mass of an electron, kg\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "V = 1*10**-5;    # Volume of cubical box, metre cube\n",
      "E_F = 5*e;  # Fermi energy, J \n",
      "D_EF = V/(2*pi**2)*(2*m/h_cross**2)**(3.0/2)*E_F**(1.0/2)*e;     # Density of states at Fermi energy, states/eV\n",
      "print\"The density of states at Fermi energy =\",\"{0:.3e}\".format( D_EF),\"states/eV\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The density of states at Fermi energy = 1.521e+23 states/eV\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.8,Page number 121"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "h = 6.626*10**-34; # Planck's constant, Js\n",
      "h_cross = h/(2*pi);    # Reduced Planck's constant, Js\n",
      "m = 9.1*10**-31;   # Mass of an electron, kg\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "V = 1*10**-6;    # Volume of cubical box, metre cube\n",
      "E_F = 7.13*e;  # Fermi energy for Mg, J \n",
      "D_EF = V/(2*pi**2)*(2*m/h_cross**2)**(3.0/2)*E_F**(1.0/2);     # Density of states at Fermi energy for Cs, states/eV\n",
      "E_Mg = 1.0/D_EF;  # The energy separation between adjacent energy levels of Mg, J\n",
      "print\"The energy separation between adjacent energy levels of Mg =\",\"{0:.3e}\".format(E_Mg/e),\"eV\";\n",
      "E_F = 1.58*e;  # Fermi energy for Cs, J \n",
      "D_EF = V/(2*pi**2)*(2*m/h_cross**2)**(3.0/2)*E_F**(1.0/2);     # Density of states at Fermi energy for Mg, states/eV\n",
      "E_Mg = 1.0/D_EF;  # The energy separation between adjacent energy levels of Cs, J\n",
      "print\"The energy separation between adjacent energy levels of Cs =\",\"{0:.3e}\".format(E_Mg/e),\"eV\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The energy separation between adjacent energy levels of Mg = 5.517e-23 eV\n",
        "The energy separation between adjacent energy levels of Cs = 1.172e-22 eV\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.9,Page number 122"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "m = 9.1*10**-31;   # Mass of an electron, kg\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "E_F = 3.2*e;    # Fermi energy of sodium, J\n",
      "P_F = sqrt(E_F*2*m);    # Fermi momentum of sodium, kg-m/s\n",
      "print\"The Fermi momentum of sodium =\",\"{0:.3e}\".format(P_F),\"kg-m/sec\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Fermi momentum of sodium = 9.653e-25 kg-m/sec\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.10,Page number 122"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "k = 1.38*10**-23;  # Boltzmann constant, J/mol/K\n",
      "T = 500.0;    # Rise in temperature of Al, K\n",
      "EF_0 = 11.63;    # Fermi energy of Al, eV\n",
      "EF_T = EF_0*(1-pi**2.0/12*(k*T/EF_0)**2);  # Change in Fermi energy of Al with temperature, eV\n",
      "print\"The change in Fermi energy of Al with tempertaure rise of 500 degree celsius =\",round(EF_T,3),\"eV\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The change in Fermi energy of Al with tempertaure rise of 500 degree celsius = 11.63 eV\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.11,Page number 122"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "m = 9.18*10**-31;   # Mass of an electron, kg\n",
      "e = 1.6*10**-19;   # Charge on an electron, C\n",
      "lamda = 1.0*10**-9;   # Mean free path of electron in metal, m\n",
      "v = 1.11*10**5;    # Average velocity of the electron in metal, m/s\n",
      "\n",
      "# For Lead\n",
      "n = 13.2*10**28;  # Electronic concentration of Pb, per metre cube\n",
      "sigma = n*e**2*lamda/(m*v);     # Electrical conductivity of lead, mho per metre\n",
      "print\"The electrical conductivity of lead =\",\"{0:.3e}\".format(sigma),\"mho per metre\";\n",
      "\n",
      "# For Silver\n",
      "n = 5.85*10**28;  # Electronic concentration of Ag, per metre cube\n",
      "sigma = n*e**2*lamda/(m*v);     # Electrical conductivity of Ag, mho per metre\n",
      "print\"The electrical conductivity of silver =\",\"{0:.3e}\".format(sigma),\"mho per metre\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The electrical conductivity of lead = 3.316e+07 mho per metre\n",
        "The electrical conductivity of silver = 1.470e+07 mho per metre\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.12,Page number 125"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "k = 1.38*10**-23;  # Boltzmann constant, J/mol/K\n",
      "e = 1.6*10**-19;   # Charge on an electron, C\n",
      "L = pi**2.0/3*(k/e)**2;    # Lorentz number, watt-ohm/degree-square\n",
      "print\"The Lorentz number =\",\"{0:.3e}\".format(L),\"watt-ohm/degree-square\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Lorentz number = 2.447e-08 watt-ohm/degree-square\n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.13,Page number 125"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "A =[[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]];      # Declare a 4X4 cell\n",
      "A[0][0] = 'Mg';  \n",
      "A[0][1] = 2.54*10**-5;  \n",
      "A[0][2] = 1.5;  \n",
      "A[0][3] = 2.32*10**2;  \n",
      "A[1][0] = 'Cu';  \n",
      "A[1][1] = 6.45*10**-5;  \n",
      "A[1][2] = 3.85;  \n",
      "A[1][3] = 2.30*10**2;  \n",
      "A[2][0] = 'Al';  \n",
      "A[2][1] = 4.0*10**-5;  \n",
      "A[2][2] = 2.38;\n",
      "A[2][3] = 2.57*10**2;  \n",
      "A[3][0] = 'Pt';  \n",
      "A[3][1] = 1.02*10**-5;  \n",
      "A[3][2] = 0.69;\n",
      "A[3][3] = 2.56*10**2;  \n",
      "T1 = 273;   # First temperature, K\n",
      "T2 = 373;   # Second temperature, K\n",
      "print\"_________________________________________________________________\";\n",
      "print\"Metal     sigma x 10**-05   K(W/cm-K)   Lorentz number             \";\n",
      "print\"          (mho per cm)                (watt-ohm/deg-square)x10**-2\";\n",
      "print\"_________________________________________________________________\";\n",
      "for i in range (0,4) :\n",
      "    L1 = A[i][2]/(A[i][1]*T1); \n",
      "    L2 = A[i][3];\n",
      "    print\"\",A[i][0],\"        \",A[i][1]/10**-5,\"         \",A[i][2],\"      \",L2/10**2,\"         \",L2/10**2;\n",
      "print\"_________________________________________________________________\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "_________________________________________________________________\n",
        "Metal     sigma x 10**-05   K(W/cm-K)   Lorentz number             \n",
        "          (mho per cm)                (watt-ohm/deg-square)x10**-2\n",
        "_________________________________________________________________\n",
        " Mg          2.54           1.5        2.32           2.32\n",
        " Cu          6.45           3.85        2.3           2.3\n",
        " Al          4.0           2.38        2.57           2.57\n",
        " Pt          1.02           0.69        2.56           2.56\n",
        "_________________________________________________________________\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.14,Page number 125"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "A = [[1,2],[3,4]];      # Declare a 2X3 cell\n",
      "A[0][0] = 1.6*10**8;  # Electrcal conductivity of Au at 100 K, mho per metre\n",
      "A[0][1] = 2.0*10**-8;   # Lorentz number of Au at 100 K, volt/K-square\n",
      "A[1][0] = 5.0*10**8;  # Electrcal conductivity of Au at 273  K, mho per metre\n",
      "A[1][1] = 2.4*10**-8;   # Lorentz number of Au at 273 K, volt/K-square\n",
      "T1 = 100;       # First temperature, K\n",
      "T2 = 273;       # Second temperature, K\n",
      "\n",
      "print\"___________________________________________________________________________\";\n",
      "print\"          T = 100 K                               T = 273 K                \";\n",
      "print\"_________________________________       ___________________________________\";\n",
      "print\"Electrical conductivity)  L              Electrical conductivity)  L       \";\n",
      "print\"    mho per metre       V/K-square           mho per metre       V/K-square\";\n",
      "print\"___________________________________________________________________________\";\n",
      "K1 = A[0][0]*T1*A[0][1]; \n",
      "K2 = A[1][0]*T2*A[1][1];\n",
      "print\"{0:.3e}\".format(A[0][0]),\"            \",\"{0:.3e}\".format(A[0][1]),\"         \",\"{0:.3e}\".format(A[1][0]),\"           \",\"{0:.3e}\".format(A[1][1]) \n",
      "print\"K =\",K1,\"W/cm-K                           K =\",K2,\"W/cm-K\";\n",
      "print\"___________________________________________________________________________\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "___________________________________________________________________________\n",
        "          T = 100 K                               T = 273 K                \n",
        "_________________________________       ___________________________________\n",
        "Electrical conductivity)  L              Electrical conductivity)  L       \n",
        "    mho per metre       V/K-square           mho per metre       V/K-square\n",
        "___________________________________________________________________________\n",
        "1.600e+08              2.000e-08           5.000e+08             2.400e-08\n",
        "K = 320.0 W/cm-K                           K = 3276.0 W/cm-K\n",
        "___________________________________________________________________________\n"
       ]
      }
     ],
     "prompt_number": 29
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.15,Page number 131"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "e = 1.6*10**-19;   # Electronic charge, C\n",
      "a = 0.428*10**-9;  # Lattice constant of Na, m\n",
      "V = a**3;    # Volume of unit cell, metre cube\n",
      "N = 2;  # No. of atoms per unit cell of Na\n",
      "n = N/V;    # No. of electrons per metre cube, per metre cube\n",
      "R_H = -1.0/(n*e);  # Hall coeffcient of Na, metre cube per coulomb\n",
      "print\"The Hall coefficient of sodium =\",\"{0:.3e}\".format(R_H),\"metre cube per coulomb\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Hall coefficient of sodium = -2.450e-10 metre cube per coulomb\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.16,Page number 131"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "e = 1.6*10**-19;   # Electronic charge, C\n",
      "n = 24.2*10**28;    # No. of electrons per metre cube, per metre cube\n",
      "R_H = -1.0/(n*e);  # Hall coeffcient of Be, metre cube per coulomb\n",
      "print\"The Hall coefficient of beryllium =\",\"{0:.3e}\".format(R_H),\"metre cube per coulomb\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Hall coefficient of beryllium = -2.583e-11 metre cube per coulomb\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.17,Page number 131"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "e = 1.6*10**-19;   # Electronic charge, C\n",
      "R_H = -8.4*10**-11;  # Hall coeffcient of Ag, metre cube per coulomb\n",
      "n = -3*pi/(8*R_H*e);    # Electronic concentration of Ag, per metre cube\n",
      "print\"The electronic concentration of Ag =\",\"{0:.3e}\".format(n),\"per metre cube\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The electronic concentration of Ag = 8.766e+28 per metre cube\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.18,Page number 134"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "# We have from Mattheissen rule, rho = rho_0 + alpha*T1\n",
      "T1 = 300.0;   # Initial temperature, K\n",
      "T2 = 1000.0;  # Final temperature, K\n",
      "rho = 1*10**-6;    # Resistivity of the metal, ohm-m\n",
      "delta_rho = 0.07*rho;      # Increase in resistivity of metal, ohm-m\n",
      "alpha = delta_rho/(T2-T1);  # A constant, ohm-m/K\n",
      "rho_0 = rho - alpha*T1;     # Resistivity at room temperature, ohm-m\n",
      "print\"The resistivity at room temperature =\",\"{0:.3e}\".format(rho),\"ohm-m\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The resistivity at room temperature = 1.000e-06 ohm-m\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.19,Page number 134"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "# We have from Mattheissen rule, rho = rho_0 + alpha*T1\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "k = 1.38*10**-23;  # Boltzmann constant, J/mol/K\n",
      "rho_40 = 0.2;   # Resistivity of Ge at 40 degree celsius, ohm-m\n",
      "E_g = 0.7;  # Bandgap for Ge, eV\n",
      "T1 = 20+273;    # Second temperature, K\n",
      "T2 = 40 + 273;  # First temperature, K\n",
      "rho_20 = rho_40*exp(E_g*e/(2*k)*(1.0/T1-1.0/T2));    # Resistivity of Ge at 20 degree celsius, ohm-m\n",
      "print\"The resistivity of Ge at 20 degree celsius =\",round(rho_20,1),\"ohm-m\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The resistivity of Ge at 20 degree celsius = 0.5 ohm-m\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.20,Page number 135"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "rs_a0_ratio = 3.25;     # Ratio of solid radius to the lattice parameter\n",
      "E_F = 50.1*(rs_a0_ratio)**(-2);  # Fermi level energy of Li, eV\n",
      "T_F = 58.2e+04*(rs_a0_ratio)**(-2);  # Fermi level temperature of Li, K\n",
      "V_F = 4.20e+08*(rs_a0_ratio)**(-1);  # Fermi level velocity of electron in Li, cm/sec\n",
      "K_F = 3.63e+08*(rs_a0_ratio)**(-1);   \n",
      "print\"E_F =\",round(E_F,2),\"eV\";\n",
      "print\"T_F =\",\"{0:.3e}\".format(T_F),\"K\";\n",
      "print\"V_F =\",\"{0:.3e}\".format(V_F),\"cm/sec\";\n",
      "print\"K_F =\",\"{0:.3e}\".format(K_F),\"per cm\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "E_F = 4.74 eV\n",
        "T_F = 5.510e+04 K\n",
        "V_F = 1.292e+08 cm/sec\n",
        "K_F = 1.117e+08 per cm\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.21,Page number 135"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "n = 6.04*10**22;  # Concentration of electrons in yittrium, per metre cube\n",
      "r_s = (3/(4*pi*n))**(1.0/3)/10**-8;    # Radius of the solid, angstrom\n",
      "a0 = 0.529; # Lattice parameter of yittrium, angstrom\n",
      "rs_a0_ratio = r_s/a0;   # Solid radius to lattice parameter ratio\n",
      "E_F = 50.1*(rs_a0_ratio)**(-2);  # Fermi level energy of Y, eV\n",
      "print\"The Fermi energy of yittrium =\",round(E_F,4),\"eV\";\n",
      "Ryd = 13.6;     # Rydberg energy constant, eV\n",
      "E_bs = 0.396*Ryd;   # Band structure energy value of Y, eV\n",
      "print\"The band structure value of E_F =\",round(E_bs,3),\"eV is in close agreement with the calculated value of\",round(E_F,4),\"eV\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Fermi energy of yittrium = 5.6083 eV\n",
        "The band structure value of E_F = 5.386 eV is in close agreement with the calculated value of 5.6083 eV\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.22,Page number 137"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "rs_a0_ratio = 2.07;   # Solid radius to lattice parameter ratio for Al\n",
      "E_F = 50.1*(rs_a0_ratio)**(-2);  # Fermi level energy of Y, eV\n",
      "# According to Jellium model, h_cross*omega_P = E = 47.1 eV *(rs_a0_ratio)**(-3/2)\n",
      "E = 47.1*(rs_a0_ratio)**(-3.0/2);      # Plasmon energy of Al, eV\n",
      "print\"The plasmon energy of Al =\",round(E,4),\"eV\";\n",
      "print\"The experimental value is 15 eV\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The plasmon energy of Al = 15.8149 eV\n",
        "The experimental value is 15 eV\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.1a,Page number 137"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "E_F = 1;    # For simplicity assume Fermi energy to be unity, eV\n",
      "k = 1.38*10**-23;      # Boltzmann constant, J/mol/K\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "dE = 0.1;        # Exces energy above Fermi level, eV\n",
      "T = 300;        # Room temperature, K\n",
      "E = E_F + dE;    # Energy of the level above Fermi level, eV\n",
      "f_E = 1.0/(exp((E-E_F)*e/(k*T))+1);    # Occupation probability of the electron at 0.1 eV above E_F\n",
      "print\"At 300 K:\";\n",
      "print\"=========\";\n",
      "print\"The occupation probability of electron at\",round(dE,3),\"eV above Fermi energy =\",round(f_E,3);\n",
      "E = E_F - dE;    # Energy of the level below Fermi level, eV\n",
      "f_E = 1.0/(exp((E-E_F)*e/(k*T))+1);    # Occupation probability of the electron at 0.1 eV below E_F\n",
      "print\"The occupation probability of electron at\",round(dE,3),\"below Fermi energy =\",round(f_E,3);\n",
      "\n",
      "T = 1000;        # New temperature, K\n",
      "print\"At 1000 K:\";\n",
      "print\"=========\";\n",
      "E = E_F + dE;    # Energy of the level above Fermi level, eV\n",
      "f_E = 1.0/(exp((E-E_F)*e/(k*T))+1);    # Occupation probability of the electron at 0.1 eV above E_F\n",
      "print\"The occupation probability of electron at\",round(dE,3),\"eV above Fermi energy =\",round(f_E,3);\n",
      "E = E_F - dE;    # Energy of the level below Fermi level, eV\n",
      "f_E = 1.0/(exp((E-E_F)*e/(k*T))+1);    # Occupation probability of the electron at 0.1 eV below E_F\n",
      "print\"The occupation probability of electron at\",round(dE,3),\"eV below Fermi energy =\",round(f_E,3);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "At 300 K:\n",
        "=========\n",
        "The occupation probability of electron at 0.1 eV above Fermi energy = 0.021\n",
        "The occupation probability of electron at 0.1 below Fermi energy = 0.979\n",
        "At 1000 K:\n",
        "=========\n",
        "The occupation probability of electron at 0.1 eV above Fermi energy = 0.239\n",
        "The occupation probability of electron at 0.1 eV below Fermi energy = 0.761\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.2a,Page number 138"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "f_E = 0.01;     # Occupation probability of electron\n",
      "E_F = 1;    # For simplicity assume Fermi energy to be unity, eV\n",
      "k = 1.38*10**-23;      # Boltzmann constant, J/mol/K\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "dE = 0.5;        # Exces energy above Fermi level, eV\n",
      "E = E_F + dE;    # Energy of the level above Fermi level, eV\n",
      "# We have, f_E = 1/(exp((E-E_F)*e/(k*T))+1), solving for T\n",
      "T = (E-E_F)*e/k*1.0/log(1.0/f_E-1);   # Temperature at which the electron will have energy 0.1 eV above the Fermi energy, K\n",
      "print\"The temperature at which the electron will have energy\",round(dE,3),\"eV above the Fermi energy =\",round(T,3),\"K\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The temperature at which the electron will have energy 0.5 eV above the Fermi energy = 1261.578 K\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.3a,Page number 139"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "E_F = 10;   # Fermi energy of electron in metal, eV\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "m = 9.1*10**-31;   # Mass of an electron, kg\n",
      "E_av = 3.0/5*E_F;     # Average energy of free electron in metal at 0 K, eV\n",
      "V_F = sqrt(2*E_av*e/m);   # Speed of free electron in metal at 0 K, eV\n",
      "print\"The average energy of free electron in metal at 0 K =\",round(E_av,3),\"eV\";\n",
      "print\"The speed of free electron in metal at 0 K =\",\"{0:.3e}\".format(V_F),\"m/s\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The average energy of free electron in metal at 0 K = 6.0 eV\n",
        "The speed of free electron in metal at 0 K = 1.453e+06 m/s\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.4a,Page number 139"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "f_E = 0.1;     # Occupation probability of electron\n",
      "E_F = 5.5;    # Fermi energy of Cu, eV\n",
      "k = 1.38*10**-23;      # Boltzmann constant, J/mol/K\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "dE = 0.05*E_F;        # Exces energy above Fermi level, eV\n",
      "E = E_F + dE;    # Energy of the level above Fermi level, eV\n",
      "# We have, f_E = 1/(exp((E-E_F)*e/(k*T))+1), solving for T\n",
      "T = (E-E_F)*e/k*1.0/log(1.0/f_E-1);   # Temperature at which the electron will have energy 0.1 eV above the Fermi energy, K\n",
      "print\"The temperature at which the electron will have energy\",round(dE/E_F*100,3),\"percent above the Fermi energy\",round(T,3),\"K\";\n",
      "\n",
      "#(The answer given in the textbook is wrong) "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The temperature at which the electron will have energy 5.0 percent above the Fermi energy 1451.106 K\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.5a,Page number 139"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "T_F = 24600;   # Fermi temperature of potassium, K\n",
      "k = 1.38*10**-23;  # Boltzmann constant, J/mol/K\n",
      "m = 9.1*10**-31;   # Mass of an electron, kg\n",
      "E_F = k*T_F;    # Fermi energy of potassium, eV\n",
      "v_F = sqrt(2*k*T_F/m);      # Fermi velocity of potassium, m/s\n",
      "print\"The Fermi velocity of potassium =\",\"{0:.3e}\".format(v_F),\"m/s\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Fermi velocity of potassium = 8.638e+05 m/s\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.6a,Page number 139"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "E_F = 7.0;  # Fermi energy of Cu, eV\n",
      "f_E = 0.9;  # Occupation probability of Cu\n",
      "k = 1.38*10**-23;  # Boltzmann constant, J/mol/K\n",
      "T = 1000;   # Given temperature, K\n",
      "# We have, f_E = 1/(exp((E-E_F)*e/(k*T))+1), solving for E\n",
      "E = k*T*log(1.0/f_E-1) + E_F*e;     # Energy level of Cu for 10% occupation probability at 1000 K, J\n",
      "print\"The energy level of Cu for 10 percent occupation probability at 1000 K =\",round(E/e,3),\"eV\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The energy level of Cu for 10 percent occupation probability at 1000 K = 6.81 eV\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.7a,Page number 140"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "m = 9.1*10**-31;   # Mass of an electron, kg\n",
      "e = 1.6*10**-19;   # Electronic charge, C\n",
      "h = 6.626*10**-34; # Planck's constant, Js\n",
      "E_F = 1.55;  # Fermi energy of Cu, eV\n",
      "n = (pi/3)*(8*m/h**2)**(3.0/2)*(E_F*e)**(3.0/2);    # Electronic concentration in cesium, electrons/cc\n",
      "print\"The electronic concentration in cesium =\",\"{0:.3e}\".format(n),\"electrons/cc\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The electronic concentration in cesium = 8.733e+27 electrons/cc\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.8a,Page number 141"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "E_F = 7;  # Fermi energy, eV\n",
      "k = 1.38*10**-23;  # Boltzmann constant, J/mol/K\n",
      "T_F = E_F*e/k;    # Fermi temperature, K\n",
      "print\"The Fermi temperature corresponding to Fermi energy =\",\"{0:.3e}\".format(T_F),\"K\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Fermi temperature corresponding to Fermi energy = 8.116e+04 K\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.9a,Page number 141"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "m = 9.1*10**-31;   # Mass of the electron, kg\n",
      "h = 6.626*10**-34; # Planck's constant, Js\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "h_cross = h/(2*pi);    # Reduced Planck's constant, Js\n",
      "s = 0.01;   # Side of the box, m\n",
      "E = 2;  # Energy range of the electron in the box, eV\n",
      "V = s**3;    # Volume of the box, metre cube\n",
      "I = I = 2*E**(3.0/2)/3;    # Definite integral over E : I = 2*E**(3/2)/3\n",
      "D_E = V/(2*pi**2)*(2*m/h_cross**2)**(3.0/2)*I*e**(3.0/2);  # Density of states for the electron in a cubical box, states\n",
      "print\"The density of states for the electron in a cubical box =\",\"{0:.3e}\".format(D_E),\"states\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The density of states for the electron in a cubical box = 1.280e+22 states\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.10a,Page number 141"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "E_F = 1;    # For simplicity assume Fermi energy to be unity, eV\n",
      "k = 1.38*10**-23;      # Boltzmann constant, J/mol/K\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "dE = 0.5;        # Exces energy above Fermi level, eV\n",
      "T = 300;        # Room temperature, K\n",
      "E = E_F + dE;    # Energy of the level above Fermi level, eV\n",
      "f_E = 1./(exp((E-E_F)*e/(k*T))+1);    # Occupation probability of the electron at 0.1 eV above E_F\n",
      "print\"At 300 K:\";\n",
      "print\"=========\";\n",
      "print\"The occupation probability of electron at\",dE,\"eV above Fermi energy =\",\"{0:.3e}\".format(f_E);\n",
      "E = E_F - dE;    # Energy of the level below Fermi level, eV\n",
      "f_E = 1.0/(exp((E-E_F)*e/(k*T))+1);    # Occupation probability of the electron at 0.1 eV below E_F\n",
      "print\"The occupation probability of electron at\",dE,\"eV above Fermi energy =\",\"{0:.3e}\".format(f_E);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "At 300 K:\n",
        "=========\n",
        "The occupation probability of electron at 0.5 eV above Fermi energy = 4.054e-09\n",
        "The occupation probability of electron at 0.5 eV above Fermi energy = 1.000e+00\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.11a,Page number 141"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "E_F = 1;    # For simplicity assume Fermi energy to be unity, eV\n",
      "k = 1.38*10**-23;      # Boltzmann constant, J/mol/K\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "dE = 0.2;        # Exces energy above Fermi level, eV\n",
      "T = 0+273;        # Room temperature, K\n",
      "E = E_F + dE;    # Energy of the level above Fermi level, eV\n",
      "f_E = 1.0/(exp((E-E_F)*e/(k*T))+1);    # Occupation probability of the electron at 0.1 eV above E_F\n",
      "print\"At 273 K:\";\n",
      "print\"=========\";\n",
      "print\"The occupation probability of electron at\",dE,\"eV above Fermi energy =\",\"{0:.3e}\".format(f_E);\n",
      "T = 100+273;    # Given temperature of 100 degree celsius, K\n",
      "f_E = 1.0/(exp((E-E_F)*e/(k*T))+1);    # Occupation probability of the electron at 0.1 eV below E_F\n",
      "print\"At 373 K:\";\n",
      "print\"=========\";\n",
      "print\"The occupation probability of electron at\",dE,\"eV above Fermi energy =\",\"{0:.3e}\".format(f_E);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "At 273 K:\n",
        "=========\n",
        "The occupation probability of electron at 0.2 eV above Fermi energy = 2.047e-04\n",
        "At 373 K:\n",
        "=========\n",
        "The occupation probability of electron at 0.2 eV above Fermi energy = 1.992e-03\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.12a,Page number 142"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "m = 9.1*10**-31;   # Mass of the electron, kg\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "r = 1.28*10**-10;   # Atomic radius of Cu, m\n",
      "a = 4*r/sqrt(2);    # Lattice constant of Cu, m\n",
      "tau = 2.7*10**-14;      # Relaxation time for the electron in Cu, s\n",
      "V = a**3;    # Volume of the cell, metre cube\n",
      "n = 4.0/V;    # Concentration of free electrons in monovalent copper, \n",
      "sigma = n*e**2*tau/m;    # Electrical conductivity of monovalent copper, mho per m\n",
      "print\"The electrical conductivity of monovalent copper =\",\"{0:.3e}\".format( sigma/100),\"mho per cm\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The electrical conductivity of monovalent copper = 6.403e+05 mho per cm\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.13a,Page number 142"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "n = 18.1*10**22;  # Number of electrons per unit volume, per cm cube\n",
      "N = n/2;    # Pauli's principle for number of energy levels, per cm cube\n",
      "E_F = 11.58;     # Fermi energy of Al, eV\n",
      "E = E_F/N;     # Interelectronic energy separation between bands of Al, eV\n",
      "print\"The interelectronic energy separation between bands of Al =\",\"{0:.3e}\".format(E),\"eV\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The interelectronic energy separation between bands of Al = 1.280e-22 eV\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.14a,Page number 142"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "m = 9.1*10**-31;   # Mass of the electron, kg\n",
      "h = 6.626*10**-34; # Planck's constant, Js\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "h_cross = h/(2*pi);    # Reduced Planck's constant, Js\n",
      "E_F = 7;    # Fermi energy of Cu, eV\n",
      "V = 10**-6;  # Volume of the cubic metal, metre cube\n",
      "D_EF = V/(2*pi**2)*(2*m/h_cross**2)**(3.0/2)*(E_F)**(1.0/2)*e**(3.0/2);   # Density of states in Cu contained in cubic metal, states/eV\n",
      "print\"The density of states in Cu contained in cubic metal =\",\"{0:.3e}\".format(D_EF),\"states/eV\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The density of states in Cu contained in cubic metal = 1.796e+22 states/eV\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.15a,Page number 143"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "m = 9.1*10**-31;   # Mass of the electron, kg\n",
      "h = 6.626*10**-34; # Planck's constant, Js\n",
      "e = 1.6*10**-19;   # Energy equivalent of 1 eV, J/eV\n",
      "h_cross = h/(2*pi);    # Reduced Planck's constant, Js\n",
      "E_F = 7;    # Fermi energy of Cu, eV\n",
      "V = 10**-6;  # Volume of the cubic metal, metre cube\n",
      "D_EF = V/(2*pi**2)*(2*m/h_cross**2)**(3.0/2)*(E_F)**(1.0/2)*e**(3.0/2);   # Density of states in Cu contained in cubic metal, states/eV\n",
      "d = 1.0/(D_EF);     # Electronic energy level spacing between successive levels of Cu, eV\n",
      "print\"The electronic energy level spacing between successive levels of Cu =\",\"{0:.3e}\".format(d),\"eV\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The electronic energy level spacing between successive levels of Cu = 5.568e-23 eV\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.16a,Page number 143"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "A = [[1,2],[3,4],[5,6],[7,8]];      # Declare a 4X2 matrix \n",
      "A[0][0] = 'Li';       \n",
      "A[0][1] = -0.4039;   # Energy of outermost atomic orbital of Li, Rydberg unit\n",
      "A[1][0] = 'Na';      # \n",
      "A[1][1] = -0.3777;   # Energy of outermost atomic orbital of Na, Rydberg unit\n",
      "A[2][0] = 'F';      # \n",
      "A[2][1] = -1.2502;   # Energy of outermost atomic orbital of F, Rydberg unit\n",
      "A[3][0] = 'Cl';      # \n",
      "A[3][1] = -0.9067;   # Energy of outermost atomic orbital of Cl, Rydberg unit\n",
      "cf = 13.6;  # Conversion factor for Rydberg to eV\n",
      "print\"________________________________________\";\n",
      "print\" Atom                          Energy gap\";\n",
      "print\"\",A[1][0],A[3][0],\"                         \",(A[1][1]-A[3][1])*cf,\"eV\";\n",
      "print\"\",A[1][0],A[2][0],\"                          \",(A[1][1]-A[2][1])*cf,\"eV\";\n",
      "print\"\",A[0][0],A[2][0],\"                          \",(A[0][1]-A[2][1])*cf,\"eV\";\n",
      "\n",
      "print\"________________________________________\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "________________________________________\n",
        " Atom                          Energy gap\n",
        " Na Cl                           7.1944 eV\n",
        " Na F                            11.866 eV\n",
        " Li F                            11.50968 eV\n",
        "________________________________________\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.18a,Page number 144"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Given Data\n",
      "# For Cu\n",
      "rs_a0_ratio = 2.67;     # Ratio of solid radius to the lattice parameter\n",
      "E_F = 50.1*(rs_a0_ratio)**(-2);  # Fermi level energy of Cu, eV\n",
      "T_F = 58.2*10**4*(rs_a0_ratio)**(-2);  # Fermi level temperature of Cu, K\n",
      "V_F = 4.20*10**8*(rs_a0_ratio)**(-1);  # Fermi level velocity of electron in Cu, cm/sec\n",
      "K_F = 3.63*10**8*(rs_a0_ratio)**(-1);   \n",
      "print\"For Cu :\";\n",
      "print\"========\";\n",
      "print\"E_F =\",round(E_F,3),\"eV\";\n",
      "print\"T_F =\",\"{0:.3e}\".format(T_F),\"K\";\n",
      "print\"V_F =\",\"{0:.3e}\".format(V_F),\"cm/sec\";\n",
      "print\"K_F =\",\"{0:.3e}\".format(K_F),\"per cm\";\n",
      "rs_a0_ratio = 3.07;     # Ratio of solid radius to the lattice parameter\n",
      "E_F = 50.1*(rs_a0_ratio)**(-2);  # Fermi level energy of Nb, eV\n",
      "T_F = 58.2*10**4*(rs_a0_ratio)**(-2);  # Fermi level temperature of Nb, K\n",
      "V_F = 4.20*10**8*(rs_a0_ratio)**(-1);  # Fermi level velocity of electron in Nb, cm/sec\n",
      "K_F = 3.63*10**8*(rs_a0_ratio)**(-1);   \n",
      "print\"For Nb :\";\n",
      "print\"========\";\n",
      "print\"E_F =\",round(E_F,3),\"eV\";\n",
      "print\"T_F =\",\"{0:.3e}\".format(T_F),\"K\";\n",
      "print\"V_F =\",\"{0:.3e}\".format(V_F),\"cm/sec\";\n",
      "print\"K_F =\",\"{0:.3e}\".format(K_F),\"per cm\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "For Cu :\n",
        "========\n",
        "E_F = 7.028 eV\n",
        "T_F = 8.164e+04 K\n",
        "V_F = 1.573e+08 cm/sec\n",
        "K_F = 1.360e+08 per cm\n",
        "For Nb :\n",
        "========\n",
        "E_F = 5.316 eV\n",
        "T_F = 6.175e+04 K\n",
        "V_F = 1.368e+08 cm/sec\n",
        "K_F = 1.182e+08 per cm\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}