Chapter 9:Statistical Mechanics

Example no:9.1,Page no:299

In [1]:
import math

#Variable declaration
k= 8.617*10**(-5)  #Boltzmann constant, eV/K
To=273.0  #initial temperature, K
E1= -13.6  #energy of ground state, eV
E2= -3.4  #energy of first excited state, eV
dE= E2-E1  #difference in energy levels
g1=2.0  #number of energy states for E1
g2=8.0  #number of energy states for E2

#Calculation
J= dE/(k*To) 
Nratio1= (g2/g1)*math.exp(-J)  #ratio of number of atoms in level 2 and level 1 at To
T1=10273.0  #K
J1= J*To/T1  
Nratio2= (g2/g1)*math.exp(-J1)  #at T1

#Result
print"(a).The ratio at 273 K is:%.3g"%Nratio1,"(Approx)"
print"(b).The ratio at 10273 k is:%.g "%Nratio2
(a).The ratio at 273 K is:1.97e-188 (Approx)
(b).The ratio at 10273 k is:4e-05 

Example no:9.4,Page no:305

In [2]:
#Variable declaration 
Moxygen= 16.0  #atomic mass,u
Mo2= 32.0  #Molecular mass, u
u= 1.66*(10**(-27))  #atomic mass unit, kg
Moxygen= Mo2*u  #mass, kg
t= 273  #temperature, K
k= 1.38*10**(-23)  #Boltzmann constant, J/K

#Calculation
Vrms= math.sqrt(3*k*t/Moxygen)  # m/s

#Result
print"The rms velocity of oxygen is: ",round(Vrms),"m/s"
The rms velocity of oxygen is:  461.0 m/s

Example no:9.5,Page no:314

In [3]:
#Variable declaration 
V= 1.00  #volume, cm**3
V= V*10**(-6)  #converting to m**3
dI= 2.404  #standard value of definite Integral used
k= 8.617*10**(-5)  #Boltzmann constant, eV/K
h= 4.13*(10**(-15))  #Planck's constant, eV.s
T= 1000  #temperature, K
c= 3 *(10**8)  #speed of light, m/s

#Calculation
#Part (a)
N= 8*(math.pi)*V*dI*((k*T/(h*c))**3)
#Part(b)
Sig= 5.670*10**(-8)  #Stefan's constant, W/m**2.K**4 , refer to Page 317
Ephoton= Sig*(c**2)*(h**3)*T/(2.405*(2*(math.pi)*(k**3)))  #J
e_to_J=6.23*10**18*Ephoton             #Converting to eV 

#Result
print"(a),The number of photons is:%.3g"%N
print"(b)The average energy of the photons is:%.3g"%Ephoton,"J=",round(e_to_J,3),"eV"
(a),The number of photons is:2.03e+10
(b)The average energy of the photons is:3.72e-20 J= 0.232 eV

Example no:9.6,Page no:317

In [4]:
#Variable declaration 
T= 2.7  #blackbody temperature, K
Lambda= 2.898*10**(-3)/T  #using wein's displacement law, Eqn 9.40, m

#Calculation
Lambda= Lambda*10**(3)  #converting to mm

#Result
print"The wavelength for maximum radiation is: ",Lambda,"mm"
The wavelength for maximum radiation is:  1.07333333333 mm

Example no:9.7,Page no:317

In [5]:
#Variable declaration 
Rearth= 1.5*10**(11)  #radius of earth, m
r= 1.4  #rate of arrival of sunlight, kW/m**2

#Calculation
P= (r*10**3)*4*(math.pi)*(Rearth**2)  #total power reaching Earth
Rsun= 7*10**(8)  #radius of Sun, m
r2= P/(4*(math.pi)*(Rsun**2))  #radiation rate of Sun, W/m**2
emissivity=1  #for blackbody
Sig= 5.670*10**(-8)  #Stefan's constant, W/m**2.K**4
T= (r2/(emissivity*Sig))**(1.0/4.0) 

#Result
print"The surface temperature of Sun  is:%.2g"%T,"K"
The surface temperature of Sun  is:5.8e+03 K

Example no:9.8,Page no:325

In [6]:
#Variable declaration
u= 1.66*(10**(-27))  #atomic mass unit, kg
density= 8.94*10**(3)  # kg/m**3
M= 63.5  #atomic mass of copper, u

#Calculation
Edensity= density/(M*u)  #electron density, electrons/m**3
h= 6.63*(10**(-34))  #Planck's constant, J.s
Me= 9.1*(10**(-31))  #mass of electron, kg
Efermi= h**2/(2*Me)*((3*Edensity)/(8*(math.pi)))**(2.0/3.0)  # J
e_to_J=6.23*10**18*Efermi             #Converting to eV 

#Result
print"The fermi energy is:%.3g"%Efermi,"J or",round(e_to_J,2),"eV"
The fermi energy is:1.13e-18 J or 7.04 eV