In [1]:

```
mo = 9.1*10**-31 #initializing value of mass of electron
me = 0.067*mo #initializing value of effective mass of GaAs
u1=8500*10**(-4) #initializing value of mobility of pure GaAs
e = 1.6*10**-19 #initializing value of charge of electron
u2=5000*10**(-4) #initializing value of mobility of impure GaAs
Tsc1 = (me*u1)/e
print"The relaxation time of pure GaAs is Tsc1 = ","{:.2e}".format(Tsc1),"s"
Tsc2 = (me*u2)/e
print"The relaxation time of impure GaAs is Tsc2= ""{:.2e}".format(Tsc2),"s"
#using Mathieson rule
Tsc = ((1/Tsc2)-(1/Tsc1))**-1
print"The impurity related time is Tsc(imp) = ","{:.2e}".format(Tsc),"s"
```

In [3]:

```
mo = 9.1*10**-31 #initializing value of mass of electron
ml = 0.98*mo #initializing value of longitudinal mass
mt = 0.19*mo #initializing value of transverse mass
u=1500*10**(-4) #initializing value of mobility of pure silicon
e = 1.6*10**-19 #initializing value of charge of electron
Msig = 3*((2/mt)+(1/ml))**(-1)
Tsc = u*Msig/e
print"The scattering time is ,Tsc= ","{:.2e}".format(Tsc),"s"
```

In [10]:

```
un1=1000 #initializing value of mobility of electron of silicon
e = 1.6*10**-19 #initializing value of charge of electron
un2 = 8000.0 #initializing value of mobility of electron of GaAs
up1 = 350.0 #initializing value of mobility of holes of silicon
up2 = 400.0 #initializing value of mobility of holes of GaAs
ndoped = (50.0/100)*10**17 #initializing value of electron density of doped semiconductor(50% of Nd=10**17 cm**-3)
ni = 1.5*10**10 #initializing value of electron density of ionisation electron for silicon
pdoped = (ni)**2/ndoped
print"The hole density of doped semiconductor is pdoped = ","{:.2e}".format(pdoped),"cm**-3"
#pdoped can be neglected
Sdoped = ndoped*e*un1
print"The conductivity of doped silicon is (sigma doped) Sdoped =",round(Sdoped),"ohmcm**-1"
p1 = 1.5*10**10 #initializing value of hole density for undoped silicon
Sundoped = ni*e*un1+p1*e*up1
print"The conductivity of undoped silicon is (sigma undoped)Sundoped = ","{:.2e}".format(Sundoped),"ohmcm**-1"
Sdoped1 = ndoped*e*un2
print"The conductivity of doped GaAs is (sigma doped) Sdoped = ",round(Sdoped1,1),"ohmcm**-1"
p2 = 1.84*10**6 #initializing value of hole density for undoped GaAs
ni1 = 1.84*10**6 #initializing value of electron density of ionisation electron for GaAs
Sundoped = ni1*e*un2+p2*e*up1
print"The conductivity of undoped silicon is (sigma undoped) Sundoped = ","{:.2e}".format(Sundoped),"ohmcm**-1"
```

In [24]:

```
un1=1000 #initializing value of mobility of electron of silicon
e = 1.6*10**-19 #initializing value of charge of electron
un2 = 400.0 #initializing value of mobility of electron of GaAs
up1 = 350.0 #initializing value of mobility of holes of silicon
up2 = 8000.0 #initializing value of mobility of holes of GaAs
ni = 1.5*10**10 #initializing value of electron density of ionisation electron
nmax = 2.78*10**19 #initializing value of maximum electron density for silicon
nmax1 = 7.72*10**18 #initializing value of maximum electron density for GaAs
Smax = nmax*e*un1
print"The maximum conductivity for silicon is (sigma max) Smax = ","{:.2e}".format(Smax),"ohmcm**-1"
Smax1 = nmax1*e*un2
print"The maximum conductivity of GaAs is (sigma max) Smax=","{:.1e}".format(Smax1),"ohmcm**-1"
Smin = ni*e*((un1*sqrt(up1/un1))+(up1*sqrt(un1/up1)))
print"The minimum conductivity of silicon is (sigma min)Smin = ""{:.1e}".format(Smin),"ohmcm**-1"
ni1 = 1.84*10**6 #initializing value of electron density of ionisation electron for GaAs
Smin1 = ni1*e*((un2*sqrt(up2/un2))+(up2*sqrt(un2/up2)))
print"The minimum conductivity of GaAs is (sigma min)Smin1 =","{:.2e}".format(Smin1),"ohmcm**-1"
```

In [13]:

