# Chapter8-The second law of thermodynamics¶

## Ex1-pg240¶

In [1]:
import math
##Intitalisation of variables
k1= 8.04 ##cal deg^-1 mole^-1
k2= 7*10**-4 ##cal deg^-2 mole^-1
k3= 5.1*10**-6 ##cal deg^-3 mole^-1
T1= 125. ##C
T2= 25. ##C
cv= 8.92 ##cal deg^-1 mole^-1
##CALCULATIONS
dSp= k1*math.log((273.+T1)/(273.+T2))+k2*(T1-T2)+k3*0.5*((273.+T1)**2-(273.+T2)**2)
dSp1=  cv*math.log((273.+T1)/(273.+T2))
##RESULTS
print'%s %.2f %s'% ('Increase in entropy = ',dSp,' cal deg^-1 mole^-1')
print'%s %.2f %s'% ('\n Increase in entropy = ',dSp1,' cal deg^-1 mole^-1')

Increase in entropy =  2.57  cal deg^-1 mole^-1

Increase in entropy =  2.58  cal deg^-1 mole^-1


## Ex2-pg241¶

In [2]:
import math
##Intitalisation of variables

m= 18. ##gm
T= 100. ##C
T1= 0. ##C
hv= 9720. ##cal
s= 0.36 ##cal deg^-1 mole^-1
##CALCULATIONS
dS= m*math.log((273.+T)/(273.+T1))
dS1= 2.*dS+(hv/(273.+T))-s
##RESULTS
print'%s %.2f %s'% ('Increase in entropy = ',dS,' cal deg^-1 mole^-1')
print'%s %.2f %s'% ('\n Total increase in entropy = ',dS1,' cal deg^-1 mole^-1')

Increase in entropy =  5.62  cal deg^-1 mole^-1

Total increase in entropy =  36.93  cal deg^-1 mole^-1


## Ex3-pg246¶

In [3]:
import math
##Intitalisation of variables

T2= 100. ##C
T1= 0. ##C
T3= 357. ##C
T4= 25. ##C
##CALCULATIONS
e1= (T2-T4)/(273.+T2)
e2= (T3-T4)/(273.+T3)
##RESULTS
print'%s %.2f %s'% ('Efficiency = ',e1,'')
print'%s %.2f %s'% ('\n Efficiency =  ',e2,'')

Efficiency =  0.20

Efficiency =   0.53


## Ex4-pg249¶

In [4]:
import math
##Intitalisation of variables

R= 1.987 ##cal
T= 25. ##C
p= 23.76 ##mm
##CALCULATIONS
dF= R*(273.2+T)*math.log(760./p)
##RESULTS
print'%s %.2f %s'% ('Free energy change = ',dF+1,' cal mole^-1')

Free energy change =  2054.28  cal mole^-1