Chapter 10 - Second law of thermodynamics

Example 1 - pg 249

In [1]:
#calculate the Change ine entropy
#Initialization of variables
import math
T2=100+273.2 #K
T1=50+273.2 #K
n=1 #mol
R=1.987 #cal/deg mol
#calculations
dS=5/2 *n*R*2.303*math.log10(T2/T1)
#results
print '%s %.3f %s' %("Change in entropy =",dS," eu")
Change in entropy = 0.572  eu

Example 3 - pg 255

In [2]:
#calculate the Entropy change
#Initialization of variables
H=380 #cal
T=273.2+32.1 #K
#calculations
dS=H/T
#results
print '%s %.2f %s' %("Entropy change =",dS," eu")
Entropy change = 1.24  eu

Example 5 - pg 257

In [3]:
#calculate the Work done
#Initialization of variables
Ha=0
Hb=0
#calculations
H=Ha+Hb
q=H
U=0
w=q-H
#results
print '%s %d %s' %("Work done =",w,"J")
Work done = 0 J

Example 6 - pg 260

In [4]:
#calculate the change in entropy
#Initialization of variables
import math
prob=0.001
R=1.
N=6.023*10**23
#calculations
dS=1.987*2.303*math.log10(prob) /N
#results
print '%s %.1e %s' %("change in entropy =",dS," eu")
change in entropy = -2.3e-23  eu

Example 7 - pg 263

In [5]:
#calculate the Change in A 
#Initialization of variables
T=373.2 #K
c=1.987 #cal/deg
#calculations
w=c*T
A=-w
#results
print '%s %d %s' %("Change in A =",A,"cal")
Change in A = -741 cal