Chapter 3:The first Law of Thermodynamics¶

Example 3.1,Page no:18¶

In :
V1=14 				#initial volume of cylinder in m3
V2=9 				#final volume of cylinder in m3
P=2000 				#pressure during the operation in N/m2
U=(-6000) 			#internal energy of the system in J
W=-P*(V2-V1) 			#work done during the operation in J
Q=U-W 				#energy tranfered in form of heat in J
print"energy tranfered in form of heat is",Q,"J"

energy tranfered in form of heat is -16000 J

Example 3.2,Page no:18¶

In :
R=8.314 				#universal gas constant [J/K/mol]
T=300					#temperture for the process [K]
U=0 					#change in internal energy [J]
V1=2.28 				#initial volume [m3]
V2=4.56 				#final volume[m3]
import math
W=2.303*R*T*math.log10(V2/V1) 		#work done during the process[J]
Q=W 					#heat lost or gained by the system[J]
print"The heat gained by the system is",round(Q),"J mol^-1"
The heat gained by the system is 1729.0 J mol^-1

Example 3.3,Page no:19¶

In :
H=29.2 					#latent heat of vaporisation[KJ/mol]
T=332 					#temperature of the system[K]
R=8.314 				#universal gas constant [J/K/mol]
Qp=H 					#at constant pressure [KJ]
W=-R*0.001*T 				#workdone [KJ]
U=Qp+W 					#change in internal energy[KJ]
print"Heat absorbed by the bromine vapours is",Qp,"KJ"
print"\nWorkdone during the process is",round(W,2),"KJ"
print"\nChange in internal energy of the system is",round(U,2),"KJ"
Heat absorbed by the bromine vapours is 29.2 KJ

Workdone during the process is -2.76 KJ

Change in internal energy of the system is 26.44 KJ

Example 3.4,Page no:20¶

In :
print"C7H16(l) + 11O2(g) -> 7CO2(g) + 8H2O(l)"
n=-4 				#change in no. of moles when reaction proceeds from reactants to 				products
T=298 				#temperature of the process [K]
R=8.314 			#universal gas constant [J/K/mol]
Qv=-4800 			#heat energy at constant volume [KJ]
U=Qv 				#change in internal energy of system [KJ]
H=U+n*R*0.001*T 		#change in enthalpy of the system[KJ]
print"the change in enthalpy of system is",round(H,2),"kJ"
C7H16(l) + 11O2(g) -> 7CO2(g) + 8H2O(l)
the change in enthalpy of system is -4809.91 kJ

Example 3.5,Page no:21¶

In :
n=1 				#number of moles of an given ideal gas
T=298 				#temperature for the process[K]
V1=8.3 				#initial volume of the ideal gas[m3]
V2=16.8 			#final volume of the ideal gas[m3]
R=8.314 			#universal gas constant[J#K#mol]
import math
W=-2.303*R*T*math.log10(V2/V1) #[J]
Q=-W 				#[J]
print"H=U+PV ,where U is change in internal energy which is zero due to isothermal process"
print"PV where V is change in volume of system ,PV=RT & RT==0 since T i.e change in temp is zero for system"
print"Therefore,the change in enthalpy is 0J"
print"The workdone by system is",round(W,1),"J mol^-1"
print"\nThe heat evolved is",round(Q,1),"J mol^-1"
H=U+PV ,where U is change in internal energy which is zero due to isothermal process
PV where V is change in volume of system ,PV=RT & RT==0 since T i.e change in temp is zero for system
Therefore,the change in enthalpy is 0J
The workdone by system is -1747.3 J mol^-1

The heat evolved is 1747.3 J mol^-1

Example 3.6,Page no:24¶

In :
T1=323 			#intial temperature of water[K]
T2=373 			#final temperature of water[K]
Cp=75.29 		#specific heat of water[J/K/mol]
w=100.0 			#weight of water[g]
mol_wt=18.0 		#molecular weight of water[g/mol]
n=w/mol_wt 		#no. of moles of water[moles]
H=(n*Cp*(T2-T1))*0.001 	#change in enthalpy of water[J]
print"The change in enthalpy of water is",round(H,2),"kJ"
The change in enthalpy of water is 20.91 kJ

Example 3.7,Page no:29¶

