Use of computers in analytical chemistry courses

1 use of Computers in Analytical. University of Georgia. Athens, 30601. 1 Chemistry Courses. The introduction of the digital computer to t,he students...
0 downloads 0 Views 6MB Size
Harvey B. Herman ond Donald E. Leyden

University of Georgia Athens, 30601

11

use of Computers in Analytical Chemistry Courses

T h e introduction of the digital computer to t,he students of analyt,ical chemistry can be made a t a very early stage in their curriculum provided that the material is limited in scope. In many universities the lower level courses may have such large enrollmerlts to make extensive use of the computer difficult. However, incentive to the better students can be provided by superficial contact wit,h a particular subject along with t,he opportunity to ask questions and extend his knowledge. For example, using this concept, the students can obtain their first contact with the computer by turning in the resulk from the first q~antitat~ivc analysis laboratory on punched cards. A scheme for the gradual expansion of st,udent use of the computer beyond this trivial introduction is shown in the table. A Scheme for lntegroting Computer Use in the Analytical Curriculum

Conrse

Use written Prunch procards gl.ams

blodify Comten W1,ite auter pro- pro- hpergrams grams ntion writ-

cards are received containing the student's name, the results, and a code number for the unknown. The accepted valucs followed by the experimental results are fed to the computer. The code permits the computer to compare the accepted and experimental results in order t o compute a relative error. Once the relative error has been obtained, a grade is assigned by means of a series of test statements. In the course discussed above, the students mere given a superficial introduction t o computing by punching their analytical results on cards and having them graded by a computer. The experiments done in that course are generally limited to simple gravimetric and volumetric analyses in which thc data may be worked up quickly by hand. I n the intermediate analytical course, however, the experiments should be more interest,ing and more challenging. An excellent example of an experiment which studcnt,~find interesting is thc determination of metal complex stability constants by pot,entiometric t h a t i o n and applying the Bjerrum formation function. The experiment we selected was the Input Accepted

lnput Name, Results, Code

As this shows, the ultimate goal is to reach the point a t which the student is writing computer programs and actually operating the computer. Currently, this goal is obtained a t the graduate level. However, we plan to continually accelerate the undergraduates toward the same achievemcnts.

Relative Error IRE)

Some Specific Examples

I n order to illustrate how the use of computers may be integrated into a modcrn curriculum of analytical chemistry, some specific examples of applications we have made will be discussed; the first example is in the grading of results obtained in thc elementary analytical laboratory. This course is taken by sophomores having limited mathematical background. The introduction to computers a t this stage must be kept a t a level such that the student can become gradually accustomed to their use. I n our program the students simply learn to opcrate a keypunch and report their laboratory results on IB3I cards. Figure 1 shows a flow diagram for the Fortran program used for the grading. The students' Grode, Code

Based on a paper presented before the Division of Chemical Educatirm a t the I53rd Nallonal meeting of the American Chemical Society, Miami Bench, April 1967.

524

/

Journal o f Chemical Education

Figure 1.

Flow sheet for grading analytical unknown reports.

coppcr(I1) ethylcncdiamine system. The experimental was essentially t,hat of Carlson, hlcReynolds, and Vcrhock ( 1 ) . Thc entire experiment can easily be done in one 3-hr laborat,ory period. However, the students rcport,ed the calculations required 8 to 10 hr to complete. Obviously only a limited number of experiments requiring this time investment can reasonably he required of the students. Using a prcviously writt'en program (g) the students turn in their data on IBR4 cards and the results are obtained in less than 5 min of computer time using an IBM 1620. It is important to mention that the students are required to calculate one or two points on the Bjerrum formation curve by hand in order to be sure they understand the calculations. This is the procedure followed in the other courses as well. The result of the hand calculation is comparcd with the computer result for the same data point and only if they agree is the student permitted to receive the computer results to complete the experiment. Figure 2 shows a flow diagram of the program we used t o calculate the Bjerrum formation curve from the potentiometric data. The necessary data is fed to the computer. The program then calculates a, a*, p(lig), and li. The stability constant is calculated using the Albert modification. The output lists E , p(lig) and pK,,. Although the theory of the complex formation equilibria is taught, and the students make practical use of the programs available to them, no significant discussion of programming has been introduced. When the students begin the course in instrumental analysis, they can punch cxperimental data on cards in a format suitable for previously written programs and have had limited experience in usingprograms. I n this course, for example, instead of manually plotting log [(io - i)/i)] versus E in a polarographic experiment, the current potential data is submitted to the instructor on I B M cards. Output is returned which lists the input data and the calculated number of electrons passed. A linear regression model is used for the calculation. The program used for this experiment has been modified to calculate the number of ligands present in a complex using polarographic half-wave potential measurcmcnts. Thc necessary modifications are simple enough that the student could suggest the changcs ncedcd t o use the program with other experiments in which linear regression models may bc applied. H e needs to have little programming experience t o do this and is encouraged t,o apply this program to other experiments. Typical st,udcnt experiment,^ are somctimes coniplicatcd by failure of basic assumptions. For example, a common expcrimcnt in irrst,rumeutal an;~lysisis to measure the formation constant of a principle species in a complex system using polarography ( 3 ) . These systems may be complicat,ed by significant formation of more than oue complex. A common proccdure is to use graphical mcthods to obtain all the stability constauts for thfs system. A general least squares program (4) for the solut,ion of linear simultaneous equations can be used which will permit the calculat~ionof all the stability constants, in thc above system from the experimental half-wave potent,ial measurements. This program has been prepared and mas introduced into our instrumental analysis course. This adaptation has

