summaryrefslogtreecommitdiff
path: root/sample_notebooks/VijayaLakshmi/Chapter_2.ipynb
blob: 5ea140dc57db78937e8cd5b81a7917f72507c24c (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:8348cd510a8decc7c29711936ea5626abb44a586c7009cdee153feac4272922d"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 2 - Energy Bands And Charge Carriers in Semiconductor"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E1 - Pg 35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Exa 2.1\n",
      "# Given data\n",
      "lembda = 11000.;#\n",
      "lembda = lembda * 10.**-10.;# in m\n",
      "h = 6.625*10.**-34.;# Planck constant\n",
      "c = 3.*10.**8.;#speed of light in m/s\n",
      "e = 1.6*10.**-19.;#charge of electron in C\n",
      "# Energy of the incident photon should at least be, h*v= Eg, so\n",
      "E_g = (h*c)/(lembda*e);# in eV\n",
      "print '%s %.2f %s' %(\"The energy gap in eV is\",E_g,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The energy gap in eV is 1.13 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E2 - Pg 35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Exa 2.2\n",
      "# Given data\n",
      "E_g = 0.75;# in eV\n",
      "e = 1.6*10.**-19.;# in C\n",
      "h = 6.63*10.**-34.;# in J\n",
      "c = 3*10**8.;# in m/s\n",
      "#Formula E_g = (h*c)/(lembda*e);\n",
      "lembda = (h*c)/(E_g*e);# in m\n",
      "lembda = lembda * 10.**10.;# in A\n",
      "print '%s %.2f %s' %(\"The wavelength in A is\",lembda,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The wavelength in A is 16575.00 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E3 - Pg 36"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa 2.3\n",
      "# Given data\n",
      "del_E = 0.3;# in eV\n",
      "T1 = 300.;# in K\n",
      "T2 = 330.;# in K\n",
      "# del_E = K * T1 * log(N/N_c) where del_E= E_C-E_F\n",
      "# del_E1 = K * T2 * log(N/N_c) where del_E1= E_C-E_F at T= 330 degree K\n",
      "del_E1 = del_E*(T2/T1);# in eV \n",
      "print '%s %.2f %s' %(\"The Fermi level will be eV below the conduction band\",del_E1,\"\\n\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Fermi level will be eV below the conduction band 0.33 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E4 - Pg 37"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa 2.4\n",
      "# Given data\n",
      "import math\n",
      "N_c = 2.8 * 10.**3.;# in cm**-3\n",
      "del_E = 0.25;# fermi energy in eV\n",
      "KT = 0.0259;# where K is Boltzmann constant\n",
      "f_F = math.exp(-(del_E)/KT);\n",
      "print '%s %.6f %s' %(\"The probability in the conduction band is occupied by an electron is \",f_F,\"\\n\");\n",
      "# Evaluation of electron concentration\n",
      "n_o = N_c * math.exp(-(del_E)/KT);# in cm**-3\n",
      "print '%s %.2f %s' %(\"The thermal equilibrium electron concentration in cm**-3 is\",n_o,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The probability in the conduction band is occupied by an electron is  0.000064 \n",
        "\n",
        "The thermal equilibrium electron concentration in cm**-3 is 0.18 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E5 - Pg 43"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa2.5\n",
      "# Given data\n",
      "import math\n",
      "T1 = 300.;# in K\n",
      "T2 = 400.;# in K\n",
      "del_E = 0.27;# Fermi level in eV\n",
      "KT = (0.0259) * (T2/T1);# in eV\n",
      "N_v = 1.04 * 10.**3.;# in cm**-3\n",
      "N_v = N_v * (T2/T1)**(3./2.);# in cm**-3 \n",
      "# Hole concentration\n",
      "p_o = N_v * math.exp(-(del_E)/KT);# in per cm**3\n",
      "print '%s %.2f %s' %(\"The thermal equilibrium hole concentration per cm**3 is\",p_o,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The thermal equilibrium hole concentration per cm**3 is 0.64 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E6 - Pg 43"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Exa 2.6\n",
      "# Given data\n",
      "At = 63.5;# atomic weight\n",
      "Rho = 1.7*10.**-6.;# in ohm cm\n",
      "d = 8.96;# in gm/cc\n",
      "N_A = 6.02*10.**23.;# in /gm.mole\n",
      "e = 1.6*10.**-19.;# in C\n",
      "#Number of atoms of copper persent per unit volume\n",
      "n = (N_A/At)*d;\n",
      "Miu_e = 1./(Rho*n*e);# in cm**2/volt.sec\n",
      "print '%s %.2f %s' %(\"The electron mobility in cm**2/volt-sec is\",Miu_e,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The electron mobility in cm**2/volt-sec is 43.28 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E7 - Pg 45"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Exa 2.7\n",
      "# Given data\n",
      "l = 0.1;# in m\n",
      "A = 1.7;# in mm**2\n",
      "A = A * 10.**-6.;# in m**2\n",
      "R = 0.1;# in ohm\n",
      "At = 63.5;# atomic weight\n",
      "N_A = 6.02*10.**23.;\n",
      "d = 8.96;# in gm/cc\n",
      "n = (N_A/At)*d;# in /cc\n",
      "n = n * 10.**6.;# in /m**3\n",
      "e = 1.6*10.**-19.;#electron charge in C\n",
      "# Resistivity of copper\n",
      "#Formula R = Rho*(l/A);\n",
      "Rho = (R*A)/l;# in ohm m\n",
      "# Conductivity of copper\n",
      "Sigma = 1./Rho;# in mho/m\n",
      "# Formula Sigma = n*e*Miu_e\n",
      "Miu_e = Sigma/(n*e);# in m**2/V.sec\n",
      "print '%s %.6f %s' %(\"The mobility in m**2/V-sec is\",Miu_e,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The mobility in m**2/V-sec is 0.000043 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E8 - Pg 47"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Exa 2.8\n",
      "# Given data\n",
      "import math\n",
      "d = 10.5;# in gm/cc\n",
      "At = 108.;# atomic weight\n",
      "N_A = 6.025*10.**23.;# in /gm mole\n",
      "r = 10**-3.;# in m\n",
      "q = 1.6*10.**-19.;# in C\n",
      "# The number of electrons per unit volume\n",
      "n = (N_A/At)*d;# in /cm**3\n",
      "n = n * 10.**6.;# in /m**3\n",
      "A = math.pi*((r)**2.);# in m**2\n",
      "I = 2.;# in A\n",
      "# Evaluation of drivt velocity with the help of current\n",
      "# I = q*n*A*V;\n",
      "V = I/(n*q*A);# in m/s\n",
      "print '%s %.6f %s' %(\"The drift velocity in m/s is\",V,\"\\n\");\n",
      "\n",
      "# Note: Calculation in the book is wrong, so the answer in the book is wrong.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The drift velocity in m/s is 0.000068 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E9 - Pg 48"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Exa 2.9\n",
      "import math\n",
      "# Given data\n",
      "d = 1.03;# in mm\n",
      "d = d *10.**-3.;# in m\n",
      "r = d/2.;# in m\n",
      "R = 6.51;# in ohm\n",
      "l = 300.;# in mm\n",
      "e = 1.6*10.**-19.;# electron charge in C\n",
      "n = 8.4*10.**28.;# in /m**3\n",
      "A = math.pi*r**2.;# cross section area\n",
      "#Formula  R = Rho*(l/A);\n",
      "Rho = (R* A)/l;#in ohm m\n",
      "Sigma = 1./Rho;# in mho/m\n",
      "print '%s %.2f %s' %(\"The conductivity of copper in mho/m is\",Sigma,\"\\n\");\n",
      "# Evaluation of mobility\n",
      "#Formula sigma = n*e*Miu_e\n",
      "Miu_e = Sigma/(n*e);# in m**2/V.sec\n",
      "print '%s %.6f %s' %(\"The mobility in m**2/V-sec is\",Miu_e,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The conductivity of copper in mho/m is 55306469.41 \n",
        "\n",
        "The mobility in m**2/V-sec is 0.004115 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E10 - Pg 53"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Exa 2.10\n",
      "# Given data\n",
      "Mu_e = 1500.;# in cm**2/volt sec\n",
      "Mu_h = 500.;# in cm**2/volt sec\n",
      "n_i = 1.6 * 10.**10.;# in per cm**3\n",
      "e = 1.6 * 10.**-19.;# in C\n",
      "# The conductivity of pure semiconductor \n",
      "Sigma = n_i * (Mu_e + Mu_h) * e;# in mho/cm\n",
      "print '%s %.6f %s' %(\"The conductivity of pure semiconductor in mho/cm is\",Sigma,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The conductivity of pure semiconductor in mho/cm is 0.000005 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E11 - Pg 53"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Exa 2.11\n",
      "# Given data\n",
      "Rho = 10.;# in ohm-cm\n",
      "Mu_d = 500.;# in cm**2/v.s.\n",
      "e = 1.6*10.**-3.;# electron charge in C\n",
      "# The number of donor atom\n",
      "n_d = 1./(Rho * e * Mu_d);# in per cm**3\n",
      "print '%s %.2f %s' %(\"The number of donor atom per cm**3 is \",n_d,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The number of donor atom per cm**3 is  0.12 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E12 - Pg 53"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa 2.12\n",
      "#Given data\n",
      "AvagadroNumber = 6.02 * 10.**23.;# in atoms/gm.mole\n",
      "at_Ge = 72.6;# atom weight of Ge\n",
      "e = 1.6 * 10.**-19.;# in C\n",
      "D_Ge = 5.32;# density of Ge in gm/c.c\n",
      "Mu = 3800.;# in cm**2/v.s.\n",
      "C_Ge = (AvagadroNumber/at_Ge) * D_Ge;# concentration of Ge atoms in per cm**3\n",
      "n_d = C_Ge/10.**8.;# in per cc\n",
      "Sigma = n_d * Mu * e;# in mho/cm\n",
      "print '%s %.2f %s' %(\"The conductivity in mho/cm is\",Sigma,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The conductivity in mho/cm is 0.27 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E13 - Pg 57"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Exa2.13\n",
      "# Given data\n",
      "Rho = 0.3623 * 10.**-3.;# in Ohm m\n",
      "Sigma = 1/Rho;#in mho/m\n",
      "D = 4.42 * 10.**28.;# Ge density in atom/m**3\n",
      "n_d = D / 10.**6.;# in atom/m**3\n",
      "e = 1.6 * 10.**-19.;# in C\n",
      "# The mobility of electron in germanium \n",
      "Mu = Sigma/(n_d * e);# in m**2/V.sec\n",
      "print '%s %.2f %s' %(\"The mobility of electron in germanium in m**2/V.sec is\",Mu,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The mobility of electron in germanium in m**2/V.sec is 0.39 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E14 - Pg 57"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa 2.14\n",
      "# Given data\n",
      "AvagadroNumber = 6.025 * 10.**26.;# in kg.Mole\n",
      "W = 72.59;# atomic weight of Ge\n",
      "D = 5.36 * 10.**3.;#density of Ge in kg/m**3\n",
      "Rho = 0.42;# resistivity in Ohm m\n",
      "e = 1.6 * 10.**-19.;# in C\n",
      "Sigma = 1./Rho;# in mho/m\n",
      "n = (AvagadroNumber/W) * D;# number of Ge atoms present per unit volume\n",
      "# Holes per unit volume, H = n*10**-6%\n",
      "H= n*10.**-8.;\n",
      "a=H;\n",
      "# Formula sigma= a*e*Mu_h\n",
      "Mu_h = Sigma/(a * e);# in m**2/V.sec\n",
      "print '%s %.2f %s' %(\"Mobility of holes in m**2/V.sec is\",Mu_h,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Mobility of holes in m**2/V.sec is 0.03 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E15 - Pg 58"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa 2.15\n",
      "# Given data\n",
      "e = 1.6 * 10.**-19.;# in C\n",
      "n_i = 2 * 10.**19.;# in /m**3\n",
      "Mu_e = 0.36;# in m**2/v.s\n",
      "Mu_h = 0.17;# in m**2/v.s\n",
      "A = 1. * 10.**-4.;# in  m**2\n",
      "V = 2.;#in volts\n",
      "l = 0.3;# in mm\n",
      "l = l * 10.**-3.;# in m\n",
      "E=V/l;# in volt/m\n",
      "Sigma = n_i * e * (Mu_e + Mu_h);# in mho/m\n",
      "# J = I/A = Sigma * E\n",
      "I= Sigma*E*A;\n",
      "print '%s %.2f %s' %(\"The current produced in a small germanium plate in amp is\",I,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The current produced in a small germanium plate in amp is 1.13 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E16 - Pg 59"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Exa 2.16\n",
      "# Given data\n",
      "D = 4.2 * 10.**28.;#density of Ge atoms per m**3\n",
      "N_d = D / 10.**6.;# per m**3\n",
      "e = 1.6 * 10.**-19.;# in C\n",
      "Mu_e = 0.36;# in m**2/V-sec\n",
      "# Donor concentration is very large as compared to intrinsic carrier concentration\n",
      "Sigma_n = N_d *  e * Mu_e;# in mho/m (intrinsic concentration can be neglected)\n",
      "Rho_n = 1./Sigma_n;# in ohm m\n",
      "print '%s %.6f %s' %(\"The resistivity of drop Ge in ohm m is \",Rho_n,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The resistivity of drop Ge in ohm m is  0.000413 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E17 - Pg 60"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Exa 2.17\n",
      "# given data\n",
      "e = 1.6 * 10.**-19.;# in C\n",
      "n_i = 1 * 10.**19.;# in per m**3\n",
      "Mu_e = 0.36;# in m**2/volt.sec\n",
      "Mu_h = 0.17;# in m**2/volt.sec \n",
      "A = 2.;# in cm**2\n",
      "A = A * 10.**-4.;# im m**2\n",
      "t = 0.1;# in mm\n",
      "t = t * 10.**-3.;# in m\n",
      "V = 4.;# in volts\n",
      "Sigma_i = n_i * e * (Mu_e + Mu_h);# in mho/m\n",
      "J = Sigma_i * (V/t);# in Amp/m**2\n",
      "# Current produced, I= J*A\n",
      "I = J * A;# in Amp\n",
      "print '%s %.2f %s' %(\"The current produced in a Ge sample in Amp is\",I,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The current produced in a Ge sample in Amp is 6.78 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E18 - Pg 60"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa 2.18\n",
      "# Given data\n",
      "e = 1.6 * 10.**-19.;# in C\n",
      "Mu_h = 500.;# in cm**2/V.s.\n",
      "Mu_e = 1500.;# in cm**2/V.s.\n",
      "n_i = 1.6 * 10.**10.;# in per cm**3\n",
      "# Conductivity of pure silicon at room temperature \n",
      "Sigma_i = n_i * e * ( Mu_h + Mu_e);# in mho/cm\n",
      "print '%s %.6f %s' %(\"Conductivity of pure silicon at room temperature in mho/cm is\",Sigma_i,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Conductivity of pure silicon at room temperature in mho/cm is 0.000005 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E19 - Pg 63"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa 2.19\n",
      "#Given data\n",
      "l= 0.50*10.**-2.;# width of ribbon in m\n",
      "d= 0.10*10.**-3.;# thickness of ribbon in m\n",
      "A= l*d;# area of ribbon in m**2\n",
      "B = 0.8;# in Tesla\n",
      "D = 10.5;#density in gm/cc\n",
      "I = 2.;# in amp\n",
      "q = 1.6 * 10.**-19.;# in C\n",
      "n=6.*10.**28.;# number of elec. per m**3\n",
      "V_H = ( I * B * d)/(n * q * A);# in volts\n",
      "print '%s %.8f %s' %(\"The hall Voltage produced in volts is\",V_H,\"\\n\");\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The hall Voltage produced in volts is 0.00000003 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E20 - Pg 63"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa 2.20\n",
      "# Given data\n",
      "l = 1.;# in m\n",
      "d = 1.;# in cm\n",
      "d = d * 10.**-2.;# in m\n",
      "W = 1.;# in mm\n",
      "W = W * 10.**-3.;# in m\n",
      "A = d * W;# in m**2\n",
      "I= 1.;# in A\n",
      "B = 1.;# Tesla\n",
      "V_H = 0.074 * 10.**-6.;# in volts\n",
      "Sigma = 5.8 * 10.**7.;# in mho/m\n",
      "# The hall coefficient \n",
      "R_H = (V_H * A)/(B*I*d);# in m**3/c\n",
      "print '%s %.10f %s' %(\"The hall coefficient in m**3/c is\",R_H,\"\\n\");\n",
      "# Mobility  of electrons in copper \n",
      "Mu = Sigma * R_H;# in m**2/volt-sec\n",
      "print '%s %.4f %s' %(\"The mobility  of electrons in copper in m**2/volt-sec is \",Mu,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The hall coefficient in m**3/c is 0.0000000001 \n",
        "\n",
        "The mobility  of electrons in copper in m**2/volt-sec is  0.0043 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E21 - Pg 64"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa2.21\n",
      "# Given data\n",
      "n_i = 1.4 * 10.**3.;# in /m**3\n",
      "n_D = 1.4 * 10.**4.;# in /m**3\n",
      "# Concentration of electrons\n",
      "n=n_D;# in /m**3\n",
      "p = n_i**2./n;# in /m**3\n",
      "# The ratio of electrons to hole concentration\n",
      "R = n/p;\n",
      "print '%s %.2f %s' %(\"The ratio of electrons to hole concentration is\",R,\"\\n\");"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The ratio of electrons to hole concentration is 100.00 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E22 - Pg 64"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa 2.22\n",
      "#Given data\n",
      "R = 9. * 10.**-3.;# in ohm-m\n",
      "R_H = 3.6 * 10.**-4.;# in m**3\n",
      "e = 1.6 * 10.**-3.;# in C\n",
      "Sigma = 1./R;# in (ohm-m)**-1\n",
      "Rho = 1./R_H;# in coulomb/m**3\n",
      "# Density of charge carriers \n",
      "n = Rho/e;# in /m**3\n",
      "print '%s %.2f %s' %(\"Density of charge carriers per m**3 is\",n,\"\\n\");\n",
      "# Mobility of charge carriers \n",
      "Mu = Sigma * R_H;# in m**2/v-s\n",
      "print '%s %.2f %s' %(\"Mobility of charge carriers in m**2/V-s is\",Mu,\"\\n\");\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Density of charge carriers per m**3 is 1736111.11 \n",
        "\n",
        "Mobility of charge carriers in m**2/V-s is 0.04 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E23 - Pg 70"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa 2.23\n",
      "# Given data\n",
      "e = 1.6 * 10.**-19.;# in C\n",
      "R_H = 0.0145;# in m**3/coulomb\n",
      "Mu_e = 0.36;# in m**2/v-s\n",
      "E = 100.;# in V/m\n",
      "n = 1./(e * R_H);# in /m**3\n",
      "# The current density of specimen \n",
      "J = n * e * Mu_e * E;# in A/m**2\n",
      "print '%s %.2f %s' %(\"The current density of specimen in A/m**2 is\",J,\"\\n\");\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The current density of specimen in A/m**2 is 2482.76 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E24 - Pg 70"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa 2.24\n",
      "import math\n",
      "#Given data\n",
      "Mu_e = 7.04 * 10.**-3.;# in m**2/v-s\n",
      "m = 9.1 * 10.**-31.;\n",
      "E_F = 5.5;# in eV\n",
      "n = 5.8 * 10.**28.;\n",
      "e = 1.6 * 10.**-19.;# in C\n",
      "# Relaxation Time \n",
      "Torque = (Mu_e/e) * m;# in sec\n",
      "print '%s %.2f %s' %(\"Relaxation Time in sec is \",Torque,\"\\n\");\n",
      "# Resistivity of conductor \n",
      "Rho = 1. /(n * e * Mu_e);# in ohm-m\n",
      "print '%s %.2f %s' %(\"Resistivity of conductor in ohm-m is \",Rho,\"\\n\");\n",
      "# Velocity of electrons with fermi-energy \n",
      "V_F = math.sqrt((2 * E_F * e)/m);# in m/s\n",
      "print '%s %.2f %s' %(\"Velocity of electrons with fermi-energy in m/s is\",V_F,\"\\n\");\n",
      "\n",
      "#Note: The calculated value of Resistivity of conductor is wrong.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Relaxation Time in sec is  0.00 \n",
        "\n",
        "Resistivity of conductor in ohm-m is  0.00 \n",
        "\n",
        "Velocity of electrons with fermi-energy in m/s is 1390706.99 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E25 - Pg 72"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa 2.25\n",
      "import math\n",
      "# Given data\n",
      "E= 5.95;# in eV\n",
      "EF= 6.25;# in eV\n",
      "delE= 0.01;\n",
      " # delE= 1-1/(1+exp((E-EF)/KT))\n",
      "K=1.38*10.**-23.;# Boltzmann Constant in J/K\n",
      "# The temperature at which there is a 1 % probability that a state 0.30 eV below the Fermi energy level\n",
      "T = ((E-EF)/math.log(1./(1.-delE) -1.)*1.6*10.**-19.)/K;# in K\n",
      "print '%s %.2f %s' %(\"The temperature in K is : \",T,\"\\n\")\n",
      " \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The temperature in K is :  756.95 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E26 - Pg 72"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa 2.26\n",
      "# Given data \n",
      "import math\n",
      "N_V = 1.04 * 10.**3.;# in cm**-3\n",
      "T1 = 300.;# in K\n",
      "T2 = 400.;# in K\n",
      "del_E = 0.27;# in eV\n",
      "# The value of N_V at T=400 K,\n",
      "N_V = N_V * (T2/T1)**1.5;# in cm**-3\n",
      "KT = (0.0259) * (T2/T1);# in eV\n",
      "# The thermal equilibrium hole concentration in silicon \n",
      "P_o = N_V * math.exp(-(del_E)/KT);# in cm**-3\n",
      "print '%s %.2f %s' %(\"The thermal equilibrium hole concentration in silicon in cm**-3 is \",P_o,\"\\n\");\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The thermal equilibrium hole concentration in silicon in cm**-3 is  0.64 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E27 - Pg 74"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa 2.27\n",
      "import math\n",
      "#Given data\n",
      "N_c = 2.8 * 10.**3.;\n",
      "N_V = 1.04 *10.**3.;\n",
      "T1 = 550.;# in K\n",
      "T2 = 300.;# in K\n",
      "E_g = 1.12;\n",
      "KT = (0.0259) ;\n",
      "n_i = math.sqrt(N_c *N_V *(T1/T2)**3.* math.exp(-(E_g)/KT*T2/T1));# in cm**-3\n",
      "# n_o = N_d/2 + sqrt((N_d/2)**2 + (n_i)**2)\n",
      "# 1.05*N_d -N_d/2= sqrt((N_d/2)**2 + (n_i)**2)\n",
      "# Minimum donor concentration required \n",
      "N_d=math.sqrt((n_i)**2./((0.55)**2.-1./4.));\n",
      "print '%s %.2f %s' %(\"Minimum donor concentration required in cm**-3 is\",N_d,\"\\n\"); \n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Minimum donor concentration required in cm**-3 is 0.14 \n",
        "\n"
       ]
      }
     ],
     "prompt_number": 27
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example E28 - Pg 75"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Exa 2.28\n",
      "import math\n",
      "#Given data\n",
      "T = 300.;# in K\n",
      "n_o = 10.**15.;# in cm**-3\n",
      "n_i = 10.**10.;# in cm**-3\n",
      "p_o = 10.**5.;# in cm**-3\n",
      "del_n = 10.**13.;# in cm**-3\n",
      "del_p = del_n;# in cm**-3\n",
      "KT = 0.0259;# in eV\n",
      "delta_E1= KT*math.log(n_o/n_i);# value of E_F-E_Fi in eV\n",
      "delta_E2= KT*math.log((n_o+del_n)/n_i);# value of E_Fn-E_Fi in eV\n",
      "delta_E3= KT*math.log((p_o+del_p)/n_i);# value of E_Fi-E_Fp in eV\n",
      "print '%s %.2f %s' %(\"The Fermi level for thermal equillibrium in eV is : \",delta_E1,\"\\n\")\n",
      "print '%s %.2f %s' %(\"The quase-Fermi level for electrons in non equillibrium in eV is : \",delta_E2,\"\\n\")\n",
      "print '%s %.2f %s' %(\"The quasi-Fermi level for holes in non equillibrium in eV is : \",delta_E3,\"\\n\")\n",
      "print '%s' %(\"The quasi-Fermi level for electrons is above E_Fi \")\n",
      "print '%s' %(\"While the quasi-Fermi level for holes is below E_Fi\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Fermi level for thermal equillibrium in eV is :  0.30 \n",
        "\n",
        "The quase-Fermi level for electrons in non equillibrium in eV is :  0.30 \n",
        "\n",
        "The quasi-Fermi level for holes in non equillibrium in eV is :  0.18 \n",
        "\n",
        "The quasi-Fermi level for electrons is above E_Fi \n",
        "While the quasi-Fermi level for holes is below E_Fi\n"
       ]
      }
     ],
     "prompt_number": 28
    }
   ],
   "metadata": {}
  }
 ]
}