This document summarizes a titration of 100 mL of 2M HCl with 1M NaOH. It calculates the volume of NaOH needed at the equivalence point as 50 mL. It then sets up the x-axis values from 0 to 100 mL NaOH added in increments of 2 mL. The y-axis values are calculated as the pH at each point using the titration equations before and after the equivalence point.
2. Equivalence point
7
"""
Strong Acid-Strong Base Titrations
Considering the titration of 100 mL of 2M HCl with 1M NaOH
"""
import pylab
"""
Firts to calculate the volumn of titrant needed at quivalence point
"""
a1 , b1 = 2 , 0.1 # a1 :orignal concentration of HCl b1:original volumn of HCl solution
a2 = 1 # a2:orignal concentration of NaOH
c = a1*b1 # c: the mole of HCl
eps = 1.e-10 # eps:a tiny number to avoid zero numerator while calculating the pH
b2 = a1*b1/a2 # b2: volumn of NaOH solution needed to reach equivalence point
3. The x-axis values
8
"""
The x-axis values
the amount of titrant(NaOH) added
"""
#n:the times of titrant(NaOH) has been added
n = 50
#db:the amount of titrant added each time just before equivalence point
db = b2/n
#bs1:x-axis values(the of titrant ) before equivalence point
bs1 = pylab.linspace(db,b2,n)
#bs2:x-axis values(the volumn of titrant ) after equivalence point
bs2 = pylab.linspace(b2,2*b2,n)
4. The y-axis values
9
"""
The y-axis values
pH=-log[H+]
pH+pOH=14
"""
#bs1:y-axis values(the pH ) before equivalence point
as1 = -pylab.log10( (c - a2*bs1 + eps )/(b1 + bs2) )
#bs1:y-axis values(the pH ) after equivalence point
as2 = 14 + pylab.log10( ( a2*bs2 - c + eps )/(b1+bs2))