Chapter 14 - Development and use of activity concepts

Example 1 - pg 350

In [1]:
#calculate the moles of Iodine present
#Initialization of variables
x1=0.0200
Kx=812.
#calculations
print "Neglecting 2x in comparision with x1,"
x=x1/Kx
#results
print '%s %.2e %s' %("Moles of Iodine present =",x," mole")
Neglecting 2x in comparision with x1,
Moles of Iodine present = 2.46e-05  mole

Example 2 - pg 350

In [3]:
#calculate the Concentration of H+ ions
#Initialization of variables
Kc=1.749*10**-5 #M
n1=0.1 #mole
n2=0.01 #mole
#calculations
c=n1/n2 *Kc
#results
print '%s %.1e %s' %("Concentration of Hplus ions =",c," M")
Concentration of Hplus ions = 1.7e-04  M

Example 3 - pg 351

In [1]:
#calculate the Concentraton of Hplus ions
#Initialization of variables
import math
c=0.01 #M
kc=1.749*10**-5 #M
#calculations
x2=c*kc
x=math.sqrt(x2)
#results
print '%s %.1e %s' %("Concentration of Hplus ions =",x,"M")
Concentration of Hplus ions = 4.2e-04 M

Example 4 - pg 351

In [5]:
#calculate the Concentration of OH- ions
#Initialization of variables
import math
K2=1.0008*10**-14 #m^2
K1=1.754*10**-5 #m
c=0.1
#calculations
print "Neglecting x w.r.t c,"
x2=c*K2/K1
x=math.sqrt(x2)
#results
print '%s %.1e %s' %("Concentration of OH minus ions =",x," m")
Neglecting x w.r.t c,
Concentration of OH minus ions = 7.6e-06  m

Example 5 - pg 352

In [6]:
#calculate the Concentration of H plus ions
#Initialization of variables
import math
print "from table 14.1,"
r1=7.47*10**-5 #m
r2=4.57*10**-3 #m
mp=1.008*10**-14 #m**2
#calculations
r3=r2/r1
mH2=r3*mp
mH=math.sqrt(mH2)
#results
print '%s %.2e %s' %("Concentration of Hplus ions = ",mH," M")
from table 14.1,
Concentration of Hplus ions =  7.85e-07  M

Example 6 - pg 354

In [2]:
#calculate the Concentraton of H+ ions
#Initialization of variables
print "from table 14.1,"
import math
r1=1.75*10**-5 #m
r2=1.772*10**-4 #m
mp=1.008*10**-14 #m**2
#calculations
r3=r2/r1
mH2=r3*mp
mH=math.sqrt(mH2)
#results
print '%s %.1e %s' %("Concentration of Hplus ions =",mH," M")
from table 14.1,
Concentration of Hplus ions = 3.2e-07  M

Example 7 - pg 355

In [8]:
#calculate the Concentration of H+ ions
#Initialization of variables
import math
c=1*10**-6 #m
K=1.754*10**-5 #m
Kp=1.008*10**-14 #m**2
#calculations
mH=c
#Iteration 1
mOH=Kp/mH
mA=mH-mOH
mHA=mH*mA/K
mH2=mH-mHA+mOH
#Iteration 2
mOH2=Kp/mH2
mA2=mH2-mOH2
mHA2=mH2*mA2/K
mH3=mH2-mHA2+mOH2
#From x2
x2=math.sqrt(Kp)
x1=c
mOH3=Kp/x2
y2=x1
#From x1
mOH4=Kp/c
mA4=mH-mOH4
mHA4=mH*mA4/K
y1=c-mHA4-mA4
#upon further iterations, we get
mHplus=mH3
#results
print '%s %.2e %s' %("Concentration of H plus ions =",mHplus,"m")
print 'The answer is a bit different due to rounding off error.'
Concentration of H plus ions = 9.13e-07 m
The answer is a bit different due to rounding off error.

Example 8 - pg 358

