#Variable declaration
mew_e=0.36; #mobility of electrons in m^2/Vs
mew_h=0.14; #mobility of holes in m^2/Vs
sigma=2.2; #conductivity in ohm-1 m-1
T=300; #temperature in K
e=1.6*10**-19; #electron charge in C
#Calculation
ni=sigma/(e*(mew_e+mew_h)); #carrier concentration per m^3
#Result
print("carrier concentration of an intrinsic semiconductor per m^3 is",ni);
#importing modules
import math
import numpy as np
from __future__ import division
#Variable declaration
T1=20; #temperature in C
T2=100; #temperature in C
sigma_i20=250; #conductivity in ohm-1 m-1
sigma_i100=1100; #conductivity in ohm-1 m-1
k=1.38*10**-23;
#Calculation
T1K=T1+273; #temperature in K
T2K=T2+273; #temperature in K
T_1K=T1K**(-1);
T_2K=T2K**(-1);
T_1=T_2K-T_1K;
T_2=T2K/T1K;
Tk=T_1**(-1);
T_k=(T_2)**(3/2);
#intrinsic carrier concentration at T1K is ni20 = 2*((2*math.pi*k*m*293)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-Eg/(2*k*293))
#intrinsic carrier concentration at T2K is ni100 = 2*((2*math.pi*k*m*373)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-Eg/(2*k*373))
#dividing ni20/ni100 = (293/373)**(3/2)*(math.exp(-Eg/(2*k*293))/math.exp(-Eg/(2*k*373)))
#ni20/ni100 = (293/373)**(3/2)*math.exp((-Eg/(2*k))((1/293)-(1/373)))
#sigma_i20/sigma_i100 = (ni20*e*(mew_e+mew_h))/(ni100*e*(mew_e+mew_h)) = ni20/ni100
#therefore sigma_i20/sigma_i100 = ni20/ni100 = (293/373)**(3/2)*math.exp((-Eg/(2*k))((1/293)-(1/373)))
#math.exp((-Eg/(2*k))*((1/293)-(1/373))) = (sigma_i20/sigma_i100)*(373/293)**(3/2)
#by taking log on both sides we get (-Eg/(2*k))*((1/293)-(1/373)) = np.log((sigma_i20/sigma_i100)*(373/293)**(3/2))
#Eg=2*k*(((1/373)-(1/293))**(-1))*np.log((sigma_i20/sigma_i100)*(373/293)**(3/2))
Eg=2*k*Tk*np.log((sigma_i20/sigma_i100)*T_k); #band gap in J
EgeV=Eg*6.241*10**18; #converting J to eV
EgeV=math.ceil(EgeV*10**4)/10**4; #rounding off to 4 decimals
#Result
print("band gap of the semiconductor in J is",Eg);
print("band gap of the semiconductor in eV is",EgeV);
#answer for band gap in eV given in the book is wrong in the 4th decimal point
#Variable declaration
I=10**-2; #current in Ampere
l=100; #length in mm
d=1; #thickness in mm
w=10; #breadth in mm
B=0.5; #magnetic field in Wb/m^2
RH=3.66*10**-4; #hall coefficient in m^3/C
#Calculation
w=w*10**-3; #width in m
VH=(B*I*RH)/w; #hall voltage
VH=VH*10**4;
#Result
print("Hall voltage in V is",VH,"*10**-4");
#importing modules
import math
#Variable declaration
sigma=300; #conductivity in S/cm
T=300; #temperature in K
ni=1.5*10**10 #carrier concentration per cm^3
mew_e=1300; #mobility of electrons in cm^2/Vs
mew_h=500; #mobility of holes in cm^2/Vs
e=1.6*10**-19; #electron charge in C
#Calculation
sigma=sigma*10**2; #sigma in S/m
mew_e=mew_e*10**-4; #mobility of electrons in m^2/Vs
ND=sigma/(e*mew_e); #concentration of electron per m^3
ni=ni*10**6; #carrier concentration per m^3
p=ni**2/ND; #hole concentration per m^3
p=p/10**8;
p=math.ceil(p*10**3)/10**3; #rounding off to 3 decimals
mew_h=mew_h*10**-4; #mobility of holes in m^2/Vs
NA=sigma/(e*mew_h); #concentration of hole per m^3
n=ni**2/NA; #electron concentration per m^3
n=n/10**7;
#Result
print("concentration of electron for N-type semiconductor per m^3",ND);
print("hole concentration per m^3",p,"*10**8");
print("concentration of hole for P-type semiconductor per m^3",NA);
print("electron concentration per m^3",int(n),"*10**7");
#importing modules
import math
#Variable declaration
RH=-3.68*10**-5; #hall coefficient in m^3/C
e=1.6*10**-19; #electron charge in C
#Calculation
#hall coefficient is negative implies charge carriers are electrons
n=(3*math.pi)/(8*(-RH)*e); #carrier concentration
#Result
print("charge carriers are electrons");
print("carrier concentration per m^3 is",n);
#importing modules
import math
from __future__ import division
#Variable declaration
Eg1=0.36; #energy gap of 1st material in eV
Eg2=0.72; #energy gap of 2nd material in eV
T=300; #temperature in K
mh=9*10**-31;
me=9*10**-31;
#given that 2*k*T=0.052;
#consider X=2*k*T
X=0.052;
#Calculation
#intrinsic carrier concentration for A niA = 2*((2*math.pi*k*T*m)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-0.36/(2*k*T))
#intrinsic carrier concentration for B niB = 2*((2*math.pi*k*T*m)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-0.72/(2*k*T))
#dividing niA/niB = math.exp(-0.36/(2*k*T))*math.exp(0.72/(2*k*T))
#let niA/niB be A
A = math.exp(-0.36/X)*math.exp(0.72/X);
A=A/10**3;
A=math.ceil(A*10**5)/10**5; #rounding off to 5 decimals
#Result
print("ratio of intrinsic carrier densities of A and B is",A,"*10**3");
#importing modules
import math
#Variable declaration
ND=2*10**22; #concentration of electron per m^3
sigma=112; #conductivity in ohm-1 m-1
e=1.6*10**-19; #electron charge in C
#Calculation
mew=sigma/(ND*e); #mobility of electrons
mew=math.ceil(mew*10**3)/10**3; #rounding off to 3 decimals
#Result
print("mobility of electrons in m^2/Vs is",mew);
#importing modules
import math
#Variable declaration
w=500; #thickness in micrometre
A=2.5*10**-3; #area of cross section in cm^-2
Ix=1; #current in ampere
Bz=10; #magnetic field in Wb/cm^2
n=10**16; #donor concentration in m^-3
e=1.6*10**-19; #electron charge in C
#Calculation
Bz=Bz*10**-4; #magnetic field in Wb/m^2
w=w*10**-6; #thickness in m
RH=(3*math.pi)/(8*n*e); #hall coefficient
VH=(Bz*Ix*RH)/w; #hall voltage
VH=VH/10**3;
VH=math.ceil(VH*10**4)/10**4; #rounding off to 4 decimals
#Result
print("hall voltage in V is",VH,"*10**3");
#importing modules
import math
from __future__ import division
import numpy as np
#Variable declaration
Eg=1.2; #energy gap in eV
T1=300; #temperature in K
T2=600; #temperature in K
k=1.38*10**-23;
#Calculation
T_1=T1**(-1);
T_2=T2**(-1);
T=T_1-T_2;
Eg=Eg*1.602*10**-19; #Eg in J
#sigma_300=ni300*e*(mew_e+mew_h)
#sigma_600=ni600*e*(mew_e+mew_h)
#sigma_600/sigma_300 = ni600/ni300
#ni600/ni300 =((T2/T1)**(3/2))*math.exp(-Eg/(2*k*T2))*math.exp(Eg/(2*k*T1));
#ni600/ni300 =((T2/T1)**(3/2))*math.exp((Eg/(2*k))*T;
#let ni600/ni300 be X
X=((T2/T1)**(3/2))*math.exp((Eg/(2*k))*T);
#Result
print("ratio between the conductivity of material is",int(X));
#answer given in the book is wrong
#importing modules
import math
#Variable declaration
sigma=10**-6; #electrical conductivity in ohm-1 m-1
mew_e=0.85; #electron mobility in m^2/Vs
mew_h=0.04; #hole mobility in m^2/Vs
e=1.6*10**-19; #electron charge in C
#Calculation
ni=sigma/(e*(mew_e+mew_h)); #intrinsic carrier concentration
ni=ni/10**12;
ni=math.ceil(ni*10**4)/10**4; #rounding off to 4 decimals
#Result
print("intrinsic carrier concentration per m^3 is",ni,"*10**12");
#importing modules
import math
#Variable declaration
rho_p=10; #resistivity of p-type Si in ohm cm
rho_n=10; #resistivity of n-type Si in ohm cm
mew_e=1350; #electron mobility in cm^2/Vs
mew_h=480; #hole mobility in cm^2/Vs
ni=1.5*10**10; #carrier concentration in cm^-3
e=1.6*10**-19; #electron charge in C
#Calculation
rho_p=rho_p*10**-2;#resistivity of p-type Si in ohm m
sigma_p=1/rho_p; #electrical conductivity
mew_h=mew_h*10**-3;
NA=sigma_p/(e*mew_h); #acceptor concentration
ni=ni*10**6; #carrier concentration in m^-3
n=ni**2/NA; #concentration of minority carriers in m^-3
n=n/10**12;
n=math.ceil(n*10**4)/10**4; #rounding off to 4 decimals
rho_n=rho_n*10**-2; #resistivity of n-type Si in ohm m
sigma_n=1/rho_n; #electrical conductivity
mew_e=mew_e*10**-3;
ND=sigma_n/(e*mew_e); #donor concentration
p=(ni**2)/ND; #concentration of minority carriers in m^-3
p=p/10**12;
p=math.ceil(p*10**3)/10**3; #rounding off to 3 decimals
#Result
print("donor concentration per m^3 is",ND);
print("concentration of minority carriers per m^3",p,"*10**12");
print("acceptor concentration per m^3 is",NA);
print("concentration of minority carriers per m^3 is",n,"*10**12");