3: Elementary Crystallography

Example number 3.2, Page number 3.50

In [23]:
#importing modules
import math
from __future__ import division

#Variable declaration
a=5.64;      #lattice constant(angstrom)
h1=1;
k1=0;
l1=0;
h2=1;
k2=1;
l2=0;
h3=1;
k3=1;
l3=1;

#Calculation
d100=a/math.sqrt(h1**2+k1**2+l1**2);     #spacing between (100) plane
d110=a/math.sqrt(h2**2+k2**2+l2**2);     #spacing between (110) plane
d111=a/math.sqrt(h3**2+k3**2+l3**2);     #spacing between (111) plane

#Result
print "spacing between (100) plane is",d100,"angstrom"
print "spacing between (110) plane is",round(d110,2),"angstrom"
print "spacing between (111) plane is",round(d111,2),"angstrom"
spacing between (100) plane is 5.64 angstrom
spacing between (110) plane is 3.99 angstrom
spacing between (111) plane is 3.26 angstrom

Example number 3.3, Page number 3.51

In [25]:
#importing modules
import math
from __future__ import division

#Variable declaration
a=3.61*10**-7;        #lattice constant(mm)

#Calculation
A100=a**2;     #surface area(mm**2)
n=1+(4*(1/4));
N1=n/A100;      #number of atoms in (100)(per mm**2)
A110=math.sqrt(2)*a**2;      #surface area(mm**2)
N2=n/A110;      #number of atoms in (110)(per mm**2)
A111=math.sqrt(3)*a**2/2;    #surface area(mm**2)
N3=n/A111;     #number of atoms in (110)(per mm**2)

#Result
print "number of atoms in (100) is",round(N1/10**13,3),"*10**13 atoms/mm**2"
print "number of atoms in (110) is",round(N2/10**13,3),"*10**13 atoms/mm**2"
print "number of atoms in (111) is",round(N3/10**13,3),"*10**13 atoms/mm**2"
print "answer varies due to rounding off errors"
number of atoms in (100) is 1.535 *10**13 atoms/mm**2
number of atoms in (110) is 1.085 *10**13 atoms/mm**2
number of atoms in (111) is 1.772 *10**13 atoms/mm**2
answer varies due to rounding off errors

Example number 3.4, Page number 3.52

In [27]:
#importing modules
import math
from __future__ import division

#Variable declaration
n=4;      
A=107.87;    #atomic weight
rho=10500;     #density(kg/m**3)
N=6.02*10**26;    #number of molecules
theta=19+(12/60);   #angle(degrees)
h=1;
k=1;
l=1;
h0=6.625*10**-34;     #planck constant
c=3*10**8;     #velocity of light(m/s)
e=1.6*10**-19;   #charge(coulomb)

#Calculation
theta=theta*math.pi/180;     #angle(radian)
a=(n*A/(N*rho))**(1/3);
d=a*10**10/math.sqrt(h**2+k**2+l**2);      
lamda=2*d*math.sin(theta);     #wavelength of x rays(angstrom)
E=h0*c/(lamda*10**-10*e);      #energy of x rays(eV)

#Result
print "wavelength of x rays is",round(lamda,3),"angstrom"
print "answer varies due to rounding off errors"
print "energy of x rays is",int(E/10**3),"*10**3 eV"
wavelength of x rays is 1.552 angstrom
answer varies due to rounding off errors
energy of x rays is 8 *10**3 eV

Example number 3.5, Page number 3.52

In [28]:
#importing modules
import math
from __future__ import division

#Variable declaration
n=8;    #number of atoms
r=2.351*10**-10;     #bond length(angstrom)
A=28.09;                #Atomic wt. of NaCl
N=6.02*10**26           #Avagadro number

#Calculation
a=4*r/math.sqrt(3);     
rho=n*A/(N*a**3);     #density(kg/m**3)

#Result
print "density is",int(rho),"kg/m**3"
print "answer varies due to rounding off errors"
density is 2332 kg/m**3
answer varies due to rounding off errors

Example number 3.6, Page number 3.53

In [29]:
#importing modules
import math
from __future__ import division
from sympy import Symbol

#Variable declaration
r=Symbol('r')