eliminated the need for questionable assumptions and inaccurate and tedious graphical mcthods. However, the requirements on the accuracy of half-wave potential measurements may be h g o n d the instrumentation available for undergraduate instruction. An experiment which illustrates the use of current reversal chronopotentiometry for the measurement of the rates of chemical reactions was introduced into instrumental analysis. The system which was selected is the rate of hydrolysis of p-benzoquinoneimine. The

Input: Titration data

non-complexed ligand present as free-base (a)

Calculate: Mean number of hydrogen ions bound to non-complexed ligand (iiA)

t Calculate

Free ligand

concentration p(lig) and mean number of ligands bound to metal ion (71)

Constant using Albert method (Kst)

/

1

1

(Large spreading factor is assumed)

Output:

I

1

I

Figure 2. Flow sheet for calculation of Bjerrvm formation curves (obtained from Rornmy and Andrewr ( 2 ) ) .

Volume 45, Number 8 , August 7968

/

525

Several recent papers in THIS JOURNAL are assigned reading ( 6 , 7 , 8 ) . Numerical methods such as NewtonRaphsen and successive approximations are used to solve simple equilibrium problems. More difficult prohlens are solved using the Bard-Icing approach (8). A typical assignment is to calculate the solubility of calcium phosphate using the lattcr technique. At the start of this graduate course, the IBM 1620 computer is demonstrated to the studenk They are then tested on the operation of the computer, and upon passing the test are permitted to operate the computer. A program is then assigned which the students are required to have working by the end of the term. The Newton-Raphsen method for three simultaneous equations has been used as such an assignment. A flow sheet of t,he method is shown in Figure 4. The three functions are combinations of mass balance, charge balance and equilibrium constant equations. A working program for two equations was given to the students to act as a guide in their work. In special t,opics courses in electroanalytical chemistry, we make extensive use of the computer. For, example, in a recent special topics course the students wrote programs to calculate numerical functions. When feasible these assignments were related to the

Figure 3. Flow rheet for calculation of working curve to determine chemical rote con,tantr.

students complained that the working curve in the literature (6) was too small to provide accurate data. A larger working curve was prepared using a general program for the solution of non-linear equations written by one of us in conjunct,ion with other work. The general procedure followed in the program is illustrated in Figure 3. In this case the function depends on the product of the rate constant (lc)and the forward electrolysis time (t,) and the ratio of reverse to forward times r,/tl. A value is chosen for kt, and the equation erfllk(2,

+ r,)l'/~l- 2 erf [(kr,)'h]

=

0

is solved for r,/t,. Once a suitable number of values for kt, and r,/t, are obtained, a working curve is plotted. The experimental measurements gives r,/t, and the value kt, can be ohtained from the curve. Other illustrations of working curve techniques have been used in this c x m e , but the general procedure is the same. In coxrses on the graduate level it becomes feasible to teach computer programming and its applications to chemistry. Two hours of lecture time are devoted to this subject. After this time the students, although not experts in the field, can do a reasonable wide range of practical problems. Our first graduate course in analytical chemistry concentrates On the theory of ionic and the computer work integrates nicely with this material. 526

/

Journal of Chemical Education

Figure 4. Flow rheet for solution of three non-lineor simultaneous equations the ~ ~ ~ t method. ~ ~ . ~ ~ ~ h . ~ ~

L L

Subprogram

i

o

1

series =

--

To write all t,he computer programs which could be used in an analytical chemistry curriculum would require a considerable effort. However, many of the programs are available through libraries such as SHARE, operated by International Business hlachines, and COSMIC, a service administered by the University of Georgia in cooperation with the National Aeronautics and Space Administration. Also, many programs are published in the journals and in texts. Frequently these programs can be used directly or require only minor modifications. Although the program outlined in this paper was initiated recently in our department, we think that the results have been encouraging. The program could likely be successful under more restrictive conditions than we have; however, the results as indicated by student interest and achievement appear to be better when student operation of t,he computer is permitted. Those departments having remote consoles for time-sharing computers, such as the IBM 360, could expand upon our program. It is important to state that the computer is only one of many tools which may he used by the analytical chemist,.

Nfli Term

j-%

L-1

Series + N'h Term

Acknowledgment

The authors thank J. 1,. Carmon, Director of the University of Georgia Computer Center, for his help and encouragement. Literature Cited

I

Return to Main Program

Figure 5.

Flow %heelfor evaluation of function$

I or infinite

series

student,^ rcse:~rch problem. Subprograms to calculate Besscll functions, error funct,ions, confluent hypergeomet,ric functions (Q), and others were written. A flow chart of the geucral method used to generate an infinite series rcpresendation of a funct,ion is shown in Figure 5 .

(1) C