import math
#given
n=1;
Ne=2*n**2;
print"Maximum number of electron in 1st shell is ",Ne; #Result
n2=2; #shell no
Ne2=2*n2**2; #shell no
print"Maximum number of electron in 2nd shell is ",Ne2; #Result
import math
#given
#Given for silicon for temp 0-400K
Eg0_Si=1.17; #in eV
A=4.73*10**-4; #in eV/K
B=636;
for i in range(1,9):
T=50*i; #degree/Kelvin
Eg_Si=Eg0_Si-(A*T**2)/(B+T);
print"Band gap energy of silicon at ",T," K is ",round(Eg_Si,3),"eV "; #result
#Given for Germanium for temp 0-400K
print"\n"
Eg0_Ge=0.7437; #in eV
A_Ge=4.774*10**-4; #in eV/K
B_Ge=235;
for i in range(1,9):
T=50*i; #degree/Kelvin
Eg_Ge=Eg0_Ge-(A_Ge*T**2)/(B_Ge+T);
print"Band gap energy of germanium at ",T," K is ",round(Eg_Ge,3),"eV "; #result
#Given for GaAs for temp 0-400K
print"\n"
Eg0_Ga=1.519; #in eV
A_Ga=5.405*10**-4; #in eV/K
B_Ga=204;
for i in range(1,9):
T=50*i; #degree/Kelvin
Eg_Ga=Eg0_Ga-(A_Ga*T**2)/(B_Ga+T);
print"Band gap energy of GaAs at ",T ,"K is ",round(Eg_Ga,3),"eV"; #result
import math
#given
l=10*10**-3; #in m
w=2*10**-3; #in m
h=2*10**-3; #in m
V=12; #in V
u_n=0.14; #in m*m/V*s
u_p=0.05; #in m*m/V*s
q_n=1.6*10**-19; #in Columbs
q_p=1.6*10**-19; #in Columbs
p_i=2.4*10**19; #in columbs
n_i=2.4*10**19; #in columbs
E=V/l;
v_n=E*u_n;
v_p=E*u_p;
J_n=n_i*q_n*v_n;
J_p=p_i*q_p*v_p;
J=J_n+J_p;
print"Electron velocity :vn is ",v_n,"m/s"; #result
print"Hole velocity :vp is ",v_p/1000,"km/s"; #result
print"Current density : Jn ",J,"A/m^2"; #result
A=88*10**-6;
I_T=J*A;
print"Total current :I_T is",round(I_T*1000,4),"mA"; #result
import math
#given
n_i=2*10**17; #electron/m*m*m
p=5.7*10**20; #holes/m*m*m
u_n=0.14; #in m*m/V*s
u_p=0.05; #in m*m/V*s
q_n=1.6*10**-19; #in Columbs
q_p=1.6*10**-19; #in Columbs
n=(n_i)**2/p;
print"Electron :n is ","{0:.3e}".format(n),"electrons "; #result
n=7*10**13
P=(n*u_n*q_n)+(p*u_p*q_p);
print"Conductivity :P is ",round(P,4),"S/m "; #result
# answer misprinted
import math
#given
NA=10**22; #acceptors/m*m*m
ND=1.2*10**21; #donors/m*m*m
T=298; #in Kelvin
k=1.38*10**-23; #Boltzman Constant in J/K
q=1.6*10**-19; #charge of electron in C
Vt=k*T/q; #thermal voltage in V
print" VT is ",Vt*1000,"mV"; #result
n_i=2.4*10**17; #carrier/m**3 for silicon
VB=Vt*log(NA*ND/n_i**2); #barrier voltage in V
print" Barrier Voltage of Silicon VB is ",round(VB*1000,4),"mV"; #result
import math
#given
Is=0.12; #in pAmp
V=0.6; #in V
T=293; #in Kelvin
k=1.38*10**-23; #Boltzmann's Constant in J/K
q=1.6*10**-19; # charge of electron in C
Vt=k*T/q; #thermal voltage
print"VT(20 deg Cel) is ",round(Vt,4),"V"; #result in book is misprint
T1=373; #in Kelvin
n=1.25;
Vt1=k*T1/q; #thermal voltage
print"VT(100 deg Cel) is ",round(Vt1,4),"V";
I=Is*(math.e**(V/(n*Vt1))-1); #forward biasing current in mircoA
print"I(100 deg Cel) is ",round(I/10**6,4),"microampere"; #result
import math
#given
Is=100; #in nAmp
Ts=100; #in Kelvin
I_s=Is*10**-9*2**(Ts/10); #I_s will be in nm
print" I(100 deg Cel) is ",I_s*10**6,"microampere"; #converted to microA from nm
# wrong calculation in the book
import math
#given
Br_Si=1.79*10**-15; #Recombination coefficient for Si
Br_Ge=5.25*10**-14; #Recombination coefficient for Ge
Br_GeAs=7.21*10**-10; #Recombination coefficient for GeAs
Br_InAs=8.5*10**-11; #Recombination coefficient for InAs
P_N=2*10**20; #per cubic cm
T_Ge=1/Br_Ge/P_N; #radiative minority carrier lifetime
print"T_Ge is ",round(T_Ge/10**-6,4),"micro-s"; #result
T_Si=1/Br_Si/P_N; #radiative minority carrier lifetime
print"T_Si is ",round(T_Si/10**-6,4),"micro-s"; #result
T_InAs=1/Br_InAs/P_N; #radiative minority carrier lifetime
print"T_InAs is ",round(T_InAs/10**-12,4),"ps"; #result
T_GeAs=1/Br_GeAs/P_N; #radiative minority carrier lifetime
print"T_GeAs is ",round(T_GeAs/10**-12,4),"ps"; #result