Professional Documents
Culture Documents
Materials Science and Engineering A First Coursev Raghavan
Materials Science and Engineering A First Coursev Raghavan
Created by
Vareesh Pratap
B.Tech
Mechanical Engineering
Madan Mohan Malaviya University of Technology
College Teacher
None
Cross-Checked by
Aviral Yadav
June 2, 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
Edition: 5
Year: 2007
ISBN: 9788120324558
1
Scilab numbering policy used in this document and the relation to 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
2 Equ
Equili
ilibri
brium
um and
and Kine
Kinetic
ticss 5
3 Cry
Crysta
stall Geometry
Geometry and Structur
Structure
e Determina
Determinatio
tion
n 7
4 At
Atomi
omic
c Structure
Structure and
and Chemical
Chemical Bondin
Bonding
g 11
5 St
Struc
ructu
ture
re of
of Soli
Solid
d 13
6 Cry
Crysta
stall Impe
Imperfec
rfectio
tion
n 17
7 Ph
Phas
ase
e Di
Diag
agram
ram 21
8 Di
Diffu
ffusi
sion
on in
in Soli
Solids
ds 24
9 Pha
Phase
se Trans
Transfor
format
mation
ion 28
12 Fracture 38
15 Semiconductors 44
3
16 Magnetic Materials 45
17 Dielectric Materials 48
4
List of Scilab Codes
5
Exa 7.5 Calculate proeutectoid ferrite and eutectoid ferrite in 6
tenth percent steel . . . . . . . . . . . . . . . . . . . . 22
Exa 8.1 Calculate the rate at which hydrogen escapes through
the walls of the steel tank . . . . . . . . . . . . . . . . 24
Exa 8.2 Calculate maximum time till which material can be kept
at 550 degree Celsius . . . . . . . . . . . . . . . . . . . 24
Exa 8.3 Calculate minimum depth up to which post machining
is to be done . . . . . . . . . . . . . . . . . . . . . . . 25
Exa 8.4 Calculate time required to get required boron concen-
tration . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Exa 8.5 Calculate ratio of cross sectional areas . . . . . . . . . 27
Exa 9.1 Calculate the critical free energy of nucleation of ice
from water and critical radius . . . . . . . . . . . . . . 28
Exa 9.2 Calculate the change in delta f required to increase nu-
cleation rate . . . . . . . . . . . . . . . . . . . . . . . 29
Exa 9.4 Calculate delta f of heterogeneous as a fraction of delta
f of homogeneous . . . . . . . . . . . . . . . . . . . . . 30
Exa 9.6 Calculate the free energy change during recrystallization 30
Exa 10.1 Estimate Youngs modulus of material . . . . . . . . . 32
Exa 10.2 Calculation of stress in fibers . . . . . . . . . . . . . . 32
Exa 10.3 Estimate diffusion coefficient . . . . . . . . . . . . . . 33
Exa 11.2 Calculate the stress required to move the dislocation at
given temperature . . . . . . . . . . . . . . . . . . . . 34
Exa 11.3 Calculate the dislocation density in copper . . . . . . 35
Exa 11.4 Find the yield stress for a grain size of ASTM 9 . . . . 36
Exa 11.5 Estimate the change in yield strength . . . . . . . . . 36
Exa 12.1 Estimate fracture strength . . . . . . . . . . . . . . . . 38
Exa 12.2 Estimate the brittle fracture strength at low tempera-
tures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Exa 12.3 Estimate the temperature at which the ductility of brit-
tle transition occurs at given strain rates . . . . . . . . 39
Exa 13.2 Calculation of required quantity of magnesium . . . . 41
Exa 14.1 Calculate energy difference . . . . . . . . . . . . . . . 42
Exa 14.2 Calculate conductivity of copper at 300 K . . . . . . . 42
Exa 14.3 Estimation of resistivity due to impurity scattering of 1
percent of Nickel in copper lattice . . . . . . . . . . . 43
Exa 15.1 Calculate intrinsic carrier density . . . . . . . . . . . . 44
6
Exa 16.1 Calculate the net magnetic moment per iron atom in
crystal . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Exa 16.2 Comparison of saturation temperatures . . . . . . . . 46
Exa 16.4 Calculation of hysteresis loss . . . . . . . . . . . . . . 46
Exa 16.5 Calculation of eddy current loss at normal voltage and
frequency . . . . . . . . . . . . . . . . . . . . . . . . . 47
Exa 17.1 Calculation of relative dielectric constant . . . . . . . 48
Exa 17.2 Calculate the polarization of a BaTio3 crystal . . . . . 48
7
Chapter 2
1 // C a l cu l a te t he e nt ro py i n c r e a s e
2 clc
3 d el _h = 6 .0 2 // H ea t a dd ed i n kJ / mol
4 t _m = 2 73 .1 5 / / mean t em p er a tu re i n k e l v i n
5 printf ( ” \ n E xa mp le 2 . 1 ” )
6 d el _s = d el _h * 1 e 3 / t_ m
7 printf ( ” \ n I n c r e a s e i n e nt ro py i s %. 2 f J molˆ −1 Kˆ−1
” ,del_s)
Scilab code Exa 2.2 Calculation of fraction of atoms with energy equal to
or greater than 1eV at temperatures
1 / / C a lc u la t io n o f f r a c t i o n o f atoms w i t h e ne rg y
e q u a l t o o r g r e a t e r t h a n 1eV a t t e m p e ra t u r e s
2 clc
3 E = 1 // e ne rg y i n e l e c t r o n v o l t
4 e = 1.6 e -19 // c ha rg e on e l e c t r o n
8
5 k = 1 .3 8 e -2 3 // c o n st a n t
6 t 1 = 300 // t em p er a tu r e i n K
7 t 2 = 15 00 // t em p er a tu re i n K
8 printf ( ” \ n E xa mp le 2 . 2 ” )
9 printf ( ” \ n \ n P a rt A : ” )
10 n _N = exp (-(e/(k*t1)))
11 printf ( ” \ n F r a c ti o n o f atoms w i th e ne rg y e qu a l t o o r
g r e a t e r th an 1eV a t t em p er a tu re %d K i s %. 2 e ” ,
t1,n_N) // n um er ic al v al ue o f a n s w e r i n book i s 2
e −17
12 printf ( ” \ n \ n P ar t B : ” )
13 n _N = exp (-(e/(k*t2)))
14 printf ( ” \ n F r a c ti o n o f atoms w i th e ne rg y e qu a l t o o r
g r e a t e r th an 1eV a t t em p er a tu re %d K i s %. 2 e ” ,
t2,n_N) // n u m er i c al v a l u e o f a ns we r i n book i s
4 . 3 e4
9
Chapter 3
Scilab code Exa 3.2 Calculate effective number of lattice point in three
cubic space lattice
1 // C a l c u l a te
e f f e c t i v e number o f l a t t i c e p o i n t i n
thr ee cubi c space l a t t i c e
2 clc
3 s c _n = 1 /8 // s h a r i n g o f on e l a t t i c e p o i nt i n a u n i t
cell
4 s c_N = 8 / / Number o f l a t t i c e p o i n t s i n S i m pl e c u b i c
5 b cc _n _e = 1 /4 // s h a r i n g o f on e e dg e l a t t i c e p o i nt i n
a BCC
6 b cc _N _e = 4 / / Number o f e d g e l a t t i c e p o i n t i n a BCC
7 bcc_n_c = 1 // s h a r i n g o f o ne body c e n t e r l a t t i c e
p o i n t i n a BCC
8 b cc _N _c = 1 / / Number o f bo dy c e n t e r l a t t i c e p o i n t i n
a BCC
9 f cc _n _e = 1 /8 // s h a r i n g o f o ne c o r n e r l a t t i c e p o i n t
i n a FCC
10 f cc _N _e = 8 / / Number o f c o r n e r l a t t i c e p o i n t i n a
FCC
11 f cc _n _f = 1 /2 // s h a r i n g o f o ne f a c e c e n t e r l a t t i c e
10
p o i n t i n a FCC
12 f cc _N _f = 6 / / Number o f f a c e c e n t e r l a t t i c e p o i n t i n
a FCC
13 printf ( ” \ n Example 3 . 2 ” )
14 s c_ n et = s c_ n * s c_ N
15 b c c _n e t = b c c _n _ e * b c c _ N_ e + b c c _ n _c * b c c _N _ c
16 f c c _n e t = f c c _n _ e * f c c _ N_ e + f c c _ n _f * f c c _N _ f
17 printf ( ” \ n E f f e c t i v e number o f l a t t i c e p o i n t s a r e a s
:”)
18 printf ( ” \ n \ n Space l a t t i c e \ t A b b r ev i a t i o n \ t
E f f e c t i v e number o f l a t t i c e p o i n t i n u n i t c e l l \ n
”)
19 printf ( ” \ n S im pl e c u b ic \ t \ tS C \ t \ t \ t \ t %d\ n B od y
c e n te r c u b i c \ tBCC \ t \ t \ t \ t %d\ n Face c e n t er e d
c u b i c \ tFCC \ t \ t \ t \ t % d ” ,sc_net ,bcc_net ,fcc_net )
Scilab code Exa 3.7 Determine interplanar spacing and miller indices
1 // D e t e r m i n e I n t e r p l a n a r s p a c i n g and m i l l e r i n d i c e s
2 clc
3 a = 3.16 / / l a t t i c e p a r a m e t e r i n a n g st r o m
4 l 1 = 1 // l i n e number
5 l 2 = 2 // l i n e number
6 l 3 = 3 // l i n e number
7 l 4 = 4 // l i n e number
8 t h e ta 1 = 2 0. 3 // a n g l e f o r l i n e 1
9 t h e ta 2 = 2 9. 2 // a n g l e f o r l i n e 2
10 t h e ta 3 = 3 6. 7 // a n g l e f o r l i n e 3
11 t h e ta 4 = 4 3. 6 // a n g l e f o r l i n e 4
12 n = 1 // o r d er
13 l a m bd a = 1 .5 4 // w a ve l en g th i n a ng st ro m
14 printf ( ” \ n E xa mp le 3 . 7 ” )
15 d 1 = l am b da / ( 2* sin (theta1*%pi/180))
11
16
d 2 = l am b da / ( 2* sin (theta2*%pi/180))
17
d 3 = l am b da / ( 2* sin (theta3*%pi/180))
18
d 4 = l am b da / ( 2* sin (theta4*%pi/180))
19
x 1 = a ^ 2/ d 1 ^2
20
x 2 = a ^ 2/ d 2 ^2
21
x 3 = a ^ 2/ d 3 ^2
22 x 4 = a ^ 2/ d 4 ^2 / / where x i s f u n c t i o n o f h , k and l
23 printf ( ” \ n I n t e r p l a n a r s p a c i n g i s %. 3 f a n g s t r o m ” ,
x1 ) // a ns we r i n book i s 2 . 2 2 0 a ng st ro m
24 if floor ( x1 ) == 2 then
25 printf ( ” \ n \ n F or a ˆ 2 / dˆ 2 = %d \ t R e f l e c t i o n
p la ne i s { 1 1 0 } ” ,x1)
26 end
27
28 i f f lo or ( x2 ) == 4 then
29 printf ( ” \ n Fo r a ˆ 2 / dˆ 2 = %d \ t R e f l e c t i o n
p la ne i s { 2 0 0 } ” ,x2)
30 end
31
32 i f fl oo r ( x3 ) == 6 then
33 printf ( ” \ n F or a ˆ 2 / dˆ 2 = %d \ t R e f l e c t i o n p la ne
i s { 2 1 1 } ” ,x3)
34 end
35
36 i f fl oo r ( x4 ) == 8 then
37 printf ( ” \ n F or a ˆ 2 / dˆ 2 = %d \ t R e f l e c t i o n p la ne
i s { 2 2 0 } ” ,x4)
38 end
Scilab code Exa 3.8 Determine structure and lattice parameter of mate-
rial
1 / / D e te rm i ne s t r u c t u r e and l a t t i c e p a r am e t er o f
12
material
2 clc
3 d = 11 4. 6 // d i a m et e r o f p ower c am er a i n a ng st ro m
4 l a m bd a = 1 .5 4 // w a ve l en g th i n a ng st ro m
5 s 1 = 86
6 s 2 = 100
7 s 3 = 148
8 s 4 = 180
9 s 5 = 188
10 s 6 = 232
11 s 7 = 272
12 printf ( ” \ n E xa mp le 3 . 8 ” )
13 R = d /2 / / R a di u s
14 if R==57.3 then
15 k = 1/4 // B ragg a n gl e f a c t o r
16 end
17 a 1 = ( sin (s1*k*%pi/180))^2
18 a 2 = ( sin (s2*k*%pi/180))^2
19 a 3 = ( sin (s3*k*%pi/180))^2
20 a 4 = ( sin (s4*k*%pi/180))^2
21 a 5 = ( sin (s5*k*%pi/180))^2
22 a 6 = ( sin (s6*k*%pi/180))^2
23 a 7 = ( sin (s7*k*%pi/180))^2
24 c = 2 2 // c o ns t an t t o c o n v er t i n t o i n t e g r a l number
25
26 printf ( ” \ n W it hi n e x pe r i m en t al e r r o r , v a l ue s a re a s
i n i n t e g r a l r a t i o a r e a s : \ n %d: %d: %d: %d: %d: %d: %d
” , ceil ( c * a 1 ) , ceil ( c * a 2 ) , ceil ( c * a 3 ) , ceil ( c * a 4 ) ,
ceil ( c * a 5 ) , ceil ( c * a 6 ) , ceil ( c * a 7 ) )
27 printf ( ” \ n S o , t h i s s t r u c t u r e i s FCC and m a t e r i a l i s
c o p p er w i th 3 . 6 2 a n gs t ro m l a t t i c e p a r am e t er ” )
13
Chapter 4
1 / / C a l cu l a te f r eq u en c y and w av el en gt h o f r a d i a t i o n
2 clc
3 E = 1 .6 4 e -1 8 // e ne rg y d i f f e r e n c e b et w ee n two s t a t e s
in J
4 h = 6 .6 26 e - 34 // p l an k s c o n st a n t
5 c = 2. 99 8 e8 // s p e e d o f l i g h t i n m/ s
6 printf ( ” \ n E xa mp le 4 . 1 ” )
7 n u = E/ h
8 l am bd a = c / nu
9 printf ( ” \ n F re qu en cy o f e mi t te d r a d i a t i o n i s %. 2 e Hz
” ,nu)
10 printf ( ” \ n Wa velen gth o f e m it t ed r a d i a t i o n i s %. 2 e m
\ n \ t \ t o r \ t \ t % d a n g s t r o m ” ,lambda ,lambda*1e10) //
a ns we r i n book i s 1 21 0 a ng st ro m
14
Scilab code Exa 4.3 Reconcile the difference of energy
1 // R e c o n c i l e t he d i f f e r e n c e o f e ne rg y
2 clc
3 e _a = 713 // e n th a lp y o f a t o m iz a t io n i n kJ / mol
4 e _b = 347 // bond e n er g y i n kJ / mol
5 a = 4 // t o t a l number o f atoms i n s i n g l e c r y s t a l
structure
6 b = 2 // number o f a to ms i n a bond
7 printf ( ” \ n E xa mp le 4 . 3 ” )
8 k = a/b // e f f e c t i v e number o f bond p er atom
9 e = k *e_b
10 printf ( ” \ n %d kJ s h ou l d be t he e n th a lp y o f
a t o m i z a t i o n o f diamond ” , e)
11 printf ( ” \ n However , %d k J i s v er y c l o s e t o %d k J” ,e ,
e_a)
Scilab code Exa 4.4 Calculation of fraction of hydrogen bonds which breaks
during ice melting
1 / / C a l cu l a t io n o f f r a c t i o n o f h yd ro ge n bo nd s wh ich
b r e ak s d ur in g i c e m e l t i n g
2 clc
3 d el _h = 6 .0 2 // e nt ha l p y o f f u s i o n i n kJ /mol
4 n = 2 // number o f h y dr o ge n atom i n 1 w a te r atom
5 d el _b = 2 0. 5 / / h yd ro ge n bond e n er g y i n kJ / mol
6 printf ( ” \ n E xa mp le 4 . 4 ” )
7 f = d el _h / ( n * d el _b )
8 printf ( ” \ n F r a c t i o n o f h yd ro ge n b on ds w hi ch b ro ke n
i s %. 2 f ” ,f )
15
Chapter 5
Structure of Solid
Scilab code Exa 5.1 Calculate packing efficiency and density of diamond
1 / / C a lc u l a te p ac k in g e f f i c i e n c y and d e n s i t y o f
diamond
2 clc
3 n _c = 1/8 / / s h a ri n g o f c o rn e r atom i n a u n it c e l l
4 N_c = 8 / / Number o f c o r n e r a tom s i n u n i t c e l l
5 n_b = 1 // s h a ri n g o f body c e nt e re d atom i n a u n it
cell
6 N_b = 4 // Number o f body c e n t e r e d a to ms i n u n i t
cell
7 n _f = 0.5 // s h a r in g o f f a c e c e n t e r e d atom i n a u n i t
cell
8 N_f = 6 // Number o f f a c e c e n t e r e d a to ms i n u n i t c e l l
9 a = 1 // l et l a t t i c e parameter
10 m = 1 2 // mass o f c ar bo n
11 printf ( ” \ n E xa mp le 5 . 1 ” )
12 printf ( ” \ n P a rt A : ” )
13 N = n _c * N _ c + n _ b * N _b + n _ f * N _ f // e f f e c t i v e number o f
atoms
14 r = a * sqrt (3)/8
15 p _e = N * 4 /3 * % pi * r ^ 3/ a ^ 3 // p ac ki ng effi cien cy
16
16
17 printf ( ” \ n P ac k in g e f f i c i e n c y o f diamond i s %. 2 f ” ,
p_e)
18 printf ( ” \ n \ n P ar t B : ” )
19 a = 3.57 / / l a t t i c e p a r a m e t e r i n a n g st r o m
20 d = m * 1 . 66 e - 2 7 * N / ( a *1 e - 1 0 ) ^ 3
21 printf ( ” \ n D e n s i t y o f d ia mo nd i s %d Kg/mˆ 3 ” ,d) //
n u me r ic a l a ns we r i n book i s 3 50 0
22 printf ( ” \ n D e n si t y o f diamond i s %. 1 f g /cmˆ3 ” ,d
/1000)
Scilab code Exa 5.3 Calculate the cation to anion ratio for an ideally close
packed HCP crystal
1 / / c a l c u l a t e t h e c /a r a t i o f o r an i d e a l l y c l o s e
p a ck e d HCP c r y s t a l
2 clc
3 a = 1 // l e t
4 PR = a
5 printf ( ” \ E xa m pl e 5 . 3 ” )
6 R T = a/ sqrt (3)
7 PT = sqrt (PR^2-RT^2)
8 c _a = 2* P T/ PR
9 / / C a l cu l a t i o n s a re made o n t h e c r y s t a l s t r u c t u r e
d ra wn i n b oo k
10 printf ( ” \ n c / a r a t i o f o r an i d e a l l y c l o s e p a c k ed HCP
c r y s t a l i s %0 . 3 f ” ,c_a)
Scilab code Exa 5.4 find the size of largest sphere that can fit into a tetra-
hedral void
17
1 / / f i n d t h e s i z e o f l a r g e s t s ph er e t ha t can f i t i nt o
a t e t r a h e d r a l v oi d
2 clc
3 r = 1 // l e t
4 a = 3/4
5 printf ( ” \ n E xa mp le 5 . 4 ” )
6 p t = 2* sqrt (2/3)*r
7 s = a *pt - r // s i z e o f s ph er e
8 printf ( ” \ n S i z e o f l a r g e s t s ph er e t h at ca n f i t i nt o
a t e t r a h e d r a l v oi d i s %. 3 f r ” ,s )
Scilab code Exa 5.5 Find critical radius ratio for triangular coordination
1 // f i n d c r i t i c a l r a d iu s r a t i o f o r t r i a n g u l a r
coordination
2 clc
3 t he ta = 60 // a n g l e i n d eg r e e
4 printf ( ” \ n E xa mp le 5 . 5 ” )
5 r _ c _a = ( 2/ 3 *2 * sin (theta*%pi/180))-1 // r a t i o
calculation
6 printf ( ” \ n C r i t i c a l r a d i u s r a t i o f o r t r i a n g u l a r
c o o r d i n a t i o n i s %0 . 3 f ” ,r_c_a)
1 / / C a l c u l a te d e n s i t y o f MgO
2 clc
3 r _m g = 0 .7 8 // r a d i u s o f magnesium c a t i o n i n
angstrom
18
4 r _o = 1 .3 2 // r a d i u s o f o xyg en a ni on i n a ng st ro m
5 n = 4 // e f f e c t i v e number o f u n it c e l l
6 m _o = 16 // mass o f o xy ge n
7 m _m g = 2 4. 3 / / m as s o f m ag ne si um
8 printf ( ” \ n E xa mp le 5 . 6 ” )
9 a = 2 *( r _m g + r_ o ) / / l a t t i c e p a r a m e t e r
10 d = ( m _ o + m _m g ) * 1 . 66 e - 2 7 * n / ( a * 1 e - 10 ) ^ 3 // d e n s i t y
11 printf ( ” \ n D e n s i t y o f MgO i s %d Kg /mˆ 3 ” ,d) / / a n sw er
i s 3 6 10 k g /mˆ 3
12 printf ( ” \ n D e n s i t y o f MgO i s %0 . 2 f g /cm ˆ3 ” ,d/1000)
19
Chapter 6
Crystal Imperfection
1 // F ind e q u i l i b r i u m c o n c en t r a ti o n o f v a c a n c i es i n
m et a ls a t g i v en t em p er a tu re
2 clc
3 t 1 = 0 // t em pe ra tu re i n k e l v i n
4 t 2 = 300 // t em pe ra tu re i n k e l v i n
5 t 3 = 900 // t em pe ra tu re i n k e l v i n
6 R = 8. 31 4 // u n i v e r s a l g as c o n s t a n t
7 d e l _h f _a l = 6 8 // E nt ha lp y o f f o r m a ti o n o f a lu mi ni um
c r y s t a l i n KJ
8 d e l _ hf _ ni = 1 68 // E n th a lp y o f f o r m a t io n o f n i c k e l
c r y s t a l i n KJ
9 printf ( ” \ n E xa mp le 6 . 1 ” )
10
11 printf ( ” \ n E q u il i br i um c o n c e n t r a t i o n o f v a c a n c i es o f
a lu mi ni um a t %dK i s 0 ” ,t1)
12 n _N = exp (-del_hf_al*1e3/(R*t2))
13 printf ( ” \ n E q u il i br i um c o n c e n t r a t i o n o f v a c a n c i es o f
a l um i ni u m a t %dK i s %. 2 e ” ,t2,n_N) // a ns we r i n
book i s 1 . 4 5 e −12
14 n _N = exp (-del_hf_al*1e3/(R*t3))
20
15 printf ( ” \ n E q u il i br i um c o n c e n t r a t i o n o f v a c a n c i es o f
a l um i ni u m a t %dK i s %. 2 e ” ,t3,n_N) // a ns we r i n
book i s 1 . 1 2 e −4
16
17 printf ( ” \ n \ n E q u i li b ri u m c o n c en t r a ti o n o f v a c a n c i es
o f N i ck e l a t %dK i s 0 ” ,t1)
18 n _N = exp (-del_hf_ni*1e3/(R*t2))
19 printf ( ” \ n E q u il i br i um c o n c e n t r a t i o n o f v a c a n c i es o f
N i c k e l a t %dK i s %. 2 e ” ,t2,n_N)
20 n _N = exp (-del_hf_ni*1e3/(R*t3))
21 printf ( ” \ n E q u il i br i um c o n c e n t r a t i o n o f v a c a n c i es o f
N i c k e l a t %dK i s %. 2 e ” ,t3,n_N) // a ns we r i n bo ok
i s 1 . 78 e −10
1 / / Compute t he l i n e e ne rg y o f d i s l o c a t i o n
2 clc
3 a = 2.87 / / l a t t i c e p a r a m e t e r i n a n g st r o m
4 b = 2 .4 9 // m ag ni tu de o f b u r g er s v e c t o r i n a ng st ro m
5 G = 80.2 / / s h e a r m od ul us i n GN
6 printf ( ” \ n E xa mp le 6 . 2 ” )
7 E = G * 1 e9 * ( b *1 e - 10 ) ^ 2 *1 /2
8 printf ( ” \ n L i ne e ne rg y o f d i s l o c a t i o n i s %. 2 e J mˆ −1
” ,E)
1 // c a l c u l a t i o n o f down c l im b o f c r y s t a l on h e a t i n g
21
2 clc
3 a = 1 e10 // t o t a l number o f e dg e d i s l o c a t i o n
4 N = 6 .0 23 e 23 / / A v o g ad r o n um be r
5 R = 8. 31 4 // U n i ve r s a l g as c o ns t an t
6 t 1 = 0 / / i n i t i a l t e m p e r a tu r e i n K
7 t 2 = 10 00 / / F i na l t em pe ra tu re i n K
8 d el _h f = 1 00 // E nt ha lp y o f v ac an cy f o rm a t io n i n KJ
9 d = 2 // l e n g t h o f one s t ep i n a ng st r o m
10 v = 5.5 e -6 // vo lume o f one mole c r y s t a l
11 printf ( ” \ n E xa mp le 6 . 4 ” )
12 n = N * exp (-(del_hf*1e3)/(R*(t2-t1)))/v
13 k = 1 /( d *1 e - 10 ) // atoms r e q u i r e d f o r 1 m c l im b
14 b = n /( k* a) / / a v e ra g e amount o f c l im b
15 c = b *d *1 e -1 0
16
17 printf ( ” \ n A ver ag e down c li mb o f c r y s t a l i s %. 2 em” ,c
)
Scilab code Exa 6.5 Calculate surface energy of copper crystal of type 111
1 // C a lc u l a te s u r f a c e e ne rg y o f c o pp er c r y s t a l o f
type {111}
2 clc
3 E = 56.4 // bond e n er g y i n KJ
4 N_a = 6 .0 23 e 2 3 // A v o g a d r o s number
5 n = 1 2 / / number o f b on ds
6 m = 3 // number o f b r ok e n b on ds
7 N = 1 .7 7 e19 // number o f atoms i n c op pe r c r y s t a l of
type {111} per mˆ2
8 printf ( ” \ n E xa mp le 6 . 5 ” )
9 b _e = 1 /2 * E *1 e 3 * n/ N _a // bond e n e r g y p e r atom
10 e _ b = b _e * m/ n // e ne rg y o f b ro ke n bond a t s u r f a c e
11 s _e = e _b * N // s u r f a c e e nt ha l p y o f c op pe r
22
12 printf ( ” \ n S u r f a ce e nt ha l p y o f c op pe r i s %0 . 2 f J m
ˆ−2” ,s_e)
13 printf ( ” \ n S u r f a ce e nt ha l p y o f c op pe r i s %d e r g cm
ˆ−2” ,s_e*1e3)
14 / / A nswer i n b oo k i s 2 49 0 e r g cmˆ −2
Scilab code Exa 6.6 Compute the angle at the bottom of groove of a
boundary
1 / / Compute t he a n g l e a t t he bottom o f g r oo ve o f a
boundary
2 clc
3 G a m ma _g b = 1 // l e t , e ne rg y o f g r a i n b ou n da ry
4 G a m ma _ s = 3 * G a mm a _g b // e n e r g y o f f r e e s u r f a c e
5 printf ( ” \ n E xa mp le 6 . 6 ” )
6 t he ta = 2* acos (1/2*Gamma_gb/Gamma_s)
7 printf ( ” \ n A ng le a t t he bottom o f g ro ov e o f a
b ou nd ar y i s %d d e g r e e s . ” , ceil (theta*180/%pi))
23
Chapter 7
Phase Diagram
Scilab code Exa 7.1 Find degrees of freedom of a system of two compo-
nents
1 / / F ind d e g re e s o f f re ed om o f a s ys te m o f two
components
2 clc
3 c = 2 / / nu mber o f c o mp o ne n ts
4 printf ( ” \ n E xa mp le 7 . 1 ” )
5 for n = 1 : 4
6 p = (c -1) +2 // T ot a l v a r i a b l e s
7 f = c -n +2 // d e gr e e o f f re ed om
8 printf ( ” \ n \ n D e gr ee o f f re ed om f o r two
c o m p o n e n t s wh en \ n n umber o f p ha se s i s %d i s
%d” ,n,f)
9 end
24
1 / / F in d minimum n um ber o f c om po ne nt i n s y s t em
2 clc
3 p = 4 // number o f p h a se s o f s ys te m
4 f = 0 // number o f d e g re e o f s ys te m
5
6 printf ( ” \ n E xa mp le 7 . 2 ” )
7 C = f +p -1 / / c o m po n e n ts n um ber
8 printf ( ” \ n Minimum n umber o f c o mp o ne n ts i n s y s te m i s
%d” ,C)
Scilab code Exa 7.3 Calculate amount of pure water that can be extracted
from sea water
1 / / C a l c u l a te amount o f p ur e w at er t h at ca n b e
e x t r a c t ed from s e a w at er
2 clc
3 L = 23.3 / / % c o m po s i t io n o f L
4 a = 3.5 // c o n c e n t r a t i o n o f N a c l i n s ea w a te r
5 ice = 0 // % co m p o si t i o n o f i c e
6 printf ( ” \ n E xa mp le 7 . 3 ” )
7 f _i ce = ( L - a) / (L - i ce )
8 printf ( ” \ n F r a c t i o n a l amount o f p ur e w at er t h at ca n
be e x t r a c t ed fro m s e a w at er i s %0 . 2 f ” ,f_ice)
Scilab code Exa 7.5 Calculate proeutectoid ferrite and eutectoid ferrite in
6 tenth percent steel
25
2 clc
3 a = 0 // l i m i t i n g v al ue
4 b = 0.8 // l i m i t i n g v al ue
5 c = 0.6 // p e r ce n t a ge c o mp o s it i on o f c ar bo n
6 f = 0.88 // f r a c t i o n o f f e r r i t e i n a e u t e c t o i d s t e e l
7 printf ( ” \ n E xa mp le 7 . 5 ” )
8 f _ p r o _a l p ha = ( b - c ) /( b - a )
9 f _p er li te = 1 - f _p ro _a lp ha
10 f _e ut = f * f _ pe r li t e
11 printf ( ” \ n C om p os i ti o n o f p r o e u t e c t o i d f e r r i t e i s %0
. 2 f ” ,f_pro_alpha)
12 printf ( ” \ n C om p os i ti o n o f e u t e c t o i d f e r r i t e i s %0 . 2 f
” ,f_eut)
26
Chapter 8
Diffusion in Solids
Scilab code Exa 8.1 Calculate the rate at which hydrogen escapes through
the walls of the steel tank
1 / / c a l c u l a t e t he r a t e a t whi ch h y dr og en e s c a p e s
t h r o ug h t h e w a l l s o f t h e s t e e l t a n k
2 clc
3 t = 5 // t h i c k n e s s i n mm
4 c = 1 0 // c o n c e n t r a t i o n
5 D = 1e -9 / / d i f f u s i o n c o e f f i c i e n t
6 printf ( ” \ n E xa mp le 8 . 1 ” )
7 j = D *c /( t*1 e -3)
8 printf ( ” \ n Outward f l u x i s %. 0 e kg mˆ −2 s ˆ−1” ,j)
Scilab code Exa 8.2 Calculate maximum time till which material can be
kept at 550 degree Celsius
1 / / C a l c u l a t e maximum t i me t i l l w hi ch m a t e r i a l c an b e
k ep t a t 5 5 0 d e g r e e C e l s i u s
2 clc
27
3 D _0 = 0 .2 4e - 4 / / d i f f u s i o n c o e f f i c i e n t
4 Q = 121 e3
5 R = 8. 31 4 // U n i ve r s a l g as c o ns t an t
6 T = 550 // t em pe ra tu re i n C e l s i u s
7 k = 0.2 // t h i c k n e s s o f p ur e Al s h e e t i n mm
8 d = 0.1 // p e n e t r a t i o n d ep th i n mm
9 c _x = 0.4 // c o n c e n t r a t i o n i n p e rc e n t ag e
10 A = 2 // C on st an t i n p e r ce n t ag e
11 B = 2 // C on st an t i n p e r ce n t ag e
12 printf ( ” \ n E xa mp le 8 . 2 ” )
13 x = d -k
14 D _c u_ al = D _0 * exp (-Q/(R*(T+273)))
15 k = ( A- c _x ) / B
16 if k = =0 .8 then
17 z = 0.9 // fro m t a b l e
18 end
19 t = ( x * 1 e - 3) ^ 2 / ( z ^ 2 * 4* D _ c u_ a l ) // t i m e i n s e c
20
21 printf ( ” \ n M a te r ia l can be k ep t a t %d d e g re e C e l s i u s
f o r n e a r l y %d m in ut e ” ,T,t/60) // a ns we r i n b oo k
i s 1 00 min
Scilab code Exa 8.3 Calculate minimum depth up to which post machin-
ing is to be done
1 / / C a l c u l a t e minimum d ep t h u p t o w hi ch p o s t
m ac hi ni ng i s t o be done
2 clc
3 D _ 0 = 0 .7 e -4 / / d i f f u s i o n c o e f f i c i e n t
4 Q = 157 // E ne rg y i n kJ mol ˆ − 1 , c o n s i d e r e d fro m
t a b le 8 .2
5 R = 8. 31 4 // U n i ve r s a l g as c o ns t an t
6 T = 950 // t em pe ra tu re i n C e l s i u s
28
7 c 2 = 0.8 // c o n c e n t r a t i o n i n p e rc e nt a g e
8 c s = 0 // c o n c en t r a ti o n i n p e rc e n t ag e
9 c _x = 0.6 // c o n c e n t r a t i o n i n p e rc e nt a g e
10 t = 4 // t i me i n h ou rs
11 a = 1 // le t
12 printf ( ” \ n E xa mp le 8 . 3 ” )
13 A = cs
14 B = c2 - cs
15 D = D_0 *exp (-Q*1e3/(R*(T+273)))
16 k = erf (((A-c_x)/B))*-1
17 if k > 0. 7 then
18 if k<0.712 then
19 z = 0.81 // fro m t a b l e
20 end
21
22 end
23 x = z *2* sqrt (D*t*3600)
24
25 printf ( ” \ n D epth up t o wh ich m ac hi ni ng i s required
i s n e a r l y %. 2 f mm” ,x*1e3)
26 // n u m er i c al v a l u e o f a ns we r i n book i s 0 . 75
Scilab code Exa 8.4 Calculate time required to get required boron con-
centration
1 // C a l cu l a te t i me r e q u i r e d t o g et r e q u i r e d b o ro n
concentration
2 clc
3 D = 4e -17 / / d i f f u s i o n c o e f f i c i e n t
4 c1 = 0
5 cs = 3 e26
6 c_x = 1 e23 / / nu mber o f a to ms
7 x = 2e -6 // d e p t h i n m
29
8 printf ( ” \ n E xa mp le 8 . 4 ” )
9 A = cs
10 B = cs - c1
11 k = ( A- c _x ) / B
12 if k > 0 .9 9 96 6 then
13 if k < 0 .9 9 97 then
14 z = 2.55 // fro m t a b l e
15 end
16 end
17 t = x ^ 2/ ( z ^ 2* 4* D ) // t i m e i n s e c
18
19 printf ( ” \ n Time r e q u i r e d t o g et r e q u i r e d b or o n
c o n c e n t r a t i o n i s %d s e c ” ,t) // a ns we r i n book i s
3 84 5 s e c
1 // C a l c u l a t e r a t i o o f c r o s s s e c t i o n a l a r e a s
2 clc
3 r = 1 0 // r a d i u s i n mm
4 t = 4 // t h i c k n e s s i n a n gs tr o m
5 printf ( ” \ n E xa mp le 8 . 5 ” )
6 r = 2 * % pi * r * 1 e - 3 * t *1 e - 1 0 / ( % pi * ( r * 1 e - 3 ) ^ 2)
7 printf ( ” \ n R a t i o o f c r o s s s e c t i o n a l a r e a s i s %. 0 e ” ,
r)
30
Chapter 9
Phase Transformation
Scilab code Exa 9.1 Calculate the critical free energy of nucleation of ice
from water and critical radius
1 // C a l c u l a te t he c r i t i c a l f r e e e ne rg y o f n u c l e a t i o n
o f i c e f ro m w a te r and c r i t i c a l r a d i u s
2 clc
3 d el _t 1 = 0 // t em pe ra tu re d i f f e r e n c e i n d e gr e e
Celsius
4 d e l_ t2 = -5 // t em pe ra tu re d i f f e r e n c e i n d e g r ee
Celsius
5 d el _t 3 = -40 // t em pe ra tu re d i f f e r e n c e i n d eg re e
Celsius
6 d el _h = 6 .0 2 // e nt ha l p y o f f u s i o n i n kJ /mol
7 T _m = 273 / / mean t e m p e r a t u r e
8 G am ma = 0 .0 76 // e n er g y o f i c e w a t e r i n t e r f a c e in J
/mˆ2
9 v = 1 9 // m ol ar volume o f i c e
10 printf ( ” \ n E xa mp le 9 . 1 ” )
11 printf ( ” \ n P a rt A” )
12 printf ( ” \ n At d e l t = %d , t h er e i s no s u p e r c o o l i n g .
So t h e r e i s no c r i t i c a l r a d i u s ” ,del_t1)
13 printf ( ” \ n \ n P ar t B” )
14 d e l_ f = 1 6 /3 * % p i * ( G a mm a ) ^ 3 * T _m ^ 2 / ( ( d e l _h * 1 e 3 * 1 e 6 / v )
31
^2*del_t2^2)
15 r = 2 * T _m * G a m m a / ( - d e l_ h * 1 e 3 * 1 e 6 / v* d e l _ t2 )
16 printf ( ” \ n C r i t i c a l f r e e e n e r g y o f n u c l e a t i o n i s %. 1
eJ ” ,del_f)
17 printf ( ” \ n C r i t i c a l r a d i u s i s %d a ng s t r o m ” , ceil (r*1
e10))
18 printf ( ” \ n \ n P ar t C” )
19 t e m p _r = d e l_ t 3 / d e l _t 2
20 d e l _ f_ = d e l_ f / t e m p _r ^ 2
21 r _ = r / te mp _r
22
23 printf ( ” \ n C r i t i c a l f r e e e n e r g y o f n u c l e a t i o n i s %
. 1 e J ” ,del_f_)
24 printf ( ” \ n C r i t i c a l r a d i us i s %d a ng st r o m . ” , ceil ( r_
*1e10))
Scilab code Exa 9.2 Calculate the change in delta f required to increase
nucleation rate
1 // C a lc u l a te t h e c ha n g e i n d e l f r e qu i r e d t o
i n c r ea s e n u cl e at i on r a te
2 clc
3 T = 3 00 // t em pe ra tu re i n k e l v i n
4 R = 8. 31 4 // u n i v e r s a l g as c o n s t a n t
5 k = 2. 30 3 // c o nv e r s i o n f a c t o r
6 a1 = 1 e42
7 a2 = 1 e6 // n u c l e a t i o n r a t e
8 a3 = 1 e10 // n u c l e a t i o n r a t e
9 printf ( ” E x a mp l e 9 . 2 ” )
10 I 1 = ( log10 ( a 1 ) - log10 (a2))*k*R*T // e xp on en t f a c t o r
11 I 2 = ( log10 ( a 1 ) - log10 (a3))*k*R*T // e xp on en t f a c t o r
12 d el _f = I1 - I 2 // d i f f e r e n c e
13 a = 10^( log10 ( a 3 ) - log10 ( a 2 ) )
32
14
15 printf ( ” \ n A c ha ng e o f %d KJ m olˆ −1 e n er gy i s
r e q u i r e d t o i n c r e a s e n u c l e a t i o n f a c t o r fro m \ n %
. 0 e mˆ −3 s ˆ−1 t o %. 0 e mˆ −3 s ˆ −1 ” , ceil (del_f/1
e3),a,a3)
1 / / C a l cu l a te d e l f h e t a s a f r a c t i o n o f d el f h o mo
2 clc
3 G a mm a _a l ph a _d e l = 0 .5 // i n J mˆ −2
4 G a m m a _ a lp h a _ be t a = 0 .5 / / i n J mˆ −2
5 G a m m a _ be t a _ de l = 0 . 01 / / i n J mˆ −2
6
7 printf ( ” \ n E xa mp le 9 . 4 ” )
8 t h et a = acos ( ( G a m m a _ al p h a _ de l - G a m m a _b e t a _d e l ) /
Gamma_alpha_beta)
9 d e l _ f _ ra t i o = 1 / 4* ( 2 - 3 * cos (theta)+( cos (theta))^3)
10
11
12 printf ( ” \ n d e l f h e t i s %0 . 4 f th f r a c t i o n o f
d e l f h o m o . ” ,del_f_ratio)
Scilab code Exa 9.6 Calculate the free energy change during recrystalliza-
tion
1 / / C a l cu l a te t he f r e e e ne rg y c h a ng e d ur in g
recrystallization
33
2 clc
3 m u = 4 5. 5 e9
4 b = 2 .5 5 e -1 0
5 n1 = 1 e9 // i n i t i a l d i s l o c a t i o n d e n s i t y
6 n2 = 1 e13 // f i n a l d i s l o c a t i o n d en s i ty
7 printf ( ” \ n E xa mp le 9 . 6 ” )
8 E = 1 /2 * m u *b ^ 2* n 2
9 del_g = E // a s d i f f e r e n c e b et wee n i n i t i a l and f i n a l
d i s l o c a t i o n e ne rg y i s f o u r o r de r m a gn i t u d e
10 printf ( ” \ n F re e e ne rg y c ha ng e d u ri n g
r e c r y s t a l l i z a t i o n i s %d J mˆ −3” ,-del_g)
11 // N um er ic al v a lu e o f a ns we r i n book i s 1 48 00
34
Chapter 10
1 // E st im at e y o u n g s modulus o f m a t e r i a l
2 clc
3 n = 1
4 m = 9
5 A = 7 .6 8 e -2 9 // C on st an t h av in g u n i t J m
6 r _0 = 2 .5 e -1 0 // b on di n g d i s t a n ce i n m
7 printf ( ” \ n E xa mp le 1 0 . 1 ” )
8 B = A * r_ 0 ^8 /9
9
10 Y = ( 9 0* B / ( r _ 0 ) ^ 1 1 - 2* A / ( r _ 0 ) ^ 3) / r _ 0
11
12 printf ( ” \ n Y o u n g s modulus o f m a t e r i a l i s %d GN m
ˆ−2” ,Y/1e9)
35
Scilab code Exa 10.2 Calculation of stress in fibers
1 // C a l c u l a t i o n o f s t r e s s i n f i b e r s
2 clc
3 Y _f = 440
4 Y _m = 71
5 s i g m a _ t ot a l = 1 0 0 // t o t a l l oa d
6 printf ( ” \ n E xa mp le 1 0 . 2 ” )
7 r = Y_f / Y_m
8 s i g m a _ f = r * ( s i g m a _t o t al / 0 .7 ) / ( 1 + r * 3 /7 )
9 printf ( ” \ n P a rt A : ” )
10 printf ( ” \ n When l o a d i s a p p l i e d p a r a l l e l t o f i b e r
th en , s t r e s s i n f i b e r i s %d MN mˆ −2” ,sigma_f)
11
12 printf ( ” \ n \ n P ar t B : ” )
13 printf ( ” \ n When l o a d i s a p p li e d p e r p en d i c u l a r t o
f i b e r then , s t r e s s i n f i b e r and m a tr ix i s same i .
e . %d MN mˆ −2” ,sigma_total)
1 // Estimate d i ff u si o n coefficient
2 clc
3 t _r = 100 // r e l a x a t i o n t i m e i n s
4 d = 2.5 // d i s t a n c e i n a ng st ro m
5 printf ( ” \ n E xa mp le 1 0 . 3 ” )
6 f = 1/ t_r / / j ump f r e q u e n c y
7 D = ( d *1 e - 10 ) ^ 2* f
8 printf ( ” \ n D i f f u s i o n c o e f f i c i e n t i s %. 2 e mˆ 2 s ˆ −1” ,D
)
36
Chapter 11
Scilab code Exa 11.2 Calculate the stress required to move the dislocation
at given temperature
1 / / C a lc u l a te t h e s t r e s s r e q u i r e d t o move t h e
d i s l o c a t i o n a t g i v en t em pe ra tu re
2 clc
3 b = 2 // b u rg e r v e c t o r i n a ng st ro m
4 v = 20* b ^3 // a c t i v a t i o n volume
5 t a u _p n = 1 00 0 // P−N s t r e s s o f c r y s t a l i n MNmˆ −2
6 k = 1 .3 8 e -2 3 // p h y s i c a l c o ns t an t
7 t 1 = 0 // t em p er at u re i n K
8 t 2 = 100 // t em p er a tu re i n K
9 t 3 = 300 // t em p er a tu re i n K
10 t 4 = 500 // t em p er a tu re i n K
11 printf ( ” \ n E xa mp le 1 1 . 2 ” )
12 printf ( ” \ n \ n P a rt A : ” )
13 T = t1
14 t a u_ a pp = t au _ pn - 4 0* k * T /( v * 1e - 3 0)
15 printf ( ” \ n The s t r e s s r e q u i r e d t o move t he
d i s l o c a t i o n a t t e m p e r a t u r e %dK i s %d MNmˆ −2” ,T ,
tau_app)
37
16 printf ( ” \ n \ n P ar t B : ” )
17 T = t2
18 t a u_ a pp = t au _ pn - 4 0* k * T /( v * 1e - 3 0* 1 e 6 )
19 printf ( ” \ n The s t r e s s r e q u i r e d t o move t he
d i s l o c a t i o n a t t e m p e r a t u r e %dK i s %d MNmˆ −2” ,T ,
tau_app)
20 printf ( ” \ n \ n P a rt C : ” )
21 T = t3
22 t a u_ a pp = t au _ pn - 4 0* k * T /( v * 1e - 3 0* 1 e 6 )
23 if tau_app <0 then
24 printf ( ” \ n S t r e s s t o be a p p l i e d i s z er o ” )
25 printf ( ” \ n The s t r e s s r e q u i r e d t o move t he
d i s l o c a t i o n a t t em pe ra tu re %dK e n t i r e l y
o ve rc om e by t h er m al f l u c t u a t i o n s ” , T )
26 end
27 printf ( ” \ n \ n P a rt D : ” )
28 T = t4
29 t a u_ a pp = t au _ pn - 4 0* k * T /( v * 1e - 3 0* 1 e 6 )
30 if tau_app <0 then
31 printf ( ” \ n S t r e s s t o be a p p l i e d i s z er o ” )
32 printf ( ” \ n The s t r e s s r e q u i r e d t o move t he
d i s l o c a t i o n a t t em pe ra tu re %dK e n t i r e l y
o ve rc om e by t h er m al f l u c t u a t i o n s ” , T )
33 end
1 // C a lc u l a te t h e d i s l o c a t i o n d e n s i t y i n c o pp er
2 clc
3 m u = 44 / / s h e a r m od ul us o f c o pp e r i n GN mˆ −2
4 b = 2.55 // b u r g er s v e c t o r i n a ng st ro m
5 t au = 35 // s h e ar s t r e s s i n MN mˆ −2
6 printf ( ” E xa mp le 1 1 . 3 ” )
38
7 l = m u *1 e 9 * b *1 e - 1 0/ ( t au * 1 e6 )
8 r ho = 1/ l ^2
9
10 printf ( ” \ n D i s l o c a t i o n d e n s i t y i n c o pp e r i s %. 1 e m
ˆ−2” ,rho)
11 / / Answer i n b oo k i s 1 e 1 2 mˆ −2
Scilab code Exa 11.4 Find the yield stress for a grain size of ASTM 9
1 // Find t h e y i e l d s t r e s s f o r a g r a i n s i z e o f ASTM 9
2 clc
3 s ig ma 1 = 1 20 // i n i t i a l y i e l d s t r e n g t h o f m a t e r i a l
i n MNmˆ −2
4 s ig ma 2 = 2 20 // F in a l y i el d s tr en gt h o f m at er ia l i n
MN mˆ−2
5 d 1 = 0. 04 / / i n i t i a l d i a m e t e r i n mm
6 d 2 = 0. 01 // f i n a l d ia me te r i n mm
7 n = 9 / / a st m n um be r
8 printf ( ” E xa mp le 1 1 . 4 ” )
9 k = ( s i gm a2 - s i g m a1 ) * 1 e 6 / ( 1 / sqrt (d2*1e-3)-1/ sqrt (d1*1
e-3))
10 s i g ma _ i = s ig m a1 * 1 e 6 - k / sqrt ((d1*1e-3))
11 d = 1 / sqrt (2^(n-1)*1e4/645)
12 s i g m a _y = s i g ma _ i + k * ( d * 1e - 3 ) ^ ( - 0 . 5)
13
14 printf ( ” \ n Y ie ld s t r e s s f o r a g r a i n s i z e o f ASTM 9
i s %d MN mˆ −2” , ceil (sigma_y/1e6))
39
1 / / E st im at e t he c ha ng e i n y i e l d s t r en g t h
2 clc
3 n1 = 1 e6 // i n i t i a l number o f p a r t i c l e s
4 n2 = 1 e3 // f i n a l number o f p a r t i c l e
5 printf ( ” \ n E xa mp le 1 1 . 5 ” )
6 k = ( n 1 / n2 ) ^ ( 1/ 3)
7 printf ( ” \ n Y i e l d s t r en g t h would ha ve d e cr e as e d t o
%d%% o f i t s i n i t i a l v a l u e . ” ,100/k)
40
Chapter 12
Fracture
1 / / E st im at e f r a c t u r e s t r en g t h
2 clc
3 c = 2 // c ra ck o f h a l f l e n g t h i n m i c r o m e te r
4 Y = 7 0 / / y o u n g s m od ul us i n GN mˆ −2
5 Gamma = 1 / / s p e c i f i c s u r f a c e e n e r g y
6 printf ( ” \ n E xa mp le 1 2 . 1 ” )
7 s i g ma _ f = sqrt (2*Gamma*Y*1e9/(%pi*c*1e-6))/1e6
8 r = Y * 1 e3 / s i gm a _f
9 printf ( ” \ n F r a c t u r e s t r e n g t h o f %d MN mˆ −2 i s 1 /%dth
o f y o u n g s m od ul us . ” , ceil ( s i g m a _ f ) , ceil ( r
/100)*100)
10 printf ( ” \ n Thus G r i f f i t h s c r i t e r i o n b r i d g e s t h e gap
b e tw e en t h e \ n o bs er ve d a nd i d e a l s t r en g t h s o f
b r i t t l e ma te ri al ” )
Scilab code Exa 12.2 Estimate the brittle fracture strength at low tem-
peratures
41
1 // E st im at e t he b r i t t l e f r a c t u r e s t r e n g t h a t lo w
temperatures
2 clc
3 G a mm a = 1 .5 / / s p e c i f i c s u r f a c e e n e r g y i n J /mˆ 2
4 Y = 200 / / Y o u n g s m o du l us i n GN/mˆ 2
5 c = 2 // h a l f l e n g t h o f c ra ck
6
7 printf ( ” \ n E xa mp le 1 2 . 2 ” )
8 s i g ma _ f = sqrt (2*Gamma*Y*1e9/(%pi*c*1e-6))
9
10 printf ( ” \ n B r i t t l e f r a c t u r e s t r e n g t h a t lo w
t e m p e r a t u r e s i s %d MNmˆ −2 ” ,sigma_f/1e6) / / a n sw er
in book i s 310MNmˆ−2
Scilab code Exa 12.3 Estimate the temperature at which the ductility of
brittle transition occurs at given strain rates
1 / / E st im at e t he t em pe ra tu re a t wh i ch t he duct ili ty
o f b r i t t l e t r a n s i t i o n o c cu r s a t g i ve n s t r a i n
rates
2 clc
3 Gamma = 2 / / s p e c i f i c s u r f a c e e n e r g y i n J /mˆ 2
4 Y = 350 / / Y o u n g s m o du l us i n GN/mˆ 2
5 c = 2 // h a l f l e n g t h o f c ra ck
6 d e_ dt 1 = 1 e -2 // s t r a i n r a t e
7 d e_ dt 2 = 1 e -5 // s t r a i n r a t e
8 printf ( ” \ n E xa mp le 1 2 . 3 ” )
9 printf ( ” \ n P a rt A : ” )
10 s i g ma _ f = sqrt (2*Gamma*Y*1e9/(%pi*c*1e-6))
11 s i gm a _y = s i gm a _f / 1 e 6
12 T = 1 7 3 60 0 / ( s i gm a _y - 2 0. 6 - 6 1 . 3* log10 (de_dt1)) //
t em p er a tu r e c a l c u l a t i o n
13
42
14 printf ( ” \ n T r a n s i t io n t em pe ra tu re f o r s t r a i n r a t e %
. 0 e s ˆ−1 i s %d K” ,de_dt1 ,T) // a ns we r i n book i s
300 K
15 printf ( ” \ n \ n P ar t B : ” )
16
17 T = 1 7 3 60 0 / ( s i gm a _y - 2 0. 6 - 6 1 . 3* log10 (de_dt2)) //
t em p er a tu r e c a l c u l a t i o n
18
19 printf ( ” \ n T r a n s i t io n t em pe ra tu re f o r s t r a i n r a t e %
. 0 e s ˆ−1 i s %d K” ,de_dt2 ,T) // a ns we r i n book i s
230 K
20 // S o l u t io n i n b ook f o r two p a rt s i s d i v i d e d i n t o
t h re e p a rt s
43
Chapter 13
1 // C a l c u l a t i o n o f r e q u i r e d q u a nt i t y o f magnesium
2 clc
3 j = 1 5 // c u r r e n t d e n s i t y i n mA mˆ −2
4 m = 0 .0 24 3 / / m o la r m as s o f m ag ne si um
5 F = 96 49 0 // f a ra d c ha rg e
6 n = 2 // c ha r g e on i o n
7 t = 1 0 // t i m e i n y ea r s
8 printf ( ” \ n E xa mp le 1 3 . 2 ” )
9 a = m * j * 1 e - 3* ( t * 3 6 5 * 2 4* 3 6 0 0) / ( n * F )
10 printf ( ” \ n A mount o f ma gn es iu m r e q u i r e d i s %0 . 1 f kg
mˆ −2” ,a )
44
Chapter 14
1 / / C a lc u l a te e ne rg y d i f f e r e n c e
2 clc
3 n _x1 = 1 // a to mi c l e v e l
4 n _y1 = 1 // a to mi c l e v e l
5 n _z1 = 1 // a to mi c l e v e l
6 n _x2 = 2 // a to mi c l e v e l
7 L = 1 0 / / l a t t i c e p a r a m e t e r i n mm
8 h = 6 .6 26 e - 34 // p la nk c o n st a n t
9 m _ e = 9 .1 09 e - 31 // mass o f e l e c t r o n i n kg
10 printf ( ” \ n E xa mp le 1 4 . 1 ” )
11 E 1 = h ^ 2 * ( n _ x1 ^ 2 + n _ y 1 ^ 2 + n _z 1 ^ 2 ) / ( 8* m _ e * ( L * 1 e - 3) ^ 2 )
12 E 2 = h ^ 2 * ( n _ x2 ^ 2 + n _ y 1 ^ 2 + n _z 1 ^ 2 ) / ( 8* m _ e * ( L * 1 e - 3) ^ 2 )
13 E = E2 - E1 // e ne rg y d i f f e r e n c e
14 printf ( ” \ n En ergy d i f f e r e n c e i s %. 2 e J ” ,E )
45
1 / / C a lc u l a te c o n d u c t i v i t y o f c op pe r a t 30 0 K
2 clc
3 t au = 2 e -1 4 // c o l l i s i o n t im e o f e l e c t r o n i n s
4 e = 1 .6 02 e - 19 // c ha rg e on e l e c t r o n
5 m _e = 9 .1 e -3 1 // mass o f e l e c t r o n i n kg
6
7 printf ( ” \ n E xa mp le 1 4 . 2 ” )
8 n = 6 . 02 3 e 2 3 * 8 9 6 0 / 0. 0 6 3 54
9
10 s i gm a = n * e ^ 2* t a u / m _ e
11 printf ( ” \ n C o n d u c t i v i t y o f c op pe r a t 30 0 K i s %. 1 e
ohmˆ−1 mˆ −1 ” ,sigma)
1 // Estimati on of r e s i s t i v i t y d ue t o i m p u r i t y
s c a t t e r i n g o f 1% o f N i c k el i n c op pe r l a t t i c e
2 clc
3 r _c u = 1 .8 e -8 / / r e s i s t i v i t y o f p u r e c o p p e r i n ohm−m
4 r _N i_ cu = 7 e -8 / / r e s i s t i v i t y o f c o p p e r 4% N i i n ohm−
m
5 p er1 = 4 / / i m p u ri t y i n p e r c e n t
6 p er2 = 1 // i m p ur i t y i n p e rc e nt
7 printf ( ” \ n E xa mp le 1 4 . 3 ” )
8 r = ( r _ Ni _c u - r _ c u ) * p er 2 / p e r1 // r e s i s t i v i t y o f
c o p p er 1% Ni i n ohm−m
9 printf ( ” \ n R e s i s t i v i t y due t o i mp ur i ty s c a t t e r i n g o f
1 %% o f N i c k e l i n c o p p er l a t t i c e i s %. 1 e ohm−m” ,
r)
46
Chapter 15
Semiconductors
1 // Calculate i n t r i n s i c ca rr ie r density
2 clc
3 r ho = 3 00 0 // r e s i s t i v i t y in ohm m
4 m u_ e = 0 .1 4
5 m u_ h = 0 .0 5
6 e = 1 .6 02 e - 19 // c ha rg e on e l e c t r o n
7 printf ( ” \ n E xa mp le 1 5 . 1 ” )
8 s ig ma = 1/ r ho
9 n = s ig ma / ( ( m u_ e + m u_ h ) *e )
10 printf ( ” \ n I n t r i n s i c c a r r i e r d e n s i t y i s % . 3 e mˆ −3” ,n
)
47
Chapter 16
Magnetic Materials
Scilab code Exa 16.1 Calculate the net magnetic moment per iron atom
in crystal
1 / / C a l c u l a t e t h e n e t m a gn e ti c moment p e r i r o n atom
i n c r y st a l
2 clc
3 a = 2.87 / / l a t t i c e p a r a m e t e r i n a n g st r o m
4 n = 2 / / number o f a to ms p e r u n i t c e l l
5 m = 1750 // S a t u r a t i o n m a g n e t i z at i o n i n kAmˆ −1
6 m u = 9 .2 73 e - 24 / / b o hr m ag ne to n
7 printf ( ” \ n E xa mp le 1 6 . 1 ” )
8 m _a t om = m * 1 e3 * ( a *1 e - 10 ) ^ 3 / n
9 m u _b = m _a to m / m u
10
11 printf ( ” \ n Net m a g ne t i c m oment p e r i r o n atom i n
c r y s t a l i s %. 3 e Amˆ 2 ” ,m_atom)
12 printf ( ” \ n I n u n i t o f mu b , Net m a gn et i c moment p e r
i r o n atom i n c r y s t a l i s %. 1 f ” ,mu_b)
48
Scilab code Exa 16.2 Comparison of saturation temperatures
1 / / Com pa ris on o f s a t u r a t i o n t e mp e ra t ur e s
2 clc
3 t 1 = 0 // t em pe ra tu re i n k e l v i n
4 t 2 = 300 // t em pe ra tu re i n k e l v i n
5 m _ n et _G d = 7 // n e t m a g ne t i c m oment o f g a d o l i n i u m
6 m _ n et _ Co = 1 .7 // n et m a gn et i c moment o f c o b a l t
7 t _c _G d = 2 89 // c u r i e t em pe ra tu re f o r Gd
8 printf ( ” \ n E xa mp le 1 6 . 2 ” )
9 printf ( ” \ n P a rt A : ” )
10 if m_net_Gd > m_net_Co then
11 printf ( ” \ n At %d K , N et m a g n e t i c moment o f
g a do l in i um i . e . %d i s g r e a t e r t ha n n et m ag ne ti c
moment o f c o b a l t i . e . %. 1 f ” ,t1,m_net_Gd ,m_net_Co
)
12 printf ( ” \ n S o , Gd w i l l h ave h i g h e r s a t u r a t i o n
magn etiza tion ”)
13 end
14 printf ( ” \ n \ n P ar t B : ” )
15 if t_c_Gd <t2 then
16 printf ( ” \ n At t em p er a tu re %d K, Gd i s a bo ve i t s
c u r i e t e m p e r at u r e o f %dK” ,t2,t_c_Gd)
17 printf ( ” \ n Gd w i l l be p ar am a gn et ic a t %d K and
w i l l h a ve n e g l i g i b l e m a g n e ti za t i o n \ n a s
compared t o Co , whi ch h as h i g h e r c u r i e
t e m p e r a t u r e ” ,t2)
18 end
1 // C a l c u l a t i o n o f h y s t e r es i s l o s s
2 clc
49
3 v = 0.01 / / v ol um e i n mˆ 3
4 x = 1e -4 // a x i s i n t e r c e p t
5 y = 1 e2 // a x i s i n t e r c e p t
6 a = 60 00 0 // H y s t e r e s i s l oo p a re a
7 f = 5 0 // f r eq u en c y i n Hz
8 printf ( ” \ n E xa mp le 1 6 . 4 ” )
9 e = x * y * a // En erg y l o s s i n o ne l o o p
10 E = e*v // e n e r g y l o s s i n c or e i n on e c y c l e
11 P = E*f // Power l o s s
12 printf ( ” \ n P ower l o s s due t o h y s t e r e s i s i s %d W” ,P)
Scilab code Exa 16.5 Calculation of eddy current loss at normal voltage
and frequency
1 / / C a l c u l a t i o n o f eddy c u r r e n t l o s s a t n o r ma l
v o l t a g e and f r eq u e nc y
2 clc
3 T o t al 1 = 2 30 0 / / t o t a l i r o n l o s s i n W a t 4 4 0 V and
5 0 Hz
4 T ot al 2 = 7 50 / / t o t a l i r o n l o s s i n W a t 2 20 V and 25
Hz
5 printf ( ” \ n E xa mp le 1 6 . 5 ” )
6 W _e = 1 / 2* ( T o ta l1 - 2* T o t a l 2 )
7 printf ( ” \ n Eddy c u r re n t l o s s a t n o r m a l v o l t a g e and
f r e q u e n c y i s %dW” ,4*W_e)
50
Chapter 17
Dielectric Materials
1 // c a l c u l a t i o n o f r e l a t i v e d i e l e c t r i c c o n st a n t
2 clc
3 l = 10 // l e n g t h o f c a p a c i t o r i n mm
4 b = 1 0 // w i d t h o f c a p a c i t o r i n mm
5 d = 2 // d i s t a n c e o f s e p a r a t i o n i n mm
6 c = 1e -9 // c a p ac i t a n c e i n f a ra d
7 e p s i lo n _ 0 = 8 . 85 e - 1 2 // p e r m i t t i v i t y o f f r e e s pa c e
8 printf ( ” \ n E xa mp le 1 7 . 1 ” )
9 e p s il o n _r = c * d * 1 e - 3/ ( e p s i l on _ 0 * l * 1 e - 3* b * 1 e - 3 )
10
11 printf ( ” \ n R e l a t i v e d i e l e c t r i c c o n s t a n t i s %d” ,
epsilon_r)
1 / / c a l c ul a t e the p o l a r iz a t i on o f a BaTio3 c r y s t a l
2 clc
51