Scilab Textbook Companion for Solid State Physics ... - Scilab.in

May 24, 2016 ... Scilab Textbook Companion for. Solid State Physics: Structure And Properties. Of Materials by M. A. Wahab. 1. Created by. Pankaj Bisw...

25 downloads 754 Views 520KB Size
Scilab Textbook Companion for Solid State Physics: Structure And Properties Of Materials by M. A. Wahab1 Created by Pankaj Biswas Electronics Physics Shri Mata Vaishno Devi University College Teacher Dr. Kamni Cross-Checked by Dr. Jitendra Sharma May 24, 2016

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: Structure And Properties Of Materials Author: M. A. Wahab Publisher: Narosa Publishing House Pvt. Ltd. New Delhi Edition: 2 Year: 2010 ISBN: 978-81-7319-603-4

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 Atoms in Crystals

5

2 Atomic Bonding

21

3 Atomic Packing

29

4 Atomic Shape and Size

35

5 Crystal Imperfections

42

6 Atomic Diffusion

61

7 Lattice or Atomic Vibrations

74

8 Diffraction of Waves and Particles by Crystals

78

9 Thermal Properties of Materials

94

10 Free Electrons in Crystals

100

11 Band Theory

115

13 Semiconducting Properties of Materials

117

14 Dielectric Properties of Materials

124

15 Optical Properties of Materials

130

3

16 Magnetic Properties of Materials

134

17 Superconductivity

138

4

List of Scilab Codes Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa

1.1 1.2 1.3 1.4 1.5 1.6 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1.28 2.1 2.2 2.3 2.4 2.5

Exa Exa Exa Exa

2.6 2.7 2.8 3.1

Relationship among cyrstal elements . . . . . . . . . . Primitive unit cell . . . . . . . . . . . . . . . . . . . . Number of Lattice points per unit cell . . . . . . . . . Lattice constant of a unit cell . . . . . . . . . . . . . . Density of diamond . . . . . . . . . . . . . . . . . . . Calculating Unit cell dimensions . . . . . . . . . . . . Angle between two crystal directions . . . . . . . . . . Angle between two directions of cubic crystal . . . . . Miller indices of the crystal plane . . . . . . . . . . . . Indices of lattice plane . . . . . . . . . . . . . . . . . . Length of the intercepts . . . . . . . . . . . . . . . . . Miller indices of lattice planes . . . . . . . . . . . . . . Indices of tetragonal lattice . . . . . . . . . . . . . . . Miller Bravias indices for Miller indices . . . . . . . . Miller Bravias indices of lattice plane . . . . . . . . . . Lattice parameter of a cubic crystal . . . . . . . . . . Interplanar spacing in tetragonal crystal . . . . . . . . Interplanar spacing in cubic crystal . . . . . . . . . . . Molecular stability based on bond dissociation energy Conversion of eV into kcal per mol . . . . . . . . . . . Potential energy of the ionic solids . . . . . . . . . . . Compressibility and energy of ionic crystal . . . . . . . Potential energy and dissociation energy of a diatomic molecule . . . . . . . . . . . . . . . . . . . . . . . . . Binding force and critical separation of a diatomic molecule Bond formation energy of ionic solid . . . . . . . . . . Energy liberation during electron transfer . . . . . . . Packing of spheres in 2D square lattice . . . . . . . . . 5

5 5 6 7 8 9 10 10 11 12 12 13 14 15 16 18 19 19 21 22 22 23 24 25 26 27 29

Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa

3.2 3.3 3.4 3.5 3.6 3.7 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9

Exa 5.10 Exa 5.11 Exa 5.12 Exa 5.13 Exa 5.14 Exa 5.15 Exa 5.16 Exa 5.17 Exa 5.18

Packing efficiency in diamond structure . . . . . . . . Radius of largest sphere at octahedral void . . . . . . Radius of largest sphere at tetrahedral void . . . . . . Diameter of the largest atom at tetrahedral void . . . Void space in cubic close packing . . . . . . . . . . . . The Minimum value of radius ratio in a compound . . Bohr orbit for the hydrogen atom . . . . . . . . . . . . Ionization potentials of hydrogen atom . . . . . . . . . Univalent radii of ions . . . . . . . . . . . . . . . . . . Ionic Radius of Si ions in silicon dioxide . . . . . . . . Ionic Radius occupying an octahedral position . . . . . Percentage ionic character of a covalent molecule . . . Metallic radius from unit cell dimension . . . . . . . . Metallic radii from unit cell dimension . . . . . . . . . Metallic diameter and unit cell dimension of aluminium Variation of atomic fraction with temperature . . . . . Vacancy formation in copper . . . . . . . . . . . . . . Concentration of Schottky imperfections . . . . . . . . Number of Schottky imperfections in NaCl crystal . . Average energy required to create one Schottky defect Ratio of Frenkel defects at two different temperatures Dislocation density of bcc structure of iron . . . . . . Minimum dislocation density in aluminium . . . . . . Total force from its resolved component in a given direction . . . . . . . . . . . . . . . . . . . . . . . . . . Resolved componet of shearing force in a given direction Dependence of applied stress on the slip direction . . . Resolved stress in a direction from applied stress in other direction . . . . . . . . . . . . . . . . . . . . . . . . . Critical resolved shear stress from applied stress in a given direction . . . . . . . . . . . . . . . . . . . . . . Initiation of slip by the applied stress . . . . . . . . . Applied tensile stress in a direction to initiate plastic deformation . . . . . . . . . . . . . . . . . . . . . . . . Dislocation width in copper . . . . . . . . . . . . . . . Change in number of vacancies due to disloaction motion Minimum number of dislocations in motion from shearing rate . . . . . . . . . . . . . . . . . . . . . . . . . . 6

30 31 31 32 32 33 35 35 36 38 38 39 39 40 40 42 43 43 44 45 46 47 48 48 49 50 51 52 53 54 55 56 57

Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa

5.19 5.20 5.21 5.22 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 6.10 6.11 6.12 6.13 6.14 7.1 7.2

Exa 7.3 Exa 8.1 Exa 8.2 Exa Exa Exa Exa Exa Exa Exa

8.3 8.4 8.5 8.6 8.7 8.8 8.9

Exa 8.10 Exa 8.11

Elastic energy of line imperfection . . . . . . . . . . . Spacing between dislocations in a tilt boundary . . . . Tilt angle from dislocation spacing in the boundary . . Tilt angle from dislocation spacing . . . . . . . . . . . Rate of diffusion of nitrogen through steel wall . . . . Rate of diffusion of copper through pure Al sheet . . . Rate of diffusion of carbon through steel bar . . . . . Diffusion through a cylinder . . . . . . . . . . . . . . . Diffusion length of Li in Ge . . . . . . . . . . . . . . . Diffusion time of Li in Ge . . . . . . . . . . . . . . . . Diffusion coefficent of Cu in Al . . . . . . . . . . . . . Activation energy for diffusion of Ag in Si . . . . . . . Arrhenius rate law . . . . . . . . . . . . . . . . . . . . Activation energy for diffusion rates at different temperatures . . . . . . . . . . . . . . . . . . . . . . . . . . . Time required for carburizing of steel . . . . . . . . . Carbon concentration of carburized steel at certain depth Depth of decarburization below the surface of steel . . Diffusion depth of P type semiconductor . . . . . . . . Cut off frequency of the linear lattice of a solid . . . . Comparison of frequency of waves in a monoatomic and diatomic linear systems . . . . . . . . . . . . . . . . . Reflection of electromagentic radiation from a crystal . Shortest wavelength and frequency of X rays from accelerating potential . . . . . . . . . . . . . . . . . . . . Impinging electrons on the target and characteristics of X rays . . . . . . . . . . . . . . . . . . . . . . . . . . . Wavelength of characteristic X rays . . . . . . . . . . . Atomic number of an unknown element . . . . . . . . Wavelength of copper using Moseley law . . . . . . . . Atomic number from wavelength using Moseley law . . Wavelengths of tin and barium using Moseley law . . . Percentage transmitted energy of X rays . . . . . . . . Thickness of lead piece by using two equal intensity X ray wavelengths . . . . . . . . . . . . . . . . . . . . . Angle of reflection by using wavelength of X rays . . . Wavelength of diffracted X rays . . . . . . . . . . . . .

7

57 58 59 59 61 61 62 63 64 64 65 66 66 68 69 70 71 72 74 74 76 78 79 80 81 81 82 83 84 84 85 86

Exa 8.12 Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa

8.13 8.14 8.15 8.16 8.17 9.1 9.2 9.3 9.4 9.5 9.6 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 10.10 10.11 10.12

Exa 10.13 Exa 10.14 Exa 11.2 Exa 13.3 Exa 13.4 Exa 13.5

Reciprocal lattice parameters from 2D direct lattice parameters . . . . . . . . . . . . . . . . . . . . . . . . . Bragg angle and the indices of diffraction of Powder Lines Minimum distance from the centre of the Laue pattern Unit cell height along the axis of a rotation photograph Diffraction of thermal neutrons from planes of Ni crystal Diffraction of electrons from fcc crystal planes . . . . . Exception of Dulong Petit law at room temperature . Specific heat of copper from Debye temperature . . . . Vibrational frequency and molar heat capacity of diamond . . . . . . . . . . . . . . . . . . . . . . . . . . . Debye temperature of copper at low temperature . . . Debye temperature for gold . . . . . . . . . . . . . . . Heat transference into rock salt at low temperature . . Particle moving in one dimensional potential well . . . Motion of a ground state electron in a 3D potential well Motion of an electron excited next to the ground state in a 3D potential well . . . . . . . . . . . . . . . . . . Degeneracy of energy level . . . . . . . . . . . . . . . . Fermi energy of zinc at absolute zero . . . . . . . . . . Electron probability above Fermi energy . . . . . . . . The electroic specific heat of Cu . . . . . . . . . . . . Electrical resitivity of sodium metal . . . . . . . . . . Electrical conductivity of Cu . . . . . . . . . . . . . . Electron mobility inside conductors . . . . . . . . . . . Lorentz number calculation of a solid . . . . . . . . . . Increase in electrical resistivity of a metal with temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . Thermionic emission of a filament . . . . . . . . . . . Hall coefficient of sodium based on free electron model Ratio between kinetic energy of an electron in 2D square lattice . . . . . . . . . . . . . . . . . . . . . . . . . . . Intrinsic concentration of charge carriers in semiconductors . . . . . . . . . . . . . . . . . . . . . . . . . . . . Comparison of intrinsic carrier densities of two semiconductors . . . . . . . . . . . . . . . . . . . . . . . . . . Shift in fermi level with change in concentration of impurities . . . . . . . . . . . . . . . . . . . . . . . . . . 8

87 88 89 90 91 92 94 95 96 97 97 98 100 101 101 103 105 106 107 108 109 110 111 112 113 114 115 117 118 118

Exa Exa Exa Exa Exa Exa Exa Exa

13.6 13.7 13.8 13.9 13.10 13.11 14.1 14.2

Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa Exa

14.3 14.4 14.5 14.6 15.1 15.2 15.3 15.4 15.5 16.1 16.2 16.3

Exa 16.4 Exa 17.1 Exa 17.2 Exa 17.3 Exa 17.4

Electrical resistivity of Ge . . . . . . . . . . . . . . . . Electrical conductivity of intrinsic and extrinsic Si . . Resistance of intrinsic Ge Rod . . . . . . . . . . . . . Hall effect in Si semiconductor . . . . . . . . . . . . . Forward current of a pn diode using diode equation . . Voltage from net forward current using Diode Equation Polarization of water molecule . . . . . . . . . . . . . Dielectric constant from electric polarizability of the atom . . . . . . . . . . . . . . . . . . . . . . . . . . . Electric polarizability of a molecule from its susceptibility Electric polarizability of oxygen atom . . . . . . . . . Dipolar polarization of HCl molecule . . . . . . . . . . Effect of molecular deformation on polarizability . . . Photon count from Planck quantum law . . . . . . . . Inicient energy of photon in photoelectric effect . . . . photon count for green wavelength of Hg . . . . . . . . Photoelectric effect in a photocell . . . . . . . . . . . . Energy required to stimulate the emission of Na doublets Response of copper to magnetic field . . . . . . . . . . Diamagnetic susceptibility of copper . . . . . . . . . . Magnetic induction from orientational energy equivalent of thermal energy . . . . . . . . . . . . . . . . . . . . Behaviour of paramagnetic salt when placed in uniform magnetic field . . . . . . . . . . . . . . . . . . . . . . . Variation of critical magnetic field with temperature . Temperature variation of critical magnetic field for tin Critical current for a lead wire from its critical temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . Dependence of London penetration depth on temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

119 120 121 122 122 123 124 125 125 126 127 128 130 130 131 132 133 134 135 135 136 138 138 139 140

Chapter 1 Atoms in Crystals

Scilab code Exa 1.1 Relationship among cyrstal elements 1 2 3 4 5 6 7 8 9 10 11 12 13

// S c i l a b Code Ex1 . 1 R e l a t i o n s h i p among c y r s t a l e l e m e n t s : Page −2 ( 2 0 1 0 ) f = 18; // Number o f f a c e s o f t h e q u a r t z c r y s t a l c = 14; // Number o f a n g l e s i n t h e q u r a t z c r y s t a l // The r e l a t i o n s h i p amongst t h e c r y s t a l e l e m e n t s can be // e x p r e s s e d by t h e f o l l o w i n g f o r m u l a : // f + c = e + 2; // S o l v i n g f o r e e = f + c - 2; disp (e , ” The number o f e d g e s o f t h e q u a r t z c r y s t a l i s : ”); // R e s u l t // The number o f e d g e s o f t h e q u a r t z c r y s t a l i s : // 30

Scilab code Exa 1.2 Primitive unit cell 10

1 2 3 4 5

6 7 8 9

// S c i l a b Code Ex1 . 2 P r i m i t i v e u n i t c e l l : Page −4 (2010) a = 3 , b = 3; // L a t t i c e t r a n s l a t i o n v e c t o r s a l o n g X and Y d i r e c t i o n , a n g s t r o m c_bar = 3; // Assumed t r a n s l a t i o n v e c t o r a l o n g Z d i r e c t i o n , angstrom c = 1.5*( a + b + c_bar ) ; // R e a l t r a n s l a t i o n v e c t o r along Z d i r e c t i o n , angstrom printf ( ” \n%3 . 1 f i s t h e body c e n t e r e d p o s i t i o n o f a c u b i c u n i t c e l l d e f i n e d by t h e p r i m i t i v e t r a n s l a t i o n v e c t o r s a , b and c b a r . ” , c ) ; V_con = a ^3; // Volume o f c o n v e n t i o n a l u n i t c e l l , metre cube V_primitive = 1/2* V_con ; // Volume o f p r i m i t i v e u n i t c e l l , metre cube printf ( ” \ nThe volume o f c o n v e n t i o n a l u n i t c e l l : %2d a n g s t r o m c u b e ” , V_con ) ; printf ( ” \ nThe volume o f p r i m i t i v e u n i t c e l l : %4 . 1 f a n g s t r o m c u b e ” , V_primitive ) ;

10 11 12

// R e s u l t // 1 3 . 5 i s t h e body c e n t e r e d p o s i t i o n o f a c u b i c u n i t c e l l d e f i n e d by t h e p r i m i t i v e t r a n s l a t i o n v e c t o r s a , b and c b a r . 13 // The volume o f c o n v e n t i o n a l u n i t c e l l : 27 a n g s t r o m cube 14 // The volume o f p r i m i t i v e u n i t c e l l : 1 3 . 5 a n g s t r o m cube

Scilab code Exa 1.3 Number of Lattice points per unit cell // S c i l a b Code Ex1 . 3 Number o f L a t t i c e p o i n t s p e r u n i t c e l l Page −9 ( 2 0 1 0 ) 2 a = 3.60 D -10; // L a t t i c e p a r a m e t e r , m: 3 M = 63.6; // Atomic w e i g h t , gram p e r mole 1

11

4 d = 8960 D +03;

// D e n s i t y o f c o p p e r , g p e r m e t r e

cube 5 N = 6.023 D +23; // Avogadro ’ s No . 6 // Volume o f t h e u n i t c e l l i s g i v e n by 7 // a ˆ3 = M∗n / (N∗d ) 8 // S o l v i n g f o r n 9 n = a ^3* d * N / M ; // Number o f l a t t i c e p o i n t s p e r u n i t

cell 10 disp (n , ” The number o f atoms p e r u n i t c e l l f o r an f c c l a t t i c e o f copper c r y s t a l i s : ”); 11 12 13

// R e s u l t // The number o f atoms p e r u n i t c e l l f o r an f c c l a t t i c e of copper c r y s t a l 14 // 3 . 9 5 8 8 7 0 2

Scilab code Exa 1.4 Lattice constant of a unit cell 1 2 3 4 5 6 7 8 9 10

// S c i l a b Code Ex 1 . 4 L a t t i c e c o n s t a n t o f a u n i t c e l l : Page −9 ( 2 0 1 0 ) M = 58.5; // Atomic w e i g h t o f NaCl , gram p e r mole d = 2180 D +03; // D e n s i t y o f r o c k s a l t , p e r m e t r e cube n = 4; // No . o f atoms p e r u n i t c e l l f o r an f c c l a t t i c e o f NaCl c r y s t a l N = 6.023 D +23; // Avogadro ’ s No . // Volume o f t h e u n i t c e l l i s g i v e n by // a ˆ3 = M∗n / (N∗d ) // S o l v i n g f o r a a = ( n * M /( d * N ) ) ^(1/3) ; // L a t t i c e c o n s t a n t o f u n i t c e l l o f NaCl disp ( a /1 D -10 , ” L a t t i c e c o n s t a n t f o r t h e r o c k s a l t ( NaCl ) c r y s t a l , i n angstrom , i s : ” ) ;

11

12

// R e s u l t // L a t t i c e c o n s t a n t f o r t h e r o c k s a l t ( NaCl ) c r y s t a l , i n angstrom , i s : 14 // 5 . 6 2 7 5 12 13

Scilab code Exa 1.5 Density of diamond 1 2 3 4 5 6 7 8 9 10 11 12 13

// S c i l a b Code Ex 1 . 5 D e n s i t y o f diamond : Page −9 (2010) a = 3.57 D -10; // L a t t i c e p a r a m e t e r o f a diamond crystal M = 12 D -03; // Atomic w e i g h t o f diamond , kg p e r mole n1 = 8; // No . o f c o r n e r atoms i n t h e diamond cubic unit c e l l n2 = 6; // No . o f f a c e c e n t e r e d atoms i n t h e diamond c u b i c u n i t c e l l n3 = 4; // No . o f atoms c o m p l e t e l y w i t h i n t h e unit c e l l n = 1/8* n1 +1/2* n2 +1* n3 ; // No . o f atoms p e r u n i t c e l l f o r an f c c l a t t i c e o f NaCl c r y s t a l N = 6.023 D +23; // Avogadro ’ s No . // Volume o f t h e u n i t c e l l i s g i v e n by // a ˆ3 = M∗n / (N∗d ) // S o l v i n g f o r d d = M * n /( N * a ^3) ; // D e n s i t y o f diamond c u b i c u n i t cell disp ( round ( d ) , ” D e n s i t y o f diamond c u b i c u n i t c e l l , i n kg p e r m e t r e cube , i s : ” ) ;

14 15 16

// R e s u l t // D e n s i t y o f diamond c u b i c u n i t c e l l , i n kg p e r m e t r e cube , i s : 17 // 3 5 0 3

13

Scilab code Exa 1.6 Calculating Unit cell dimensions 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

// S c i l a b Code Ex 1 . 6 C a l c u l a t i n g U n i t c e l l d i m e n s i o n s : Page −9 ( 2 0 1 0 ) d = 2.7 D +03; // D e n s i t y o f f c c s t r u c t u r e o f aluminium , kg p e r m e t r e c u b e M = 26.98 D -03; // Atomic w e i g h t o f aluminium , kg p e r mole n = 4; // No . o f atoms p e r u n i t c e l l o f f c c l a t t i c e s t r u c t u r e o f aluminium N = 6.023 D +23; // Avogadro ’ s No . // Volume o f t h e u n i t c e l l i s g i v e n by // a ˆ3 = M∗n / (N∗d ) // S o l v i n g f o r a a = (( M * n ) /( N * d ) ) ^(1/3) ; // L a t t i c e p a r a m e t e r o f alumitnium u n i t c e l l // For an f c c c r y a t a l l a t t i c e , // 2 ˆ ( 1 / 2 ) = 4R = 2D // S o l v i n g f o r D D = ( a /2^(1/2) ) ; // D i a m e t e r o f aluminium atom disp ( a /1 D -10 , ” The L a t t i c e p a r a m e t e r o f aluminium , i n angstrom , i s : ” ) ; disp ( D /1 D -10 , ” The d i a m e t e r o f aluminium atom , i n angstrom , i s : ” ) ;

16 17 18

// R e s u l t // The L a t t i c e p a r a m e t e r o f aluminium , i n angstrom , is : 19 // 4.0486332 20 // The d i a m e t e r o f aluminium atom , i n angstrom , i s : 21 // 2.862816

14

Scilab code Exa 1.17 Angle between two crystal directions 1 2 3 4 5 6 7 8

// S c i l a b Code Ex 1 . 1 7 A n g l e b e t w e e n two c r y s t a l d i r e c t i o n s : Page −23 ( 2 0 1 0 ) h1 = 1; k1 = 1; l1 = 1; // M i l l e r i n d i c e s o f f i r s t s e t of planes h2 = 0; k2 = 0; l2 = 1; // M i l l e r i n d i c e s o f s e c o n d set of planes // We know t h a t // c o s ( t h e t a ) = ( h1 ∗ h2+k1 ∗ k2+l 1 ∗ l 2 ) / ( s q r t ( h1ˆ2+ k1 ˆ2+ l 1 ˆ 2 ) ∗ s q r t ( h1ˆ2+ k1 ˆ2+ l 1 ˆ 2 ) ) // S o l v i n g f o r t h e t a theta = acos (( h1 * h2 + k1 * k2 + l1 * l2 ) /( sqrt ( h1 ^2+ k1 ^2+ l1 ^2) * sqrt ( h2 ^2+ k2 ^2+ l2 ^2) ) ) ; printf ( ” \ nThe a n g l e b e t w e e n [ %d%d%d ] and [ %d%d%d ] d i r e c t i o n s in the cubic c r y s t a l , in degrees , i s : %4 . 2 f ” , h1 , k1 , l1 , h2 , k2 , l2 , theta *180/ %pi ) ;

9 10 11

// R e s u l t // The a n g l e b e t w e e n [ 1 1 1 ] and [ 0 0 1 ] d i r e c t i o n s i n the cubic c r y s t a l , in degrees , i s : 12 // 54.74

Scilab code Exa 1.18 Angle between two directions of cubic crystal 1 2 3 4 5 6

// S c i l a b Code Ex 1 . 1 8 A n g l e b e t w e e n two d i r e c t i o n s o f c u b i c c r y s t a l : Page − 2 3 ( 2 0 1 0 ) h1 = 1; k1 = 1; l1 = 1 // M i l l e r i n d i c e s f o r f i r s t set of planes h2 = -1; k2 = -1; l2 = 1; // M i l l e r i n d i c e s f o r second s e t of planes // We know t h a t // c o s ( t h e t a ) = ( h1 ∗ h2+k1 ∗ k2+l 1 ∗ l 2 ) / ( s q r t ( h1ˆ2+ k1 ˆ2+ l 1 ˆ 2 ) ∗ s q r t ( h2ˆ2+ k2 ˆ2+ l 2 ˆ 2 ) ) // S o l v i n g f o r t h e t a 15

7

theta = acos (( h1 * h2 + k1 * k2 + l1 * l2 ) /( sqrt ( h1 ^2+ k1 ^2+ l1 ^2) * sqrt ( h2 ^2+ k2 ^2+ l2 ^2) ) ) ; 8 printf ( ” \ nThe a n g l e b e t w e e n [ %d%d%d ] and [ %d %d %d ] d i r e c t i o n s in the cubic c r y s t a l , in degrees , i s : %4 . 1 f ” , h1 , k1 , l1 , h2 , k2 , l2 , theta *180/ %pi ) ; 9 10 11

// R e s u l t // The a n g l e b e t w e e n [ 1 1 1 ] and [−1−1 1 ] d i r e c t i o n s in the cubic c r y s t a l , in degrees , i s : 12 // 109.5

Scilab code Exa 1.19 Miller indices of the crystal plane 1 2 3 4 5 6 7 8 9 10 11 12 13

// S c i l a b Code Ex 1 . 1 9 M i l l e r i n d i c e s o f t h e c r y s t a l p l a n e : Page −25 ( 2 0 1 0 ) m = 2; n = 3; p = 6; // C o e f f i c i e n t s o f i n t e r c e p t s along three axes m_inv = 1/ m ; // R e c i p r o c a t e t h e f i r s t coefficient 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 p_inv = 1/ p ; // R e c i p r o c a t e t h e t h i r d coefficient mul_fact = double ( lcm ( int32 ([ m ,n , p ]) ) ) ; // Find l . c . m. o f m, n and p 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 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 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 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 ) ; // R e s u l t // 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 2 1 )

16

Scilab code Exa 1.20 Indices of lattice plane 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

// S c i l a b Code Ex 1 . 2 0 I n d i c e s o f l a t t i c e p l a n e : Page −25 ( 2 0 1 0 ) m = 10000; // C o e f f i c i e n t o f i n t e r c e p t a l o n g x−a x i s , can be t a k e n a s some l a r g e v a l u e n = 2; // C o e f f i c i e n t o f i n t e r c e p t a l o n g y−a x i s p = 1/2; // C o e f f i c i e n t o f i n t e r c e p t a l o n g z−a x i s m_inv = 1/ m ; // R e c i p r o c a t e m n_inv = 1/ n ; // R e c i p r o c a t e n p_inv = 1/ p ; // R e c i p r o c a t e p mul_fact = n ; // m u l t i p l i c a t i v e f a c t o r 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 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 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 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 ) ; // R e s u l t // 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 : // 0, 1, 4

Scilab code Exa 1.21 Length of the intercepts // S c i l a b Code Ex 1 . 2 1 Length o f t h e i n t e r c e p t s : Page −26 ( 2 0 1 0 ) 2 a = 1.21 D -10; // L a t t i c e p a r a m e t e r o f t h e u n i t cell , m 3 b = 1.84 D -10; // L a t t i c e p a r a m e t e r o f t h e u n i t cell , m 4 c = 1.97 D -10; // L a t t i c e p a r a m e t e r o f t h e u n i t cell , m 1

17

5 p = 1/2; // R e c i p r o c a l o f 6 q = 1/3; // R e c i p r o c a l o f 7 r = 1/( -1) ; // R e c i p r o c a l

m i l l e r i n d e x on x−a x i s m i l l e r i n d e x on y−a x i s o f m i l l e r i n d e x on z−

axis 8 l1 = 1.21 D -10; 9 10 11 12 13

// A c t u a l l e n g t h o f t h e i n t e r c e p t

a l o n g x−a x i s , m mul_fact = l1 /( p * a ) ; // C a l c u l a t e m u l t i p l i c a t i o n factor l2 = mul_fact * q * b ; // A c t u a l l e n g t h o f t h e i n t e r c e p t a l o n g y−a x i s , m l3 = mul_fact * r * c ; // A c t u a l l e n g t h o f t h e i n t e r c e p t a l o n g z−a x i s , m disp ( l2 /1 D -10 , ” The l e n g t h o f t h e i n t e r c e p t a l o n g y− a x i s , i n angstrom , i s : ” ) ; disp ( l3 /1 D -10 , ” The l e n g t h o f t h e i n t e r c e p t a l o n g z− a x i s , i n angstrom , i s : ” ) ;

14 15 16

// R e s u l t // The l e n g t h o f t h e i n t e r c e p t a l o n g y−a x i s , i n angstrom , i s : 17 // 1.2266667 18 // The l e n g t h o f t h e i n t e r c e p t a l o n g z−a x i s , i n angstrom , i s : 19 // − 3.94

Scilab code Exa 1.22 Miller indices of lattice planes 1 2 3 4 5 6

// S c i l a b plane : a = 4; b = 3; c = 2; l1 = 2; m l2 = 3;

Code Ex 1 . 2 2 M i l l e r i n d i c e s Page −26 ( 2 0 1 0 ) // L a t t i c e p a r a m e t e r o f t h e // L a t t i c e p a r a m e t e r o f t h e // L a t t i c e p a r a m e t e r o f t h e // Length o f t h e i n t e r c e p t

of l a t t i c e unit unit unit along

cell cell cell x−a x i s ,

// Length o f t h e i n t e r c e p t a l o n g y−a x i s , 18

7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

m l3 = 4; // Length o f t h e i n t e r c e p t a l o n g z−a x i s , m l = l1 / a ; // I n t e r c e p t p e r u n i t t r a n s l a t i o n a l o n g x−a x i s m = l2 / b ; // I n t e r c e p t p e r u n i t t r a n s l a t i o n a l o n g y−a x i s n = l3 / c ; // I n t e r c e p t p e r u n i t t r a n s l a t i o n a l o n g z−a x i s r1 = 1/ l ; // R e c i p r o c a l o f l r2 = 1/ m ; // R e c i p r o c a l o f m r3 = 1/ n ; // R e c i p r o c a l o f n m1 = 2* r1 ; // m i l l e r i n d e x a l o n g x−a x i s m2 = 2* r2 ; // m i l l e r i n d e x a l o n g y−a x i s m3 = 2* r3 ; // m i l l e r i n d e x a l o n g z−a x i s printf ( ” The r e q u i r e d m i l l e r i n d i c e s o f t h e p l a n e a r e : %d %d %d” , m1 , m2 , m3 ) ; // R e s u l t // The r e q u i r e d m i l l e r i n d i c e s o f t h e p l a n e a r e : // 4, 2, 1

Scilab code Exa 1.23 Indices of tetragonal lattice 1 2 3 4 5 6

// S c i l a b Code Ex 1 . 2 3 I n d i c e s o f t e t r a g o n a l l a t t i c e : Page −26 ( 2 0 1 0 ) // For a t e t r a g o n a l s y s t e m we have a = b a = 1; // L a t t i c e p a r a m e t e r o f t h e u n i t c e l l a l o n g x−a x i s b = 1; // L a t t i c e p a r a m e t e r o f t h e u n i t c e l l a l o n g y−a x i s c = 1.5; // L a t t i c e p a r a m e t e r o f t h e u n i t c e l l a l o n g z−a x i s l1 = 3; // Length o f t h e i n t e r c e p t a l o n g x−a x i s , angstrom 19

7 l2 = 4;

// Length o f t h e i n t e r c e p t a l o n g y−a x i s ,

angstrom 8 l3 = 3;

// Length o f t h e i n t e r c e p t a l o n g z−a x i s ,

angstrom 9 l = l1 / a ; 10 11 12 13 14 15 16 17 18 19 20 21 22

// I n t e r c e p t p e r u n i t t r a n s l a t i o n a l o n g

x−a x i s m = l2 / b ; // I n t e r c e p t p e r u n i t t r a n s l a t i o n a l o n g y−a x i s n = l3 / c ; // I n t e r c e p t p e r u n i t t r a n s l a t i o n a l o n g z−a x i s r1 = 1/ l ; // R e c i p r o c a l o f l r2 = 1/ m ; // R e c i p r o c a l o f m r3 = 1/ n ; // R e c i p r o c a l o f n mul_fact = double ( lcm ( int32 ([ l ,m , n ]) ) ) ; m1 = mul_fact * r1 ; // m i l l e r i n d e x a l o n g x−a x i s m2 = mul_fact * r2 ; // m i l l e r i n d e x a l o n g y−a x i s m3 = mul_fact * r3 ; // m i l l e r i n d e x a l o n g z−a x i s printf ( ” The r e q u i r e d m i l l e r i n d i c e s o f t h e p l a n e a r e : %d %d %d” , m1 , m2 , m3 ) ; // R e s u l t // The r e q u i r e d m i l l e r i n d i c e s o f t h e p l a n e a r e : 4 3 6

Scilab code Exa 1.24 Miller Bravias indices for Miller indices 1 2 3 4 5 6

// S c i l a b Code Ex 1 . 2 4 M i l l e r −B r a v i a s i n d i c e s f o r M i l l e r i n d i c e s : Page −29 ( 2 0 1 0 ) function [ i ] = f (h , k ) i = -( h + k ) ; endfunction h1 = 1; k1 = 1; l1 = 0 ; // F i r s t s e t o f M i l l e r indices h2 = 1; k2 = -1; l2 = 0; // S e c o n d s e t o f m i l l e r indices 20

// T h i r d s e t o f m i l l e r

7 h3 = 3; k3 = 4; l3 = 5;

indices // F o u r t h s e t o f m i l l e r

8 h4 = 3; k4 = -4; l4 = 5;

indices printf ( ” \ nThe M i l l e r −B r a v i a s i n d i c e s c o r r e s p o n d i n g t o t h e m i l l e r i n d i c e s (%d %d %d) , = (%d %d %d %d) ” , h1 , k1 , l1 , h1 , k1 , f ( h1 , k1 ) , l1 ) ; 10 printf ( ” \ nThe M i l l e r −B r a v i a s i n d i c e s c o r r e s p o n d i n g t o t h e m i l l e r i n d i c e s (%d %d %d) , = (%d %d %d %d) ” , h2 , k2 , l2 , h2 , k2 , f ( h2 , k2 ) , l2 ) ; 11 printf ( ” \ nThe M i l l e r −B r a v i a s i n d i c e s c o r r e s p o n d i n g t o t h e m i l l e r i n d i c e s (%d %d %d) , = (%d %d %d %d) ” , h3 , k3 , l3 , h3 , k3 , f ( h3 , k3 ) , l3 ) ; 12 printf ( ” \ nThe M i l l e r −B r a v i a s i n d i c e s c o r r e s p o n d i n g t o t h e m i l l e r i n d i c e s (%d %d %d) , = (%d %d %d %d) ” , h4 , k4 , l4 , h4 , k4 , f ( h4 , k4 ) , l4 ) ; 9

13 14 15

// R e s u l t // The M i l l e r −B r a v i a s i n d i c e s c o r r e s p o n d i n g m i l l e r i n d i c e s ( 1 1 0 ) , = ( 1 1 −2 0 ) 16 // The M i l l e r −B r a v i a s i n d i c e s c o r r e s p o n d i n g m i l l e r i n d i c e s ( 1 −1 0 ) , = ( 1 −1 0 0 ) 17 // The M i l l e r −B r a v i a s i n d i c e s c o r r e s p o n d i n g m i l l e r i n d i c e s ( 3 4 5 ) , = ( 3 4 −7 5 ) 18 // The M i l l e r −B r a v i a s i n d i c e s c o r r e s p o n d i n g m i l l e r i n d i c e s ( 3 −4 5 ) , = ( 3 −4 1 5 )

