50% found this document useful (2 votes)
2K views76 pages

Solid State Physics - P. K. Palanisamy

This document provides a list of 153 Scilab codes that accompany examples and problems from the textbook "Solid State Physics" by P. K. Palanisamy. The codes are organized by chapter and cover topics ranging from bonding in solids to semiconductors, superconductivity, lasers, and fiber optics. For each code, it provides the example or problem number from the textbook that it relates to. This allows users to easily find the relevant code when working through problems in the textbook.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
50% found this document useful (2 votes)
2K views76 pages

Solid State Physics - P. K. Palanisamy

This document provides a list of 153 Scilab codes that accompany examples and problems from the textbook "Solid State Physics" by P. K. Palanisamy. The codes are organized by chapter and cover topics ranging from bonding in solids to semiconductors, superconductivity, lasers, and fiber optics. For each code, it provides the example or problem number from the textbook that it relates to. This allows users to easily find the relevant code when working through problems in the textbook.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 76

Scilab Textbook Companion for

Solid State Physics


by P. K. Palanisamy1

Created by
Ankush Kumar Bedyal
Solid State Physics
Physics
Shri Mata Vaishno Devi University
College Teacher
Dr. Vinay Kumar
Cross-Checked by
Lavitha Pereira

July 31, 2019

1 Funded by a grant from the National Mission on Education through ICT,


http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilab
codes written in it can be downloaded from the ”Textbook Companion Project”
section at the website http://scilab.in
Book Description

Title: Solid State Physics

Author: P. K. Palanisamy

Publisher: Scitech Publication (India) Pvt. Ltd., Chennei

Edition: 1

Year: 2004

ISBN: 8188429279

1
Scilab numbering policy used in this document and the relation to the
above book.

Exa Example (Solved example)

Eqn Equation (Particular equation of the above book)

AP Appendix to Example(Scilab Code that is an Appednix to a particular


Example of the above book)

For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means
a scilab code whose theory is explained in Section 2.3 of the book.

2
Contents

List of Scilab Codes 4

1 Bonding in Solids 5

2 Crystal Structure 8

3 Crystal Planes and Defects 13

4 Line Defects and Crystal Structure Determination 22

5 Principles of Quantum Mechanics 28

6 Electron Theory of Metals 36

7 Dielectric Properties 43

8 Magnetic Properties 48

9 Semiconductors 53

10 Superconductivity 66

11 Lasers 68

12 Fibre Optics 70

3
List of Scilab Codes

Exa 1.1 Stability of gaseous molecules . . . . . . . . 5


Exa 1.2 Energy and separation in KCl ion pair . . . 6
Exa 1.3 Bond energy of NaCl molecule . . . . . . . . 6
Exa 2.1 Maximum radius of interstitial sphere in BCC 8
Exa 2.2 Volume Phase change BCC to FCC . . . . . 8
Exa 2.3 Calculation of volume and density of Zinc . 9
Exa 2.4 Maximum radius of interstitial sphere in FCC 10
Exa 2.5 Density of diamond . . . . . . . . . . . . . 10
Exa 2.6 Distance between two adjacent atoms in NaCl 11
Exa 2.7 Density of copper crystal . . . . . . . . . . 11
Exa 3.1 Number of atoms per square mm in SC . . . 13
Exa 3.2 Maximum radius of sphere in BCC lattice . 14
Exa 3.3 Volume change during BCC to FCC . . . . 14
Exa 3.4 Volume and density of unit cell in HCP Zn
structure . . . . . . . . . . . . . . . . . . . . 15
Exa 3.5 Interplanar spacing in 110 and 212 planes in
FCC lattice . . . . . . . . . . . . . . . . . . 16
Exa 3.6 Ratio of interplanar spacing in SC lattice . . 17
Exa 3.7 Miller indices of a plane in SC lattice . . . . 17
Exa 3.8 Ratio of vacancies in metal . . . . . . . . . . 18
Exa 3.9 Fraction of vacancy sites in metal . . . . . 19
Exa 3.10 Average energy required to create Schottky
defect . . . . . . . . . . . . . . . . . . . . . 19
Exa 3.11 Ratio of vacancies in metal to create Frenkel
defect . . . . . . . . . . . . . . . . . . . . . 20
Exa 4.1 Wavelength of X ray and order of diffraction 22
Exa 4.2 Ratio of interplanar spacing in simple cube . 23
Exa 4.3 Wavelength of X ray from Bragg Law . . . . 23

4
Exa 4.4 Interatomic spacing . . . . . . . . . . . . . . 24
Exa 4.5 Glancing angle for second order diffraction . 25
Exa 4.6 Distance between two adjacent atoms in NaCl 25
Exa 4.7 Distance between 110 plane . . . . . . . . . 26
Exa 4.8 Density of Iron . . . . . . . . . . . . . . . . 26
Exa 5.1 de Broglie wavelength of proton . . . . . . . 28
Exa 5.2 de Broglie wavelength of electron . . . . . . 28
Exa 5.3 de Broglie wavelength of neutron . . . . . . 29
Exa 5.4 Uncertainty in momentum of electron . . . . 29
Exa 5.5 Uncertainty in velocity of electron . . . . . . 30
Exa 5.6 Uncertainty in time . . . . . . . . . . . . . . 30
Exa 5.7 Lowest Energy for electron confinement . . . 31
Exa 5.8 Next Lowest Energy level for electron confine-
ment . . . . . . . . . . . . . . . . . . . . . . 31
Exa 5.9 de Broglie wavelength from energy . . . . . 32
Exa 5.10 Minimum Energy . . . . . . . . . . . . . . . 33
Exa 5.11 Energy of ground and first and second state 33
Exa 5.12 Velocity and energy of electron . . . . . . . 34
Exa 5.13 Wavelength of electron waves . . . . . . . . 34
Exa 5.14 Uncertainty in momentum of electron . . . . 35
Exa 6.1 Electron Density and mobility in silver . . . 36
Exa 6.2 Mobility and average time of collision in cop-
per . . . . . . . . . . . . . . . . . . . . . . . 37
Exa 6.3 Electrical resistivity in Sodium metal . . . . 37
Exa 6.4 Resistivity of sodium at zero degree Celsius 38
Exa 6.5 Next Lowest Energy level for electron confine-
ment . . . . . . . . . . . . . . . . . . . . . . 39
Exa 6.7 Energy level for electron confinement and equiv-
alent temperature . . . . . . . . . . . . . . . 39
Exa 6.9 Temperature from Fermi function . . . . . 40
Exa 6.10 Temperature for occupation of a state above
Fermi level . . . . . . . . . . . . . . . . . . 41
Exa 6.11 Number of energy state in unit volume . . . 41
Exa 6.12 Temperature needed to fill a state above Fermi
level . . . . . . . . . . . . . . . . . . . . . . 42
Exa 7.1 Net energy stored in capacitor . . . . . . . . 43
Exa 7.2 Ratio of polarization . . . . . . . . . . . . . 43
Exa 7.3 Parallel loss resistance and capacitance . . . 44

5
Exa 7.4 Dielectric constant of the material . . . . . . 45
Exa 7.5 Electric polarizability of He atoms . . . . . 45
Exa 7.6 Capacitance and charge on the plates . . . . 46
Exa 7.7 Electric polarizability of sulphur atoms . . . 47
Exa 8.1 Relative permeability . . . . . . . . . . . . . 48
Exa 8.2 Magnetization and flux density of ferromag-
netic material . . . . . . . . . . . . . . . . . 48
Exa 8.3 Magnetization and flux density . . . . . . . 49
Exa 8.4 Magnetic moment . . . . . . . . . . . . . . . 50
Exa 8.5 Calculation of temperature using classical statis-
tics . . . . . . . . . . . . . . . . . . . . . . . 50
Exa 8.6 Saturation magnetization . . . . . . . . . . 51
Exa 8.7 Magnetic moment of nickel in Bohr Magneton 52
Exa 9.1 Resistivity . . . . . . . . . . . . . . . . . . . 53
Exa 9.2 Determination of Fermi level . . . . . . . . 53
Exa 9.3 Number of intrinsic carriers at 300K . . . . 54
Exa 9.4 Resistivity of Ge sample . . . . . . . . . . . 55
Exa 9.5 Resistance of Ge rod . . . . . . . . . . . . . 55
Exa 9.6 Conductivity of Si . . . . . . . . . . . . . . 56
Exa 9.7 Electron and hole concentration in silicon . 57
Exa 9.8 Temperature that shift the fermi level . . . 57
Exa 9.9 Conductivity of intrinsic silicon at 300 K . . 58
Exa 9.10 Conductivity and Position of Ef above the in-
trinsic level . . . . . . . . . . . . . . . . . . 59
Exa 9.11 Intrinsic carrier concentration and conductiv-
ity in germanium . . . . . . . . . . . . . . . 60
Exa 9.12 Forbidden energy band gap . . . . . . . . . 61
Exa 9.13 Hall Voltage of a semiconductor . . . . . . 62
Exa 9.14 Hall coefficient of a semiconductor . . . . . 62
Exa 9.15 Mobility density and nature of semiconductor 63
Exa 9.16 Hall Voltage . . . . . . . . . . . . . . . . . . 63
Exa 9.17 Mobility and number of Charge carrier . . . 64
Exa 10.1 Critical field . . . . . . . . . . . . . . . . . . 66
Exa 10.2 Critical current and Critical field . . . . . . 66
Exa 11.1 Ratio of relative population . . . . . . . . . 68
Exa 11.2 Energy of excited state of laser system . . . 69
Exa 12.1 Numerical aperture and acceptance angle of
optical fibre . . . . . . . . . . . . . . . . . . 70

6
Exa 12.2 V and mode of optical fibre . . . . . . . . . 71
Exa 12.3 Loss in signal . . . . . . . . . . . . . . . . . 71

7
Chapter 1

Bonding in Solids

Scilab code Exa 1.1 Stability of gaseous molecules

1 // S c i l a b Code Ex1 . 1 : Page −1.8 ( 2 0 0 4 )


2 clc ; clear ;
3 N = 6.022 e +23; // Avogadro Number ; / mol
4 E_A = 502; // F i r s t i o n i z a t i o n e n e r g y o f A
atom , kJ / mol
5 E_B = -335; // E l e c t r o n a f f i n i t y f o r B atom ,
kJ
6 r = 3e -10; // V e l o c i t y o f t h e p a r t i c l e a t t h e
mean p o s i t i o n , a n g s t r o m
7 E_o = 8.85 e -12; // P e r m i t t i v i t y o f f r e e s p a c e , C/Nˆ2−
mˆ2
8 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
9 E_C = N *( - e ^2) /(4* %pi * E_o * r ) *1 e -03; // The
c o u l o m b i c e l e c t r o s t a t i c a t t a c t i o n e n e r g y , kJ / mol
10 E = E_A + E_B + E_C ; // Net c h a n g e i n e n e r g y p e r
mol , kJ / mol
11 printf ( ” \ nNet c h a n g e i n e n e r g y p e r mol = %3d kJ / mol ”
, E);
12 disp ( ” S i n c e n e t c h a n g e i n e n e r g y i s n e g a t i v e , t h e
m o l e c u l e A+B− i s s t a b l e . ” ) ;
13

8
14 // R e s u l t
15 // Net c h a n g e i n e n e r g y p e r mol = −295 kJ / mol
16 // S i n c e n e t c h a n g e i n e n e r g y i s n e g a t i v e , t h e
m o l e c u l e A+B− i s s t a b l e .

Scilab code Exa 1.2 Energy and separation in KCl ion pair

1 // S c i l a b Code Ex1 . 2 : Page −1.8 ( 2 0 0 4 )


2 clc ; clear ;
3 A = 4.1; // I o n i z a t i o n e n e r g y o f K, eV
4 B = 3.6; // E l e c t r o n a f f i n i t y o f Cl , eV
5 C = A - B; // Net e n e r g y t o p r o d u c e t h e i o n p a i r ,
eV
6 E = C; // Coulomb e n e r g y , eV
7 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
8 E_o = 8.85 e -12; // P e r m i t t i v i t y o f f r e e s p a c e , C/Nˆ2−
mˆ2
9 R = e /(4* %pi * E_o * C ) ; // R i s t h e s e p a r a t i o n
b e t w e e n K and Cl , nm
10 printf ( ” \ nThe coulomb e n e r g y E = %3 . 1 f eV” , E ) ;
11 printf ( ” \ n S e p a r a t i o n b e t w e e n K and Cl , R = %4 . 2 f nm”
, R /1 e -09) ;
12
13 // R e s u l t
14 // The coulomb e n e r g y E = 0 . 5 eV
15 // S e p a r a t i o n b e t w e e n K and Cl , R = 2 . 8 8 nm

Scilab code Exa 1.3 Bond energy of NaCl molecule

1 // S c i l a b Code Ex1 . 3 : Bond e n e r g y o f NaCl m o l e c u l e


Page −1.9 ( 2 0 0 4 )
2 clc ; clear ;
3 A = 5.14; // I o n i z a t i o n e n e r g y o f Na , eV

9
4 B = 3.65; // E l e c t r o n a f f i n i t y o f Cl , eV
5 r0 = 236 e -12; // I n t e r i o n i c e q u i l i b r i u m d i s t a n c e ,
m
6 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
7 E_o = 8.85 e -12; // P e r m i t t i v i t y o f f r e e s p a c e , C/Nˆ2−
mˆ2
8 Ue = -e /(4* %pi * E_o * r0 ) ; // P o t e n t i a l e n e r g y t o
p r o d u c e t h e i o n p a i r , eV
9 BE = -Ue - A + B
10 printf ( ” \ nThe p o t e n t i a l e n e r g y Ue = %2 . 1 f eV” , Ue ) ;
11 printf ( ” \ nThe B i n d i n g e n e r g y BE = %4 . 2 f eV” , BE ) ;
12
13 // R e s u l t
14 // The p o t e n t i a l e n e r g y Ue = −6.1 eV
15 // The B i n d i n g e n e r g y BE = 4 . 6 1 eV

10
Chapter 2

Crystal Structure

Scilab code Exa 2.1 Maximum radius of interstitial sphere in BCC

1 // S c i l a b Code Ex2 . 1 Page −2.21 ( 2 0 0 4 )


2 clc ; clear ;
3 r = 1; // For s i m p l i c i t y assume r a d i u s o f atom t o
be u n i t y , u n i t
4 a = 4* r / sqrt (3) ; // L a t t i c e c o n s t a n t , u n i t
5 R = (a -2* r ) /2; // R be t h e r a d i u s o f
i n t e r s t i t i a l s p h e r e t h a t can f i t i n t o v o i d , u n i t
6
7 printf ( ” \ n R a d i u s o f i n t e r s t i t i a l s p h e r e t h a t can
f i t i n t o v o i d R = %5 . 3 f r ” , R ) ;
8
9 // Result
10 // R a d i u s o f i n t e r s t i t i a l s p h e r e t h a t can f i t i n t o
void R = 0.155 r

Scilab code Exa 2.2 Volume Phase change BCC to FCC

1 // S c i l a b Code Ex2 . 2 : Page −2.22 ( 2 0 0 4 )