In :
print"SO2 + 0.5O2 -> SO3"
U=-97030 			#heat of reaction[J]
n=1-(1+0.5) 			#change in no. of moles
R=8.314 			#universal gas constant[J/K/mol]
T=298 				#temperature during the reaction[K]
H=U+n*R*T 			#change inenthalpy of reaction[J]
print"The change in enthalpy of reaction is",round(H),"J(approx)"
SO2 + 0.5O2 -> SO3
The change in enthalpy of reaction is -98269.0 J(approx)

Example 3.8,Page no:29¶

In :
print"i.C(s) + O2(g) -> CO2(g)"
H1=-393.5 		#change in enthalpy [KJ/mol]
T1=298 			#temperature [K]
n1=0 			#change in no. of moles in reaction moving in forward direction
R=0.008314 		#universal gas constant [KJ/K/mol]

U1=H1-n1*R*T1 		#change in internal energy [KJ]
print"The change in internal energy is",round(U1,1),"KJ/mol"

print"ii.C(s) + 0.5O2 -> CO(g)"
H2=-110.5 		#change in enthalpy[KJ/mol]
T2=298 			#temperature[K]
n2=1-0.5 		#change in no. of moles in reaction moving in forward direction
R=0.008314 		#universal gas constant [KJ/K/mol]

U2=H2-n2*R*T2 		#change in internal energy [KJ]
print"The change in internal energy is",round(U2,3),"KJ/mol"
i.C(s) + O2(g) -> CO2(g)
The change in internal energy is -393.5 KJ/mol
ii.C(s) + 0.5O2 -> CO(g)
The change in internal energy is -111.739 KJ/mol

Example 3.9,Page no:30¶

In :
print"The standard heat of combustion of"
print"2C6H6(l)+ 15O2(g)-> 12 CO2(g)+ 6 H2O(l)"
print"H1(standard heat of combustion)=-6536 KJ/mol"
H1=-6536 			#standard heat of combustion [KJ/mol]
print"C6H6(l)+ 7.5 O2(g)-> 6 CO2(g)+ 6 H2O(l)"
H2=H1/2 			#standard heat of combustion[KJ/mol]
print"H2(standard heat of combustion for 1 mole of C6H6)=",H2,"kJ/mol"
The standard heat of combustion of
2C6H6(l)+ 15O2(g)-> 12 CO2(g)+ 6 H2O(l)
H1(standard heat of combustion)=-6536 KJ/mol
C6H6(l)+ 7.5 O2(g)-> 6 CO2(g)+ 6 H2O(l)
H2(standard heat of combustion for 1 mole of C6H6)= -3268 kJ/mol

Example 3.10,Page no:32¶

In :
print"N2(g)+3H2(g)-> 2NH3(g)"
H=-92.22 			#standard heat of reaction [KJ/mol]
H1=H/2 				#standard heat of formation of 1 mole [KJ/mol]
print"H(heat of formation of 1 mole of product)=",H1,"kJ mol^-1"
N2(g)+3H2(g)-> 2NH3(g)
H(heat of formation of 1 mole of product)= -46.11 kJ mol^-1

Example 3.11,Page no:32¶

In :
print"C2H5OH(l)+3O2(g)->2CO2(g)+3H2O(l)"
T=298 				#temperature during the reaction[K]
Hw=-285.83 			#standard heat of formation of liquid water [KJ/mol]
He=-277.69 			#standard heat of formation of liquid ethanol[KJ/mol]
Hco2=-393.51 			#standard heat of formation of carbon dioxide[KJ/mol]
Ho2=0 				#standard heat of formation of oxygen gas[KJ/mol]
H=2*Hco2+3*Hw-He-3*Ho2 		#standard heat of reaction
print"H(standard heat of reaction)=",H,"kJ"
C2H5OH(l)+3O2(g)->2CO2(g)+3H2O(l)
H(standard heat of reaction)= -1366.82 kJ

Example 3.12,Page no:33¶

In :
print"CO(g)+NO(g)->0.5N2(g)+CO2(g)"
Hrxn=-374 		#standard heat of reaction[KJ/mol]
Hno=90.25 		#standard heat of formation of NO[KJ/mol]
Hco2=-393.51 		#standard heat of formation of CO2[KJ/mol]
Hn2=0 			#standard heat of formation of N2[KJ/mol]
T=298 			#temperature of reaction [K]
Hco=0.5*Hn2+Hco2-Hno-Hrxn 	#standard heat of formation of CO[KJ/mol]
print"Hco(standard heat of formation)=",Hco,"kJ mol^-1"
CO(g)+NO(g)->0.5N2(g)+CO2(g)
Hco(standard heat of formation)= -109.76 kJ mol^-1

Example 3.13,Page no:34¶

In :
H1=-29.6 		#the standard heat of hydrogenation of gaseous propylene to propane[Kcal]
H2=-530.6 		#the heat of combustion of propane[Kcal]
H3=-94.0 		#the heat of formation of carbon dioxide[Kcal]
H4=-68.3 		#the heat of formation of liquid water[Kcal]

print"C3H6(g)+4.5O2(g)->3CO2(g)+3H2O(l)"
H5=(3*H3+4*H4)-(H1+H2)#[Kcal]
print"\n H(standard heat of combustion)=",H5,"Kcal"
print"3C(s)+3H2(g)->C3H6(g)"
H6=-H5+3*H3+3*H4 #[Kcal]
print"\n H(standard heat of formation)=",H6,"Kcal"
C3H6(g)+4.5O2(g)->3CO2(g)+3H2O(l)

H(standard heat of combustion)= 5.0 Kcal
3C(s)+3H2(g)->C3H6(g)

H(standard heat of formation)= -491.9 Kcal

Example 3.14,Page no:34¶

In :
H1=-114.1 			#standard heat of reaction:2NO(g)+O2(g)->2NO2(g) [KJ/mol]
H2=-110.2 			#standard heat of reaction:4NO2(g)+O2(g)->2N2O5(g) [KJ/mol]
H3=180.5 			#standard heat of reaction:N2(g)+O2(g)->2NO(g) [KJ/mol]

#reacton:N2(g)+2.5O2(g)->N2O5(g)
H4=(2*H1+H2+2*H3)/2 		#standard heat of formation of N2O5[KJ/mol]
print"H(standard heat of formation of N2O5)=",H4,"kJ/mol"
H(standard heat of formation of N2O5)= 11.3 kJ/mol

Example 3.15,Page no:35¶

In :
Hc=-5645 		#standard enthalpy of combustion of 			reaction:C12H22O11(s)+12O2(g)->12CO2(g)+11H2O(l) [KJ/mol]
Hf1=-393.51 		#standard heat of formation of CO2: C(s)+O2(g)->CO2(g) [KJ/mol]
Hf2=-285.83 		#standard heat of formation of H2O: H2(g)+0.5O2(g)->H2O(l) [KJ/mol]

#reaction:12C(s)+11H2(g)+5.5O2(g)->C12H22O11(s)
Hf=12*Hf1+11*Hf2-Hc 	#[KJ/mol]
print"Hf(standard heat of formation of solid sucrose)=",Hf,"KJ/mol(approx)"
Hf(standard heat of formation of solid sucrose)= -2221.25 KJ/mol(approx)

Example 3.16,Page no:37¶

In :
Hf1=-46.11 			#standard heat of formation of NH3 at 298K 				#reaction:0.5N2(g)+1.5H2(g)->NH3(g) [KJ/mol]
Cp1=29.125 			#molar heat capacity at constant pressure for N2(g)[J/K/mol]
Cp2=28.824 			#molar heat capacity at constant pressure for H2(g)[J/K/mol]
Cp3=35.06 			#molar heat capacity at constant pressure for NH3(g)[J/K/mol]
T1=298 				#initial temperature[K]
T2=400 				#final temperature[K]