In [9]:
#calculate the values of dS0, dH0, Krm
#Initialization of variableH
print "From table 14-3,"
HH=0
HHcoo=-98.
HHcooh=-98.
SH=0
SHcoo=21.9
SHcooh=39.1
KH=0
KHcoo=58.64
KHcooh=62.38
#calculationH
dH=HH+HHcoo-HHcooh
dS=SH+SHcoo-SHcooh
dK=KH+KHcoo-KHcooh
K=10**dK
#results
print '%s %.1f %s' %(" dS0 =",dS,"eu")
print '%s %.1f %s' %("\n dH0 =",dH,"kcal")
print '%s %.2f' %("\n log Krm =",dK)
print '%s %.1e %s' %("\n Krm =",K,"m")
From table 14-3,
 dS0 = -17.2 eu

 dH0 = 0.0 kcal

 log Krm = -3.74

 Krm = 1.8e-04 m

Example 9 - pg 369

In [10]:
#calculate the Activity of cl and ca
#Initialization of variables
mca=0.01 #m
mcl=0.02 #m
#calculations
Mu=0.5*(mca*4 + mcl*1)
print "From table 14-5,"
aca=6 #A
acl=3 #A
print "From table 14-6,"
gaca=0.555 
gacl=0.843
Aca=gaca*mca
Acl=gacl*mcl
#results
print '%s %.4f' %("Activity of cl = ",Acl)
print '%s %.4f' %("\n Activity of ca = ",Aca)
From table 14-5,
From table 14-6,
Activity of cl =  0.0169

 Activity of ca =  0.0056

Example 10 - pg 369

In [11]:
#calculate the Concentration of H+ ions
#Initialization of variables
import math
m1=0.1 #m
m2=0.1 #m
K=1.754*10**-5 #m
#calculations
mu=0.5*(m1*1**2 + m2*1**2)
print("From table 14.5,")
aH=9 #A
aA=4.5 #A
print("From table 14.6")
gH=0.825
gA=0.775
gHA=1
x1=gHA*K/(gH*gA)
print("Assuming x to be small w.r.t m1,")
x=math.sqrt(x1*m1)
#results
print '%s %.2e %s' %("Concentration of H plus ions =",x," m")
From table 14.5,
From table 14.6
Assuming x to be small w.r.t m1,
Concentration of H plus ions = 1.66e-03  m

Example 11 - pg 372

In [12]:
#calculate the concentration of H+ ions
#Initialization of variables
import math
import numpy
K=1.754*10**-5 #m
c=0.1
#calculations
print("Neglecting x w.r.t c,")
x2=K
x=math.sqrt(K)
mu=x
print("From tables 14-5 and 14-6,")
gH=0.963
gA=0.960
x22=K/(gH*gA)
p=([1,x22, -c*x22])
z=numpy.roots(p)
alpha=z[1]
#results
print '%s %.2e %s' %("concentration of H plus ions =",alpha," m")
Neglecting x w.r.t c,
From tables 14-5 and 14-6,
concentration of H plus ions = 1.37e-03  m

Example 12 - pg 373

In [13]:
#calculate the Solubility of Agcl
#Initialization of variables
print("From table 14.3")
import math
K1=-13.5089
K2=-22.9792
K3=19.2218
c=0.1 #m
#calculations
logK=K1-K2-K3
K=10**logK
mu=0.5*(c*1**2 + c*1**2)
print("From tables 14-5 and 14-6,")
gAg=0.745
gCl=0.755
x2=K/(gAg*gCl)
x=math.sqrt(x2)
#results
print '%s %.2e %s' %("Solubility of Agcl =",x,"m")
From table 14.3
From tables 14-5 and 14-6,
Solubility of Agcl = 1.78e-05 m

Example 13 - pg 376

In [14]:
#calculate the Concentration of Na and Cl in both cases
#Initialization of variables
import numpy
Cna=0.11
Ccl=0.1
#calculations
p=([99, - 2.1, Cna*Ccl])
z=numpy.roots(p)
alpha=z[1]
Na1=Cna-10*alpha
Cl1=Ccl-10*alpha
#results
print '%s %.4f %s' %(" Concentration of Na in 1  =",Na1,"M")
print '%s %.4f %s' %("\n Concentration of Cl in 1  =",Cl1," M")
print '%s %.4f %s' %("\n Concentration of Na in 2  =",alpha,"M")
print '%s %.4f %s' %("\n Concentration of Cl in 2  =",alpha,"M")
 Concentration of Na in 1  = 0.0157 M

 Concentration of Cl in 1  = 0.0057  M

 Concentration of Na in 2  = 0.0094 M

 Concentration of Cl in 2  = 0.0094 M