11
2 clc ; clear ;
3 r1 = 1.258 e -10; // R a d i u s o f atom f o r BCC, m
4 a = 4* r1 /(3^(0.5) ) ; // L a t t i c e c o n s t a n t f o r BCC
atom , m
5 V_bcc = a ^3; // Volume o f u n i t c e l l o f BCC , i n mˆ3
6 V_one = V_bcc /2; // Volume o c c u p i e d by one atom i n
BCC, i n mˆ3
7 r2 = 1.292 e -10; // R a d i u s o f atom f o r FCC, m
8 b = 2*( sqrt (2) ) * r2 // L a t t i c e c o n s t a n t f o r FCC
atom
9 V_fcc = b ^3; // Volume o f u n i t c e l l o f FCC , i n mˆ3
10 V_two = V_bcc /4; // Volume o c c u p i e d by one atom i n
FCC, i n mˆ3
11 DV = ( V_one - V_two ) / V_one ; // Change i n volume ,
percentage
12
13 printf ( ” \ nChange i n volume DV =%3 . 1 f p e r c e n t a g e . ” ,
DV ) ;
14
15 // R e s u l t
16 // Change i n volume DV =0.5 p e r c e n t a g e .

Scilab code Exa 2.3 Calculation of volume and density of Zinc

1 // S c i l a b Code Ex2 . 3 : Page −2.23 ( 2 0 0 4 )


2 clc ; clear ;
3 a = 0.27 e -9; // N e a r e s t n e i g h b o u r d i s t a n c e , m
4 c = 0.494 e -9; // H e i g h t o f u n i t c e l l , m
5 V = 3*( sqrt (3) ) *( a ^2) * c /2; // Volume o f u n i t c e l l
o f HCP , i n m e t r e c u b e
6 N = 6.023 e +26; // Avodagro number , p e r k−mol
7 M = 65.37; // Atomic w e i g h t o f z i n c ,
8 rho = 6* M /( V * N ) ; // D e n s i t y o f z i n c , kg p e r
metre cube
9 printf ( ” \ nVolume = %4 . 3 e m e t r e c u b e ” , V ) ;

12
10 printf ( ” \ n D e n s i t y o f z i n c = %d kg p e r m e t r e c u b e ” ,
rho ) ;
11
12 // R e s u l t
13 // Volume = 9 . 3 5 6 e −29 m e t r e c u b e
14 // D e n s i t y o f z i n c = 6 9 6 0 kg p e r m e t r e c u b e

Scilab code Exa 2.4 Maximum radius of interstitial sphere in FCC

1 // S c i l a b Code Ex2 . 4 : Page −2.23 ( 2 0 0 4 )


2 clc ; clear ;
3 r = 1; // For s i m p l i c i t y assume r a d i u s o f atom t o
be u n i t y , u n i t
4 a = 4* r / sqrt (2) ; // L a t t i c e c o n s t a n t , u n i t
5 R = ( a /2) -r ; // R be t h e r a d i u s o f i n t e r s t i t i a l
s p h e r e t h a t can f i t i n t o v o i d , u n i t
6
7 printf ( ” \nMaximum R a d i u s o f i n t e r s t i t i a l s p h e r e
t h a t can f i t i n t o FCC = %5 . 3 f r ” , R ) ;
8
9 // Result
10 // Maximum R a d i u s o f i n t e r s t i t i a l s p h e r e t h a t can
f i t i n t o FCC = 0 . 4 1 4 r

Scilab code Exa 2.5 Density of diamond

1 // S c i l a b Code Ex2 . 5 : Page −2.24 ( 2 0 0 4 )


2 clc ; clear ;
3 a = 0.356 e -9; // Cube e d g e o f diamond , m
4 n = 8/ a ^3; // Number o f atoms p e r u n i t volume ,
per metre cube
5 M = 12.01; // Atomic w e i g h t o f Carbon , g p e r mol
6 N = 6.023 e +26; // Avagadro number , p e r kmol

13
7 m = M/N; // Mass o f one c a r b o n atom , kg
8 rho = m * n ; // D e n s i t y o f diamond , kg p e r m e t r e
cube
9 printf ( ” \ n D e n s i t y o f diamond = %4 . 0 f kg p e r m e t r e
c u b e ” , round ( rho ) ) ;
10
11 // R e s u l t
12 // D e n s i t y o f diamond = 3 5 3 6 kg p e r m e t r e c u b e

Scilab code Exa 2.6 Distance between two adjacent atoms in NaCl

1 // S c i l a b Code Ex2 . 6 : Page −2.25 ( 2 0 0 4 )


2 clc ; clear ;
3 M = 58.5; // M o l e c u l a r w e i g h t o f Carbon , g p e r mol
4 N = 6.023 e +23; // Avagadro number , p e r mol
5 m = M/N; // Mass o f one NaCl m o l e c u l e , g
6 n = 2.18/ m ; // Number o f NaCl m o l e c u l e s p e r u n i t
volume , m o l e c u l e s p e r cm c u b e
7 n1 = 2* n ; // S i n c e NaCl i s a d i a t o m i c , number o f
atoms p e r u n i t volume i s t w i c e
8 a = 1/ n1 ^(1/3) ; // D i s t a n c e b e t w e e n two a d j a c e n t
atoms i n NaCl , a n g s t r o m
9
10 printf ( ” \ n D i s t a n c e b e t w e e n two a d j a c e n t atoms i n
NaCl = %4 . 2 f a n g s t r o m ” , a /1 e -8) ;
11
12 // R e s u l t
13 // D i s t a n c e b e t w e e n two a d j a c e n t atoms i n NaCl =
2 . 8 1 angstrom

Scilab code Exa 2.7 Density of copper crystal

1 // S c i l a b Code Ex2 . 7 : Page −2.25 ( 2 0 0 4 )

14
2 clc ; clear ;
3 M = 63.5; // Atomic w e i g h t o f Copper , g p e r mol
4 N = 6.023 e +23; // Avagadro number , p e r mol
5 r = 1.278 e -8; // Atomic r a d i u s o f c o p p e r , cm
6 m = M/N; // Mass o f one Cu atom , kg
7 a = (4* r ) / sqrt (2) ; // D i s t a n c e b e t w e e n two a d j a c e n t
atom i n Cu , a n g s t r o m
8 n1 = 4* m ; // S i n c e number o f atom p e r u n i t c e l l i s
4
9 d = n1 / a ^3; // D e n s i t y o f c o p p e r , kg p e r m e t r e
cube
10
11 printf ( ” \ n D e n s i t y o f c o p p e r = %4 . 2 f g p e r cm c u b e ” ,
d);
12
13 // R e s u l t
14 // D e n s i t y o f c o p p e r = 8 . 9 3 g p e r cm c u b e

15
Chapter 3

Crystal Planes and Defects

Scilab code Exa 3.1 Number of atoms per square mm in SC

1 // S c i l a b Code Ex3 . 1 : Page −3.4 ( 2 0 0 4 )


2 // I n a SC s t r u c t u r e number o f p l a n e s a r e h a v i n g
t h r e e a r r a n g e m e n t ( 1 0 0 ) , ( 1 1 0 ) and ( 1 1 1 )
3 clc ; clear ;
4 a = 1; // For s i m p l i c i t y l a t t i c e c o n s t a n t i s
t a k e n t o be u n i t y
5 A_100 = a ^2; // Area o f t h e p l a n e ( 1 0 0 ) , mmˆ2
6 N_100 = 1/ A_100 ; // Number o f atoms a l o n g ( 1 0 0 )
p l a n e , atoms p e r s q u a r e mm
7 A_110 = sqrt (2) * a ^2; // Area o f t h e p l a n e ( 1 1 0 ) ,
mmˆ2
8 N_110 = 1/ A_110 ; // // Number o f atoms a l o n g
( 1 1 0 ) p l a n e , atoms p e r s q u a r e mm
9 A_111 = 1/2* a * sqrt (2) * sqrt (2) * a ^2* cosd (30) ; //
Area o f t h e p l a n e ( 1 1 0 ) , mmˆ2
10 A_111t = 0.5; // T o t a l no o f atoms i n ( 1 1 1 )
plane
11 N_111 = A_111t / A_111 ; // // Number o f atoms
a l o n g ( 1 1 0 ) p l a n e , atoms p e r s q u a r e mm
12 printf ( ” \nNumber o f atoms a l o n g ( 1 0 0 ) p l a n e= %d / a ˆ2
atoms p e r s q u a r e mm” , N_100 ) ;

16
13 printf ( ” \nNumber o f atoms a l o n g ( 1 1 0 ) p l a n e= %f
atoms p e r s q u a r e mm” , N_110 ) ;
14 printf ( ” \nNumber o f atoms a l o n g ( 1 1 1 ) p l a n e= %5 . 3 f /
a ˆ2 atoms p e r s q u a r e mm” , N_111 ) ;
15 // R e s u l t
16 // Number o f atoms a l o n g ( 1 0 0 ) p l a n e= 1 / a ˆ2 atoms
p e r s q u a r e mm
17 // Number o f atoms a l o n g ( 1 1 0 ) p l a n e= 0 . 7 0 7 1 0 7
atoms p e r s q u a r e mm
18 // Number o f atoms a l o n g ( 1 1 1 ) p l a n e= 0 . 5 7 7 / a ˆ2
atoms p e r s q u a r e mm

Scilab code Exa 3.2 Maximum radius of sphere in BCC lattice

1 // S c i l a b Code Ex3 . 2 : Page − 3 . 5 ( 2 0 0 4 )


2 clc ; clear ;
3 r = 1; // For s i m p l i c i t y assume r a d i u s o f atom t o
be u n i t y , u n i t
4 a = 4* r / sqrt (3) ; // L a t t i c e c o n s t a n t , u n i t
5 R = ( a /2) -r ; // R be t h e r a d i u s o f i n t e r s t i t i a l
s p h e r e t h a t can f i t i n t o v o i d , u n i t
6 printf ( ” \nMaximum R a d i u s o f s p h e r e t h a t can f i t
i n t o BCC = %5 . 3 f r ” , R ) ;
7
8 // Result
9 // Maximum R a d i u s o f s p h e r e t h a t can f i t i n t o BCC =
0.155 r

Scilab code Exa 3.3 Volume change during BCC to FCC

1 // S c i l a b Code Ex3 . 3 : Page −3.6 ( 2 0 1 0 )


2 clc ; clear ;
3 r1 = 1.258 e -10; // Atomic r a d i u s i n BCC, m e t r e

17
4 a1 = 4* r1 / sqrt (3) ; // L a t t i c e c o n s t a n t f o r BCC,
metre
5 V1 = a1 ^3; // Volume o f u n i t c e l l i n BCC, m e t r e
cube
6 Vpa = V1 /2; // Volume o c c u p i e d by one atom i n BCC,
metre cube
7 r2 = 1.292 e -10; // Atomic r a d i u s i n FCC, m e t r e
8 a2 = 2* r2 * sqrt (2) ; // L a t t i c e c o n s t a n t f o r F CC,
cube
9 V2 = a2 ^3; // Volume o f u n i t c e l l i n FCC, m e t e r
cube
10 Vpa1 = V2 /4; // Volume o c c u p i e d by one atom i n FCC,
metre cube
11 dV = ( Vpa - Vpa1 ) / Vpa *100; // Change i n volume ,
percentage
12 printf ( ” \ nChange i n volume i n p e r c e n t a g e = %4 . 3 f
p e r c e n t a g e ” , dV ) ;
13
14 // R e s u l t
15 // Change i n volume i n p e r c e n t a g e = 0 . 4 9 3 p e r c e n t a g e

Scilab code Exa 3.4 Volume and density of unit cell in HCP Zn structure

1 // S c i l a b Code Ex3 . 4 : Page −3.7 ( 2 0 1 0 )


2 clc ; clear ;
3 a = 0.27 e -9; // L a t t i c e c o n s t a n t f o r BCC, metre
4 c = 0.494 e -9; // H e i g h t o f t h e u n i t c e l l , m e t r e
5 M = 65.37; // Atomic w e i g h t o f zn , kg
6 N = 6.02 e +26; // Avogadro number p e r k mol
7 m = 6* M / N ; // Mass p e r u n i t c e l l i n HCP s t r u c t u r e ,
kg
8 V = 3* sqrt (3) * a ^2* c /2; // Volume o f u n i t c e l l i n
HCP, m e t r e c u b e
9 rho = m / V ; // D e n s i t y o f HCP Zn s t r u c t u r e , kg p e r
metrecube

18
10
11 printf ( ” \ nVolume o f HCP Zn s t r u c t u r e = %4 . 3 e
metrecube ”, V);
12 printf ( ” \ n D e n s i t y o f HCP Zn s t r u c t u r e = %4 . 0 f kg p e r
m e t r e c u b e ” , rho ) ;
13
14 // R e s u l t
15 // Volume o f HCP Zn s t r u c t u r e = 9 . 3 5 6 e −29 m e t r e c u b e
16 // D e n s i t y o f HCP Zn s t r u c t u r e = 6 9 6 3 kg p e r
metrecube

Scilab code Exa 3.5 Interplanar spacing in 110 and 212 planes in FCC lattice

1 // / S c i l a b Code Ex3 . 5 : Page −3.5 ( 2 0 0 4 )


2 clc ; clear ;
3 r = 0.1278; // Atomic r a d i u s , nm
4 a = 4* r / sqrt (2) ; // L a t t i c e c o n s t a n t , nm
5 h1 = 1 , k1 = 1 , l1 = 0; // M i l l e r I n d i c e s o f
(110) planes
6 d_110 = a / sqrt ( h1 ^2 + k1 ^2 + l1 ^2) ; //
I n t e r p l a n a r s p a c i n g f o r ( 1 1 0 ) p l a n e s , nm
7 h2 = 2 , k2 = 1 , l2 = 2; // I n d i c e s o f t h i r d s e t
of p a r a l l e l planes
8 d_212 = a / sqrt ( h2 ^2 + k2 ^2 + l2 ^2) ; //
I n t e r p l a n a r s p a c i n g f o r ( 1 1 1 ) p l a n e s , nm
9 printf ( ” \ n I n t e r p l a n a r s p a c i n g f o r ( 1 1 0 ) p l a n e s = %6
. 4 f nm” , d_110 ) ;
10 printf ( ” \ n I n t e r p l a n a r s p a c i n g f o r ( 2 1 2 ) p l a n e s = %6
. 4 f nm” , d_212 ) ;
11
12 // R e s u l t
13 // I n t e r p l a n a r s p a c i n g f o r ( 1 1 0 ) p l a n e s = 0 . 2 5 5 6 nm
14 // I n t e r p l a n a r s p a c i n g f o r ( 2 1 2 ) p l a n e s = 0 . 1 2 0 5 nm

19
Scilab code Exa 3.6 Ratio of interplanar spacing in SC lattice

1 // S c i l a b Code Ex3 . 6 : Page −3.8 ( 2 0 0 4 )


2 clc ; clear ;
3 a = 1; // For s i m p l i c i t y we assume a t o be u n i t y ,
unit
4 h1 = 1 , k1 = 0 , l1 = 0; // I n d i c e s o f f i r s t s e t
of p a r a l l e l planes
5 d_100 = a / sqrt ( h1 ^2 + k1 ^2 + l1 ^2) ; //
Interplanar spacing f o r (100) planes , unit
6 h2 = 1 , k2 = 1 , l2 = 0; // I n d i c e s o f s e c o n d s e t
of p a r a l l e l planes
7 d_110 = a / sqrt ( h2 ^2 + k2 ^2 + l2 ^2) ; //
Interplanar spacing f o r (110) planes , unit
8 h3 = 1 , k3 = 1 , l3 = 1; // I n d i c e s o f t h i r d s e t
of p a r a l l e l planes
9 d_111 = a / sqrt ( h3 ^2 + k3 ^2 + l3 ^2) ; //
Interplanar spacing f o r (111) planes , unit
10 printf ( ” \ n d 1 0 0 : d 1 1 0 : d 1 1 1 = %1d : %4 . 2 f : %4 . 2
f ” , d_100 , d_110 , d_111 ) ;
11
12 // R e s u l t
13 // d 1 0 0 : d 1 1 0 : d 1 1 1 = 1 : 0 . 7 1 : 0 . 5 8

Scilab code Exa 3.7 Miller indices of a plane in SC lattice

