from __future__ import division
from math import sqrt
#given
#atomic radii of iron in BCC and FCC at 910 degrees celcius temp are
rBCC=1.258 #A
rFCC=1.292 #A
#latice side
aBCC=4*rBCC/sqrt(3)
aFCC=2*sqrt(2)*rFCC
#effective number of atoms in BCC and FCC
nBCC=2
nFCC=4
#volume
VBCC=nBCC/2*(aBCC)**3
VFCC=nFCC/4*(aFCC)**3
#change in volume percent
deltaV=(-1+VFCC/VBCC)*100
print "the volume change = %0.2f %% and here +ve sign indicates that the volume increases during polymorphism transformation"%deltaV
from math import tan, pi
#given
#height of zinc unit cell
h=4.935*10**-10 #m
#side of the lattice
a=2.66*10**-10 #m
#as we know that zinc has HCP unit cell.
#the number of effective atoms
Ne=6
#as we know
#tan(pi/3)=x/(a/2)
#so
x=a/2*tan (pi/3) #m
#area of basal plane
Ar=6*a*x/2 #m**2
#volume of the unit cell
V=Ar*h #m**3
#atomic weight of zinc
Aw=65.37
#avogadro's number
NA=6.023*10**23
#density of zinc
rho=Aw*Ne/(NA*V)/1000 #kg/m**3
print "the no of effective atoms, the volume of unit cell and density of zinc are %d, %0.2e and %d kg/m**3 resp"%(Ne,V,rho)
#given
#ionic radius of anion is
ra=2.11*10**-10 #m
#given that the atom has eight fold ligancy with the anion
#so, we know that for this
#rc/ra=0.732
rc=0.732*ra #m
print "the radius of smallest cation is 1.54 A"
#given
#radii of cation and anion in CaO
rc=0.94*10**-10 #m
ra=1.32*10**-10 #m
#so the lattice side will be
a=2*(rc+ra) #m
#effective no of atoms in FCC lattice structure
Ne=4 #because CuO has FCC cubic structure
#molecular weight of CuO
Aw=40.08+16
#atomic weight unit
amu=1.66*10**-27 #amu
#mass of atom per unit cell
M=Aw*amu
#density
rho=M*Ne/a**3 #kg/m**3
print "density of CuO is %0.f Kg/m**3"%rho
#given
#radii of cation and anion in MgO
rc=0.78*10**-10 #m
ra=1.32*10**-10 #m
#so the lattice side will be
a=2*(rc+ra) #m
#effective no of atoms in FCC lattice structure
Ne=4 #because MgO has FCC cubic structure
#molecular weight of MgO
Aw=24.3+16
#atomic weight unit
amu=1.66*10**-27 #amu
#mass of atom per unit cell
M=Aw*amu
#density
rho=M*Ne/a**3 #kg/m**3
print "density of MgO is %0.3f Kg/m**3" %rho