Cp=Cp3-0.5*Cp1-1.5*Cp2 		#[J/K/mol]
T=T2-T1 			#[K]
Hf2=Hf1+Cp*0.001*T 		#standard heat of formation for NH3 at 400K[KJ/mol]
print"\n Hf2(standard heat of formation for NH3 at 400K =",round(Hf2,3),"kJ/mol"
Hf2(standard heat of formation for NH3 at 400K = -48.429 kJ/mol

Example 3.17,Page no:38¶

In :
from scipy.optimize import fsolve
from scipy import integrate
dH_298=-241.82       #Std Heat of formation at 298 K [kJ mol^-1]
dH_298=dH_298*1000   # in  [J mol^-1]
T1=298               #[K]
T2=1273             #[K]
def f(T):
Cp_H2g=(29.07-((0.836*10**-3)*T)+((20.1*10**-7)*T**2))
Cp_O2g=25.72+(12.98*10**-3)*T-(38.6*10**-7)*T**2
Cp_H2Og=30.36+(9.61*10**-3)*T+(11.8*10**-7)*T**2
delta_Cp=(Cp_H2Og-(Cp_H2g+(1.0/2.0)*Cp_O2g))
return(delta_Cp)

dH_1273=dH_298+dHK
dH_1273=dH_1273/1000
print"Heat of formation of H2O(g) at 1000 C=",round(dH_1273,1),"kJ mol^-1  (APPROXIMATE)"

print"NOTE:"
print"Slight variation in answer,because integration is not done precisely in the book"
print"In the book,it is written as:-7497.46 instead of -7504.3"
Heat of formation of H2O(g) at 1000 C= -249.3 kJ mol^-1  (APPROXIMATE)
NOTE:
Slight variation in answer,because integration is not done precisely in the book
In the book,it is written as:-7497.46 instead of -7504.3

Example 3.18,Page no:40¶

In :
H1=435.0 			#bond dissociation energy for: CH4->CH3+H [KJ/mol]
H2=364.0 			#bond dissociation energy for:CH3->CH2+H [KJ/mol]
H3=385.0 			#bond dissociation energy for:CH2->CH+H [KJ/mol]
H4=335.0 			#bond dissociation energy for:CH->C+H [KJ/mol]
H=(H1+H2+H3+H4)/4 	#the bond energy for C-H bond in CH4 [KJ/mol]
print"\n H(the C-H bond energy in CH4)=",round(H,1),"kJ/mol"
H(the C-H bond energy in CH4)= 379.8 kJ/mol

Example 3.19,Page no:40¶

In :
H1=-84.68 			#heat of formation : 2C(s)+3H2(g)->C2H6(g) [KJ/mol]
H2=2*716.68 			#heat of formation : 2C(s)->2C(g) [KJ]
H3=3*436 			#heat of formation : 3H2(g)->6H(g) [KJ]
H4=412 				#taking it as bond energy for one C-H bond[KJ/mol]

H=H2+H3-H1 			#heat of reaction : C2H6(g)->2C(g)+6H(g) [KJ/mol]
H5=H-6*H4 			#bond energy for one C-C bond in ethane bond [KJ/mol]
print"\n Hc-c(bond energy for one C-C bond in ethane bond)=",H5,"kJ/mol"
Hc-c(bond energy for one C-C bond in ethane bond)= 354.04 kJ/mol

Example 3.20,Page no:42¶

In :
#MgBr2(s)-->Mg(s)+Br2(l)-->Mg(g)+Br2(l)-->Mg(g)+Br2(g)-->Mg(g)+2Br(g)-->Mg+2(g) + 2e(g) + 	2Br(g)-->Mg+2(g) + 2Br-(g)
H1=-524 		#enthalpy of formation of MgBr2(s) from its element [KJ/mol]
H2=148 			#enthalpy of sublimation of Mg(s) [KJ/mol]
H3=31 			#enthalpy of vaporization of Br2(l) [KJ/mol]
H4=193 			#enthalpy of dissociation Br2 to 2Br(g) [KJ/mol]
H5=2187 		#enthalpy of ionization of Mg(g) to Mg+2(g) [KJ/mol]
H6=-650 		#enthalpy of formation of Br-(g) [KJ/mol]

H=-H1+H2+H3+H4+H5+H6 	#lattice enthalpy [KJ/mol]
print"\n H(lattice enthalpy of magnesium bromide)=",H,"kJ/mol"
H(lattice enthalpy of magnesium bromide)= 2433 kJ/mol

Example 3.21,Page no:44¶

In :
from scipy.optimize import fsolve
from scipy import integrate

dH1_298=-881.25      #[kJ/mol]
dH2_298=43.60        #[kJ/mol]
dH3_298=2*dH2_298   #[kJ/mol]
dH4_298=dH1_298+dH3_298     #[kJ/mol]
dH_heat=-dH4_298*1000       #[J/mol]

def f(T2):
def g(T):
Cp_CO2g=26.0+((43.5*10**-3)*T)-((148.3*10**-7)*T**2)
Cp_H2Og=30.36+((9.61*10**-3)*T)+((11.8*10**-7)*T**2)
Cp_N2g=27.30-((5.23*10**-3)*T)-((0.04*10**-7)*T**2)
sig_nCpf=Cp_CO2g+2*Cp_H2Og+8*Cp_N2g
return(sig_nCpf)