1 // S c i l a b Code Ex3 . 7 : Page −3.8 ( 2 0 0 4 )


2 clc ; clear ;
3 m = 1; n = 1/2; p = 3; // C o e f f i c i e n t s o f intercepts
along three axes
4 m_inv = 1/ m ; // R e c i p r o c a t e t h e f i r s t
coefficient

20
5 n_inv = 1/ n ; // R e c i p r o c a t e t h e s e c o n d
coefficient
6 p_inv = 1/ p ; // R e c i p r o c a t e t h e t h i r d
coefficient
7 mul_fact = double ( lcm ( int32 ([1 , 1 , 3]) ) ) ; // Find l .
c .m. o f 1 , 1 and 3
8 m1 = m_inv * mul_fact ; // C l e a r t h e f i r s t f r a c t i o n
9 m2 = n_inv * mul_fact ; // C l e a r t h e s e c o n d f r a c t i o n
10 m3 = p_inv * mul_fact ; // C l e a r t h e t h i r d f r a c t i o n
11 printf ( ” \ nThe r e q u i r e d m i l l e r i n d i c e s a r e : (%d %d
%d) ” , m1 , m2 , m3 ) ;
12
13 // R e s u l t
14 // The r e q u i r e d m i l l e r i n d i c e s a r e : ( 3 6 1 )

Scilab code Exa 3.8 Ratio of vacancies in metal

1 // S c i l a b Code Ex3 . 8 : Page −3.13 ( 2 0 0 4 )


2 clc ; clear ;
3 N = 1; // For s i m p l i c i t y assume t o t a l number o f
m e t a l i o n s t o be u n i t y
4 e = 1.6 e -019; // E l e c t r o n i c c h a r g e , C
5 k = 1.38 e -023/ e ; // Boltzmann c o n s t a n t , eV/K
6 T1 = 500; // F i r s t t e m p e r a t u r e f o r metal , K
7 T2 = 1000; // S e c o n d t e m p e r a t u r e f o r metal , K
8 E_v = 1; // A v e r a g e e n e r g y r e q u i r e d t o c r e a t e a
v a c a n c y i n metal , eV
9 n_500 = N * exp ( - E_v /( k * T1 ) ) ; // Number o f v a c a n c i e s
a t 500 K
10 n_1000 = N * exp ( - E_v /( k * T2 ) ) ; // Number o f v a c a n c i e s
a t 500 K
11 n_ratio = n_1000 / n_500 ; // R a t i o o f v a c a n c i e s i n
metal
12 printf ( ” \ nThe r a t i o o f v a c a n c i e s i n m e t a l = %5 . 3 e ” ,
n_ratio ) ;

21
13
14 // R e s u l t
15 // The r a t i o o f v a c a n c i e s i n m e t a l = 1 . 0 8 5 e +05

Scilab code Exa 3.9 Fraction of vacancy sites in metal

1 // S c i l a b Code Ex3 . 9 : Page −3.14 ( 2 0 0 4 )


2 clc ; clear ;
3 T1 = 500+273; // F i r s t t e m p e r a t u r e f o r metal , K
4 T2 = 1000+273; // S e c o n d t e m p e r a t u r e f o r metal , K
5 frac_vac = 1e -010; // n1 /N, t h e f r a c t i o n o f v a c a n c y
s i t e s a t 500 d e g r e e c e l s i u s
6 e = 1.6 e -019; // E l e c t r o n i c c h a r g e , C
7 k = 1.38 e -023/ e ; // Boltzmann c o n s t a n t , eV/K
8 // n1 = N∗ exp (− E f / ( k ∗T1 ) ) ; // Number o f v a c a n c i e s
a t 500 K
9 // n2 = N∗ exp (− E f / ( k ∗T2 ) ) ; // Number o f v a c a n c i e s
a t 500 K, s o l v i n g f o r n2 /N = x
10 x = exp (( T1 / T2 ) * log ( frac_vac ) ) ;
11 printf ( ” \ nThe f r a c t i o n o f v a c a n c y s i t e s i n m e t a l =
%6 . 4 e ” , x ) ;
12
13 // R e s u l t
14 // The f r a c t i o n o f v a c a n c y s i t e s i n m e t a l = 8 . 4 6 7 0 e
−07

Scilab code Exa 3.10 Average energy required to create Schottky defect

1 // S c i l a b Code Ex3 . 1 0 : Page −3.16 ( 2 0 0 4 )


2 T = 273+25; // T e m p e r a t u r e , K
3 r = 2.82 e -10; // I n t e r i o n i c d i s t a n c e , m
4 N = 4/((2* r ) ^3) ; // D e n s i t y o f i o n p a i r s , ion
pairs

22
5 k = 8.625 e -5; // Boltzmann c o n s t a n t , J /K
6 n = 5 e +11; // D e n s i t y od S c h o t t k y e f f e c t s , per unit
volume
7 E_s = 2* k * T *2.303* log10 ( N / n ) ; // A v e r a g e e n e r g y
r e q u i r e d to c r e a t Schottky d e f e c t
8 printf ( ” \ n A v e r a g e e n e r g y r e q u i r e d t o c r e a t e S c h o t t k y
d e f e c t = %5 . 3 f eV” , E_s ) ;
9
10 // R e s u l t
11 // A v e r a g e e n e r g y r e q u i r e d t o c r e a t e S c h o t t k y d e f e c t
= 1 . 9 7 1 eV

Scilab code Exa 3.11 Ratio of vacancies in metal to create Frenkel defect

1 // S c i l a b Code Ex3 . 1 1 : R a t i o o f v a c a n c i e s i n m e t a l
t o c r e a t e F r e n k e l d e f e c t : Page −3.18 ( 2 0 0 4 )
2 N = 1; // For s i m p l i c i t y assume t o t a l number o f
m e t a l i o n s t o be u n i t y
3 Ni = 1; // For s i m p l i c i t y assume t o t a l number o f
m e t a l i o n s t o be u n i t y
4 k = 8.625 e -5; // Boltzmann c o n s t a n t , J /K
5 T1 = 273+20; // F i r s t t e m p e r a t u r e f o r metal , K
6 T2 = 300+273; // S e c o n d t e m p e r a t u r e f o r metal , K
7 E_v = 1.4; // A v e r a g e e n e r g y r e q u i r e d t o c r e a t e a
v a c a n c y i n metal , eV
8 n_293 = N * exp ( - E_v /(2* k * T1 ) ) ; // Number o f
v a c a n c i e s a t 500 K
9 n_573 = N * exp ( - E_v /(2* k * T2 ) ) ; // Number o f
v a c a n c i e s a t 500 K
10 n_ratio1 = n_573 / n_293 ; // R a t i o o f v a c a n c i e s i n
metal
11 n_ratio2 = n_293 / n_573 ; // R a t i o o f v a c a n c i e s i n
metal
12
13 printf ( ” \ nThe r a t i o 1 o f v a c a n c i e s i n m e t a l t o

23
c r e a t e F r e n k e l d e f e c t = %5 . 3 e ” , n_ratio1 ) ;
14 printf ( ” \ nThe r a t i o 2 o f v a c a n c i e s i n m e t a l t o
c r e a t e F r e n k e l d e f e c t = %5 . 3 e ” , n_ratio2 ) ;
15
16 // R e s u l t
17 // The r a t i o 1 o f v a c a n c i e s i n m e t a l t o c r e a t e
F r e n k e l d e f e c t = 7 . 5 5 8 e +05
18 // The r a t i o 2 o f v a c a n c i e s i n m e t a l t o c r e a t e
F r e n k e l d e f e c t = 1 . 3 2 3 e −06

24
Chapter 4

Line Defects and Crystal


Structure Determination

Scilab code Exa 4.1 Wavelength of X ray and order of diffraction

1 // S c i l a b Code Ex4 . 1 : Page −4.13 ( 2 0 0 4 )


2 clc ; clear ;
3 function thet = degree_minute (d , m )
4 thet = d + m /60;
5 endfunction
6 deg = 8 , minutes = 35; // Given g l a n c i n g a n g l e ,
d e g r e e s −m i n u t e s
7 theta = degree_minute ( deg , minutes ) ; // C o n v e r t
d e g r e e −m i n u t e s t o d e g r e e s
8 d = 0.282; // l a t t i c e s p a c i n g f o r NaCl c r y s t a l ,
nm
9 n = 1; // Order o f d i f f r a c t i o n
10 lambda = 2* d * sind ( theta ) / n ; // Wavelength from
Bragg ’ s law , nm
11 printf ( ” \ nWavelength o f X r a y s = %6 . 4 f nm ” , lambda )
;
12 theta = 90; // maximum p o s s i b l e v a l u e f o r t h e t a f o r
maximum o r d e r o f d i f f r a c t i o n
13 n = 2* d * sind ( theta ) / lambda ; // o r d e r o f d i f f r a c t i o n

25
from Bragg ’ s law
14 printf ( ” \nMaximum p o s s i b l e o r d e r o f d i f f r a c t i o n =
%1d” , n ) ;
15
16 // R e s u l t
17 // Wavelength o f X r a y s = 0 . 0 8 4 2 nm
18 // Maximum p o s s i b l e o r d e r o f d i f f r a c t i o n = 6

Scilab code Exa 4.2 Ratio of interplanar spacing in simple cube

1 // S c i l a b Code Ex4 . 2 : Page −4.13 ( 2 0 0 4 )


2 clc ; clear ;
3 a = 1; // For s i m p l i c i t y we assume a t o be u n i t y ,
unit
4 h1 = 1 , k1 = 0 , l1 = 0; // I n d i c e s o f f i r s t s e t
of p a r a l l e l planes
5 d_100 = a / sqrt ( h1 ^2 + k1 ^2 + l1 ^2) ; //
Interplanar spacing f o r (100) planes , unit
6 h2 = 1 , k2 = 1 , l2 = 0; // I n d i c e s o f s e c o n d s e t
of p a r a l l e l planes
7 d_110 = a / sqrt ( h2 ^2 + k2 ^2 + l2 ^2) ; //
Interplanar spacing f o r (110) planes , unit
8 h3 = 1 , k3 = 1 , l3 = 1; // I n d i c e s o f t h i r d s e t
of p a r a l l e l planes
9 d_111 = a / sqrt ( h3 ^2 + k3 ^2 + l3 ^2) ; //
Interplanar spacing f o r (111) planes , unit
10 printf ( ” \ n d 1 0 0 : d 1 1 0 : d 1 1 1 = %1d : %4 . 2 f : %4 . 2
f ” , d_100 , d_110 , d_111 ) ;
11
12 // R e s u l t
13 // d 1 0 0 : d 1 1 0 : d 1 1 1 = 1 : 0 . 7 1 : 0 . 5 8

Scilab code Exa 4.3 Wavelength of X ray from Bragg Law

26
1 // S c i l a b Code Ex4 . 3 : Page −4.14 ( 2 0 0 4 )
2 clc ; clear ;
3 function thet = degree_minute (d , m )
4 thet = d + m /60;
5 endfunction
6
7 degr = 8 , minutes = 35; // Given g l a n c i n g a n g l e ,
d e g r e e s −m i n u t e s
8 theta = degree_minute ( degr , minutes ) ; // C o n v e r t
d e g r e e −m i n u t e s t o d e g r e e s
9 d = 0.282; // l a t t i c e s p a c i n g f o r NaCl c r y s t a l ,
nm
10 n = 1; // Order o f d i f f r a c t i o n
11 lambda = 2* d * sind ( theta ) / n ; // Wavelength from
Bragg ’ s law , nm
12
13 printf ( ” \ nWavelength o f X r a y s = %6 . 4 f nm ” , lambda )
;
14
15 // R e s u l t
16 // Wavelength o f X r a y s = 0 . 0 8 4 2 nm

Scilab code Exa 4.4 Interatomic spacing

1 // S c i l a b Code Ex4 . 4 : Page −4.14 ( 2 0 0 4 )


2 clc ; clear ;
3 theta = 30; // bragg ’ s a n g l e , d e g r e e
4 lambda = 1.5418 e -10; // X−r a y w a v e l e n g t h , m
5 n = 1; // Order o f d i f f r a c t i o n
6 d = ( n * lambda ) /(2* sind ( theta ) ) ; // Wavelength from
Bragg ’ s law , nm
7 h = 1 , k = 1 , l = 1; // p l a n e
8 a = d *( h ^2+ k ^2+ l ^2) ^(1/2) ; // i n t e r a t o m i c s p a c i n g ,
angstrom
9 printf ( ” \ nWavelength o f X r a y s = %6 . 4 e m ” , d ) ;

27
10 printf ( ” \ n I n t e r a t o m i c s p a c i n g = %5 . 3 f a n g s t r o m ” , a /1
e -10) ;
11
12 // R e s u l t
13 // Wavelength o f X r a y s = 1 . 5 4 1 8 e −10 m
14 // I n t e r a t o m i c s p a c i n g = 2 . 6 7 0 a n g s t r o m

Scilab code Exa 4.5 Glancing angle for second order diffraction

1 // S c i l a b Code Ex4 . 5 : Page −4.14 ( 2 0 0 4 )


2 clc ; clear ;
3 lambda = 0.071; // X−r a y w a v e l e n g t h , nm
4 n = 2; // S e c o n d o r d e r o f d i f f r a c t i o n
5 d_100 = 0.28; // I n t e r p l a n a r s p a c i n g f o r ( 1 0 0 )
p l a n e , nm
6 d_110 = d_100 / sqrt (2) ; // I n t e r p l a n a r s p a c i n g f o r
( 1 1 0 ) p l a n e , nm
7 x = n * lambda /(2* d_110 ) ; // s i n e o f a n g l e , d e g r e e
8 theta = asind ( x ) ; // G l a n c i n g a n g l e f o r s e c o n d
order d i f f r a c t i o n
9
10 printf ( ” \ n G l a n c i n g a n g l e f o r s e c o n d o r d e r
d i f f r a c t i o n = %d d e g r e e ” , round ( theta ) ) ;
11
12 // R e s u l t
13 // G l a n c i n g a n g l e f o r s e c o n d o r d e r d i f f r a c t i o n = 21
degree

Scilab code Exa 4.6 Distance between two adjacent atoms in NaCl

1 // S c i l a b Code Ex4 . 6 : Page −4.15 ( 2 0 0 4 )


2 clc ; clear ;
3 n = 4; // S e c o n d o r d e r o f d i f f r a c t i o n

28
4 M =
58.5; // M o l e c u l a r w e i g h t o f c r y s t a l
5 d 2180; // D e n s i t y o f c r y s t a l , kg p e r cm c u b e
=
6 N =
6.02 e +26; // Avogadro number , k / mol
7 a =
(( n * M ) /( d * N ) ) ^(1/3) ; // D i s t a n c e b e t w e e n two
a d j a c e n t atoms o f same kind , nm
8 b = a /2; // D i s t a n c e b e t w e e n two a d j a c e n t atoms
o f d i f f e r e n t kind , nm
9 printf ( ” \ n D i s t a n c e b e t w e e n two a d j a c e n t atoms o f
same k i n d = %5 . 3 f nm ” , a /1 e -9) ;
10 printf ( ” \ n D i s t a n c e b e t w e e n two a d j a c e n t atoms o f
d i f f e r e n t k i n d = %5 . 3 f nm ” , b /1 e -9) ;
11 // R e s u l t
12
13 // D i s t a n c e b e t w e e n two a d j a c e n t atoms o f same k i n d
= 0 . 5 6 3 nm
14 // D i s t a n c e b e t w e e n two a d j a c e n t atoms o f d i f f e r e n t
k i n d = 0 . 2 8 1 nm

Scilab code Exa 4.7 Distance between 110 plane

