dE1=0.1 #eV
dE2=-0.1 #eV
k=8.61*10**-5 #Boltzman constant
T=300 #K
import math
FE1=1/(1+math.exp(dE1/(k*T)))
FE2=1/(1+math.exp(dE2/(k*T)))
print"Probability when the energy of the state is above 0.1 eV",round(FE1,2)
print"Probability when the energy of the state is below 0.1 eV",round(FE2,2)
Ef=6.25 #EV fermi energy level
dE=-0.30 #eV
k=8.61*10**-5 #Boltzman constant
fE=0.99
T=(dE)/(k*math.log(1/fE-1))
print"The Temprature is",round(T,1),"K"
Eg=0.72 #eV
Ef=0.5*Eg
dE=Eg-Ef #eV
k=8.61*10**-5 #Boltzman constant
T=300 #K
import math
N=1/(1+math.exp(dE/(k*T)))
print"the fraction of total no. of electron is ",round(N,9)
E=300*1.602*10**-19 #eV Energy
m=9.108*10**-31 #kg, mass of electron
h=6.626*10**-34 #Planck constant
v=math.sqrt(2*E/m)
lam=h*v/E
print"The wavwlength is",round(lam*10**10,3),"A"
ni=1.4*10**18 #in atoms/m**3
Nd=1.4*10**24 #in atoms/m**3
n=Nd #in atoms/m**3
p=ni**2/n #in atoms/m**3
ratio=n/p #unitless
print"Ratio of electron to hole concentration : ",round(ratio,2)
n=10**24 #Electron density
e=1.6*10**-19 #Electron charge
v=0.015 #m/s drift velocity
A=10**-4 #m**2 area
I=n*e*v/A
print"The magnitude of current is",round(I/10**8,2),"A"
Ef=5.5 #in eV
MUe=7.04*10**-3 #in m**2/V-s
n=5.8*10**28 #in m**-3
e=1.6*10**-19 #constant
m=9.1*10**-31 #in Kg
import math
tau=MUe*m/e #in sec
rho=1/(n*e*MUe) #in ohm-m
vF=math.sqrt(2*Ef*1.6*10**-19/m)
print"Relaxation time in sec : ",tau,"s"
print"Resistivity of conductor in ohm-m : ",round(rho,11),"ohm m"
print"velocity of electron with fermi energy is ",round(vF,0),"m/s"
rho=1.73*10**-8 #resistivity
Tav=2.42*10**-14 #Average Time
e=1.6*10**-19 #constant
m=9.1*10**-31 #in Kg
n=m/(e**2*Tav*rho)
mu=(e*Tav)/m
print"NO. of free electrons are",round(n,-26)
print"mobility of electrons is",round(mu,3),"m**2/Vs"
Ef=100 #in V/m Applied electric field
n=6*10**28 #in m**-3
e=1.6*10**-19 #constant electronic charge
m=9.1*10**-31 #in Kg mass of electron
rho=1.5*10**-8 #Density
import math
tau=m/(n*e**2*rho) #in sec
vF=e*Ef*tau/m
print"Relaxation time in sec : ",round(tau,16),"s"
print"velocity of electron with fermi energy is ",round(vF,1),"m/s"
d=0.002 #m, diameter of pipe
s=5.8*10**7 #Conductivity S/m
mu=0.0032 #m**2/Vs, Electron mobility
e=1.6*10**-19 #constant electronic charge
m=9.1*10**-31 #in Kg mass of electron
E=0.02 #V/m Electric field
import math
n=s/(e*mu)
J=s*E
I=J*(math.pi*d**2/4.0)
v=mu*E
print"Charge density is",round(n,-26),"m**-3"
print"current density is",round(J,6),"A/m**2"
print"curret flowing is",round(I,3),"A"
print"electron drift velocityis",round(v,6),"m/s"
rho=0.5 #ohm-m Resistivity
J=100 #A/m**2 Current density
mue=0.4 #m**2/Vs Electron mobility
d=10*10**-6 #m distance
Ve=mue*J*rho
t=d/Ve
print"The drift velocity is ",Ve,"m/s"
print"Time taken by the electron is",round(t,8),"s"
e=1.6*10**-19 #constant electronic charge
m=9.1*10**-31 #in Kg mass of electron
rho=0.039 #ohm-cm resistivity
mu=3600 #cm**2/Vs Carrier mobility
ni=2.5*10**13
Nd=(1/(rho*e*mu))
n=Nd
p=(ni**2/n)
print"Concentration of electron is",round(n,-14),"/cm**3"
print"Concentration of holes is",round(p,0),"/cm**3"
rho=5.32 #kg/m**3, density
Aw=72.6 #kg/K kmol atomic weight
ni=2.5*10**13
di=10**8 #Donor impurity
e=1.6*10**-19 #Electronic charge
mue=0.38 #m**/Vs
muh=0.18 #m**/Vs
N=6.023*10**23*rho/Aw #No 0f germanium atoms per cm**3
Nd=N/di
n=Nd
p=(ni**2/n)
s=n*e*mue*10**4
print"Concentration of electrons is",round(n,-12),"atoms/cm**3"
print"Concentration of holes is",round(p,-10),"atoms/cm**3"
if n > p:
print"Conductivity of N-type germanium",round(s*100,1),"/ohm-m"
else:
print "Calculate p-type germanium conductivity"
e=1.6*10**-19 #Electronic charge
mue=0.39 #m**/Vs
muh=0.19 #m**/Vs
rhoi=0.47 #ohm-m, intrinsic resistivity
E=10**4 #Electric field
sigmai=1/rhoi
ni=sigmai/(e*(mue+muh))
Vn=mue*E
Vh=muh*E
print"Density of electrons is",round(ni,-17),"/m**3"
print"Drift velocity for electrons",round(Vn,0),"m/s"
print"Drift velocity for holes",round(Vh,0),"m/s"
i=10**7 #IMpurity in Ge atom
ni=2.5*10**13 #/cm**3
N=4.4*10**22 #No. of atoms of Ge
mue=3800 #cm**2/Vs
muh=1800 #cm**2/Vs
e=1.6*10**-19 #Electronic charge
E=400 #Electric field
sigmai=ni*e*(mue+muh)
Nd=N/i
n=Nd
p=ni**2/(Nd)
sigman=e*Nd*mue
print"Intrinsic conductivity of Ge is ",sigmai,"ohm-cm**-1"
print"Conductivity of N type Ge semiconductor is",round(sigman,2),"ohm-cm**-1"
V=10 #Volt
l=0.025 #m, length
w=0.004 #m width
t=0.0015 #m thickness
ni=2.5*10**19 #/cm**3
mue=0.38 #m**2/Vs
muh=0.18 #m**2/Vs
e=1.6*10**-19 #Electronic charge
E=400 #Electric field
E=V/l
Ve=mue*E
Vh=muh*E
sigmai=ni*e*(mue+muh)
I=sigmai*E*w*t
print"(i)Electron drift velocity is ",Ve,"m/s"
print" hole drift velocity is ",Vh,"m/s"
print"(ii)Intrinsic Conductivity of Ge is",sigmai,"ohm-m**-1"
print"(iii)The total current is ",I*1000,"mA"
Ie=3/4.0 #Current due to electron
Ih=1-Ie #Current due to holes
Vh=1 #Hole velocity
Ve=3 #Electron velocity 3 times the hole velocity
R=(Ie*Vh/(Ih*Ve))
print"The ratio of electrons to holes drift velocity is ",R
e=1.6*10**-19 #in coulamb
T=300 #in Kelvin
MUh=0.025 #in m**2/V-s
MUe=0.17 #in m**2/V-s
k=1.38*10**-23 #in J/K
De=MUe*k*T/e #in cm**2/s
Dh=MUh*k*T/e #in cm**2/s
print"Diffusion constant of electron is ",round(De*10000,2),"(in cm**2/s)"
print"Diffusion constant of hole is ",round(Dh*10000,2),"(in cm**2/s)"
N=3*10**25 #No of atoms
e=1.6*10**-19
Eg=1.1*e #eV
k=1.38*10**-23 #j/k boltzman's constant
T=300 #K
mue=0.14
muh=0.05
ni=N*math.exp(-Eg/(2*k*T))
sigma=ni*e*(mue+muh)
print"The intrinsic carries concentration is ",round(ni,-14),"/m**3"
print"The conductivity of Si is ",round(sigma,5),"S/m"
a=1.5 #a=me/mo
T=300 #K
Nc=4.82*10**21*(a)**(1.5)*T**(1.5)
print"The effective density is",round(Nc,-23),"/m**3"
a=0.07 #a=me/mo
b=0.4 #b=mh/mo
T=300 #K
Eg=0.7 #eV
k=8.62*10**-5 # Boltzman constant
import math
ni=math.sqrt(2.33*10**43*(a*b)**(1.5)*T**3*math.exp(-Eg/(k*T)))
print"The intrinsic concentration of charge carrier is",round(ni,-16),"/m**3"
C=5*10**28 #atom/m**3, concentration of Si atoms
DL=2*10**8 #Doping level
m=1
me=m
Nd=C/DL
nc=Nd
T=((nc/(4.82*10**21))*(m/me)**(1.5))**(2/3.0)
print"The absolute temprature is",round(T,2),"K"
T1=300.0 #K temprature
T2=400.0
k=1.38*10**-23 #J/k
m=1.25*9.107*10**-31
h=6.625*10**-34
dE=0.3 #eV
k_=8.62*10**-5
import math
nc1=2*(2*math.pi*m*k*T1/(h**2))**(1.5)
n1=nc1*math.exp(-(0.3/(k_*T1)))
nc2=2*(2*math.pi*m*k*T2/(h**2))**(1.5)
n2=nc2*math.exp(-(0.3/(k_*T2)))
print"The effective density at temprature 300 K is",round(n1,-19),"/m**3"
print"The effective density at temprature 400 K is",round(n2,-19),"/m**3"
T=300.0
k=8.62*10**-5 #J/k
m=9.107*10**-31
me=0.6*m
mh=0.4*m
dE=-3*k*T*math.log((me/mh)**(1))/4.0 #dE=Ef-Emidgap
print"The position of fermi level is",round(dE,4),"eV"
T=300.0
Eg=0.72 #eV Energy gap
k=8.62*10**-5 #J/k
me=1
mh=5.0
import math
dE=(Eg/2.0)-3*k*T*math.log(me/mh)/4.0 #dE=Ef-Emidgap
print"The position of fermi level is",round(dE,4),"eV"
T1=300.0
T2=350
Eg=0.24 #eV Energy gap
import math
dE=(T2/T1)*Eg
print"The position of fermi level is",round(dE,4),"eV"
T1=300.0
T2=400
Eg=0.27 #eV Energy gap
import math
dE=(T2/T1)*Eg
print"The position of fermi level is",round(dE,4),"eV"
dE1=0.3 #eV Energy gap
kT=0.026 #eV
import math
x=math.exp(-dE1/kT) #x=Nd/nc
y=5 #y=Nd2/Nd1
dE2=-math.log(y)*kT+dE1
print"The position of fermi level is",round(dE2,3),"eV"
dE1=0.39 #eV Energy gap
kT=0.026 #eV
import math
x=math.exp(-dE1/kT) #x=NA1/nV
y=3 #y=NA2/NA1
dE2=((dE1/kT)-math.log(y))*kT
print"The position of fermi level is",round(dE2,2),"eV"
rho=1 #ohm-m Resistivity
Rh=100.0 #cm**3/coulomb
e=1.6*10**-19
con=1/rho #Conductivity
R=1/Rh #Charge density
ED=R*10**6/e
mu=con/(R*10**6)
print"The electron density is",ED,"/m**3"
print"The mobility is %.e"%mu,"/m**3"
w=0.1 #m width
t=0.01 #m thickness
F=0.6 #T, field
Rh=3.8*10**-4 #Hall Coefficient
I=10 #mA
Vh=(Rh*F*I/w)
print"Hall Voltage is",Vh*1000,"micro V"
e=1.6*10**-19 #in coulamb
ND=10**17 #in cm**-3
Bz=0.1 #in Wb/m**2
w=4 #in mm
d=4 #in mm
Ex=5 #in V/cm
MUe=3800 #in cm**2/V-s
v=MUe*Ex #in cm/s
v=v*10**-2 #in m/s
VH=Bz*v*d #in mV
print"Magnitude of hall voltage is",VH,"mV"
e=1.6*10**-19 #in coulamb
ND=10**21 #in m**-3
Bz=0.2 #in T
d=4 #in mm
d=d*10**-3 #in meter
J=600 #in A/m**2
n=ND #in m**-3
VH=Bz*J*d/(n*e) #in V
print"Magnitude of hall voltage is ",VH*10**3,"mV"
e=1.6*10**-19 #in coulamb
rho=0.00912 #in ohm-m
B=0.48 #in Wb/m**2
RH=3.55*10**-4 #in m**3-coulamb**-1
SIGMA=1/rho #in (ohm=m)**-1
import math
THETAh=math.atan(SIGMA*B*RH) #in Degree
print"Hall angle is",round(THETAh*180/3.14,4),"degree"