# 10: Statistical Mechanics¶

## Example number 10.1, Page number 222¶

In :
#importing modules
from __future__ import division
import math

#Variable declaration
k = 1.38*10**-23;    #Boltzmann constant(J/K)
e = 1.6*10**-19;     #Energy equivalent of 1 eV(J/eV)
g1 = 2;    #The degeneracy of ground state
g2 = 8;    #The degeneracy of excited state
delta_E = 10.2;     #Energy of excited state above the ground state(eV)
T = 6000;    #Temperature of the state(K)

#Calculation
D_ratio = g2/g1;    #Ratio of degeneracy of states
x = k*T/e;
N_ratio = D_ratio*math.exp(-delta_E/x);     #Ratio of occupancy of the excited to the ground state

#Result
print "The ratio of occupancy of the excited to the ground state is",N_ratio

The ratio of occupancy of the excited to the ground state is 1.10167326887e-08


## Example number 10.2, Page number 222¶

In :
a = 10/2;
#enegy of 10 bosons is E = (10*pi**2*h**2)/(2*m*a**2) = (5*pi**2*h**2)/(m*a**2)

#Result
print "enegy of 10 bosons is E = ",int(a),"(pi**2*h**2)/(m*a**2)"

enegy of 10 bosons is E =  5 (pi**2*h**2)/(m*a**2)


## Example number 10.3, Page number 223¶

In :
#importing modules
import math

#Variable declaration
n1=1;    #1st level
n2=2;    #2nd level
n3=3;    #3rd level
n4=4;    #4th level
n5=5;    #5th level

#Calculation
#an energy level can accomodate only 2 fermions. hence there will be 2 fermions in each level
#thus total ground state energy will be E = (2*E1)+(2*E2)+(2*E3)+(2*E4)+E5
#let X = ((pi**2)*(h**2)/(2*m*a**2)). E = X*((2*n1**2)+(2*n2**2)+(2*n3**2)+(2*n4**2)+(n5**2))
A = (2*n1**2)+(2*n2**2)+(2*n3**2)+(2*n4**2)+(n5**2);
#thus E = A*X

#Result
print "the ground state energy of the system is",A,"(pi**2)*(h**2)/(2*m*a**2)"

the ground state energy of the system is 85 (pi**2)*(h**2)/(2*m*a**2)


## Example number 10.4, Page number 223¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
e = 1.6*10**-19;    #Energy equivalent of 1 eV(J/eV)
h = 6.626*10**-34;    #Planck's constant(Js)
me = 9.1*10**-31;    #Mass of electron(kg)
rho = 10.5;    #Density of silver(g/cm)
m = 108;    #Molecular mass of silver(g/mol)

#Calculation
N_D = rho*N_A/m;    #Number density of conduction electrons(per cm**3)
N_D = N_D*10**6;    #Number density of conduction electrons(per m**3)
E_F = ((h**2)/(8*me))*(3/math.pi*N_D)**(2/3);     #fermi energy(J)
E_F = E_F/e;          #fermi energy(eV)
E_F = math.ceil(E_F*10**2)/10**2;     #rounding off the value of E_F to 2 decimals

#Result
print "The number density of conduction electrons is",N_D, "per metre cube"
print "The Fermi energy of silver is",E_F, "eV"

The number density of conduction electrons is 5.85277777778e+28 per metre cube
The Fermi energy of silver is 5.51 eV


## Example number 10.5, Page number 224¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
k = 1.38*10**-23;      #Boltzmann constant(J/K)
T = 293;     #Temperature of sodium(K)
E_F = 3.24;    #Fermi energy of sodium(eV)
e = 1.6*10**-19;    #Energy equivalent of 1 eV(J/eV)

#Calculation
C_v = math.pi**2*N_A*k**2*T/(2*E_F*e);     #Molar specific heat of sodium(per mole)
C_v = math.ceil(C_v*10**2)/10**2;     #rounding off the value of C_v to 2 decimals

#Result
print "The electronic contribution to molar specific heat of sodium is",C_v, "per mole"

The electronic contribution to molar specific heat of sodium is 0.32 per mole


## Example number 10.6, Page number 224¶

In :
#importing modules
import math
from __future__ import division

#Variable declaration
e = 1.6*10**-19;    #Energy equivalent of 1 eV(J/eV)
h = 6.626*10**-34;     #Planck's constant(Js)
m = 9.1*10**-31;       #Mass of the electron(kg)
N_D = 18.1*10**28;       #Number density of conduction electrons in Al(per metre cube)

#Calculation
E_F = h**2/(8*m)*(3/math.pi*N_D)**(2/3);     #N_D = N/V. Fermi energy of aluminium(J)
E_F = E_F/e;      #Fermi energy of aluminium(eV)
E_F = math.ceil(E_F*10**3)/10**3;     #rounding off the value of E_F to 3 decimals
Em_0 = 3/5*E_F;     #Mean energy of  the electron at 0K(eV)
Em_0 = math.ceil(Em_0*10**3)/10**3;     #rounding off the value of Em_0 to 3 decimals

#Result
print "The Fermi energy of aluminium is",E_F, "eV"
print "The mean energy of  the electron is",Em_0, "eV"

The Fermi energy of aluminium is 11.696 eV
The mean energy of  the electron is 7.018 eV

In [ ]: