summaryrefslogtreecommitdiff
path: root/Semiconductor_Devices_Basic_Principle_by_J._Singh/chapter3.ipynb
blob: c41c8cffb3c9c603238daa22a4279e5e92272c8f (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
{

 "metadata": {

  "name": "",

  "signature": "sha256:d5b3b9ad59e9e59395b899364c44cfc2cc23564a29951b6384c7ef1142a5401c"

 },

 "nbformat": 3,

 "nbformat_minor": 0,

 "worksheets": [

  {

   "cells": [

    {

     "cell_type": "heading",

     "level": 1,

     "metadata": {},

     "source": [

      "Chapter3:CARRIER DYNAMICS IN SEMICONDUCTORS"

     ]

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex3.1:pg-95"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "mo = 9.1*10**-31 #initializing value of mass of electron\n",

      "me = 0.067*mo #initializing value of effective mass of GaAs\n",

      "u1=8500*10**(-4) #initializing value of mobility of pure GaAs\n",

      "e = 1.6*10**-19 #initializing value of charge of electron\n",

      "u2=5000*10**(-4) #initializing value of mobility of impure GaAs\n",

      "Tsc1 = (me*u1)/e\n",

      "print\"The relaxation time of pure GaAs is Tsc1 = \",\"{:.2e}\".format(Tsc1),\"s\"\n",

      "Tsc2 = (me*u2)/e\n",

      "print\"The relaxation time of impure GaAs is Tsc2= \"\"{:.2e}\".format(Tsc2),\"s\"\n",

      "#using Mathieson rule\n",

      "Tsc = ((1/Tsc2)-(1/Tsc1))**-1\n",

      "print\"The impurity related time is Tsc(imp)  = \",\"{:.2e}\".format(Tsc),\"s\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The relaxation time of pure GaAs is Tsc1 =  3.24e-13 s\n",

        "The relaxation time of impure GaAs is Tsc2= 1.91e-13 s\n",

        "The impurity related time is Tsc(imp)  =  4.63e-13 s\n"

       ]

      }

     ],

     "prompt_number": 1

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex3.2:pg-96"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "mo = 9.1*10**-31 #initializing value of mass of electron\n",

      "ml = 0.98*mo #initializing value of longitudinal mass\n",

      "mt = 0.19*mo #initializing value of transverse mass\n",

      "u=1500*10**(-4) #initializing value of mobility of pure silicon\n",

      "e = 1.6*10**-19 #initializing value of charge of electron\n",

      "Msig = 3*((2/mt)+(1/ml))**(-1)\n",

      "Tsc = u*Msig/e\n",

      "print\"The scattering time is ,Tsc= \",\"{:.2e}\".format(Tsc),\"s\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The scattering time is ,Tsc=  2.22e-13 s\n"

       ]

      }

     ],

     "prompt_number": 3

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex3.3:pg-96"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "un1=1000 #initializing value of mobility of electron of silicon\n",

      "e = 1.6*10**-19 #initializing value of charge of electron\n",

      "un2 = 8000.0 #initializing value of mobility of electron of GaAs\n",

      "up1 = 350.0 #initializing value of mobility of holes of silicon\n",

      "up2 = 400.0 #initializing value of mobility of holes of GaAs\n",

      "ndoped = (50.0/100)*10**17 #initializing value of electron density of doped semiconductor(50% of Nd=10**17 cm**-3)\n",

      "ni = 1.5*10**10 #initializing value of electron density of ionisation electron for silicon\n",

      "pdoped = (ni)**2/ndoped\n",

      "print\"The hole density of doped semiconductor is pdoped =  \",\"{:.2e}\".format(pdoped),\"cm**-3\"\n",

      "#pdoped can be neglected \n",

      "Sdoped = ndoped*e*un1\n",

      "print\"The conductivity of doped silicon is (sigma doped) Sdoped =\",round(Sdoped),\"ohmcm**-1\"\n",

      "p1 = 1.5*10**10 #initializing value of hole density for undoped silicon\n",

      "Sundoped = ni*e*un1+p1*e*up1\n",

      "print\"The conductivity of undoped silicon is (sigma undoped)Sundoped = \",\"{:.2e}\".format(Sundoped),\"ohmcm**-1\"\n",

      "Sdoped1 = ndoped*e*un2\n",

      "print\"The conductivity of doped GaAs is (sigma doped) Sdoped  = \",round(Sdoped1,1),\"ohmcm**-1\"\n",

      "p2 = 1.84*10**6 #initializing value of hole density for undoped GaAs\n",

      "ni1 = 1.84*10**6 #initializing value of electron density of ionisation electron for GaAs\n",

      "Sundoped = ni1*e*un2+p2*e*up1\n",

      "print\"The conductivity of undoped silicon is (sigma undoped) Sundoped  = \",\"{:.2e}\".format(Sundoped),\"ohmcm**-1\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The hole density of doped semiconductor is pdoped =   4.50e+03 cm**-3\n",

        "The conductivity of doped silicon is (sigma doped) Sdoped = 8.0 ohmcm**-1\n",

        "The conductivity of undoped silicon is (sigma undoped)Sundoped =  3.24e-06 ohmcm**-1\n",

        "The conductivity of doped GaAs is (sigma doped) Sdoped  =  64.0 ohmcm**-1\n",

        "The conductivity of undoped silicon is (sigma undoped) Sundoped  =  2.46e-09 ohmcm**-1\n"

       ]

      }

     ],

     "prompt_number": 10

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex3.4:pg-97"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "un1=1000 #initializing value of mobility of electron of silicon\n",

      "e = 1.6*10**-19 #initializing value of charge of electron\n",

      "un2 = 400.0 #initializing value of mobility of electron of GaAs\n",

      "up1 = 350.0 #initializing value of mobility of holes of silicon\n",

      "up2 = 8000.0 #initializing value of mobility of holes of GaAs\n",

      "ni = 1.5*10**10 #initializing value of electron density of ionisation electron\n",

      "nmax = 2.78*10**19 #initializing value of maximum electron density for silicon\n",

      "nmax1 = 7.72*10**18 #initializing value of maximum electron density for GaAs\n",

      "Smax = nmax*e*un1\n",

      "print\"The maximum conductivity for silicon is (sigma max) Smax =  \",\"{:.2e}\".format(Smax),\"ohmcm**-1\"\n",

      "Smax1 = nmax1*e*un2\n",

      "print\"The maximum conductivity of GaAs is (sigma max) Smax=\",\"{:.1e}\".format(Smax1),\"ohmcm**-1\"\n",

      "Smin = ni*e*((un1*sqrt(up1/un1))+(up1*sqrt(un1/up1)))\n",

      "print\"The minimum conductivity of silicon is (sigma min)Smin = \"\"{:.1e}\".format(Smin),\"ohmcm**-1\"\n",

      "ni1 = 1.84*10**6 #initializing value of electron density of ionisation electron for GaAs\n",

      "Smin1 = ni1*e*((un2*sqrt(up2/un2))+(up2*sqrt(un2/up2)))\n",

      "print\"The minimum conductivity of GaAs is (sigma min)Smin1 =\",\"{:.2e}\".format(Smin1),\"ohmcm**-1\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The maximum conductivity for silicon is (sigma max) Smax =   4.45e+03 ohmcm**-1\n",

        "The maximum conductivity of GaAs is (sigma max) Smax= 4.9e+02 ohmcm**-1\n",

        "The minimum conductivity of silicon is (sigma min)Smin = 2.8e-06 ohmcm**-1\n",

        "The minimum conductivity of GaAs is (sigma min)Smin1 = 1.05e-09 ohmcm**-1\n"

       ]

      }

     ],

     "prompt_number": 24

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex3.5:pg-98"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "mo = 9.1*10**-31 #initializing value of mass of electron\n",

      "me = 0.26*mo #initializing value of conductivity mass of silicon\n",

      "v1=1.4*10**(6) #initializing value of velocity of silicon electron at 300K\n",

      "e = 1.6*10**-19 #initializing value of charge of electron\n",

      "v2=1.0*10**(7) #initializing value of velocity of silicon electron at 300K\n",

      "F1= 1000 #initializing value of electric field \n",

      "F2= 100000 #initializing value of electric field \n",

      "u1 = v1/(F1*10**4)\n",

      "print\"The mobility for electrons in silicon (1 kV/cm) is u1=\",\"{:.2e}\".format(u1),\"m**2/V.s\"\n",

      "u2 = v2/(F2*10**4)\n",

      "print\"The mobility for electrons in silicon (100 kV/cm) is u2=\",\"{:.2e}\".format(u2),\"m**2/V.s\"\n",

      "Tsc1 = (me*u1)/e\n",

      "print\"The relaxation time of electrons in silicon at 1kV/cm is Tsc1=\",\"{:.2e}\".format(Tsc1),\"s\"\n",

      "Tsc2 = (me*u2)/e\n",

      "print\"The relaxation time of electrons in silicon at 100kV/cm is Tsc2 =\",\"{:.2e}\".format(Tsc2),\"s\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The mobility for electrons in silicon (1 kV/cm) is u1= 1.40e-01 m**2/V.s\n",

        "The mobility for electrons in silicon (100 kV/cm) is u2= 1.00e-02 m**2/V.s\n",

        "The relaxation time of electrons in silicon at 1kV/cm is Tsc1= 2.07e-13 s\n",

        "The relaxation time of electrons in silicon at 100kV/cm is Tsc2 = 1.48e-14 s\n"

       ]

      }

     ],

     "prompt_number": 13

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex3.6:pg-99"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "v2=1.0*10**(7) #initializing value of saturation velocity of GaAs device\n",

      "F= 5000 #initializing value of average electric field in GaAs device\n",

      "L= 2*10**(-4) #initializing value of length of GaAs device \n",

      "u = 8000 #initializing value of low field mobility\n",

      "v1 = u*F\n",

      "print\"The average velocity of electrons is v = \",\"{:.2e}\".format(v1),\"cm/s\"\n",

      "Ttr1 = L/v1\n",

      "print\"The transit time of electrons through the device is Ttr1 =\"\"{:.2e}\".format(Ttr1),\"s\"\n",

      "Ttr2 = L/v2\n",

      "print\"The transit time of electrons using saturation velocity through the device is Ttr2 = \",\"{:.2e}\".format(Ttr2),\"s\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The average velocity of electrons is v =  4.00e+07 cm/s\n",

        "The transit time of electrons through the device is Ttr1 =5.00e-12 s\n",

        "The transit time of electrons using saturation velocity through the device is Ttr2 =  2.00e-11 s\n"

       ]

      }

     ],

     "prompt_number": 14

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex3.7:pg-103"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "h=1.05*10**-34 #initializing value of reduced plancks constant or dirac constant or h-bar\n",

      "mo = 9.1*10**-31 #initializing value of mass of electron\n",

      "me1 = 0.065*9.1*10**-31 #initializing value of electron mass of GaAs\n",

      "me2 = 0.02*9.1*10**-31 #initializing value of electron mass of InAs\n",

      "e = 1.6*10**-19 #initializing value of charge of electron\n",

      "Eg1 = 1.5*1.6*10**-19 #initializing value of valence bandedge energy of GaAs\n",

      "Eg2 = 0.4052*1.6*10**-19 #initializing value of valence bandedge energy of InAs\n",

      "F= 2*10**7 #initializing value of applied electric field \n",

      "T1 = math.exp(-(4*sqrt(2*me1)*(Eg1)**(3/2))/(3*e*h*F))\n",

      "print\"The tunneling probability in GaAs is T1 =\",round(T1,1)\n",

      "T2 = math.exp(-(4*sqrt(2*me2)*(Eg2)**(3/2))/(3*e*h*F))\n",

      "print\"The tunneling probability in InAs is T2 =\",\"{:.2e}\".format(T2)\n",

      "#NOTE: The tunneling probability in GaAs is approximately given zero in the textbook"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The tunneling probability in GaAs is T1 = 0.0\n",

        "The tunneling probability in InAs is T2 = 0.00e+00\n"

       ]

      }

     ],

     "prompt_number": 19

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex3.8:pg-106"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "e = 1.6*10**-19 #initializing value of charge of electron\n",

      "L =10**-4 #initializing value of length\n",

      "Dn =220 #initializing value of electron diffusion coefficient\n",

      "#n(x) = 10**16*exp(-(x/L)) cm**-3\n",

      "#Derivative of n(x) for x =0 is  10**16/L\n",

      "dn_by_dx =10**16/L #initializing value of derivative of n(x) for x=0\n",

      "Jn_diff = e*Dn*dn_by_dx\n",

      "print\"The diffusion current density is Jn_diff =\",\"{:.1e}\".format(Jn_diff),\"A/cm**2\"\n",

      "# Note : due to different precisions taken by me and the author ... my answer differ "

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The diffusion current density is Jn_diff = 3.5e+03 A/cm**2\n"

       ]

      }

     ],

     "prompt_number": 7

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "\n",

      "Ex3.9:pg-109"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "v1=1.4*10**(4) #initializing value of velocity of electrons in silion at 1kV/cm\n",

      "v2=7*10**(4) #initializing value of velocity of electrons in silion at 10kV/cm\n",

      "e = 1.6*10**-19 #initializing value of charge of electron\n",

      "kbT = 0.026 #initializing value of kbT at 300K\n",

      "F1= 10**5 #initializing value of applied electric field\n",

      "F2= 10**6 #initializing value of applied electric field \n",

      "D1 = (v1*kbT*1.6*10**-19)/(e*F1)\n",

      "print\"The diffusion coefficient is ,D(1kV/cm)=\",\"{:.2e}\".format(D1),\"m**2/s\"\n",

      "D2 = (v2*kbT*1.6*10**-19)/(e*F2)\n",

      "print\"The diffusion coefficient is ,D(10kV/cm)=\",\"{:.2e}\".format(D2),\"m**2/s\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The diffusion coefficient is ,D(1kV/cm)= 3.64e-03 m**2/s\n",

        "The diffusion coefficient is ,D(10kV/cm)= 1.82e-03 m**2/s\n"

       ]

      }

     ],

     "prompt_number": 2

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex3.10:pg-111"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "Nc=2.8*10**(19)\n",

      "Nv=1.04*10**(19)\n",

      "#NOTE: Ec-Ev = forbidden band gap energy = Eg\n",

      "Eg = 1.1\n",

      "e = 1.6*10**-19 #initializing value of charge of electron\n",

      "kbT = 0.026 #initializing value of kbT at 300K\n",

      "n= 10**17\n",

      "p= 10**17\n",

      "Efn_minus_Efp = Eg+(kbT*(log(p/Nv)+log(n/Nc)))\n",

      "print\"The difference in the quasi fermi level is ,Efn_minus_Efp=\",\"{:.2e}\".format(Efn_minus_Efp),\"eV\"\n",

      "n= 10**15\n",

      "p= 10**15\n",

      "Efn_minus_Efp = Eg+(kbT*(log(p/Nv)+log(n/Nc)))\n",

      "print\"The difference in the quasi fermi level is ,Efn_minus_Efp=\",\"{:.2e}\".format(Efn_minus_Efp),\"eV\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The difference in the quasi fermi level is ,Efn_minus_Efp= 8.33e-01 eV\n",

        "The difference in the quasi fermi level is ,Efn_minus_Efp= 5.93e-01 eV\n"

       ]

      }

     ],

     "prompt_number": 26

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex3.11:pg-118"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "alpha1=(-10**(4)) #initializing value of absorption coefficient near the bandedges of GaAs\n",

      "alpha2=(-10**(3)) #initializing value of absorption coefficient near the bandedges of Si\n",

      "Iabs_by_Iinc = 0.9 #initializing value of amount of light absorbed\n",

      "L1 = (1.0/alpha1)*log(1-(Iabs_by_Iinc))\n",

      "print\"The thickness of a sample GaAs is ,L =\",\"{:.2e}\".format(L1),\"cm\"\n",

      "L2 = (1.0/alpha2)*log(1-(Iabs_by_Iinc))\n",

      "print\"The thickness of a sample Si is ,L = \",\"{:.2e}\".format(L2),\"cm\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The thickness of a sample GaAs is ,L = 2.30e-04 cm\n",

        "The thickness of a sample Si is ,L =  2.30e-03 cm\n"

       ]

      }

     ],

     "prompt_number": 5

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex3.12:pg-118"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "alpha=(3*10**(3)) #initializing value of absorption coefficient near the bandedges of GaAs\n",

      "p=(10**(3)) #initializing value of power density that impringes on GaAs\n",

      "Tr = 1.5*1.6*10**-19 #initializing value of photon energy\n",

      "d = 10**-3 #initializing value of photon energy\n",

      "Rg1 = (alpha*p)/Tr\n",

      "print\"The carrier generation rate at the surface is ,Rg(0)= \",\"{:.2e}\".format(Rg1),\"cm**-3s**-1\"\n",

      "Rg2 = (alpha*p*exp(-3))/Tr\n",

      "print\"The carrier generation rate at the depth of 10 um is ,Rg(10) =\",\"{:.2e}\".format(Rg2),\"cm**-3s**-1\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The carrier generation rate at the surface is ,Rg(0)=  1.25e+25 cm**-3s**-1\n",

        "The carrier generation rate at the depth of 10 um is ,Rg(10) = 6.22e+23 cm**-3s**-1\n"

       ]

      }

     ],

     "prompt_number": 6

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex3.13:pg-120"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "mo = 9.1*10**-31  #initializing value of mass of electron\n",

      "m = 0.27*mo #initializing value of effective mass of silicon\n",

      "kb = (1.38*10**-23) #initializing value of boltzman constant\n",

      "T1 = 300.0 #initializing value of temperature\n",

      "T2 = 77.0 #initializing value of temperature\n",

      "vth1=(sqrt((3*kb*T1)/(m)))*100\n",

      "print\"The thermal velocity of the electron at 300K is ,vth(300K)=\",\"{:.0e}\".format(vth1),\"cms**-1\"\n",

      "vth2=(sqrt((3*kb*T2)/(m)))*100\n",

      "print\"The thermal velocity of the electron at 77K is ,vth(77K)=\",\"{:.0e}\".format(vth2),\"cms**-1\"\n",

      "sigma=10**(-14) #initializing value of cross-section\n",

      "Nt = 10**15 #initializing value of impurity density\n",

      "Tnr1 = (1.0/(sigma*Nt*vth1))\n",

      "print\"The electron trapping time is ,Tnr1 =\",\"{:.2e}\".format(Tnr1),\"s\"\n",

      "Tnr2 = (sigma*Nt*vth2)\n",

      "print\"The electron trapping time is ,Tnr2 = \",\"{:.0e}\".format(Tnr2),\"s\"\n",

      "#NOTE: in the Textbook the author has taken the approximated value for Vth thermal velocity\\\n",

      "# NOTE: these approximated values of velocity affects the value of electron trapping time\n",

      "# in the Textbook the answer of Tnr2 is wrong."

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The thermal velocity of the electron at 300K is ,vth(300K)= 2e+07 cms**-1\n",

        "The thermal velocity of the electron at 77K is ,vth(77K)= 1e+07 cms**-1\n",

        "The electron trapping time is ,Tnr1 = 4.45e-09 s\n",

        "The electron trapping time is ,Tnr2 =  1e+08 s\n"

       ]

      }

     ],

     "prompt_number": 45

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex3.14:pg-125"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "KbT = 1.38*(10**-23)*300 #initializing value of kbT at 300K\n",

      "mu=0.4 #initializing value of mobility of p-type GaAs\n",

      "e = 1.6*10**-19 #initializing value of charge of electron\n",

      "Dn = (mu*KbT)/e\n",

      "print\"The diffusion constant using einstein relation is Dn =\",\"{:.2e}\".format(Dn),\"m**2/s\"\n",

      "T = 0.6*10**-9 #initializing value of recombination time\n",

      "Ln = sqrt(Dn*T)\n",

      "print\"The diffusion length of p type GaAs is Ln =\",\"{:.1e}\".format(Ln),\"m\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The diffusion constant using einstein relation is Dn = 1.03e-02 m**2/s\n",

        "The diffusion length of p type GaAs is Ln = 2.5e-06 m\n"

       ]

      }

     ],

     "prompt_number": 13

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex3.16:pg-126"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "e = 1.6*10**-19 #initializing value of charge of electron\n",

      "KbT = 0.026 #initializing value of kbT at 300K\n",

      "sigma=10 #initializing value of conductivity\n",

      "mu_n=1100 #initializing value of mobility of electrons\n",

      "mu_p=400 #initializing value of mobility of holes\n",

      "Nd = 10**17 #initializing value of doping\n",

      "n = sigma/(e*mu_n)\n",

      "print\"The carrier concentration in n type material is n =\",\"{:.2e}\".format(n),\"cm**-3\"\n",

      "# the answer in textbook is given in %\n",

      "#The excess drops by 50% once light is off using this fact in below equation\n",

      "T = -1/log(.5)\n",

      "print\"The recombination time is T = \",\"{:.2e}\".format(T),\"micro-sec\"\n",

      "Dp = mu_p*kbT\n",

      "print\"The diffusion constant is Dp = \",\"{:.2e}\".format(Dp),\"cm**2/s\"\n",

      "Lp = sqrt(Dp*T*10**-6)\n",

      "print\"The diffusion length is Lp =  \",\"{:.2e}\".format(Lp),\"m\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The carrier concentration in n type material is n = 5.68e+16 cm**-3\n",

        "The recombination time is T =  1.44e+00 micro-sec\n",

        "The diffusion constant is Dp =  1.04e+01 cm**2/s\n",

        "The diffusion length is Lp =   3.87e-03 m\n"

       ]

      }

     ],

     "prompt_number": 12

    }

   ],

   "metadata": {}

  }

 ]

}