1 // S c i l a b Code Ex4 . 7 Page −4.16 ( 2 0 0 4 )


2 clc ; clear ;
3 a = 0.38; // L a t t i c e c o n s t a n t o f c o p p e r , nm
4 h =1 , k = 1 , l = 0; // M i l l e r I n d i c e s ( h k l )= ( 1 1 0 )
5 d = a / sqrt ( h ^2 + k ^2 + l ^2) ; // I n t e r p l a n a r
spacing f o r (110) plane , unit
6 printf ( ” \ n I n t e r p l a n a r s p a c i n g f o r ( 1 1 0 ) p l a n e = %4 . 2
f nm” , d ) ;
7
8 // R e s u l t
9 // I n t e r p l a n a r s p a c i n g f o r ( 1 1 0 ) p l a n e = 0 . 2 7 nm

Scilab code Exa 4.8 Density of Iron

29
1 // S c i l a b Code Ex4 . 8 : Page −4.16 ( 2 0 0 4 )
2 clc ; clear ;
3 r = 0.123 e -9; // Atomic r a d i u s o f i r o n , m
4 n = 4; // S e c o n d o r d e r o f d i f f r a c t i o n
5 M = 55.8; // M o l e c u l a r w e i g h t o f c r y s t a l
6 a = 2* r * sqrt (2) ; // l a t t i c e c o n s t a n t , m
7 N = 6.023 e +26; // Avogadro number , k / mol
8 d = n * M /( N * a ^3) ; // D e n s i t y o f i r o n , kg /m−c u b e
9 printf ( ” \ n D e n s i t y o f i r o n = %5 . 4 d kg / m e t r e c u b e ” , d )
;
10
11 // R e s u l t
12 // D e n s i t y o f i r o n = 8 8 0 0 kg / m e t r e c u b e

30
Chapter 5

Principles of Quantum
Mechanics

Scilab code Exa 5.1 de Broglie wavelength of proton

1 // S c i l a b Code Ex5 . 1 : Page −5.7 ( 2 0 0 4 )


2 clc ; clear ;
3 h = 6.626 e -34; // Planck ’ s c o n s t i n J s
4 m = 1.67 e -27; // Mass o f t h e p r o t o n i n kg
5 c = 3 e +8; // Charge o f e l e c t r o n i n C
6 v = c /10; // P r o t o n v e l o c i t y 1 / 1 0 t h o f c
7 E = 0.025; // K i n e t i c e n e r g y o f t h e n e u t r o n i n J
8 lam = h /( m * v ) ; // de B r o g l i e w a v e l e n g t h i n m
9 printf ( ” \ nde B r o g l i e w a v e l e n g t h = %5 . 3 e m” , lam ) ;
10
11 // R e s u l t
12 // de B r o g l i e w a v e l e n g t h = 1 . 3 2 3 e −14 m

Scilab code Exa 5.2 de Broglie wavelength of electron

1 // S c i l a b Code Ex5 . 2 : de B r o g l i e w a v e l e n g t h o f
e l e c t r o n : Page −5.8 ( 2 0 0 4 )

31
2 clc ; clear ;
3 V = 400; // A c c e l e r a t i n g p o t e n t i a l , v o l t s
4 lam = 12.26/ sqrt ( V ) ; // de B r o g l i e w a v e l e n g t h ,
angstrom
5 printf ( ” \ nde B r o g l i e w a v e l e n g t h = %5 . 3 f a n g s t r o m ” ,
lam ) ;
6
7 // R e s u l t
8 // de B r o g l i e w a v e l e n g t h = 0 . 6 1 3 a n g s t r o m

Scilab code Exa 5.3 de Broglie wavelength of neutron

1 // S c i l a b Code Ex5 . 3 : Page −5.8 ( 2 0 0 4 )


2 clc ; clear ;
3 h = 6.626 e -34; // Planck ’ s c o n s t i n J s
4 m = 1.67 e -27; // Mass o f t h e n e u t r o n i n kg
5 e = 1.6 e -19; // c h a r g e o f e l e c t r o n i n C
6 E = 0.025; // k i n e t i c energy of the neutron in J
7 lam = h /( sqrt (2* m * E * e ) ) ; // de B r o g l i e w a v e l e n g t h
in m
8 printf ( ” \ nde B r o g l i e w a v e l e n g t h = %5 . 3 f nm” , lam /1 e
-9) ;
9
10 // R e s u l t
11 // de B r o g l i e w a v e l e n g t h = 0 . 1 8 1 nm

Scilab code Exa 5.4 Uncertainty in momentum of electron

1 // S c i l a b Code Ex5 . 4 : U n c e r t a i n t y i n momentum o f


e l e c t r o n : Page −5.13 ( 2 0 0 4 )
2 clc ; clear ;
3 h = 6.62 e -34 // Planck ’ s c o n s t , J s
4 delx = 4e -10 // U n c e r t a i n t y i n p o s i t i o n , m

32
5 delp = h /( delx ) ; // U n c e r t a i n i t y p r i n c i p l e
6
7 printf ( ” \ n U n c e r t a i n t y i n momentum = %5 . 3 e kg m/ s e c ” ,
delp ) ;
8
9 // R e s u l t s
10 // U n c e r t a i n t y i n momentum = 1 . 6 5 5 0 0 0 e −24 kg m/ s e c

Scilab code Exa 5.5 Uncertainty in velocity of electron

1 // S c i l a b Code Ex5 . 5 : Page −5.13 ( 2 0 0 4 )


2 clc ; clear ;
3 h = 6.62 e -34; // Planck ’ s c o n s t , J s
4 me = 9.1 e -31; // Mass o f e l e c t r o n , kg
5 delx = 1e -9; // U n c e r t a i n t y i n p o s i t i o n , m
6 delp = h /( delx ) ; // U n c e r t a i n t y p r i n c i p l e
7 delv = ( delp / me ) ; // U n c e r t a i n t y i n v e l o c i t y , m/ s e c
8
9 printf ( ” \ n U n c e r t a i n t y i n v e l o c i t y = %4 . 2 e m/ s e c ” ,
delv )
10
11 // R e s u l t
12 // U n c e r t a i n t y i n v e l o c i t y = 7 . 2 7 4 7 e +05 m/ s e c

Scilab code Exa 5.6 Uncertainty in time

1 // S c i l a b Code Ex 5 . 6 : U n c e r t a i n t y i n t i m e : Page
−5.13 ( 2 0 0 4 )
2 clc ; clear ;
3 h = 6.62 e -34; // p l a n c k ’ s c o n s t , J s
4 n1 = 1; // f i r s t state
5 n2 = 2; // s e c o n d s t a t e

33
6 En = ( -13.6/ n2 ^2) +(13.6/ n1 ) ; // Energy f o r
t r a n s i t i o n , i n eV
7 e = 1.6 e -19; // Charge o f e l e c t r o n , C
8 E2 = e * En ; // Energy f o r t r a n s i t i o n , J
9 delE = E2 /100; // U n c e r t a i n t y i n p o s i t i o n , m
10 delt = h /( delE ) ; // U n c e r t a i n t y p r i n c i p l e
11 printf ( ” \ n U n c e r t a i n t y i n t i m e = %1 . 3 e s e c ” , delt ) ;
12
13 // R e s u l t s
14 // U n c e r t a i n i t y i n t i m e = 4 . 0 5 6 e −14 s e c

Scilab code Exa 5.7 Lowest Energy for electron confinement

1 // S c i l a b Code Ex 5 . 7 : Lowest Energy f o r e l e c t r o n


c o n f i n e m e n t : Page −5.22 ( 2 0 0 4 )
2 clc ; clear ;
3 h = 6.62 e -34; // Planck ’ s c o n s t , J s
4 m = 9.1 e -31; // Mass o f e l e c t r o n i n kg
5 L = 0.1 e -9; // S i d e o f t h e box i n m
6 n1 = 1; // nx box l o w e s t quantum number
7 n2 = 1; // ny box l o w e s t quantum number
8 n3 = 1; // nz box l o w e s t quantum number
9 e = 1.6 e -19; // Charge on e l e c t r o n i n C
10 E = ( h ^2) /(8* e * m * L ^2) *(( n1 ) ^2+( n2 ) ^2+( n3 ) ^2) ; //
Lowest Energy f o r e l e c t r o n c o n f i n e m e n t , i n eV
11 printf ( ” \ nLowest Energy f o r e l e c t r o n c o n f i n e m e n t =
%5 . 1 f eV” , E ) ;
12
13
14 // R e s u l t s
15 // Lowest Energy f o r e l e c t r o n c o n f i n e m e n t = 1 1 2 . 9 eV

Scilab code Exa 5.8 Next Lowest Energy level for electron confinement

34
1 // S c i l a b Code Ex 5 . 8 : Page −5.22 ( 2 0 0 4 )
2 clc ; clear ;
3 h = 6.62 e -34; // Planck ’ s c o n s t a n t , J s
4 m = 9.1 e -31; // Mass o f e l e c t r o n , kg
5 L = 0.1 e -9; // S i d e o f t h e box , m
6 n1 = 1; // nx box l o w e s t quantum number
7 n2 = 1; // ny box l o w e s t quantum number
8 n3 = 2; // nz box l o w e s t quantum number
9 e = 1.6 e -19; // Charge on e l e c t r o n , C
10 E = ( h ^2) /(8* e * m * L ^2) *(( n1 ) ^2+( n2 ) ^2+( n3 ) ^2) ; //
Lowest Energy l e v e l f o r e l e c t r o n c o n f i n e m e n t , i n
eV
11
12 printf ( ” \ nLowest Energy l e v e l f o r e l e c t r o n
c o n f i n e m e n t = %6 . 2 f eV” , E ) ;
13
14 // R e s u l t
15 // Lowest Energy l e v e l f o r e l e c t r o n c o n f i n e m e n t =
2 2 5 . 7 4 eV

Scilab code Exa 5.9 de Broglie wavelength from energy

1 // S c i l a b Code Ex5 . 9 : Page −5.23 ( 2 0 0 4 )


2 clc ; clear ;
3 h = 6.626 e -34; // Planck ’ s c o n s t i n J s
4 m = 9.1 e -31; // Mass o f t h e n e u t r o n i n kg
5 e = 1.6 e -19; // Charge o f e l e c t r o n i n C
6 E = 2000; // K i n e t i c e n e r g y o f t h e n e u t r o n i n eV
7 lam = h /( sqrt (2* m * E * e ) ) ; // de B r o g l i e w a v e l e n g t h
in m
8 printf ( ” \ nde B r o g l i e w a v e l e n g t h o f e l e c t r o n = %6 . 4 f
nm” , lam /1 e -9) ;
9
10 // R e s u l t
11 // de B r o g l i e w a v e l e n g t h o f e l e c t r o n = 0 . 0 2 7 5 nm

35
Scilab code Exa 5.10 Minimum Energy

1 // S c i l a b Code Ex 5 . 1 0 : Page −5.24 ( 2 0 0 4 )


2 clc ; clear ;
3 h = 6.626 e -34; // Planck ’ s c o n s t , J s
4 m = 9.1 e -31; // Mass o f e l e c t r o n , kg
5 L = 4e -10; // S i d e o f t h e box , m
6 n1 = 1; // nx box l o w e s t quantum number
7 E = ( h ^2) /(8* m *( L ^2) ) *(( n1 ) ^2) ; // Lowest Energy
l e v e l f o r e l e c t r o n c o n f i n e m e n t , i n eV
8 printf ( ” \nMinimum Energy = %2 . 3 e j o u l e ” , E ) ;
9
10 // R e s u l t s
11 // Minimum Energy = 3 . 7 6 9 e −19 j o u l e

Scilab code Exa 5.11 Energy of ground and first and second state

1 // S c i l a b Code Ex 5 . 1 1 : Page −5.24 ( 2 0 0 4 )


2 clc ; clear ;
3 h = 6.626 e -34; // Planck ’ s c o n s t , J s
4 m = 9.1 e -31; // Mass o f e l e c t r o n i n kg
5 L = 1e -10; // S i d e o f t h e box i n m
6 n1 = 1; // Ground s t a t e quantum number
7 n2 = 2; // f i r s t quantum number
8 n3 = 3; // s e c o n d quantum number
9 e = 1.6 e -19; // c h a r g e on e l e c t r o n , C
10 E1 = ( h ^2) /(8* m *( L ^2) ) *(( n1 ) ^2) ; // Ground s t a t e
Energy , j o u l e
11 E2 = ( h ^2) /(8* m *( L ^2) ) *(( n2 ) ^2) ; // f i r s t s t a t e
Energy , j o u l e
12 E3 = ( h ^2) /(8* m *( L ^2) ) *(( n3 ) ^2) ; // s e c o n d s t a t e
Energy , j o u l e

36
13
14 printf ( ” \ nGround s t a t e Energy = %2 . 3 e j o u l e ” , E1 ) ;
15 printf ( ” \ n F i r s t s t a t e Energy = %2 . 3 e j o u l e ” , E2 ) ;
16 printf ( ” \ nSecond s t a t e Energy = %2 . 3 e j o u l e ” , E3 ) ;
17
18
19 // Results
20 // Ground s t a t e Energy = 6 . 0 3 1 e −18 j o u l e
21 // F i r s t s t a t e Energy = 2 . 4 1 2 e −17 j o u l e
22 // S e c o n d s t a t e Energy = 5 . 4 2 8 e −17 j o u l e

Scilab code Exa 5.12 Velocity and energy of electron

1 // S c i l a b Code Ex5 . 1 2 : Page −5.25 ( 2 0 0 4 )


2 clc ; clear ;
3 h = 6.626 e -34; // Planck ’ s c o n s t i n J s
4 m = 9.1 e -31; // Mass o f t h e e l e c t r o n i n kg
5 lam = 1.66 e -10; // de B r o g l i e w a v e l e n g t h , m
6 e = 1.6 e -19; // Charge on e l e c t r o n , C
7 v = h /( m * lam ) ; // V e l o c i t y o f e l e c t r o n , m/ s
8 E = ( m * v ^2) /(2* e ) ; // K i n e t i c e n e r g y o f t h e
e l e c t r o n i n eV
9
10 printf ( ” \ n V e l o c i t y o f e l e c t r o n = %d km/ s ” , v /1000) ;
11 printf ( ” \ n K i n e t i c e n e r g y o f t h e e l e c t r o n = %5 . 2 f eV”
, E);
12
13 // R e s u l t
14 // V e l o c i t y o f e l e c t r o n = 4 3 8 6 km/ s
15 // K i n e t i c e n e r g y o f t h e e l e c t r o n = 5 4 . 7 1 eV

Scilab code Exa 5.13 Wavelength of electron waves

37
1 // S c i l a b Code Ex5 . 1 3 : Page −5.25 ( 2 0 0 4 )
2 clc ; clear ;
3 V = 15000; // A c c e l e r a t i n g p o t e n t i a l , v o l t s
4 lam = 12.26/ sqrt ( V ) ; // de B r o g l i e w a v e l e n g t h ,
angstrom
5 printf ( ” \ nde B r o g l i e w a v e l e n g t h o f e l e c t r o n wave =
%5 . 1 f a n g s t r o m ” , lam ) ;
6
7 // R e s u l t
8 // de B r o g l i e w a v e l e n g t h o f e l e c t r o n wave = 0.1
angstrom

Scilab code Exa 5.14 Uncertainty in momentum of electron

1 // S c i l a b Code Ex5 . 1 4 : Page −5.26 ( 2 0 0 4 )