to the to the to the to the

Scilab code Exa 1.25 Miller Bravias indices of lattice plane // S c i l a b Code Ex 1 . 2 5 M i l l e r B r a v i a s i n d i c e s o f l a t t i c e p l a n e s : Page −30 ( 2 0 1 0 ) 2 function [ h ] = fh (H , K ) // F u n c t i o n f o r c a l c u l a t i n g ( 2H−K) /3 3 h = (2* H - K ) /3; 4 endfunction

1

21

5 6

function [ k ] = fk (H , K ) c a l c u l a t i n g ( 2K−H) /3 7 k = (2* K - H ) /3; 8 endfunction

9 10

// F u n c t i o n f o r

// F u n c t i o n f o r c a l c u l a t i n g

function [ i ] = f (h , k ) i 11 i = -( h + k ) ; 12 endfunction 13 14

// F u n c t i o n f o r c a l c u l a t i n g

function [ l ] = fl ( L ) l 15 l = L; 16 endfunction 17 18 H1 = 1; K1 = 0; L1 = 0 ;

// F i r s t s e t o f M i l l e r

indices 19 H2 = 0; K2 = 1; L2 = 0; indices 20 H3 = 1; K3 = 1; L3 = 0; indices 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

// S e c o n d s e t o f m i l l e r // T h i r d s e t o f m i l l e r

h1 k1 l1 i1

= = = =

fh ( H1 , K1 ) *3; fk ( H1 , K1 ) *3; fl ( L1 ) *3; f ( h1 , k1 ) ;

// // // //

Call Call Call Call

h2 k2 l2 i2

= = = =

fh ( H2 , K2 ) *3; fk ( H2 , K2 ) *3; fl ( L2 ) *3; f ( h2 , k2 ) ;

// C a l l // C a l l // C a l l // C a l l

function fh function fk function l2 function f

h3 k3 l3 i3

= = = =

fh ( H3 , K3 ) *3; fk ( H3 , K3 ) *3; fl ( L3 ) *3; f ( h3 , k3 ) ;

// C a l l // C a l l // C a l l // C a l l

function fh function fk function l3 function f

22

function fh function fk function f l function

printf ( ” \n a r e [ %d 38 printf ( ” \n a r e [ %d 39 printf ( ” \n a r e [ %d 37

The M i l l e r %d %d %d ] ” , The M i l l e r %d %d %d ] ” , The M i l l e r %d %d %d ] ” ,

Bravias H1 , K1 , Bravias H2 , K2 , Bravias H3 , K3 ,

indices L1 , h1 , indices L2 , h2 , indices L3 , h3 ,

o f [ %d%d%d ] k1 , i1 , l1 ) ; o f [ %d%d%d ] k2 , i2 , l2 ) ; o f [ %d%d%d ] k3 , i3 , l3 ) ;

40 41 42

// R e s u l t // The M i l l e r B r a v i a s i n d i c e s o f [ 1 0 0 ] a r e [ 2 −1 −1 0] 43 // The M i l l e r B r a v i a s i n d i c e s o f [ 0 1 0 ] a r e [ −1 2 −1 0] 44 // The M i l l e r B r a v i a s i n d i c e s o f [ 1 1 0 ] a r e [ 1 1 −2 0]

Scilab code Exa 1.26 Lattice parameter of a cubic crystal 1 2 3 4 5 6 7 8

// S c i l a b Code Ex 1 . 2 6 L a t t i c e p a r a m e t e r o f a c u b i c c r y s t a l : Page −33 ( 2 0 1 0 ) h = 1; k = 1; l = 1; // M i l l e r I n d i c e s f o r p l a n e s i n a cubic crystal d = 2D -10; // I n t e r p l a n a r s p a c i n g , m // For c u b i c c r y s t a l s , t h e i n t e r p l a n a r s p a c i n g i s g i v e n by // d = a / ( hˆ2+kˆ2+ l ˆ 2 ) ˆ 1 / 2 ; // S o l v i n g f o r a a = ( h ^2+ k ^2+ l ^2) ^(1/2) * d ; // l a t t i c e p a r a m e t e r o f cubic crystal , m disp ( a /1 D -10 , ” The l a t t i c e p a r a m e t e r o f t h e c u b i c c r y s t a l , i n angstrom , i s : ” ) ;

9 10 11

// R e s u l t // The l a t t i c e p a r a m e t e r o f t h e c u b i c c r y s t a l , i n angstrom , i s : 12 // 3 . 4 6 4 1 0 1 6 23

Scilab code Exa 1.27 Interplanar spacing in tetragonal crystal 1 2 3

4 5

// S c i l a b Code Ex 1 . 2 7 I n t e r p l a n a r s p a c i n g i n t e t r a g o n a l c r y s t a l : Page −33 ( 2 0 1 0 ) h = 1; k = 0; l = 1; // M i l l e r I n d i c e s f o r p l a n e s i n a cubic crystal a = 2.42 D -10; b = 2.42 D -10; c = 1.74 D -10; // L a t t i c e parameters o f a t e t r a g o n a l c r y s t a l , each in m d = [( h ^2+ k ^2) / a ^2 + l ^2/ c ^2]^( -1/2) ; // The interplanar spacing for cubic crystal , m disp ( d /1 D -10 , ” The i n t e r p l a n a r s p a c i n g b e t w e e n c o n s e c u t i v e ( 1 0 1 ) p l a n e s : i n angstrom , i s : ” ) ;

6 7 8

// R e s u l t // The i n t e r p l a n a r s p a c i n g b e t w e e n c o n s e c u t i v e ( 1 0 1 ) p l a n e s : i n angstrom , i s : 9 // 1 . 4 1 2 7 3 3 8

Scilab code Exa 1.28 Interplanar spacing in cubic crystal 1 2 3 4 5

// S c i l a b Code Ex 1 . 2 8 I n t e r p l a n a r s p a c i n g i n c u b i c c r y s t a l : Page −36 ( 2 0 1 0 ) h = 3; k = 2; l = 1; // M i l l e r I n d i c e s f o r p l a n e s i n a cubic crystal a = 4.21 D -10; // I n t e r a t o m i c s p a c i n g , m d = a /( h ^2+ k ^2+ l ^2) ^(1/2) ; // The i n t e r p l a n a r spacing for cubic crystals , m disp ( d /1 D -10 , ” The i n t e r p l a n a r s p a c i n g b e t w e e n c o n s e c u t i v e ( 3 2 1 ) p l a n e s : i n angstrom , i s : ” ) ;

6

24

// R e s u l t // The i n t e r p l a n a r s p a c i n g b e t w e e n c o n s e c u t i v e ( 3 2 1 ) p l a n e s : i n angstrom , i s : 9 // 1 . 1 2 5 1 6 9 8 7 8

25

Chapter 2 Atomic Bonding

Scilab code Exa 2.1 Molecular stability based on bond dissociation energy 1 2 3 4

5 6 7 8 9

10 11 12 13

// S c i l a b Code Ex2 . 1 S t a b i l i t y o f m o l e c u l e b a s e d on bond d i s s o c i a t i o n e n e r g y : Page −61 ( 2 0 1 0 ) e = 1.6 D -19; // E l e c t r o n i c c h a r g e , C N = 6.023 D +23; // Avogadro ’ s number e0 = 8.854 D -12; // A b s o l u t e E l e c t r i c a l p e r m i t i v i t t y o f f r e e s p a c e , coulomb s q u a r e p e r newton p e r metre square Re = 3D -10; // E q u i l i b r i u m s e p a r a t i o n , m IE = 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, kJ / mol EA = 335; // E l e c t r o n a f f i n i t y f o r atom B , kJ / mol IS = 3D -10; // I n t e r a t o m i c s e p a r a t i o n b e t w e e n A+ and B−, m Ue = -( e ^2* N ) /(4* %pi * e0 * Re *1 D +3) ; // P o t e n t i a l e n e r g y a t e q u i l i b r i u m s e p a r a t i o n o f A+B− m o l e c u l e , kJ / mol DE = Ue + IE - EA ; // Bond d i s s o c i a t i o n e n e r g y o f A+ B− m o l e c u l e , kJ / mol printf ( ” \ nThe bond d i s s o c i a t i o n e n e r g y o f A+B− m o l e c u l e i s : %d kJ / mol ” , DE ) ; if ( DE < 0) disp ( ” The m o l e c u l e A+B− i s s t a b l e . . ” ) ; 26

14 else 15 disp ( ” The m o l e c u l e A+B− i s u n s t a b l e . . ” ) ; 16 end 17 18 // R e s u l t 19 // The bond d i s s o c i a t i o n e n e r g y o f A+B− m o l e c u l e , 20

//

i n kJ / mol , i s : −294 The m o l e c u l e A+B− i s s t a b l e . .

Scilab code Exa 2.2 Conversion of eV into kcal per mol 1 2 3 4 5 6 7 8 9 10 11 12

// S c i l a b Code Ex2 . 2 C o n v e r s i o n o f eV i n t o k c a l / mol : Page −64 ( 2 0 1 0 ) e = 1.6 D -19; // E l e c t r o n i c c h a r g e , C N = 6.023 D +23; // Avogadro ’ s number J = 4.184 D +3; // J o u l e ’ s m e c h a n i c a l e q u i v a l e n t o f heat V = 1; // P o t e n t i a l d i f f e r e n c e , V eV = e * V ; // Energy e q u i v a l e n t o f 1 e l e c t r o n −v o l t , J eVpm = eV * N ; // E l e c t r o n −v o l t p e r mole , J / mol Ecal = eVpm / J ; // Energy e q u i v a l e n t o f 1eV , k c a l / mole printf ( ” \ n1 eV i s a p p r o x i m a t e l y e q u a l t o %6 . 3 f k c a l / mol ” , Ecal ) ; // R e s u l t // 1 eV i s a p p r o x i m a t e l y e q u a l t o 2 3 . 0 3 3 k c a l / mol

Scilab code Exa 2.3 Potential energy of the ionic solids // S c i l a b Code Ex2 . 3 P o t e n t i a l e n e r g y o f t h e s y s t e m o f Na+ and Cl− i o n s : Page −68 ( 2 0 1 0 ) 2 e = 1.6 D -19; // E l e c t r o n i c c h a r g e , C

1

27

ep_0 = 8.854 D -12; // A b s o l u t e e l e c t r i c a l p e r m i t t i v i t y o f f r e e s p a c e , coulomb s q u a r e p e r newton p e r m e t r e s q u a r e 4 Re = 2D -10; // E q u i l i b r i u m s e p a r a t i o n b e t w e e n Na+ and Cl− i o n s , m 5 U = -e /(4* %pi * ep_0 * Re ) ; // P o t e n t i a l e n e r g y o f NaCl m o l e c u l e a t e q u i l i b r i u m s e p a r a t i o n , e l e c t r o n −v o l t 6 printf ( ” \ nThe p o t e n t i a l e n e r g y o f NaCl m o l e c u l e a t e q u i l i b r i u m s e p a r a t i o n 5 i s : %3 . 1 f eV” , U ) ; 3

7 8 9

// R e s u l t // The p o t e n t i a l e n e r g y o f NaCl m o l e c u l e a t e q u i l i b r i u m s e p a r a t i o n 5 i s : −7.2 eV

Scilab code Exa 2.4 Compressibility and energy of ionic crystal 1 2 3

4 5 6 7 8 9

10

// S c i l a b Code Ex2 . 4 C o m p r e s s i b i l i t y and i o n i c e n e r g y o f NaCl c r y s t a l : Page −68 ( 2 0 1 0 ) e = 1.6 D -19; // E l e c t r o n i c c h a r g e , C ep_0 = 8.854 D -12; // A b s o l u t e e l e c t r i c a l p e r m i t t i v i t y o f f r e e s p a c e , coulomb s q u a r e p e r newton p e r m e t r e s q u a r e Re = 2.81 D -10; // E q u i l i b r i u m s e p a r a t i o n b e t w e e n Na+ and Cl− i o n s , m A = 1.7496; // Madelung c o n s t a n t n = 9; // Power o f R i n t h e r e p u l s i v e term o f p o t e n t i a l e n e r g y o f two p a r t i c l e s IP_Na = 5.14; // I o n i z a t i o n p o t e n t i a l o f sodium , eV EA_Cl = 3.61; // E l e c t r o n A f f i n i t y o f c h l o r i n e , eV K0 = (72* %pi * ep_0 * Re ^4) /(( n - 1) * A * e ^2) ; // C o m p r e s s i b i l t y o f NaCl c r y s t a l , m e t r e s q u a r e newton U = -( A * e ) /(4* %pi * ep_0 * Re ) *(1 -1/ n ) ; // P o t e n t i a l e n e r g y o f NaCl m o l e c u l e a t e q u i l i b r i u m s e p a r a t i o n , e l e c t r o n −v o l t 28

11 12 13 14 15 16

U_bar = U /2; // P o t e n t i a l e n e r g y p e r i o n , e l e c t r o n − volt delta_E = IP_Na - EA_Cl ; // Energy r e q u i r e d t o p r o d u c e t h e i o n −p a i r , eV E_ion = delta_E /2; // Energy r e q u i r e d t o p r o d u c e p e r i o n , eV C_E = U_bar + E_ion ; // C o h e s i v e e n e r g y p e r i o n , eV printf ( ” \ nThe c o m p r e s s i b i l i t y o f NaCl c r y s t a l i s %4 . 2 e m e t r e s q u a r e newton ” , K0 ) ; printf ( ” \ nThe c o h e s i v e e n e r g y o f NaCl c r y s t a l i s %4 . 2 f eV” , C_E ) ;

17 18 19

// R e s u l t // The c o m p r e s s i b i l i t y o f NaCl c r y s t a l i s 3 . 4 8 e −011 m e t r e s q u a r e newton 20 // The c o h e s i v e e n e r g y o f NaCl c r y s t a l i s −3.21 eV

Scilab code Exa 2.5 Potential energy and dissociation energy of a diatomic molecule 1

2 3

4

5 6 7

// S c i l a b Code Ex2 . 5 P o t e n t i a l e n e r g y and d i s s o c i a t i o n e n e r g y o f a d i a t o m i c m o l e c u l e : Page −69 ( 2 0 1 0 ) e = 1.6 D -19; // E l e c t r o n i c c h a r g e , C A = 1.44 D -39; // C o n s t a n t c o r r s p o n d i n g t o t h e a t t r a c t i v e term i n p o t e n t i a l e n e r g y , j o u l e m e t r e square B = 2.19 D -115; // C o n s t a n t c o r r e s p o n d i n g t o t h e r e p u l s i v e term i n p o t e n t i a l e n e r g y , j o u l e m e t r e r a i s e d t o power 10 Re = (5* B / A ) ^(1/8) ; // E q u i l i b r i u m s p a c i n g o f diatomic molecule , m n = 2; // Power o f R i n t h e a t t r a c t i v e term o f p o t e n t i a l e n e r g y o f two p a r t i c l e s m = 10; // Power o f R i n t h e r e p u l s i v e term o f 29

p o t e n t i a l e n e r g y o f two p a r t i c l e s 8 D = A /( Re ^2* e ) *(1 - n / m ) ; // D i s s o c i a t i o n e n e r g y o f d i a t o m i c m o l e c u l e , eV 9 printf ( ” \ nThe e q u i l i b r i u m s p a c i n g o f d i a t o m i c m o l e c u l e i s %4 . 2 e m” , Re ) ; 10 printf ( ” \ nThe d i s s o c i a t i o n e n e r g y o f d i a t o m i c m o l e c u l e i s %4 . 2 e eV” , D ) ; 11 12 13

// R e s u l t // The e q u i l i b r i u m s p a c i n g o f d i a t o m i c m o l e c u l e i s 4 . 0 8 e −010 m 14 // The d i s s o c i a t i o n e n e r g y o f d i a t o m i c m o l e c u l e i s 4 . 3 4 e −002 eV

Scilab code Exa 2.6 Binding force and critical separation of a diatomic molecule 1 2 3 4 5 6 7 8

9

// S c i l a b Code Ex2 . 6 B i n d i n g f o r c e and c r i t i c a l s e p a r a t i o n o f a d i a t o m i c m o l e c u l e : Page −69 ( 2 0 1 0 ) Re = 3D -10; // E q u i l i b r i u m s p a c i n g o f d i a t o m i c molecule , m e = 1.6 D -19; // E l e c t r o n i c c h a r g e , C D = 4* e ; // D i s s o c i a t i o n e n e r g y o f d i a t o m i c m o l e c u l e , eV n = 2; // Power o f R i n t h e a t t r a c t i v e term o f p o t e n t i a l e n e r g y o f two p a r t i c l e s m = 10; // Power o f R i n t h e r e p u l s i v e term o f p o t e n t i a l e n e r g y o f two p a r t i c l e s Ue = -D ; // P o t e n t i a l e n e r g y o f d i a t o m i c m o l e c u l e a t equilibrium separation , joule A = -( Ue * Re ^ n ) /(1 - n / m ) ; // C o n s t a n t c o r r s p o n d i n g t o t h e a t t r a c t i v e term i n p o t e n t i a l e n e r g y , j o u l e metre square B = A * Re ^8/5; // C o n s t a n t c o r r e s p o n d i n g t o t h e r e p u l s i v e term i n p o t e n t i a l e n e r g y , j o u l e m e t r e 30

10 11 12

13

14 15 16 17 18

19

20 21 22 23

r a i s e d t o power 10 Rc = (55/3* B / A ) ^(1/8) ; // C r i t i c a l s e p a r a t i o n between the n u c l e i , m F_min = -2* A / Rc ^3*(1 -( Re / Rc ) ^8) ; // The minimum f o r c e r e q u i r e d to d i s s o c i a t e the moleule , N disp (A , ” The c o n s t a n t A c o r r e s p o n d i n g t o t h e a t t r a c t i v e p o t e n t i a l energy , i n j o u l e metre square , i s : ”); disp (B , ” The c o n s t a n t B c o r r e s p o n d i n g t o t h e r e p u l s i v e p o t e n t i a l energy , i n j o u l e metre r a i s e d t o power 1 0 , i s : ” ) ; disp ( Rc /1 d -10 , ” The c r i t i c a l s e p a r a t i o n b e t w e e n t h e n u c l e i , i n angstrom , i s : ” ) ; disp ( F_min , ” The minimum f o r c e r e q u i r e d t o d i s s o c i a t e t h e m o l e c u l e , i n N, i s : ” ) ; // R e s u l t // The c o n s t a n t A c o r r e s p o n d i n g t o t h e a t t r a c t i v e p o t e n t i a l energy , i n j o u l e metre square , i s : // 7 . 2 0 0D−38 // The c o n s t a n t B c o r r e s p o n d i n g t o t h e r e p u l s i v e p o t e n t i a l e n e r g y , i n j o u l e m e t r e r a i s e d t o power 10 , i s : // 9 . 4 4 D−115 // The c r i t i c a l s e p a r a t i o n b e t w e e n t h e n u c l e i , i n angstrom , i s : // 3 . 5 2 9D−10 // The minimum f o r c e r e q u i r e d t o d i s s o c i a t e t h e m o l e c u l e , i n N, i s : // −2.383D−09

Scilab code Exa 2.7 Bond formation energy of ionic solid // S c i l a b Code Ex2 . 7 Bond f o r m a t i o n Energy f o r K+ and Cl− i o n p a i r : Page −70 ( 2 0 1 0 ) 2 eps_0 = 8.854 D -12; // A b s o l u t e e l e c t r i c a l 1

31

3 4 5 6 7

8 9 10 11

p e r m i t t i v i t y o f f r e e s p a c e , coulomb s q a u r e p e r newton p e r m e t r e s q u a r e e = 1.6 D -19; // E l e c t r o n i c c h a r g e , C IP_K = 4.1; // I o n i z a t i o n p o t e n t i a l o f p o t a s s i u m , e l e c t r o n −v o l t EA_Cl = 3.6; // E l e c t r o n a f f i n i t y o f c h l o r i n e , e l e c t r o n −v o l t delta_E = IP_K - EA_Cl ; // Net e n e r g y r e q u i r e d t o p r o d u c e t h e i o n −p a i r , e l e c t r o n −v o l t Ec = delta_E ; // Coulomb e n e r g y e q u a l s n e t e n e r g y r e q u i r e d to produce the ion pair , in e l e c t r o n − volt // S i n c e Ec = −e / ( 4 ∗ %pi ∗ e p s 0 ∗R) , s o l v i n g f o r R R = -e /(4* %pi * eps_0 * Ec ) ; // S e p a r a t i o n b e t w e e n K+ and Cl− i o n p a i r , m disp ( Ec , ” The bond f o r m a t i o n e n e r g y f o r K+ and Cl− i o n p a i r , i n eV , i s : ” ) ; disp ( R /1 D -10 , ” The s e p a r a t i o n b e t w e e n K+ and Cl− i o n p a i r , i n angstrom , i s : ” ) ;

12 13 14

// R e s u l t // The bond f o r m a t i o n e n e r g y f o r K+ and Cl− i o n p a i r , i n eV , i s : 15 // 0 . 5 16 // The s e p a r a t i o n b e t w e e n K+ and Cl− i o n p a i r , i n angstrom , i s : 17 // − 2 8 . 7 6 0 7 7 6

Scilab code Exa 2.8 Energy liberation during electron transfer // S c i l a b Code Ex2 . 8 Energy l i b e r a t e d d u r i n g e l e c t r o n t r a n s f e r between i o n s o f a m o l e c u l e : Page −71 ( 2 0 1 0 ) 2 eps_0 = 8.854 D -12; // A b s o l u t e e l e c t r i c a l p e r m i t t i v i t y o f f r e e s p a c e , coulomb s q a u r e p e r 1

32

3 4 5 6 7 8 9 10 11 12 13

newton p e r m e t r e s q u a r e e = 1.6 D -19; // E l e c t r o n i c c h a r g e , C R = 5D -10; // S e p a r a t i o n b e t w e e n t h e i o n s M and X , m IP_M = 5; // I o n i z a t i o n p o t e n t i a l o f M, eV EA_X = 4; // E l e c t r o n a f f i n i t y o f X, eV U = -e /(4* %pi * eps_0 * R ) ; // The p o t e n t i a l e n e r g y o f MX m o l e c u l e , eV delta_E = IP_M - EA_X ; // The n e t e n e r g y r e q u i r e d t o p r o d u c e t h e i o n p a i r , eV Er = delta_E + U ; // Energy r e q u i r e d t o t r a n s f e r an e l e c t r o n from M t o X atom , eV printf ( ” \ nThe e n e r g y r e q u i r e d t o t r a n s f e r an e l e c t r o n from M t o X atom = %4 . 2 f eV” , Er ) ; // R e s u l t // The e n e r g y r e q u i r e d t o t r a n s f e r an e l e c t r o n from M t o X atom = −1.88 eV

33

Chapter 3 Atomic Packing

Scilab code Exa 3.1 Packing of spheres in 2D square lattice 1 2 3 4 5

6 7 8 9 10 11

// S c i l a b Code Ex3 . 1 P a c k i n g o f e q u a l s p h e r e s i n two d i m e n s i o n a l s q u a r e l a t t i c e : Page −88 ( 2 0 1 0 ) // Here we may assume s q u a r e o f u n i t l e n g t h i . e . a = 1 s u c h t h a t r a d i u s o f s p h e r e , R = a /2 = 0 . 5 a = 1; // Length o f t h e s i d e o f t h e s q u a r e , u n i t R = a /2; // R a d i u s o f t h e s p h e r e , u n i t r = ( sqrt (2) -1) * R ; // R a d i u s o f t h e s p h e r e i n t r o d u c e d w i t h i n t h e v o i d p r o d u c e d by t h e p a c k i n g o f e q u a l s p h e r e s on s q u a r e l a t t i c e , u n i t A = %pi * R ^2; // Area a s s o c i a t e d w i t h a s p h e r e , square units FA = a ^2 - A ; // F r e e a r e a o c c u p i e d by v o i d i n square l a t t i c e , square units FA_per = FA *100; // P e r c e n t a g e f r e e a r e a i n square l a t t i c e printf ( ” \ n F r e e a r e a i n s q u a r e l a t t i c e i s : %4 . 1 f p e r c e n t ” , FA_per ) ; // R e s u l t // F r e e a r e a i n s q u a r e l a t t i c e i s : 2 1 . 5 p e r c e n t

34

Scilab code Exa 3.2 Packing efficiency in diamond structure 1 2 3 4 5 6 7 8 9

10 11 12 13 14 15

// S c i l a b Code Ex3 . 2 P a c k i n g e f f i c i e n c y i n diamond s t r u c t u r e : Page −92 ( 2 0 1 0 ) // For s i m p l i c i t y we may t a k e r a d i u s o f t h e atom , R = 1 unit R = 1; // R a d i u s o f t h e atom i n b c c l a t t i c e , u n i t nc = 8; // Number o f c o r n e r atoms i n diamond structure nfcc = 6; // Number o f f a c e c e n t r e d atoms i n diamond s t r u c t u r e na = 4; // Number o f atoms c o m p l e t e l y w i t h i n t h e unit c e l l n = 1/8* nc +1/2* nfcc +1* na ; // E f f e c t i v e number o f atoms i n t h e diamond s t r u c t u r e V_atom = 8*4/3* %pi * R ^3; // Volume o f atoms w i t h i n the u n i t c e l l , u n i t cube // S i n c e f o r a diamond c u b i c c r y s t a l , t h e s p a c e l a t t i c e i s f c c , w i t h two a t o s p e r l a t t i c e p o i n t , s u c h t h a t 8∗R = s q r t ( 3 ) ∗ a , s o l v i n g f o r a a = 8* R / sqrt (3) ; // l a t t i c e p a r a m e t e r o f diamond structure , unit V_cell = a ^3; // Volume o f t h e u n i t c e l l , u n i t cube eta = V_atom / V_cell *100; // P a c k i n g e f f i c i e n c y i n diamond s t r u c t u r e printf ( ” \ nThe p a c k i n g e f f i c i e n c y i n diamond s t r u c t u r e i s : %2 . 0 f p e r c e n t ” , eta ) ; // R e s u l t // The p a c k i n g e f f i c i e n c y i n diamond s t r u c t u r e i s : 34 p e r c e n t

35

Scilab code Exa 3.3 Radius of largest sphere at octahedral void 1

2 3 4 5 6 7 8 9 10

// S c i l a b Code Ex3 . 3 R a d i u s o f l a r g e s t s p h e r e t h a t can be p l a c e d a t t h e o c t a h e d r a l v o i d : Page −100 (2010) // For s i m p l i c i t y we may t a k e r a d i u s o f t h e atom , R = 1 unit R = 1; // R a d i u s o f t h e atom i n b c c l a t t i c e , u n i t // For a b c c l a t t i c e , 4∗R = a ∗ s q r t ( 3 ) , s o l v i n g f o r a a = 4* R / sqrt (3) ; // l a t t i c e p a r a m e t e r o f b c c c r y s t a l , unit // S i n c e R + Rx = a / 2 , s o l v i n g f o r Rx Rx = a /2 - R ; // R a d i u s o f t h e l a r g e s t s p h e r e t h a t w i l l f i t i n t o the o c t a h e d r a l void , u n i t printf ( ” \ nThe r a d i u s o f t h e l a r g e s t s p h e r e t h a t w i l l f i t i n t o t h e o c t a h e d r a l v o i d i s : %5 . 3 fR ” , Rx ) ; // R e s u l t // The r a d i u s o f t h e l a r g e s t s p h e r e t h a t w i l l f i t i n t o t h e o c t a h e d r a l v o i d i s : 0 . 1 5 5R

Scilab code Exa 3.4 Radius of largest sphere at tetrahedral void 1

2 3 4 5 6 7

// S c i l a b Code Ex3 . 4 R a d i u s o f l a r g e s t s p h e r e t h a t can be p l a c e d a t t h e t e t r a h e d r a l v o i d : Page −100 (2010) // For s i m p l i c i t y we may t a k e r a d i u s o f t h e atom , RL = 1 unit RL = 1; // R a d i u s o f t h e atom i n b c c l a t t i c e , unit // For a b c c l a t t i c e , 4∗RL = a ∗ s q r t ( 3 ) , s o l v i n g f o r a a = 4* RL / sqrt (3) ; // L a t t i c e p a r a m e t e r o f b c c crystal , unit // F u r t h e r RL + Rx = s q r t ( 5 ) ∗ a / 4 , s o l v i n g f o r Rx Rx = sqrt (5) * a /4 - RL ; // R a d i u s o f t h e l a r g e s t 36

sphere that w i l l f i t into unit 8 printf ( ” \ nThe r a d i u s o f t h e f i t into the t e t r a h e d r a l ; 9 // R e s u l t 10 // The r a d i u s o f t h e l a r g e s t into the t e t r a h e d r a l void

the o c t a h e d r a l void , l a r g e s t sphere that w i l l v o i d i s : %5 . 3 fRL ” , Rx )

sphere that w i l l i s : 0 . 2 9 1 RL

fit

Scilab code Exa 3.5 Diameter of the largest atom at tetrahedral void 1

2 3 4 5 6 7

8 9 10

// S c i l a b Code Ex3 . 5 D i a m e t e r o f t h e l a r g e s t atom t h a t would f i t i n t o t h e t e t r a h e d r a l v o i d : 5 Page −101 ( 2 0 1 0 ) a = 3.52 D -10; // L a t t i c e p a r a m e t e r f o r Ni , m // For an f c c l a t t i c e , s q r t ( 2 ) ∗ a = 4∗R , s o l v i n g f o r R R = sqrt (2) * a /4; // R a d i u s o f t h e atom i n f c c lattice , m R_oct = 0.414* R ; // R a d i u s o f t h e o c t a h e d r a l v o i d in f c c c l o s e packing , m D = 2* R_oct ; // D i a m e t e r o f t h e o c t a h e d r a l v o i d in the f c c s t r u c t u r e of nickel , m disp ( D /1 D -10 , ” The d i a m e t e r o f t h e o c t a h e d r a l v o i d i n t h e f c c s t r u c t u r e o f n i c k e l , i n angstrom , i s : ”); // R e s u l t // The d i a m e t e r o f t h e o c t a h e d r a l v o i d i n t h e f c c s t r u c t u r e o f n i c k e l , i n angstrom , i s : // 1 . 0 3 0 4 5 2 6

Scilab code Exa 3.6 Void space in cubic close packing 37

1 2 3 4 5 6 7 8

9 10 11 12 13

// S c i l a b Code Ex3 . 6 Void s p a c e i n c u b i c c l o s e p a c k i n g : Page −101 ( 2 0 1 0 ) R = 1; // For s i m p l i c i t y , r a d i u s o f t h e s p h e r e , m // For c u b i c c l o s e p a c k i n g , s i d e o f t h e u n i t c e l l and t h e r a d i u s o f t h e s p h e r e i s r e l a t e d a s // s q r t ( 2 ) ∗ a = 4∗R , s o l v i n g f o r a a = 2* sqrt (2) * R ; // L a t t i c e p a r a m e t e r f o r c u b i c c l o s e packing , m V_cell = a ^3; // Volume o f t h e u n i t c e l l n = 4; // Number o f l a t t i c e p o i n t s i n f c c u n i t cell V_occupied = 4*4/3* %pi *((1.000) ^3+(0.414) ^3+2*(0.225) ^3) ; // Volume o c c u p i e d by t h e atoms , metre cube void_space = V_cell - V_occupied ; // Void s p a c e in the c l o s e packing percent_void = void_space / V_cell *100; // P e r c e n t a g e void space printf ( ” \ nThe v o i d s p a c e i n t h e c l o s e p a c k i n g i s : %2 . 0 f p e r c e n t ” , percent_void ) ; // R e s u l t // The v o i d s p a c e i n t h e c l o s e p a c k i n g i s : 19 percent

Scilab code Exa 3.7 The Minimum value of radius ratio in a compound 1 2 3 4 5

// S c i l a b Code Ex3 . 7 The minimum v a l u e o f r a d i u s r a t i o i n AX−compound : Page −104 ( 2 0 1 0 ) // For s i m p l i c i t y we may assume a = 1 a = 1; // L a t t i c e p a r a m e t e r o f t h e c r y s t a l , u n i t b = 2/3* a * sin ( %pi /3) ; // L a t t i c e p a r a m e t e r o f t h e crystal , unit // Here a = 2∗Rx , where a i s t h e l a t t i c e p a r a m e t e r and Rx i s t h e r a d i u s o f X−i o n s r e p r e s e n t i n g t h e b i g g e r s p h e r e s , s o l v i n g f o r Rx 38

6 Rx = 0.5* a ; 7 // A l s o b = RA + Rx , s o l v i n g f o r RA 8 RA = b - Rx ; // R a d i u s o f A−i o n r e p r e s e n t i n g t e h

s m al l e r sphere , unit Rad_ratio = RA / Rx ; // R a d i u s r a t i o i n AX compound printf ( ” \ nThe minimum v a l u e o f r a d i u s r a t i o i n AX compound i s : %5 . 3 f ” , Rad_ratio ) ; 11 // R e s u l t 12 // The minimum v a l u e o f r a d i u s r a t i o i n AX compound i s : 0.155 9 10

39

Chapter 4 Atomic Shape and Size

Scilab code Exa 4.1 Bohr orbit for the hydrogen atom 1 2 3 4 5

6 7 8 9 10 11 12

// S c i l a b Code Ex4 . 1 Bohr ’ s o r b i t f o r t h e h y d r o g e n atom : Page −126 ( 2 0 1 0 ) n = 1; // The g r o u n d s t a t e o r b i t o f h y d r o g e n atom Z = 1; // The a t o m i c number o f h y d r o g e n h = 6.626 D -34; // Plank ’ s c o n s t a n t , J s eps_0 = 8.85 D -12; // A b s o l u t e e l e c t r i c a l p e r m i t t i v i t y o f f r e e s p a c e , coulomb s q u a r e p e r newton p e r m e t r e s q u a r e e = 1.602 D -19; // E l e c t r o n i c c h a r g e , C m = 9.1 D -31; // E l e c t r o n i c mass , kg r_B = ( n ^2* h ^2* eps_0 ) /( %pi * m * Z * e ^2) ; // R a d i u s o f f i r s t Bohr ’ s o r b i t ( Bohr r a d i u s ) , m disp ( r_B /1 D -10 , ” The r a d i u s o f f i r s t Bohr o r b i t , i n angstrom , i s : ” ) ; // R e s u l t // The r a d i u s o f f i r s t Bohr o r b i t , i n angstrom , i s : // 0 . 5 2 9 5 7 7 9

