# 5: Elements of Statistical Mechanics¶

## Example number 5.1, Page number 129¶

In [1]:
#importing modules
import math
from __future__ import division

#Variable declaration
b=2.92*10**-3;      #value of b(mK)
lamda=4900*10**-10;      #wavelength(m)

#Calculations
T=b/lamda;          #temperature(K)

#Result
print "temperature is",int(T),"K"
print "answer in the book is wrong"

temperature is 5959 K
answer in the book is wrong


## Example number 5.2, Page number 129¶

In [2]:
#importing modules
import math
from __future__ import division

#Variable declaration
T=1500;    #temperature(K)
lamda=5500;      #wavelength(m)
lamda_m=20000;      #wavelength(m)

#Calculations
T_dash=lamda_m*T/lamda;          #temperature of sun(K)

#Result
print "temperature is",int(T_dash),"K"

temperature is 5454 K


## Example number 5.3, Page number 130¶

In [3]:
#importing modules
import math
from __future__ import division

#Variable declaration
T=327+273;    #temperature(K)
b=2.897*10**-3;      #value of b(mK)

#Calculations
lamda_m=b/T;          #wavelength(m)

#Result
print "wavelength is",int(lamda_m*10**10),"angstrom"

wavelength is 48283 angstrom


## Example number 5.4, Page number 130¶

In [4]:
#importing modules
import math
from __future__ import division

#Variable declaration
T=10**7;    #temperature(K)
b=0.292;      #value of b(cmK)

#Calculations
lamda_m=b/T;          #wavelength(cm)

#Result
print "wavelength is",lamda_m*10**8,"angstrom"

wavelength is 2.92 angstrom


## Example number 5.5, Page number 130¶

In [6]:
#importing modules
import math
from __future__ import division

#Variable declaration
T=1127+273;    #temperature(K)
lamda_m=2*10**-6;      #wavelength(m)
lamda=14*10**-6;      #wavelength(m)

#Calculations
Tm=lamda_m*T/lamda;     #temperature of moon(K)

#Result
print "temperature of moon is",int(Tm),"K"

temperature of moon is 200 K


## Example number 5.6, Page number 131¶

In [7]:
#importing modules
import math
from __future__ import division

#Variable declaration
lamda_m=4753*10**-10;      #wavelength(m)
lamda=14*10**-6;      #wavelength(m)
b=0.2898*10**-2;      #value of constant(mK)

#Calculations
Ts=b/lamda_m;     #temperature of sun(K)
Tm=b/lamda;       #temperature of moon(K)

#Result
print "temperature of sun is",int(Ts),"K"
print "temperature of moon is",int(Tm),"K"

temperature of sun is 6097 K
temperature of moon is 207 K


## Example number 5.7, Page number 140¶

In [7]:
#importing modules
import math
from __future__ import division

#Variable declaration
e=1.6*10**-19;     #charge(coulomb)
m=9*10**-31;       #mass(kg)
h=6.624*10**-34;    #plank's constant(Js)
n=5.86*10**28;      #density(electrons/m**3)
k=8.6*10**-5;

#Calculations
ef=(h**2/(8*m))*(3*n/math.pi)**(2/3);     #energy(J)
ef=ef/e;           #energy(eV)
theta_f=ef/k;      #maximum kinetic energy(K)

#Result
print "maximum kinetic energy is",round(theta_f/10**4,2),"*10**4 K"

maximum kinetic energy is 6.48 *10**4 K


## Example number 5.8, Page number 140¶

In [8]:
#importing modules
import math
from __future__ import division

#Variable declaration
e=1.6*10**-19;     #charge(coulomb)
m=9*10**-31;       #mass(kg)
h=6.62*10**-34;    #plank's constant(Js)
rho=970;     #density(kg/m**3)
A=23;      #atomic weight

#Calculations
n=rho*N0/A;       #concentration(electrons/m**3)
ef=(h**2/(8*m))*(3*n/math.pi)**(2/3);     #fermi energy(J)
ef=ef/e;           #fermi energy(eV)

#Result
print "fermi energy is",round(ef,3),"eV"
print "answer varies due to rounding off errors"

fermi energy is 3.187 eV
answer varies due to rounding off errors