from math import sqrt, exp
#given
#molecular weight of CaF2 (calcium fluoride)
Mw=0.079 #kg/mol
#specific gravity of CaF2
sg=3.17
#density
rho=sg*1000 #kg/m**3
#avogadro's number
NA=6.023*10**23
#the no of lattice sites is
NL=NA*rho/Mw #calcium ions/m**3
#the ionic structure of CaF2
NI=2*NL # per m**3
#we can note that the no of anions are double that of the no of cation vacancies for frenkel defect, so effective value of Ef =Ef/2 i.e half
#effective energy
Ef=2.7*1.602*10**-19 #V (because 1eV=1.602*10**-19 V)
#boltzmann's constant
k=1.38*10**-23
T=1300 #K
#no of frenkel defects nF per cubic metre ie
nF=sqrt(NI*NI)*exp(-Ef/2/k/T) # per m**3 (some variation in result is due to the approximation done in book at some points)
print "the number of frenkels defect per unit volume of CaF2 is %0.2e per m**3 approx."%nF
from math import log
#given
#gas constant
R=8.314 #J/mol K
#temperatures
T1=27+273 #K
T2=52+273 #K
#we know that
#n=NA*exp(-Hf/R/T)
#so for n1=NA*exp(-Hf/R/T1)
#similarly for n2=NA*exp(-Hf/R/T2)
#dividing n2 by n1
#we have given in ques that dfects triple on incresing the temp from T1 to T2
#so n2/n1=3
#we get 3=exp(Hf/R*(1/T1-1/T2))
#on solving we get
Hf=log(3)*R*(T1*T2/(T2-T1))/1000 #KJ/mol
print "enthalpy of formation of vacancies is %0.2f kJ/mol"%(Hf)
#given
#gas constant
R=8.314 #J/mol K
#temperature
T1=300 #K
#enthalpy of formation of vacancy
Hf=168*10**3 #J/mol
#as we know that
#n=NA*exp(-Hf/R/T)
#let n/NA=N
N1=exp(-Hf/R/T1)
#now temperature is
T2=1000 #K
N2=exp(-Hf/R/T2)
# ratio of no of vacancies
ratio=N1/N2
print "the ratio of number of vacancies in equilibrium is %0.2e"%(ratio)
from math import pi
#given
#shear modulus
G=45*10**9 #N/m**2 because 1GPa=10**9 N/m**2
#burge vector
b=2.5*10**-9 #m
#inner and outer radius of elastic strain
r0=11*10**-10 #m
r1=10**5*b #m
#poisson ratio
nu=0.31
#for an edge dislocation
Ued=G*b**2/(4*(pi)*(1-nu))*log (r0/r1) #J/m
#for screw dislocation
Usd=G*b**2/(4*(pi))*log (r0/r1) #J/m
#ratio of edge and screw dislocation
ratio=Ued/Usd
print "tha ratios of energies of an edge dislocation over screw dislocation is %.2f"%(ratio)
#given
#atomic radius of polonium
r=1.7*10**-10 #m
#structure of polonium is simple cubic (SC) for which
a=2*r #m
#number of atoms "n" involved with 1mm long dislocation
n=10**-3/a
#the number steps ns of clinbs down for 2 micro m will be
ns=2*10**-6/a
#total no of created vacancies
NV=n*ns
print "the total no of vacancies created are %0.2e"%(NV)
from __future__ import division
#given
#burgers vector of copper is
h=1/2
k=1/2
l=0/2
#shear modulus of copper
G=44*10**9 #N/m**2
#latice parameter of copper
a=3.61*10**-10 #m
#magnitude of burgers vector
b=a*sqrt(h**2+k**2+l**2)#m
#the line energy of dislocation
U=G*b**2/2 #J/m
print "the line energy of disloactation is %.2e J/m"%(U)
from math import tan
#given
#lattice constant of Ir
a=3.84 #A
#burgers vector gfor FCC is 1/2(110)
#so
h=1/2
k=1/2
l=0/2
#magnitude of burgers vector
b=a*sqrt(h**2+k**2+l**2) #A
#angle of tilts
theta1=1*(pi)/180 #radians
theta2=3*(pi)/180 #radians
#spacing between dislocation for theta1
h1=b/tan(theta1) #A
#spacing between dislocations for theta2
h2=b/tan(theta2) #A
print "the spacinf between dislocations at 1 degree and 3 degrees are %0.2f A and %0.2f A resp"%(h1,h2)