Scilab code Exa 4.2 Ionization potentials of hydrogen atom 40

1 2 3 4

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

// S c i l a b Code Ex4 . 2 I o n i z a t i o n p o t e n t i a l s o f h y d r o g e n atom : Page −126 ( 2 0 1 0 ) Z = 1; // The a t o m i c number o f h y d r o g e n h = 6.626 D -34; // Plank ’ s c o n s t a n t , J s eps_0 = 8.85 D -12; // A b s o l u t e e l e c t r i c a l p e r m i t t i v i t y o f f r e e s p a c e , coulomb s q u a r e p e r newton p e r m e t r e s q u a r e e = 1.602 D -19; // E l e c t r o n i c c h a r g e , C m = 9.1 D -31; // E l e c t r o n i c mass , kg E = zeros (1 , 3) ; // I n i t i a l i z e t h r e e p o t e n t i a l s t o 0 value in a vector for n = 1:1:3 select n case 1 then state = ” F i r s t ” ; case 2 then state = ” S e c o n d ” ; else state = ” T h i r d ” ; end E (1 , n ) = -( m * Z ^2* e ^4) /(8* eps_0 ^2* n ^2* h ^2* e ) ; // Energy o f nth b o h r o r b i t , eV printf ( ” \ nThe %s I o n i z a t i o n P o t e n t i a l i s : %5 . 3 f eV” , state , E (1 , n ) ) ; end // R e s u l t // The F i r s t I o n i z a t i o n P o t e n t i a l i s : −13.600 eV // The S e c o n d I o n i z a t i o n P o t e n t i a l i s : −3.400 eV // The T h i r d I o n i z a t i o n P o t e n t i a l i s : −1.511 eV

Scilab code Exa 4.3 Univalent radii of ions // S c i l a b Code Ex4 . 3 U n i v a l e n t r a d i i o f i o n s : Page −130 ( 2 0 1 0 ) 2 S = 4.52; // S c r e e n i n g c o n s t a n t f o r neon l i k e 1

41

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

configurations Cn = 1; // A c o n s t a n t d e t e r m i n e d by t h e quantum number , m; f o r s i m p l i c i t y i t can be assumed a s unity Z_Na = 11; // Atomic number o f sodium Z_F = 9; // Atomic number o f f l u o r i n e Z_O = 8; // Atomic number o f o x y g e n r_Na = Cn /( Z_Na - S ) ; // R a d i u s o f sodium i o n , m r_F = Cn /( Z_F - S ) ; // R a d i u s o f f l u o r i n e i o n , m r_ratio = r_Na / r_F ; // R a d i u s r a t i o r_Na = r_F * r_ratio ; // C a l c u l a t i n g r a d i u s o f sodium i o n from r r a t i o , m // Given t h a t r N a + r F = 2 . 3 1 D−10 , // o r r N a + r N a / 0 . 6 9 = 2 . 3 1 D−10 , // o r r N a ( 1 + 1 / 0 . 6 9 ) = 2 . 3 1 D−10 , s o l v i n g f o r r N a r_Na = 2.31 D -10/(1+1/0.69) ; // C a l c u l a t i n g r a d i u s o f sodium , m r_F = 2.31 D -10 - r_Na ; // C a l c u l a t i n g r a d i u s o f f l u o r i n e from r Na , m Cn = r_Na *( Z_Na - S ) ; // C a l c u l a t i n g Cn , m r_O = Cn /( Z_O - S ) ; // R a d i u s o f oxygen , m disp ( r_Na /1 D -10 , ” R a d i u s o f sodium i o n , i n angstrom , i s : ”); disp ( r_F /1 D -10 , ” R a d i u s o f f l u o r i n e i o n , i n angstrom , i s : ”); disp ( Cn /1 D -10 , ” C o n s t a n t d e t e r m i n e d by quantum number i s : ” ) ; disp ( r_O /1 D -10 , ” R a d i u s o f oxygen , i n angstrom , i s : ”); // R e s u l t // R a d i u s o f sodium i o n , i n angstrom , i s : // 0 . 9 4 3 1 3 6 1 // R a d i u s o f f l u o r i n e i o n , i n angstrom , i s : // 1 . 3 6 6 8 6 3 9 // C o n s t a n t d e t e r m i n e d by quantum number , i n angstrom , i s : // 6 . 1 1 1 5 2 1 9 // R a d i u s o f oxygen , i n angstrom , i s : 42

30

// 1 . 7 5 6 1 8 4 5

Scilab code Exa 4.4 Ionic Radius of Si ions in silicon dioxide 1 2 3 4 5 6 7 8 9 10

// S c i l a b Code Ex4 . 4 I o n i c R a d i u s o f S i i o n s i n s i l i c o n d i o x i d e : Page −131 ( 2 0 1 0 ) a = 7.12 D -10; // L a t t i c e p a r a m e t e r o f t h e crystal . m d = sqrt (3* a ^2/16) ; // S i −S i d i s t a n c e from ( 0 , 0 , 0 ) to (1/4 ,1/4 ,1/4) RO = 1.40 D -10; // R a d i u s o f oxygen , m // D i s t a n c e o f o x y g e n i o n s b e t w e e n t h e two S i i o n s i s 2∗ RSi +2∗RO = d , s o l v i n g f o r RSi RSi = ( d - 2* RO ) /2; // R a d i u s o f s i l i c o n i o n , m disp ( RSi /1 D -10 , ” The r a d i u s o f S i 4+ i o n , i n angstrom , i s : ”); // R e s u l t // The r a d i u s o f S i 4+ i o n , i n angstrom , i s : // 0 . 1 4 1 5 2 5 2

Scilab code Exa 4.5 Ionic Radius occupying an octahedral position 1 2 3 4 5

6

// S c i l a b Code Ex4 . 5 I o n i c R a d i u s o c c u p y i n g an o c t a h e d r a l p o s i t i o n : Page −138 ( 2 0 1 0 ) R_ratio = 0.414; // R a d i u s r a t i o f o r an o c t a h e d r a l v o i d i n am M+X− i o n i c l a t t i c e R_x = 2.5 D -10; // C r i t i c a l r a d i u s o f X− a n i o n , m R_m = R_x *0.414; // R a d i u s o f M+ c a t i o n , m disp ( R_m /1 D -10 , ” The r a d i u s o f c a t i o n o c c u p y i n g o c t a h e d r a l p o s i t i o n i n an M+X− i o n i c s o l i d , i n angstrom , i s : ” ) ; // R e s u l t 43

// The r a d i u s o f c a t i o n o c c u p y i n g o c t a h e d r a l p o s i t i o n i n an M+X− i o n i c s o l i d , i n angstrom , i s : 8 // 1 . 0 3 5

7

Scilab code Exa 4.6 Percentage ionic character of a covalent molecule 1 2 3 4

5 6 7

// S c i l a b Code Ex4 . 7 P e r c e n t a g e i o n i c c h a r a c t e r o f a c o v a l e n t m o l e c u l e : Page −142 ( 2 0 1 0 ) x_A = 4.0; // E l e c t r o n e g a t i v i t y o f f l u o r i n e x_B = 2.1; // E l e c t r o n e g a t i v i t y o f h y d r o g e n P = 16*( x_A - x_B ) + 3.5*( x_A - x_B ) ^2; // P e r c e n t a g e i o n i c c h a r a c t e r o f t h e c o v a l e n t bond i n HF molecule printf ( ” \ nThe p e r c e n t a g e i o n i c c h a r a c t e r i n HF m o l e c u l e i s %5 . 2 f p e r c e n t ” , P ) ; // R e s u l t // The p e r c e n t a g e i o n i c c h a r a c t e r i n HF m o l e c u l e i s 43.03 percent

Scilab code Exa 4.7 Metallic radius from unit cell dimension 1 2 3 4 5 6 7

// S c i l a b Code Ex4 . 8 C a l c u l a t i n g m e t a l l i c r a d i u s from u n i t c e l l d i m e n s i o n : Page −146 ( 2 0 1 0 ) a = 2.81 D -10; // U n i t c e l l d i m e n s i o n o f b c c structure of iron , m // For b c c s t r u c t u r e we have // s q r t ( 3 ) ∗ a = 4∗R , s o l v i n g f o r R R = sqrt (3) /4* a ; // M e t a l l i c r a d i u s o f i r o n atom , m printf ( ” \ nThe m e t a l l i c r a d i u s o f i r o n atom i s %4 . 2 f a n g s t r o m ” , R /1 D -10) ; // R e s u l t 44

8

// The m e t a l l i c r a d i u s o f i r o n atom i s 1 . 2 2 a n g s t r o m

Scilab code Exa 4.8 Metallic radii from unit cell dimension 1 2 3 4 5 6 7 8 9 10 11 12

// S c i l a b Code Ex4 . 9 C a l c u l a t i n g m e t a l l i c r a d i i from u n i t c e l l d i m e n s i o n s : Page −146 ( 2 0 1 0 ) a_Au = 4.08 e -10; // U n i t c e l l d i m e n s i o n o f f c c s t r u c t u r e o f gold , m a_Pt = 3.91 e -10; // U n i t c e l l d i m e n s i o n o f f c c s t r u c t u r e o f platinum , m // For f c c s t r u c t u r e we have // s q r t ( 2 ) ∗ a = 4∗R , s o l v i n g f o r R R_Au = sqrt (2) /4* a_Au ; // M e t a l l i c r a d i u s o f g o l d atom , m R_Pt = sqrt (2) /4* a_Pt ; // M e t a l l i c r a d i u s o f g o l d atom , m printf ( ” \ nThe m e t a l l i c r a d i u s o f g o l d atom , i n angstrom , i s : %4 . 2 f ” , R_Au /1 D -10) ; printf ( ” \ nThe m e t a l l i c r a d i u s o f p l a t i n u m atom , i n angstrom , i s : %4 . 2 f ” , R_Pt /1 D -10) ; // R e s u l t // The m e t a l l i c r a d i u s o f g o l d atom , i n angstrom , i s : 1.44 // The m e t a l l i c r a d i u s o f p l a t i n u m atom , i n angstrom , i s : 1.38

Scilab code Exa 4.9 Metallic diameter and unit cell dimension of aluminium // S c i l a b Code Ex4 . 1 0 C a l c u l a t i n g m e t a l l i c d i a m e t e r and u n i t c e l l d i m e n s i o n o f aluminium : Page −146 (2010) 2 Z_Al = 13; // Atomic number o f aluminium 3 A_Al = 26.98; // Atomic mass o f aluminium , g 1

45

4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

d_Al = 2700 D3 ; // D e n s i t y o f aluminium , g p e r metre cube n = 4; // number o f atoms i n t h e f c c s t r u c t u r e o f aluminium N = 6.023 D +23; // Avogadro ’ s number // We have number o f atoms p e r f c c u n i t c e l l g i v e n as // n = (V∗ d A l ∗N) / A Al , s o l v i n g f o r V // V = ( n∗ A Al ) / ( d A l ∗N) , V i s t h e volume o f t h e unit c e l l // o r a ˆ3 = ( n∗ A Al ) / ( d A l ∗N) , s o l v i n g f o r a a = (( n * A_Al ) /( d_Al * N ) ) ^(1/3) ; // u n i t c e l l p a r a m e t e r o f aluminium // For an f c c s t r u c t u r e we have // s q r t ( 2 ) ∗ a = 4∗R = 2∗D, s o l v i n g f o r D D = a / sqrt (2) ; // m e t a l l i c d i a m e t e r o f aluminium having f c c s t r u c t u r e printf ( ” \ nThe u n i t c e l l d i m e n s i o n o f aluminium , i s : %4 . 2 f a n g s t r o m ” , a /1 D -10) ; printf ( ” \ nThe m e t a l l i c d i a m e t r e o f aluminium , i s : %4 . 2 f a n g s t r o m ” , D /1 D -10) ; // R e s u l t // The u n i t c e l l d i m e n s i o n o f aluminium , i s : 4 . 0 5 angstrom // The m e t a l l i c d i a m e t r e o f aluminium , i s : 2 . 8 6 angstrom

46

Chapter 5 Crystal Imperfections

Scilab code Exa 5.1 Variation of atomic fraction with temperature 1 2 3 4 5 6 7 8 9 10 11 12 13

// S c i l a b Code Ex5 . 1 V a r i a t i o n o f f r a c t i o n o f atoms i n a s o l i d w i t h t e m p e r a t u r e Page −158 ( 2 0 1 0 ) E = 1.5; // Energy o f t h e s o l i d , e l e c t r o n −v o l t T1 = 300; // F i r s t a b s o l u t e t e m p e r a t u r e , K T2 = 1500; // S e c o n d a b s o l u t e t e m p e r a t u r e , K k = 8.614 D -5; // Boltzmann c o n s t a n t , e l e c t r o n − v o l t /K // Now f r a c t i o n o f atoms = f a t o m = n /N = exp (−E/ ( k ∗ T) f_atom_300 = exp ( - E /( k * T1 ) ) ; // F r a c t i o n o f atoms i n t h e s o l i d a t 300 K f_atom_1000 = exp ( - E /( k * T2 ) ) ; // F r a c t i o n o f atoms i n t h e s o l i d a t 1 0 0 0 K printf ( ” \ nThe f r a c t i o n o f atoms i n t h e s o l i d a t 300 K, i s : %5 . 3 e ” , f_atom_300 ) ; printf ( ” \ nThe f r a c t i o n o f atoms i n t h e s o l i d a t 1 0 0 0 K, i s : %5 . 3 e ” , f_atom_1000 ) ; // R e s u l t // The f r a c t i o n o f atoms i n t h e s o l i d a t 300 K, i s : 6 . 1 8 5 e −026 // The f r a c t i o n o f atoms i n t h e s o l i d a t 1 0 0 0 K, i s 47

: 9 . 0 8 4 e −006

Scilab code Exa 5.2 Vacancy formation in copper 1 2 3 4 5 6 7 8 9 10 11

12 13

// S c i l a b Code Ex5 . 2 Vacancy f o r m a t i o n i n c o p p e r Page −159 ( 2 0 1 0 ) E = 1; // Energy o f f o r m a t i o n o f v a c a n c y i n c o p p e r , e l e c t r o n −v o l t T = 1356; // M e l t i n g p o i n t o f c o p p e r , K k = 8.614 D -5; // Boltzmann c o n s t a n t , e l e c t r o n − volt N = 6.023 D23 ; // Avogadro ’ s number // Now f r a c t i o n o f v a c a n c i e s = f v a c a n c y = n/N = exp (−E/ ( k ∗T) f = exp ( - E /( k * T ) ) ; // F r a c t i o n o f v a c a n c i e s i n t h e s o l i d a t 300 K n = N * f ; // Number o f v a c a n c y p e r mole delta_d = n + N ; // Change i n t h e d e n s i t y due t o c r e a t i o n o f vacancy f_d = delta_d / N ; // R e l a t i v e c h a n g e i n t h e d e n s i t y o f c o p p e r due t o v a c a n c y f o r m a t i o n printf ( ” \ nThe r e l a t i v e c h a n g e i n t h e d e n s i t y o f c o p p e r due t o v a c a n c y f o r m a t i o n ( n+N) /N, i s : %9 . 7 f : 1 ” , f_d ) ; // R e s u l t // The r e l a t i v e c h a n g e i n t h e d e n s i t y o f c o p p e r due t o v a c a n c y f o r m a t i o n ( n+N) /N, i s : 1 . 0 0 0 1 9 1 4 : 1

Scilab code Exa 5.3 Concentration of Schottky imperfections // S c i l a b Code Ex5 . 3 C o n c e n t r a t i o n o f S c h o t t k y i m p e r f e c t i o n s Page −159 ( 2 0 1 0 ) 2 N = 6.023 D23 ; // Avogadro ’ s number

1

48

3 k = 8.614 D -5; // Boltzmann ’ s c o n s t a n t , eV/K 4 T1 = 27+273; // F i r s t a b s o l u t e t e m p e r a t u r e , K 5 T2 = 1000; // S e c o n d a b s o l u t e t e m p e r a t u r e , K 6 C_300 = 1D -10; // C o n c e n t r a t i o n o f S c h o t t k y 7 8 9 10 11 12 13 14 15 16 17 18 19

d e f e c t s i n an f c c c r y s t a l a t 300 K t e m p e r a t u r e n = C_300 * N ; // Number o f S c h o t t k y i m p e r f e c t i o n s p e r mole d = 1D -10; // I n t e r a t o m i c s p a c i n g assumed t o be u n i t angstrom , m V = d ^3; // Volume o f t h e u n i t cube , m e t r e c u b e V_mole = V * N ; // Volume o c c u p i e d by one mole o f atoms i n f c c c r y s t a l , m e t r e c u b e V_per_defect = V_mole / n ; // Volume p e r d e f e c t , metre cube a = ( V_per_defect ) ^(1/3) ; // A v e r a g e s e p a r a t i o n between the d e f e c t s , m E_v = 23.03* k * T1 ; // Energy o f t h e s o l i d , e l e c t r o n −v o l t C_1000 = exp ( - E_v /( k * T2 ) ) ; // S c h o t t k y d e f e c t c o n c e n t r a t i o n at 1000 K printf ( ” \ nThe a v e r a g e s e p a r a t i o n b e t w e e n t h e d e f e c t s , i s : %3 . 1 e m” , a ) ; printf ( ” \ nThe e x p e c t e d c o n c e n t r a t i o n o f S c h o t t k y d e f e c t a t 1 0 0 0 K, n /N, i s : %3 . 1 e ” , C_1000 ) ; // R e s u l t // The a v e r a g e s e p a r a t i o n b e t w e e n t h e d e f e c t s , i s : 2 . 2 e −007 m // The e x p e c t e d c o n c e n t r a t i o n o f S c h o t t k y d e f e c t a t 1 0 0 0 K, n /N, i s : 1 . 0 e −003

Scilab code Exa 5.4 Number of Schottky imperfections in NaCl crystal // S c i l a b Code Ex5 . 4 Number o f S c h o t t k y i m p e r f e c t i o n s i n NaCl c r y s t a l Page −160 ( 2 0 1 0 ) 2 N = 6.023 D23 ; // Avogadro ’ s number

1

49

3 k = 8.614 D -5; // Boltzmann ’ s c o n s t a n t , eV/K 4 T = 27+273; // A b s o l u t e room t e m p e r a t u r e , K 5 Ep = 2; // Energy r e q u i r e d t o remove a p a i r o f Na 6 7 8 9 10 11 12

13 14 15

+ and Cl− i o n s , e l e c t r o n −v o l t // Now C o n c e n t r a t i o n o f i m p e r f e c t i o n s i n a c r y s t a l i s g i v e n by // n/N = exp (−Ep / ( 2 ∗ k ∗T) ) , s o l v i n g f o r n n = N * exp ( - Ep /(2* k * T ) ) ; // No . o f S c h o t t k y i m p e r f e c t i o n s p r e s e n t i n NaCl c r y s t a l printf ( ” \nNo . o f S c h o t t k y i m p e r f e c t i o n s p r e s e n t i n NaCl c r y s t a l i s : %4 . 2 e ” , n ) ; V = 26.83; // Volume o f one mole o f t h e c r y s t a l , cm c u b e n = n/V; // Number p e r mole volume o f t h e c r y s t a l , p e r cm c u b e printf ( ” \ n C o n c e n t r a t i o n o f S c h o t t k y i m p e r f e c t i o n s p r e s e n t i n NaCl c r y s t a l i s : %4 . 2 e p e r cm c u b e ” , n); // R e s u l t // No . o f S c h o t t k y i m p e r f e c t i o n s p r e s e n t i n NaCl c r y s t a l i s : 9 . 4 2 e +006 // C o n c e n t r a t i o n o f S c h o t t k y i m p e r f e c t i o n s p r e s e n t i n NaCl c r y s t a l i s : 3 . 5 1 e +005 p e r cm c u b e

Scilab code Exa 5.5 Average energy required to create one Schottky defect 1

2 3 4 5

// S c i l a b Code Ex5 . 5 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 one S c h o t t k y d e f e c t i n NaCl Page −160 (2010) N = 6.023 D23 ; // Avogadro ’ s number k = 8.614 D -5; // Boltzmann ’ s c o n s t a n t , eV/K T = 27+273; // A b s o l u t e room t e m p e r a t u r e , K r = 2.82 D -10; // I n t e r a t o m i c s e p a r a t i o n o f NaCl cryastal , m 50

6 n = 5 D +11; 7 8 9 10 11 12 13 14

15 16

// D e n s i t y o f d e f e c t s , p e r m e t r e

cube //Ep = 2 ; // Energy r e q u i r e d t o remove a p a i r o f Na+ and Cl− i o n s , e l e c t r o n −v o l t a = 2* r ; // L a t t i c e p a r a m e t e r o f u n i t c e l l o f NaCl , m V = a ^3; // Volume o f t h e u n i t c e l l o f sodium , metre cube n_ip = 4; // Number o f i o n −p a i r s o f NaCl N = n_ip / V ; // No . o f i o n −p a i r s i n u n i t volume o f an i d e a l NaCl c r y s t a l // Now n /N = exp (−Ep / ( 2 ∗ k ∗T) ) , s o l v i n g f o r Ep Ep = 2* k * T * log ( N / 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 one S c h o t t k y d e f e c t , e l e c t r o n −v o l t printf ( ” \ nThe 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 one S c h o t t k y d e f e c t i n NaCl c r y s t a l i s : %4 . 2 f eV” , Ep ) ; // R e s u l t // The 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 one S c h o t t k y d e f e c t i n NaCl c r y s t a l i s : 1 . 9 8 eV

Scilab code Exa 5.6 Ratio of Frenkel defects at two different temperatures 1

2 3 4 5 6 7 8

// S c i l a b Code Ex5 . 6 R a t i o o f F r e n k e l d e f e c t s a t two d i f f e r e n t t e m p e r a t u r e s i n an i o n i c c r y s t a l Page −161 ( 2 0 1 0 ) k = 8.614 D -5; // Boltzmann ’ s c o n s t a n t , eV/K Ef = 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 F r e n k e l d e f e c t , eV T1 = 300; // F i r s t a b s o l u i t e t e m p e r a t u r e , K T2 = 600; // S e c o n d a b s o l u t e t e m p e r a t u r e , K // The c o n c e n t r a t i o n o f F r e n k e l d e f e c t f o r g i v e n Ef and a b s o l u t e t e m p e r a t u r e T i s g i v e n by // n = A∗ exp (− Ef / ( 2 ∗ k ∗T) ) , p e r m e t r e cube , s o t h a t // n1 = A∗ exp (− Ef / ( 2 ∗ k ∗T1 ) ) , p e r m e t r e cube , and 51

9 10 11 12 13 14

// n2 = A∗ exp (− Ef / ( 2 ∗ k ∗T2 ) ) , p e r m e t r e cube , therefore , // n1 / n2 = exp (( − Ef / k ) ∗ ( 1 / T1 − 1/T2 ) ) , t h e r a t i o o f Frenkel defects i s n300_r_n600 = exp (( - Ef /(2* k ) ) *(1/ T1 - 1/ T2 ) ) ; // Frenkel defect r a t i o printf ( ” \ nThe r a t i o o f F r e n k e l d e f e c t , n 3 0 0 r n 6 0 0 , i s : %5 . 3 e ” , n300_r_n600 ) ; // R e s u l t // The r a t i o o f F r e n k e l d e f e c t , n 3 0 0 r n 6 0 0 , i s : 1 . 3 1 2 e −006

Scilab code Exa 5.7 Dislocation density of bcc structure of iron 1 2 3 4 5 6 7 8 9

10 11 12 13

// S c i l a b Code Ex5 . 7 D i s l o c a t i o n d e n s i t y o f b c c s t r u c t u r e o f i r o n Page −163 ( 2 0 1 0 ) L = 0.15; // Length o f t h e s t r i p , m t = 0.02; // T h i c k n e s s o f t h e i o r n s t r i p , m r = 0.12; // R a d i u s o f c u r v a t u r e o f t h e bent , m a = 2.81 D -10; // L a t t i c e p a r a m e t e r o f t h e b c c structure of iron , m b = sqrt (3) * a /2; // Magnitude o f B u r g e r v e c t o r , m // For n p o s i t i v e e d g e d i s l o c a t i o n s // n∗b = L∗ t / r , s o l v i n g f o r n / ( L∗ t ) // n / ( L∗ t ) = 1 / ( r ∗b ) , Number o f d i s l o c a t i o n l i n e p i e r c i n g through a unit area of the plane of the paper , p e r m e t r e s q u a r e d = 1/( r * b ) ; // D i s l o c a t i o n d e n s i t y i n b c c s t r u c t u r e o f i r o n , number p e r m e t r e s q u a r e printf ( ” \ nThe d i s l o c a t i o n d e n s i t y i n b c c s t r u c t u r e o f i r o n : %4 . 2 e , d i s l o c a t i o n s p e r Sq . m” , d ) ; // R e s u l t // The d i s l o c a t i o n d e n s i t y i n b c c s t r u c t u r e o f i r o n : 3 . 4 2 e +010 , d i s l o c a t i o n s p e r Sq . m

52

Scilab code Exa 5.8 Minimum dislocation density in aluminium 1 2 3 4 5 6

7 8 9 10

// S c i l a b Code Ex5 . 8 Minimum d i s l o c a t i o n d e n s i t y i n aluminium Page −164 ( 2 0 1 0 ) b = 3D -10; // Magnitude o f B u r g e r s v e c t o r , m r = 0.05; // R a d i u s o f c u r v a t u r o f t h e aluminium crystal , m // For n p o s i t i v e e d g e d i s l o c a t i o n s // n∗b = L∗ t / r , s o l v i n g f o r n / ( L∗ t ) // n / ( L∗ t ) = 1 / ( r ∗b ) , Number o f d i s l o c a t i o n l i n e p i e r c i n g through a unit area of the plane of the paper , p e r Sq .m d = 1/( r * b ) ; // Minimum d i s l o c a t i o n d e n s i t y i n aluminium , number p e r Sq . m printf ( ” \ nThe minimum d i s l o c a t i o n d e n s i t y i n aluminium , %4 . 1 e , d i s l o c a t i o n s p e r Sq . m” , d ) ; // R e s u l t // The minimum d i s l o c a t i o n d e n s i t y i n aluminium , 6 . 7 e +010 , d i s l o c a t i o n s p e r Sq . m

Scilab code Exa 5.9 Total force from its resolved component in a given direction // S c i l a b Code Ex5 . 9 D e t e r m i n i n g t o t a l f o r c e from i t s r e s o l v e d component i n a g i v e n d i r e c t i o n : Page −168 ( 2 0 1 0 ) 2 h1 = 1; k1 = -1; l1 = 0 // M i l l e r i n d i c e s f o r f i r s t set of planes 3 h2 = 1; k2 = 0; l2 = 0; // M i l l e r i n d i c e s f o r second s e t of planes 4 F_100 = 130; // R e s o l v e d component o f f o r c e a l o n g [100] direction , N 1

53

5

6 7 8 9 10

cos_theta = ( h1 * h2 + k1 * k2 + l1 * l2 ) /( sqrt ( h1 ^2+ k1 ^2+ l1 ^2) * sqrt ( h2 ^2+ k2 ^2+ l2 ^2) ) ; // C o s i n e o f a n g l e b e t w e e n [ 1 −1 0 ] and [ 1 0 0 ] d i r e c t i o n s // As F/ F 1 0 0 = c o s t h e t a , s o l v i n g f o r F F_110 = F_100 / cos_theta ; // A p p l i e d f o r c e a l o n g [ 1 −1 0 ] d i r e c t i o n , N printf ( ” \ nThe a p p l i e d f o r c e a l o n g [ 1 − 1 0 ] d i r e c t i o n = %3d N” , F_110 ) ; // R e s u l t // The a p p l i e d f o r c e a l o n g [ 1 − 1 0 ] d i r e c t i o n = 183 N

Scilab code Exa 5.10 Resolved componet of shearing force in a given direction 1

2 3 4 5

6 7 8 9 10

// S c i l a b Code Ex5 . 1 0 D e t e r m i n i n g r e s o l v e d componet o f s h e a r i n g f o r c e i n a g i v e n d i r e c t i o n : Page −168 (2010) h1 = 1; k1 = 1; l1 = 1 // M i l l e r i n d i c e s f o r f i r s t set of planes h2 = 1; k2 = 1; l2 = 0; // M i l l e r i n d i c e s f o r second s e t of planes F_111 = 660; // S h e a r i n g f o r c e a l o n g [ 1 1 1 ] direction , N cos_theta = ( h1 * h2 + k1 * k2 + l1 * l2 ) /( sqrt ( h1 ^2+ k1 ^2+ l1 ^2) * sqrt ( h2 ^2+ k2 ^2+ l2 ^2) ) ; // C o s i n e o f a n g l e b e t w e e n [ 1 −1 0 ] and [ 1 0 0 ] d i r e c t i o n s // As F 1 1 0 / F 1 1 1 = c o s t h e t a , s o l v i n g f o r F 1 1 0 F_110 = F_111 * cos_theta ; // R e s o l v e d component o f shearing f o r c e along [ 1 1 0 ] direction , N printf ( ” \ nThe r e s o l v e d component o f s h e a r i n g f o r c e a l o n g [ 1 1 0 ] d i r e c t i o n , F 1 1 0 = %3d N” , F_110 ) ; // R e s u l t // The r e s o l v e d component o f s h e a r i n g f o r c e a l o n g [ 1 1 0 ] d i r e c t i o n , F 1 1 0 = 538 N

54

Scilab code Exa 5.11 Dependence of applied stress on the slip direction 1

2 3 4 5 6

7 8 9 10

11

12

13 14 15

// S c i l a b Code Ex5 . 1 1 Dependence o f a p p l i e d s t r e s s on t h e s l i p d i r e c t i o n o f a c o p p e r : Page −169 (2010) tau_critical = 1; // C r i t i c a l s h e a r s t r e s s f o r t h e <−110>{111} s l i p system , mega−p a s c a l (MPa) // For d i r e c t i o n s [ 0 0 1 ] and [ − 1 1 1 ] h1 = 0; k1 = 0; l1 = 1 // M i l l e r i n d i c e s f o r f i r s t set of planes h2 = -1; k2 = 1; l2 = 1; // M i l l e r i n d i c e s f o r second s e t of planes cos_phi = ( h1 * h2 + k1 * k2 + l1 * l2 ) /( sqrt ( h1 ^2+ k1 ^2+ l1 ^2) * sqrt ( h2 ^2+ k2 ^2+ l2 ^2) ) ; // C o s i n e o f a n g l e b e t w e e n [ 0 0 1 ] and [ − 1 1 1 ] d i r e c t i o n s // For d i r e c t i o n s [ 0 0 1 ] and [ 1 0 1 ] h1 = 0; k1 = 0; l1 = 1 // M i l l e r i n d i c e s f o r f i r s t set of planes h2 = 1; k2 = 0; l2 = 1; // M i l l e r i n d i c e s f o r second s e t of planes cos_lambda = ( h1 * h2 + k1 * k2 + l1 * l2 ) /( sqrt ( h1 ^2+ k1 ^2+ l1 ^2) * sqrt ( h2 ^2+ k2 ^2+ l2 ^2) ) ; // C o s i n e o f a n g l e b e t w e e n [ 0 0 1 ] and [ 1 0 1 ] d i r e c t i o n s sigma = tau_critical /( cos_phi * cos_lambda ) ; // S t r e s s a l o n g [ 0 0 1 ] d i r e c t i o n , newton p e r m e t r e square printf ( ” \ nThe s t r e s s r e q u i r e d t o be a p p l i e d a l o n g [ 0 0 1 ] d i r e c t i o n to produce s l i p in the [ 1 0 1 ] d i r e c t i o n on t h e ( −111) p l a n e = %4 . 2 f MPa” , sigma ); // For d i r e c t i o n s [ 0 0 1 ] and [ 1 1 0 ] h1 = 0; k1 = 0; l1 = 1 // M i l l e r i n d i c e s f o r f i r s t set of planes h2 = 1; k2 = 1; l2 = 0; // M i l l e r i n d i c e s f o r 55

16

17 18

19

20 21

22 23 24

25

second s e t of planes cos_lambda = ( h1 * h2 + k1 * k2 + l1 * l2 ) /( sqrt ( h1 ^2+ k1 ^2+ l1 ^2) * sqrt ( h2 ^2+ k2 ^2+ l2 ^2) ) ; // C o s i n e o f a n g l e b e t w e e n [ 0 0 1 ] and [ 1 1 0 ] d i r e c t i o n s if cos_lambda <> 0 then sigma = tau_critical /( cos_phi * cos_lambda ) ; // S t r e s s a l o n g [ 0 0 1 ] d i r e c t i o n , newton p e r metre square printf ( ” \ nThe s t r e s s r e q u i r e d t o be a p p l i e d along [ 0 0 1 ] d i r e c t i o n to produce s l i p in the [ 1 1 0 ] d i r e c t i o n on t h e ( −111) p l a n e = %4 . 2 f MPa” , sigma ) ; else printf ( ” \ n S i n c e c o s l a m b d a = 0 , t h i s i m p l i e s that s l i p cannot occur in [ 1 1 0 ] d i r e c t i o n when t h e s t r e s s i s a p p l i e d a l o n g [ 0 0 1 ] d i r e c t i o n ”); end // R e s u l t // The s t r e s s r e q u i r e d t o be a p p l i e d a l o n g [ 0 0 1 ] d i r e c t i o n to produce s l i p in the [ 1 0 1 ] d i r e c t i o n on t h e ( −111) p l a n e = 2 . 4 5 MPa // S i n c e c o s l a m b d a = 0 , t h i s i m p l i e s t h a t s l i p c a n n o t o c c u r i n [ 1 1 0 ] d i r e c t i o n when t h e s t r e s s i s applied along [ 0 0 1 ] d i r e c t i o n

Scilab code Exa 5.12 Resolved stress in a direction from applied stress in other direction // S c i l a b Code Ex5 . 1 2 R e s o l v e d s t r e s s i n a d i r e c t i o n from a p p l i e d s t r e s s i n some o t h e r d i r e c t i o n o f b c c i r o n : Page −169 ( 2 0 1 0 ) 2 sigma = 123; // A x i a l s t r e s s a p p l i e d i n t h e d i r e c t i o n [ 1 1 0 ] o f b c c i r o n , MPa 3 // For d i r e c t i o n s [ 0 1 0 ] and [ 1 1 0 ] 1

56

// M i l l e r i n d i c e s f o r

4 h1 = 0; k1 = 1; l1 = 0

