from __future__ import division
#Given :
t1=35##degreeC
t2=60##degreeC
T1=t1+273##K
T2=t2+273##K
print "Forbidden gap for Si : "
EG1_Si=1.21-3.6*10**-4*T1##eV
print "at 35 degree C = %0.3f eV"%EG1_Si
EG2_Si=1.21-3.6*10**-4*T2##eV
print "at 60 degree C = %0.3f eV"%EG2_Si
print "\nForbidden gap for Ge : "
EG1_Ge=0.785-2.23*10**-4*T1##eV
print "at 35 degree C = %0.4f eV"%EG1_Ge
EG2_Ge=0.785-2.23*10**-4*T2##eV
print "at 60 degree C = %0.4f eV"%EG2_Ge
#Given :
l=6*10**-2##m
V=1##Volt
A=10*10**-6##m**2
I=10*10**-3##A
q=1.602*10**-19##Coulomb
mu_n=1300*10**-4##m**2/V-s
E=V/l##V/m
v=mu_n*E##m/s
J=I/A##A/m**2
n=J/(q*mu_n*E)##per m**3
print "(i) Concentration of electron = %0.2e m**3 "%n
print "(ii) Drift velocity = %0.3f m/s "%v
#Given :
l=6*10**-2##m
V=12##Volt
v=73##m/s
E=V/l##V/m
mu=v/E##m**2/V-s
print "Electron mobility = %0.3f m**2/V-s"%mu
#Given :
l=4*10**-2##m
A=10*10**-6##m**2
V=1##Volt
I=5*10**-3##A
q=1.6*10**-19##Coulomb
mu=1300##cm**2/V-s
J=I/A##A/m**2
E=V/l##V/m
n=J/(q*mu*10**-4*E)#
v=mu*10**-4*E##m/s
print "Concentration of electron = %0.3e per m**3 "%n
print "Electron velocity = %0.3f m/s "%v
#Given :
ni=1.5*10**10/10**-6##per m**3
mu_n=1800*10**-4##m**2/V-s
mu_p=500*10**-4##m**2/V-s
q=1.6*10**-19##Coulomb
sigma_i=ni*(mu_n+mu_p)*q##(ohm-m)**-1
print "Conductivity = %0.3e (ohm-m)**-1 "%sigma_i
rho_i=1/sigma_i##ohm-m
print "Resistivity = %0.1f ohm-m"%rho_i
from math import sqrt, exp
#Given :
T=300##K
Ao=2.735*10**31##constant for Si
k=86*10**-6##boltzman constant
EGO=1.1##volt(Bandgap energy)
ni=sqrt(Ao*T**3*exp(-EGO/k/T))##per cm**3
print "Intrinsic carrier concentration = %0.1e per cm**3"%ni
from __future__ import division
#Given :
A=1*10**-6##m**2
R=3.6*10**-4/10**-2##ohm/m
n=9*10**26##electrons/m**3
J=3*10**6##A/m**2
q=1.6*10**-19##Coulomb
I=J*A##A
print "(i) Current = %0.2f A"%I
rho=R*A##ohm-m
sigma=1/rho##(ohm-m)**-1
print "(ii) Conductivity = %0.2e (ohm-m)**-1"%sigma
v=J/n/q##m/s
print "(iii) velocity of free electrons = %0.2e m/s"%v
mu=sigma/n/q##m**2/V-s
print "(iv) Mobility = %0.3f m**2/V-s "%mu
from __future__ import division
from math import sqrt,exp
#Given :
rho=3*10**5*10**-2##ohm-m
T1=30+273##K
mu_n=0.13##m**2/V-s
mu_p=0.05##m**2/V-s
q=1.6*10**-19##Coulomb
T2=100+273##K
sigma_i=1/rho##(ohm-m)**-1
ni1=sigma_i/q/(mu_n+mu_p)##electrons/m**3
print "Intrinsic concentration at 30 degree C = %0.2e per m**3) "%ni1
k=8.62*10**-5##eV/K(Boltzman constant)
EGO=1.21##V(Energy band gap)
Ao=ni1**2/(T1**3*exp(-EGO/k/T1))##constant
ni2=sqrt(Ao*T2**3*exp(-EGO/k/T2))##per cm**3
print "Intrinsic concentration at 100 degree C = %0.3e (per m**3)"%ni2
#Given :
l=0.1*10**-2##m
R=1.5*10**3##ohm
mu_n=0.14##m**2/V-s
mu_p=0.05##m**2/V-s
A=8*10**-8##m**2
ni=1.5*10**10*10**6## per m**3
q=1.6*10**-19##Coulomb
rho_n=R*A/l##ohm-m
sigma_n=1/rho_n##(ohm-m)**-1
ND=sigma_n/mu_n/q##
print "Majority Carrier density = %0.3e per m**3"%ND
#Given :
A=2.5*10**-4##m**2
n=1.5*10**16##per m**3
q=1.6*10**-19##Coulomb
mu_n=0.14##m**2/V-s
mu_p=0.05##m**2/V-s
I=1.2*10**-3##A
V=9##Volts
ni=n## per m**3
sigma_i=ni*q*(mu_n+mu_p)##(ohm-m)**-1
rho_i=1/sigma_i##ohm-m
R=V/I##ohm
l=R*A/rho_i##m
print "Length of the bar = %0.3f mm"%(l*1000)
from __future__ import division
#Given :
n=5*10**22##per cm**3
mu_n=1300##cm**2/V-s
mu_p=500##cm**2/V-s
ni=1.5*10**10##per cm**3
T=300##K
rho_n=9.5##ohm-cm
q=1.6*10**-19##Coulomb
sigma_i=ni*q*(mu_n+mu_p)##(ohm-cm)**-1
rho_i=1/sigma_i##ohm-cm
print "Resistivity = %0.4e ohm-cm"%rho_i
sigma_n=1/rho_n##(ohm-cm)**-1
ND=sigma_n/mu_n/q##per m**3
Ratio=ND/n#
print "Ratio of donor impurity atom to Si atom : %0.e"%(Ratio)
from __future__ import division
#Given :
n=5*10**22##per cm**3
ni=1.52*10**10*10**6##per m**3
q=1.6*10**-19##Coulomb
mu_n=0.135##m**2/V-s
mu_p=0.048##m**2/V-s
impurity=1/10**8##atoms
sigma_i=ni*q*(mu_n+mu_p)##(ohm-cm)**-1
rho_i=1/sigma_i##ohm-cm
print "Resistivity of intrinsic Si = %0.2f ohm-m "%rho_i
ND=n*impurity*10**6##per m**3
sigma_n=ND*mu_n*q##(ohm-m)**-1
rho_n=1/sigma_n##ohm-m
print "Resistivity of doped Si = %0.3e ohm-m"%rho_n
#Answer in the book is not accurate.
from __future__ import division
#Given :
rho=9.6*10**-2##ohm-m
mu_n=1300*10**-4##m**2/V-s
sigma_n=1/rho##(ohm-cm)**-1
TotalAtoms=5*10**28##per m**3
q=1.6*10**-19##Coulomb
ND=sigma_n/mu_n/q##per m**3
ratio=ND/TotalAtoms#
print "Ratio of doner atom to Si atom per unit volume : %0.e"%ratio
from __future__ import division
#Given :
ni=2.5*10**13##per cm**3
mu_p=1800##cm**2/V-s
mu_n=3800##cm**2/V-s
q=1.6*10**-19##Coulomb
sigma_i=ni*q*(mu_n+mu_p)##(ohm-cm)**-1
rho_i=1/sigma_i##ohm-cm
print "Resistivity of Ge =",round(rho_i),"ohm-cm"
from __future__ import division
#Given :
ni=1.2*10**16##per m**3
p=10**22##per m**3
mu_p=500*10**-4##cm**2/V-s
mu_n=1350*10**-4##cm**2/V-s
q=1.6*10**-19##Coulomb
n=ni**2/p##per m**3
print "Electron concentration = %0.3e per m**3 "%n
sigma=q*(n*mu_n+p*mu_p)##(ohm-m)**-1
print "Conductivity of Si = %0.f (ohm-m)**-1"%sigma
from __future__ import division
#Given :
T=27+273##K
ND=10**17##per cm**3
ni=1.5*10**10##per cm**3
n=ND##per m**3#ND>>n
print "Electron concentration = %0.e per cm**3 "%n
p=ni**2/n##per m**3
print "Holes = %0.2e per cm**3 : "%p
from __future__ import division
#Given :
Vol=4*50*1.5##mm**3
ni=2.4*10**19##per m**3
p=7.85*10**14##per m**3
n=ni**2/p##per m**3
Vol=Vol*10**-9##m**3
TotalElectron=n*Vol##no. of electrons
print "Total free electrons = %0.2e per m**3"%TotalElectron
from __future__ import division
from sympy import symbols, solve
#Given :
ND=10**14##per cm**3
NA=7*10**13##per cm**3
rho_i=60##ohm-cm
E=2##V/cm
q=1.6*10**-19##Coulomb
mu_p=1800##cm**2/V-s
mu_n=3800##cm**2/V-s
sigma_i=1/rho_i##(ohm-cm)**-1
ni=sigma_i/q/(mu_n+mu_p)##per cm**3
p = symbols('p')
n=p+(ND-NA)##per cm**3
#n*p=ni**2
expr = n*p-ni**2
#m=[1 (ND-NA) -ni**2]##polynomial
p=solve(expr,p)[1]##per m**3 #taking only +ve value
n=ni**2/p##per m**3
J=(n*mu_n+p*mu_p)*q*E/10**-4##A/m**2
print "Total current density = %0.2f A/m**2 "%J
#Answer in the textbook is not accurate.
from sympy import symbols, solve
from __future__ import division
#Given :
ND=10**14##per cm**3
NA=7*10**3##per cm**3
rho_i=60##ohm-cm
J=52##mA/cm**2
q=1.6*10**-19##Coulomb
mu_p=1800##cm**2/V-s
mu_n=3800##cm**2/V-s
sigma_i=1/rho_i##(ohm-cm)**-1
ni=sigma_i/q/(mu_n+mu_p)##per cm**3
p = symbols('p')
n=p+(ND-NA)##per cm**3
#n*p=ni**2
expr = n*p-ni**2
#m=[1 (ND-NA) -ni**2]##polynomial
p=solve(expr,p)[1]##per m**3 #taking only +ve value
n=ni**2/p##per m**3
E=J*10**-3/q/(n*mu_n+p*mu_p)##V/m
print "Value of electrical field, E = %0.4f V/cm "%E
from sympy import symbols, solve
from __future__ import division
#Given :
ND=10**14##per cm**3
NA=7*10**13##per cm**3
rho_i=60##ohm-cm
E=2##V/cm
q=1.6*10**-19##Coulomb
mu_p=500##cm**2/V-s
mu_n=1300##cm**2/V-s
sigma_i=1/rho_i##(ohm-cm)**-1
ni=sigma_i/q/(mu_n+mu_p)##per cm**3
p = symbols('p')
n=p+(ND-NA)##per cm**3
#n*p=ni**2
expr = n*p-ni**2
#m=[1 (ND-NA) -ni**2]##polynomial
p=solve(expr,p)[1]##per m**3 #taking only +ve value
n=ni**2/p##per m**3
J=(n*mu_n+p*mu_p)*q*E/10**-4##A/m**2
print "Total current density = %0.2f A/m**2"%J
#Given :
l=6*10**-2##m
V=12##volts
v=73##m/s
E=V/l##V/m
mu=v/E##m**2/V-s
print "Electron mobility = %0.3f m**2/V-s "%mu
#Given :
ND=10**13##per cm**3
Bz=0.2##Wb/m**2
d=5##mm
E=5##V/cm
q=1.6*10**-19##Coulomb
mu_n=1300##cm**2/V-s
rho=ND*q##Coulomb/cm**3
J=rho*mu_n*E##A/cm**2
VH=Bz*10**-4*J*d*10**-1/rho##V
print "Magnitude of hall voltage = %0.f mV "%(VH*10**3)
#Given :
rho=220*10**3*10**-2##ohm/m
d=2.2*10**-3##m
w=2*10**-3##m
B=0.1##Wb/m**2
I=5*10**-6##A
VH=28*10**-3##V
sigma=1/rho##(ohm-m)**-1
RH=VH*w/(B*I)##ohm
mu=sigma*RH##m**2/V-s
print "Mobility = %0.6f m**2/V-s"%mu
#Given :
l=4*10**-2##m
A=10*10**-6##m**2
V=1##Volt
I=5*10**-3##A
q=1.6*10**-19##Coulomb
mu=1300##cm**2/V-s
J=I/A##A/m**2
E=V/l##V/m
n=J/(q*mu*10**-4*E)
v=mu*10**-4*E##m/s
print "Concentration of electron = %0.3e per m**3"%n
print "Electron velocity = %0.2f m/s"%v
#Given :
mu_n=3800##cm**2/V-s
mu_p=1300##cm**2/V-s
ni=2.5*10**13##per cm**3
q=1.6*10**-19##Coulomb
ND=4.4*10**22/10**8##per cm**3
sigma_n=ND*q*mu_n##(ohm-m)**-1
rho_n=1/sigma_n##ohm-cm
print "Resistivity of doped Ge = %0.3f ohm-cm"%rho_n
#Given :
ni=1.5*10**16##per m**3
n=5*10**20##per m**3
p=ni**2/n##per m**3
print "Minor carrier density = %0.1e per m**3"%p
#Given :
ni=1.5*10**10##per cm**3
mu_n=1400##cm**2/V-s
mu_p=500##cm**2/V-s
l=1##cm
a=1##mm**2
q=1.6*10**-19##Coulomb
del_n=10**14##per cm**3
del_p=10**14##per cm**3
Nd=8*10**15##per cm**3
n=Nd##per cm**3(Nd>>ni)
print "Electron concentration, n = %0.2e per cm**3"%n
p=ni**2/n##per m**3
print "Hole concentration, p = %0.4e per cm**3 "%p
nT=Nd+del_n##per cm**3
print "Total electron concentration, nT = %0.e per cm**3"%nT
pT=p+del_p##per cm**3
print "Total hole concentration, pT = %0.2e per cm**3"%pT
sigma=(nT*mu_n+pT*mu_p)*q##(ohm-cm)**-1
rho=1/sigma##ohm-cm
R=rho*l/(a*10**-2)##ohm
V=2##volt
I=V/R##A
print "Current, I = %0.2f mA"%(I*1000)
#Given :
A=2.3*10**-4##m**2
n=1.5*10**16##per m**3
l=1##mm
mu_n=1400##cm**2/V-s
mu_p=500##cm**2/V-s
p=n##per m**3
ni=n##per m**3
q=1.6*10**-19##Coulomb
sigma_i=ni*(mu_n*10**-4+mu_p*10**-4)*q##(ohm-m)**-1
rho_i=1/sigma_i##ohm-m
R=rho_i*l*10**-3/A##ohm
V=9##volt
I=V/R##A
print "Current, I = %0.3f mA"%(I*1000)
#Given :
ND=10**14##per m**3
Jn=10##mA/cm**2
E=3##V/cm
T=27+273##K
q=1.6*10**-19##Coulomb
mu_n=1500##cm**2/V-s
Dn=mu_n/39##Diffusion constant
n=ND##per m**3
dnBYdx=((Jn*10**-3/10**-4)-n*q*mu_n*E)/q/Dn##concentration gradient
print "Concentration gradient, dn/dx = %0.3e"%dnBYdx
#Given :
ND=10**13##per m**3
NA=10**14##per m**3
rho_i=44##ohm-cm
E=3##V/cm
q=1.6*10**-19##Coulomb
mu_n=0.38##m**2/V-s
mu_p=0.18##m**2/V-s
ni=2.5*10**19##per m**3
from sympy import symbols, solve
p = symbols('p')
n=p+(ND-NA)##per cm**3
#n*p=ni**2
expr = n*p-ni**2
#m=[1 (ND-NA) -ni**2]##polynomial
p=solve(expr,p)[1]##per m**3 #taking only +ve value
n=ni**2/p##per m**3
J=(n*mu_n+p*mu_p)*q*(E/10**-2)##A/m**2
print "Total current density = %0.1f A/m**2"%J
#Ans in the textbook is not accurate.
#Given :
T=300##K
ni=2.5*10**13##per cm**3
mu_n=3800##cm**2/V-s
mu_p=1800##cm**2/V-s
q=1.6*10**-19##Coulomb
sigma_i=ni*(mu_n+mu_p)*q/10**-2##(ohm-m)**-1
print "Conductivity of intrinsic Ge = %0.2f (ohm-m)**-1"%sigma_i
ND=4.4*10**22/10**7##per cm**3
n=ND##per cm**3
sigma_n=n*mu_n*q/10**-2##(ohm-m)**-1
print "Conductivity after adding donor impurity = %0.2f (ohm-m)**-1"%sigma_n
NA=4.4*10**22/10**7##per cm**3
p=NA##per cm**3
sigma_p=p*mu_p*q/10**-2##(ohm-m)**-1
print "Conductivity after adding acceptor impurity = %0.2f (ohm-m)**-1 "%sigma_p
#Given :
ND=10**17##per cm**3
ni=1.5*10**10##per cm**3
no=ND##per cm**3#/Nd>>ni
po=ni**2/no##per cm**3
print "Equilibrium hole concentration = %0.2e per cm**3"%po
from math import log
#Given :
ni=1.5*10**10##per cm**3
ND=10**17##per cm**3
no=ND##per cm**3#/Nd>>ni
po=ni**2/no##per cm**3
KT=0.0259##constant
delEf=KT*log(no/ni)##eV
print "Fermi level, Ef = Ei +",round(delEf,3),"eV"
#Given :
K=1.38*10**-23##J/K
T=27+273##K
e=1.6*10**-19##constant
mu_n=0.17##m**2/V-s
mu_p=0.025##m**2/V-s
Dn=K*T/e*mu_n##m**2/s
print "Diffusion coffiecients of electron = %0.2e m**2/s"%Dn
Dp=K*T/e*mu_p##m**2/s
print "Diffusion coffiecients of holes = %0.2e m**2/s"%Dp
from math import sqrt
#Given :
K=1.38*10**-23##J/K
T=27+273##K
e=1.6*10**-19##constant
del_no=10**20##per.m**3
tau_n=10**-7##s
mu_n=0.15##m**2/V-s
Dn=K*T/e*mu_n##m**2/s
Ln=sqrt(Dn*tau_n)##m
Jn=e*Dn*del_no/Ln##A/m**2
print "Diffusion current density = %0.3e A/m**2"%Jn
#Given :
sigma_n=0.1##(ohm-cm)**-1
mu_n=1300##m**2/V-s
ni=1.5*10**10##per cm**3
q=1.6*10**-19##Coulomb
n_n=sigma_n/q/mu_n##per cm**3
p_n=ni**2/n_n##per cm**3
p_n=p_n*10**6##per m**3
print "Concentration of holes = %0.3e per m**3"%p_n
#Given :
L=100*10**-6##m
A=10**-7*10**-6##m**2
mu_e=0.13##m**2/V-s
mu_h=0.05##m**2/V-s
tau_h=10**-6##sec
V=12##volt
E=V/L##v/m
tn=L**2/(mu_e*V)##sec
print "Electron transit time = %0.2e s"%tn
Gain=tau_h/tn*(1+mu_h/mu_e)##
print "Photoconductor gain :",Gain
#Given :
T=300##K
rho_i=45##ohm-cm
#part (i)
mu_n=3800##cm**2/V-s
mu_p=1800##cm**2/V-s
ni=2.5*10**13##per cm**3
q=1.6*10**-19##Coulomb
sigma=ni*q*(mu_n+mu_p)##(ohm-cm)**-1
rho=1/sigma##ohm-cm
print "Resistivity of intrinsic Ge at 300K = %0.2f ohm-cm"%round(rho)
#part (ii)
ND=4.4*10**22/10**8##per cm**3
sigma=ND*q*mu_n##(ohm-cm)**-1
rho=1/sigma##ohm-cm
print "Resistivity of doped Ge = %0.2f ohm-cm "%rho
#Given :
ni=10**16##per m**3
ND=10**22##per m**3
n=ND##per m**3#ND>>ni
print "Electron concentration = %0.e per m**3"%n
p=ni**2/n##per m**3
print "Electron concentration = %0.e per m**3"%p
from __future__ import division
#Given :
rho=9.6*10**-2##ohm-m
mu_n=1300##cm**2/V-s
q=1.6*10**-19##Coulomb
sigma_n=1/rho##(ohm-m)**-1
ND=sigma_n/q/(mu_n*10**-4)##per m**3
ni=5*10**22*10**6##per m**3
print "Ratio of donor atom to Si atom : %0.e"%(ND/ni)
#Given :
ni=1.5*10**10##per cm**3
n_n=2.25*10**15##per cm**3
print "Equillibrium electron density = %0.2e per cm**3"%n_n
p_n=ni**2/n_n##per cm**3
print "Equillibrium hole density = %0.e per cm**3 "%p_n
#Given :
NA=2*10**16##per cm**3
ND=10**16##per cm**3
p=NA-ND##per cm**3
print "Material is p-type & Carrier concentration = %0.e holes per cm**3"%p
#Given :
del_n=10**15##per cm**3
tau_p=10*10**-6##sec
rate=del_n/tau_p##rate of generation minority carrier
print "Rate of generation of minority carrier = %0.e electron hole pair/sec/cm**3"%rate
#Given :
E=10##V/cm
v=1/(20*10**-6)##m/s
mu=v/E##cm**2/V-s
print "Mobility = %02.f cm**2/V-s"%mu
from math import sqrt,exp
#Given :
ND=4.5*10**15 #per cm**3
A=1*10**-2 #cm**2
l=10 #cm
tau_p=1*10**-6 #sec
tau_n=1*10**-6 #sec
Dp=12 #cm**2/sec
Dn=30 #cm**2/sec
q=1.6*10**-19 #coulamb
del_p=10**21 #electron hole pair/cm**3/sec
x=34.6*10**-4 #cm
Kdash=26 #mV(Kdash is taken as K*T/q)
ni=1.5*10**10 #per cm**3
no=ND #per cm**3#ND<<ni
po=ni**2/no #per cm**3
ln=sqrt(Dn*tau_n) #cm
lp=sqrt(Dp*tau_p) #cm
dpBYdx=del_p*exp(-x/lp) #per cm**4
dnBYdx=del_p*exp(-x/ln) #per cm**4
Jp=-q*Dp*dpBYdx #A/cm**2
print "Hole diffucion current, Jp = %0.2f A/cm**2)"%Jp
Jn=q*Dn*dnBYdx #A/cm**2
print "Electron diffucion current, Jp = %0.2f A/cm**2"%Jn
#Answer is wrong in the book. Wrong calculation for dpBYdx and dnBYdx.
#Given :
h=6.626*10**-34##J-s
lamda=5490##Angstrum
c=3*10**8##m/s(speed of light)
f=c/(lamda*10**-10)##Hz
E=(h/1.6/10**-19)*f##eV
print "Energy band gap = %0.2f eV"%E
%matplotlib inline
from matplotlib.pyplot import plot, title, show, xlabel, ylabel
#Given :
q=1.6*10**-19##Coulomb
Dn=35##cm**2/s
x=[0, 2]##micro meter
n=[10**17 ,6*10**16]##per cm**3
plot(x,n)#
title('n Vs x')#
xlabel('x(micro meter)')#
ylabel('n(electrons per cm**3)')#
show()
dnBYdx=(n[1]-n[0])/(x[0]-x[1])/10**-4##gradient
Jn=q*Dn*dnBYdx##A/cm**2
print "Current density = %0.2f A/cm**2"%Jn
from __future__ import division
#Given :
q=1.6*10**-19##Coulomb
l=0.1##cm
A=100*10**-8##cm**2
n_n=5*10**20*10**-6##per cm**3
mu_n=0.13*10**4##cm**2/V-s
sigma_n=q*n_n*mu_n##(ohm-cm)**-1
rho=1/sigma_n##ohm-cm
R=rho*l/A##ohm
print "Resistance of the bar = %0.f Mohm"%round(R/10**6)
from __future__ import division
#Given :
NA=9*10**16##per cm**3
ND=1*10**16##per cm**3
w_total=3##micro meter
w_p=w_total*ND/NA##micro meter
print "Answer is (B). Depletion width on p-side = %0.2f micro meter"%w_p
from __future__ import division
#Given :
ni=1.5*10**16##per m**3
n_n=5*10**20##per m**3
p_n=ni**2/n_n##per m**3
print "Majority carrier density = %0.2e per m**3"%p_n
from __future__ import division
%matplotlib inline
from matplotlib.pyplot import plot, title, show, xlabel, ylabel
#Given :
q=1.6*10**-19##Coulomb
Dn=25##cm**2/s
x=[0 ,0.5]##micro meter(base width)
n=[10**14 ,0]##per cm**3
plot(x,n)#
title('n Vs x')#
xlabel('x(micro meter)')#
ylabel('n(electrons per cm**3)')#
show()
dnBYdx=(n[1]-n[0])/(x[0]-x[1])/10**-4##gradient
Jn=q*Dn*dnBYdx##A/cm**2
print "Current density = %0.2f A/cm**2"%Jn
from __future__ import division
#Given :
h=6.64*10**-34##planks constant
c=3*10**8##m/s(speed of light)
lamda=0.87*10**-6##m
Eg=h*c/lamda/(1.6*10**-19)##eV
print "Band gap = %0.3f eV"%Eg
from __future__ import division
from math import exp
#Given :
t=0.46*10**-4##cm
E=2##eV
alfa=5*10**4##cm**-1
Io=10##mW
q=1.6*10**-19##Coulomb
It=Io*exp(-alfa*t)##mW
Pabs=Io-It##mW
print "(a) Absorbed power = %0.2f mW"%round(Pabs)
Eg=1.43##eV(Band gap)
heat_fraction=(E-Eg)/E#
E_heat=heat_fraction*Pabs*10**-3##J/s(energy converted to heat)
print "(b) Rate of excess thermal energy = %0.3e J/s"%E_heat
photons=Pabs*10**-3/q/E##no. of photons per sec
print "(c) No. of photons per sec : %0.2e"%photons
from __future__ import division
from math import log,exp,sqrt,pi
#Given :
Kdash=0.0259##constant(taken as K*T/q)
A=0.5##cm**2
Na=10**17##per cm**3
ni=1.5*10**10##per cm**3
delta_p=5*10**16##per cm**3
x=1000##Angstrum
mu_p=500##cm**2/V-s
tau_p=10**-10##sec
q=1.6*10**-19##Coulomb
Dp=Kdash*mu_p##cm/s
Lp=sqrt(Dp*tau_p)##cm
p0=Na##per cm**3
p=p0+delta_p*exp(x*10**-8/Lp)##per cm**3
delE1=log(p/ni)*Kdash##eV(taken as Ei-Fp)
Eg=1.12##eV(Band gap)
delE2=Eg-delE1##eV(taken as Ec-Fp)
print "Steady state separation between Fp & Ec = %0.2f eV"%delE2
Ip=q*A*Dp/Lp*delta_p*exp(x*10**-8/Lp)##A
print "Hole current = %0.2f A"%Ip
Qp=q*A*delta_p*Lp##C
print "Excess stored hole charge = %0.2e Coulomb"%Qp
#Answer in the book is wrong beacause of calculation mistake in the value of p & Ip.
from math import sqrt,log,exp,pi
from __future__ import division
#Given :
Kdash=0.0259##constant(taken as K*T/q)
A=0.5##cm**2
Na=10**17##per cm**3
ni=1.5*10**10##per cm**3
delta_p=5*10**16##per cm**3
x=1000##Angstrum
mu_p=500##cm**2/V-s
tau_p=10**-10##sec
q=1.6*10**-19##Coulomb
Dp=Kdash*mu_p##cm/s
Lp=sqrt(Dp*tau_p)##cm
p0=Na##per cm**3
p=p0+delta_p*exp(x*10**-8/Lp)##per cm**3
delE1=log(p/ni)*Kdash##eV(taken as Ei-Fp)
Eg=1.12##eV(Band gap)
delE2=Eg-delE1##eV(taken as Ec-Fp)
print "Steady state separation between Fp & Ec = %0.2f eV"%delE2
Ip=q*A*Dp/Lp*delta_p*exp(x*10**-8/Lp)##A
print "Hole current = %0.2f A "%Ip
Qp=q*A*delta_p*Lp##C
print "Excess stored hole charge = %0.2e Coulomb"%Qp
#Answer in the book is wrong beacause of calculation mistake in the value of p & Ip.