```
mo = 9.1*10**-31 #initializing value of mass of electron
me = 0.26*mo #initializing value of conductivity mass of silicon
v1=1.4*10**(6) #initializing value of velocity of silicon electron at 300K
e = 1.6*10**-19 #initializing value of charge of electron
v2=1.0*10**(7) #initializing value of velocity of silicon electron at 300K
F1= 1000 #initializing value of electric field
F2= 100000 #initializing value of electric field
u1 = v1/(F1*10**4)
print"The mobility for electrons in silicon (1 kV/cm) is u1=","{:.2e}".format(u1),"m**2/V.s"
u2 = v2/(F2*10**4)
print"The mobility for electrons in silicon (100 kV/cm) is u2=","{:.2e}".format(u2),"m**2/V.s"
Tsc1 = (me*u1)/e
print"The relaxation time of electrons in silicon at 1kV/cm is Tsc1=","{:.2e}".format(Tsc1),"s"
Tsc2 = (me*u2)/e
print"The relaxation time of electrons in silicon at 100kV/cm is Tsc2 =","{:.2e}".format(Tsc2),"s"
```

In [14]:

```
v2=1.0*10**(7) #initializing value of saturation velocity of GaAs device
F= 5000 #initializing value of average electric field in GaAs device
L= 2*10**(-4) #initializing value of length of GaAs device
u = 8000 #initializing value of low field mobility
v1 = u*F
print"The average velocity of electrons is v = ","{:.2e}".format(v1),"cm/s"
Ttr1 = L/v1
print"The transit time of electrons through the device is Ttr1 =""{:.2e}".format(Ttr1),"s"
Ttr2 = L/v2
print"The transit time of electrons using saturation velocity through the device is Ttr2 = ","{:.2e}".format(Ttr2),"s"
```

In [19]:

```
h=1.05*10**-34 #initializing value of reduced plancks constant or dirac constant or h-bar
mo = 9.1*10**-31 #initializing value of mass of electron
me1 = 0.065*9.1*10**-31 #initializing value of electron mass of GaAs
me2 = 0.02*9.1*10**-31 #initializing value of electron mass of InAs
e = 1.6*10**-19 #initializing value of charge of electron
Eg1 = 1.5*1.6*10**-19 #initializing value of valence bandedge energy of GaAs
Eg2 = 0.4052*1.6*10**-19 #initializing value of valence bandedge energy of InAs
F= 2*10**7 #initializing value of applied electric field
T1 = math.exp(-(4*sqrt(2*me1)*(Eg1)**(3/2))/(3*e*h*F))
print"The tunneling probability in GaAs is T1 =",round(T1,1)
T2 = math.exp(-(4*sqrt(2*me2)*(Eg2)**(3/2))/(3*e*h*F))
print"The tunneling probability in InAs is T2 =","{:.2e}".format(T2)
#NOTE: The tunneling probability in GaAs is approximately given zero in the textbook
```

In [7]:

```
e = 1.6*10**-19 #initializing value of charge of electron
L =10**-4 #initializing value of length
Dn =220 #initializing value of electron diffusion coefficient
#n(x) = 10**16*exp(-(x/L)) cm**-3
#Derivative of n(x) for x =0 is 10**16/L
dn_by_dx =10**16/L #initializing value of derivative of n(x) for x=0
Jn_diff = e*Dn*dn_by_dx
print"The diffusion current density is Jn_diff =","{:.1e}".format(Jn_diff),"A/cm**2"
# Note : due to different precisions taken by me and the author ... my answer differ
```

In [2]:

```
v1=1.4*10**(4) #initializing value of velocity of electrons in silion at 1kV/cm
v2=7*10**(4) #initializing value of velocity of electrons in silion at 10kV/cm
e = 1.6*10**-19 #initializing value of charge of electron
kbT = 0.026 #initializing value of kbT at 300K
F1= 10**5 #initializing value of applied electric field
F2= 10**6 #initializing value of applied electric field
D1 = (v1*kbT*1.6*10**-19)/(e*F1)
print"The diffusion coefficient is ,D(1kV/cm)=","{:.2e}".format(D1),"m**2/s"
D2 = (v2*kbT*1.6*10**-19)/(e*F2)
print"The diffusion coefficient is ,D(10kV/cm)=","{:.2e}".format(D2),"m**2/s"
```

In [26]:

