#calculate the Avagadro number
#initialisation of variables
e= 1.6016*10**-19 #coloumb
F= 96493 #
#CALCULATIONS
N= F/e
#RESULTS
print '%s %.4e %s' % (' Avagadro number = ',N,'molecules/mol')
#calculate the Time required
#initialisation of variables
m= 1 #gms
M= 63.54 #gms
e= 2 #farady
F= 96493
n= 3
#CALCULATIONS
t= (m/M)*(e*F/n)
#RESULTS
print '%s %d %s' % (' Time =',t,'sec')
#calculate the transference number
#initialisation of variables
M= 25.01 #gms
n= 1.0053 #moles
n1= 6.6*10**-5 #moles
e= 1.350*10**-3 #coloumbs
#CALCULATIONS
x= M/n
y= n1*x
nm= y*10**3+e*10**3-(x/10)
t= nm/(e*10**3)
#CALCULATIONS
print '%s %.3f' % (' transference number = ',t)
#calculate the electrokinetic potential
#initialisation of variables
import math
x= 0.033 #cm
t= 38.2 #sec
e= 3.2 #v
V= 9*10**-3 #dyne sec cm**-2
k= 78
#CALCULATIONS
v= x/t
u= v/e
S= -300**2*u*V*4*math.pi/k
#RESULTS
print '%s %.3f %s' % (' electrokinetic potential =',S,' volt ')
#calculate the specific conductivity
#initialisation of variables
o= 0.999505 #mho cm^-1
k= 0.0128560
i= 97.36 #ohms
I= 117.18 #ohms
#CALCULATIONS
Lsp= k*o
L1sp= k*i/I
#RESULTS
print '%s %.6f %s' % (' specific conductivity =',L1sp,'mho cm^-1 ')
#calculate the equivalent conductance of the anion at infinite dilution
#initialisation of variables
A= 388.5
l= 349.8
a= 0.61
m= 0.1 #M
#CALCULATIONS
L= A-l
A1= a*A
Lsp= m*A1/1000.
#RESULTS
print '%s %.2e %s' % (' equivalent conductance of the anion at infinite dilution =',Lsp,' mho cm^-1 ')
#calculate the effective mobility
#initialisation of variables
l= 349.82
F= 96493.1 #coloumb
#CALCULATIONS
u= l/F
#RESULTS
print '%s %.3e %s' % (' effective mobility =',u,'cm^2 volt sec^-1 ')
#calculate the solubility product constant
#initialisation of variables
G1= -7800 #cal
G2= -24600 #cal
G3= -39700 #cal
R= 1.987 #cal/mol K
T= 25 #C
#CALCULATIONS
G= G1+G2-G3
Ksp= 10**(-G/(2.303*R*(273.2+T)))
#RESULTS
print '%s %.1e' % (' solubility product constant = ',Ksp)
#calculate the concentration of hydrogen ion
#initialisation of variables
import math
Ka= 6*10**-10
C= 10**-1 #moles l^-1
#CALCULATIONS
C1= math.sqrt(Ka*C)
#RESULTS
print '%s %.1e %s' % (' concentration of hydrogen ion =',C1,'moles l^-1 ')
#calculate the concentration of hydrogen ion
#initialisation of variables
Ka= 1.8*10**-5
n= 2 #milli moles
v= 45 #ml
n1= 0.5#milli moles
#CALCULATIONS
x= Ka*v*n1/n
C= x/v
#RESULTS
print '%s %.1e %s' % (' concentration of hydrogen ion =',C,' moles l^-1 ')
#calculate the pH of the solution and activity coefficient
#initialisation of variables
import math
a= 2.4*10**-4
Ph= 11.54
#CALCULATIONS
Ph1= -math.log10(a)
a= 10**(-Ph)
#RESULTS
print '%s %.2f' % (' pH of solution = ',Ph1)
print '%s %.1e' % (' \n activity coefficient = ',a)
#calculate the Gibbs free energy
#initialisation of variables
E= 0.35240 #volts
F= 96493.1 #coloumb
n= 2 #electrons
#CALCULATIONS
G= -n*F*E
#RESULTS
print '%s %d %s' % (' Gibbs free energy =',G,' absolute joules ')
print 'The answer is a bit different due to rounding off error in textbook'
#calculate the Entropy and Enthalpy of the mixture
#initialisation of variables
E= 0.35240 #volts
E1= 0.35321 #volts
E2= 0.35140 #volts
E3=.35252
T= 25. #C
T1= 20. #C
T2= 30. #C
n= 2. #electrons
F= 96493.1 #coloumb
#CALCULATIONS
r= (E-E1)/(T-T1)
r1= (E2-E)/(T2-T)
R= (r+r1)/2
S= n*F*R
H= n*F*((273.16+T)*R-E3)
#RESULTS
print '%s %.1f %s' % (' Entropy =',S,'joules deg^-1')
print '%s %.1f %s' % (' \n Enthalpy =',H,'joules')
print 'The answer is a bit different due to rounding off error in textbook'
#calculate the Gibbs free energy
#initialisation of variables
import math
v= 0.11834 #volt
F= 96493.1 #coloumb
n= 1 #electron
R= 8.3144 #J/mol K
T= 25 #C
m= 0.1
m1= 0.9862
#CALCULATIONS
G= -n*F*v
G1= 2*R*(273.16+T)*math.log(m/m1)
#RESULTS
print '%s %.1f %s' % (' Gibbs free energy =',G,'joules')
print '%s %d %s' % (' \n Gibbs free energy =',G1,'joules')
#calculate the potential difference
#initialisation of variables
import math
n= 2 #electrons
R= 8.314 #bJ/mol K
F= 96493 #coloumb
T= 25 #C
N2= 3.17*10**-6
N1= 6.13*10**-3
#CALCULATIONS
E= -(R*(273.16+T)*2.3026/(n*F))*math.log10(N2/N1)
#RESULTS
print '%s %.5f %s' % (' potential difference =',E,' volt')
#calculate the Equilibrium constant
#initialisation of variables
import math
E= 0.84 #volts
n= 1 #electron
F= 96500 #coloumb
R= 8.314 #J/mol K
T= 25 #C
#CALCULATIONS
K= math.e**(E*n*F/(R*(273+T)))
#RESULTS
print '%s %.1e' % (' Equilibrium constant =',K)
#calculate the Equilibrium constant
#initialisation of variables
import math
E= -0.0029 #volts
V= 0.1 #volts
V1= 0.05 #volts
f= 0.05916 #J/mol coloumb
T= 25. #C
F= 96500 #coloumb
R= 8.314 #J/mol K
#CALCULATIONS
e= E+f*math.log10(V*V1/V1)
K= math.e**(e*F/(R*(273+T)))
#RESULTS
print '%s %.1e' % (' Equilibrium constant =',K)
#calculate the Standard electrode potential
#initialisation of variables
import math
E= 1.0508 #volts
V= 0.3338 #volts
a= 0.0796
a1= math.sqrt(0.0490)
f= 0.05916 #J/mol coloumb
#CALCULATIONS
V= E+V+f*math.log10(a/a1)
#RESULTS
print '%s %.4f %s' % (' Standard electrode potential =',V,'volts')
#calculate the Standard molar free energy
#initialisation of variables
V= 1.3595 #volts
n= 1 #electron
F= 96493 #coloumb
#CALCULATIONS
G= -n*F*V/4.28
#RESULTS
print '%s %.1f %s' % (' Standard molar free energy =',G,'cal')
print 'The answer is a bit different due to rounding off error in textbook'
#calculate the ion product
#Initialization of variables
import math
I=0.0050
E0=.22619
con=.0602
E2=1.05080
R=8.3144
T=298.16 #K
#calculations
E1=E0-con*math.sqrt(I)
E3=-E2+E1
Kw=10**(E3*96493/2.3026/R/T)
#results
print '%s %.3e' %("Ion product = ",Kw)
print 'The answer is a bit different due to rounding off error in textbook'
#calculate the Solubility constant
#initialisation of variables
V= -0.658 #volt
V1= -0.3363 #volt
n= 1 #electron
F= 96438 #coloumb
R= 8.314 #j/mol K
T= 25 #C
#CLACULATIONS
V2= V-V1
Ksp= 10**(V2*n*F/(2.303*R*(273.2+T)))
#RESULTS
print '%s %.1e %s' % (' Solubility constant =',Ksp,' volt')
#calculate the cell potential
#initialisation of variables
import math
e= 0
e1= -0.37
k= -0.05916 #j/mol
a= 0.02
a1= 0.01
a3=.2
p= 730. #mm of Hg
#CALCULATIONS
E= (e-e1)+k*math.log10(a*math.sqrt(p/760.) /a1/a3)
#RESULTS
print '%s %.2f %s' % (' cell potential =',E,'volt')
#calculate the cell potential
#initialisation of variables
V= -0.440 #volt
V1= 0.771 #volt
F= 96500 #coloumb
n=2 #electrons
n1= 1 #electrons
n2= 3 #electrons
#CALCULATIONS
G= -n*F*V
G1= -n1*F*V1
G2= G+G1
V= G2/(n2*F)
#RESULTS
print '%s %.4f %s' % (' cell potential =',-V,'volt')
#calculate the cell potential
#initialisation of variables
import math
p1=386.6 #atm
p2=1 #atm
f= 2
k= -0.05916 #j/mol
#CALCULATIONS
E= (k/f)*math.log10(p1/p2)
#RESULTS
print '%s %.4f %s' % (' cell potential =',E,'volt')
#calculate the cell potential
#initialisation of variables
import math
c= 10**-7
c1= 1
f= 1
k= -0.05915 #j/mol
#CALCULATIONS
E= (k/f)*math.log10(c/c1)
#RESULTS
print '%s %.5f %s' % (' cell potential =',E,' volt')
#calculate the junction potential
#initialisation of variables
import math
c= 391.
c1= 129.
f= 1.
k= -0.05915 #j/mol
#CALCULATIONS
E= (k/f)*math.log10(c1/c)
#RESULS
print '%s %.4f %s' % (' junction potential =',E,'volt')