#Variable declaration
k=8.617*10**-5#eV/K
e=1.6*10**-19 #C
un=1200.
Nd=10**16 #cm**-3
esp0=8.85*10**-14
espr=11.7
#Calculations&Results
sigma=e*un*Nd
print "conductivity is %.2f per ohm cm "%sigma
esp=espr*esp0
print "permittivity of silicon is %.2e F/cm"%esp
taud=esp/sigma
print "dielectric relaxtion time constant is %.2e sec "%taud
import math
#Variable declaration
T=300#K
k=8.617*10**-5#eV/K
e=1.6*10**-19 #C
n0=10**15 #cm^-3
p0=10**5 #cm^-3
ni=10**10 #cm^-3
deltan=10**13 #cm**-3
deltap=10**13 #cm**-3
#Calculations&Results
#Ef-Efi=a
a=(k*T)*math.log(n0/ni)
print "fermi level for thermal equlibrium is %.4f eV "%a
#Efn-Efi=b
b=(k*T)*math.log((n0+deltan)/ni)
print "quasi fermi level for electrons is %.4f eV "%b
#Efi-Efp=c
c=(k*T)*math.log((p0+deltap)/ni)
print "quasi fermi level for holes is %.3f eV "%c
#answers vary due to roundinf-off errors
import math
#Variable declaration
k=8.617*10**-5#eV/K
e=1.6*10**-19 #C
x=0
taup0=10**-6#ses
taup01=10**-7 #sec
deltapb=10**14 #cm**-3
Dn=10 #cm^2/sec
Dp=10 #cm^2/sec
B=-9*10**13
#Calculations&Results
deltap=deltapb*(taup01/taup0)
print "deltap is %.e cm^-3 "%deltap
g=deltap/taup0
print "g generation is %.e cm^-3s^-1 "%g #incorrect solution in textbook
#deltapx=10**14*(1-0.9*math.exp(-x/Lp))
Lp=math.sqrt(Dp*taup0)
print "Lp is %f meter "%Lp
deltapx=10**14*(1-0.9*math.exp(-x/Lp))
print "distance from the surface = %.e"%deltapx
#Variable declaration
k=8.617*10**-5#eV/K
e=1.6*10**-19 #C
Dp=10#cm^2/sec
Lp=31.6*10**-4 #m
g1taup0=10**14 #cm^-3
deltap0=10**13 #cm6-3
#Calculations
#deltap0=g1taup0*[g/((Dp/Lp)+s)]
s=(Dp/Lp)*((g1taup0/deltap0)-1)
#Result
print "surface recombination velocity is %.2e cm per sec "%s