2 clc ; clear ;
3 h = 6.62 e -34 // Planck ’ s c o n s t , J s
4 delx = 1e -8 // U n c e r t a i n i t y i n p o s i t i o n , m
5 m = 9.1 e -31; // Mass o f e l e c t r o n , kg
6 delv = h /( m * delx ) ; // U n c e r t a i n t y i n v e l o c i t y , km/ s
7
8 printf ( ” \ n U n c e r t a i n t y i n v e l o c i t y = %3 . 2 f km/ s e c ” ,
delv /1000) ;
9
10 // R e s u l t s
11 // U n c e r t a i n t y i n v e l o c i t y = 7 2 . 7 5 km/ s e c

38
Chapter 6

Electron Theory of Metals

Scilab code Exa 6.1 Electron Density and mobility in silver

1 // S c i l a b Code Ex6 . 1 : Page −6.8 ( 2 0 0 4 )


2 clc ; clear ;
3 M = 107.9; // M o l e c u l a r w e i g h t o f s i l v e r , kg
4 d = 10.5 e +03; // D e n s i t y o f o f s i l v e r , kg p e r
metrecube
5 N = 6.023 D +26; // Avogadro ’ s Number . , atoms /k−mol
6 a = 6.8 e +07; // c o n d u c t i v i t y o f s i l v e r , p e r ohm
per sec
7 e = 1.6 e -19; // c h a r g e o f e l e c t r o n , C
8 n = d * N / M ; // D e n s i t y o f e l e c t r o n
9 mu = a /( n * e ) ; // M o b i l i t y o f e l e c t r o n
10 printf ( ” \ n D e n s i t y o f e l e c t r o n = %4 . 2 e ” , n ) ;
11 printf ( ” \ n M o b i l i t y o f e l e c t r o n = %5 . 3 e m e t e r s q u a r e
p e r v o l t p e r s e c ” , mu ) ;
12
13 // R e s u l t
14 // D e n s i t y o f e l e c t r o n = 5 . 8 6 e +28
15 // M o b i l i t y o f e l e c t r o n = 7 . 2 5 1 e −03 m e t e r s q u a r e p e r
v o l t per sec

39
Scilab code Exa 6.2 Mobility and average time of collision in copper

1 // S c i l a b Code Ex6 . 2 : Page −6.9 ( 2 0 0 4 )


2 clc ; clear ;
3 M = 63.5; // M o l e c u l a r w e i g h t o f c o p p e r , kg
4 d = 8.92 e +03; // D e n s i t y o f o f c o p p e r , kg p e r
metrecube
5 rho = 1.73 e -8; // R e s i s t i v i t y o f c o p p e r , ohm m
6 m = 9.1 e -31; // Mass o f e l e c t r o n , kg
7 N = 6.023 D +26; // Avogadro ’ s No . , atoms /k−mol
8 e = 1.6 e -19; // Charge o f e l e c t r o n , C
9 n = d * N / M ; // D e n s i t y o f e l e c t r o n
10 mu = 1/( rho * n * e ) ; // M o b i l i t y o f e l e c t r o n
11 t = m /( n *( e ^2) * rho ) ; // A v e r a g e t i m e o f c o l l i s i o n
, sec
12 printf ( ” \nNumber D e n s i t y o f e l e c t r o n = %4 . 2 e ” , n ) ;
13 printf ( ” \ n M o b i l i t y o f e l e c t r o n = %3 . 3 e m e t e r p e r
v o l t p e r s e c ” , mu ) ;
14 printf ( ” \ n a v e r a g e t i m e o f c o l l i s i o n = %3 . 2 e s e c ” , t )
;
15
16 // R e s u l t
17 // Number D e n s i t y o f e l e c t r o n = 8 . 4 6 e +28
18 // M o b i l i t y o f e l e c t r o n = 4 . 2 7 0 e −03 m e t e r p e r v o l t
per sec
19 // a v e r a g e t i m e o f c o l l i s i o n = 2 . 4 2 9 e −14 s e c

Scilab code Exa 6.3 Electrical resistivity in Sodium metal

1 // S c i l a b Code Ex6 . 3 : Page −6.10 ( 2 0 0 4 )


2 clc ; clear ;
3 t = 3e -14; // Mean f r e e time , s e c

40
4 m = 9.1 e -31; // Mass o f e l e c t r o n , kg
5 e = 1.6 e -19; // Charge o f e l e c t r o n , C
6 r = 1.85 e -10; // R a d i u s o f sodium atom , m
7 a = 4* r / sqrt (3) ; // Sodium h a s BCC s t r u c t u r e
8 n = 2/( a ^3) ; // Number o f e l e c t r o n p e r u n i t volume
9 rho = m /( n *( e ^2) * t ) ; // E l e c t r i c a l r e s i s t i v i t y ,
ohm m
10
11 printf ( ” \ n E l e c t r i c a l resistivity = %3 . 3 e ohm m” ,
rho ) ;
12
13 // R e s u l t
14 // Electrical resistivity = 4 . 6 2 0 e −08 ohm m

Scilab code Exa 6.4 Resistivity of sodium at zero degree Celsius

1 // S c i l a b Code Ex6 . 4 : Page −6.11 ( 2 0 0 4 )


2 clc ; clear ;
3 t = 3.1 e -14; // Mean f r e e time , s e c
4 m = 9.1 e -31; // Mass o f e l e c t r o n , kg
5 e = 1.6 e -19; // Charge o f e l e c t r o n , C
6 r = 0.429 e -9; // S i d e o f t h e u n i t c e l l . m
7 n = 2/( r ^3) ; // Number o f e l e c t r o n p e r u n i t
cubemetre
8 rho = m /( n *( e ^2) * t ) ; // E l e c t r i c a l r e s i s t i v i t y ,
ohm m
9 printf ( ” \ n E l e c t r i c a l r e s i s t i v i t y o f sodium a t z e r o
d e g r e e C e l s i u s = %2 . 3 e ohm m” , rho ) ;
10
11 // R e s u l t
12 // E l e c t r i c a l r e s i s t i v i t y o f sodium a t z e r o d e g r e e
C e l s i u s = 4 . 5 2 7 e −08 ohm m

41
Scilab code Exa 6.5 Next Lowest Energy level for electron confinement

1 // S c i l a b Code Ex 6 . 5 : Page −6.15 ( 2 0 0 4 )


2 clc ; clear ;
3 h = 6.62 e -34; // Planck ’ s c o n s t , J s
4 m = 9.1 e -31; // Mass o f e l e c t r o n i n kg
5 L = 0.1 e -9; // S i d e o f t h e box i n m
6 n1 = 1; // nx box l o w e s t quantum number
7 n2 = 1; // ny box l o w e s t quantum number
8 n3 = 1; // nz box l o w e s t quantum number
9 e = 1.6 e -19; // Charge on e l e c t r o n , C
10 E = ( h ^2) /(8* e * m * L ^2) *(( n1 ) ^2+( n2 ) ^2+( n3 ) ^2) ; //
Lowest Energy l e v e l f o r e l e c t r o n c o n f i n e m e n t , i n
eV
11 printf ( ” \ nLowest Energy l e v e l f o r e l e c t r o n
c o n f i n e m e n t = %2 . 1 f eV” , E ) ;
12
13 // R e s u l t s
14 // Lowest Energy l e v e l f o r e l e c t r o n c o n f i n e m e n t =
1 1 2 . 9 eV

Scilab code Exa 6.7 Energy level for electron confinement and equivalent temperatu

1 // S c i l a b Code Ex 6 . 7 : Page −6.17 ( 2 0 0 4 )


2 clc ; clear ;
3 h = 6.62 e -34; // Planck ’ s c o n s t , J s
4 m = 9.1 e -31; // Mass o f e l e c t r o n i n kg
5 L = 1e -9; // l e n g t h o f c u b e box , m
6 n1 = 1; // nx box quantum number
7 n2 = 1; // ny box l o w e s t quantum number
8 n3 = 2; // nz box quantum number
9 k = 1.38 e -23; // Boltzmann c o n s t a n t , j o u l e
per k e l v i n
10 e = 1.6 e -19; // Charge on e l e c t r o n , C
11 E = ( h ^2) /(8* m * L ^2) *(( n1 ) ^2+( n2 ) ^2+( n3 ) ^2) ; //

42
Lowest Energy l e v e l f o r e l e c t r o n c o n f i n e m e n t , i n
joule
12 T = 2* E /(3* k ) ; // E q u i v a l e n t t e m p e r a t u r e o f t h e
molecules , kelvin
13
14 printf ( ” \ nEnergy f o r e l e c t r o n c o n f i n e m e n t = %5 . 3 e
j o u l e ”, E);
15 printf ( ” \ n E q u i v a l e n t t e m p e r a t u r e o f t h e m o l e c u l e s =
%5 . 3 e k e l v i n ” , T ) ;
16
17 // R e s u l t s
18 // Energy f o r e l e c t r o n c o n f i n e m e n t = 3 . 6 1 e −19 j o u l e
19 // E q u i v a l e n t t e m p e r a t u r e o f t h e m o l e c u l e s = 1 . 7 4 e
+04 k e l v i n

Scilab code Exa 6.9 Temperature from Fermi function

1 // S c i l a b Code Ex 6 . 9 : Page −6.18 ( 2 0 0 4 )


2 clc ; clear ;
3 k = 1.38 e -23; // Boltzmann c o n s t a n t , joule
per k e l v i n
4 T = 300; // For s i m p l i c i t y room t e m p e r a t u r e i s
taken , k e l v i n
5 e = 1.6 e -19; // Charge on e l e c t r o n , C
6 E = k*T; // Given Energy , eV
7 F_E = 1/(1+ exp ( E /( k * T ) ) ) ; // Fermi f u n c t i o n ,
unitless
8 T = 300; // For s i m p l i c i t y room t e m p e r a t u r e i s
taken , k e l v i n
9 printf ( ” \ nFermi f u c n t i o n = %5 . 3 f ” , F_E ) ;
10
11 // R e s u l t s
12 // Fermi f u c n t i o n = 0 . 2 6 9

43
Scilab code Exa 6.10 Temperature for occupation of a state above Fermi level

1 // S c i l a b Code Ex 6 . 1 0 : Page −6.18 ( 2 0 0 4 )


2 clc ; clear ;
3 k = 1.38 e -23; // Boltzmann c o n s t a n t , joule
per k e l v i n
4 T = 300; // For s i m p l i c i t y room t e m p e r a t u r e i s
taken , k e l v i n
5 e = 1.6 e -19; // Charge on e l e c t r o n , C
6 EF = 5.5; // Fermi Energy , eV
7 E = EF +( EF /100) ; // New e n e r g y , eV
8 F_E = 0.1; // Fermi f u n c t i o n , u n i t l e s s
9 T = e *( E - EF ) /( k * log ((1 - F_E ) / F_E ) ) ; // T e m p e r a t u r e
f o r 10% p r o b a b i l t y t h a t e l e c t r o n i n s i l v e r have
an e n e r g y 1% a b o v e t h e f e r m i e n e r g y , k e l v i n
10
11 printf ( ” \ n T e m p e r a t u r e = %5 . 1 f k e l v i n ” , T ) ;
12
13 // R e s u l t s
14 // T e m p e r a t u r e = 2 9 0 . 2 k e l v i n

Scilab code Exa 6.11 Number of energy state in unit volume

1 // S c i l a b Code Ex 6 . 1 1 : Page −6.22 ( 2 0 0 4 )


2 clc ; clear ;
3 h = 6.62 e -34; // Planck ’ s c o n s t a n t , J s
4 m = 9.14 e -31; // Mass o f t h e e l e c t r o n , kg
5 e = 1.6 e -19; // Charge on e l e c t r o n , C
6 E1 =3.22* e ; // F i r s t s t a t e e n e r g y , j o u l e s
7 E2 =3.24* e ; // S e c o n d s t a t e e n e r g y , j o u l e s
8 n = 8* %pi *(2* m ) ^(3/2) *( E2 ^(3/2) - E1 ^(3/2) ) /(3* h ^3) ;
// Number o f e n e r g y s t a t e i n u n i t volume

44
9
10 printf ( ” \nNumber o f e n e r g y s t a t e i n u n i t volume= %4
. 3 e ”, n);
11
12 // R e s u l t
13 // Number o f e n e r g y s t a t e i n u n i t volume= 2 . 4 6 3 e +26

Scilab code Exa 6.12 Temperature needed to fill a state above Fermi level

1 // S c i l a b Code Ex 6 . 1 2 : Page −6.22 ( 2 0 0 4 )


2 clc ; clear ;
3 k = 1.38 e -23; // Boltzmann c o n s t a n t , joule
per k e l v i n
4 T = 300; // For s i m p l i c i t y room t e m p e r a t u r e i s
taken , k e l v i n
5 e = 1.6 e -19; // Charge on e l e c t r o n , C
6 EF = 1; // For s i m p l i c i t y Fermi Energy i s t a k e n
a s u n i t y , eV
7 E = EF +0.5; // New e n e r g y , eV
8 F_E = 0.01; // Fermi f u n c t i o n , u n i t l e s s
9 T = e *( E - EF ) /( k * log ((1 - F_E ) / F_E ) ) ; // T e m p e r a t u r e
f o r 1% p r o b a b i l t y t h a t e l e c t r o n have an e n e r g y
0 . 5 eV a b o v e t h e f e r m i e n e r g y , k e l v i n
10
11 printf ( ” \ n T e m p e r a t u r e = %d k e l v i n ” , round ( T ) ) ;
12
13 // R e s u l t s
14 // T e m p e r a t u r e = 1 2 6 2 k e l v i n

45
Chapter 7

Dielectric Properties

Scilab code Exa 7.1 Net energy stored in capacitor

1 // S c i l a b Code Ex7 . 1 : Page −7.23 ( 2 0 0 4 )


2 clc ; clear ;
3 C = 2e -6; // C a p a c i t a n c e , f a r a d
4 V = 1000; // A p p l i e d V o l t a g e , v o l t
5 W = C * V ^2/2; // Energy s t o r e d i n c a p a c i t o r , j o u l e
6 er = 100; // E l e c t r i c p e r m i t t i v i t y
7 Co = C / er ; // New C a p a c i t a n c e w i t h o u t d i e l e c t r i c ,
farad
8 Wo = Co * V ^2/2; // New Energy w i t h o u t d i e l e c t r i c ,
farad
9 Wt = W - Wo ; // Net e n e r g y s t o r e d i n c a p a c i t o r ,
joules
10 printf ( ” \ nNet e n e r g y s t o r e d i n c a p a c i t o r = %3 . 2 f
j o u l e s ” , Wt ) ;
11
12 // R e s u l t
13 // Net e n e r g y s t o r e d i n c a p a c i t o r = 0 . 9 9 j o u l e s

Scilab code Exa 7.2 Ratio of polarization

46
1 // S c i l a b Code Ex7 . 2 : Page −7.24 ( 2 0 0 4 )
2 clc ; clear ;
3 er = 4.94; // E l e c t r i c p e r m i t t i v i t y
4 n = sqrt (2.69) ; // I n d e x o f r e f r a t i o n , u n i t l e s s
5 a = ( n ^2 -1) /( n ^2+2) ; // V a r i a b l e 1
6 b = ( er -1) /( er +2) ; // V a r i a b l e 2
7 alpha = ( b / a ) -1; // R a t i o b e t w e e n i o n i c and
electrical polarization
8 alp = 1/ alpha ; // R a t i o b e t w e e n e l e c t r i c a l and
ionic polarization
9
10 printf ( ” \ n R a t i o between i o n i c and e l e c t r i c a l
polarization = %3 . 3 f ” , alpha ) ;
11 printf ( ” \ n R a t i o between e l e c t r i c a l and i o n i c
polarization = %3 . 3 f ” , alp ) ;
12
13 // R e s u l t
14 // R a t i o b e t w e e n i o n i c and e l e c t r i c a l p o l a r i z a t i o n
= 0.576
15 // R a t i o b e t w e e n e l e c t r i c a l and i o n i c polarization
= 1.738

