summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_D_K_Bhattacharya/7-Semiconducting_materials.ipynb
blob: 2e9bd9c9e8df822a30183a180506bb78f028ca57 (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
{
"cells": [
 {
		   "cell_type": "markdown",
	   "metadata": {},
	   "source": [
       "# Chapter 7: Semiconducting materials"
	   ]
	},
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.10: find_the_new_position_of_Fermi_level.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example 7.10 , pg 214\n",
"T1=300     //temperature    (in K)\n",
"e=1.6*10^-19    //charge of electron    (in C)\n",
"k=1.38*10^-23     //Boltzmann constant    (in J/K)\n",
"T2=330     //temperature   (in K)\n",
"E1=0.3     // E1=(Ec-Ef_300)    (in eV)\n",
"E2=(E1*T2)/T1    //E2=(Ec-Ef_330)    (in eV)\n",
"printf('At 330 K the Fermi energy kevel lies ')\n",
"disp(E2)\n",
"printf('(in eV) below conduction band')"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.11: calculate_concentration_in_conduction_band.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example 7.11 , pg 214\n",
"T=300    //temperature    (in K)\n",
"e=1.6*10^-19     //charge of electron (in C)\n",
"h=6.625*10^-34    //plancks constant    (in m^2*Kg*S^-1)\n",
"Eg=1.1     //bandgap   (in eV)\n",
"k=1.38*10^-23     //Boltzmann constant    (in J/K)\n",
"Me=9.11*10^-31   //mass of electron    (in Kg)\n",
"Mn=0.31*Me     //electron effective mass\n",
"ni=2*((2*%pi*k*T*Mn)/h^2)^(3/2)*exp(-(Eg*e)/(2*k*T))     //intrinsic concentration\n",
"printf('Intrinsic concentration (in m^-3)')\n",
"disp(ni)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.12: calculate_drift_mobility_of_electro.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example7.12 , pg 214\n",
"T=300    //temperature   (in K)\n",
"Rh=0.55*10^-10      //Hall coefficient    (in  m^3/(A*s))\n",
"sigma=5.9*10^7    //conductivity       (in ohm^-1 * m^-1)\n",
"DM= Rh*sigma      //drift mobility\n",
"printf('Drift mobility  (in m^2/(V *s))=')\n",
"disp(DM)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.13: calculate_concentration_of_conduction_electrons_in_Cu.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example 7.13 , pg 215\n",
"Ud=3.2*10^-3    //electron drift mobility  (in m^2/(V*s))\n",
"sigma=5.9*10^7    //conductivity  (in /(ohm*m))\n",
"e=1.6*10^-19     //charge of electron (in C)\n",
"Na=6.022*10^23    //Avogadro constant (in mol^-1)\n",
"ni=sigma/(Ud*e)     //intrinsic concentration   (in m^-3)\n",
"Aw=63.5     //atomic weight\n",
"d=8960   //density   (in Kg/m^3)\n",
"n=10^3  //number of free electrons per atom\n",
"N=(Na*d*n)/Aw     //concentration of free electrons in pure Cu\n",
"Avg_N=ni/N      //Average number of electrons contributed per Cu atom\n",
"printf('concentration of free electrons in pure Cu   (in m^-3)')\n",
"disp(N)\n",
"printf('Average number of electrons contributed per Cu atom\n')\n",
"printf('Avg_N=%.2f ',Avg_N)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.14: calculate_charge_carrier_density_and_electron_mobility.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example7.14 , pg 215\n",
"RH=3.66*10^-11     //Hall coefficient   (in m^3/(A*s))\n",
"e=1.6*10^-19      //charge in electron   (in C)\n",
"sigma=112*10^7    //conductivity     (in (oh*m)^-1)\n",
"n=1/(RH*e)    //charge carrier density\n",
"Un=sigma/(n*e)     //electron mobility\n",
"printf('charge carrier density(in m^-3)=')\n",
"disp(n)\n",
"printf('Electron mobility=')\n",
"printf('Un=%.3f   m^2/(A*s)',Un)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.15: calculate_magnitude_of_Hall_voltage.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example7.15 , pg 216\n",
"I=50   //current  (in A)\n",
"B=1.5   //magnetic field   (in T)\n",
"d=0.2*10^-2   //width of slab   (in m)\n",
"n=8.4*10^28    //concentration of electrons (in m^-3)\n",
"e=1.6*10^-19    // charge   (in C)\n",
"VH=(B*I)/(n*e*d)    //Hall  voltage\n",
"printf('Hall voltage(in V)=')\n",
"disp(VH)\n",
"\n",
"\n",
"\n",
"\n",
"//Answer given is wrong"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.16: find_resistance_of_intrinsic_Ge.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example7.16 , pg 216\n",
"ni=2.5*10^19     //intrinsic  carrier  density(in m^-3)\n",
"Un=0.39     //electron mobility   (in m^2/(V*s))\n",
"up=0.19     //hole mobility   (in m^2/(V*s))\n",
"e=1.6*10^-19    //charge in electron (in C)\n",
"l=10^-2       //length   (in m)\n",
"A=10^-3*10^-3     //area (in m^2)\n",
"sigma=ni*e*(Un+up)    // electrical conductivity   (in  (ohm*m)^-1)\n",
"R=l/(sigma*A)      //Resistance\n",
"printf('Resistance of intrinsic Ge rod\n')\n",
"printf('R=%.0f   ohm',R)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.17: determine_the_position_of_Fermi_level.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example7.17 , pg 216\n",
"Eg=1.12    //bandgap   (in eV)\n",
"T=300   //temperature    (in K)\n",
"Me=9.11*10^-31    //mass of electron   (in Kg)\n",
"Mn=0.12*Me\n",
"Mp=0.28*Me\n",
"k=1.38*10^-23    //Boltzmann constant   (in (m^2*Kg)/(s^2*K))\n",
"Ef=(Eg/2)+((log(Mp/Mn)*3*k*T)/(4*1.6*10^-19))\n",
"printf('position of Fermi level')\n",
"printf('Ef=%.3f   eV',Ef)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.18: calculate_electrical_conductivity.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example7.18 , pg 217\n",
"ni=1.5*10^16     //intrinsic  carrier  density(in m^-3)\n",
"Un=0.13     //electron mobility   (in m^2/(V*s))\n",
"up=0.05     //hole mobility   (in m^2/(V*s))\n",
"e=1.6*10^-19    //charge in electron (in C)\n",
"sigma=ni*e*(Un+up)    // electrical conductivity\n",
"printf('Electrical conductivity\n')\n",
"printf('sigma=%.6f   (ohm*m)^-1',sigma)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.19: find_intrinsic_resistivity.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example7.19 , pg 217\n",
"ni=2.15*10^13     //intrinsic  carrier  density(in cm^-3)\n",
"Un=3900    //electron mobility   (in cm^2/(V*s))\n",
"up=1900     //hole mobility   (in cm^2/(V*s))\n",
"e=1.6*10^-19    //charge in electron (in C)\n",
"sigma_I=ni*e*(Un+up)    // electrical conductivity   (in  (ohm*cm)^-1)\n",
"rho_I=1/sigma_I    //intrinsic resistivity\n",
"printf('Intrinsic resistivity\n')\n",
"printf('rho_I=%.0f   ohm*cm',rho_I)\n",
"\n",
"\n",
"\n",
"\n",
"//Intrisic carrier density is given as 2.15*10^-13  instead of 2.15*10^13"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.1: Evaluate_approximate_donor_binding_energy.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example7.1 , pg 208\n",
"Er=13.2       // relative permittivity\n",
"Me=9.11*10^-31      //mass of electron    (in Kg)\n",
"Mnc=0.067*Me\n",
"h=6.625*10^-34    //plancks constant  (in Js)\n",
"Eo=8.85*10^-12\n",
"e=1.6*10^-19      //electronic charge of electron (in C)\n",
"E=(Mnc*e^4)/(8*(Er*Eo)^2*h^2)      //Donor binding energy   (in J)\n",
"printf('Donor binding energy (in J)=')\n",
"disp(E)\n",
"printf('E=%.4f   eV',(E/e))"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.20: find_electrical_conductivity_before_and_after_addition_of_B_atoms.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example7.20 , pg 217\n",
"ni=2.1*10^19     //intrinsic  carrier  density(in m^-3)\n",
"Un=0.4     //electron mobility   (in m^2/(V*s))\n",
"up=0.2     //hole mobility   (in m^2/(V*s))\n",
"e=1.6*10^-19    //charge in electron (in C)\n",
"sigma=ni*e*(Un+up)    // electrical conductivity\n",
"printf('Electrical conductivity\n')\n",
"printf('sigma=%.3f   (ohm*m)^-1',sigma)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.21: find_Hall_coefficient_and_electron_mobility.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example 7.21 , pg 218\n",
"e=1.6*10^-19    // charge of electron   (in C)\n",
"I=5*10^-3     // current  (in mA)\n",
"V=1.35   // voltage   (in V)\n",
"Vh=20*10^-3    //Hall voltage   (in V)\n",
"B=0.45    //magnetic induction   (in T)\n",
"l=10^-2   //length   (in m)\n",
"b=5*10^-3    //breadth   (in m)\n",
"d=10^-3     //thickness    (in m)\n",
"R=V/I     //resistance    (in ohm)\n",
"A=b*d    //area   (in m^2)\n",
"rho= (R*A)/l    //resistivity    (in ohm*m)\n",
"E=Vh/d      //Hall electric field  (in V/m)\n",
"J=I/A     //current density   (in A/m^2)\n",
"Rh=E/(B*J)    //Hall coefficient \n",
"Un=Rh/rho    //electron mobility   (in m^2/(V*S))\n",
"printf('Hall coefficient =')\n",
"printf('Rh=%.3f  m^3/C \n',Rh)\n",
"printf('Electron mobility=')\n",
"printf('Un=%.2f m^2/(V*S)',Un)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.22: find_Hall_potential_difference.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example7.22 , pg 218\n",
"Ix=200   //current  (in A)\n",
"Bz=1.5   //magnetic field   (in T)\n",
"d=10^-3   //width of slab   (in m)\n",
"p=8.4*10^28    //concentration of electrons (in m^-3)\n",
"e=1.6*10^-19    // charge   (in C)\n",
"VH=(Bz*Ix)/(p*e*d)    //Hall  voltage\n",
"printf('Hall voltage(in V)=')\n",
"disp(VH)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.2: calculate_equilibrium_hole_concentration_and_how_is_Ef_located_relative_to_Ei.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example 7.2 , pg 208\n",
"ni=1.5*10^10      //intrinsic concentration   (in cm^-3)\n",
"Nd=10^16    //donor concentration   (in atoms/cm^3)\n",
"T=300     //temperature    (in K)\n",
"e=1.6*10^-19    //charge of electron    (in C)\n",
"k=1.38*10^-23     //Boltzmann constant    (in J/K)\n",
"n0=Nd     //Assuming  n0=Nd      ( since    Nd >> ni)\n",
"p0=ni^2/n0     //hole concentration\n",
"E=k*T*log(n0/ni)     // E=(Ef-Ei)    location of Ef relative to Ei\n",
"printf('Hole concentration (in cm^-3)')\n",
"disp(p0)\n",
"printf('Location of Ef relative to Ei   (in eV)')\n",
"disp(E/e)\n",
"x = linspace(-5.5,5.5,51);\n",
"y = 1 ;\n",
"\n",
"scf(2);\n",
"clf(2);\n",
"plot(x,y+0.1);\n",
"\n",
"plot(x,y,'ro-');\n",
"plot(x,y-0.347,'--');\n",
"plot(x,y*0,'bs:');\n",
"xlabel(['x axis';'(independent variable)']);\n",
"ylabel('Energy level (eV)');\n",
"title('Band diagram');\n",
"legend(['Ec';'Ef';'Ei';'Ev']);\n",
"set(gca(),'data_bounds',matrix([-6,6,-0.1,1.1],2,-1));"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.3: calculate_resistivity_of_sample.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example7.3 , pg 208\n",
"Nd=10^14     //Donor density   (in atoms/cm^3)\n",
"e=1.6*10^-19     //electronic charge of electron   (in C)\n",
"Un=3900      // electron mobility (in cm^2/(V*s))     for Ge at 300 K\n",
"sigma=Nd*e*Un     //conductivity\n",
"rho=1/sigma       //resistivity\n",
"printf('Resistivity=\n')\n",
"printf('rho=%.2f    ohm*cm',rho)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.4: calculate_resistivity_and_Hall_coefficient_and_Hall_voltage.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example7 4 , pg 209\n",
"e=1.6*10^-19    //charge in electron (in C)\n",
"Ix=2*10^-3    //current (in A)\n",
"d=200*10^-4     //thickness   (in cm)\n",
"Bz=5*10^-5    //magnetic induction   (in Wb/cm^2)\n",
"Un=800    //electron mobility   (in cm^2/(V*s))\n",
"n=5*10^16     //doping concentration    (in atoms/cm^3)\n",
"\n",
"sigma=n*e*(Un)    // electrical conductivity\n",
"rho=1/sigma    //resistivity\n",
"Rh=-1/(e*n)    //Hall coefficient\n",
"Vh=-(Ix*Bz)/(d*e*n)    //Hall  voltage\n",
"printf('Resistivity(in ohm*cm)')\n",
"disp(rho)\n",
"printf('Hall coefficient(in cm^3/C)')\n",
"disp(Rh)\n",
"printf('Hall voltage (in V)')\n",
"disp(Vh)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.5: EX7_5.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example 7.5 , pg 210\n",
"T=300    //temperature    (in K)\n",
"Un=0.4   //electron mobility    (in m^2/(V*s))\n",
"Up=0.2   //hole mobility    (in m^2/(V*s))\n",
"e=1.6*10^-19     //charge of electron (in C)\n",
"h=6.625*10^-34    //plancks constant    (in m^2*Kg*S^-1)\n",
"Eg=0.7     //bandgap   (in eV)\n",
"k=1.38*10^-23     //Boltzmann constant    (in J/K)\n",
"Me=9.11*10^-31   //mass of electron    (in Kg)\n",
"Mn=0.55*Me     //electron effective mass\n",
"Mp=0.37*Me     //hole effective mass\n",
"ni=2*((2*%pi*k*T)/h^2)^(3/2)*(Mn*Mp)^(3/4)*exp(-(Eg*e)/(2*k*T))     //intrinsic concentration\n",
"sigma=ni*e*(Un+Up)     //intrinsic conductivity\n",
"rho=1/sigma      //intrinsic resistivity\n",
"printf('Intrinsic concentration (in m^-3)')\n",
"disp(ni)\n",
"printf('Intrinsic conductivity (in /(ohm*m)')\n",
"disp(sigma)\n",
"printf('Intrinsic resistivity  (in ohm*m)')\n",
"disp(rho)\n",
"\n",
"\n",
"//answer given is wrong"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.6: calculate_Fermi_energy_with_respect_to_Fermi_energy.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example 7.6 , pg 211\n",
"Nd=10^16     //donor concentration (in cm^-3)\n",
"ni=1.45*10^10     //intrinsic concentration  (in cm^-3)\n",
"T=300     //temperature    (in K)\n",
"e=1.6*10^-19    //charge of electron    (in C)\n",
"k=1.38*10^-23     //Boltzmann constant    (in J/K)\n",
"E=k*T*log(Nd/ni)      //E=(Efd-Ei)   Fermi energy  with respect to  Fermi energy in intrinsic Si\n",
"printf('Fermi energy  with respect to  Fermi energy in intrinsic Si(in eV)')\n",
"disp(E/e)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.7: find_resistance_of_pure_and_doped_Si_crystal.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example 7.7 , pg 211\n",
"rho=2300   //resistivity  (in ohm*m)   for Si            (value given in book is wrong)\n",
"ni=1.6*10^16     //intrinsic concentration   (in m^-3)\n",
"Ue=0.15      //electron mobility   (in m^2/(V*s))\n",
"e=1.6*10^-19    //charge of electron   (in C)\n",
"//   assuming  1*1*1 (in cm)  dimension of Si crystal\n",
"l=10^-2    //length   (in m)\n",
"b=10^-2     //breadth   (in m)\n",
"w=10^-2      //width   (in m)\n",
"Nsi=5*10^28    //   (in atoms/m^3)\n",
"x=1/10^9      //doping concentration\n",
"A=l*b     //area   (in m^2)\n",
"R1=(rho*l)/A      //resistance of pure Si crystal   (in ohm)\n",
"Nd=Nsi*x      //donor concentration    (in m^-3)\n",
"p=ni^2/Nd   //concentration of hole   (in m^-3)\n",
"sigma=Nd*Ue*e   //coductivity of doped Si   (in ohm^-1*m^-1)\n",
"R=l/(sigma*A)    //resistance of doped Si crystal   (in ohm)\n",
"printf('Resistance of pure Si crystal  (in ohm)')\n",
"disp(R1)\n",
"printf('Resistance of doped Si crystal (in ohm)')\n",
"disp(R)\n",
"\n",
"\n",
"//answer given is wrong"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.8: compute_forbidden_energy_gap.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example 7.8 , pg 212\n",
"rho=2.12    //resistivity   (in ohm*m)\n",
"T=300   //temperature   (in K)\n",
"Un=0.36    //electron mobility   (in m^2/(V*s))\n",
"Up=0.17     //hole mobility     (in m^2/(V*s))\n",
"h=6.625*10^-34    //plancks constant    (in m^2*Kg*S^-1)\n",
"k=1.38*10^-23     //Boltzmann constant    (in J/K)\n",
"e=1.6*10^-19     //charge in electron  (in C)\n",
"Me=9.11*10^-31   //mass of electron    (in Kg)\n",
"Mn=0.5*Me     //electron effective mass\n",
"Mp=0.37*Me     //hole effective mass\n",
"ni=1/(rho*e*(Un+Up))     //intrinsic concentration   (in m^-3)\n",
"Nc=2*((2*%pi*k*T)/h^2)^(3/2)*(Mn)^(3/2)      //effective density of states in conduction band (in m^-3)\n",
"Nv=2*((2*%pi*k*T)/h^2)^(3/2)*(Mp)^(3/2)      //effective density of states in valence band (in m^-3)\n",
"Eg=2*k*T*log(sqrt(Nc*Nv)/ni)        //Forbidden energy gap\n",
"printf('Forbidden energy gap=')\n",
"printf('Eg=%.3f  eV',Eg/e)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 7.9: calculate_conductivity_of_sample.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// chapter 7 , Example7.9 , pg 213\n",
"ni=2.4*10^19     //intrinsic  carrier  density(in m^-3)\n",
"Un=0.39     //electron mobility   (in m^2/(V*s))\n",
"up=0.19     //hole mobility   (in m^2/(V*s))\n",
"e=1.6*10^-19    //charge in electron (in C)\n",
"sigma=ni*e*(Un+up)    // electrical conductivity\n",
"printf('Electrical conductivity\n')\n",
"printf('sigma=%.3f   (ohm*m)^-1',sigma)"
   ]
   }
],
"metadata": {
		  "kernelspec": {
		   "display_name": "Scilab",
		   "language": "scilab",
		   "name": "scilab"
		  },
		  "language_info": {
		   "file_extension": ".sce",
		   "help_links": [
			{
			 "text": "MetaKernel Magics",
			 "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
			}
		   ],
		   "mimetype": "text/x-octave",
		   "name": "scilab",
		   "version": "0.7.1"
		  }
		 },
		 "nbformat": 4,
		 "nbformat_minor": 0
}