#Calculation
a1=4*r/math.sqrt(3);
R1=(a1/2)-r;           #radius of largest sphere
a2=4*r/math.sqrt(2);
R2=(a2/2)-r;       #maximum radius of sphere

#Result
print "radius of largest sphere is",round(R1/r,4),"r"
print "maximum radius of sphere is",round(R2/r,3),"r"
radius of largest sphere is 0.1547 r
maximum radius of sphere is 0.414 r

Example number 3.7, Page number 3.54

In [30]:
#importing modules
import math
from __future__ import division

#Variable declaration
r1=1.258*10**-10;     #radius(m)
r2=1.292*10**-10;     #radius(m)

#Calculation
a_bcc=4*r1/math.sqrt(3);
v=a_bcc**3;
V1=v/2;
a_fcc=2*math.sqrt(2)*r2;
V2=a_fcc**3/4;
V=(V1-V2)*100/V1;           #percent volume change is",V,"%"

#Result
print "percent volume change is",round(V,1),"%"
percent volume change is 0.5 %

Example number 3.8, Page number 3.55

In [31]:
#importing modules
import math
from __future__ import division

#Variable declaration
delta_Hf=120*10**3;      
T1=0;    #temperature(K)
T2=300;    #temperature(K)
n1=0;
N=6.022*10**23;
R=8.314;
T3=900;    #temperature(K)

#Calculation
n2=N*math.exp(-delta_Hf/(R*T2));     #number of vacancies at 300K(per mol)
n3=N*math.exp(-delta_Hf/(R*T3));     #number of vacancies at 900K(per mol)

#Result
print "number of vacancies at 0K is",n1,"per mol"
print "number of vacancies at 300K is",round(n2),"per mol"
print "number of vacancies at 900K is",round(n3/10**16,2),"*10**16 per mol"
number of vacancies at 0K is 0 per mol
number of vacancies at 300K is 768.0 per mol
number of vacancies at 900K is 6.53 *10**16 per mol

Example number 3.9, Page number 3.56

In [34]:
#importing modules
import math
from __future__ import division

#Variable declaration
theta1=6.45;      #angle(degrees)
theta2=9.15;      #angle(degrees)
theta3=13;      #angle(degrees)
lamda=0.58;     #wavelength(angstrom)

#Calculation
theta1=theta1*math.pi/180;     #angle(radian)
theta2=theta2*math.pi/180;     #angle(radian)
theta3=theta3*math.pi/180;     #angle(radian)
d=lamda/(2*math.sin(theta2));    #interplanar spacing of crystal(angstrom)

#Result
print "interplanar spacing of crystal is ",round(d,3),"angstrom"
print "answer varies due to rounding off errors"
interplanar spacing of crystal is  1.824 angstrom
answer varies due to rounding off errors

Example number 3.10, Page number 3.56

In [35]:
#importing modules
import math
from __future__ import division

#Variable declaration
n=1;     #order of diffraction
lamda=1.54*10**-10;     #wavelength(m)
theta=32;      #angle(degrees)
h=2;
k=2;
l=0;

#Calculation
theta=theta*math.pi/180;     #angle(radian)
d=n*lamda/(2*math.sin(theta));
a=d*math.sqrt(h**2+k**2+l**2);    #lattice parameter of lead(m)

#Result
print "lattice parameter of lead is",round(a*10**10,1),"*10**-10 m"
lattice parameter of lead is 4.1 *10**-10 m

Example number 3.11, Page number 3.57

In [37]:
#importing modules
import math
from __future__ import division

#Variable declaration
delta_Hf=1.6*10**-19;      
T=500;    #temperature(K)
N=6.026*10**23;
k=1.38*10**-23;    #boltzmann constant
mv=5.55;    #molar volume(cm**3)
ne=10**6;    #number of edge dislocations(per cm**3)
v=5*10**7;    #number of vacancies
a=2*10**-8;   #lattice parameter(cm)

#Calculation
n=(N/mv)*math.exp(-delta_Hf/(k*T));     #number of vacancies at 300K(per mol)
ac=n*a/(v*ne);      #amount of climb down(cm)

#Result
print "amount of climb down is",round(ac*10**8,5),"*10**-8 cm"
amount of climb down is 0.36915 *10**-8 cm