first

set of planes // M i l l e r i n d i c e s f o r

5 h2 = 1; k2 = 1; l2 = 0; 6

7 8 9 10

11

12 13 14

second s e t of planes cos_phi = ( h1 * h2 + k1 * k2 + l1 * l2 ) /( sqrt ( h1 ^2+ k1 ^2+ l1 ^2) * sqrt ( h2 ^2+ k2 ^2+ l2 ^2) ) ; // C o s i n e o f a n g l e b e t w e e n [ 0 1 0 ] and [ 1 1 0 ] d i r e c t i o n s // For d i r e c t i o n s [ 1 1 0 s ] and [ 1 0 1 ] h1 = 1; k1 = 0; l1 = 1 // M i l l e r i n d i c e s f o r f i r s t set of planes h2 = 1; k2 = 1; l2 = 0; // M i l l e r i n d i c e s f o r second s e t of planes cos_lambda = ( h1 * h2 + k1 * k2 + l1 * l2 ) /( sqrt ( h1 ^2+ k1 ^2+ l1 ^2) * sqrt ( h2 ^2+ k2 ^2+ l2 ^2) ) ; // C o s i n e o f a n g l e b e t w e e n [ 1 1 0 ] and [ 1 0 1 ] d i r e c t i o n s tau = sigma * cos_phi * cos_lambda ; // R e s o l v e d s h e a r s t r e s s i n t h e [ 1 0 1 ] d i r e c t i o n on t h e ( 0 1 0 ) p l a n e , MPa printf ( ” \ nThe r e s o l v e d s h e a r s t r e s s i n t h e [ 1 0 1 ] d i r e c t i o n on t h e ( 0 1 0 ) p l a n e = %4 . 1 f MPa” , tau ) ; // R e s u l t // The r e s o l v e d s h e a r s t r e s s i n t h e [ 1 0 1 ] d i r e c t i o n on t h e ( 0 1 0 ) p l a n e = 4 3 . 5 MPa

Scilab code Exa 5.13 Critical resolved shear stress from applied stress in a given direction // S c i l a b Code Ex5 . 1 3 D e t e r m i n i n g c r i t i c a l r e s o l v e d s h e a r s t r e s s from a p p l i e d s t r e s s i n a g i v e n direction o f aluminium : Page −170 ( 2 0 1 0 ) 2 sigma_critical = 3.5; // A p p l i e d s t r e s s i n t h e [ 1 −1 1 ] d i r e c t i o n , MPa 3 // For d i r e c t i o n s [ 1 1 1 ] and [ 1 −1 1 ] 4 h1 = 1; k1 = 1; l1 = 1; // M i l l e r i n d i c e s f o r f i r s t set of planes

1

57

// M i l l e r i n d i c e s f o r

5 h2 = 1; k2 = -1; l2 = 1; 6

7 8 9 10

11

12

13 14

second s e t of planes cos_phi = ( h1 * h2 + k1 * k2 + l1 * l2 ) /( sqrt ( h1 ^2+ k1 ^2+ l1 ^2) * sqrt ( h2 ^2+ k2 ^2+ l2 ^2) ) ; // C o s i n e o f a n g l e b e t w e e n [ 1 1 1 ] and [ 1 −1 1 ] d i r e c t i o n s // For d i r e c t i o n s [ 1 − 1 0 ] and [ 1 −1 1 ] h1 = 1; k1 = -1; l1 = 0 // M i l l e r i n d i c e s f o r f i r s t set of planes h2 = 1; k2 = -1; l2 = 1; // M i l l e r i n d i c e s f o r second s e t of planes cos_lambda = ( h1 * h2 + k1 * k2 + l1 * l2 ) /( sqrt ( h1 ^2+ k1 ^2+ l1 ^2) * sqrt ( h2 ^2+ k2 ^2+ l2 ^2) ) ; // C o s i n e o f a n g l e b e t w e e n [ 1 −1 0 ] and [ 1 −1 1 ] d i r e c t i o n s tau_c = sigma_critical * cos_phi * cos_lambda ; // The c r i t i c a l r e s o l v e d s h e a r s t r e s s i n t h e [ 1 −1 0 ] d i r e c t i o n on t h e ( 1 1 1 ) p l a n e , MPa printf ( ” \ nThe c r i t i c a l r e s o l v e d s h e a r s t r e s s i n t h e [ 1 −1 0 ] d i r e c t i o n on t h e ( 1 1 1 ) p l a n e = %4 . 2 f MPa ” , tau_c ) ; // R e s u l t // The c r i t i c a l r e s o l v e d s h e a r s t r e s s i n t h e [ 1 −1 0 ] d i r e c t i o n on t h e ( 1 1 1 ) p l a n e = 0 . 9 5 MPa

Scilab code Exa 5.14 Initiation of slip by the applied stress 1

2 3 4 5

// S c i l a b Code Ex5 . 1 4 D e t e r m i n i n g t h e d i r e c t i o n i n which s l i p i s i n i t i a t e d by t h e a p p l i e d s t r e s s i n z i n c : Page −170 ( 2 0 1 0 ) sigma = 2.3; // A p p l i e d s t r e s s when t h e p l a s t i c d e f o r m a t i o n i s f i r s t o b s e r v e d , MPa phi = 60; // A n g l e which t h e n o r m a l t o t h e b a s a l p l a n e makes w i t h t h e t e n s i l e a x i s o f z i n c , d e g r e e // F u n c t i o n t o f i n d t h e v a l u e o f r e s o l v e d s h e a r stress function [ tau ] = stress ( lambda ) 58

6 7 8

9 10 11

12

13 14 15 16 17 18 19 20 21 22 23 24 25 26

tau = sigma * cosd ( phi ) * cosd ( lambda ) ; endfunction lambda = [38 45 84]; // A n g l e s which t h e t h r e e s l i p d i r e c t i o n s x1 , x2 and x3 r e s p e c t i v e l y makes with the t e n s i l e axis , d e g r e e s t = zeros (1 ,3) ; // I n i t i a l i z e a one− dimensional vector of three elements for i = 1:1:3 t ( i ) = stress ( lambda ( i ) ) ; // C a l c u l a t e t h e v a l u e o f r e s o l v e d s h e a r s t r e s s by c a l l i n g stress function printf ( ” \ ntau%d = %5 . 3 f MPa” , i , t (1 , i ) ) ; // Display r e s l o v e d shear s t r e s s f o r each d i r e c t i o n , MPa end // L o c a t e f o r t h e l a r g e s t r e s o l v e d s t r e s s v a l u e big = t (1 ,1) ; for i = 2:1:3 if t (1 , i ) > big then big = t (1 , i ) // S e t l a r g e s t v a l u s e o f r e s o l v e d s t r e s s i f the c o n d i t i o n meets end end printf ( ” \ nThe s l i p i s i n i t i a t e d a l o n g d i r e c t i o n x1 a t t a u c = %5 . 3 f MPa” , big ) ; // R e s u l t // t a u 1 = 0 . 9 0 6 MPa // t a u 2 = 0 . 8 1 3 MPa // t a u 3 = 0 . 1 2 0 MPa // The s l i p i s i n i t i a t e d a l o n g d i r e c t i o n x1 a t t a u c = 0 . 9 0 6 MPa

Scilab code Exa 5.15 Applied tensile stress in a direction to initiate plastic deformation

59

1

2 3 4 5 6

7 8 9 10

11

12

13 14

// S c i l a b Code Ex5 . 1 5 D e t e r m i n i n g a p p l i e d t e n s i l e s t r e s s in a d i r e c t i o n to i n i t i a t e p l a s t i c d e f o r m a t i o n : Page −170 ( 2 0 1 0 ) tau_critical = 0.7; // C r i t i c a l r e s o l v e d s h e a r s t r e s s f o r f c c c r y s t a l , MPa // For d i r e c t i o n s [ 1 0 0 ] and [ 1 1 1 ] h1 = 1; k1 = 0; l1 = 0; // M i l l e r i n d i c e s f o r f i r s t set of planes h2 = 1; k2 = 1; l2 = 1; // M i l l e r i n d i c e s f o r second s e t of planes cos_phi = ( h1 * h2 + k1 * k2 + l1 * l2 ) /( sqrt ( h1 ^2+ k1 ^2+ l1 ^2) * sqrt ( h2 ^2+ k2 ^2+ l2 ^2) ) ; // C o s i n e o f a n g l e b e t w e e n [ 1 0 0 ] and [ 1 1 1 ] d i r e c t i o n s // For d i r e c t i o n s [ 1 0 0 ] and [ 1 −1 0 ] h1 = 1; k1 = 0; l1 = 0 // M i l l e r i n d i c e s f o r f i r s t set of planes h2 = 1; k2 = -1; l2 = 0; // M i l l e r i n d i c e s f o r second s e t of planes cos_lambda = ( h1 * h2 + k1 * k2 + l1 * l2 ) /( sqrt ( h1 ^2+ k1 ^2+ l1 ^2) * sqrt ( h2 ^2+ k2 ^2+ l2 ^2) ) ; // C o s i n e o f a n g l e b e t w e e n [ 1 0 0 ] and [ 1 −1 0 ] d i r e c t i o n s sigma_c = tau_critical /( cos_phi * cos_lambda ) ; // The c r i t i c a l r e s o l v e d s h e a r s t r e s s i n t h e [ 1 −1 0 ] d i r e c t i o n on t h e ( 1 1 1 ) p l a n e , MPa printf ( ” \ nThe c r i t i c a l r e s o l v e d s h e a r s t r e s s i n t h e [ 1 −1 0 ] d i r e c t i o n on t h e ( 1 1 1 ) p l a n e = %3 . 1 f MPa” , sigma_c ) ; // R e s u l t // The c r i t i c a l r e s o l v e d s h e a r s t r e s s i n t h e [ 1 −1 0 ] d i r e c t i o n on t h e ( 1 1 1 ) p l a n e = 1 . 7 MPa

Scilab code Exa 5.16 Dislocation width in copper 1

// S c i l a b Code Ex5 . 1 6 D i s l o c a t i o n w i d t h i n c o p p e r : Page −175 ( 2 0 1 0 ) 60

// For s i m p l i c i t y , assume s h e a r modulus o f c o p p e r t o be u n i t y , netwon p e r m e t r e s q u a r e tau_PN = mu /1 e +05; // S h e a r s t r e s s t o i n i t i a t e p l a s t i c d e f o r m a t i o n , newton p e r m e t r e s q u a r e a = 3.61 e -010; // L a t t i c e p a r a m e t e r o f c o p p e r , m b = a / sqrt (2) ; // B u r g e r v e c t o r m a g n i t u d e f o r f c c c r y s t a l o f copper , m // As s t r e s s n e c e s s a r y t o move a d i s l o c a t i o n i n a c r y s t a l i s g i v e n by // tau PN = mu∗ exp ( −2∗ %pi ∗w/ b ) , s o l v i n g f o r w w = b * log ( mu / tau_PN ) /(2* %pi ) ; // Width o f t h e d i s l o c a t i o n in copper , m printf ( ” \ nThe w i d t h o f d i s l o c a t i o n i n c o p p e r = %4 . 2 e a n g s t r o m ” , w /1 d -10) ; // R e s u l t // The w i d t h o f d i s l o c a t i o n i n c o p p e r = 4 . 6 8 e −010 angstrom

2 mu = 1; 3 4 5 6 7 8 9 10 11

Scilab code Exa 5.17 Change in number of vacancies due to disloaction motion 1 2 3 4 5 6 7 8 9

// S c i l a b Code Ex5 . 1 7 Change i n number o f v a c a n c i e s due t o d i s l o a c t i o n m o t i o n : Page −176 ( 2 0 1 0 ) l = 1e -03; // Edge d i s l o c a t i o n l e n g t h o f s i m p l e cubic crystal , m d = 1e -06; // D i s t a n c e o f d i s l o c a t i o n c l i m b i n , m a = 3e -10; // L a t t i c e p a r a m e t e r o f s c c , m A = a ^2; // Area o f t h e u n i t c e l l , m e t r e s q u a r e A_affected = l * d ; // A f f e c t e d a r e a when t h e d i s l o c a t i o n c l i m b s down , m e t r e s q u a r e // N . B . : Area o f one u n i t c e l l i n s c c c o n t r i b u t e s one atom N = A_affected / A ; // Number o f v a c a n c i e s c r e a t e d within the a f f e c t e d area printf ( ” \ nThe number o f v a c a n c i e s l o s t o r c r e a t e d = 61

%3 . 1 e ” , N ) ; 10 // R e s u l t 11 // The number o f v a c a n c i e s l o s t o r c r e a t e d = 1 . 1 e +010

Scilab code Exa 5.18 Minimum number of dislocations in motion from shearing rate 1

2 3 4 5 6 7 8 9 10 11 12 13

// S c i l a b Code Ex5 . 1 8 Minimum number o f d i s l o c a t i o n s i n m o t i o n from s h e a r i n g r a t e o f c o p p e r : Page −176 (2010) a = 3.61 e -010; // L a t t i c e p a r a m e t e r o f c o p p e r , m epsilon_dot = 10/60; // S t r a i n r a t e o f p l a s t i c d e f o r m a t i o n , mm p e r s e c v_d = 1 e +06; // V e l o c i t y o f d i s l o c a t i o n , mm p e r sec V = 1 e +03; // Volume o f t h e c r y s t a l , mm c u b e b = a *1 e +03/ sqrt (2) ; // B u r g e r v e c t o r m a g n i t u d e f o r f c c c r y s t a l o f c o p p e r , mm // S t r a i n r a t e o f p l a s t i c d e f o r m a t i o n i s g i v e n by // e p s i l o n d o t = r h o ∗b∗ v d , s o l v i n g f o r r h o rho = epsilon_dot /( b * v_d ) ; // D e n s i t y o f t h e m o b i l e d i s l o a c a t i o n s , p e r mm c u b e N = round ( rho * V ) ; // Number o f d i s l o c a t i o n s i n motion i n the whole cube printf ( ” \ nThe number o f d i s l o c a t i o n s i n m o t i o n i n t h e w h o l e c u b e = %3d” , N ) ; // R e s u l t // The number o f d i s l o c a t i o n s i n m o t i o n i n t h e w h o l e c u b e = 653

Scilab code Exa 5.19 Elastic energy of line imperfection 62

1 2 3 4 5 6 7 8 9 10

// S c i l a b Code Ex5 . 1 9 E l a s t i c e n e r g y o f l i n e i m p e r f e c t i o n s t o r e d i n Al : Page −178 ( 2 0 1 0 ) rho = 1 e +010; // D i s l o c a t i o n d e n s i t y o f Al , p e r metre square mu = 25.94 e +09; // S h e a r m o l u l u s o f aluminium , newton p e r m e t r e s q u a r e a = 4.05 e -010; // L a t t i c e p a r a m e t e r o f aluminium , m b = a / sqrt (2) ; // B u r g e r v e c t o r m a g n i t u d e f o r f c c c r y s t a l o f Al , m E_bar = mu * b ^2/2; // E l a s t i c e n e r g y p e r u n i t l e n g t h o f the d i s l o c a t i o n , j o u l e per metre E = E_bar * rho ; // E l a s t i c e n e r g y s t o r e d i n t h e c r y s t a l , j o u l e per metre cube printf ( ” \ nThe e l a s t i c e n e r g y s t o r e d i n t h e c r y s t a l = %5 . 2 f j o u l e p e r m e t r e c u b e ” , E ) ; // R e s u l t // The e l a s t i c e n e r g y s t o r e d i n t h e c r y s t a l = 1 0 . 6 4 j o u l e per metre cube

Scilab code Exa 5.20 Spacing between dislocations in a tilt boundary 1 2 3 4 5 6 7 8

// S c i l a b Code Ex5 . 2 0 S p a c i n g b e t w e e n d i s l o c a t i o n s i n a t i l t boundary i n f c c Ni : Page −187 ( 2 0 1 0 ) theta = 2; // A n g l e o f t i l t , d e g r e e a = 3.52 e -010; // L a t t i c e p a r a m e t e r o f Al , m b = a / sqrt (2) ; // B u r g e r v e c t o r m a g n i t u d e f o r f c c Ni , m h = b / tand ( theta ) ; // The v e r t i c a l s p a c i n g b e t w e e n two n e i g h b o u r i n g e d g e d i s l o c a t i o n s , m printf ( ” \ nThe s p a c i n g b e t w e e n d i s l o c a t i o n s i n a t i l t boundary i n f c c Ni = %4 . 1 f a n g s t r o m ” , h /1 D -10) ; // R e s u l t // The s p a c i n g b e t w e e n d i s l o c a t i o n s i n a t i l t boundary i n f c c Ni = 7 1 . 3 a n g s t r o m 63

Scilab code Exa 5.21 Tilt angle from dislocation spacing in the boundary 1

2 3 4 5

6 7 8

// S c i l a b Code Ex5 . 2 1 D e t e r m i n i n g t i l t a n g l e from d i s l o c a t i o n s p a c i n g i n t h e boundary o f Cu : Page −188 ( 2 0 1 0 ) a = 3.61 e -010; // L a t t i c e p a r a m e t e r o f Cu , m b = a / sqrt (2) ; // B u r g e r v e c t o r m a g n i t u d e f o r f c c Cu , m h = 1.5 e -06; // The v e r t i c a l s p a c i n g b e t w e e n two neighbouring edge d i s l o c a t i o n s , m tan_theta = atand ( b / h ) *( %pi /180) ; // t a n g e n t o f t i l t a n g l e b e t w e e n two t i l t b o u n d a r i e s o f Cu , radian printf ( ” \ nThe t i l t a n g l e b e t w e e n two t i l t b o u n d a r i e s o f Cu = %3 . 1 e r a d i a n ” , theta ) ; // R e s u l t // The t i l t a n g l e b e t w e e n two t i l t b o u n d a r i e s o f Cu = 1 . 7 e −004 r a d i a n

Scilab code Exa 5.22 Tilt angle from dislocation spacing // S c i l a b Code Ex5 . 2 2 D e t e r m i n i n g t i l t a n g l e from d i s l o c a t i o n s p a c i n g i n t h e boundary o f Cu : Page −188 ( 2 0 1 0 ) 2 b = 0.4 e -09; // B u r g e r v e c t o r m a g n i t u d e f o r f c c Cu , m 3 h = 3.0 e -06; // The v e r t i c a l s p a c i n g b e t w e e n two neighbouring edge d i s l o c a t i o n s , m 4 tan_theta = atand ( b / h ) *( %pi /180) ; // t a n g e n t o f t i l t a n g l e b e t w e e n two t i l t b o u n d a r i e s o f Cu , radian 1

64

printf ( ” \ nThe t i l t a n g l e b e t w e e n two t i l t b o u n d a r i e s o f Cu = %4 . 2 e r a d i a n ” , theta ) ; 6 // R e s u l t 7 // The t i l t a n g l e b e t w e e n two t i l t b o u n d a r i e s o f Cu = 1 . 3 3 e −004 r a d i a n 5

65

Chapter 6 Atomic Diffusion

Scilab code Exa 6.1 Rate of diffusion of nitrogen through steel wall 1 2

3 4 5

6

7 8

// S c i l a b Code Ex6 . 1 Rate o f d i f f u s i o n o f n i t r o g e n t h r o u g h s t e e l w a l l : Page −195 ( 2 0 1 0 ) D = 1e -019; // D i f f u s i o n c o e f f c i e n t o f n i t r o g e n i n s t e e l a t room t e m p e r a t u r e , m e t r e s q u a r e p e r sec dc = 10; // C o n c e n t r a t i o n o f n i t r o g e n a t t h e i n n e r s u r f a c e o f t h e tank , kg p e r m e t r e c u b e dx = 10 e -03; // T h i c k n e s s o f t h e s t e e l w a l l , m J = D *( dc / dx ) ; // F i c k ’ s f i r s t law g i v i n g outward f l u x o f n i t r o g e n t h r o u g h s t e e l w a l l o f t h e tank , kg p e r m e t r e s q u a r e p e r s e c o n d printf ( ” \ nThe r a t e a t which n i t r o g e n e s c a p e s t h r o u g h t h e t a n k w a l l = %1 . 0 e kg p e r m e t r e s q u a r e p e r s e c ”, J); // R e s u l t // The r a t e a t which n i t r o g e n e s c a p e s t h r o u g h t h e t a n k w a l l = 1 e −016 kg p e r m e t r e s q u a r e p e r s e c

Scilab code Exa 6.2 Rate of diffusion of copper through pure Al sheet 66

1 2 3 4 5 6 7

8

9 10

11

12 13

// S c i l a b Code Ex6 . 2 Rate o f d i f f u s i o n o f c o p p e r t h r o u g h p u r e Al s h e e t : Page −196 ( 2 0 1 0 ) a = 4.05 e -010; // L a t t i c e p a r a m e t e r o f f c c Al , m N = 4; // Number o f Al atoms p e r u n i t c e l l o f f c c Al n = N / a ^3; // Number o f Al atoms p e r u n i t volume , per metre cube D = 5.25 e -013; // D i f f u s i o n c o e f f c i e n t o f c o p p e r i n Al a t 550 d e g r e e c e l s i u s , m e t r e s q u a r e p e r s e c c1 = 0.19 e -02; // Atomic p e r c e n t o f c o p p e r a t t h e s u r f a c e , p e r u n i t volume c2 = 0.18 e -02; // Atomic p e r c e n t o f c o p p e r a t t h e t h e d e p t h 1 . 2 mm from t h e s u r f a c e , p e r u n i t volume dc = ( c2 - c1 ) * n ; // Change i n c o n c e n t r a t i o n o f c o p p e r a t 1 . 2 mm d e p t h o f t h e s u r f a c e , p e r m e t r e cube dx = 1.2 e -03; // T h i c k n e s s o f t h e p u r e Al s h e e t , m J = -D *( dc / dx ) ; // F i c k ’ s f i r s t law g i v i n g outward f l u x o f c o p p e r t h r o u g h t h e Al s h e e t , Cu atoms p e r m e t r e s q u a r e p e r s e c o n d printf ( ” \ nThe outward f l u x o f c o p p e r t h r o u g h t h e Al s h e e t = %4 . 2 e Cu atoms p e r m e t r e s q u a r e p e r s e c ” , J); // R e s u l t // The outward f l u x o f c o p p e r t h r o u g h t h e Al s h e e t = 2 . 6 3 e +015 Cu atoms p e r m e t r e s q u a r e p e r s e c

Scilab code Exa 6.3 Rate of diffusion of carbon through steel bar // S c i l a b Code Ex6 . 3 through s t e e l bar : 2 a = 3.65 e -010; // structure of iron ,

1

Rate o f d i f f u s i o n o f c a r b o n Page −196 ( 2 0 1 0 ) L a t t i c e parameter of f c c m 67

// D i f f u s i o n c o e f f c i e n t o f c a r b o n i n i r o n at 1000 d e g r e e c e l s i u s , metre s q u a r e per s e c n1 = 20; // Number o f u n i t c e l l s p e r c a r b o n atom at the s u r f a c e of s t e e l n2 = 30; // Number o f u n i t c e l l s p e r c a r b o n atom a t a d e p t h 1 mm from t h e s u r f a c e o f s t e e l c1 = 1/( n1 * a ^3) ; // Atomic p e r c e n t o f c a r b o n a t the s u r f a c e , per metre cube c2 = 1/( n2 * a ^3) ; // Atomic p e r c e n t o f c a r b o n a t a d e p t h 1 mm from t h e s u r f a c e , p e r m e t r e c u b e dx = 1e -03; // T h i c k n e s s o f t h e s t e e l bar , m J = -D *(( c2 - c1 ) / dx ) ; // F i c k ’ s f i r s t law g i v i n g outward f l u x o f c a r b o n t h r o u g h t h e S t e e l bar , C atoms p e r m e t r e s q u a r e p e r s e c o n d J_uc = J * a ^2*60; // The number o f c a r b o n atoms d i f f u s i n g through each u n i t c e l l per minute printf ( ” \ nThe number o f c a r b o n atoms d i f f u s i n g t h r o u g h e a c h u n i t c e l l p e r m i n u t e = %2d atoms p e r m i n u t e ” , J_uc ) ; // R e s u l t // The number o f c a r b o n atoms d i f f u s i n g t h r o u g h e a c h u n i t c e l l p e r m i n u t e = 82 atoms p e r m i n u t e

3 D = 3e -011; 4 5 6 7 8 9

10 11

12 13

Scilab code Exa 6.4 Diffusion through a cylinder 1 2 3

4

5

// S c i l a b Code Ex6 . 4 D i f f u s i o n t h r o u g h a c y l i n d e r : Page −199 ( 2 0 1 0 ) r = 12; // R a d i u s o f c y l i n d r i c a l c r y s t a l , mm A1 = %pi * r ^2; // C r o s s − s e c t i o n a l a r e a f o r d i f f u s i o n t h r o u g h t h e c y l i n d e r , m i l l i −m e t r e square t = 4e -07; // Assume e f f e c t i v e t h i c k n e s s o f t h e s u r f a c e t o be 4 a n g s t r o m = two a t o m i c d i a m e t e r s , mm A2 = 2* %pi * r * t ; // C r o s s − s e c t i o n a l a r e a f o r 68

6 7 8 9

d i f f u s i o n a l o n g t h e s u r f a c e , m i l l i −m e t r e s q u a r e ratio = A2 / A1 ; // R a t i o o f two c r o s s − s e c t i o n a l areas printf ( ” \ nThe r a t i o o f two c r o s s − s e c t i o n a l a r e a s = %4 . 2 e ” , ratio ) ; // R e s u l t // The r a t i o o f two c r o s s − s e c t i o n a l a r e a s = 6 . 6 7 e −008

Scilab code Exa 6.5 Diffusion length of Li in Ge 1 2 3 4 5 6 7 8

// S c i l a b Code Ex6 . 5 D i f f u s i o n l e n g t h o f L i i n Ge : Page −203 ( 2 0 1 0 ) D = 1e -010; // D i f f u s i o n c o e f f i c i e n t f o r L i i n Ge , metre square per s e c t = 1*60*60; // Time t a k e n by d i f f u s i n g L i t o t r a v e l d i f f u s i o n depth , s e c T = 500+273; // a b s o l u t e t e m p e r a t u r e o f t h e system , k e l v i n x = sqrt ( D * t ) ; // D i f f u s i o n l e n g t h o f L i i n Ge , m printf ( ” \ nThe d i f f u s i o n l e n g t h o f L i i n Ge = %1 . 0 e m ”, x); // R e s u l t // The d i f f u s i o n l e n g t h o f L i i n Ge = 6 e −004 m

Scilab code Exa 6.6 Diffusion time of Li in Ge // S c i l a b Code Ex6 . 6 D i f f u s i o n t i m e o f L i i n Ge : Page −203 ( 2 0 1 0 ) 2 D = 1e -010; // D i f f u s i o n c o e f f i c i e n t f o r L i i n Ge , metre square per s e c 3 T = 500+273; // A b s o l u t e t e m p e r a t u r e o f t h e system , k e l v i n 1

69

4 x = 0.2 e -03; // D i f f u s i o n l e n g t h o f L i i n Ge , m 5 // D i f f u s i o n l e n g t h i s g i v e n by 6 // x = s q r t (D∗ t ) , s o l v i n g f o r t 7 t = x ^2/ D ; // Time t a k e n by d i f f u s i n g L i t o

t r a v e l d i f f u s i o n d e p t h o f 0 . 2 mm, s e c 8 printf ( ” \ nThe t i m e t a k e n by d i f f u s i n g L i t o t r a v e l d i f f u s i o n d e p t h o f 0 . 2 mm = %3d s ” , t ) ; 9 // R e s u l t 10 // The t i m e t a k e n by d i f f u s i n g L i t o t r a v e l d i f f u s i o n d e p t h o f 0 . 2 mm = 400 s

Scilab code Exa 6.7 Diffusion coefficent of Cu in Al 1 2

3 4 5 6 7

8 9

10 11

// S c i l a b Code Ex6 . 7 D i f f u s i o n c o e f f i c e n t o f Cu i n Al : Page 206 ( 2 0 1 0 ) D0 = 0.25 e -04; // Pre−e x p o n e n t i a l d i f f u s i o n c o n s t a n t independent o f temperature , metre square per second T = 550+273; // A b s o l u t e t e m p e r a t u r e o f t h e system , k e l v i n R = 8.314; // Molar g a s c o n s t a n t , J / mol /K Q = 121 e +03; // The a c t i v a t i o n e n e r g y f o r d i f f u s i o n , j o u l e p e r mole t = 1*60*60; // Time t a k e n by Cu t o d i f f u s e i n t o Al , s e c D = D0 * exp ( - Q /( R * T ) ) ; // D i f f u s i o n c o e f f i c i e n t o f Cu i n Al a t 550 d e g r e e c e l s i u s , m e t r e s q u a r e p e r sec x = sqrt ( D * t ) ; // D i f f u s i o n l e n g t h o f Cu i n Al , m printf ( ” \ nThe d i f f u s i o n c o e f f i c i e n t o f Cu i n Al a t 550 d e g r e e c e l s i u s = %4 . 2 e m e t r e s q u a r e p e r s e c ” , D); printf ( ” \ nThe d i f f u s i o n l e n g t h o f Cu i n Al = %5 . 3 f mm” , x *1000) ; // R e s u l t 70

// The d i f f u s i o n c o e f f i c i e n t o f Cu i n Al a t 550 d e g r e e c e l s i u s = 5 . 2 2 e −013 m e t r e s q u a r e p e r s e c 13 // The d i f f u s i o n l e n g t h o f Cu i n Al = 0 . 0 4 3 mm

12

Scilab code Exa 6.8 Activation energy for diffusion of Ag in Si 1 2 3 4 5 6 7 8 9 10 11 12

// S c i l a b Code Ex6 . 8 A c t i v a t i o n e n e r g y f o r d i f f u s i o n o f s i l v e r i n s i l i c o n : Page 206 ( 2 0 1 0 ) R = 8.314; // Molar g a s c o n s t a n t , J / mol /K T1 = 1350+273; // F i r s t t e m p e r a t u r e a t which d i f u u s i o n o f Ag i n t o S i t a k e s p l a c e , k e l v i n T2 = 1100+273; // S e c o n d t e m p e r a t u r e a t which d i f u u s i o n o f Ag i n t o S i t a k e s p l a c e , k e l v i n DRR = 8; // R a t i o o f d i f f u s i o n r a t e s o f Ag i n S i a t T1 and T2 // As d i f f u s i o n c o e f f i c i e n t a t t e m p e r a t u r e T1 i s D1 = D0∗ exp (−Q/ (R∗T1 ) ) // and t h a t a t t e m p e r a t u r e T2 i s D1 = D0∗ exp (−Q/ (R∗ T2 ) ) , s o t h a t t h e d i f f u s i o n r a t e s r a t i o // D1/D2 = DRR = exp (Q/R∗ ( 1 / T2−1/T1 ) ) , s o l v i n g f o r Q , we have Q = R * log ( DRR ) /((1/ T2 -1/ T1 ) *1000) ; // A c t i v a t i o n e n e r g y f o r d i f f u s i o n o f Ag i n S i , kJ / mol printf ( ” \ nThe a c t i v a t i o n e n e r g y f o r d i f f u s i o n o f Ag i n S i = %3d kJ / mol ” , Q ) ; // R e s u l t // The a c t i v a t i o n e n e r g y f o r d i f f u s i o n o f Ag i n S i = 154 kJ / mol

Scilab code Exa 6.9 Arrhenius rate law

71

1

2 3 4 5 6 7 8 9 10 11 12 13

14 15 16

17 18 19 20 21

// S c i l a b Code Ex6 . 9 A c t i v a t i o n e n e r g y and d i f f u s i o n constant o f a d i f f u s i o n system obeying Arrhenius r a t e law : Page 207 ( 2 0 1 0 ) R = 1.987; // Molar g a s c o n s t a n t , c a l / mol /K D_1100 = 8e -013; // D i f f u s i v i t y o f Ga i n S i a t 1 1 0 0 d e g r e e c e l s i u s , cm s q u a r e p e r s e c D_1300 = 1e -010; // D i f f u s i v i t y o f Ga i n S i a t 1 3 0 0 d e g r e e c e l s i u s , cm s q u a r e p e r s e c T1 = 1100+273; // F i r s t t e m p e r a t u r e a t which d i f f u s i o n o f Ga i n t o S i t a k e s p l a c e , k e l v i n T2 = 1300+273; // S e c o n d t e m p e r a t u r e a t which d i f f u s i o n o f Ga i n t o S i t a k e s p l a c e , k e l v i n // A r r e h e n i u s e q u a t i o n i n l o g 1 0 form i s g i v e n by // l o g 1 0 (D) = l o g 1 0 ( D0 )−Q/ ( 2 . 3 0 3 ∗R∗T) −−− ( a ) // Thus l o g 1 0 ( D 1100 ) = l o g 1 0 ( D0 )−Q/ ( 2 . 3 0 3 ∗R∗T1 ) −−− ( i ) −−− ( // l o g 1 0 ( D 1300 ) = l o g 1 0 ( D0 )−Q/ ( 2 . 3 0 3 ∗R∗T2 ) ii ) , // On s u b t r a c t i n g ( i i ) from ( i ) , we g e t // l o g 1 0 ( D 1100 / D 1300 ) = −Q/ ( 2 . 3 0 3 ∗R) ∗ ( 1 / T2−1/T1 ) , solving for Q Q = (2.303* log10 ( D_1100 / D_1300 ) * R ) /(1/ T2 -1/ T1 ) ; // A c t i v a t i o n e n e r g y f o r d i f f u s i o n o f Ga i n S i , c a l / mol // P u t t i n g Q i n ( i i ) and s o l v i n g f o r D0 D0 = exp (2.303* log10 ( D_1100 ) + Q /( R * T1 ) ) // Pre // D0 = exp ( 2 . 3 0 3 ∗ l o g 1 0 ( D 1300 )+Q/ (R∗T2 ) ) ; −e x p o n e n t i a l d i f f u s i o n c o n s t a n t i n d e p e n d e n t o f t e m p e r a t u r e , cm s q u a r e p e r s e c T = 1200+273; // T e m p e r a t u r e a t which d i f f u s i o n o f Ga i n t o S i i s t o be c a l c u l a t e d , k e l v i n // S u b s t i t u t i n g D0 , Q, R and T i n ( a ) and s o l v i n g f o r D, we have D = exp (2.303* log10 ( D0 ) -Q /( R * T ) ) ; // D i f f u s i v i t y o f t h e system , cm s q u a r e p e r s e c printf ( ” \ nThe a c t i v a t i o n e n e r g y f o r d i f f u s i o n o f Ga i n S i = %3d k c a l / mol ” , Q /1000) ; printf ( ” \ nThe pre −e x p o n e n t i a l d i f f u s i o n c o n s t a n t , D0 72

22 23 24 25 26

= %5d cm s q u a r e p e r s e c ” , D0 ) ; printf ( ” \ nThe d i f f u s i v i t y o f t h e s y s t e m = %4 . 2 e cm s q u a r e per s e c ”, D); // R e s u l t // The a c t i v a t i o n e n e r g y f o r d i f f u s i o n o f Ga i n S i = 103 k c a l / mol // The pre −e x p o n e n t i a l d i f f u s i o n c o n s t a n t , D0 = 2 4 8 9 3 cm s q u a r e p e r s e c // The d i f f u s i v i t y o f t h e s y s t e m = 1 . 0 5 e −011 cm square per sec

Scilab code Exa 6.10 Activation energy for diffusion rates at different temperatures 1

2 3 4 5 6 7 8 9 10 11

// S c i l a b Code Ex6 . 1 0 A c t i v a t i o n e n e r g y f o r d i f f u s i o n r a t e s a t d i f f e r e n t t e m p e r a t u r e s : Page 208 ( 2 0 1 0 ) R = 8.314; // Molar g a s c o n s t a n t , J / mol /K T1 = 500+273; // F i r s t t e m p e r a t u r e a t which d i f f u s i o n of A into B takes place , kelvin T2 = 850+273; // S e c o n d t e m p e r a t u r e a t which d i f f u s i o n of A into B takes place , k e l v i PDR = 1/4; // P e n e t r a t i o n d e p t h r a t i o a t 500 d e g r e e c e l s i u s and 850 d e g r e e c e l s i u s // x1 / x2 = s q r t ( D1/D2 ) i . e . PDR = s q r t (DRR) , DRR i s the d i f f u s i o n rate r a t i o // s o l v i n g f o r DRR DRR = PDR ^2; // D i f f u s i o n r a t e r a t i o D1/D2 o f A in B // As d i f f u s i o n c o e f f i c i e n t a t t e m p e r a t u r e T1 i s D1 = D0∗ exp (−Q/ (R∗T1 ) ) // and t h a t a t t e m p e r a t u r e T2 i s D1 = D0∗ exp (−Q/ (R∗ T2 ) ) , s o t h a t t h e d i f f u s i o n r a t e s r a t i o // D1/D2 = DRR = exp (Q/R∗ ( 1 / T2−1/T1 ) ) , s o l v i n g f o r Q , we have 73

// A c t i v a t i o n e n e r g y f o r d i f f u s i o n o f A i n B , kJ / mol 13 printf ( ” \ nThe a c t i v a t i o n e n e r g y f o r d i f f u s i o n o f A i n B = %5 . 2 f kJ / mol ” , Q ) ; 14 // R e s u l t 15 // The a c t i v a t i o n e n e r g y f o r d i f f u s i o n o f A i n B = 5 7 . 1 7 kJ / mol

12 Q = R * log ( DRR ) /((1/ T2 -1/ T1 ) *1000) ;

Scilab code Exa 6.11 Time required for carburizing of steel 1 2 3 4 5 6 7 8 9

10 11 12 13

// S c i l a b Code Ex6 . 1 1 Time r e q u i r e d f o r c a r b u r i z i n g o f s t e e l : Page 209 ( 2 0 1 0 ) C0 = 0.0018; // I n t i a l c a r b o n c o n c e n t r a t i o n o f steel Cx = 0.0030; // Carbon c o n c e n t r a t i o n o f s t e e l a t 0 . 6 0 mm b e l o w t h e s u r f a c e o f t h e g e a r Cs = 0.01; // Carbon c o n c e n t r a t i o n o f s t e e l a t the s u r f a c e x = 0.6 e -03; // D i f f u s i o n d e p t h b e l o w t h e s u r f a c e o f the gear , m D_927 = 1.28 e -011; // D i f f u s i o n c o e f f i c i e n t f o r carbon i n iron , metre square per s e c erf_Z = ( Cs - Cx ) /( Cs - C0 ) ; // E r r o r f u n c t i o n o f Z a s a s o l u t i o n t o F i c k ’ s s e c o n d law Z1 = 1.0 , Z2 = 1.1; // P r e c e d i n g and s u c c e e d i n g v a l u e s a b o u t Z from e r r o r f u n c t i o n t a b l e erf_Z1 = 0.8427 , erf_Z2 = 0.8802; // P r e c e d i n g and s u c c e e d i n g v a l u e s a b o u t e r f Z from e r r o r function table Z = poly (0 , ’ Z ’ ) ; Z = roots (( Z - Z1 ) /( Z2 - Z1 ) -( erf_Z - erf_Z1 ) /( erf_Z2 erf_Z1 ) ) ; // As Z = x / ( 2 ∗ s q r t ( D 927 ∗ t ) ) , where Z i s a c o n s t a n t argument o f e r r o r f u n c t i o n a s e r f ( Z ) // S o l v i n g f o r t , we have 74

// Time n e c e s s a r y t o i n c r e a s e the carbon content of s t e e l , sec 15 printf ( ” \ nThe t i m e n e c e s s a r y t o i n c r e a s e t h e c a r b o n c o n t e n t o f s t e e l = %3d m i n u t e s ” , t /60) ; 16 // R e s u l t 17 // The t i m e n e c e s s a r y t o i n c r e a s e t h e c a r b o n c o n t e n t o f s t e e l = 110 m i n u t e s

14 t = ( x /(2* Z ) ) ^2/ D_927 ;

Scilab code Exa 6.12 Carbon concentration of carburized steel at certain depth 1

2 3 4 5 6 7 8 9

10 11

12

// S c i l a b Code Ex6 . 1 2 Carbon c o n c e n t r a t i o n o f c a r b u r i z e d s t e e l a t c e r t a i n d e p t h : Page 210 (2010) C0 = 0.0020; // I n i t i a l c a r b o n c o n c e n t r a t i o n o f steel Cs = 0.012; // Carbon c o n c e n t r a t i o n o f s t e e l a t the s u r f a c e t = 10*60*60; // C a r b u r i z i n g t i m e o f s t e e l , s e c x = 0.06*25.4*1 e -03; // D i f f u s i o n d e p t h b e l o w t h e s u r f a c e o f t h e g e a r , mm D_927 = 1.28 e -011; // D i f f u s i o n c o e f f i c i e n t f o r carbon i n iron , metre square per s e c Z = x /(2* sqrt ( D_927 * t ) ) , // A c o n s t a n t argument o f e r r o r f u n c t i o n as e r f (Z) Z1 = 1.1 , Z2 = 1.2; // P r e c e d i n g and s u c c e e d i n g v a l u e s a b o u t Z from e r r o r f u n c t i o n t a b l e erf_Z1 = 0.8802 , erf_Z2 = 0.9103; // P r e c e d i n g and s u c c e e d i n g v a l u e s a b o u t e r f Z from e r r o r function table efZ = poly (0 , ’ e f Z ’ ) ; efZ = roots (( efZ - erf_Z1 ) /( erf_Z2 - erf_Z1 ) -(Z - Z1 ) /( Z2 Z1 ) ) ; // E r r o r f u n c t i o n o f Z a s a s o l u t i o n t o F i c k ’ s s e c o n d law Cx = poly (0 , ’ Cx ’ ) ; 75

// Carbon concentration of carburized s t e e l at 0.06 inch depth 14 printf ( ” \ nThe c a r b o n c o n c e n t r a t i o n o f c a r b u r i z e d s t e e l a t 0 . 0 6 i n c h d e p t h = %4 . 2 f p e r c e n t ” , Cx *100) ; 15 // R e s u l t 16 // The c a r b o n c o n c e n t r a t i o n o f c a r b u r i z e d s t e e l a t 0 . 0 6 inch depth = 0 . 3 1 p e r c e n t 13 Cx = roots ( efZ -( Cs - Cx ) /( Cs - C0 ) ) ;

Scilab code Exa 6.13 Depth of decarburization below the surface of steel 1 2 3 4 5 6 7 8 9

10 11 12

// S c i l a b Code Ex6 . 1 3 Depth o f d e c a r b u r i z a t i o n b e l o w t h e s u r f a c e o f s t e e l : Page 211 ( 2 0 1 0 ) C2 = 0.012; // I n i t i a l c a r b o n c o n c e n t r a t i o n o f steel Cx = 0.008; // Carbon c o n c e n t r a t i o n o f c a r b u r i z e d s t e e l at x metre depth Cs = 0; // Carbon c o n c e n t r a t i o n o f s t e e l a t t h e surface t = 5*60*60; // C a r b u r i z i n g t i m e o f s t e e l , s e c D_927 = 1.28 e -011; // D i f f u s i o n c o e f f i c i e n t f o r carbon i n iron , metre square per s e c erf_Z = abs (( Cs - Cx ) /( C2 - Cs ) ) ; // E r r o r f u n c t i o n o f Z a s a s o l u t i o n t o F i c k ’ s s e c o n d law Z1 = 0.65 , Z2 = 0.70; // P r e c e d i n g and s u c c e e d i n g v a l u e s a b o u t Z from e r r o r f u n c t i o n t a b l e erf_Z1 = 0.6420 , erf_Z2 = 0.6778; // P r e c e d i n g and s u c c e e d i n g v a l u e s a b o u t e r f Z from e r r o r function table Z = poly (0 , ’ Z ’ ) ; Z = roots (( Z - Z1 ) /( Z2 - Z1 ) -( erf_Z - erf_Z1 ) /( erf_Z2 erf_Z1 ) ) ; // As Z = x / ( 2 ∗ s q r t ( D 927 ∗ t ) ) , where Z i s a c o n s t a n t argument o f e r r o r f u n c t i o n a s e r f ( Z ) 76

13 // S o l v i n g f o r x , we have 14 x = Z *2* sqrt ( D_927 * t ) ; // Depth o f

decarburization below the s u r f a c e o f s t e e l , m 15 printf ( ” \ nThe minimum d e p t h u p t o which p o s t m a c h i n i n g i s t o be done = %4 . 2 f mm” , x *1000) ; 16 // R e s u l t 17 // The minimum d e p t h u p t o which p o s t m a c h i n i n g i s t o be done = 0 . 6 6 mm

Scilab code Exa 6.14 Diffusion depth of P type semiconductor 1 2 3 4 5 6 7 8 9 10

11 12 13

// S c i l a b Code Ex6 . 1 4 D i f f u s i o n d e p t h o f P−t y p e s e m i c o n d u c t o r (B i n t o S i ) : Page 212 ( 2 0 1 0 ) C0 = 0; // I n i t i a l b o r o n c o n c e n t r a t i o n o f s i l i c o n Cx = 1 e +17; // Boron c o n c e n t r a t i o n a t d e p t h x below the s i l i c o n s u r f a c e Cs = 1 e +18; // Boron c o n c e n t r a t i o n o f s i l i c o n a t the s u r f a c e T = 1100+273; // A b s o l u t e t e m p e r a t u r e o f t h e system , k e l v i n t = 2*60*60; // Time t a k e n t o d i f f u s e b o r o n i n t o silicon , sec D_1100 = 4e -013; // D i f f u s i o n c o e f f i c i e n t f o r b o r o n i n s i l i c o n , cm s q u a r e p e r s e c erf_Z = abs (( Cs - Cx ) /( Cs - C0 ) ) ; // E r r o r f u n c t i o n o f Z a s a s o l u t i o n t o F i c k ’ s s e c o n d law Z1 = 1.1 , Z2 = 1.2; // P r e c e d i n g and s u c c e e d i n g v a l u e s a b o u t Z from e r r o r f u n c t i o n t a b l e erf_Z1 = 0.8802 , erf_Z2 = 0.9103; // P r e c e d i n g and s u c c e e d i n g v a l u e s a b o u t e r f Z from e r r o r function table Z = poly (0 , ’ Z ’ ) ; Z = roots (( Z - Z1 ) /( Z2 - Z1 ) -( erf_Z - erf_Z1 ) /( erf_Z2 erf_Z1 ) ) ; // As Z = x / ( 2 ∗ s q r t ( D 927 ∗ t ) ) , where Z i s a c o n s t a n t 77

14 15 16 17 18

argument o f e r r o r f u n c t i o n a s e r f ( Z ) // S o l v i n g f o r x , we have x = Z *2* sqrt ( D_1100 * t ) ; // D i f f u s i o n d e p t h o f b o r o n into s i l i c o n printf ( ” \ nThe d i f f u s i o n d e p t h o f b o r o n i n t o s i l i c o n = %4 . 2 e cm” , x ) ; // R e s u l t // The d i f f u s i o n d e p t h o f b o r o n i n t o s i l i c o n = 1 . 2 5 e −004 cm

78

Chapter 7 Lattice or Atomic Vibrations

Scilab code Exa 7.1 Cut off frequency of the linear lattice of a solid 1 2 3 4 5 6 7 8 9

// S c i l a b Code Ex7 . 1 Cut− o f f f r e q u e n c y o f t h e l i n e a r l a t t i c e o f a s o l i d : Page −238 ( 2 0 1 0 ) v = 3 e +03; // V e l o c i t y o f sound i n t h e s o l i d , m/ s a = 3e -010; // I n t e r a t o m i c d i s t a n c e , m // As cut − o f f f r e q u e n c y o c c u r s a t k = %pi / a and k = 2∗ %pi / lambda , t h i s g i v e s lambda = 2* a ; // Cut− o f f w a v e l e n g t h f o r t h e s o l i d , m f = v / lambda ; // Cut− o f f f r e q u e n c y ( v = f ∗ lambda ) f o r the l i n e a r l a t t i c e , hertz printf ( ” \ nThe cut − o f f f r e q u e n c y f o r t h e l i n e a r l a t t i c e o f a s o l i d = %1 . 0 e Hz” , f ) ; // R e s u l t // The cut − o f f f r e q u e n c y f o r t h e l i n e a r l a t t i c e o f a s o l i d = 5 e +012 Hz

Scilab code Exa 7.2 Comparison of frequency of waves in a monoatomic and diatomic linear systems 79

1

2 3 4 5 6 7 8 9 10 11 12 13

14 15 16 17 18 19 20

// S c i l a b Code Ex7 . 2 Comparison o f f r e q u e n c y o f waves i n a monoatomic and d i a t o m i c l i n e a r s y s t e m s : Page −238 ( 2 0 1 0 ) a = 2.5 e -010; // I n t e r a t o m i c s p a c i n g b e t w e e n two i d e n t i c a l atoms , m v0 = 1 e +03; // V e l o c i t y o f sound i n t h e s o l i d , m/ s lambda = 10 e -010; // Wavelength o f t h e sound wave , m omega = v_0 *2* %pi / lambda ; // A n g u l a r f r e q u e n c y o f sound wave i n a monoatomic l a t t i c e , r a d p e r s e c printf ( ” \ nThe f r e q u e n c y o f sound waves i n a monoatomic l a t t i c e = %4 . 2 e r a d / s e c ” , omega ) ; // For a c o u s t i c waves i n a d i a t o m i c l a t t i c e (M = m) , t h e a n g u l a r f r e q u e n c y , omega = 0 a t k = 0 and // omega = ( 2 ∗K/m) ˆ ( 1 / 2 ) −−− ( i ) a t k = %pi /(2∗ a ) // As v0 = a ∗ ( 2 ∗K/m) ˆ ( 1 / 2 ) −−− ( i i ) // From ( i ) and ( i i ) , we have omega_min = 0; // A n g u l a r f r e q u e n c y o f a c o u s t i c waves a t k = 0 , r a d p e r s e c omega_max = v0 / a ; // A n g u l a r f r e q u e n c y o f a c o u s t i c waves a t k = %pi / ( 2 ∗ a ) , r a d p e r s e c printf ( ” \n\ nThe f r e q u e n c y o f a c o u s t i c waves wave i n a d i a t o m i c l a t t i c e : \ n %d r a d / s e c f o r k = 0 \n %1 . 0 e r a d / s e c f o r k = p i / ( 2 ∗ a ) ” , omega_min , omega_max ) ; // For o p t i c a l waves i n a d i a t o m i c l a t t i c e (M = m) , the angular frequency // omega = s q r t ( 2 ) ∗ ( 2 ∗K/m) ˆ ( 1 / 2 ) −−− ( i i i ) at k = 0 // As v0 = a ∗ ( 2 ∗K/m) ˆ ( 1 / 2 ) −−− ( i v ) // From ( i i i ) and ( i v ) , we have omega_max = sqrt (2) * v_0 / a ; // A n g u l a r f r e q u e n c y o f o p t i c a l waves a t k = 0 , r a d p e r s e c // For o p t i c a l waves i n a d i a t o m i c l a t t i c e (M = m) , the angular frequency // omega = ( 2 ∗K/m) ˆ ( 1 / 2 ) −−− ( i i i ) a t k = %pi 80

21 22 23 24

25 26

/(2∗ a ) // As v0 = a ∗ ( 2 ∗K/m) ˆ ( 1 / 2 ) −−− ( i v ) // From ( i i i ) and ( i v ) , we have omega_min = v_0 / a ; // A n g u l a r f r e q u e n c y o f o p t i c a l waves a t k = %pi / ( 2 ∗ a ) , r a d p e r s e c printf ( ” \n\ nThe f r e q u e n c y o f o p t i c a l s w a v e s wave i n a d i a t o m i c l a t t i c e : \ n %4 . 2 e r a d / s e c f o r k = 0 \n %1 . 0 e r a d / s e c f o r k = p i / ( 2 ∗ a ) ” , omega_max , omega_min ) ; // R e s u l t // The f r e q u e n c y o f sound waves i n a monoatomic l a t t i c e = 6 . 2 8 e +012 r a d / s e c

27 28

// The f r e q u e n c y o f a c o u s t i c waves wave i n a diatomic l a t t i c e : 29 // 0 r a d / s e c f o r k = 0 30 // 4 e +012 r a d / s e c f o r k = p i / ( 2 ∗ a ) 31 32

// The f r e q u e n c y o f o p t i c a l s w a v e s wave i n a diatomic l a t t i c e : 33 // 5 . 6 6 e +012 r a d / s e c f o r k = 0 34 // 4 e +012 r a d / s e c f o r k = p i / ( 2 ∗ a )

Scilab code Exa 7.3 Reflection of electromagentic radiation from a crystal 1 2 3 4 5 6

// S c i l a b Code Ex7 . 3 R e f l e c t i o n o f e l e c t r o m a g e n t i c r a d i a t i o n from a c r y s t a l : Page − 2 3 9 ( 2 0 1 0 ) c = 3.0 e +08; // Speed o f e l e c t r o m a g n e t i c wave i n vacuum , m/ s a = 5.6 e -010; // L a t t i c e p a r a m e t e r o f NaCl crystal , m Y = 5 e +010; // Modulus o f e l a s t i c i t y a l o n g [ 1 0 0 ] d i r e c t i o n o f NaCl , newton p e r m e t r e s q u a r e m = 23; // Atomic w e i g h t o f sodium , amu M = 37; // Atomic w e i g h t o f c h l o r i n e , amu 81

7 amu = 1.67 e -027; // Kg e q u i v a l e n t o f 1 amu 8 K = a*Y; // F o r c e c o n s t a n t o f s p r i n g s when t h e 9

10

11

12 13

e x t e n s i o n a l o n g [ 1 0 0 ] d i r e c t i o n i s n e g l e c t e d , N/m omega_plus_max = (2* K *(1/( M * amu ) +1/( m * amu ) ) ) ^(1/2) ; // The maximum a n g u l a r f r e q u e n c y o f t h e r e f l e c t e d e l e c t r o m a g n e t i c r a d i a t i o n , rad per s e c lambda = 2* %pi * c / omega_plus_max ; // The w a v e l e n g t h a t which t h e e l e c t r o m a g n e t i c r a d i a t i o n is strongly reflected , m printf ( ” \ nThe w a v e l e n g t h a t which t h e electromagnetic radiation is strongly reflected by t h e c r y s t a l = %4 . 2 e m” , lambda ) ; // R e s u l t // The w a v e l e n g t h a t which t h e e l e c t r o m a g n e t i c r a d i a t i o n i s s t r o n g l y r e f l e c t e d by t h e c y s t a l = 3 . 8 8 e −005 m

82

Chapter 8 Diffraction of Waves and Particles by Crystals

Scilab code Exa 8.1 Shortest wavelength and frequency of X rays from accelerating potential 1

2 3 4 5 6 7 8 9 10

// S c i l a b Code Ex08 . 1 D e t e r m i n a t i o n o f s h o r t e s t w a v e l e n g t h and f r e q u e n c y o f X−r a y s from a c c e l e r a t i n g p o t e n t i a l Page −250 ( 2 0 1 0 ) V = 50 e +03; // 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 c = 3 e +08; // Speed o f l i g h t i n f r e e s p a c e Lambda_min = 1.24 e -06/ V ; // Minimum w a v e l e n g t h , metre F_max = c / Lambda_min ; // Maximum f r e q u e n c y , Hz printf ( ” \ nThe s h o r t e s t w a v e l e n g t h p r e s e n t i n X−r a y s = %4 . 2 f a n g s t r o m ” , Lambda_min /1 D -10) ; printf ( ” \ nThe maximum f r e q u e n c y p r e s e n t i n X−r a y s = %3 . 1 e Hz” , F_max ) ; // R e s u l t // The s h o r t e s t w a v e l e n g t h p r e s e n t i n X−r a y s = 0 . 2 5 angstrom // The maximum f r e q u e n c y p r e s e n t i n X−r a y s = 1 . 2 e +19 Hz

83

Scilab code Exa 8.2 Impinging electrons on the target and characteristics of X rays 1

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

// S c i l a b Code Ex8 . 2 C a l c u l a t i o n o f i m p i n g i n g e l e c t r o n s on t h e t a r g e t and c h a r a c t e r i s t i c s o f X− r a y s Page −253 ( 2 0 1 0 ) I = 2.5 e -03; // C u r r e n t t h r o u g h X−r a y tube , ampere V = 6 e +03; // P o t e n t i a l a c r o s s t h e X−r a y tube , volt e = 1.6 e -19; // Charge on an e l e c t r o n , coulomb m = 9.1 e -031; // mass o f an e l e c t r o n , kg t = 1; // T r a n s i t time , s e c o n d Q = I*t; // T o t a l c h a r g e f l o w i n g p e r s e c o n d t h r o u g h t h e x−r a y tube , coulomb n = Q/e; // Number o f e l e c t r o n s s t r i k i n g t h e t a r g e t per second // We have eV = 1/ 2∗m∗ v ˆ2 ( s t o p p i n g p o t e n t i a l = maximum K i n e t i c e n e r g y ) // S o l v i n g f o r v v = sqrt (2* e * V / m ) ; // s p e e d o f e l e c t r o n s s t r i k i n g t h e t a r g e t , m/ s Lambda_min = 1.24 e -06/ V ; // Minimum w a v e l e n g t h o f X−r a y s p r o d u c e d , m e t r e printf ( ” \ nThe number o f e l e c t r o n s s t r i k i n g t h e t a r g e t = %4 . 2 e ” ,n ) ; printf ( ” \ nThe v e l o c i t y o f e l e c t r o n s s t r i k i n g t h e t a r g e t = %4 . 2 e m/ s ” ,v ) ; printf ( ” \ nThe s h o r t e s t w a v e l e n g t h p r e s e n t i n X−r a y s = %4 . 2 e m” , Lambda_min ) ; // R e s u l t // The number o f e l e c t r o n s s t r i k i n g t h e t a r g e t = 1 . 5 6 e +016 // The v e l o c i t y o f e l e c t r o n s s t r i k i n g t h e t a r g e t = 84

4 . 5 9 e +007 m/ s 19 // The s h o r t e s t w a v e l e n g t h p r e s e n t i n X−r a y s = 2 . 0 7 e −010 m

Scilab code Exa 8.3 Wavelength of characteristic X rays 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

// S c i l a b Code Ex8 . 3 C a l c u l a t i o n o f w a v e l e n g t h o f c h a r a c t e r i s t i c X−r a y s Page −253 ( 2 0 1 0 ) h = 6.626 e -034; // Planck ’ s c o n s t a n t , J s 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 e = 1.602 e -019; // Charge on an e l e c t r o n , coulomb E_K = -78; // Energy o f K s h e l l f o r p l a t i n u m , keV E_L = -12; // Energy o f L s h e l l f o r p l a t i n u m , keV E_M = -3 ; // Energy o f M s h e l l f o r p l a t i n u m , keV E_K_alpha = E_L - E_K ; // Energy o f K a l p h a l i n e , keV E_K_beta = E_M - E_K ; // Energy o f K b e t a l i n e , keV // We have E = h∗ f , where f = c /Lambda t h i s i m p l i e s E = h∗ c / lambda // S o l v i n g f o r Lambda // Lambda = h∗ c /E lambda_K_alpha = h * c /( E_K_alpha * e *1 e +03) ; // Wavelength o f K a l p h a l i n e , m e t r e lambda_K_beta = h * c /( E_K_beta * e *1 e +03) ; // Wavelength o f K b e t a l i n e , m e t r e printf ( ” \ nThe w a v e l e n g t h o f K a l p h a l i n e = %4 . 2 f a n g s t r o m ” , lambda_K_alpha /1 D -10) ; printf ( ” \ nThe w a v e l e n g t h o f K b e t a l i n e = %4 . 2 f a n g s t r o m ” , lambda_K_beta /1 D -10) ; // R e s u l t // The w a v e l e n g t h o f K a l p h a l i n e = 0 . 1 9 a n g s t r o m // The w a v e l e n g t h o f K b e t a l i n e = 0 . 1 7 a n g s t r o m

85

Scilab code Exa 8.4 Atomic number of an unknown element 1 2 3 4 5 6 7 8 9 10 11 12 13

// S c i l a b Code Ex8 . 4 C a l c u l a t i o n o f a t o m i c number o f an unknown e l e m e n t Page −255 ( 2 0 1 0 ) lambda_Pt = 1.321 e -010; // Wavelength o f L a l p h a l i n e o f Pt , m Z_Pt = 78; // Atomic number o f p l a t i n u m b = 7.4; // C o n s t a n t lambda_x = 4.174 e -010; // Wavelength o f unknown element , m // We have f = [ a ∗ ( Z−b ) ] ˆ 2 ( Moseley ’ s law ) // As f P t = c / lam bda Pt = [ a ∗ ( Z Pt−b ) ] ˆ 2 // S i m i l a r l y f x = c / l a m b d a x = [ a ∗ ( Z x−b ) ] ˆ 2 // D i v i d i n g f P t by f x and s o l v i n g f o r x Z_x = b + sqrt ( lambda_Pt / lambda_x ) *( Z_Pt - b ) ; // Atomic number o f unknown e l e m e n t printf ( ” \ nThe a t o m i c number o f unknown e l e m e n t = %4 . 1 f ” , Z_x ) ; // R e s u l t // The a t o m i c number o f unknown e l e m e n t = 4 7 . 1

Scilab code Exa 8.5 Wavelength of copper using Moseley law 1 2 3 4 5 6

// S c i l a b Code Ex8 . 5 C a l c u l a t i o n o f w a v e l e n g t h o f c o p p e r u s i n g Moseley ’ s law Page −256 ( 2 0 1 0 ) c = 3.0 e +08; // Speed o f l i g h t , m/ s lambda_W = 210 e -010; // Wavelength o f K a l p h a l i n e o f W, m Z_W = 74; // Atomic number o f t u n g s t e n Z_Cu = 29; // Atomic number o f c o p p e r b = 1; // C o n s t a n t f o r K− s e r i e s

86

7 8 9 10 11 12 13

// f W = c / lambda W = ( a ∗ 7 3 ) ˆ 2 , The f r e q u e n c y K a l p h a l i n e f o r t u n g s t e n , Hz // f C u = c / lambda Cu = ( a ∗ 2 8 ) ˆ 2 , The f r e q u e n c y K a l p h a l i n e f o r c o p p e r , Hz // D i v i d i n g f W by f C u and s o l v i n g f o r lambda Cu lambda_Cu = (( Z_W - b ) /( Z_Cu - b ) ) ^2* lambda_W ; // Wavelength o f K a l p h a l i n e o f Cu , m printf ( ” \ nThe w a v e l e n g t h o f K a l p h a l i n e o f c o p p e r = %4 . 0 f a n g s t r o m ” , lambda_Cu /1 D -10) ; // R e s u l t // The w a v e l e n g t h o f K a l p h a l i n e o f c o p p e r = 1 4 2 7 angstrom

Scilab code Exa 8.6 Atomic number from wavelength using Moseley law 1

2 3 4

5 6 7 8 9 10 11 12

// S c i l a b Code Ex8 . 6 C a l c u l a t i o n o f a t o m i c number from w a v e l e n g t h u s i n g Moseley ’ s law Page −256 (2010) c = 3.0 e +08; // Speed o f l i g h t , m/ s h = 6.626 e -034; // Planck ’ s c o n s t a n t , J s epsilon_0 = 8.85 e -012; // A b s o l u t e e l e c t r i c a l p e r m i t t i v i t y o f f r e e s p a c e , coulomb s q u a r e p e r newton p e r m e t r e s q u a r e m = 9.1 e -031; // Mass o f an e l e c t r o n , kg e = 1.6 e -019; // Charge on an e l e c t r o n , C lambda = 0.7185 e -010; // Wavelength o f K a l p h a l i n e o f unknown e l e m e n t b = 1; // Mosley ’ s c o n s t a n t f o r K− s e r i e s n_1 = 1; n_2 = 2; // Lower and u p p e r e n e r g y levels // We know t h a t f = c / lambda = m∗ e ˆ 4 ∗ ( Z−b ) ˆ 2 / ( 8 ∗ e p s i l o n 0 ˆ2∗ h ˆ 3 ) ∗ ( 1 / n 2 ˆ2 −1/ n 1 ˆ 2 ) // T h i s i m p l i e s t h a t lambda = ( 8 ∗ e p s i l o n 0 ˆ2∗ c ∗h ˆ 3 / ( m∗ e ˆ 4 ∗ ( Z−b ) ˆ 2 ∗ ( 1 / n 2 ˆ2 −1/ n 1 ˆ 2 ) ) // S o l v i n g f o r Z 87

13 Z = sqrt (8* epsilon_0 ^2* c * h ^3/( m * e ^4* lambda *(1/ n_1

^2 -1/ n_2 ^2) ) ) + b ; // Atomic number unknown e l e m e n t printf ( ” \ nThe a t o m i c number unknown e l e m e n t = %2d” , Z); 15 // R e s u l t 16 // The a t o m i c number unknown e l e m e n t = 42 14

Scilab code Exa 8.7 Wavelengths of tin and barium using Moseley law 1

2 3 4 5 6 7 8 9 10 11 12 13 14 15

16

// S c i l a b Code Ex8 . 7 C a l c u l a t i o n o f w a v e l e n g t h s o f t i n and barium u s i n g Moseley ’ s law Page −257 (2010) Z_Fe = 26; // Atomic number o f i r o n Z_Pt = 78; // Atomic number o f p l a t i n u m Z_Sn = 50; // Atomic number o f t i n Z_Ba = 56; // Atomic number o f barium b = 1; // Mosley ’ s c o n s t a n t f o r K− s e r i e s lambda_Fe = 1.93 e -010; // Wavelength o f K a l p h a l i n e o f Fe lambda_Pt = 0.19 e -010; // Wavelength o f K a l p h a l i n e o f Pt // From Moseley ’ s Law , // f = a ∗ ( Z−1) ˆ 2 . T h i s i m p l i e s lambda = C∗ 1 / ( Z−1) ˆ2 // s o t h a t lambda Fe = C∗ 1 / ( Z Fe −1) ˆ2 and lambda Sn = C∗ 1 / ( Z Sn −1) ˆ2 // D i v i d i n g lambda Sn by lambda Fe and s o l v i n g f o r lambda Sn lambda_Sn = ( Z_Fe -1) ^2/( Z_Sn -1) ^2* lambda_Fe ; // Wavelength o f K a l p h a l i n e f o r t i n , m lambda_Ba = ( Z_Pt -1) ^2/( Z_Ba -1) ^2* lambda_Pt ; // Wavelength o f K a l p h a l i n e f o r barium , m printf ( ” \ nThe w a v e l e n g t h s o f t i n and barium = %3 . 1 f a n g s t r o m and %4 . 2 f a n g s t r o m r e s p e c t i v e l y ” , lambda_Sn /1 D -10 , lambda_Ba /1 D -10) ; // R e s u l t 88

17

// The w a v e l e n g t h s o f t i n and barium = 0 . 5 a n g s t r o m and 0 . 3 7 a n g s t r o m r e s p e c t i v e l y

Scilab code Exa 8.8 Percentage transmitted energy of X rays 1 2 3 4 5 6 7 8 9

10 11

// S c i l a b Code Ex8 . 8 P e r c e n t a g e t r a n s m i t t e d e n e r g y o f X−r a y s : Page 259 ( 2 0 1 0 ) mu = 139; // A t t e n u a t i o n co− e f f i c i e n t o f aluminium , p e r m e t r e x = 0.005; // T h i c k n e s s o f aluminium s h e e t , m // I f X% i s t h e i n t e n s i t y o f t h e X−r a y t r a n s m i t t e d t h r o u g h t h e aluminium s h e e t t h e n // X% = I / I 0 // o r X/ 1 0 0 = exp (− a b s o r b c o e f f ∗ x ) // S o l v i n g f o r X X = 100* exp ( - mu * x ) ; // T r a n s m i t t e d p e r c e n t a g e o f X−r a y s printf ( ” \ nThe i n t e n s i t y o f t h e X−r a y t r a n s m i t t e d t h r o u g h t h e aluminium s h e e t = %g p e r c e n t ” , round ( X)); // R e s u l t // The i n t e n s i t y o f t h e X−r a y t r a n s m i t t e d t h r o u g h t h e aluminium s h e e t = 50 p e r c e n t

Scilab code Exa 8.9 Thickness of lead piece by using two equal intensity X ray wavelengths // S c i l a b c o d e Ex8 . 9 : D e t e r m i n a t i o n o f t h i c k n e s s o f l e a d p i e c e by u s i n g two e q u a l i n t e n s i t y X−r a y w a v e l e n g t h s : Page 259 ( 2 0 1 0 ) 2 lambda_1 = 0.064 e -010; // F i r s t w a v e l e n g t h o f X− ray , m e t r e 1

89

3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

