import math
#Variable declaration
T=300 #K
k=8.617*10**-5#eV/K
e=1.6*10**-19 #C
Nd=10**16 #cm^-3
Nr=2.8*10**19 #cm^-3
Vbi=0.33
phim=4.55 #V
psi=4.01 #V
esp=11.7
esp0=8.85*10**-14
#Calculations&Results
hb=phim-psi
print "barrier height is %.2f V "%hb
phiu=(k*T)*math.log(Nr/Nd)
print "schottky barrier height is %.3f V "%phiu
Vbt=hb-phiu
print "in V is %.2f"%Vbt
xn=math.sqrt((2*esp*esp0*Vbi)/(e*Nd))
print "space charge is %.3e cm "%xn
Emax=(e*Nd*xn)/(esp*esp0)
print "maxi electric field is %.1e V/cm "%Emax
import math
#Variable declaration
T=300 #K
k=8.617*10**-5#eV/K
e=1.6*10**-19 #C
esp=11.7
esp0=8.85*10**-14
Nd=2.7*10**17 #cm^-3
Na=2.8*10**19 #cm^-3
Vbi=0.40
#Calculations&Results
#(1/C)^2=2*(Vbi+Vr)/(e*esp*Nd)
#delta(1/C)^2/deltaVr=z
z=4.4*10**13
Nd=2/(e*esp*esp0*z)
print "semiconductor doping is %.2e cm^-3 "%Nd
phin=(k*T)*math.log(Na/Nd)
print "in V is %.2f"%phin
phibn=Vbi+phin
print "schottky barrier height is %.2f V "%phibn
import math
#Variable declaration
T=300 #K
k=8.617*10**-5#eV/K
e=1.6*10**-19 #C
esp=11.7
esp0=8.85*10**-14
E=6.8*10**4 #V/cm
#Calculations&Results
deltaphi=math.sqrt((e*E)/(4*math.pi*esp*esp0))
print "schottky barrier lowring is %.4f V "%deltaphi
xm=math.sqrt(e/(16*math.pi*esp*esp0*E))
print "maxi barrier height is %.e cm"%xm
import math
#Variable declaration
T=300. #K
k=8.617*10**-5#eV/K
e=1.6*10**-19 #C
esp=11.7
esp0=8.85*10**-14
phibe=0.67 #V
Jst=6.*10**-5 #A/cm^2
#Calculations
A=math.exp(phibe/(k*T))*(Jst/T**2)
#Result
print "Richardson constant is %.f A/K^2-cm^2 "%A #textbook ans is incorrect
import math
#Variable declaration
T=300 #K
k=8.617*10**-5#eV/K
e=1.6*10**-19 #C
esp=11.7
esp0=8.85*10**-14
phibe=0.67 #V
A=114 #A/K**2-cm**2
Na=10**18 #cm**-3
Nd=10**16 #cm**-3
taup0=10**-7
taun0=10**-7
Dp=10 #cm**2/s
Dn=25 #cm**2/s
Lp=1.0*10**-3 #cm
Ln=1.58*10**-3 #cm
pn0=2.25*10**4 #cm**-3
np0=2.25*10**2 #cm**-3
#Calculations&Results
a=k*T
Jst=(A*T**2)*math.exp(-phibe/a)
print "Richardson constant is %.2e A/K**2-cm**2"%Jst
Js=((e*Dn*np0)/Ln)+((e*Dp*pn0)/Lp)
print "reverse saturation current density is %.2e A/cm**2"%Js
import math
#Variable declaration
T=300 #K
k=8.617*10**-5#eV/K
e=1.6*10**-19 #C
esp=11.7
esp0=8.85*10**-14
J=10 #A/K**2-cm**2
Jst=5.98*10**-5#A/K**2-cm**2
Js=3.66*10**-11 #A/K**2-cm**2
#Calculations&Results
#J=Jst*[exp(e*Va/k*T)-1]
#Va=(k*T/e)*log(J/Jst)
Va=(k*T)*math.log(J/Jst)
print "forward bias voltage is %.3f V "%Va
Va=(k*T)*math.log(J/Js)
print "forward bias voltage is %.3f V"%Va
import math
#Variable declaration
T=300 #K
k=8.617*10**-5#eV/K
e=1.6*10**-19 #C
Nd=7*10**18 #cm^3
esp=11.7
esp0=8.85*10**-14
phibn=0.67 #V
Vbi=0.67
#Calculations
xn=math.sqrt((2*esp*esp0*Vbi)/(e*Nd))
#Result
print "space charge width is %.1e cm "%xn
import math
#Variable declaration
T=300 #K
k=8.617*10**-5#eV/K
e=1.6*10**-19 #C
ni=2.4*10**13 #cm**-3
Na=7*10**18 #cm**3
Nd=10**16 #cm**-3
pp0=6*10**18 #cm**-3
esp=11.7
esp0=8.85*10**-14
xn=4.13
xp=4.07
#Calculations&Results
#AE1=e*(xn-xp)
AE=(xn-xp)
print "AE is %.2f eV "%AE
deltaE=1.43-0.67
AE1=deltaE-AE
print "AE1 is %.2f eV"%AE1
pn0=(ni**2)/Nd
print "pn0 is %.2e cm**-3 "%pn0
Vbi=AE1+(k*T)*math.log((Nd*pp0)/(pn0*Na))
print "Vbi in V = %.f "%Vbi