Chapter 7 - Gases and Introductory stastical thermodynamics

Example 2 - pg 192

In [1]:
#calculate the Gas constant
#Initialization of variables
h=76. #cm
d=13.5951 #g/cc
g=980.655 #cm/s^2
T=273.15 #K
v=22414.6 #cm^3 /mol
#calculations
P=h*d*g
R=P*v/(T)
#results
print '%s %.3e %s' %("Gas constant =",R,"ergs/deg. mol")
Gas constant = 8.315e+07 ergs/deg. mol

Example 3 - pg 192

In [2]:
#calculate the R value in calories
#Initialization of variables
cal=4.184*10**7 #ergs
R=8.315*10**7 #ergs/deg/mol
#calculations
Rdash=R/cal
#results
print '%s %.3f %s' %("R in calories =",Rdash," cal/ deg mol")
R in calories = 1.987  cal/ deg mol

Example 4 - pg 192

In [3]:
#calculate the root mean square velocity
#Initialization of variables
import math
from math import sqrt
R=8.315*10**7 #ergs/deg/mol
T=273.2 #deg
M=4 #g/mol
#calculations
u2=3*T*R/M
u=sqrt(u2)
#results
print '%s %.2e %s' %("root mean square velocity =",u," cm/sec")
root mean square velocity = 1.31e+05  cm/sec

Example 5 - pg 194

In [4]:
#calculate the Partial pressure of N2, O2 and CO2
#Initialization of variables
n1=2.
n2=10.
n3=3.
P=720. #mm of Hg
#calculations
n=n1+n2+n3
x1=n1/n
P1=x1*P
x2=n2/n
P2=x2*P
x3=n3/n
P3=x3*P
#results
print '%s %d %s' %("\n Partial pressure of N2 =",P1,"mm")
print '%s %d %s' %("\n Partial pressure of O2 =",P2," mm")
print '%s %d %s' %("\n Partial pressure of CO2 =",P3,"mm")
 Partial pressure of N2 = 96 mm

 Partial pressure of O2 = 480  mm

 Partial pressure of CO2 = 144 mm

Example 6 - pg 197

In [5]:
#calculate the Total energy
#Initialization of variables
T=273.2+25 #K
n=1 #mol
R=1.987 #cal/deg mol
#calculations
Etr=1.5*n*R*T
Erot=1.5*n*R*T
Evib=0
Eel=0
Etot=Etr+Erot+Evib+Eel
#results
print '%s %d %s' %("Total energy =",Etot,"cal")
Total energy = 1777 cal

Example 7 - pg 199

In [6]:
#calculate the Molecular diameter of He
#Initialization of variables'
import math
b=24.1 #cm^2/mol
N=6.023*10**23 #mole^-1
#calculations
d=(3*b/(2*math.pi*N))**(1./3)
#results
print '%s %.2e %s' %("Molecular diameter of He =",d," cm")
Molecular diameter of He = 2.67e-08  cm

Example 8 - pg 205

In [7]:
#calculate the Volume
#Initialization of variables
P=100. #atm
T=200. #K
n=1. #mole
R=0.08206 #l atm/deg mol
print "From psychrometric charts,"
Tc=126.2 #K
Pc=33.5 #K
#calculations
Pr=P/Pc
Tr=T/Tc
print "From z charts,"
z=0.83
V=z*n*R*T/P
#results
print '%s %.3f %s' %("Volume =",V," liter")
From psychrometric charts,
From z charts,
Volume = 0.136  liter