Scilab code Exa 7.3 Parallel loss resistance and capacitance

1 // S c i l a b Code Ex7 . 3 : Page −7.25 ( 2 0 0 4 )


2 clear ; clc ;
3 er = 2.56; // R e l a t i v e p e r m i t t i v i t y
4 tan_deta = 0.7 e -4; // L o s s t a n g e n t
5 f = 1 e +6; // f r e q u e n c y , Hz
6 er2 = er * tan_deta ; // I m a g i n a r y p a r t o f relative
permittivity
7 A = 8e -4; // Area b e t w e e n p l a t e s , s q u a r e m e t r e
8 eo = 8.854 e -12; // P e r m i t t i v i t y o f t h e f r e e s p a c e ,
f a r a d per metre
9 w = 2* %pi * f ; // a n g u l a r f r e q u e n c y , Hz

47
10 d = 0.08 e -3; // D i s t a n c e b e t w e e n p l a t e s , m
11 Rp = d /( w * eo * er2 * A ) ; // P a r a l l e l l o s s r e s i s t a n c e ,
ohm
12 Cp = A * eo * er / d ; // C a p a c i t a n c e , f a r a d
13
14 printf ( ” \ n P a r a l l e l l o s s r e s i s t a n c e = %3 . 3 e ohm” , Rp )
;
15 printf ( ” \ n C a p a c i t a n c e = %3 . 3 e f a r a d ” , Cp ) ;
16
17 // R e s u l t
18 // P a r a l l e l l o s s r e s i s t a n c e = 1 . 0 0 3 e +07 ohm
19 // C a p a c i t a n c e = 2 . 2 6 7 e −10 f a r a d

Scilab code Exa 7.4 Dielectric constant of the material

1 // S c i l a b Code Ex7 . 4 : Page −7.26 ( 2 0 0 4 )


2 clc ; clear ;
3 N = 3 e +28; // Number d e n s i t y , atoms p e r m e t r e c u b e
4 eo = 8.854 e -12; // P e r m i t t i v i t y o f t h e f r e e s p a c e ,
f a r a d per metre
5 alpha = 10 e -40; // E l e c t r i c a l p o l a r i z a t i o n , f a r a d
metresquare
6 er = 1+( N * alpha / eo ) ; // D i e l e c t r i c c o n s t a n t o f
the material
7 printf ( ” \ n D i e l e c t r i c c o n s t a n t o f t h e m a t e r i a l = %3 . 3
f ” , er ) ;
8
9
10 // R e s u l t
11 // D i e l e c t r i c constant of the material = 4.388

Scilab code Exa 7.5 Electric polarizability of He atoms

48
1 // S c i l a b Code Ex7 . 5 : Page −7.26 ( 2 0 0 4 )
2 clc ; clear ;
3 N = 2.7 e +25; // Number d e n s i t y , atoms p e r
metrecube
4 eo = 8.854 e -12; // P e r m i t t i v i t y o f the f r e e space ,
f a r a d per metre
5 er = 1.0000684; // D i e l e c t r i c c o n s t a n t o f t h e
material
6 alpha = eo *( er -1) / N ; // E l e c t r i c a l p o l a r i z a t i o n ,
farad metresquare
7
8 printf ( ” \ n E l e c t r i c a l p o l a r i z a t i o n = %3 . 3 e f a r a d
m e t r e s q u a r e ” , alpha ) ;
9
10 // R e s u l t
11 // E l e c t r i c a l p o l a r i z a t i o n = 2 . 2 4 3 e −41 f a r a d
metresquare

Scilab code Exa 7.6 Capacitance and charge on the plates

1 // S c i l a b Code Ex7 . 6 : Page −7.27 ( 2 0 0 4 )


2 clc ; clear ;
3 A = 100 e -4; // Area o f p a r a l l e l p l a t e s ,
squaremetre
4 d = 1e -2; // D i s t a n c e between p l a t e s , metre
5 eo = 8.854 e -12; // P e r m i t t i v i t y o f the f r e e space ,
f a r a d per metre
6 V = 100; // P o t e n t i a l , v o l t
7 C = eo * A / d ; // C a p a c i t a n c e , f a r a d
8 Q = C*V; // Charge on t h e p l a t e s o f c a p a c i t o r
, C
9 printf ( ” \ n C a p a c i t a n c e = %5 . 3 e F ” , C ) ;
10 printf ( ” \ nCharge on t h e p l a t e s o f c a p a c i t o r = %3 . 3 e
C” , Q ) ;
11

49
12 // R e s u l t
13 // C a p a c i t a n c e = 8 . 8 5 4 e −12 F
14 // Charge on t h e p l a t e s o f c a p a c i t o r = 8 . 8 5 4 e −10 C

Scilab code Exa 7.7 Electric polarizability of sulphur atoms

1 // S c i l a b Code Ex7 . 7 : Page −7.28 ( 2 0 0 4 )


2 clc ; clear ;
3 N = 385.66 e +26; // Number d e n s i t y , atoms p e r
metrecube
4 eo = 8.854 e -12; // P e r m i t t i v i t y o f t h e f r e e s p a c e ,
f a r a d per metre
5 er = 3.75; // D i e l e c t r i c c o n s t a n t o f t h e m a t e r i a l
6 alpha = 3* eo *( er -1) /( N *( er +2) ) ; // E l e c t r i c
p o l a r i z a b i l i t y o f s u l p h u r atoms
7 printf ( ” \ n E l e c t r i c p o l a r i z a b i l i t y o f s u l p h u r atoms =
%3 . 3 e f a r a d m e t r e s q u a r e ” , alpha ) ;
8
9 // R e s u l t
10 // E l e c t r i c p o l a r i z a b i l i t y o f s u l p h u r atoms = 3 . 2 9 4
e −40 f a r a d m e t r e s q u a r e

50
Chapter 8

Magnetic Properties

Scilab code Exa 8.1 Relative permeability

1 // S c i l a b Code Ex8 . 1 : Page −8.33 ( 2 0 0 4 )


2 clc ; clear ;
3 M = 3300; // M a g n e t i z a t i o n o f f e r r o m a g n e t i c
m a t e r i a l , amp/ m e t r e
4 H = 220; // M a g n e t i c f i e l d s t r e n g t h , amp/ m e t r e
5 mu_r = M / H +1; // R e l a t i v e p e r m e a b i l i t y , u n i t l e s s
6 printf ( ” \ n R e l a t i v e p e r m e a b i l i t y = %d” , mu_r ) ;
7
8 // R e s u l t
9 // R e l a t i v e p e r m e a b i l i t y = 16

Scilab code Exa 8.2 Magnetization and flux density of ferromagnetic material

1 // S c i l a b Code Ex8 . 2 : Page −8.33 ( 2 0 0 4 )


2 clc ; clear ;
3 H = 10^6; // M a g n e t i c f i e l d s t r e n g t h , amp/ m e t r e
4 ki = 1.5 e -3; // M a g n e t i c susceptibility , units
5 M = ki * H ; // M a g n e t i z a t i o n o f f e r r o m a g n e t i c
m a t e r i a l , amp/ m e t r e

51
6 muo = 4* %pi *1 e -7; // Magnetic p e r m e a b i l i t y , henry
/ metre
7 B = muo *( M + H ) ; // Flux d e n s i t y , t e s l a
8 printf ( ” \ n M a g n e t i z a t i o n o f f e r r o m a g n e t i c
material , =
%3 . 1 e amp/ m e t r e ” , M ) ;
9 printf ( ” \ nFlux d e n s i t y o f f e r r o m a g n e t i c m a t e r i a l , =
%5 . 3 f t e s l a ” , B ) ;
10
11 // R e s u l t
12
13 //Magnetization of ferromagnetic material , = 1.5 e
+03 amp/ m e t r e
14 // Flux d e n s i t y o f f e r r o m a g n e t i c m a t e r i a l , = 1 . 2 5 9
tesla

Scilab code Exa 8.3 Magnetization and flux density

1 // S c i l a b Code Ex8 . 3 : Page −8.34 ( 2 0 0 4 )


2 clc ; clear ;
3 H = 10^4; // M a g n e t i c f i e l d s t r e n g t h , amp/ m e t r e
4 ki = 3.7 e -3; // M a g n e t i c s u s c e p t i b i l i t y , u n i t s
5 M = ki * H ; // M a g n e t i z a t i o n o f f e r r o m a g n e t i c
m a t e r i a l , amp/ m e t r e
6 muo = 4* %pi *1 e -7; // M a g n e t i c p e r b e a b i l i t y , h e n r y
/ metre
7 B = muo *( M + H ) ; // Flux d e n s i t y , weber / s q u a r e m e t e r
8 printf ( ” \ n M a g n e t i z a t i o n o f f e r r o m a g n e t i c m a t e r i a l , =
%d amp/ m e t r e ” , M ) ;
9 printf ( ” \ nFlux d e n s i t y o f f e r r o m a g n e t i c m a t e r i a l , =
%3 . 4 f weber / s q u a r e m e t r e ” , B ) ;
10
11 // R e s u l t
12
13 // M a g n e t i z a t i o n o f f e r r o m a g n e t i c m a t e r i a l , = 37
amp/ m e t r e

52
14 // Flux d e n s i t y o f f e r r o m a g n e t i c m a t e r i a l , = 0 . 0 1 2 6
weber / s q u a r e m e t r e

Scilab code Exa 8.4 Magnetic moment

1 // S c i l a b Code Ex8 . 4 : Page −8.34 ( 2 0 0 4 )


2 clc ; clear ;
3 d = 8906; // D e n s i t y o f n i c k e l , kg m e t r e c u b e
4 An = 6.025 e +26; // Avogadro number , p e r kmol
5 W = 58.7; // Atomic w e i g h t , kg
6 N = d * An / W ; // Number o f n i c k e l atom , p e r c u b e m e t r e
7 Bs = 0.65; // S a t u r a t i o n m a g n e t i c , weber p e r
squaremetre
8 muo = (4* %pi *1 e -7) ; // M a g n e t i c p e r b e a b i l i t y ,
henry / metre
9 mum = Bs /( N * muo ) ; // M a g n e t i c moment , ampere p e r
sqauremetre
10 X = mum /(9.27 e -24) ; // m a g n e t i c moment , b o h r
magneton
11
12 printf ( ” \nNumber o f n i c k e l atom p e r c u b e m e t r e = %3 . 3
e / cubemetre ”, N);
13 printf ( ” \ n M a g n e t i c moment = %1 . 2 e b o h r magneton ” , X )
;
14
15 // R e s u l t
16
17 // Number o f n i c k e l atom p e r c u b e m e t r e = 9 . 1 4 1 e +28
/ cubemetre
18 // M a g n e t i c moment = 6 . 1 0 e −01 b o h r magneton

Scilab code Exa 8.5 Calculation of temperature using classical statistics

53
1 // S c i l a b Code Ex8 . 5 : Page −8.35 ( 2 0 0 4 )
2 clc ; clear ;
3 mu = 9.4 e -24; // M a g n e t i c moment , ampere m e t r e
square
4 H = 2; // M a g n e t i c f i e l d , weber p e r s q u a r e m e t r e
5 k = 1.38 e -23; // Boltzmann C o n s t a n t , j o u l e p e r
kelvin
6 T = (2* mu * H ) /( log (2) * k ) ; // T e m p e r a t u r e u s i n g
classical statistics , K
7
8 printf ( ” \ n T e m p e r a t u r e u s i n g c l a s s i c a l statistics =
%3 . 1 f K” , T ) ;
9
10 // R e s u l t
11 // T e m p e r a t u r e u s i n g c l a s s i c a l s t a t i s t i c s = 3.9 K

Scilab code Exa 8.6 Saturation magnetization

1 // S c i l a b Code Ex8 . 6 : Page −8.36 ( 2 0 0 4 )


2 clc ; clear ;
3 A = 6.025 e +26; // Avogadro number , p e r k mol
4 W = 157.26; // Atomic w e i g h t , kg
5 d = 7.8 e +3; // D e n s i t y o f n i c k e l , kg m e t r e c u b e
6 N = d * A /( W *1000) ; // No o f atoms , p e r gm m e t r e c u b e
7 muo = 4* %pi *1 e -7; // M a g n e t i c p e r b e a b i l i t y , h e n r y
per m
8 mum = N *7.1*(9.27 e -24) ; // M a g n e t i c moment , ampere
metersquare
9 Bs = mum * muo ; // S a t u r a t i o n m a g n e t i z a t i o n , weber /
squaremetre
10 printf ( ” \ n M a g n e t i c moment = %6 . 4 e ampere m e t e r
s q u a r e ” , mum ) ;
11 printf ( ” \ n S a t u r a t i o n m a g n e t i z a t i o n = %6 . 4 e weber /
s q u a r e m e t r e ” , Bs ) ;
12

54
13 // R e s u l t
14 // M a g n e t i c moment = 1 . 9 6 6 9 e +03 ampere m e t e r s q u a r e
15 // S a t u r a t i o n m a g n e t i z a t i o n = 2 . 4 7 1 6 e −03 weber /
squaremetre

Scilab code Exa 8.7 Magnetic moment of nickel in Bohr Magneton

1 // S c i l a b Code Ex8 . 7 : Page −8.36 ( 2 0 0 4 )


2 clc ; clear ;
3 d = 8906; // D e n s i t y o f n i c k e l , kg p e r m e t r e c u b e
4 An = 6.025 e +26; // Avogadro number , p e r k mol
5 W = 58.7; // Atomic w e i g h t , kg
6 N = d * An / W ; // Number d e n s i t y o f n i c k e l atom , per
cubemetre
7 Bs = 0.65; // S a t u r a t i o n m a g n e t i z a t i o n , wb p e r
squaremetre
8 muo = (4* %pi *1 e -7) ; // m a g n e t i c p e r b e a b i l i t y ,
henry / metre
9 mum = Bs /( N * muo ) ; // m a g n e t i c moment , ampere p e r
squaremetre
10 X = mum /(9.27 e -24) ; // m a g n e t i c moment , b o h r
magneton
11
12 printf ( ” \nNumber d e n s i t y o f n i c k e l atom = %3 . 3 e /
cubemetre ”, N);
13 printf ( ” \ n M a g n e t i c moment = %1 . 2 f b o h r magneton ” , X )
;
14
15 // R e s u l t
16
17 // Number d e n s i t y o f n i c k e l atom p e r c u b e m e t r e =
9 . 1 4 1 e +28 / c u b e m e t r e
18 // M a g n e t i c moment = 6 . 1 0 e −01 b o h r magneton

55
Chapter 9

Semiconductors

Scilab code Exa 9.1 Resistivity

1 // S c i l a b Code Ex9 . 1 : Page −9.24 ; ( 2 0 0 4 )


2 clc ; clear ;
3 ni = 2.37 e +19; // C a r r i e r c o n c e n t r a t i o n a t room
temperature
4 mu_e = 0.38; // m o b i l i t y o f e l e c t r o n ; mˆ2Vˆ−1 s
ˆ−1
5 e = 1.6 e -19; // e l e c t r o n i c charge , C
6 mu_h = 0.18; // m o b i l i t y o f h o l e s ; mˆ2Vˆ−1 s ˆ−1
7 sigma = ni * e *( mu_e + mu_h ) ; // c o n d u c t i v i t y , mho .mˆ−1
8 rho = 1/ sigma ; // R e s i s t i v i t y i n Ge , ohm .m
9 printf ( ” \ n C o n d u c t i v i t y i n Ge = %4 . 2 f mho . p e r m” ,
sigma ) ;
10 printf ( ” \ n R e s i s t i v i t y i n Ge = %5 . 3 f ohm .m” , rho ) ;
11
12 // R e s u l t s
13 // C o n d u c t i v i t y i n Ge = 2 . 1 2 mho . p e r m
14 // R e s i s t i v i t y i n Ge = 0 . 4 7 1 ohm .m

Scilab code Exa 9.2 Determination of Fermi level

56
1 // S c i l a b Code Ex9 . 2 : Page −9.24 ( 2 0 0 4 )
2 clc ; clear ;
3 Eg = 1.12; // Bandgap o f s i l i c o n , eV
4 me = 0.12*9.1 e -031; // E f f e c t i v e Mass o f t h e
e l e c t r o n , kg
5 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
6 mh = 0.28*9.1 e -031; // E f f e c t i v e Mass o f t h e h o l e
, kg
7 k = 1.38 e -23; // Boltzman c o n s t a n t , j o u l e per
kelvin
8 T = 300; // t e m p e r a t u r e , K
9 EF = ( Eg /2) +3/4* k * T *( log (2.333) ) / e ; // EF = E( Eg / 2 )
+3/4∗ k ∗T∗ ( l o g ( 2 . 3 3 3 ) ) / e ; Formula
10
11 printf ( ” \ nThe p o s i t i o n o f Fermi L e v e l = %4 . 3 f eV” ,
EF ) ;
12
13 // R e s u l t
14 // The p o s i t i o n o f Fermi L e v e l = 0 . 5 7 6 eV

Scilab code Exa 9.3 Number of intrinsic carriers at 300K

1 // S c i l a b Code Ex9 . 3 : Number o f i n t r i n s i c c a r r i e r s


a t 300K : Page −9.26 ; ( 2 0 0 4 )
2 clc ; clear ;
3 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
4 m = 9.1 e -31; // Mass o f e l e c t r o n , kg
5 T = 300; // Room t e m p e r a t u r e , K
6 k = 1.38 e -23; // Boltzmann C o n s t a n t , j o u l e p e r
kelvin
7 Eg = 0.7* e ; // Energy band gap o f s i l i c o n , J
8 h = 6.626 e -34; // P l a n c k s C o n s t a n t , J s
9 C = 2*(2* %pi * m * k / h ^2) ^(3/2) ; // A c o n s t a n t
10 ni = C * T ^(3/2) * exp (( - Eg ) /(2* k * T ) ) ; // f o r m u l a f o r
c a r r i e r c o n c e n t r a t i o n a t room t e m p e r a t u r e

57
11 printf ( ” \nNumber o f i n t r i n s i c c a r r i e r s a t 300K = %3
. 1 e p e r c u b e m e t r e ” , ni ) ;
12
13 // R e s u l t s
14 // Number o f i n t r i n s i c c a r r i e r s a t 300K = 3 . 3 e +19
per cubemetre

Scilab code Exa 9.4 Resistivity of Ge sample

1 // S c i l a b Code Ex9 . 4 : Page −9.26 ; ( 2 0 0 4 )


2 clc ; clear ;
3 ni = 2.4 e +19; // C a r r i e r c o n c e n t r a t i o n a t room
temperature
4 mu_e = 0.39; // M o b i l i t y o f e l e c t r o n ; mˆ2Vˆ−1 s
ˆ−1
5 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
6 mu_h = 0.19; // M o b i l i t y o f h o l e s , mˆ2Vˆ−1 s ˆ−1
7 sigma = ni * e *( mu_e + mu_h ) ; // C o n d u c t i v i t y , mho .mˆ−1
8 rho = 1/ sigma ; // R e s i s t i v i t y i n Ge , ohm .m
9 printf ( ” \ n C o n d u c t i v i t y i n Ge = %4 . 4 f mho . p e r m” ,
sigma ) ;
10 printf ( ” \ n R e s i s t i v i t y i n Ge = %5 . 3 f ohm .m” , rho ) ;
11
12
13 // R e s u l t s
14 // C o n d u c t i v i t y i n Ge = 2 . 2 2 7 2 mho . p e r m
15 // R e s i s t i v i t y i n Ge = 0 . 4 4 9 ohm .m

Scilab code Exa 9.5 Resistance of Ge rod

1 // S c i l a b Code Ex9 . 5 : Page −9.26 ; (2004)


2 clc ; clear ;

58
3 ni = 2.5 e +19; // C a r r i e r c o n c e n t r a t i o n a t room
temperature
4 mu_e = 0.39; // M o b i l i t y o f e l e c t r o n ; mˆ2Vˆ−1 s
ˆ−1
5 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
6 l = 1e -2; // l e n g t h o f Ge rod , m
7 w = 1e -3; // w i d t h o f Ge rod ,m
8 t = 1e -3; // t h i c k n e s s o f Ge rod , m
9 A = w*t; // Area o f Ge rod , m e t e r s q u a r e
10 mu_h = 0.19; // M o b i l i t y o f h o l e s , mˆ2Vˆ−1 s ˆ−1
11 sigma = ni * e *( mu_e + mu_h ) ; // C o n d u c t i v i t y , mho .mˆ−1
12 R = l /( sigma * A ) ; // R e s i s t i v i t y i n Ge , ohm .m
13 printf ( ” \ n R e s i s t a n c e o f Ge r o d = %4 . 2 e ohm” , R ) ;
14
15 // R e s u l t s
16 // R e s i s t a n c e o f Ge r o d = 4 . 3 1 e +03 ohm

Scilab code Exa 9.6 Conductivity of Si

1 // S c i l a b Code Ex9 . 6 : Page −9.27 ; ( 2 0 0 4 )


2 clc ; clear ;
3 mu_e = 0.48; // M o b i l i t y o f e l e c t r o n ; mˆ2Vˆ−1 s
ˆ−1
4 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
5 m = 9.1 e -31; // Mass o f e l e c t r o n , kg
6 mu_h = 0.013; // M o b i l i t y o f h o l e s , mˆ2Vˆ−1 s ˆ−1
7 T = 300; // Room t e m p e r a t u r e , K
8 k = 1.38 e -23; // Boltzmann C o n s t a n t , j o u l e p e r
kelvin
9 Eg = 1.1* e ; // Energy band gap o f s i l i c o n , J
10 h = 6.626 e -34; // P l a n c k s C o n s t a n t , J s
11 C = 2*(2* %pi * m * k / h ^2) ^(3/2) ; // A c o n s t a n t
12 ni = C * T ^(3/2) * exp (( - Eg ) /(2* k * T ) ) ; // f o r m u l a f o r
c a r r i e r c o n c e n t r a t i o n a t room t e m p e r a t u r e
13 sigma = ni * e *( mu_e + mu_h ) ; // C o n d u c t i v i t y , mho p e r

59
metre
14
15 printf ( ” \ n C o n d u c t i v i t y = %3 . 1 e mho p e r m e t r e ” ,
sigma ) ;
16
17 // R e s u l t s
18 // C o n d u c t i v i t y = 1 . 2 e −03 mho p e r m e t r e

Scilab code Exa 9.7 Electron and hole concentration in silicon

1 // S c i l a b Code Ex9 . 7 : Page −9.27 ; ( 2 0 0 4 )


2 clc ; clear ;
3 Na = 5 e +23; // C o n c e n t r a t i o n o f b o r o n atoms , per
metrecube
4 Nd = 3 e +23; // C o n c e n t r a t i o n o f a r s e n i c atoms , p e r
metrecube
5 p = Na - Nd ; // H o l e c o n c e n t r a t i o n , p e r m e t r e c u b e
6 ni = 2 e +16; // I n t r i n s i c concentration , per
metrecube
7 n = ni ^2/ p ; // Electron concentration , per
metrecube
8
9 printf ( ” \ n H o l e c o n c e n t r a t i o n = %3 . 1 e p e r m e t r e c u b e ”
, p);
10 printf ( ” \ n E l e c t r o n c o n c e n t r a t i o n = %3 . 1 e p e r
metrecube ”, n);
11
12 // R e s u l t s
13 // H o l e c o n c e n t r a t i o n = 2 . 0 e +23 p e r m e t r e c u b e
14 // E l e c t r o n c o n c e n t r a t i o n = 2 . 0 e +09 p e r m e t r e c u b e

Scilab code Exa 9.8 Temperature that shift the fermi level

60
1 // S c i l a b Code Ex9 . 8 : Page −9.28 ( 2 0 0 4 )
2 clc ; clear ;
3 Eg = 1; // Bandgap o f s i l i c o n , eV
4 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
5 k = 1.38 e -23; // Boltzman c o n s t a n t , j o u l e p e r
kelvin
6 E_F = (0.6 -0.5) * e ; // Fermi e n e r g y , j o u l e s
7 // E F =((Ev+Ec ) / 2 ) +3/4∗ k ∗T1 ∗ ( l o g ( 4 ) ) ; // Ev & Ec=
v a l a n c e and c o n d u c t i o n band e n e r g i e s ( f o r m u l a )
8 T = 4* E_F /(3* k * log (4) ) ; // T e m p e r a t u r e t h a t s h i f t t h e
fermi level , K
9
10 printf ( ” \ n T e m p e r a t u r e t h a t s h i f t t h e f e r m i l e v e l =
%4 . 3 d K” , T ) ;
11
12 // R e s u l t
13 // T e m p e r a t u r e t h a t s h i f t t h e f e r m i l e v e l = 1 1 1 5 K

Scilab code Exa 9.9 Conductivity of intrinsic silicon at 300 K

1 // S c i l a b Code Ex9 . 9 : Page −9.29 ; ( 2 0 0 4 )


2 clc ; clear ;
3 ni = 1.5 e +16; // I n t r i n s i c C a r r i e r c o n c e n t r a t i o n a t
room t e m p e r a t u r e
4 mu_e = 0.13; // M o b i l i t y o f e l e c t r o n ; mˆ2Vˆ−1 s
ˆ−1
5 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
6 Nd = 4.99 e +20; // I m p u r i t y atoms , p e r m e t r e c u b e
7 mu_h = 0.05; // M o b i l i t y o f h o l e s , mˆ2Vˆ−1 s ˆ−1
8 sigma = ni * e *( mu_e + mu_h ) ; // C o n d u c t i v i t y , mho p e r
meter
9 sigma_d = Nd * e * mu_e ; // C o n d u c t i v i t y w i t h d o n o r
t y p e i m p u r i t i e s , mho p e r m e t e r
10 sigma_a = Nd * e * mu_h ; // C o n d u c t i v i t y w i t h a c c e p t o r
t y p e i m p u r i t i e s , mho p e r m e t e r

61
11 printf ( ” \ n C o n d u c t i v i t y o f s i l i c o n = %3 . 2 e mho p e r
m e t e r ” , sigma ) ;
12 printf ( ” \ n C o n d u c t i v i t y w i t h d o n o r t y p e i m p u r i t i e s =
%4 . 2 f mho p e r m e t e r ” , sigma_d ) ;
13 printf ( ” \ n C o n d u c t i v i t y w i t h a c c e p t o r t y p e i m p u r i t i e s
= %4 . 2 f mho p e r m e t e r ” , sigma_a ) ;
14
15 // R e s u l t s
16 // C o n d u c t i v i t y o f s i l i c o n = 4 . 3 2 e −04 mho p e r m e t e r
17 // C o n d u c t i v i t y w i t h d o n o r t y p e i m p u r i t i e s = 1 0 . 3 8
mho p e r m e t e r
18 // C o n d u c t i v i t y w i t h a c c e p t o r t y p e i m p u r i t i e s= 3 . 9 9
mho p e r m e t e r

Scilab code Exa 9.10 Conductivity and Position of Ef above the intrinsic level

1 // S c i l a b Code Ex9 . 1 0 : Page −9.31 ; ( 2 0 0 4 )


2 clc ; clear ;
3 ni = 1.5 e +16; // I n t r i n s i c C a r r i e r c o n c e n t r a t i o n a t
room t e m p e r a t u r e
4 mu_e = 0.135; // M o b i l i t y o f e l e c t r o n ; mˆ2Vˆ−1 s
ˆ−1
5 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
6 Nd = 1 e +23; // I m p u r i t y atoms , p e r m e t r e c u b e
7 T = 300; // Temperature , K e l v i n
8 k = 1.38 e -23; // Boltzman c o n s t a n t , j o u l e p e r
kelvin
9 mu_h = 0.048; // M o b i l i t y o f h o l e s , mˆ2Vˆ−1 s ˆ−1
10 sigma = ni * e *( mu_e + mu_h ) ; // C o n d u c t i v i t y , mho p e r
meter
11 p = ni ^2/ Nd ; // H o l e c o n c e n t r a t i o n , p e r m e t r e c u b e
12 sigma_ex = Nd * e * mu_e ; // C o n d u c t i v i t y w i t h d o n o r
t y p e i m p u r i t i e s , mho p e r m e t e r
13 E_F =(3/(4* e ) ) * k * T *( log (0.135/0.048) ) ; // P o s i t i o n
o f f e r m i l e v e l a b o v e t h e i n t r i n s i c l e v e l , eV

62
14 // mu i s i n v e r s e l y p r o p o t i o n a l t o mass
15 printf ( ” \ n C o n d u c t i v i t y o f s i l i c o n = %3 . 2 e mho p e r
m e t e r ” , sigma ) ;
16 printf ( ” \ n H o l e c o n c e n t r a t i o n = %4 . 2 e p e r m e t r e c u b e ” ,
p);
17 printf ( ” \ n C o n d u c t i v i t y w i t h d o n o r t y p e i m p u r i t i e s =
%4 . 2 e mho p e r m e t e r ” , sigma_ex ) ;
18 printf ( ” \ n P o s i t i o n o f f e r m i l e v e l a b o v e t h e
i n t r i n s i c l e v e l = %4 . 2 f eV” , E_F ) ;
19
20 // R e s u l t s
21 // C o n d u c t i v i t y o f s i l i c o n = 4 . 3 9 e −04 mho p e r m e t e r
22 // H o l e c o n c e n t r a t i o n = 2 . 2 5 e +09 p e r m e t r e c u b e
23 // C o n d u c t i v i t y w i t h d o n o r t y p e i m p u r i t i e s = 2 . 1 6 e
+03 mho p e r m e t e r
24 // P o s i t i o n o f f e r m i l e v e l above the i n t r i n s i c
l e v e l = 0 . 0 2 eV

Scilab code Exa 9.11 Intrinsic carrier concentration and conductivity in germanium

1 // S c i l a b Code Ex9 . 1 1 : Page −9.32 ; ( 2 0 0 4 )


2 clc ; clear ;
3 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
4 Eg = 0.7* e ; // Band gap e n e r g y , j o u l e s
5 mu_e = 0.4; // M o b i l i t y o f e l e c t r o n ; mˆ2Vˆ−1 s ˆ−1
6 mu_h = 0.2; // M o b i l i t y o f h o l e s , mˆ2Vˆ−1 s ˆ−1
7 m = 9.1 e -31; // Mass o f e l e c t r o n , kg
8 h = 6.63 e -34; // P l a n c k s C o n s t a n t , J s
9 T = 300; // Temperature , K e l v i n
10 k = 1.38 e -23; // Boltzman c o n s t a n t , j o u l e p e r
kelvin
11 C = 2*(2* %pi * T * m * k / h ^2) ^(3/2) ; // C o n s t a n t p a r a m e t e r
12 ni = C * exp (( - Eg ) /(2* k * T ) ) ; // C a r r i e r
c o n c e n t r a t i o n a t room t e m p e r a t u r e
13 sigma = ni * e *( mu_e + mu_h ) ; // C o n d u c t i v i t y , mho p e r