lambda_2 = 0.098 e -010; // S e c o n d w a v e l e n g t h o f X− ray , m e t r e I1_ratio_I2 = 3; // R a t i o o f a t t e n u a t e d beam intensity mu_m1 = 0.164; // Mass a b s o r p t i o n c o e f f i c i e n t f o r f i r s t w a v e l e n g t h , m e t r e s q u a r e p e r kg mu_m2 = 0.35; // Mass a b s o r p t i o n c o e f f i c i e n t f o r s e c o n d w a v e l e n g t h , m e t r e s q u a r e p e r kg d = 0.164; // D e n s i t y o f t h e l e a d , kg p e r m e t r e cube mu1 = mu_m1 * d ; // a b s o r p t i o n co− e f f i c i e n t o f t h e l e a d f o r f i r s t wavelength , per metre mu2 = mu_m2 * d ; // a b s o r p t i o n co− e f f i c i e n t o f t h e l e a d f o r second wavelength , per metre x = poly (0 , ” x ” ) ; // D e c l a r e ’ x ’ a s t h e t h i c k n e s s variable // Now I = exp (− a c ∗ x ) t h u s // I 1 r a t i o I 2 = exp (− a c 1 ∗ x ) / exp (− a c 2 ∗ x ) // o r 3 = exp ( 2 1 0 9 . 2 4 ) ∗ x t h i s i m p l i e s // 2 1 0 4 . 2 4 ∗ x = l o g ( 3 ) and assume p = 2104.24* x - log (3) ; printf ( ” \ nThe t h i c k n e s s o f l e a d p i e c e = %4 . 2 e m” , roots ( p ) ) ; // R e s u l t // The t h i c k n e s s o f l e a d p i e c e = 5 . 2 2 e −004 m

Scilab code Exa 8.10 Angle of reflection by using wavelength of X rays // S c i l a b c o d e Ex8 . 1 0 : D e t e r m i n i n g a n g l e o f r e f l e c t i o n by u s i n g w a v e l e n g t h o f X−r a y Page 261 (2010) 2 lambda = 0.440 e -010; // Wavelength o f X−r a y s , m 3 d = 2.814 e -010; // I n t e r p l a n a r s p a c i n g o f rocksalt crystal , m 4 // 2∗ d∗ s i n ( t h e t a ) = n∗ lambda ∗∗ Bragg ’ s law , n i s 1

90

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

the order of d i f f r a c t i o n // S o l v i n g f o r t h e t a , we have // t h e t a = a s i n ( n∗ lambda / ( 2 ∗ d ) ) // D e c l a r e a f u n c t i o n f o r c o n v e r t i n g a n g l e i n t o d e g r e e s and m i n u t e s function [d , m ] = degree_minute ( n ) d = int ( n ) ; m = (n - int ( n ) ) *60; endfunction for n = 1:1:5 // For d i f f r a c t i o n o r d e r from 1 t o 5 theta = asind ( n * lambda /(2* d ) ) ; // Bragg ’ s angle [ deg , mint ] = degree_minute ( theta ) ; // C a l l conversion function printf ( ” \ nTheta%d = %2d d e g r e e ( s ) , %2d m i n u t e ( s ) ” , n , deg , mint ) ; end // R e s u l t // Theta1 = 4 d e g r e e ( s ) , 29 m i n u t e ( s ) // Theta2 = 8 d e g r e e ( s ) , 59 m i n u t e ( s ) // Theta3 = 13 d e g r e e ( s ) , 33 m i n u t e ( s ) // Theta4 = 18 d e g r e e ( s ) , 13 m i n u t e ( s ) // Theta5 = 23 d e g r e e ( s ) , 0 m i n u t e ( s )

Scilab code Exa 8.11 Wavelength of diffracted X rays 1 2 3 4 5

// S c i l a b c o d e Ex8 . 1 1 : D e t e r m i n i n g t h e w a v e l e n g t h o f d i f f r a c t e d X−r a y s Page 262 ( 2 0 1 0 ) d = 2.814 e -010; // I n t e r p l a n a r s p a c i n g o f rocksalt crystal , m theta = 9; // Bragg ’ s a n g l e , d e g r e e // 2∗ d∗ s i n ( t h e t a ) = n∗ lambda ∗∗ Bragg ’ s law , n i s the order of d i f f r a c t i o n // S o l v i n g f o r lambda , we have 91

6 7 8 9 10 11 12 13 14 15 16 17 18 19

// lambda = 2∗ d∗ s i n ( t h e t a ) / n ; printf ( ” \ nThe f i r s t f o u r w a v e l e n g t h s o f d i f f r a c t e d beam a r e : ” ) ; for n = 1:1:5 // For d i f f r a c t i o n o r d e r from 1 t o 5 lambda = 2* d * sind ( theta ) / n ; // Wavelength o f X−r a y s , m if lambda >= 0.2 e -010 & lambda <= 1.0 e -010 then printf ( ” \nLambda%d = %6 . 4 e a n g s t r o m ” , n , lambda /1 D -10) ; end end // R e s u l t // The f i r s t f o u r w a v e l e n g t h s o f d i f f r a c t e d beam a r e : // Lambda1 = 8 . 8 0 4 1 e −001 a n g s t r o m // Lambda2 = 4 . 4 0 2 1 e −001 a n g s t r o m // Lambda3 = 2 . 9 3 4 7 e −001 a n g s t r o m // Lambda4 = 2 . 2 0 1 0 e −001 a n g s t r o m

Scilab code Exa 8.12 Reciprocal lattice parameters from 2D direct lattice parameters 1

2 3 4 5 6

// S c i l a b c o d e Ex8 . 1 2 : R e c i p r o c a l l a t t i c e p a r a m e t e r s from 2−D d i r e c t l a t t i c e p a r a m e t e r s Page 277 (2010) a = 3e -010; // F i r s t l a t t i c e p a r a m e t e r o f d i r e c t lattice b = 5e -010; // S e c o n d l a t t i c e p a r a m e t e r o f d i r e c t lattice theta = 60; // A n g l e b e t w e e n two l a t t i c e v e c t o r s of the d i r e c t l a t t i c e // i f a p r i m e and b p r i m e a r e t h e l a t t i c e v e c t o r s f o r the r e c i p r o c a l l a t t i c e , then // a p r i m e ∗ a = 2∗ %pi and a p r i m e ∗b = 0 92

7 8 9 10 11

12 13 14

// S i m i l a r l y , b p r i m e ∗b = 2∗ %pi and b p r i m e ∗ a = 0 // S o l v i n g f o r a p r i m e and b p r i m e , we have a_prime = 2* %pi /( a * cosd (90 - theta ) ) ; // L a t t i c e v e c t o r f o r r e c i p r o c a l l a t t i c e , per metre b_prime = 2* %pi /( b * cosd (90 - theta ) ) ; // L a t t i c e v e c t o r f o r r e c i p r o c a l l a t t i c e , per metre printf ( ” \ nThe r e c i p r o c a l l a t t i c e v e c t o r s a r e : \ n a p r i m e = %5 . 2 f p e r a n g s t r o m and b p r i m e = %5 . 2 f p e r a n g s t r o m ” , a_prime *1 e -010 , b_prime *1 e -010) ; // R e s u l t // The r e c i p r o c a l l a t t i c e v e c t o r s a r e : // a p r i m e = 2 . 4 2 p e r a n g s t r o m and b p r i m e = 1 . 4 5 per angstrom

Scilab code Exa 8.13 Bragg angle and the indices of diffraction of Powder Lines 1 2 3 4 5 6 7 8 9 10 11

// S c i l a b c o d e Ex8 . 1 3 : Bragg a n g l e and t h e i n d i c e s o f d i f f r a c t i o n o f Powder L i n e s Page 285 ( 2 0 1 0 ) n = 1; // C o s i d e r f i r s t o r d e r d i f f r a c t i o n a = 6e -010; // F i r s t l a t t i c e p a r a m e t e r o f d i r e c t lattice , m lambda = 1.54 e -010; // Wavelength u s e d i n d i f f r a c t i o n o f X−r a y s by Powder Method , m // D e c l a r e a f u n c t i o n f o r c o n v e r t i n g a n g l e i n t o d e g r e e s and m i n u t e s function [d , m ] = degree_minute ( n ) d = int ( n ) ; m = (n - int ( n ) ) *60; endfunction // C a l c u l a t e t h e h k l and h e n c e i n t e r p a l n a r s p a c i n g ’ d ’ f o r t h r e e l o w e s t powder l i n e s printf ( ” \ nThe Bragg a n g l e s and t h e i n d i c e s o f d i f f r a c t i o n f o r t h e t h r e e l o w e s t powder l i n e s a r e : ”); 93

12 for h = 0:1:2 13 for k = 0:1:2 14 for l = 0:1:1 15 if ( modulo (h ,2) == 1 & modulo (k ,2) == 1

16 17 18 19 20

21

& modulo (l ,2) == 1) | ( modulo (h ,2) == 0 & modulo (k ,2) == 0 & modulo (l ,2) == 0) then if ( h <> 0) then N = h ^2+ k ^2+ l ^2; d = a / sqrt ( N ) ; // I n t e r p l a n a r spacing , metre theta = asind ( n * lambda /(2* d ) ) ; [ deg , mint ] = degree_minute ( theta ) ; // C a l l c o n v e r s i o n function printf ( ” \ nd [ %d%d%d ] = %4 . 2 e and t h e t a [ %d%d%d ] = %d deg %d min ” , h , k , l , d , h , k , l , deg , mint ) ; end end

22 23 24 end 25 end 26 end 27 // R e s u l t 28 // The Bragg a n g l e s and t h e

indices f o r t h e t h r e e l o w e s t powder l i n e s 29 // d [ 1 1 1 ] = 3 . 4 6 e −010 and t h e t a [ 1 1 1 ] 30 // d [ 2 0 0 ] = 3 . 0 0 e −010 and t h e t a [ 2 0 0 ] 31 // d [ 2 2 0 ] = 2 . 1 2 e −010 and t h e t a [ 2 2 0 ]

of d i f f r a c t i o n are : = 12 deg 50 min = 14 deg 52 min = 21 deg 17 min

Scilab code Exa 8.14 Minimum distance from the centre of the Laue pattern 1

// S c i l a b c o d e Ex8 . 1 4 : Minimum d i s t a n c e from t h e 94

2 3 4 5 6 7 8 9 10 11 12

13 14

c e n t r e o f t h e Laue p a t t e r n o f an f c c c r y s t a l Page 289 ( 2 0 1 0 ) n = 1; // C o n s i d e r t h e f i r s t o r d e r d i f f r a c t i o n a = 4.5 e -010; // L a t t i c e p a r a m e t e r f o r f c c lattice , m V = 50 e +03; // P o t e n t i a l d i f f e r e n c e a c r o s s t h e X− r a y tube , v o l t D = 5; // C r y s t a l t o f i l m d i s t a n c e , cm h = 1 , k = 1 , l = 1; // I n c i d e s f o r t h e p l a n e s o f maximum s p a c i n g lambda_min = 1.24 e -06/ V ; // The cut − o f f w a v e l e n g t h o f X−r a y s , m d_111 = a / sqrt ( h ^1+ k ^2+ l ^2) ; theta_111 = asind ( n * lambda_min /(2* d_111 ) ) ; // As t a n ( 2 ∗ t h e t a 1 1 1 ) = x /D, s o l v i n g f o r x x = D * tand (2* theta_111 ) ; // // Minimum d i s t a n c e from t h e c e n t r e o f Laue p a t t e r n printf ( ” \ nThe minimum d i s t a n c e from t h e c e n t r e o f t h e Laue p a t t e r n a t which r e f l e c t i o n s can o c c u r from t h e p l a n e s o f maximum s p a c i n g = %4 . 2 f cm” , x ); // R e s u l t // The minimum d i s t a n c e from t h e c e n t r e o f t h e Laue p a t t e r n a t which r e f l e c t i o n s can o c c u r from t h e p l a n e s o f maximum s p a c i n g = 0 . 4 8 cm

Scilab code Exa 8.15 Unit cell height along the axis of a rotation photograph // S c i l a b c o d e Ex8 . 1 5 : C a l c u l a t i n g u n i t c e l l h e i g h t a l o n g t h e a x i s o f a r o t a t i o n p h o t o g r a p h Page 291 (2010) 2 n = 1; // C o n s i d e r t h e f i r s t o r d e r d i f f r a c t i o n o f X−r a y s 3 S = [0.29 ,0.59 ,0.91 ,1.25 ,1.65 ,2.12]; // An a r r a y 1

95

4 5 6 7 8 9 10 11 12 13 14 15

o f h e i g h t s o f f i r s t s i x l a y e r s above ( below ) the z e r o l a y e r , cm R = 3; // R a d i u s o f t h e camera , cm lambda = 1.54 e -08; // Wavelength o f t h e X−r a y s , cm // For an a−a x i s r o t a t i o n p h o t o g r a p h , t h e u n i t c e l l p a r a m e t e r i s g i v e n by // a = n∗ lambda / S ( n ) ∗ (Rˆ2 + S ( n ) ˆ 2 ) ˆ ( 1 / 2 ) // C a l c u l a t e ’ a ’ f o r s i x d i f f e r e n t v a l u e s o f n from 1 to 6 for n = 1:1:6 a = ( n * lambda / S ( n ) ) *( R ^2 + S ( n ) ^2) ^(1/2) ; end printf ( ” \ nThe u n i t c e l l h e i g h t o f t h e c r y s t a l = %2 . 0 f a n g s t r o m ” , a /1 D -8) ; // R e s u l t // The u n i t c e l l h e i g h t o f t h e c r y s t a l = 16 a n g s t r o m

Scilab code Exa 8.16 Diffraction of thermal neutrons from planes of Ni crystal 1

2 3 4 5 6 7 8 9

// S c i l a b c o d e Ex8 . 1 6 : D i f f r a c t i o n o f t h e r m a l n e u t r o n s from p l a n e s o f Ni c r y s t a l Page 294 (2010) k = 1.38 e -023; // Boltzmann c o n s t a n t , J / mol /K h = 6.626 e -034; // Planck ’ s c o n s t a n t , J s theta = 28.5; // Bragg ’ s a n g l e , d e g r e e a = 3.52 e -010; // L a t t i c e p a r a m e t e r o f f c c structure of nickel , m m_n = 1.67 e -027; // R e s t mass o f n e u t r o n , kg // For f c c l a t t i c e , t h e i n t e r p l a n a r s p a c i n g i s g i v e n by d = a / sqrt (3) ; // I n t e r p l a n a r s p a c i n g o f Ni , m // Bragg ’ s e q u a t i o n f o r f i r s t o r d e r d i f f r a c t i o n ( n = 96

10 11 12 13 14 15 16 17 18 19

1) i s lambda = 2* d * sind ( theta ) ; // Bragg ’ s law , m // From k i n e t i c i n t e r p r e t a i o n o f t e m p e r a t u r e , we have // ( 1 / 2 ) ∗m∗ v ˆ2 = ( 3 / 2 ) ∗ k ∗T −− ( a ) // F u r t h e r from de−B r o g l i e r e l a t i o n // lambda = h / (m∗ v ) −− ( b ) // From ( a ) and ( b ) , s o l v i n g f o r T , we have T = h ^2/(3* m_n * k * lambda ^2) ; // E f f e c t i v e temperature of the neutrons , K printf ( ” \ nThe e f f e c t i v e t e m p e r a t u r e o f n e u t r o n s = %d K” , T ) ; // R e s u l t // The e f f e c t i v e t e m p e r a t u r e o f n e u t r o n s = 168 K

Scilab code Exa 8.17 Diffraction of electrons from fcc crystal planes 1 2 3 4 5 6 7 8 9 10 11 12 13

// S c i l a b c o d e Ex8 . 1 7 : D i f f r a c t i o n o f e l e c t r o n s from f c c c r y s t a l p l a n e s Page 295 ( 2 0 1 0 ) // D e c l a r e a f u n c t i o n f o r c o n v e r t i n g a n g l e i n t o d e g r e e s and m i n u t e s function [d , m ] = degree_minute ( n ) d = int ( n ) ; m = (n - int ( n ) ) *60; endfunction h = 6.626 e -034; // Planck ’ s c o n s t a n t , J s m = 9.1 e -031; // R e s t mass o f e l e c t r o n , kg e = 1.602 e -019; // c h a r g e on an e l e c t r o n , coulomb a = 3.5 e -010; // L a t t i c e p a r a m e t e r o f f c c c r y s t a l , m V = 80; // A c c e l e r a t i n g p o t e n t i a l f o r e l e c t r o n s , volt lambda = h / sqrt (2* m * e * V ) ; // de−B r o g l i e wavelength of e l e c t r o n s , m d_111 = a / sqrt (3) ; // I n t e r p l a n a r s p a c i n g f o r 97

14 15 16 17 18 19 20

(111) planes of fcc crystal , m // Bragg ’ s e q u a t i o n f o r f i r s t o r d e r d i f f r a c t i o n ( n = 1) i s // Bragg ’ s // lambda = 2∗ d 1 1 1 ∗ s i n d ( t h e t a 1 1 1 ) ; law , m theta_111 = asind ( lambda /(2* d_111 ) ) ; // Bragg ’ s angle , degree [ deg , mint ] = degree_minute ( theta_111 ) ; // C a l l conversion function printf ( ” \ nThe Bragg a n g l e f o r e l e c t r o n d i f f r a c t i o n = %d deg %d min ” , deg , mint ) ; // R e s u l t // The Bragg a n g l e f o r e l e c t r o n d i f f r a c t i o n = 19 deg 50 min

98

Chapter 9 Thermal Properties of Materials

Scilab code Exa 9.1 Exception of Dulong Petit law at room temperature 1 2 3 4 5 6 7 8 9 10 11

// S c i l a b Code Ex9 . 1 E x c e p t i o n o f Dulong−P e t i t law a t room t e m p e r a t u r e : Page − 3 0 3 ( 2 0 1 0 ) h = 6.626 e -034; // Planck ’ s c o n s t a n t , j o u l e second k = 1.38 e -023; // Boltzmann c o n s t a n t , j o u l e / mol / kelvin T = 300; // Room t e m p e r a t u r e , k e l v i n f_Ag = 4.0 e +012; // V i b r a t i o n a l f r e q u e n c y f o r s i l v e r , c y c l e s / second f_Dia = 2.4 e +013; // V i b r a t i o n a l f r e q u e n c y f o r diamond , c y c l e s / s e c o n d E_Ag = h * f_Ag ; // V i b r a t i o n a l Energy f o r s i l v e r , joule E_Dia = h * f_Dia ; // V i b r a t i o n a l Energy f o r diamond , j o u l e E_th = k * T ; // Thermal e n e r g y a t room t e m p e r a t u r e , joule if E_th > E_Ag & E_th < E_Dia then printf ( ” \ n S i n c e E Ag < kT and E Dia > kT , 99

12

t h e r e f o r e , ”); printf ( ” \ n S i l v e r m e t a l o b e y s t h e Dulong P e t i t law a t room t e m p e r a t u r e w h i l e diamond d o e s not . ”);

13 end 14 // R e s u l t 15 // S i n c e E Ag < kT and E Dia > kT , t h e r e f o r e , 16 // S i l v e r m e t a l o b e y s t h e Dulong P e t i t law a t room

t e m p e r a t u r e w h i l e diamond d o e s n o t .

Scilab code Exa 9.2 Specific heat of copper from Debye temperature 1 2 3 4 5 6 7 8 9 10 11 12 13

14

// S c i l a b Code Ex9 . 2 S p e c i f i c h e a t o f c o p p e r from Debye t e m p e r a t u r e : Page − 3 1 1 ( 2 0 1 0 ) h = 6.626 e -034; // Planck ’ s c o n s t a n t , j o u l e second k = 1.38 e -023; // Boltzmann c o n s t a n t , j o u l e / mol / kelvin T = 30; // Given t e m p e r a t u r e , k e l v i n N = 6.023 e +023; // Avogadro ’ s number R = N*k; // U n i v e r s a l g a s c o n s t a n t , j o u l e / k e l v i n v_l = 4.76 e +03; // L o n g i t u d i n a l v e l o c i t y o f l a t t i c e waves , m/ s v_t = 2.32 e +03; // T r a n v e r s e v e l o c i t y o f l a t t i c e waves , rho = 8.9 e +03; // 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 A_Cu = 63.5; // Gram a t o m i c mass o f Cu , g M = A_Cu *1 e -03; // Mass o f 1 mole o f Cu−atoms , kg V = M / rho ; // Volume o f c o p p e r , m e t r e c u b e theta_D = ( h / k ) *((9* N ) /((4* %pi * V ) *((1/ v_l ^3) +(2/ v_t ^3) ) ) ) ^(1/3) ; // Debye t e m p e r a t u r e o f c o p p e r , K C_v = 12/5* %pi ^4* R *( T / theta_D ) ^3; // S p e c i f i c h e a t o f c o p p e r , kJ / kmol / k e l v i n 100

printf ( ” \ nThe s p e c i f i c h e a t o f c o p p e r = %4 . 2 f kJ / kmol / k e l v i n ” , C_v ) ; 16 // R e s u l t 17 // The s p e c i f i c h e a t o f c o p p e r = 1 . 3 3 kJ / kmol / k e l v i n 15

Scilab code Exa 9.3 Vibrational frequency and molar heat capacity of diamond 1 2 3 4 5 6 7 8 9 10 11 12 13 14

// S c i l a b Code Ex9 . 3 V i b r a t i o n a l f r e q u e n c y and m o l a r h e a t c a p a c i t y o f diamond : Page − 3 1 2 ( 2 0 1 0 ) h = 6.626 e -034; // Planck ’ s c o n s t a n t , j o u l e second k = 1.38 e -023; // Boltzmann c o n s t a n t , j o u l e / mol / kelvin T = 10; // Given t e m p e r a t u r e , k e l v i n N = 6.023 e +023; // Avogadro ’ s number R = N*k; // U n i v e r s a l g a s c o n s t a n t , j o u l e / k e l v i n theta_D = 2230; // Debye t e m p e r a t u r e f o r diamond , kelvin f_D = k * theta_D / h ; // Debye f r e q u e n c y o f diamond , hertz C_v = 12/5* %pi ^4* R *1 e +03*( T / theta_D ) ^3; // S p e c i f i c h e a t o f diamond , J / kmol / k e l v i n printf ( ” \ nThe h i g h e s t p o s s i b l e v i b r a t i o n a l f r e q u e n c y o f diamond = %4 . 2 e p e r s e c o n d ” , f_D ) ; printf ( ” \ nThe m o l a r s p e c i f i c h e a t o f diamond = %5 . 3 f J / kmol / k e l v i n ” , C_v ) ; // R e s u l t // The h i g h e s t p o s s i b l e v i b r a t i o n a l f r e q u e n c y o f diamond = 4 . 6 4 e +013 p e r s e c o n d // The m o l a r s p e c i f i c h e a t o f diamond = 0 . 1 7 5 J / kmol / kelvin

101

Scilab code Exa 9.4 Debye temperature of copper at low temperature 1 2 3 4 5 6 7 8 9 10 11 12

// S c i l a b Code Ex9 . 4 Debye t e m p e r a t u r e o f c o p p e r a t low t e m p e r a t u r e : Page − 3 1 2 ( 2 0 1 0 ) k = 1.38 e -023; // Boltzmann c o n s t a n t , j o u l e / mol / kelvin N = 6.023 e +023; // Avogadro ’ s number R = N*k; // U n i v e r s a l g a s c o n s t a n t , j o u l e / k e l v i n C_vl = 4.6 e -02; // L a t t i c e s p e c i f i c h e a t , J / kmol / K // L a t t i c e s p e c i f i c h e a t C v l = Molar l a t t i c e s p e c i f i c heat , C v // o r 1 2 / 5 ∗ %pi ˆ4∗R/ ( 5 ∗ t h e t a D ˆ 3 ) = C v l // s o l v i n g f o r t h e t a D , we have theta_D = (12* %pi ^4* R *1 e +03/(5* C_vl ) ) ^(1/3) ; // Debye t e m p e r a t u r e o f c o p p e r a t low t e m p e r a t u r e , K printf ( ” \ nDebye t e m p e r a t u r e o f c o p p e r a t low t e m p e r a t u r e = %3d K” , theta_D ) ; // R e s u l t // Debye t e m p e r a t u r e o f c o p p e r a t low t e m p e r a t u r e = 348 K

Scilab code Exa 9.5 Debye temperature for gold 1 2 3 4 5 6 7 8

// S c i l a b Code Ex9 . 5 Debye t e m p e r a t u r e f o r g o l d : Page − 3 1 3 ( 2 0 1 0 ) h = 6.626 e -034; // Planck ’ s c o n s t a n t , J s k = 1.38 e -023; // Boltzmann c o n s t a n t , j o u l e / mol / kelvin N = 6.023 e +023; // Avogadro ’ s number R = N*k; // U n i v e r s a l g a s c o n s t a n t , j o u l e / k e l v i n M = 197 e -03; // Gram a t o m i c w e i g h t o f g o l d , g rho = 1.9 e +04; // D e n s i t y o f g o l d , kg p e r m e t r e cube V = M / rho ; // Volume o f g o l d , m e t r e c u b e 102

9 v = 2100;

// V e l o c i t y o f sound i n g o l d medium , m/

s theta_D = h * v / k *(9* N /(12* %pi * V ) ) ^(1/3) ; // Debye temperature f o r gold , K 11 printf ( ” \ nDebye t e m p e r a t u r e o f g o l d = %3d K” , theta_D ) ; 12 // R e s u l t 13 // Debye t e m p e r a t u r e o f g o l d = 242 K 10

Scilab code Exa 9.6 Heat transference into rock salt at low temperature 1 2 3 4 5 6 7 8 9 10 11 12 13 14

// S c i l a b Code Ex9 . 6 Heat t r a n s f e r e n c e i n t o r o c k s a l t a t low t e m p e r a t u r e : Page − 3 1 3 ( 2 0 1 0 ) A = 464; // Atomic s p e c i f i c h e a t o f r o c k s a l t , c a l g / mol / k e l v i n theta_D = 281; // Debye t e m p e r a t u r e o f r o c k s a l t , K delta_T = 10; // R i s e i n t e m p e r a t u r e i n e a c h class interval , K // D e f i n e a f u n c t i o n which r e t u r n s l a t t i c e s p e c i f i c h e a t a t c o n s t a n t volume function [ C_vl ] = lattice_SH ( T ) C_vl = A *( T / theta_D ) ^3; endfunction Q = 0; // I n i t i a l i z e h e a t a c c u m u l a t o r t o z e r o , cal for t = 10:10:40 mean_temp = ( t + ( t + 10) ) /2; // C a l c u l a t e mean t e m p e r a t u r e o f e a c h c l a s s i n t e r v a l , K Q = Q + 2* delta_T * lattice_SH ( mean_temp ) ; // Acuumulate h e a t f o r e a c h s t e p end printf ( ” \ nThe amount o f h e a t r e q u i r e d t o r a i s e t h e t e m p e r a t u r e o f 2 gmol o f Rock s a l t from 10K t o 50 K = %5 . 2 f c a l ” , Q ) ; 103

15 16

// R e s u l t // The amount o f h e a t r e q u i r e d t o r a i s e t h e t e m p e r a t u r e o f 2 gmol o f Rock s a l t from 10K t o 50 K = 63.99 cal

104

Chapter 10 Free Electrons in Crystals

Scilab code Exa 10.1 Particle moving in one dimensional potential well 1 2 3 4 5 6 7 8 9 10 11 12 13 14

// S c i l a b Code Ex10 . 1 P a r t i c l e Moving i n One− D i m e n s i o n a l P o t e n t i a l Well : Page −328 ( 2 0 1 0 ) a = 10^ -3; // S e p a r a t i o n b e t w e e n t h e w a l l s o f t h e well , m m = 10^ -9; // Mass o f t h e d u s t p a r t i c l e , kg t = 100; // A v e r a g e t i m e f o r s u c c e s s i v e c o l l i s o n s with the wall , s h = 6.626*10^ -34; // Plank ’ s c o n s t a n t , J s v = a / t ; // V e l o c i t y o f t h e p a r t i c l e i n s i d e t h e p o t e n t i a l w e l l , m/ s E = 1/2* m * v ^2; // K i n e t i c e n e r g y o f t h e p a r t i c l e , J // For one−d i m e n s i o n a l p o t e n t i a l w e l l , t h e e n e r g y e i g e n v a l u e i s g i v e n by // E = h ˆ2∗ n ˆ 2 / ( 8 ∗m∗ a ˆ 2 ) // S o l v i n g f o r n n = sqrt ((8* m * a ^2* E ) / h ^2) // Quantum number corresponding to the energy eigen value E disp (n , ” The quantum number d e s c r i b e d by t h i s motion i s : ”) // R e s u l t // The quantum number d e s c r i b e d by t h i s m o t i o n i s : 105

15

//

3 . 0 1 8D+16

Scilab code Exa 10.2 Motion of a ground state electron in a 3D potential well 1 2 3 4 5

6 7 8 9 10 11

12 13 14

// S c i l a b Code Ex 1 0 . 2 Motion o f a g r o u n d s t a t e E l e c t r o n i n a 3−D P o t e n t i a l Well : Page −329 ( 2 0 1 0 ) a = 0.5*10^ -10; // l e n g t h o f t h e p o t e n t i a l box , m h = 6.626*10^ -34; // Plank ’ s C o n s t a n t , J s m = 9.1*10^ -31; // Mass o f an E l e c t r o n , kg // I n 3−D, t h e t h r e e quantum numbers nx , ny and nz e a c h w i l l have v a l u e e q u a l t o 1 f o r l o w e s t e n e r g y state nx = 1; // Quantum number c o r r e s p o n d i n g t o x− direction ny = 1; // Quantum number c o r r e s p o n d i n g t o y− direction nz = 1; // Quantum number c o r r e s p o n d i n g t o z− direction EG = h ^2*( nx ^2+ ny ^2+ nz ^2) /(8* m * a ^2) ; // Energy e i g e n v a l u e f o r 3−D p o t e n t i a l , J EeV = EG /1.6 D -19; // C o n v e r t e n e r g y from j o u l e t o eV disp ( EeV , ” The l o w e s t e n e r g y o f an e l e c t r o n c o n f i n e d t o move i n a 3D−p o t e n t i a l box , i n eV , i s : ”) // R e s u l t // The l o w e s t e n e r g y o f an e l e c t r o n c o n f i n e d t o move i n a 3D−p o t e n t i a l box , i n eV , i s : // 4 5 2 . 3 0 6 4 1

Scilab code Exa 10.3 Motion of an electron excited next to the ground state in a 3D potential well 106

1

2 3 4 5 6

7 8 9 10

11 12 13

14 15

16

17 18 19

// S c i l a b Code Ex 1 0 . 3 Motion o f an E l e c t r o n e x c i t e d n e x t t o t h e g r o u n d s t a t e i n a 3−D P o t e n t i a l Well : Page −329 ( 2 0 1 0 ) a = 1D -10; // l e n g t h o f t h e c u b i c p o t e n t i a l box , m h = 6.626*10^ -34; // Plank ’ s C o n s t a n t , J s m = 9.1*10^ -31; // Mass o f an E l e c t r o n , kg k = 1.38 D -23; // Boltzmann C o n s t a n t , J / mol−K // I n 3−D, t h e t h r e e quantum numbers nx , ny and nz w i l l have v a l u e s 1 , 1 and 2 r e s p e c t i v e l y f o r f i r s t excited energy s t a t e nx = 1; // Quantum number c o r r e s p o n d i n g t o x− direction ny = 1; // Quantum number c o r r e s p o n d i n g t o y− direction nz = 2; // Quantum number c o r r e s p o n d i n g t o z− direction EE = h ^2*( nx ^2+ ny ^2+ nz ^2) /(8* m * a ^2) ; // Energy e i g e n v a l u e f o r 3−D p o t e n t i a l f o r f i r s t e x c i t e d s t a t e , J // As EE( n e x t t o t h e l o w e s t ) = 3/2 ( k /T) , where T i s the absolute temperature // S o l v i n g f o r T T = 2/3*1/ k * EE ; // A b s o l u t e t e m p e r a t u r e a t which e n e r g y n e x t t o t h e l o w e s t e n e r g y s t a t e = 3/2 ( k /T ), K EeV = EE /1.6 D -19; // C o n v e r t e n e r g y from j o u l e t o eV disp ( EeV , ” The f i r s t e x c i t e d s t a t e e n e r g y o f t h e e l e c t r o n c o n f i n e d t o move i n a 3D−p o t e n t i a l box , i n eV , i s : ” ) disp (T , ” The t e m p e r a t u r e a t which t h e a v e r a g e e n e r g y becomes e q u a l t o f i r s t e x c i t e d s t a t e e n e r g y , i n K, i s : ” ) // // R e s u l t // The f i r s t e x c i t e d s t a t e e n e r g y o f t h e e l e c t r o n c o n f i n e d t o move i n a 3D−p o t e n t i a l box , i n eV , i s : 107

// 226.15321 // The t e m p e r a t u r e a t which t h e a v e r a g e e n e r g y becomes e q u a l t o f i r s t e x c i t e d s t a t e e n e r g y , i n K , is : 22 // 1748044.1 20 21

Scilab code Exa 10.4 Degeneracy of energy level 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

// S c i l a b Code Ex 1 0 . 4 D e g e n e r a c y o f Energy L e v e l : Page −332 ( 2 0 1 0 ) // F u n c t i o n t o f i n d t h e f a c t o r i a l o f a number function [ f ] = fact ( num ) f = 1; for i = 1:1: num f = f*i; end endfunction // F u c n t i o n t o d e t e r m i n e d e g e n e r a t e e n e r g y s t a t e s function [ degstates ] = degno (a , b , c ) // degno t a k e s t h r e e arguments if a == b & b == c then // c h e c k i f a l l t h e v a l u e s a r e same degeneracy = 3; degstates = fact (3) / fact ( degeneracy ) ; // calculate degenerate states end if a == b | b == c | c == a then // c h e c k i f any two v a l u e s a r e e q u a l degeneracy = 2; degstates = fact (3) / fact ( degeneracy ) ; // calculate degenerate states end if a ~= b & b ~= c then // c h e c k i f a l l t h e values are d i f f e r e n t 108

21 22

degeneracy = 1; degstates = fact (3) / fact ( degeneracy ) ; // calculate degenerate states

23 end 24 endfunction 25 // 26 clc 27 coef = 38; // C o e f f i c i e n t o f Hˆ 2 / ( 8 ∗m∗ a ˆ 2 ) 28 nx = zeros (1 ,5) ; // Quantum number c o r r e s p o n d i n g 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

44

