Chapter 15: Statistical Thermodyanamics

Example Problem 15.2, Page Number 362

In [2]:
from math import log

#Variable Declaration
U = 1.00e3            #Total internal energy, J
hnu = 1.00e-20        #Energy level separation, J
NA = 6.022e23         #Avagadro's Number, 1/mol
k = 1.38e-23          #Boltzmann constant, J/K
n = 1                 #Number of moles, mol

#Calcualtions
T = hnu/(k*log(n*NA*hnu/U-1.))

#Results
print 'For Internal energy to be %4.1f J temperature will be %4.1f K'%(U,T)
For Internal energy to be 1000.0 J temperature will be 449.0 K

Example Problem 15.3, Page Number 367

In [1]:
from math import exp

#Variable Declaration
g0 = 3.0              #Ground State partition function
labda = 1263e-9       #Wave length in nm
T = 500.              #Temperature, K
c = 3.00e8            #Speed of light, m/s
NA = 6.022e23         #Avagadro's Number, 1/mol
k = 1.38e-23          #Boltzmann constant, J/K
n = 1.0               #Number of moles, mol
h = 6.626e-34         #Planks's Constant, J.s

#Calcualtions
beta = 1./(k*T)
eps = h*c/labda
qE = g0 + exp(-beta*eps)
UE = n*NA*eps*exp(-beta*eps)/qE

#Results
print 'Energy of excited state is %4.2e J'%eps
print 'Electronic partition function qE is %4.3e'%qE
print 'Electronic contribution to internal enrgy is %4.3e J'%UE
Energy of excited state is 1.57e-19 J
Electronic partition function qE is 3.000e+00
Electronic contribution to internal enrgy is 3.921e-06 J

Example Problem 15.5, Page Number 376

In [8]:
from math import log, pi, sqrt

#Variable Declaration
Mne = 0.0201797       #Molecular wt of ne, kg/mol     
Mkr = 0.0837980       #Molecular wt of kr, kg/mol
Vmne = 0.0224         #Std. state molar volume of ne, m3
Vmkr = 0.0223         #Std. state molar volume of kr, m3
h = 6.626e-34         #Planks's Constant, J.s
NA = 6.022e23         #Avagadro's Number, 1/mol
k = 1.38e-23          #Boltzmann constant, J/K
T = 298               #Std. state temeprature,K 
R = 8.314             #Ideal gas constant, J/(mol.K)
n = 1.0               #Number of mole, mol

#Calcualtions
mne = Mne/NA
mkr = Mkr/NA
Labdane = sqrt(h**2/(2*pi*mne*k*T))
Labdakr = sqrt(h**2/(2*pi*mkr*k*T))
Sne = 5.*R/2 + R*log(Vmne/Labdane**3)-R*log(NA)
Skr = 5.*R/2 + R*log(Vmkr/Labdakr**3)-R*log(NA)

#Results
print 'Thermal wave lengths for Ne is %4.2e m3'%Labdane
print 'Std. Molar entropy for Ne is %4.2f J/(mol.K)'%Sne
print 'Thermal wave lengths for Kr is %4.2e m3'%Labdakr
print 'Std. Molar entropy for Kr is %4.2f J/(mol.K)'%Skr
Thermal wave lengths for Ne is 2.25e-11 m3
Std. Molar entropy for Ne is 145.46 J/(mol.K)
Thermal wave lengths for Kr is 1.11e-11 m3
Std. Molar entropy for Kr is 163.18 J/(mol.K)

Example Problem 15.8, Page Number 381

In [39]:
from math import log, pi

#Variable Declaration
M = 0.040             #Moleculat wt of Ar, kg/mol
h = 6.626e-34         #Planks's Constant, J.s
NA = 6.022e23         #Avagadro's Number, 1/mol
k = 1.38e-23          #Boltzmann constant, J/K
T = 298.15            #Std. state temeprature,K 
P = 1e5               #Std. state pressure, Pa
R = 8.314             #Ideal gas constant, J/(mol.K)
n = 1.0               #Number of mole, mol

#Calcualtions
m = M/NA
Labda3 = (h**2/(2*pi*m*k*T))**(3./2)
G0 = -n*R*T*log(k*T/(P*Labda3))

#Results
print 'Thermal wave lengths for Ne is %4.2e m3'%Labda3
print 'The Gibbs energy for 1 mol of Ar is %6.2f kJ'%(G0/1000)
Thermal wave lengths for Ne is 4.09e-33 m3
The Gibbs energy for 1 mol of Ar is -39.97 kJ