# Chapter 2: Energy Bands and Carrier Concentration in Thermal Equillibrium¶

## Example 2.1,Page21¶

In [3]:
#initialisation of variable
from math import *
S=2;#spheres
D=3**.5/2;#diameter

#calculation
V=4*pi*R**3/3;#volume
F=S*V;

#result
print"fraction of volume of bcc unit cell is",round(F*100,1),"%"

fraction of volume of bcc unit cell is 68.0 %


## Example2.2, Page22¶

In [8]:
#initialisation of variable
from math import *
T=300;#K
W=28.09;#atomic weight

#calculation
N=8/r**3;#number
D=N*W/A;#density

#result
print"number is",round(N/10**28)*10**22,"atoms/cm^3"
print"density is",round(D/1000000,2),"g/cm^3"

number is 5e+22 atoms/cm^3
density is 2.33 g/cm^3


## Example2.4 Page41¶

In [6]:
#initialisation of variable
from math import *
D=10**16;#doping
T=300;#K
N=9.65*10**9
Nc=2.86*10**19

#calculation
p=N**2/D;#carrier concentration
F1=.0259*log(Nc/D);#fermi level
F2=.0259*log(D/N);#fermi level

#result
print"carrier concentration is",round(p,2),"cm^-3"
print"conduction band fermi level is",round(F1,3),"eV"
print"intrinsic level fermi level is",round(F2,3),"eV"

carrier concentration is 9312.25 cm^-3
conduction band fermi level is 0.206 eV
intrinsic level fermi level is 0.359 eV