t o x− d i r e c t i o n ny = zeros (1 , 5) ; // Quantum number c o r r e s p o n d i n g t o y− d i r e c t i o n nz = zeros (1 ,5) ; // Quantum number c o r r e s p o n d i n g t o z− d i r e c t i o n deg = zeros (1 ,5) ; // V a r i a b l e t o s t o r e t h e degeneracy of s t a t e s count = 1; // s e t t h e c o u n t e r sum = 0; // i n i t i a l i z e t h e sum // Look f o r a l l t h e p o s s i b l e s e t o f v a l u e s f o r nx , ny and ny for i = 1:1:10 for j = 1:1:10 for k = 1:1:10 // Check f o r t h e c o n d i t i o n and a v o i d repetition of set of values if (( i ^2+ j ^2+ k ^2== coef ) & ( i + j + k ) > sum ) then nx (1 , count ) = i ; // Save c u r r e n t i value ny (1 , count ) = j ; // Save c u r r e n t j value nz (1 , count ) = k ; // Save c u r r e n t k value deg (1 , count ) = degno (i , j , k ) ; // Save d e g e n e r a c y f o r g i v e n s e t o f values count = count + 1; // I n c r e m e n t t h e counter 109

45

sum = i + j + k ; // Add t h e t h r e e v a l u e s o f quantum numbers

46 end 47 end 48 end 49 end 50 printf ( ” \ nThe %d s e t ( s ) o f 51 52 53 54 55 56 57 58 59 60 61

v a l u e s o f quantum number a r e : \n ” , count -1) ; deg_states = 0; // I n t i a l i z e t h e v a r i a b l e for i = 1:1: count -1 printf ( ” \ nnx = %d , ny = %d , nz = %d\n ” , nx (1 , i ) , ny (1 , i ) , nz (1 , i ) ) ; deg_states = deg_states + deg (1 , i ) ; // Accumulate t h e d e g e n e r a c y end printf ( ” \ nThe g i v e n e n e r g y l e v e l i s %d−f o l d d e g e n e r a t e . ” , deg_states ) ; // R e s u l t // The 2 s e t ( s ) o f v a l u e s o f quantum number a r e : // nx = 1 , ny = 1 , nz = 6 // nx = 2 , ny = 3 , nz = 5 // The e n e r g y l e v e l i s 9− f o l d d e g e n e r a t e

Scilab code Exa 10.5 Fermi energy of zinc at absolute zero 1 2 3 4 5 6 7 8

// S c i l a b Code Ex 1 0 . 5 Fermi e n e r g y o f z i n c a t a b s o l u t e z e r o : Page −335 ( 2 0 1 0 ) d = 7.13 D +3; // D e n s i t y o f Zn , i n kg p e r m c u b e M = 65.4 D -3; // Atomic w e i g h t o f Zn , kg / mol me = 9.1 D -31; // Mass o f an e l e c t r o n , kg meff = 0.85* me ; // E f f e c t i v e mass o f t h e e l e c t r o n i n z i n c , kg v = 2; // v a l e n c y o f d i v a l e n t ( Zn ) m e t a l N = 6.023 D +23; // Avogadro ’ s Number h = 6.626 D -34; // Plank ’ s c o n s t a n t , i n J s 110

9 n = v*d*N/M;

// Number o f e l e c t r o n s p e r u n i t

volume 10 Ef = h ^2/(2* meff ) *(3* n /(8* %pi ) ) ^(2/3) ; 11 12 13 14 15 16 17 18 19

// Fermi

energy in zinc at absolute zero , J EfeV = Ef /1.6 D -19; // Fermi e n e r g y i n eV Ebar = (3/5) * EfeV ; // A v e r a g e e n e r g y o f an e l e c t r o n a t 0K, eV disp ( EfeV , ” The f e r m i e n e r g y i n z i n c a t a b s o l u t e z e r o , i n eV , i s : ” ) ; disp ( Ebar , ” The a v e r a g e e n e r g y o f an e l e c t r o n a t 0K, i n eV , i s : ” ) ; // R e s u l t // The f e r m i e n e r g y i n z i n c a t a b s o l u t e z e r o , i n eV , is : // 1 1 . 1 1 0 0 6 5 // The a v e r a g e e n e r g y o f an e l e c t r o n a t 0K, i n eV , i s : // 6 . 6 6 6 0 3 8 9

Scilab code Exa 10.6 Electron probability above Fermi energy 1 2 3 4 5 6 7 8 9

// S c i l a b Code Ex 1 0 . 6 E l e c t r o n p r o b a b i l i t y a b o v e Fermi e n e r g y : Page −336 ( 2 0 1 0 ) k = 1.38 D -23; // Boltzmann c o n s t a n t , i n J / mol−K FD = 0.10; // Fermi−D i r a c d i s t r i b u t i o n probability for electrons Efermi = 5.5; // Fermi Energy o f s i l v e r , i n eV E = Efermi + 0.01* Efermi ; // A l l o w e d e n e r g y f o r electrons dE = E - Efermi ; // D e v i a t i o n o f a l l o w e d e n e r g y from Fermi e n e r g y , i n eV DEeV = dE *1.6 D -19; // C o n v e r t i n t o j o u l e // The Fermi−D i r a c d i s t r i b u t i o n f u n c t i o n a s a t any t e m p e r a t u r e T i s g i v e n by // F (E) = FD = 1 / ( exp ( ( E−E f e r m i ) /kT ) +1 111

10 // S o l v i n g f o r T 11 T = DEeV /( k * log (1/ FD -1) ) ; // A b s o l u t e t e m p e r a t u r e a t 12 13 14 15 16

which r e s u l t f o l l o w s , i n K disp ( DEeV , dE , E ) ; disp (T , ” The t e m p e r a t u r e a t which t h e g i v e n p r o b a b i l i t y i s e x p e c t e d , i n K, i s : ” ) ; // R e s u l t // The t e m p e r a t u r e a t which t h e g i v e n p r o b a b i l i t y i s e x p e c t e d , i n K, i s : // 2 9 0 . 2 2 1 2

Scilab code Exa 10.7 The electroic specific heat of Cu 1 2 3 4 5 6 7 8 9 10 11 12 13 14

// S c i l a b Code Ex 1 0 . 7 The E l e c t r o i c S p e c i f i c Heat o f Cu : Page −341 ( 2 0 1 0 ) k = 1.38 D -23; // Boltzmann c o n s t a n t , i n J / mol−K N = 6.023 D +23; // Avogadro ’ s Number Efermi = 7.05; // Fermi e n e r g y o f c o p p e r , i n eV EFeV = Efermi *1.6 D -19; // Fermi e n e r g y c o n v e r s i o n , in J T1 = 4; // Lower v a l u e o f t e m p e r a t u r e , i n K T2 = 300; // Upper v a l u e o f t e m p e r a t u r e , i n K Ce4 = ( %pi ^2* k ^2* T1 ) /(2* EFeV ) * N ; // E l e c t r o n i c s p e c i f i c h e a t a t 4K, J / mol /K Ce100 = ( %pi ^2* k ^2* T2 ) /(2* EFeV ) * N ; // E l e c t r o n i c s p e c i f i c h e a t a t 100K, J / mol /K disp ( Ce4 , ” The E l e c t r o n i c s p e c i f i c h e a t a t 4K, i n J / mol /K i s : ” ) ; disp ( Ce100 , ” The E l e c t r o n i c s p e c i f i c h e a t a t 100K, i n J / mol /K i s : ” ) ; // R e s u l t // The E l e c t r o n i c s p e c i f i c h e a t a t 4K, i n J / mol /K i s : // 0 . 0 0 2 0 0 7 2 112

// The E l e c t r o n i c s p e c i f i c h e a t a t 100K, i n J / mol /K is : 16 // 0 . 1 5 0 5 4 0 4 15

Scilab code Exa 10.8 Electrical resitivity of sodium metal 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

// S c i l a b Code Ex 1 0 . 1 0 E l e c t r o n m o b i l i t y i n s i d e c o n d u c t o r s : Page −346 ( 2 0 1 0 ) e = 1.6 D -19; // E l e c t r o n i c c h a r g e , i n C m = 9.1 D -31; // E e l c t r o n i c mass , i n kg res = 1.54 D -8; // E l e c t r i c a l r e s i s t i v i t y o f s i l v e r , i n ohm m e t r e E = 100; // E l e c t r i c f i e l d a p p l i e d a l o n g t h e l e n g t h o f t h e w i r e , V/m n = 5.8 D +28; // Number o f c o n d u c t i o n e l e c t r o n s p e r u n i t volume , p e r m e t r e c u b e mu = 1/( res * n * e ) ; // M o b i l i t y o f e l e c t r o n t h r o u g h s i l v e r , m e t r e s q u a r e p e r v o l t −s e c vd = mu * E ; // A v e r a g e d r i f t v e l o c i t y o f e l e c t r o n s , m/ s t = mu * m / e ; // R e l a x a t i o n t i m e o f t h e e l e c t r o n , s disp ( mu , ” The m o b i l i t y o f e l e c t r o n t h r o u g h s i l v e r , i n m e t r e s q u a r e p e r V−s , i s : ” ) ; disp ( vd , ” The a v e r a g e d r i f t v e l o c i t y o f e l e c t r o n s , i n m/ s , i s : ” ) ; disp (t , ” c ” ) ; // R e s u l t // The m o b i l i t y o f e l e c t r o n t h r o u g h s i l v e r , i n m e t r e s q u a r e p e r V−s , i s : // 0.0069973 // The a v e r a g e d r i f t v e l o c i t y o f e l e c t r o n s , i n m/ s , is : // 0.6997313 // The a v e r a g e d r i f t v e l o c i t y o f e l e c t r o n s , i n m/ s , 113

is : 19

//

3 . 9 8 0D−14

Scilab code Exa 10.9 Electrical conductivity of Cu 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

// S c i l a b Code Ex 1 0 . 9 E l e c t r i c a l C o n d u c t i v i t y o f Cu : Page −345 ( 2 0 1 0 ) e = 1.6 D -19; // E l e c t r o n i c c h a r g e , C N = 6.023 D +23; // Avogardro ’ s number d = 8920; // D e n s i t y o f Copper , kg p e r m e t r e cube A = 63.5; // Atomic w e i g h t o f c o p p e r , g / mole I = 10; // C u r r e n t t h r o u g h u n i f o r m c o p p e r wir , A D = 16 D -4; // D i a m e t e r o f c i r c u l a r c r o s s − s e c t i o n o f copper wire , m R = D /2; // R a d i u s o f c i r c u l a r c r o s s − s e c t i o n o f copper wire , m n = d * N /63.5*1 D +3; // The number o f e l e c t r o n s p e r u n i t volume i n c o p p e r , p e r m e t r e c u b e J = I /( %pi * R ^2) ; // C u r r e n t d e n s i t y o f e l e c t r o n s i n c o p p e r , ampere p e r m e t r e s q u a r e vd = J /( n * e ) ; // D r i f t v e l o c i t y o f e l e c t r o n s i n copper , metre per second disp (J , ” The c u r r e n t d e n s i t y o f e l e c t r o n s i n c o p p e r , i n ampere p e r m e t r e s q u a r e , i s : ” ) ; disp ( vd , ” The d r i f t v e l o c i t y o f e l e c t r o n s i n c o p p e r , i n metre per second , i s : ”); // R e s u l t // The c u r r e n t d e n s i t y o f e l e c t r o n s i n c o p p e r , i n ampere p e r m e t r e s q u a r e , i s : // 4973592 // The d r i f t v e l o c i t y o f e l e c t r o n s i n c o p p e r , i n metre per second , i s : // 0.0003674 114

Scilab code Exa 10.10 Electron mobility inside conductors 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

// S c i l a b Code Ex 1 0 . 1 0 E l e c t r o n m o b i l i t y i n s i d e c o n d u c t o r s : Page −346 ( 2 0 1 0 ) e = 1.6 D -19; // E l e c t r o n i c c h a r g e , i n C m = 9.1 D -31; // E e l c t r o n i c mass , i n kg res = 1.54 D -8; // E l e c t r i c a l r e s i s t i v i t y o f s i l v e r , i n ohm m e t r e E = 100; // E l e c t r i c f i e l d a p p l i e d a l o n g t h e l e n g t h o f t h e w i r e , V/m n = 5.8 D +28; // Number o f c o n d u c t i o n e l e c t r o n s p e r u n i t volume , p e r m e t r e c u b e mu = 1/( res * n * e ) ; // M o b i l i t y o f e l e c t r o n t h r o u g h s i l v e r , m e t r e s q u a r e p e r v o l t −s e c vd = mu * E ; // A v e r a g e d r i f t v e l o c i t y o f e l e c t r o n s , m/ s t = mu * m / e ; // R e l a x a t i o n t i m e o f t h e e l e c t r o n , s disp ( mu , ” The m o b i l i t y o f e l e c t r o n t h r o u g h s i l v e r , i n m e t r e s q u a r e p e r V−s , i s : ” ) ; disp ( vd , ” The a v e r a g e d r i f t v e l o c i t y o f e l e c t r o n s , i n m/ s , i s : ” ) ; disp (t , ” c ” ) ; // R e s u l t // The m o b i l i t y o f e l e c t r o n t h r o u g h s i l v e r , i n m e t r e s q u a r e p e r V−s , i s : // 0.0069973 // The a v e r a g e d r i f t v e l o c i t y o f e l e c t r o n s , i n m/ s , is : // 0.6997313 // The a v e r a g e d r i f t v e l o c i t y o f e l e c t r o n s , i n m/ s , is : // 3 . 9 8 0D−14

115

Scilab code Exa 10.11 Lorentz number calculation of a solid 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

20

// S c i l a b Code Ex 1 0 . 1 1 L o r e n t z number c a l c u l a t i o n o f a s o l i d : Page −347 ( 2 0 1 0 e = 1.6 D -19; // E l e c t r o n i c c h a r g e , i n C k = 1.38 D -23; // b o l t z m a n n c o n s t a n t , J / mol−K T = 293; // A b s o l u t e t e m p e r a t u r e o f t h e solid K = 390; // Thermal c o n d u c t i v i t y o f c o p p e r a t 293 K, W/m−K l = 0.5; // Lenght o f t h e c o p p e r w i r e , m d = 0.3 D -3; // D i a m e t e r o f c r o s s −s e c t i o n o f Cu , m r = d /2; // R a d i u s o f c o p p e r w i r e , m R = 0.12; // R e s i s t a n c e o f c o p p e r w i r e , ohm // As R = 1/ con ∗ l / ( %pi ∗ r ˆ 2 ) // S o l v i n g f o r R con = l /( %pi * r ^2* R ) ; // C o n d u c t a n c e o f c o p p e r , p e r ohm p e r m e t r e // The L o r e n t z number i s d e f i n e d a s t h e r a t i o o f t h e Thermal c o n d u c t i v i t y t o t h e // E l e c t r i c a l c o n d u c t i v i t y o f a s o l i d p e r d e g r e e r i s e in temperature Lexp = K /( con * T ) ; // E x p e r i m e n t a l v a l u e o f L o r e n t z number , w a t t ohm p e r k e l v i n s q u a r e Lth = %pi ^2/3*( k / e ) ^2; // T h o e r e t i c a l v a l u e o f L o r e n t z number v a l u e , w a t t ohm p e r k e l v i n s q u a r e disp ( Lexp , ” The e x p e r i m e t a l v a l u e o f L o r e n t z number , i n w a t t ohm p e r k e l v i n s q u a r e , i s : ” ) ; disp ( Lth , ” The t h e o r e t i c a l v a l u e o f L o r e n t z number , i n w a t t ohm p e r k e l v i n s q u a r e , i s : ” ) ; printf ( ” \ nThe t h e o r e t i c a l v a l u e o f L o r e n t z number i s %f t i m e s h i g h e r t h a n t h e e x p e r i m e n t a l one . \ n ” , Lth / Lexp ) ; // R e s u l t 116

21 22 23 24 25 26

// The e x p e r i m e t a l v a l u e o f L o r e n t z number , i n w a t t ohm p e r k e l v i n s q u a r e , i s : // 2 . 2 5 8D−08 // The t h e o r e t i c a l v a l u e o f L o r e n t z number , i n w a t t ohm p e r k e l v i n s q u a r e , i s : // 2 . 4 4 7D−08 // The t h e o r e t i c a l v a l u e o f L o r e n t z number i s times h i g h e r t h a n t h e e x p e r i m e n t a l one . // 1.083817

Scilab code Exa 10.12 Increase in electrical resistivity of a metal with temperature 1

2 3 4 5 6 7 8 9 10 11 12 13

// S c i l a b Code Ex 1 0 . 1 2 I n c r e a s e i n e l e c t r i c a l r e s i s t i v i t y o f a m e t a l w i t h t e m p e r a t u r e : Page −349 (2010) function [ res ] = final_res ( T ) alpha = 0.0001; // T e m p e r a t u r e co− e f f i c i e n t of resistance resi = 0; // I n i t i a l r e s i s t i v i t y o f t h e n i c h r o m e which i s an a r b i t r a y // c o n s t a n t and can be t a k e n t o be z e r o res = resi + alpha * T ; // F i n a l r e s i s t i v i t y o f t h e nichrome as f u n c t i o n o f T endfunction T1 = 300; // I n i t i a l t e m p e r a t u r e o f n i c h r o m e , K T2 = 1000; // F i n a l t e m p e r a t u r e o f n i c h r o m e , K res300 = final_res ( T1 ) ; // F i n a l r e s i s t i v i t y o f t h e n i c h r o m e a t 300 K res1000 = final_res ( T2 ) ; // F i n a l r e s i s t i v i t y o f t h e nichrome at 1000 K percent_res = ( res1000 - res300 ) *100; // Percentage increase in r e s i s t i v i t y printf ( ” \ nThe p e r c e n t a g e i n c r e a s e i n t h e r e s i s t i v i t y o f n i c h r o m e i s %d p e r c e n t ” , percent_res ) ; 117

14 15

// R e s u l t // The p e r c e n t a g e i n c r e a s e i n t h e r e s i s t i v i t y o f nichrome i s 7 percent

Scilab code Exa 10.13 Thermionic emission of a filament 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

// S c i l a b Code Ex 1 0 . 1 3 T h e r m i o n i c e m i s s i o n o f a f i l a m e n t : Page −352 ( 2 0 1 0 ) e = 1.6 D -19; // E l e c t r o n i c c h a r g e , C m = 9.1 D -31; // Mass o f t h e e l e c t r o n , kg k = 1.38 D -23; // Boltzmann c o n s t a n t , J / mol−K h = 6.626 D -34; // Plank ’ s c o n s t a n t , J s W = 4.5; // Work f u n c t i o n o f t u n g s t e n f i l a m e n t , eV D = 1D -4; // D i a m e t e r o f t h e f i l a m e n t , m r = D /2; // R a d i u s o f t h e f i l a m e n t , m T = 2400; // T e m p e r a t u r e o f t h e f i l a m e n t , K l = 0.05; // Length o f t h e f i l a m e n t , m A = 4* %pi * e * m * k ^2/ h ^3; // A c o n s t a n t e x p r e s s e d i n ampere p e r m e t r e s q u a r e // p e r k e l v i n s q u a r e a = 2* %pi * r * l ; // S u r f a c e a r e a o f t h e f i l a m e n t , meter square J = A * T ^2* exp ( - e * W /( k * T ) ) ; // E l e c t r o n i c c u r r e n t density of the filament , // ampere p e r m e t r e square I = a*J; // E l e c t r i c c u r r e n t due t o t h e r m i o n i c e m i s s i o n , ampere disp (I , ” The e l e c t r i c c u r r e n t due t o t h e r m i o n i c e m i s s i o n , i n A, i s : ” ) ; // R e s u l t // The e l e c t r i c c u r r e n t due t o t h e r m i o n i c e m i s s i o n , i n A, i s : // 0.0392404 118

Scilab code Exa 10.14 Hall coefficient of sodium based on free electron model 1

2 3 4 5 6 7 8 9 10

// S c i l a b Code Ex 1 0 . 1 4 H a l l c o e f f i c i e n t c a l c u l a t i o n o f sodium b a s e d on f r e e e l e c t r o n model : Page −353 (2010) e = 1.6 D -19; // E l e c t r o n i c c h a r g e , C a = 4.28 D -10; // l a t t i c e p a r a m e t e r ( s i d e ) o f t h e u n i t c e l l o f sodium c r y s t a l , m N = 2; // Number o f atoms p e r u n i t c e l l i n b c c s t r u c t u r e o f sodium n = N / a ^3; // Number o f e l e c t r o n s p e r u n i t volume f o r t h e sodium c r y s t a l , p e r m e t r e c u b e RH = -1/( n * e ) ; // H a l l c o e f f i c i e n t o f sodium , m e t r e c u b e p e r coulomb disp ( RH , ” The H a l l c o e f f i c i e n t o f sodium , i n m e t r e c u b e p e r coulomb , i s : ” ) ; // R e s u l t // The H a l l c o e f f i c i e n t o f sodium , i n m e t r e c u b e p e r coulomb , i s : // −2.450D−10

119

Chapter 11 Band Theory

Scilab code Exa 11.2 Ratio between kinetic energy of an electron in 2D square lattice 1

2 3 4 5 6 7 8 9 10 11 12

// S c i l a b Code Ex11 . 2 D e t e r m i n i n g r a t i o b e t w e e n K . E . o f an e l e c t r o n i n 2D s q u a r e l a t t i c e : Page −370 (2010) h = 6.626 e -034; // Planck ’ s c o n s t a n t , J s m = 9.1 e -031; // Mass o f an e l e c t r o n , kg a = 1; // For s i m p l i c i t y a s s u m i n g l a t t i c e p a r a m e t e r t o be u n i t y , m // Case−I when k x = k y = %pi / a k_x = %pi /a , k_y = %pi / a ; // Wave numbers i n X− and Y− d i r e c t i o n s , r a d p e r m e t r e E1 = h ^2/(8* %pi ^2* m ) *( k_x ^2 + k_y ^2) ; // Energy o f t h e e l e c t r o n i n s i d e a B r i l l i o u i n Zone , J // Case−I I when k x = %pi / a and k y = 0 k_x = %pi /a , k_y = 0; // Wave numbers i n X− and Y − d i r e c t i o n s , rad per metre E2 = h ^2/(8* %pi ^2* m ) *( k_x ^2 + k_y ^2) ; // Energy o f t h e e l e c t r o n i n s i d e a B r i l l i o u i n Zone , J E_ratio = E1 / E2 ; // R a t i o b e t w e e n K . E . o f an e l e c t r o n i n 2D s q u a r e l a t t i c e printf ( ” \ nThe r a t i o b e t w e e n K . E . o f an e l e c t r o n i n 2 120

D s q u a r e l a t t i c e = %1d” , E_ratio ) ; 13 // R e s u l t 14 // The r a t i o b e t w e e n K . E . o f an e l e c t r o n i n 2D square l a t t i c e = 2

121

Chapter 13 Semiconducting Properties of Materials

Scilab code Exa 13.3 Intrinsic concentration of charge carriers in semiconductors 1

2 3 4 5 6 7 8 9 10

11 12 13

// S c i l a b Code Ex13 . 3 I n t r i n s i c c o n c e n t r a t i o n o f c h a r g e c a r r i e r s i n s e m i c o n d u c t o r s : Page −432 (2010) k = 1.38 e -023; // Boltzmann c o n s t a n t , J / mol /K h = 6.626 e -034; // Planck ’ s c o n s t a n t , J s eV = 1.6 e -019; // J o u l e e q u i v a l e n t o f 1 eV T = 300; // Room t e m p e r a t u r e , k e l v i n m_0 = 9.1 e -031; // R e s t mass o f an e l e c t r o n , kg m_e = 0.12* m_0 ; // E f f e c t i v e mass o f e l e c t r o n , kg m_h = 0.28* m_0 ; // E f f e c t i v e mass o f e l e c t r o n , kg E_g = 0.67; // Energy gap o f Ge , eV n_i = 2*(2* %pi * k * T / h ^2) ^(3/2) *( m_e * m_h ) ^(3/4) * exp ( E_g * eV /(2* k * T ) ) ; // 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 o f Ge , p e r m e t r e c u b e printf ( ” \ nThe 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 o f Ge = %3 . 1 e p e r m e t r e c u b e ” , n_i ) ; // R e s u l t // The 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 o f Ge = 4 . 7 e 122

+018 p e r m e t r e c u b e

Scilab code Exa 13.4 Comparison of intrinsic carrier densities of two semiconductors 1

2 3 4 5 6 7 8 9 10 11 12 13 14 15

// S c i l a b Code Ex13 . 4 Comparison o f i n t r i n s i c c a r r i e r d e n s i t i e s o f two s e m i c o n d u c t o r s a t room t e m p e r a t u r e Page −433 ( 2 0 1 0 ) eV = 1.6 e -019; // J o u l e e q u i v a l e n t o f 1 eV m = 9.1 e -031; // R e s t mass o f an e l e c t r o n , kg m_e = m ; // E f f e c t i v e mass o f e l e c t r o n , kg m_h = m ; // E f f e c t i v e mass o f e l e c t r o n , kg Eg_A = 0.36; // Energy gap o f A, eV Eg_B = 0.72; // Energy gap o f B , eV k = 1.38 e -023; // Boltzmann c o n s t a n t , J / mol /K h = 6.626 e -034; // Planck ’ s c o n s t a n t , J s k_T = 0.052/2; // Thermal e n e r g y , eV // As n i r a t i o = n i A / n i B = exp (−Eg A / ( 2 ∗ k T ) ) / exp (−Eg A / ( 2 ∗ k T ) ) n_i_ratio = exp ( - Eg_A /(2* k_T ) ) / exp ( - Eg_B /(2* k_T ) ) ; // I n t r i n s i c c a r r i e r d e n s i t y r a t i o o f A and B printf ( ” \ nThe r a t i o o f i n t r i n s i c c a r r i e r d e n s i t y = %4d ” , n_i_ratio ) ; // R e s u l t // The r a t i o o f i n t r i n s i c c a r r i e r d e n s i t y = 1 0 1 5

Scilab code Exa 13.5 Shift in fermi level with change in concentration of impurities // S c i l a b Code Ex13 . 5 S h i f t i n p o s i t i o n o f f e r m i l e v e l with change in c o n c e n t r a t i o n o f i m p u r i t i e s : Page −436 ( 2 0 1 0 ) 2 k_T = 0.03; // Thermal e n e r g y , eV 1

123

3 4 5 6 7 8 9

10

11 12

dE_Fv = 0.4; // Energy d i f f e r e n c e b e t w e e n f e r m i l e v e l and t o p m o s t v a l e n c e l e v e l , eV // The h o l e c o n c e n t r a t i o n i n P−t y p e m a t e r i a l i s // p = N A = N v ∗ exp (−EF−Ev ) / ( k T ) = N v ∗ exp (−dE Fv ) /( k T ) // The new v a l u e o f h o l e c o n c e n t r a t i o n i n P−t y p e material is // p p r i m e = 3∗N A = N v ∗ exp (− EF prime−Ev ) / ( k T )= = N v ∗ exp (− d E F p r i m e v ) / ( k T ) // S o l v i n g f o r d E F p r i m e v by r e m o v i n g e x p o n e t i a l term dE_F_primev = dE_Fv - k_T * log (3) ; // Energy d i f f e r e n c e b e t w e e n new f e r m i l e v e l and t o p m o s t v a l e n c e l e v e l , eV printf ( ” \ nThe e n e r g y d i f f e r e n c e b e t w e e n new f e r m i l e v e l and t o p m o s t v a l e n c e l e v e l = %5 . 3 f eV” , dE_F_primev ) ; // R e s u l t // The e n e r g y d i f f e r e n c e b e t w e e n new f e r m i l e v e l and t o p m o s t v a l e n c e l e v e l = 0 . 3 6 7 eV

Scilab code Exa 13.6 Electrical resistivity of Ge 1 2 3 4 5 6 7

// S c i l a b Code Ex13 . 6 E l e c t r i c a l r e s i s t i v i t y o f Ge : Page −439 ( 2 0 1 0 ) e = 1.602 e -019; // Charge on an e l c t r o n , C n_i = 2.37 e +019; // I n t r i n s i c c a r r i e r d e n s i t y o f Ge a t room t e m p e r a t u r e , p e r m e t r e c u b e mu_e = 0.38; // M o b i l i t y o f e l e c t r o n s , m e t r e square per v o l t per second mu_h = 0.18; // M o b i l i t y o f h o l e s , m e t r e s q u a r e per v o l t per second T = 300; // Room t e m p e r a t u r e , k e l v i n sigma_i = n_i * e *( mu_e + mu_h ) ; // I n t r i n s i c e l e c t r i c a l c o n d u c t i v i t y , p e r ohm p e r m e t r e 124

rho_i = 1/ sigma_i ; // I n t r i n s i c e l e c t r i c a l r e s i s t i v i t y , ohm−m e t r e 9 printf ( ” \ nThe i n t r i n s i c e l e c t r i c a l r e s i s t i v i t y = %4 . 2 f ohm−m e t r e ” , rho_i ) ; 10 // R e s u l t 11 // The i n t r i n s i c e l e c t r i c a l r e s i s t i v i t y = 0 . 4 7 ohm− metre 8

Scilab code Exa 13.7 Electrical conductivity of intrinsic and extrinsic Si 1 2 3 4 5 6 7 8 9 10 11 12 13 14

// S c i l a b Code Ex13 . 7 E l e c t r i c a l c o n d u c t i v i t y o f i n t r i n s i c and e x t r i n s i c S i : Page −439 ( 2 0 1 0 ) NA = 6.023 e +23; // Avogadro ’ s number A_Si = 28.09 e -03; // K i l o g r a m a t o m i c mass o f S i , kg e = 1.602 e -019; // Charge on an e l c t r o n , C n_impurity = 1/1 e +08; // Donor i m p u r i t y atoms p e r S i atom n_i = 1.5 e +016; // I n t r i n s i c c a r r i e r d e n s i t y o f S i a t room t e m p e r a t u r e , p e r m e t r e c u b e mu_e = 0.13; // M o b i l i t y o f e l e c t r o n s , m e t r e square per v o l t per second mu_h = 0.05; // M o b i l i t y o f h o l e s , m e t r e s q u a r e per v o l t per second T = 300; // Room t e m p e r a t u r e , k e l v i n sigma_i = n_i * e *( mu_e + mu_h ) ; // I n t r i n s i c e l e c t r i c a l c o n d u c t i v i t y , p e r ohm p e r m e t r e Si_density = 2.23 e +03; // D e n s i t y o f s i l i c o n , kg per metre cube N_Si = NA * Si_density / A_Si ; // Number o f S i atoms , p e r m e t r e c u b e N_D = N_Si * n_impurity ; // D e n s i t y o f d o n o r impurity , per metre cube ; sigma_ext = ceil ( N_D ) * e * mu_e ; // E x t r i n s i c e l e c t r i c a l c o n d u c t i v i t y o f S i , p e r ohm p e r m e t r e 125

15 16 17 18 19

printf ( ” \ nThe i n t r i n s i c e l e c t r i c a l c o n d u c t i v i t y o f S i = %5 . 3 e p e r ohm p e r m e t r e ” , sigma_i ) ; printf ( ” \ nThe e x t r i n s i c e l e c t r i c a l c o n d u c t i v i t y o f S i = %4 . 1 f p e r ohm p e r m e t r e ” , sigma_ext ) ; // R e s u l t // The i n t r i n s i c e l e c t r i c a l c o n d u c t i v i t y o f S i = 4 . 3 2 5 e −004 p e r ohm p e r m e t r e // The e x t r i n s i c e l e c t r i c a l c o n d u c t i v i t y o f S i = 1 0 . 0 p e r ohm p e r m e t r e

Scilab code Exa 13.8 Resistance of intrinsic Ge Rod 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

// S c i l a b Code Ex13 . 8 R e s i s t a n c e o f i n t r i n s i c Ge Rod : Page −440 ( 2 0 1 0 ) e = 1.602 e -019; // Charge on an e l c t r o n , C T = 300; // Room t e m p e r a t u r e , k e l v i n l = 1e -02; // Length o f t h e Ge rod , m b = 1e -03; // Width o f t h e Ge rod , m t = 1e -03; // T h i c k n e s s o f t h e Ge rod , m n_i = 2.5 e +019; // I n t r i n s i c c a r r i e r d e n s i t y o f Ge , p e r m e t r e c u b e mu_e = 0.39; // M o b i l i t y o f e l e c t r o n s , m e t r e square per v o l t per second mu_h = 0.19; // M o b i l i t y o f h o l e s , m e t r e s q u a r e per v o l t per second sigma_i = n_i * e *( mu_e + mu_h ) ; // I n t r i n s i c e l e c t r i c a l c o n d u c t i v i t y , p e r ohm p e r m e t r e A = b*t; // S u r f a c e a r e a o f t h e Ge rod , m e t r e square rho = 1/ sigma_i ; // E l e c t r i c a l r e s i s t i v i t y o f Ge Rod , ohm−m e t r e R = rho * l / A ; // R e s i s t a n c e o f Ge Rod , ohm printf ( ” \ nThe r e s i s t a n c e o f Ge Rod = %3 . 1 e ohm” , R ) ; // R e s u l t // The r e s i s t a n c e o f Ge Rod = 4 . 3 e +003 ohm 126

Scilab code Exa 13.9 Hall effect in Si semiconductor 1 2 3 4 5 6 7 8 9 10 11 12

// S c i l a b Code Ex13 . 9 H a l l e f f e c t i n S i s e m i c o n d u c t o r : Page −442 ( 2 0 1 0 ) e = 1.602 e -019; // Charge on an e l c t r o n , C T = 300; // Room t e m p e r a t u r e , k e l v i n R_H = -7.35 e -05; // H a l l co− e f f i c e i n t o f S i s p e c i m e n , m e t r e c u b e p e r coulomb sigma = 200; // E l e c t r i c a l c o n d u c t i v i t y o f S i , p e r ohm p e r m e t r e n = -1/( e * R_H ) ; // E l e c t r o n d e n s i t y i n t h e S i specimen mu_e = sigma /( n * e ) ; // E l e c t r o n m o b i l i t y i n t h e S i specimen , metre cube per v o l t per second printf ( ” \ nThe d e n s i t y o f e l e c t r o n = %3 . 1 e m e t r e c u b e ”, n); printf ( ” \ nThe m o b i l i t y o f e l e c t r o n = %4 . 2 e m e t r e c u b e p e r v o l t p e r s e c o n d ” , mu_e ) ; // R e s u l t // The d e n s i t y o f e l e c t r o n = 8 . 5 e +022 m e t r e c u b e // The m o b i l i t y o f e l e c t r o n = 1 . 4 7 e −002 m e t r e c u b e per v o l t per second

