2: Crystal Structures

Example number 2.1, Page number 2.23

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

#Variable declaration
M=60.2;     #molecular weight
Na=6.023*10**26;    #avagadro number(kg/mole)
n=4;    
rho=6250;           #density(kg/m**3)

#Calculation
a=(n*M/(rho*Na))**(1/3);     #lattice constant(m)

#Result
print "lattice constant is",round(a*10**10),"*10**-10 m"
lattice constant is 4.0 *10**-10 m

Example number 2.2, Page number 2.23

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

#Variable declaration
M=63.5;     #molecular weight
Na=6.023*10**26;    #avagadro number(kg/mole)
n=4;    
r=1.278*10**-8;     #atomic radius(cm)

#Calculation
a=2*math.sqrt(2)*r;   #lattice constant(m)
rho=n*M/(a**3*Na);    #density(kg/cm**3)

#Result
print "density is",round(rho*10**3,2),"gm/cm**3"
print "answer in the book varies due to rounding off errors"
density is 8.93 gm/cm**3
answer in the book varies due to rounding off errors

Example number 2.3, Page number 2.24

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

#Variable declaration
pf_BCC=math.pi*math.sqrt(3)/8;    #packing factor for BCC
pf_FCC=math.pi/(3*math.sqrt(2));     #packing factor of FCC

#Calculation
r=pf_BCC/pf_FCC;     #ratio of densities

#Result
print "ratio of densities is",round(r,2)
ratio of densities is 0.92

Example number 2.4, Page number 2.24

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

#Variable declaration
M=55.85;     #molecular weight
Na=6.02*10**26;    #avagadro number(kg/mole)
n=2;    
rho=7860;           #density(kg/m**3)

#Calculation
a=(n*M/(rho*Na))**(1/3);     #lattice constant(m)

#Result
print "lattice constant is",round(a*10**10,4),"angstrom"
lattice constant is 2.8687 angstrom

Example number 2.5, Page number 2.24

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

#Variable declaration
M=58.5;     #molecular weight
Na=6.02*10**26;    #avagadro number(kg/mole)
n=4;    
rho=2189;           #density(kg/m**3)

#Calculation
a=(n*M/(rho*Na))**(1/3);     #lattice constant(m)

#Result
print "lattice constant is",round(a*10**10,1),"angstrom"
lattice constant is 5.6 angstrom

Example number 2.6, Page number 2.25

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

#Variable declaration
M=6.94;     #molecular weight
Na=6.02*10**26;    #avagadro number(kg/mole)
n=2;    
rho=530;           #density(kg/m**3)

#Calculation
a=(n*M/(rho*Na))**(1/3);     #lattice constant(m)

#Result
print "lattice constant is",round(a*10**10,3),"angstrom"
lattice constant is 3.517 angstrom

Example number 2.7, Page number 2.25

In [29]:
#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,3),"%"
print "answer in the book varies due to rounding off errors"
percent volume change is 0.493 %
answer in the book varies due to rounding off errors

Example number 2.8, Page number 2.26

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

#Variable declaration
a=0.356*10**-9;       #cube edge(m)
w=12;    #atomic weight
Na=6.02*10**26;    #avagadro number(kg/mole)

#Calculation
n=8/(a**3);     #number of atoms/m**3
m=w/Na;      #mass(kg)
rho=m*n;     #density of diamond(kg/m**3)

#Result
print "number of atoms/m**3 is",round(n/10**29,2),"*10**29"
print "density of diamond is",round(rho,2),"kg/m**3"
print "answer in the book is wrong"
number of atoms/m**3 is 1.77 *10**29
density of diamond is 3534.47 kg/m**3
answer in the book is wrong

Example number 2.9, Page number 2.26

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

#Variable declaration
r=Symbol('r')

#Calculation
a=4*r/math.sqrt(2);
R=(4*r/(2*math.sqrt(2)))-r;       #maximum radius of sphere

#Result
print "maximum radius of sphere is",round(R/r,3),"r"
maximum radius of sphere is 0.414 r

Example number 2.10, Page number 2.26

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

#Variable declaration
r=Symbol('r')

#Calculation
a=4*r/math.sqrt(3);
R=(a/2)-r;           #radius of largest sphere

#Result
print "radius of largest sphere is",round(R/r,3),"r"
radius of largest sphere is 0.155 r