A computer program for use in teaching chemical equilibrium - Journal

A computer program for use in teaching chemical equilibrium. O. T. Zajicek. J. Chem. Educ. , 1965, 42 (11), p 622. DOI: 10.1021/ed042p622. Publication...
0 downloads 0 Views 2MB Size
0. T. Xajicek University

of

Massachusetts Amherst

A Computer Program for Use in Teaching Chemical Equilibrium

Now that high speed digital computers have become more widely available, their application to classroom instruction has increased. Systems which were once discussed in a qualitative, or at best approximate, way can now be treated exactly, and the results made available to the students. A computer program for this purpose was recently described by Bard and King.' Programs which have been used at this institution for three years may also be of interest since they complement that of Bard and King. Bard and King calculate the concentrations of all species present in a solution, given the analytical concentration of the substance present, and the appropriate equilibrium constants. Our program uses the same known data and increases one of the variables (e.g., hydrogen ion concentration for a weak acid system) to obtain concentrations for all other variables. A typical problem might be stated: "What are the concentrations of all species in a polyprotic acid solution as a function of the hydrogen ion concentration?" A problem of this sort would, generally, be run over the range pH 0-14. If phosphoric acid were chosen, the concentrations of OH-, HaPOs H J Q - , HP04-2, and POI-3 would be obtained from pH &14; the pH increments may he chosen as large or as small as desired. The program used is a modification of the program K U ~ K Agiven by Sillen.z While originally designed for metal complex systems, it is equally applicable to acid systems. I n addition, a second program SPECIE, used subsequent to KUSKA, converts all concentrations into fractions relative to the total material present. This enables one to plot distribution diagrams, ~ ~ h i chave h been emphasized recently."

The Equilibria

Because of the general nature of the program, all equilibria are expressed as formations. As an example1 consider ethylenediaminetetraacetic acid (which shal, be designated as H4L, and all charges omitted, for simplicity). Dissociation constants given in the litera-. tures are as follows:

These are reversed to give the stepwise stability constants, as

++

L H = HL [HLI = K,[HI[L] log K, = HL H = HsL [HaL] = KdH][HL] log K S = HzL H = HaL [HaLl = K~[HI[HXLIlog KS = HsL H = H,L [H,Ll = K,[HI[HaL] log K4 = which are combined to give the overall constrtnts,

++

+ + +

L 2H = H2L log B2 [HzL] = &[HIz[L] L 3H = HaL [HaL] = ,%[HI8[L] log 8 5 L 4H = H,L log @I [H,L] = j3,[HI4[L] where81 = K t , & = K& O3 = KIKJG, and 04 =

(1)

10.26 6.16 2.67 1.99

(2) (3)

= 16.42 = 19.09 = 21.08

(5) (6) (7)

(4)

KtK%KaK4.

When using a polyprotic acid with this program, one. considers the totally deprotonated acid, in this case L, as the central "metal," and the proton as the "ligand.". The protonated species, H L , H 2 L , etc., represent different degrees of complexation. I n the discussion that follows, the terms "metal" and '%gaud" will be used in this context. The application to metal complex systems is made directly. The Program

A block diagram of the search portion of program is shown in Figure 1. The name K U ~ K Ais one given by Sillen2and has been retained to indicate its origin; it is, however, somewhat different from Sillen's original program. A listing of the program, written in KUSKA-MAIN

'BARD.A. J..

AND

(1965).

IINGRI, N.,

AND

KING. D. M.. J. CHEM.EDUC.. . 42.. 127

SILLEN,L. G., Acta C h m . Seand., 16, 173

(1962).

BUTLER,J . N., "Ionic Equilibrium," Addison-Wesley Publishing Co., Inc., Reading. Massachusetts, 1963. ' FRE~SER, H., AND FERNANDO, Q., ''Ionic Equilibria in Analytical Chemistry," John Wiley & Sons, he., New York, 1963.

622

/

Journal o f Chemical Education

BJERRUM, J., SCHTIRZENBACH, G., AND SILLEN,L. G., "Stability Constants," Special Publication No. 6, The Chemical Society, London, 1957.

First entFY to looo

is also given. The symbols used for the input values are:

FORTRAN 11, R~currententry t o loop

MAXRN NRUN N RMAX QMAX

maximum number of systems to be considered number of system under consideration = number of complex species in system = number of incremental steps desired = number of total metal concentrations within a given NRUN E = error limit, use 0.0001 for 0.01% TERM1 = logarithm of starting hydrogen ion eoncentration, i.e., for pH 14, use -14.00 FINCR = size of incremental steps, in pH units BLOG(1) = logarithm of formation constants, I = 1,2, ., N B = total metal concentration; any number, to QMAX, allowed = =

..

Figure 1. MAIN.

Block diagram of the search portion of program KUSKA-

Important symbols used in the body of the program am, V(I)

concentration of deprotonated acid, L; in general, this is the unbound metal concentration U(I) = unbound ligand concentration ( = [HI here) =

The program (Fig. 2) operates on the concentration of

L at a given, and fixed, hydrogen ion concentration. A trial value of L is used in eqns. (1) and (5)-(7) to obtain values for HL, HIL, etc. These are summed, giving a trial value of the total metal concentration, BZISRO = L + HL + &L + HaL + H4L BZERO is compared to B, and the difference between them compared to the error limit, E. If the difference exceeds E, I, is increased or decreased. The process is repeated until JBZERO- BI is equal to or less than E, a t which time the values are punched out. For the first entry, the iterative process is started at L = B, the total metal rot~w~rrwtiot~; in sut~irqurnt: t q ~ s ,the 1ri.d w l ~ wof I. i.:tnken a5 t h e \ ~ I I obtained P in thc p r e vious step. After all increments are completed, W and Z, the logarithm of the unbound ligand concentration and the average bound ligand number, respectively, are punched out. These enable one to make (a, log a) plots, if desired. They also serve as a check on the constants, especially for research systems, in that the calculated (li, log a) curve may be compared with the experimentally determined one. One feature of the program is that all calculations which are peculiar to a given system are done in a snbroutine; thus, the main program fits all systems, and one only need write a new subroutine for each new system. Since the subroutines are much shorter, a saving in compilation time is effected. A listing of SUBROUTINE FKUSKA, for the HdL case,

S V R R O V T I N F F