# Chapter 19:Electrochemistry¶

## Example no:19.3,Page no:848¶

In [8]:
#Variable declaration
E0cathode=0.8 #standard electrode potential of cathode(Ag+/Ag), V
E0anode=-2.37 #standard electrode potential of anode(Mg2+/Mg), V

#Calculation
E0cell=E0cathode-E0anode #standard emf of the cell, V

#Result
print"The standard emf of the cell is :",E0cell,"V"

The standard emf of the cell is : 3.17 V


## Example no:19.4,Page no:850¶

In [18]:
#Variable declaration
n=2.0
E0cathode=0.15 #standard electrode potential of cathode(Cu2+/Cu+), V
E0anode=-0.14 #standard electrode potential of anode(Sn2+/Sn), V

#Calculation
E0cell=E0cathode-E0anode #standard emf of the cell, V
import math
K=math.exp(round(n*E0cell/0.0257,1)) #equilibrium constant, from the formula E0cell=0.0257*lnK/n

#Result
print"The equilibrium constant for the given reaction is :%.e"%K

0.29
The equilibrium constant for the given reaction is :7e+09


## Example no:19.5,Page no:851¶

In [21]:
#Variable declaration
n=6
F=96500 #faraday constant, J/V mol
E0cathode=-2.87 #standard electrode potential of cathode(Ca2+/Ca), V
E0anode=1.5 #standard electrode potential of anode(Au3+/Au), V

#Calculation
E0cell=E0cathode-E0anode #standard emf of the cell, V
deltaG0=-n*F*E0cell #standard free energy change for the reaction, kJ/mol

#Result
print"The standard free energy change for the reaction is :%.2e"%(deltaG0/1000),"kJ/mol"

The standard free energy change for the reaction is :2.53e+03 kJ/mol


## Example no:19.6,Page no:853¶

In [23]:
#Variable declaration
n=2
F=96500 #faraday constant, J/V mol
Co2=0.15 #conc of Co2+ ions, M
Fe2=0.68 #conc of Fe2+ ions, M
E0cathode=-0.44 #standard electrode potential of cathode(Fe2+/Fe), V
E0anode=-0.28 #standard electrode potential of anode(Co2+/Co), V

#Calculation
import math
E0cell=E0cathode-E0anode #standard emf of the cell, V
Ecell=E0cell-0.0257/2*math.log(Co2/Fe2) #calculation of cell potential at non standard conditions, V

#Result
print "E=",round(Ecell,2),"V"
if(Ecell>0):
print"The reaction would proceed spontaneously in the direction written"
else:
print"The reaction is not spontaneously in the direction written"


E= -0.14 V
The reaction is not spontaneously in the direction written


## Example no:19.7,Page no:855¶

In [24]:
#Variable declaration
n=2
Zn=1 #conc of Zn2+ ions, M
pH2=1 #pressure of H2 gas, atm
Ecell=0.54 #emf of the cell, V
E0cell=0.76 #standard emf of the cell, V

#Calculation
import math
Q=math.exp(-(Ecell-E0cell)*2/0.0257) #since Ecell=E0cell-0.0257/2*log(Q) where Q=(Zn2+)*pH2/(H+)**2
H=math.sqrt(Zn*pH2/Q) #the conc of H+ ions, M

#Result
print"The molar concentration of H+ ion is :%.e"%H,"M"

The molar concentration of H+ ion is :2e-04 M


## Example no:19.9,Page no:870¶

In [26]:
#Variable declaration
t=7.44*3600 #time, sec
A=1.26 #current in ampere
F=96500.0 #faraday constant, J/V mol
R=0.0821 #gas constant, L atm/K
T=273.0 #temperature in Kelvin
P=1.0 #pressure in atm

#Calculation
q=A*t #charge passed, coulomb
ne=q/F #moles of electrons
nO2=ne/4.0 #moles of oxygen
nH2=ne/2.0 #moles of H2
VO2=nO2*R*T/P #volume of oxygen gas generated
VH2=nH2*R*T/P #volume of H2 gas generated

#Result
print"The volume of O2 gas is:",round(VO2,2),"L"
print"Volume of H2 gas generated is:",round(VH2,2),"L"

The volume of O2 gas is: 1.96 L
Volume of H2 gas generated is: 3.92 L