#importing modules
import math
from __future__ import division
#Variable declaration
N=6.023*10**26; #avagadro number
T1=1/float('inf'); #temperature 0K(K)
T2=300;
T3=900; #temperature(K)
k=1.38*10**-23; #boltzmann constant
deltaHv=120*10**3*10**3/N; #enthalpy(J/vacancy)
#Calculation
#n1=N*math.exp(-deltaHv/(k*T1)); #equilibrium concentration of vacancy at 0K
#value of n1 cant be calculated in python, as the denominator is 0 and it shows float division error
n2=N*math.exp(-deltaHv/(k*T2)); #equilibrium concentration of vacancy at 300K
n3=N*math.exp(-deltaHv/(k*T3)); #equilibrium concentration of vacancy at 900K
#Result
#print "equilibrium concentration of vacancy at 0K is",n1
print "equilibrium concentration of vacancy at 300K is",round(n2/10**5,3),"*10**5"
print "equilibrium concentration of vacancy at 900K is",round(n3/10**19,3),"*10**19"
#importing modules
import math
from __future__ import division
#Variable declaration
nbyN1=1*10**-10; #fraction of vacancies
T1=500+273;
T2=1000+273;
#Calculation
lnx=T1*math.log(nbyN1)/T2;
x=math.exp(lnx); #fraction of vacancies at 1000
#Result
print "fraction of vacancies at 1000 is",round(x*10**7,1),"*10**-7"
#importing modules
import math
from __future__ import division
#Variable declaration
d=2.82*10**-10; #interionic distance(m)
T=300; #temperature(K)
k=1.38*10**-23; #boltzmann constant
e=1.6*10**-19; #charge(coulomb)
n=4; #number of molecules
deltaHs=1.971*e; #enthalpy(J)
#Calculation
V=(2*d)**3; #volume of unit cell(m**3)
N=n/V; #number of ion pairs
x=deltaHs/(2*k*T);
n=N*math.exp(-x); #concentration of schottky defects(per m**3)
#Result
print "concentration of schottky defects is",round(n*10**-11,2),"*10**11 per m**3"
#importing modules
import math
from __future__ import division
#Variable declaration
N=6.026*10**23; #avagadro number
T=500; #temperature(K)
k=1.38*10**-23; #boltzmann constant
deltaHv=1.6*10**-19; #charge(coulomb)
V=5.55; #molar volume(cm**3)
nv=5*10**7*10**6; #number of vacancies
#Calculation
n=N*math.exp(-deltaHv/(k*T))/V; #concentration of schottky defects(per m**3)
x=round(n/nv,4); #amount of climb down by the dislocations(step)
xcm=2*x*10**-8; #amount of climb down by the dislocations(cm)
#Result
print "concentration of schottky defects is",round(n/10**12,2),"*10**12 per cm**3"
print "amount of climb down by the dislocations is",x,"step or",xcm*10**8,"*10**-8 cm"