Scilab code Exa 13.10 Forward current of a pn diode using diode equation // S c i l a b Code Ex13 . 1 0 Forward c u r r e n t o f a p−n diode in terms of r e v e r s e s a t u r a t i o n c u r r e n t u s i n g d i o d e e q u a t i o n : Page −450 ( 2 0 1 0 ) 2 e = 1.6 e -019; // Charge on an e l e c t r o n , coulomb 3 k = 1.38 e -023; // Boltzmann c o n s t a n t , J / mol /K 4 V = 0.35; // P o t e n t i a l d i f f e r e n c e a p p l i e d a c r o s s a Ge d i o d e , v o l t 1

127

// Room t e m p e r a t u r e , k e l v i n // R e v e r s e s a t u r a t i o n c u r r e n t , micro − ampere , f o r s i m p l i c i t y assume I 0 = 1 Iv = Io *( exp ( e * V /( k * T ) ) -1) ; // ” Diode E q u a t i o n ” f o r net forward current , milliamperes printf ( ” \ nThe n e t f o r w a r d c u r r e n t = %4 . 2 e I o ” , Iv ) ; // R e s u l t // The n e t f o r w a r d c u r r e n t = 7 . 4 9 e +005 I o

5 T = 300; 6 Io = 1; 7 8 9 10

Scilab code Exa 13.11 Voltage from net forward current using Diode Equation 1

2 3 4 5 6 7 8 9 10 11

// S c i l a b Code Ex13 . 1 1 F i n d i n g v o l t a g e from n e t f o r w a r d c u r r e n t u s i n g Diode E q u a t i o n : Page −450 (2010) e = 1.6 e -019; // Charge on an e l e c t r o n , coulomb k = 1.38 e -023; // Boltzmann c o n s t a n t , J / mol /K T = 300; // Room t e m p e r a t u r e , k e l v i n Io = 1; // R e v e r s e s a t u r a t i o n c u r r e n t , micro − ampere , f o r s i m p l i c i t y assume I 0 = 1 Iv = 0.9* Io ; // ” Diode E q u a t i o n ” f o r n e t f o r w a r d current , milliamperes // As I v = I o ∗ ( exp ( e ∗V/ ( k ∗T) ) −1) , s o l v i n g f o r V V = log ( Iv / Io +1) * k * T / e ; // P o t e n t i a l d i f f e r e n c e a p p l i e d a c r o s s p−n j u n c t i o n , v o l t printf ( ” \ nThe p o t e n t i a l d i f f e r e n c e a p p l i e d a c r o s s p− n j u n c t i o n = %6 . 4 f v o l t ” , V ) ; // R e s u l t // The p o t e n t i a l d i f f e r e n c e a p p l i e d a c r o s s p−n junction = 0.0166 volt

128

Chapter 14 Dielectric Properties of Materials

Scilab code Exa 14.1 Polarization of water molecule 1 2 3 4 5 6 7 8

9 10 11 12

// S c i l a b Code Ex14 . 1 P o l a r i z a t i o n o f w a t e r m o l e c u l e : Page −456 ( 2 0 1 0 ) NA = 6.023 e +23; // Avogadro ’ s number p = 6e -030; // D i p o l e moment o f w a t e r m o l e c u l e , C −m r = 1e -03; // R a d i u s o f w a t e r m o l e c u l e , m M = 18 e -03; // M o l e c u l a r w e i g h t o f water , kg d = 1 e +03; // D e n s i t y o f water , kg p e r m e t r e c u b e V = M/d; // Volume o f water , m e t r e c u b e // Now M/ d m e t r e c u b e volume w i l l c o n t a i n NA = 6 . 0 2 3 e +023 w a t e r m o l e c u l e s , s o t h a t 4∗ %pi / 3 ∗ ( r ˆ 3 ) m e t r e c u b e volume w i l l c o n t a i n N = NA * d *4* %pi * r ^3/( M *3) ; // Number o f w a t e r m o l e c u l e s per metre cube P = N*p; // P o l a r i z a t i o n o f w a t e r m o l e c u l e s , coulomb p e r m e t r e s q u a r e printf ( ” \ nThe p o l a r i z a t i o n o f w a t e r m o l e c u l e s = %3 . 1 e coulomb p e r m e t r e s q u a r e ” , P ) ; // R e s u l t 129

13

// The p o l a r i z a t i o n o f w a t e r m o l e c u l e s = 8 . 4 e −010 coulomb p e r m e t r e s q u a r e

Scilab code Exa 14.2 Dielectric constant from electric polarizability of the atom 1

2 3 4

5 6 7 8 9

// S c i l a b Code Ex14 . 2 C a l c u l a t i n g d i e l e c t r i c c o n s t a n t from e l e c t r i c p o l a r i z a b i l i t y o f t h e atom : Page −464 ( 2 0 1 0 ) alpha_Kr = 2.18 e -040; // E l e c t r i c p o l a r i z a b i l i t y o f t h e Kr−atom , f a r a d −m e t r e s q u a r e NA = 6.023 e +023; // Avogadro ’ s number epsilon_0 = 8.85 e -012; // E l e c t r i c a l p e r m i t t i v i t y o f f r e e s p a c e , coulomb s q u a r e p e r newton p e r metre square N = NA /(22.4 e -03) ; // Number o f Kr atoms p e r metre cube epsilon_r = N * alpha_Kr / epsilon_0 + 1; // R e l a t i v e e l e c t r i c a l p e r m i t t i v i t y o f Kr s p e c i m e n printf ( ” \ nThe d i e c t r i c c o n s t a n t o f Kr s p e c i m e n = %7 . 5 f ” , epsilon_r ) ; // R e s u l t // The d i e c t r i c c o n s t a n t o f Kr s p e c i m e n = 1 . 0 0 0 6 6

Scilab code Exa 14.3 Electric polarizability of a molecule from its susceptibility // S c i l a b Code Ex14 . 3 C a l c u l a t i n g e l e c t r i c p o l a r i z a b i l i t y o f a m o l e c u l e from i t s s u s c e p t i b i l i t y : Page −464 ( 2 0 1 0 ) 2 NA = 6.023 e +023; // Avogadro ’ s number 1

130

3

4 5 6 7 8

9

10 11

epsilon_0 = 8.85 e -012; // E l e c t r i c a l p e r m i t t i v i t y o f f r e e s p a c e , coulomb s q u a r e p e r newton p e r metre chi = 0.985 e -03; // E l e c t r i c a l s u s c e p t i b i l i t y o f c a r b o n −d i o x i d e m o l e c u l e rho = 1.977; // D e n s i t y o f c a r b o n −d i o x i d e , kg p e r metre cube M = 44 e -03; // M o l e c u l a r w e i g h t o f CO2 , kg N = NA * rho / M ; // Number o f m o l e c u l e s p e r u n i t volume , p e r m e t r e c u b e alpha = epsilon_0 * chi / N ; // T o t a l e l e c t r i c p o l a r i z a b i l i t y o f c a r b o n −d i o x i d e , f a r a d −m e t r e square printf ( ” \ nThe t o t a l e l e c t r i c p o l a r i z a b i l i t y o f c a r b o n −d i o x i d e = %4 . 2 e f a r a d −m e t r e s q u a r e ” , alpha ); // R e s u l t // The t o t a l e l e c t r i c p o l a r i z a b i l i t y o f c a r b o n − d i o x i d e = 3 . 2 2 e −040 f a r a d −m e t r e s q u a r e

Scilab code Exa 14.4 Electric polarizability of oxygen atom 1 2 3 4 5

6 7

// S c i l a b Code Ex14 . 4 C a l c u l a t i n g e l e c t r i c p o l a r i z a b i l i t y o f Oxygen atom : Page −465 ( 2 0 1 0 ) e = 1.602 e -019; // Charge on an e l e c t r o n , coulomb p = 0.5 e -022; // D i p o l e moment o f o x y g e n atom , C− m d = 4e -017; // D i s t n a c e o f t h e c e n t r e o f n e g a t i v e c h a r g e c l o u d from t h e n u c l e u s , m epsilon_0 = 8.85 e -012; // E l e c t r i c a l p e r m i t t i v i t y o f f r e e s p a c e , coulomb s q u a r e p e r newton p e r metre // I n e q u i l i b r i u m , Coulomb i n t e r a c t i o n = L o r e n t z force // i . e . 8∗ e ∗E = ( 8 ∗ e ) ∗ ( 8 ∗ e ) / ( 4 ∗ %pi ∗ e p s i l o n 0 ∗d ˆ 2 ) 131

8 // S o l v i n g f o r E 9 E = 8* e /(4* %pi * epsilon_0 * d ^2) ; 10 11 12 13 14 15

// The s t r e n g t h o f l o c a l e l e c t r i c f i e l d , v o l t per metre // As p = a l p h a ∗E , s o l v i n g f o r a l p h a disp ( E ) ; alpha = p / E ; // Atomic p o l a r i z a b i l i t y o f oxygen , f a r a d −m e t r e s q u a r e printf ( ” \ nThe a t o m i c p o l a r i z a b i l i t y o f o x y g e n = %3 . 1 e f a r a d −m e t r e s q u a r e ” , alpha ) ; // R e s u l t // The a t o m i c p o l a r i z a b i l i t y o f o x y g e n = 6 . 9 e −048 f a r a d −m e t r e s q u a r e

Scilab code Exa 14.5 Dipolar polarization of HCl molecule 1 2 3 4 5 6 7 8 9

10 11

// S c i l a b Code Ex14 . 5 D i p o l a r p o l a r i z a t i o n o f HCl m o l e c u l e : Page −470 ( 2 0 1 0 ) k = 1.38 e -023; // Boltzmann c o n s t a n t , J / mol /K T = 300; // T e m p e r a t u r e o f t h e HCl vapour , k e l v i n N = 1 e +027; // Number o f HCL m o l e c u e l s p e r u n i t volume , p e r m e t r e c u b e E = 1 e +06; // E l e c t r i c f i e l d s t r e n g t h t o which t h e HCL v a p o u r i s s u b j e c t e d , v o l t /m p = 3.46 e -030; // The d i p o l e moment o f HCl m o l e c u l e , C−m alpha_d = p ^2/(3* k * T ) ; // D i p o l a r p o l a r i z a b i l i t y o f HCl m o l e c u l e , f a r a d −m e t r e s q u a r e // As P = N∗p = N∗ a l p h a d ∗E P = N * alpha_d * E ; // O r i e n t a t i o n a l o r D i p o l a r p o l a r i z a t i o n o f HCl m o l e c u l e , coulomb p e r m e t r e square E_M = p * E ; // M a g n e t i c e n e r g y s t o r e d i n t h e d i p o l e − f i e l d system , j o u l e E_Th = k * T ; // Thermal e n e r g y o f t h e HCl m o l e c u l e , joule 132

12 a = E_M / E_Th ; 13

14 15 16 17

// R a t i o o f m a g n e t i c e n e r g y t o t h e

thermal energy printf ( ” \ nThe o r i e n t a t i o n a l p o l a r i z a t i o n o f m o l e c u l e s i n HCl v a p o u r = %4 . 2 e coulomb p e r m e t r e s q u a r e ”, P); printf ( ” \ nThe r a t i o o f m a g n e t i c e n e r g y t o t h e t h e r m a l e n e r g y = %f << 1 ” , a ) ; // R e s u l t // The o r i e n t a t i o n a l p o l a r i z a t i o n o f m o l e c u l e s i n HCl v a p o u r = 9 . 6 4 e −007 coulomb p e r m e t r e s q u a r e // The r a t i o o f m a g n e t i c e n e r g y t o t h e t h e r m a l e n e r g y = 0 . 0 0 0 8 3 6 << 1

Scilab code Exa 14.6 Effect of molecular deformation on polarizability 1 2 3 4 5 6 7 8 9 10 11 12 13

// S c i l a b Code Ex14 . 6 E f f e c t o f m o l e c u l a r d e f o r m a t i o n on p o l a r i z a b i l i t y : Page −471 ( 2 0 1 0 ) alpha_309 = 2.42 e -039; // P o l a r i z a b i l i t y o f ammonia m o l e c u l e a t 309 K, f a r a d −m e t r e s q u a r e alpha_448 = 1.74 e -039; // P o l a r i z a b i l i t y o f ammonia m o l e c u l e a t 448 K, f a r a d −m e t r e s q u a r e k = 1.38 e -023; // Boltzmann c o n s t a n t , J / mol /K T1 = 309; // F i r s t t e m p e r a t u r e o f t h e e x p e r i m e n t , kelvin T2 = 448; // S e c o n d t e m p e r a t u r e o f t h e e x p e r i m e n t , kelvin // As a l p h a = a l p h a i + a l p h a d = a l p h a i + p ˆ 2 / ( 3 ∗ k ∗T) = a l p h a i + b t a /T // where b t a = p ˆ 2 / ( 3 ∗ k ) // Thus a l p h a 3 0 9 = a l p h a i + b t a / 3 0 9 and a l p h a 4 4 8 = a l p h a i + bta /448 // S o l v i n g f o r b t a // b t a ( 1 / 3 0 9 − 1 / 4 4 8 ) = a l p h a 3 0 9 − a l p h a 4 4 8 bta = poly (0 , ” b t a ” ) ; bta = roots ( bta *(1/309 - 1/448) - alpha_309 + 133

14 15

16 17 18 19 20

21

22 23 24 25

alpha_448 ) ; // b t a = p ˆ 2 / ( 3 ∗ k ) , f a r a d −k e l v i n metre square // S o l v i n g f o r a l p h a i alpha_i = alpha_309 - bta /309; // P o l a r i z a b i l i t y due t o permanent d i p o l e moment , f a r a d −m e t r e square // P o l a r i z a b i l i t y due t o d e f o r m a t i o n o f m o l e c u l e s = b t a /T , b t a = p ˆ 2 / ( 3 ∗ k ) alpha_d_309 = bta / T1 ; // O r i e n t a t i o n a l p o l a r i z a b i l i t y a t 309 K, f a r a d −m e t r e s q u a r e alpha_d_448 = bta / T2 ; // O r i e n t a t i o n a l p o l a r i z a b i l i t y a t 448 K, f a r a d −m e t r e s q u a r e printf ( ” \ nThe p o l a r i z a b i l i t y due t o permanent d i p o l e moment = %4 . 1 e f a r a d −m e t r e s q u a r e ” , alpha_i ) ; printf ( ” \ nThe o r i e n t a t i o n a l p o l a r i z a t i o n o f ammonia a t 309 K = %4 . 2 e f a r a d −m e t r e s q u a r e ” , alpha_d_309 ); printf ( ” \ nThe o r i e n t a t i o n a l p o l a r i z a t i o n o f ammonia a t 448 K = %4 . 2 e f a r a d −m e t r e s q u a r e ” , alpha_d_448 ); // R e s u l t // The p o l a r i z a b i l i t y due t o permanent d i p o l e moment = 2 . 3 e −040 f a r a d −m e t r e s q u a r e // The o r i e n t a t i o n a l p o l a r i z a t i o n o f ammonia a t 309 K = 2 . 1 9 e −039 f a r a d −m e t r e s q u a r e // The o r i e n t a t i o n a l p o l a r i z a t i o n o f ammonia a t 448 K = 1 . 5 1 e −039 f a r a d −m e t r e s q u a r e

134

Chapter 15 Optical Properties of Materials

Scilab code Exa 15.1 Photon count from Planck quantum law 1 2 3 4 5 6 7 8 9

// S c i l a b Code Ex15 . 1 D e t e r m i n i n g Photon number by u s i n g P l a n c k quantum law : Page −486 ( 2 0 1 0 ) h = 6.626 e -034; // Planck ’ s c o n s t a n t , J s f = 1760 e +03; // F r e q u e n c y o f t h e r a d i o t r a n s m i t t e r , Hz P = 10 e +03; // Power o f r a d i o t r a n s m i t t e r , W E = h*f; // Energy c a r r i e d by one p h o t o n from Planck ’ s law , J N = P/E; // Number o f p h o t o n s e m i t t e d p e r s e c o n d , number p e r s e c o n d printf ( ” \ nThe number o f p h o t o n s e m i t t e d p e r s e c o n d = %4 . 2 e ” , N ) ; // R e s u l t // The number o f p h o t o n s e m i t t e d p e r s e c o n d = 8 . 5 8 e +030

Scilab code Exa 15.2 Inicient energy of photon in photoelectric effect

135

1

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

// S c i l a b Code Ex15 . 2 F i n d i n g s u i t a b l e e n e r g y f o r P h o t o e l e c t r i c E f f e c t from Na m e t a l : Page −486 (2010) e = 1.602 e -019; // Charge on an e l e c t r o n , C h = 6.626 e -034; // Planck ’ s c o n s t a n t , J s c = 3.0 e +08; // Speed o f l i g h t i n vacuum , m/ s W = 2.3* e ; // Work f u n c t i o n o f Na metal , J lambda = 2800 e -010; // Wavelength o f i n c i d e n t light , m f = c / lambda ; // F r e q u e n c y o f t h e i n c i d e n t l i g h t , Hz E = h*f; // Energy c a r r i e d by one p h o t o n from Planck ’ s law , J printf ( ” \ nThe e n e r g y c a r r i e d by e a c h p h o t o n o f r a d i a t i o n = %4 . 2 f eV” , E / e ) ; if E > W then printf ( ” \ nThe p h o t o e l e c t r i c e f f e c t i s p o s s i b l e . . ”); else printf ( ” \ nThe p h o t o e l e c t r i c e f f e c t i s i m p o s s i b l e . . ”); end // R e s u l t // The e n e r g y c a r r i e d by e a c h p h o t o n o f r a d i a t i o n = 4 . 4 3 eV // The p h o t o e l e c t r i c e f f e c t i s p o s s i b l e . .

Scilab code Exa 15.3 photon count for green wavelength of Hg // S c i l a b Code Ex15 . 3 F i n d i n g number o f p h o t o n s f o r g r e e n w a v e l e n g t h o f Hg : Page −487 ( 2 0 1 0 ) 2 h = 6.626 e -034; // Planck ’ s c o n s t a n t , J s 3 c = 3.0 e +08; // Speed o f l i g h t i n vacuum , m/ s 4 lambda = 496.1 e -09; // Wavelength o f g r e e n l i g h t o f mercury , m

1

136

5 6 7 8 9 10 11

E_total = 1; // Work done by p h o t o n s from g r e e n light , J f = c / lambda ; // F r e q u e n c y o f t h e g r e e n l i g h t , Hz E = h*f; // Energy c a r r i e d by one p h o t o n from Planck ’ s law , J N = E_total / E ; // Number o f p h o t o n s o f g r e e n l i g h t o f Hg printf ( ” \ nThe number o f p h o t o n s o f g r e e n l i g h t o f Hg = %3 . 1 e ” , N ) ; // R e s u l t // The number o f p h o t o n s o f g r e e n l i g h t o f Hg = 2 . 5 e +018

Scilab code Exa 15.4 Photoelectric effect in a photocell 1 2 3 4 5 6 7 8 9 10 11 12 13

// S c i l a b Code Ex15 . 4 P h o t o e l e c t r i c e f f e c t i n a p h o t o c e l l : Page −487 ( 2 0 1 0 ) e = 1.602 e -019; // Charge on an e l e c t r o n , C h = 6.626 e -034; // Planck ’ s c o n s t a n t , J s c = 3.0 e +08; // Speed o f l i g h t i n vacuum , m/ s lambda = 1849 e -010; // Wavelength o f i n c i d e n t light , m V_0 = 2.72; // S t o p p i n g p o t e n t i a l f o r e m i t t e d electrons , V f = c / lambda ; // F r e q u e n c y o f i n c i d e n t r a d i a t i o n , Hz E = h*f; // Energy c a r r i e d by one p h o t o n from Planck ’ s law , J T_max = e * V_0 ; // Maximum k i n e t i c e n e r g y o f electrons , J // We have , T max = E − h∗ f 0 = h∗ f − W f_0 = poly (0 , ” f 0 ” ) ; // D e c l a r e f 0 a s v a r i a b l e f_0 = roots ( T_max - E + h * f_0 ) ; // T h r e s h o l d f r e q u e n c y f o r Cu metal , Hz W = h * f_0 / e ; // Work f u n c t i o n o f Cu metal , eV 137

14 15 16 17 18 19 20

printf ( ” \ nThe t h r e h o l d f r e q u e n c y f o r Cu m e t a l = %4 . 2 e Hz” , f_0 ) ; printf ( ” \ nThe work f u n c t i o n o f Cu m e t a l = %g eV” , round ( W ) ) ; printf ( ” \ nThe maximum k i n e t i c e n e r g y o f p h o t o e l e c t r o n s = %4 . 2 f eV” , T_max / e ) ; // R e s u l t // The t h r e h o l d f r e q u e n c y f o r Cu m e t a l = 9 . 6 5 e +014 Hz // The work f u n c t i o n o f Cu m e t a l = 4 eV // The maximum k i n e t i c e n e r g y o f p h o t o e l e c t r o n s = 2 . 7 2 eV

Scilab code Exa 15.5 Energy required to stimulate the emission of Na doublets 1 2 3 4 5 6

7

8 9

// S c i l a b Code Ex15 . 5 Energy r e q u i r e d t o s t i m u l a t e t h e e m i s s i o n o f Na d− l i n e s : Page −497 ( 2 0 1 0 ) e = 1.6 e -019; // Charge on an e l e c t r o n , C h = 6.626 e -034; // Planck ’ s c o n s t a n t , J s c = 3.0 e +08; // Speed o f l i g h t i n vacuum , m/ s lambda_mean = 5893 e -010; // Wavelength o f incident light , m delta_E = h * c /( lambda_mean * e ) ; // The e n e r g y o f t h e e l e c t r o n which must be t r a n s f e r r e d t o t h e atoms o f Na printf ( ” \ nThe e n e r g y which must be t r a n s f e r r e d t o s t i m u l a t e t h e e m i s s i o n o f Na d− l i n e s = %5 . 3 f eV” , delta_E ) ; // R e s u l t // The e n e r g y which must be t r a n s f e r r e d t o s t i m u l a t e t h e e m i s s i o n o f Na d− l i n e s = 2 . 1 0 8 eV

138

Chapter 16 Magnetic Properties of Materials

Scilab code Exa 16.1 Response of copper to magnetic field 1 2 3 4 5 6 7 8 9 10 11

// S c i l a b Code Ex16 . 1 R e s p o n s e o f Cu t o m a g n e t i c f i e l d : Page −503 ( 2 0 1 0 ) H = 1 e +06; // A p p l i e d m a g n e t i c f i e l d i n c o p p e r , A/m chi = -0.8 e -05; // M a g n e t i c s u s c e p t i b i l i t y o f copper mu_0 = 4* %pi *1 e -07; // M a g n e t i c p e r m e a b i l i t y o f f r e e space , henry / metre M = chi * H ; // I n t e s i t y o f m a g n e t i z a t i o n i n c o p p e r , A/m B = mu_0 *( H + M ) ; // M a g n e t i c f l u x d e n s i t y i n copper , t e s l a printf ( ” \ nThe m a g n e t i z a t i o n o f c o p p e r = %d A/m” , M ) ; printf ( ” \ nThe m a g n e t i c f l u x d e n s i t y o f c o p p e r = %5 . 3 f T” , B ) ; // R e s u l t // The m a g n e t i z a t i o n o f c o p p e r = −8 A/m // The m a g n e t i c f l u x d e n s i t y o f c o p p e r = 1 . 2 5 7 T

139

Scilab code Exa 16.2 Diamagnetic susceptibility of copper 1 2 3 4 5 6 7 8 9 10 11 12 13 14

// S c i l a b Code Ex16 . 2 D i a m a g n e t i c s u s c e p t i b i l i t y o f c o p p e r : Page −512 ( 2 0 1 0 ) e = 1.6 e -019; // Charge on an e l e c t r o n , C m = 9.1 e -031; // Mass o f an e l e c t r o n , kg mu_0 = 4* %pi *1 e -07; // M a g n e t i c p e r m e a b i l i t y o f f r e e space , henry / metre Z = 1; // Number o f e l e c t r o n s c o n t r i b u t i n g t o t h e m a g n e t i c moment r = 1e -010; // R a d i u s o f c o p p e r atom , m a = 3.608 e -010; // L a t t i c e p a r a m e t e r o f c o p p e r , m // For FCC l a t t i c e o f Cu , t h e r e a r e 4 atoms p e r u n i t cell n = 4; // Number o f atoms p e r u n i t c e l l N = n / a ^3; // Number o f e l e c t r o n s p e r u n i t volume , per metre cube chi_dia = - mu_0 * Z * e ^2* N * r ^2/(6* m ) ; // D i a m a g n e t i c s u s c e p t i b i l i t y of copper printf ( ” \ nThe d i a m a g n e t i c s u s c e p t i b i l i t y o f c o p p e r = %3 . 1 e ” , chi_dia ) ; // R e s u l t // The d i a m a g n e t i c s u s c e p t i b i l i t y o f c o p p e r = −5.0 e −006

Scilab code Exa 16.3 Magnetic induction from orientational energy equivalent of thermal energy 1

// S c i l a b Code Ex16 . 3 C a l c u l a t i n g m a g n e t i c i n d u c t i o n from o r i e n t a t i o n a l e n e r g y e q u i v a l e n t o f t h e r m a l e n e r g y : Page −514 ( 2 0 1 0 )

140

2 k = 1.38 e -023; 3 4 5 6 7 8 9 10

// Boltzmann c o n s t a n t , j o u l e p e r

mole p e r k e l v i n mu_B = 9.27 e -024; // Bohr ’ s magneton , j o u l e p e r tesla mu_m = 5* mu_B ; // M a g n e t i c moment o f p a r a m a g n e t i c sample , j o u l e p e r t e s l a T = 300; // Thermal e n e r g y o f s p e c i m e n , j o u l e // At e q u i l i b r i u m , mu m∗B = k ∗T , s o l v i n g f o r B B = k * T / mu_m ; // M a g e n t i c i n d u c t i o n o f p a r a m a g n e t i c sample , weber p e r m e t r e s q u a r e printf ( ” \ nThe m a g e n t i c i n d u c t i o n o f p a r a m a g n e t i c s a m p l e = %5 . 2 f weber p e r m e t r e s q u a r e ” , B ) ; // R e s u l t // The m a g e n t i c i n d u c t i o n o f p a r a m a g n e t i c s a m p l e = 8 9 . 3 2 weber p e r m e t r e s q u a r e

Scilab code Exa 16.4 Behaviour of paramagnetic salt when placed in uniform magnetic field 1

2 3 4 5 6 7 8 9

// S c i l a b Code Ex16 . 4 B e h a v i o u r o f p a r a m a g n e t i c s a l t when p l a c e d i n u n i f o r m m a g n e t i c f i e l d : Page −514 (2010) k = 1.38 e -023; // Boltzmann c o n s t a n t , j o u l e p e r mole p e r k e l v i n T = 300; // Thermal e n e r g y o f s p e c i m e n , j o u l e mu_B = 9.27 e -024; // Bohr ’ s magneton , ampere p e r metre square mu_0 = 4* %pi *1 e -07; // M a g n e t i c p e r m e a b i l i t y o f f r e e space , henry per metre N = 1 e +28; // C o n c e n t r a t i o n o f p a r a m a g n e t i c i o n s i n paramagnetic s a l t , per metre cube mu_m = mu_B ; H = 1 e +06; // A p p l i e d m a g n e t i c f i e l d , A/m chi = mu_0 * N * mu_m ^2/(3* k * T ) ; // P a r a m a g n e t i c s u s c e p t i b i l i t y o f s a l t a t room t e m p e r a t u r e 141

// I n t e n s i t y o f m a g n e t i z a t i o n a t room t e m p e r a t u r e , A/m printf ( ” \ nThe p a r a m a g n e t i c s u s c e p t i b i l i t y o f s a l t a t room t e m p e r a t u r e = %3 . 1 e ” , chi ) ; printf ( ” \ nThe i n t e n s i t y o f m a g n e t i z a t i o n o f s a l t = %d A/m” , round ( M ) ) ; // R e s u l t // The p a r a m a g n e t i c s u s c e p t i b i l i t y o f s a l t a t room t e m p e r a t u r e = 8 . 7 e −005 // The i n t e n s i t y o f m a g n e t i z a t i o n o f s a l t = 87 A/m

10 M = chi * H ; 11 12 13 14 15

142

Chapter 17 Superconductivity

Scilab code Exa 17.1 Variation of critical magnetic field with temperature 1 2 3 4 5 6 7 8

// S c i l a b Code Ex17 . 1 V a r i a t i o n o f c r i t i c a l m a g n e t i c f i e l d w i t h t e m p e r a t u r e Page −537 ( 2 0 1 0 ) T_c = 3.7; // C r i t i c a l t e m p e r a t u r e o f superconducting transition , kelvin H_c0 = 0.0306; // C r i t i c a l m a g n e t i c f i e l d t o destroy superconductivity , tesla T = 2; // T e m p e r a t u r e a t which c r i t i c a l m a g n e t i c f i e l d i s t o be f o u n d out , k e l v i n H_cT = H_c0 *(1 -( T / T_c ) ^2) ; printf ( ” \ nThe c r i t i c a l m a g n e t i c f i e l d a t %d K = %f T ” , T , H_cT ) ; // R e s u l t // The c r i t i c a l m a g n e t i c f i e l d a t 2 K = 0 . 0 2 1 6 5 9 T

Scilab code Exa 17.2 Temperature variation of critical magnetic field for tin 1

// S c i l a b Code Ex17 . 2 V a r i a t i o n o f c r i t i c a l m a g n e t i c f i e l d w i t h t e m p e r a t u r e f o r t i n Page −537 ( 2 0 1 0 ) 143

// C r i t i c a l t e m p e r a t u r e o f superconducting transition , kelvin B_c0 = 3 e +5/(4* %pi ) ; // C r i t i c a l m a g n e t i c f i e l d i n t e n s i t y to destroy s u p e r c o n d u c t i v i t y at zero kelvin , t e s l a B_cT = 2 e +5/(4* %pi ) ; // C r i t i c a l m a g n e t i c f i e l d at temperature T k e l v i n // T = 2 ; // T e m p e r a t u r e a t which c r i t i c a l m a g n e t i c f i e l d i s t o be f o u n d out , k e l v i n // s i n c e B cT = B c0 ∗(1 −(T/ T c ) ˆ 2 ) ; // C r i t i c a l magnetic f i e l d i n t e n s i t y as a f u n c t i o n of temperature // S o l v i n g f o r T T = sqrt (1 - B_cT / B_c0 ) * T_c ; // T e m p e r a t u r e a t which c r i t i c a l m a g n e t i c f i e l d becomes B cT , kelvin printf ( ” \ nThe t e m p e r a t u r e a t which c r i t i c a l m a g n e t i c f i e l d becomes %4 . 2 e T = %4 . 2 f K” , B_cT , T ) ; // Display r e s u l t // R e s u l t // The t e m p e r a t u r e a t which c r i t i c a l m a g n e t i c f i e l d becomes 1 . 5 9 e +04 T = 2 . 1 3 K

2 T_c = 3.69; 3

4 5 6

7 8

9

10 11

Scilab code Exa 17.3 Critical current for a lead wire from its critical temperature // S c i l a b Code Ex17 . 3 C a l c u l a t i n g c r i t i c a l c u r r e n t f o r a l e a d w i r e from c r i t i c a l t e m p e r a t u r e o f l e a d Page −537 ( 2 0 1 0 ) 2 T_c = 7.18; // C r i t i c a l t e m p e r a t u r e o f s u p e r c o n d u c t i n g t r a n s i t i o n f o r Pb , k e l v i n 3 H_c0 = 6.5 e +4; // C r i t i c a l m a g n e t i c f i e l d i n t e n s i t y to destroy s u p e r c o n d u c t i v i t y at zero k e l v i n , A/m 4 T = 4.2; // T e m p e r a t u r e a t which c r i t i c a l 1

144

5 6 7 8 9 10 11

m a g n e t i c f i e l d becomes H cT , k e l v i n d = 1e -03; // D i a m e t e r o f l e a d w i r e , m H_cT = H_c0 *(1 -( T / T_c ) ^2) ;; // C r i t i c a l m a g n e t i c f i e l d i n t e n s i t y a t t e m p e r a t u r e T k e l v i n , A/m I_c = %pi * d * H_cT ; // C r i t i c a l c u r r e n t t h r o u g h t h e l e ad wire , A printf ( ” \ nThe c r i t i c a l c u r r e n t t h r o u g h t h e l e a d w i r e = %6 . 2 f A” , I_c ) ; // R e s u l t // The c r i t i c a l c u r r e n t t h r o u g h t h e l e a d w i r e = 134.33 A

Scilab code Exa 17.4 Dependence of London penetration depth on temperature 1 2 3 4 5 6 7 8 9 10 11

// S c i l a b Code Ex17 . 4 Dependence o f London p e n e t r a t i o n d e p t h on t e m p e r a t u r e Page −548 ( 2 0 1 0 ) N = 6.02 e +023; // Avogadro ’ s number rho = 13.55 e +03; // D e n s i t y o f mercury , kg p e r metre cube M = 200.6 e -03; // M o l e c u l a r mass o f mercury , kg lambda_T = 750 e -010; // P e n e t r a t i o n d e p t h o f mercury at T k e l v i n , m T_c = 4.12; // C r i t i c a l t e m p e r a t u r e o f s u p e r c o n d u c t i n g t r a n s i t i o n f o r Hg , k e l v i n T = 3.5; // T e m p e r a t u r e a t which p e n e t r a t i o n d e p t h f o r Hg becomes lambda T , k e l v i n lambda_0 = lambda_T *(1 -( T / T_c ) ^4) ^(1/2) ; // P e n e t r a t i o n depth o f mercury at 0 k e l v i n , m n_0 = N * rho / M ; // Normal e l e c t r o n d e n s i t y i n mercury , p e r m e t r e c u b e n_s = n_0 *(1 -( T / T_c ) ^4) ; // S u p e r e l e c t r o n d e n s i t y i n mercury , p e r m e t r e c u b e printf ( ” \ nThe p e n e t r a t i o n d e p t h a t 0 K = %4 . 2 e m” , 145

lambda_0 ) ; 12 printf ( ” \ nThe s u p e r c o n d u c t i n g e l e c t r o n d e n s i t y = %4 . 2 e p e r m e t r e c u b e ” , n_s ) ; 13 14 15 16

// R e s u l t // The p e n e t r a t i o n d e p t h a t 0 K = 5 . 1 9 e −008 m // The s u p e r c o n d u c t i n g e l e c t r o n d e n s i t y = 1 . 9 5 e +028 per metre cube

146