```
Nc=2.8*10**(19)
Nv=1.04*10**(19)
#NOTE: Ec-Ev = forbidden band gap energy = Eg
Eg = 1.1
e = 1.6*10**-19 #initializing value of charge of electron
kbT = 0.026 #initializing value of kbT at 300K
n= 10**17
p= 10**17
Efn_minus_Efp = Eg+(kbT*(log(p/Nv)+log(n/Nc)))
print"The difference in the quasi fermi level is ,Efn_minus_Efp=","{:.2e}".format(Efn_minus_Efp),"eV"
n= 10**15
p= 10**15
Efn_minus_Efp = Eg+(kbT*(log(p/Nv)+log(n/Nc)))
print"The difference in the quasi fermi level is ,Efn_minus_Efp=","{:.2e}".format(Efn_minus_Efp),"eV"
```

In [5]:

```
alpha1=(-10**(4)) #initializing value of absorption coefficient near the bandedges of GaAs
alpha2=(-10**(3)) #initializing value of absorption coefficient near the bandedges of Si
Iabs_by_Iinc = 0.9 #initializing value of amount of light absorbed
L1 = (1.0/alpha1)*log(1-(Iabs_by_Iinc))
print"The thickness of a sample GaAs is ,L =","{:.2e}".format(L1),"cm"
L2 = (1.0/alpha2)*log(1-(Iabs_by_Iinc))
print"The thickness of a sample Si is ,L = ","{:.2e}".format(L2),"cm"
```

In [6]:

```
alpha=(3*10**(3)) #initializing value of absorption coefficient near the bandedges of GaAs
p=(10**(3)) #initializing value of power density that impringes on GaAs
Tr = 1.5*1.6*10**-19 #initializing value of photon energy
d = 10**-3 #initializing value of photon energy
Rg1 = (alpha*p)/Tr
print"The carrier generation rate at the surface is ,Rg(0)= ","{:.2e}".format(Rg1),"cm**-3s**-1"
Rg2 = (alpha*p*exp(-3))/Tr
print"The carrier generation rate at the depth of 10 um is ,Rg(10) =","{:.2e}".format(Rg2),"cm**-3s**-1"
```

In [45]:

```
mo = 9.1*10**-31 #initializing value of mass of electron
m = 0.27*mo #initializing value of effective mass of silicon
kb = (1.38*10**-23) #initializing value of boltzman constant
T1 = 300.0 #initializing value of temperature
T2 = 77.0 #initializing value of temperature
vth1=(sqrt((3*kb*T1)/(m)))*100
print"The thermal velocity of the electron at 300K is ,vth(300K)=","{:.0e}".format(vth1),"cms**-1"
vth2=(sqrt((3*kb*T2)/(m)))*100
print"The thermal velocity of the electron at 77K is ,vth(77K)=","{:.0e}".format(vth2),"cms**-1"
sigma=10**(-14) #initializing value of cross-section
Nt = 10**15 #initializing value of impurity density
Tnr1 = (1.0/(sigma*Nt*vth1))
print"The electron trapping time is ,Tnr1 =","{:.2e}".format(Tnr1),"s"
Tnr2 = (sigma*Nt*vth2)
print"The electron trapping time is ,Tnr2 = ","{:.0e}".format(Tnr2),"s"
#NOTE: in the Textbook the author has taken the approximated value for Vth thermal velocity\
# NOTE: these approximated values of velocity affects the value of electron trapping time
# in the Textbook the answer of Tnr2 is wrong.
```

In [13]:

```
KbT = 1.38*(10**-23)*300 #initializing value of kbT at 300K
mu=0.4 #initializing value of mobility of p-type GaAs
e = 1.6*10**-19 #initializing value of charge of electron
Dn = (mu*KbT)/e
print"The diffusion constant using einstein relation is Dn =","{:.2e}".format(Dn),"m**2/s"
T = 0.6*10**-9 #initializing value of recombination time
Ln = sqrt(Dn*T)
print"The diffusion length of p type GaAs is Ln =","{:.1e}".format(Ln),"m"
```

In [12]:

```
e = 1.6*10**-19 #initializing value of charge of electron
KbT = 0.026 #initializing value of kbT at 300K
sigma=10 #initializing value of conductivity
mu_n=1100 #initializing value of mobility of electrons
mu_p=400 #initializing value of mobility of holes
Nd = 10**17 #initializing value of doping
n = sigma/(e*mu_n)
print"The carrier concentration in n type material is n =","{:.2e}".format(n),"cm**-3"
# the answer in textbook is given in %
#The excess drops by 50% once light is off using this fact in below equation
T = -1/log(.5)
print"The recombination time is T = ","{:.2e}".format(T),"micro-sec"
Dp = mu_p*kbT
print"The diffusion constant is Dp = ","{:.2e}".format(Dp),"cm**2/s"
Lp = sqrt(Dp*T*10**-6)
print"The diffusion length is Lp = ","{:.2e}".format(Lp),"m"
```