63
meter
14 printf ( ” \ n C a r r i e r c o n c e n t r a t i o n a t room t e m p e r a t u r e
= %4 . 2 e p e r m e t r e c u b e ” , ni ) ;
15 printf ( ” \ n C o n d u c t i v i t y o f s i l i c o n = %3 . 2 f mho p e r
m e t e r ” , sigma ) ;
16
17
18 // R e s u l t s
19 // C a r r i e r c o n c e n t r a t i o n a t room t e m p e r a t u r e = 3 . 3 4
e +19 p e r m e t r e c u b e
20 // C o n d u c t i v i t y o f s i l i c o n = 3 . 2 0 mho p e r m e t e r

Scilab code Exa 9.12 Forbidden energy band gap

1 // S c i l a b Code Ex9 . 1 2 : Page −9.32 ; ( 2 0 0 4 )


2 clc ; clear ;
3 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
4 mu_e = 0.36; // M o b i l i t y o f e l e c t r o n ; mˆ2Vˆ−1 s
ˆ−1
5 mu_h = 0.17; // M o b i l i t y o f h o l e s , mˆ2Vˆ−1 s ˆ−1
6 rho = 2.12; // R e s i s t i v i t y o f sample , ohm m e t r e
7 sigma = 1/ rho ; // C o n d u c t i v i t y o f sample , mho p e r
meter
8 m = 9.1 e -31; // Mass o f e l e c t r o n , kg
9 h = 6.63 e -34; // P l a n c k s C o n s t a n t , J s
10 T = 300; // Temperature , K e l v i n
11 k = 1.38 e -23; // Boltzman c o n s t a n t , j o u l e p e r
kelvin
12 // But n i = C∗ exp (( −Eg ) / ( 2 ∗ k ∗T) ) ; // C a r r i e r
c o n c e n t r a t i o n a t room t e m p e r a t u r e , t h e r e f o r e
13 C = 2*(2* %pi * T * m * k / h ^2) ^(3/2) ; // C o n s t a n t p a r a m e t e r
14 ni = sigma /( e *( mu_e + mu_h ) ) ; // C a r r i e r
concentration , per metercube
15 b = C / ni ; // R a t i o f o r s i m p l i c i t y
16 Eg = 2/ e * k * T * log ( b ) ; // Band gap e n e r g y , j o u l e s

64
17
18 printf ( ” \ nBand gap e n e r g y = %5 . 4 f eV” , Eg ) ;
19
20 // R e s u l t
21 // Band gap e n e r g y= 0 . 7 9 2 7 eV

Scilab code Exa 9.13 Hall Voltage of a semiconductor

1 // S c i l a b Code Ex9 . 1 3 : Page −9.45 ; ( 2 0 0 4 )


2 clc ; clear ;
3 RH = 3.66 e -4; // H a l l c o e f f i c e n t , m e t e r c u b e /C
4 t = 1e -03; // t h i c k n e s s o f t h e s p e c i m e n , m
5 Bz = 0.5; // M a g n e t i c f l u x d e n s i t y , wb p e r m e t e r
square
6 Ix = 1e -2; // Current , A
7 VH = RH * Ix * Bz / t ; // V o l t a g e a c r o s s s p e c i m e n , v o l t
8 printf ( ” \ n V o l t a g e a c r o s s s p e c i m e n = %3 . 2 f millivolt
” , VH /1 e -3) ;
9
10 // R e s u l t
11 // V o l t a g e a c r o s s s p e c i m e n = 1 . 8 3 millivolt

Scilab code Exa 9.14 Hall coefficient of a semiconductor

1 // S c i l a b Code Ex9 . 1 4 : H a l l c o e f f i c e n t o f a
s e m i c o n d u c t o r : Page −9.46 ; ( 2 0 0 4 )
2 clc ; clear ;
3 Vy = 37 e -06; // V o l t a g e a c r o s s s p e c i m e n , v o l t
4 t = 1e -03; // t h i c k n e s s o f t h e s p e c i m e n , m
5 Bz = 0.5; // M a g n e t i c f l u x d e n s i t y , wb p e r m e t e r
square
6 Ix = 20 e -3; // C u r r e n t , A

65
7 RH = Vy * t /( Ix * Bz ) ; // H a l l c o e f f i c e n t , m e t e r c u b e
/C
8 printf ( ” \ n H a l l c o e f f i c e n t , m e t e r c u b e /C = %3 . 1 e
m e t e r c u b e /C” , RH ) ;
9
10 // R e s u l t
11 // H a l l c o e f f i c e n t , m e t e r c u b e /C = 3 . 7 e −06 meter
c u b e /C

Scilab code Exa 9.15 Mobility density and nature of semiconductor

1 // S c i l a b Code Ex9 . 1 5 : Page −9.46 ; ( 2 0 0 4 )


2 clc ; clear ;
3 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
4 RH = -7.35 e -5; // H a l l c o e f f i c e n t , m e t e r c u b e /C
5 sigma = 200; // Conductivity o f the S i specimen ,
p e r ohm p e r m e t r e
6 n = -1/( RH * e ) ; // E l e c t r o n d e n s i t y , p e r m e t r e c u b e
7 mu = sigma /( n * e ) ; // M o b i l i t y o f t h e c h a r g e
c a r r i e r s , square meter per voly per s e c
8 printf ( ” \ n E l e c t r o n d e n s i t y = %3 . 3 e p e r m e t r e c u b e ” ,
n);
9 printf ( ” \ n M o b i l i t y = %3 . 3 f s q u a r e m e t e r p e r v o l t p e r
s e c ” , mu ) ;
10 printf ( ” \ nAs t h e RH i s n e g a t i v e , s o s p e c i m e n i s n−
type ”);
11
12 // R e s u l t
13 // E l e c t r o n d e n s i t y = 8 . 5 0 3 e +22 p e r m e t r e c u b e
14 // M o b i l i t y = 0 . 0 1 5 s q u a r e m e t e r p e r v o l t p e r s e c
15 // As t h e RH i s n e g a t i v e , s o s p e c i m e n i s n−t y p e

Scilab code Exa 9.16 Hall Voltage

66
1 // S c i l a b Code Ex9 . 1 6 : Page −9.47 ; ( 2 0 0 4 )
2 clc ; clear ;
3 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
4 B = 1.5; // M a g n e t i c f i e l d , t e s l a
5 I = 50; // C u r r e n t , ampere
6 n = 8.4 e +28; // E l e c t r o n d e n s i t y , p e r m e t r e c u b e
7 t = 0.5 e -2; // t h i c k n e s s o f s l a b , m e t r e
8 RH = 1/( n * e ) ; // H a l l c o e f f i c e n t
9 V_H = RH * I * B / t ; // H a l l v o l t a g e , v o l t
10 printf ( ” \ n H a l l V o l t a g e = %3 . 3 f m i c r o v o l t ” , V_H /1 e
-6) ;
11
12 // R e s u l t
13 // H a l l V o l t a g e = 1 . 1 1 6 m i c r o v o l t

Scilab code Exa 9.17 Mobility and number of Charge carrier

1 // S c i l a b Code Ex9 . 1 7 : M o b i l i t y and no o f Charge


c a r r i e r : Page −9.48 ; ( 2 0 0 4 )
2 clc ; clear ;
3 RH = 3.66 e -4; // H a l l C o e f f i c i e n t , m e t r c u b e /C
4 e = 1.6 e -19; // E l e c t r o n i c c h a r g e , C
5 rho = 8.93 e -3; // R e s i s t i v i t y o f sample , ohm m e t e r
6 n = 1/( RH * e ) ; // Number o f c h a r g e c a r r i e r , p e r
metre cube
7 mu_e = RH / rho ; // M o b i l i t y o f e l e c t r o n , mˆ2 p e r
v o l t per sec
8 printf ( ” \nNumber o f c h a r g e c a r r i e r = %3 . 3 e p e r m e t r e
cube ” , n);
9 printf ( ” \ n M o b i l i t y o f e l e c t r o n = %4 . 5 f s q u a r e m e t r e
p e r v o l t p e r s e c ” , mu_e ) ;
10
11 // R e s u l t s
12 // Number o f c h a r g e c a r r i e r = 1 . 7 0 8 e +22 p e r m e t r e
cube

67
13 // M o b i l i t y o f e l e c t r o n = 0 . 0 4 0 9 9 mˆ2 p e r v o l t p e r
sec

68
Chapter 10

Superconductivity

Scilab code Exa 10.1 Critical field

1 // S c i l a b Code Ex10 . 1 : Page −10.3 ( 2 0 0 4 )


2 clc ; clear ;
3 Tc = 3.7; // C r i t i c a l t e m p e r a t u r e , K
4 Ho = 0.0306; // C r i t i c a l f i e l d at zero kelvin ,
tesla
5 T = 2; // t e m p e r a t u r e a t which f i l e d b e i n g
calculated , K
6 Hc = Ho *[1 -( T / Tc ) ^2]; // C r i t i c a l Magnetic f i e l d ,
tesla
7 printf ( ” \ nThe C r i t i c a l f i e l d a t two k e l v i n = %f
t e s l a ” , Hc ) ;
8
9 // R e s u l t
10 // The C r i t i c a l f i e l d a t two k e l v i n = 0 . 0 2 1 6 5 9 t e s l a

Scilab code Exa 10.2 Critical current and Critical field

1 // S c i l a b Code Ex10 . 2 : Page −10.5 ( 2 0 0 4 )

69
2 clc ; clear ;
3 Tc = 7.18; // C r i t i c a l t e m p e r a t u r e , K
4 r = 1e -003; // d i a m e t e r o f w i r e , m
5 Ho = 6.5 e +004; // C r i t i c a l f i e l d at zero kelvin ,
A/m
6 T = 4.2; // t e m p e r a t u r e a t which f i l e d b e i n g
calculated , K
7 Hc = Ho *[1 -( T / Tc ) ^2];
8 ic = %pi * r * Hc ; // c r i t i c a l current , A
9 printf ( ” \ nThe C r i t i c a l f i e l d = %e A/m” , Hc ) ;
10 printf ( ” \ nThe C r i t i c a l c u r r e n t = %f A” , ic ) ;
11
12 // R e s u l t
13 // The C r i t i c a l f i e l d = 4 . 2 7 5 8 5 5 e +04 A/m
14 // The C r i t i c a l c u r r e n t = 1 3 4 . 3 2 9 9 5 4 A

70
Chapter 11

Lasers

Scilab code Exa 11.1 Ratio of relative population

1 // S c i l a b Code Ex11 . 1 : Page − 1 1 . 5 ( 2 0 0 4 )


2 clc ; clear ;
3 h = 6.626 e -034; // Planck ’ s c o n s t a n t , J s
4 c = 3 e +08; // Speed o f l i g h t i n f r e e s p a c e , m/ s
5 k = 8.61 e -5; // Boltzmann c o n s t a n t , J /K
6 T = 300; // T e m p e r a t u r e a t a b s o l u t e s c a l e , K
7 lambda = 6943 e -10; // Wavelength o f v i s i b l e l i g h t
, m
8 E = h * c /( lambda *1.6 e -19) ; // Energy i n eV
9 rate_ratio = exp ( - E /( k * T ) ) ; // R a t i o o f
spontaneous emission to stimulated emission
10
11 printf ( ” \ nThe r a t i o o f r e l a t i v e p o p u l a t i o n = %3 . 2 e ” ,
rate_ratio ) ;
12 printf ( ” \ nEnergy = %3 . 2 f eV” , E ) ;
13
14 // R e s u l t s
15 // The r a t i o o f r e l a t i v e p o p u l a t i o n = 8 . 2 0 e −31
16 // Energy = 1 . 7 9 eV

71
Scilab code Exa 11.2 Energy of excited state of laser system

1 // S c i l a b Code Ex11 . 2 : Page −11.16 ( 2 0 0 4 )


2 clc ; clear ;
3 a1 = 4; // d i a m e t e r o f l a s e r beam f o r d i s t a n c e
first , m
4 a2 = 6; // d i a m e t e r o f l a s e r beam from s e c o n d
distance
5 d1 = 1; // F i r s t d i s t a n c e from l a s e r t o o u t p u t beam
spot , m
6 d2 = 2; // S e c o n d d i s t a n c e from l a s e r t o o u t p u t
beam s p o t , m
7 Div = ( a2 - a1 ) /(2*( d2 - d1 ) ) ;
8 printf ( ” \ n D i v e r g e n c e i n r a d i a n = %d m i l l i r a d i a n ” ,
Div ) ;
9
10 // R e s u l t
11 // D i v e r g e n c e i n r a d i a n = 1 m i l l i r a d i a n

72
Chapter 12

Fibre Optics

Scilab code Exa 12.1 Numerical aperture and acceptance angle of optical fibre

1 // S c i l a b Code Ex12 . 1 : Page −12.6 ( 2 0 0 4 )


2 clc ; clear ;
3 n1 = 1.54; // R e f r a c t i v e i n d e x o f f i b r e c o r e
4 n2 = 1.50; // R e f r a c t i v e i n d e x o f f i b r e c l a d d i n g
5 NA = sqrt ( n1 ^2 - n2 ^2) ; // N u m e r i c a l a p e r t u r e f o r
optical fibre
6 // As s i n ( t h e t a a ) = s q r t ( n1 ˆ2 − n2 ˆ 2 ) , s o l v i n g f o r
theta a
7 theta_a = asind ( sqrt ( n1 ^2 - n2 ^2) ) ; //
acceptance angle of optical fibre , degrees
8 printf ( ” \ n N u m e r i c a l a p e r t u r e f o r o p t i c a l f i b r e = %5
. 3 f ” , NA ) ;
9 printf ( ” \ nThe a c c e p t a n c e a n g l e o f o p t i c a l f i b r e = %4
. 1 f d e g r e e s ” , theta_a ) ;
10
11 // R e s u l t
12 // N u m e r i c a l a p e r t u r e f o r o p t i c a l f i b r e = 0 . 3 4 9
13 // The a c c e p t a n c e a n g l e o f o p t i c a l f i b r e = 2 0 . 4
degrees

73
Scilab code Exa 12.2 V and mode of optical fibre

1 // S c i l a b Code Ex12 . 2 : Page −12.13 ( 2 0 0 4 )


2 clc ; clear ;
3 n1 = 1.53; // R e f r a c t i v e i n d e x o f f i b r e c o r e
4 n2 = 1.50; // R e f r a c t i v e i n d e x o f f i b r e c l a d d i n g
5 lamb = 1e -6; // a b s o l u t e w a v e l e n g t h . m
6 d = 50 e -6; // r a d i u s o f c o r e i n m
7 V = 2* %pi / lamb * d * sqrt ( n1 ^2 - n2 ^2) ; // volume o f
opical fibre
8 N = V ^2/2; // no . o f p o s s i b l e modes
9 printf ( ” \nV o f o p i c a l f i b r e = %6 . 2 f ” , V ) ;
10 printf ( ” \nNo . o f p o s s i b l e modes = %5 . 3 f ” , N ) ;
11
12 // R e s u l t s
13 // V o f o p i c a l f i b r e = 9 4 . 7 2
14 // No . o f p o s s i b l e modes = 4 4 8 5 . 7 3 5

Scilab code Exa 12.3 Loss in signal

1 // S c i l a b Code Ex12 . 3 : Page −12.20 ( 2 0 0 4 )


2 clc ; clear ;
3 po = 40; // R e f r a c t i v e i n d e x o f f i b r e c o r e
4 pi = 100; // R e f r a c t i v e i n d e x o f f i b r e c l a d d i n g
5 p = po / pi ; // r a t i o o f p o w e r s
6 L = -10*( log ( po / pi ) ) ; // R e f r a c t i v e i n d e x o f
medium
7
8 printf ( ” \ n L o s s i n dB = %f dB” , L ) ;
9
10 // R e s u l t
11 // L o s s i n dB = 9 . 1 6 2 9 0 7 dB

74
75

You might also like