Chapter 3: Metallic Crystal Structure

Example 3.1 Page No: 44

In [30]:
from sympy import Symbol

R=Symbol('R')   
a=2*R*round(math.sqrt(2),2)
V=a**3

print"Volume is",V,"  m**3"
print"which is also equal to 16*sqrt(2)*R**3"
Volume is 22.425768*R**3   m**3
which is also equal to 16*sqrt(2)*R**3

Example 3.2 Page No: 44

In [37]:
n=4
R=1        #say

a=2*R*math.sqrt(2)
Vc=a**3
Vs=n*4*math.pi*R**3/3.0
APF=Vs/Vc

print"Atomic packing fraction is",round(APF,2)
Atomic packing fraction is 0.74

Example 3.3 Page No: 45

In [3]:
R=1.28*10**-8        #Atomic radius in cm
A_Cu=63.5            #Atomic wt of copper
n=4                  #For FCC
Na=6.023*10**23       #Avogadro no.

a=2*R*math.sqrt(2)
Vc=a**3
den=n*A_Cu/(Vc*Na)

print"Density is  ",round(den,2),"g/cm**3"
Density is   8.89 g/cm**3

Example 3.6 Page No: 52

In [44]:
a=1/2.0
b=1
c=0

x=[2*a,2*b,2*c]

print"The intercept for the given plane is",x
The intercept for the given plane is [1.0, 2, 0]

Example 3.8 Page No: 55

In [41]:
du=1
dv=1
dw=1

u=(2*du-dv)/3.0
v=(2*dv-du)/3.0
t=-(u+v)
w=dw

x=[3*u,3*v,3*t,3*w]
print"The indices for the given directions are",x
The indices for the given directions are [1.0, 1.0, -2.0, 3]

Example 3.9 Page No: 56

In [37]:
a=-1
b=1/2.0


l=0      #Reciprocal of infinity
m=1/a
n=1/b
x=[l,m,n]

print"The intercept for the given plane is",x
The intercept for the given plane is [0, -1, 2.0]

Example 3.11 Page No: 59

In [31]:
h=1        #Reciprocal of intersection point
k=-1
l=1
i=-(h+k)

x=[h,k,i,l]

print"The indices of plane are",x
The indices of plane are [1, -1, 0, 1]

Example 3.12 Page No: 70

In [25]:
a=0.2866           #Lattice parameter in nm
h=2
k=2
l=0

import math
d_hkl=a/(math.sqrt(h**2+k**2+l**2))

lam=0.1790     #Wavelength in nm
n=1
theta=math.asin(n*lam/(2*d_hkl))

print"(a)Interplanar spacing is  ",round(d_hkl,4),"nm"
print"(b)Diffraction angle is  ",round(2*theta*(180/math.pi),1),"degree"
(a)Interplanar spacing is   0.1013 nm
(b)Diffraction angle is   124.1 degree
In [ ]: