Ames Laboratory Technical Reports Ames Laboratory 2-1964 Calculation of acid dissociation constants Wayne Woodson Dunning Iowa State University Don S. Martin Iowa State University Follow this and additional works at: http://lib.dr.iastate.edu/ameslab_isreports Part of the Chemistry Commons Recommended Citation Dunning, Wayne Woodson and Martin, Don S., "Calculation of acid dissociation constants" (1964). Ames Laboratory Technical Reports. 55. http://lib.dr.iastate.edu/ameslab_isreports/55 This Report is brought to you for free and open access by the Ames Laboratory at Iowa State University Digital Repository. It has been accepted for inclusion in Ames Laboratory Technical Reports by an authorized administrator of Iowa State University Digital Repository. For more information, please contact [email protected]. IS-822 IOWA STATE UNIVERSITY CALCULATION OF ACID DISSOCIATION CONSTANTS by Wayne Woodson Dunning and DonS. Martin RESEARCH AND DEVELOPMENT REPORT U.S.A.E.C. IS-822 Chemistry (UC -4) TID 4500 April 1, 1964 UNITED STATES ATOMIC ENERGY COMMISSION Research and Development Report CALCULATION OF ACID DISSOCIATION CONSTANTS by Wayne Woodson Dunning and DonS. Martin February, 1964 Ames Laboratory at Iowa State University of Science and Technology F. H. Spedding, Director Contract W -7405 eng-82 ii LS-822 This report is distributed according to the category Chemistry (UC -4) as listed in TID-4500, April 1, 1964. Legal Notice This report was prepared as an account of Government sponsored work. Neither the United States, nor the Commission, nor any person acting on behalf of the Commission: A. Makes any warranty or representation, expressed or implied, with respect to the accuracy, completeness, or usefulness of the information contained in this report, or that the use of any information, apparatus, method, or process disclosed in this report may not infringe privately owned rights; or B. Assumes any liabilities with respect to the use of, or for damages resulting from the use of any information, apparatus, method, or process disclosed in this report. As used in the above, "person acting on behalf of the Commission" includes any employee or contractor of the Commission, or employee of such contractor, to the extent that such employee or contractor of the Commission, or employee of such contractor prepares, disseminates, or provides access to, any information pursuant to his employment or contract with the Commission, or his employment with such contractor. Printed in USA. Price $ 1. 7 5 Available from the Office of Technical Services U. S. Department of Commerce Washington 25, D. C. iii IS -822 TABLE OF CONTENTS Page I. II. III. IV. ABSTRACT • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • v INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . 1 A. Experimental Background ••••••••••••••••••••••••••••• 1 B. Computational Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 EXPERIMENTAL 11 A. Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 B. Equipment ..• 11 MATHEMATICAL THEORY 12 A. Titration of a Single Acid 12 B. Mixture of Two Acids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 C. Modified Titrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 D. Calculation of Titration Curves 19 E. Calculation of Acid Concentrations 20 F. Determination of Errors 20 CALCULATIONS A. B. v. 22 Calculation of the Dissociation Constants for a Single Acid . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Calculation of the Dissociation Constants for a Two Acid Mixture •••••••• 25 .......... . c. Calculation of Intermediate Quantities •••••• D. Options and Considerations • • • • • • • • • • • • • • • • • • • • • • • • • • • 28 RESULTS A. . ............................................ . 27 30 Resolution of Successive Constants • • • • • • • • • • • • • • • • • • • • 30 iv Page VI. . ............................ . 38 B. Resolution of Mixtures c. Consistency .••••.•••• D. Improper Calculations E. Experimental Titrations ••••••••••••••••••••••••••••• 41 DISCUSSION ••••• 39 . ............................ . 40 ..................................... . 43 VII. SUMMARY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • . . . . . . . . . . . . . . . 47 VIII. LITERATURE CITED. • . • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 48 IX. APPENDIX A .•• X. APPENDIX B ••• . ..................................... . 50 53 v IS-822 CALCULATION OF ACID DISSOCIATION CONSTANTS):< Wayne Woodson Dunning and DonS. Martin ABSTRACT A computational method has been developed for the determination of dissociation constants of acids (and bases). The method is applicable to mono or polybasic acids and, in certain cases, to mixtures of acids. A least-squares treatment is employed, and no simplifying assumptions are made in any of the equations or factors involved. All the available data are utilized, and provision is made for including or calculating activity coefficients. Utilization of the method requires a medium to large size digital computer. The resolution of successive dissociation constants of small ratio has been shown to present no difficulties attributable to such ratios; ratios as small as three were resolved as readily as those much larger. The accuracy attainable depends entirely upon the accuracy of the titration data. Tests have shown that titrations accurate to better than one part in five thousand may still produce two percent errors in the resulting constants. Consistent or random titration errors are likely to cause considerable variations in the dissociation constants. Experimental work must be performed with the greatest care if constants of even two significant figures are desired. Ordinary pH titrations may give uncertainties in even the first figure. Mixtures of acids proved to be no more difficult to resolve than single acids, within certain severe limits. If there is a considerable separation in constants, and the data are extremely accurate, useful results may be obtained. In most cases, overlap of constants and/ or experimental errors will prevent successful resolution. Many previous methods of calculating dissociation constants have treated polybasic acids as mixtures of monabasic acids. It has been shown that if the ratio of successive constants is one hundred or more, no appreciable error results. With the present method, however, such assumptions are completely unnecessary. Examination of the literature, together with experimental results obtained in this work, indicates that many "accepted" values are either very inaccurate, or at least given to more significant figures than justified. ~:~ This report is based on a Ph. D. thesis submitted by Wayne Woodson Dunning, Febraury, 1964, to Iowa State University, Ames, Iowa. 1 I. INTRODUCTION The determination of the dissociation constants of acids 1 -- though sometimes considered to be a very straightforward procedure -- entails in practice numerous experimental and theoretical difficulties. The variety of experimental methods that have been used, the corrections applied to the data, the numerous manners in which data for identical procedures have been treated, and the considerable disagreement in values of the dissociation constants obtained are all indicative of the difficulties. The research reported in this work was undertaken primarily for the purpose of developing computational methods that would furnish the best possible values of dissociation constants from the data of any of several different experimental procedures. A. ,. Experimental Background Among the many experimental procedures used in the past, one of the most common was the measurement of the conductance of an aqueous solution of the acid. This method was used primarily on monobasic acids, since polybasic acids presented As late as 1959, Dippy £! great mathematical difficulties. !!• (1) expressed the opinion that there was still no wholly satisfactory method of calculating second and higher thermo.... ,' 1Although this work deals specifically with acids, the treatment of bases is quite analogous, and the necessary modifications to the theoretical equations and the computer program are included. th~ :' ·.... · 2 dynamic dissociation constants of polybasic acids from conductivity data. Conductance methods are now considered ob- solete by some authorities (2). Another common procedure, and one which still sees extensive use, is that of optical measurement. either colorimetric or spectrophotometric. This may be The colorimetric method enables one to obta.in a pH titration curve while avoiding some of the problems arising in standard electrometric determinations. However, standards of known dissociation con- stant are necessary for calibration of the indicators, and can give rise to other difficulties. thi~ Spectrophotometric meth- ods are quite useful in many cases, though extensive computations, similar in principle to those employed in this work, are often required. 1'- . Among the other methods or measurements that have been employed at one time or another for the determination of dissociation constants are: a) the change in freezing point; b) hydrolysis of salts (3); c) catalytic effect· on the r.ates of sugar inversion (4); d) solubility of slightly soluble acids in solutions of salts of other acids (5); and e) kinetic methods. Perhaps the most common procedure, in both past and present use, for determining dissoci~t~on . ,. constant'·· is that of . , . It has iong been recognized that ' electrometric measurement. the measurement of the change in pH during the neutralization 3 of a weak acid with a strong base can be employed to obtain an accurate value for the concentration of the acid and its dissociation constant(s). In an electrometric titration, the pH values are measured at successive steps in the titration by means of the changing potentials of suitable electrodes immersed in the solution. According to usual practice, suc- cessive portions of a solution of strong base are added to a sample of pure acid and the pH values of the several mixtures are determined. 1 The titration is performed in a vessel that contains a hydrogen, glass, or quinhydrone electrode, and the cell system is completed by a reference half-cell (calomel, AgCl, etc.) whose electrolyte is brought into liquid-liquid contact with the acid solution in the titration vessel. The pH values derived from the e.m.f. measurements of . ~ such a cell often involve considerable uncerta1nty, and in unfavorable cases they may be in error by more than 0.05 pH units (6). A principle reason for this difficulty is the ne- glect of the contribution of the potential of the liquid junction or in the application of improper or inadequate cortections. Such corrections are laborious and unsatisfactory, and require a knowledge, often unavailable, of the mobilities and activities of the ions of which the solutions are composed. . . !Numerous variations are pos.ibl~, and u~qer certain conditions may be more practical. The · computational methods developed in this work are designed to accommodate some of the variations. 4 It has been shown (7) that partial corrections may produce a larger error than no corrections at all. Therefore, for ac- curate work, liquid junctions are to be avoided whenever possible. For approximate work, however, cells with liquid junc- tions are often useful. A second limitation to the accuracy of these titrations has its origin in the changing concentration of ionized solutes in the vessel during the titration. A solution of a weak acid has a low ionic strength, whereas its salt is a strong electrolyte. There is no unique titration curve for a weak acid; it is well known that the curve is affected by the ionic strength of the solution. Several procedures are available for resolv- ing this difficulty. One can make 1) a series of pH measure- ments of buffered solutions at varying ionic strengths, with extrapolation to zero ionic strength; ,.. 2) a series of titrations at varying ionic strength, with extrapolation to zero, or 3) a titration with corrections for ionic strength at each point by means of the Debye-Huckel equation = A zi 2 .fP 1 1 + B ai -ijJ where fi is the activity coefficient, Zi is the valence of the ion i, ai is the average effective diameter of the ion in Angstroms, <?» is an empirical coefficient dependent upon the system under study, and A and B are coefficients whose values vary with tbe temperature and dielectric constant of the 5 solvent. The ionic strength, p , is defined by Lewis and Randall (8) as 2 )l =l.~m a Lo i z i where m.1 is the moial concentration of ion i. 1 2 The lack of a completely standardized scale of pH may lead to further problems, particularly in the re-evaluation of older data. or The simple hydrogen ion concentration pcH - - log cH 3 pcH - - log mH 3a is used in much of the older literature, and great care must be taken when recalculating data from such work, if one wishes to obtain meaningful answers. The Sorensen scale is a conventional one2, defined in terms of the potential of the celi Pt;H2,Soln. X/Salt bridge/ . 0.1 N Calomel electrode, - 0.3376 4 = E 0.05916 It is a measure of neither concentration, nor activity of the psH 1The standard state of unit activity coefficient at in- finite dilution requires that activity on the scales of volume concentration (c) and molality (m) shall be related by ac = amd 0 , where d 0 is the density of water. At 25° or less, this difference is negligible and will be ignored in this work. 2A conventional scale is one in which the values of aH, although not truly hydrogen ion activities, will nonetheless be numbers which, inserted in equations involving ·aij, will . furnish results consistent with th'Ose obtained·-.by r 1gorous thermodynamic methods. ,· ·· ·, · 6 hydrogen ion. In spite of this fact that psH bears no simple direct relationship to chemical equilibria, this scale has been widely used, and extensive tables of psH values for buffer mixtures are available (9). The recognition that the e.m.f. of galvanic cells reveals changes of activity rather than of concentration, brought about the proposal by Sorensen and Linderstrom-Lang (10) of a new pH unit paH = - log aH = - log (fHcH) 5 where aH is the activity, and fH the activity coefficient corresponding to the scale of concentration. The fact that the activity of a single ionic species is a concept lacking unique physical definition does not preclude the establishment of a reasonable scale of paH, but this scale must be a conventional one. Guggenheim (11) and Hitchcock (12) have called attention to the advantages of a unit of acidity defined as 6 Unlike paH, this quantity is physically defined at all ionic strengths, and can be determined exactly from measurements of cells without liquid junction comprising electrodes reversible to hydrogen and chloride ions. Since pwH is therefore a quite useful concept, it is , fortunate that conversion can be made· between it and paH with sufficient accuracy for most purposes, provided that the 7 ionic strength is not too high. The common "PH meter" employing a glass electrode enjoys widespread popularity, and it is worthwhile to note that the development of pH standards allows one, without the necessity of liquid junction corrections, to make determinations of what is essentially paH, but only under certain specific conditions. It is safe to say that no quantitative interpretation of measured pH values should be attempted unless the medium can be classified as a dilute aqueous solution of simple solutes. This requirement excludes all non-aqueous media, suspensions, . colloids, and aqueous solutions of ionic strengths greater than 0.2. From this point of view, the "ideal'' solutions are those which match the standards of reference, namely aqueous solutions of buffers and simple . salts with ionic strengths between 0.01 and 0.1. . ~ . . Under these very restr1cted cond1t1ons, the measured pH may be expected to approach an experimental -log fHmH, where fH is defined in a conventional manner consistent with the assignment of the pH values of the standards with which the instrument was adjusted. For all practical purposes, the value of fH in this dilute range is given by equation 1 with ai values of 4 to 6. B. Computational Methods The number of mathematical ,. t-teatments that have been ap.• , I •' ·• plied to electrometric or pH titration data may ' well be larger 8 than the number of experimental procedures devised for determining dissociation constants. A thorough analysis of them is not practicable in this work, but a brief discussion of some of the methods will be given. ,. A simple approximation -- one that has been in use for more than fifty years (13) -- is that K = [H+] half neutralization point of a monobasic acid. at the oneThis is, of course, not strictly true, and has the further disadvantage of making the value of the dissociation constant dependent upon only one pH determination. Auerbach and Smolczyk (14) proposed a set of theoretical equations involving some assumptions which were shown by Britton (15) to be erroneous. have been widely used. Nonetheless, these equations The final values of dissociation /'- constants obtained by this treatment are generally the averages of constants calculated from various combinations of the titration points. 1 A logarithmic equation was derived by Cohn ~ but does not appear to have seen any further use. !!· (16) It is ap- parently limited to monobasic acids. lThis method of "using all the data" is apparently still popular. It is generally applied in a rather random fashion, as there is no known formal procedure for its use. The process is essentially one of averi.-g..ing, and is not generally considered to have the merit of the · ~east-squates method. 9 Several workers have developed equations by means of which a polybasic acid is treated as a mixture of monobasic acids. The "titration constants" thus obtained are presum- ably convertible to the true dissociation constants by means of simple relationships. This approach has apparently not seen extensive use, despite its multiple development. Speakman (17) devised an approach that appears to have considerable merit, although it is in general limited to dibasic acids. The data, modified by the appropriate equa- tions, are recorded graphically, and an essentially linear plot is obtained. The slope of the line gives K1, and the intercept gives K1K2 • Drawing the "best" straight line is considered to give the best use of all the data. Speakman considers extrapolation to zero ionic strength to be inferior "" to making proper activity corrections at finite ionic strength. The general treatment of polybasic acid titration curves has been a matter of much study and many suggestions. So far as is known, this work presents the first completely general treatment of such situations. Previously, it was common to develop specific data treatments for varying situations, depending largely upon the ratio(s) of the several dissociation constants. Where this ratio is over 500 to 1000, the acid was generally treated a mixture of.. monobasic acids. .. ,. As the ratio decreased, various approximations were necessary, a~.· ,· graphical treatment might be required, etc. In at least one 10 study, equations were developed for five different cases, none of the treatments being exact. It is the intention of this work to present a treatment that is applicable to mono- or polybasic acids, or to mixtures of acids under certain condition~, which makes no simplifying assumptions for any case, and which utilizes all the data for any of several types of titrations. The method of least-squares is employed, and an estimate of the errors in the individual constants is obtained. ·" .... : f. ,• ·~ 11 II. EXPBRIMBNTAL A. Materials 1. Acids Standard commercial reagents, in grades meeting A. c. s. specifications, were used without further purification. 2. ~ A stock solution of sodium hydroxide was prepared by the dilution of a filtered, concentrated solution of the reagent grade chemical. It was standardized against potassium bi- phthalate by potentiometric titration. 3. Buffer Primary standard grade potassium biphthalate was used to standardize the pH meter for all titrations. A 0.05 M solu- tion has a pH of 4.01 at 25°. 4. .I' Water Tap distilled water was redistilled from alkaline perman- ganate solution for use in all preparations and titrations. B. Equipment A Beckman model "G" pH meter was used in all pH determinations. Shielded electrodes, model 1190-80, permitted pH No electrode determinations outside the shielded cabinet. corrections were applied to any ireadings. - .. , . . .... ,. ·~ 12 III. A. MATHEMATICAL THBORY Titration of a Single Acid The simplified chemical equation for the dissociation of · an acid, represented by the formula RnA, in water or other suitable solvent is Hn A or- H+ + J.J A·"D-1 7 or, for the ith step of the reaction, where i varies from one to n, J.J A-(i-1) -. H+ ·"D+l-i ......- 8 The general equation for the thermodynamic dissociation constants of the acid is 9 .I'- where the brackets represent ionic concentrations, and the parentheses represent ionic activities. The ~i are the .ac- tivity coefficients for the ions of charge -i; since uncharged species are considered to be of unit activity, ~0 =1. Equation 9 may be rearranged to ~i-1 [J-In-iA-i) = Ki Xi [Hn+l-iA-(i-1)) (H+) 10 and proper substitution of successive terms will give · = Xo [ J.J-1·A -1) ."D li [ HnAl (H+)l 1;!;_. 1 1 ... . _~ • ·• .' · .... 11 13 Since the products of the dissociation constants will be encountered so frequently, it is useful to define 12 and k 0 = 1. 13 The total concentration of the acid, Ca, is the sum of the concentrations of the unionized molecule and all the ionized species, and may be expressed as <1 n + E i=l k· !)1 ri (H >• 1.4 For ionic balance in solution, it is necessary that the following condition be met: [~] + [Na+] n = [oH-1 + [cl-] + E i=l 15 where [Na+] is usually due to the base added, and [Cl-] = 0. If the salt of an acid is being titrated with a strong acid, then [Na+] is equal to the salt concentration, · and [cl-] is due to the acid added. The equations may be simplified somewhat by making the convenient definition 16 or, in terms including activities, activity coefficients, and ·-.• the dissociation constant of wate'r 'o • N• <r+> H + [Na+] - 0 ' 0 , KW (H+) 1 OH .. .~ 17 14 Combination of Equations 15 and 16 gives 18 and from Equations 11, 12 and 14, one finds that Ca ) . 19 Multiplication of this by (~)n/(H+)n gives ). 20 Rearrangement N t+)n n :: ~ iki (H+)n-ica ~i i=l 21 and the separation and recombination of terms gives • 22 There is one such equation for each data point, resulting in a set of equations in n unknowns for a given titration. There will most generally be more than n data points, and in order that the best possible use may be made of all the experimental data for a titration~ the method of least-squares, or multiple regression, is employed in solving·· .. ·, the set of ,' equations. The particular treatment used in this work may be best 15 illustrated by simplifying the coefficients of Equation 22 to give 23 The coefficients of the numerous individual equations are multiplied and summed to form the following set of equations: 24 (~ • • • • AnY) • • • = (~ AnA1 )k1 • + ----------<~nAn)kn • This set may be solved for the ki by any of several standard methods. The dissociation constants, ~i' are then obtained from an equation analogous to Equation 12. K.· 1 B. = ki k·1- 1 2.5 • Mixture of Two Acids The addition of a second acid, HmB, to the system introduces certain complicatiqns. Dissociation constants for the second acid are Kj, and the equations which differ sig• nificantly from those for a single acid are k J • }.13J •1 'J ' , 'r ·..... .... ,. 26 'p 27 and 16 N =~~ ik·1 ~i=l G~ jkj j=l (jj+')m-j) X·J Cb m cjj+)m + 1: k J·(Ir')m-j j=l X· 28 ~ This equation may be reduced to n N(H+)n+m = 1: k. ( i Ca-N )(H+)n+m-i ¥i i=l 1 + 29• + n m iCa + J. Cb-N · · ~ ~ k •k •( )(H+)n+m-1-J v 'I i=l j=l 1 J Oi Oj ~ • ~ A non-linear method must be employed in the solution of ,. . this system due to the fact that products of the var1ables are present. So far as is known, all methods for solving non- linear systems of equations on digital computers are i te.rative and have one of two disadvantages: either reasonably good initial estimates of the variables are required to assure convergence, or else the equations are expanded at each iteration and the program may bog down of sheer complexity. In this work, the Newton-Raphson method of iteration, as employed by Crosbie and Monahan (18), was convenient. cJ;l~_~en as the mQ..ft sui table and ,. The method of least-squares requires the minimization of Q in the equation 17 30 where 31 and may be either a measured value, YM' by virtue of Equation 16, or a calculated value, Yc, from Equation 29 and the esti- - mates of the ki,j• The appropriate corrections, (dk), in vector notation, to the variables would result in Q+ d9_ ~ ~(2)k)(dk) = o. 32 From this, it follows that l:( ~-~k)(dk) = -Q 33 and 34 .1 ' Therefore . 35 or 36 This can be most conveniently solved by multiplying by (clYc/~k) and expressing the entire equation in vector or matrix notation, ~~D n;m(,.~(1))21 [dk)= ~~D n;m('Y,;j(l)":'Yc(l)><~~~l))l ~·1 a•l a J [!~1 a•l · a ~ where ND is the number of points on the titration curve. 37 18 This system, [ G][ dk] = [R] 38 is solved for the vector [dk] by matrix inversion to yield improved values of the variables, ka c. = ka 0 + d ka • Modified Titrations The principal variation that will be encountered is probably the titration of a weak base with a strong acid. In addition, the free acid (or base) may occasionally be unobtainable, necessitating the titration of a sodium or potassium. salt of the acid with strong acid. Fortunately, modifications to the equations already developed are either slight or unnecessary and the changes in computer programming required to handle all four situations are minor. ·" 1. Salt of weak acid titrated with strong acid The only changes needed are that [Na+] be · made equal to the salt concentration, and [Cl-] is now .t he concentration of the acid titrant. 2. Weak base titrated with strong acid For the titration of a base, M(OH)n, with acid, Equation 18 is changed to N = n 1: i=l +i i[M(OH)n_ 1. ] · 1 ·,.· • ·, , · .. . ~ 39 19 Equation 16 remains the same, except for a change in sign, since N will now represent the total concentration of all simple negative ions. The value of (Na+] will generally be zero, and [cl-] will be the concentration of the acid titrant. 3. Salt of weak base titrated with strong base This case is very similar to that of Section 1 above. [Cl-) equals the salt concentration, and [Na+] is the concentration of the base titrant. The quantity N has the same sign as in Section 2. D. Calculation of Titration Curves It is sometimes useful to calculate an exact titration curve from known dissociation constants and concentrations. An iterative process is necessary for curve calculation, ~ due to the continual corrections for volume change. quired sodium ion concentration (or chloride ion, The re- depend~ng upon the type of titration) at each desired pH on the titration curve is calculated from Equation 19 and 16. The pre- vious value of [Na+] is obtained from the expression The difference, required [Na+) ~ Previous [Na•], is multiplied by the total solution volume and, . divided··by the con.. . . ,. ·, centration of the base to obtain· the volume of base that must be added. 20 This calculated amount is added to the solution, and then a test is made to determine whether or not sufficient accuracy has been achieved. Gene rally, if the amount of base added (or subtracted, since the quantity may have either sign) is less than 0.001 ml, no further adjustments are made to the particular point on the curve in question. B. Calculation of Acid Concentrations The concentration of an acid can be readily obtained from its titration curve and dissociation constants by means of Equations 20 or 28 and the linear least-squares treatment. For a single acid, this is of doubtful utility since standard analytical analysis of the titration curve will generally give a value of completely satisfactory accuracy. For a mixture of acids, however, this calculation may be of some importance as there may be no break in the curve. F. Determination of Errors The method of least-squares can be reasonably depended upon to do a good job of fitting a particular given set of data. equat~on to a It does not, however, necessarily indicate how well the answers obtained satisfy the equation and data. It is therefore highly advantageous to, determine the standard . deviations of the final results; these will give indications of the random errors in the data, or perhaps evidence that the 21 chosen equation was not the proper one. In the latter case, this would be due to improper choice of the initial parameters specifying the number of acids or dissociation constants. In all cases in this work, the same procedure is used to Obtain the standard deviations of the particular results. The systems of linear equations are solved by the method for nonlinear equations on the last iteration. The diagonal elements of the inverse matrix G- 1 , from Equation 38, are transformed into the standard deviations by the expression G- 1 (L,L) x Q ND-NC-1 where ND is the number of points on the titration curve, NC is the number or variables in the problem, and Q is defined as in Equation 30. ,1 ' . . r ..... • , . ...,. ( ... 22 IV. CALCULATIONS The development of the equations in Chapter III, and, in particular, the reduction to practice of these equations, actually constituted the major portion of this research. For this reason, the applications of the equations for the titration of a single acid, and for a mixture of acids, will be described in some detail. The applications of the equations in the remaining sections do not differ sufficiently from the above to warrant detailed descriptions. Utilization of the procedures developed in this work requires the availability of an electronic digital computer, preferably of large size. Much of the initial development and testing was done on an International Business MachinesType 650 computer. However, this machine is of insuffici~nt size to contain the complete program, and final assembly and operation was done on an IBM Type 704. In general, the Fortran Auto- matic Coding System was used to code the programming for both machines. A. The program is listed in Appendix B. Calculation of the Dissociation Constants for a Single Acid A simplified flow sheet for this section is given in Figure 1. 1. The individual steps ,· ·~.re explained ...below. , Read in the titration curve·, estimates of dissociation constants, control parameters, and any other 23 I. INITIALIZATION 2. CLEAR ARRAY SET LOOP 3. GO r TO -... CALC. ... 4. CALC. N ANDY 5. BUILD ~· ARRAY , 6. RAISE LOOP AND TEST FOR END NO ,1"- YES ,, 7. SOLVE ARRAY FORM SUM REPLACE ANSWERS TEST FOR ANSWERS NO YES ~· ' ,. , ..• . . 8. MODIFIED PROPER PARAMETERS AND ENTER TWO ACID SYSTEM Figure 1. Flow diagram for the calculation of dissociation constants for a single acid 24 necessary information. The control parameters speci- fy which of the numerous program options are to be used, and control the introduction of additional information necessary to satisfy those options. The products of the dissociation constants are formed by means of Equation 12. 2. The array specified by Equation 24 is set to zero since it is to be built up by a summation process in each iteration. The "loop" will control the succes- sive processing of each point on the titration curve. as the array is built up. 3. The "Gamma Calculator'' and the operations it performs are described in detail in Section C. 4. The quantity N is calculated by means of Equation 17, and y 5. = N(if')n ,.. as shown in Equations 22 and 23. The elements of the array are formed by means of Equations 22 and 23, and are added to the previous values, as indicated by Equation 24. 6. The 11 loop" is increased to process the next point, am . a test is made to determine whether or not any points remain. 7. The array is solved by the conventional method of triangularization. Th~' . , .~nswers .. .. , replace . the previous .· values of ki, and the sum of the absolute values of the fractional differences between the new results 25 and the previous results is compared with the desired closeness of fit to determine the necessity for another iteration. 8. If the last answers obtained are satisfactory, the control parameters for the two acid system (Section B) are modified to allow one pass through that section in order to calculate the standard deviations. B. Calculation of Dissociation Constants for a Two Acid Mixture Figure 2, detailed below, shows the basic steps employed, in this treatment. 1. This step is essentially the same as Step 1 in Section A. Equation 26 is used in addition to Equa- tion 12 to form the products of the constants. 2. The looping operation is the same as the one used in Section A. The array used in the single acid treat- ment does not appear in this section. 3. See Section c. 4. From Equations 16, 29, and 31, Yc and YM are calculated. These quantities are vectors, there being one value of each for every point on the titration curve. 5. The partial derivatives, aytfak, are calculated by means of Equations 29 · a~ 31. These ...will form a matrix whose dimensions are· determined by the total number of dissociation constants and the number of 26 I. INITIALIZATION J 1 I... I 2. SET LOOP ~ 3. GO TO r ... CALC. , 4. CALC. Yc{L), YM(L) 1 5. CALC. VECTOR 8Yc{L) I 8k ~ 6. RAISE LOOP AND TEST FOR END NO Jf.. ,,!YES 7. FORM G AND R MATRICES INVERT G , APPLY CORRECTIONS : 8. FORM SUM NO REPLACE ANSWERS TEST FOR END , YES 9. CALC. STANDARD Figure 2. DEVIATIONS I Flow diagram for the calculation of dissociation constants for a mixture of two acids 27 points on the titration curve. 6. Same as step 6 in Section A. 7. The G and R matrices, given by Equations 37 and 38, are formed and G is. inverted by a standard procedure. The corrections, dka, are added to the dissociation constants. 8. The previous values of ki,j are replaced and the sum of the absolute values of the fractional changes is calculated to determine the necessity for any further iterations. 9. The standard deviations are calculated from the inverse matrix, G- 1 , by means of Equation 41. c. Calculation of Intermediate Quantities ,1 " This section, previously referred to as the ''Gamma Calculator'', computes, in addition to the activity coefficients for the various ions in solution, a large number of other necessary factors. Since the operations in this section are performed in sequence. they will be described without reference to a flow sheet. 1. The activity coefficients for the hydrogen and hydroxide ions, and for all the ionic species derived from the acids, are ca,.g.u lated by me~ns .. of the Debye- ~ Hucke! formula, Equation 1.· In the first calculation for each point, the estimated ionic strength is used. 28 Successive calculations use the ionic strength previously determined at the end of this section. 2. The concentrations of the acids are corrected for the volume change, caused by the addition of base, by means of the following equation. Ccorr= Cinit 3. X Vinit Vinit + Vbase 42 • The sodium ion concentration is calculated from the volume of base added, its normality, and the initial solution volume. [Na+] = Vbase x Nbase Vbase + Vini t 4. 43 • The concentrations of all the ionic species of the acids are calculated from the current estimates of the dissociation constants. ·" is first Equation 14 employed to obtain the concentration of the unionized acid. Equation 11, which relates the ionic species to the unionized acid, is then utilized to obtain the individual ion concentrations. S. The new value of ionic strength is calculated by means of Equation 2. D. Options and Considerations As previously mentioned, se·ction~ c through F of Chapter III do not warrant detailed description in this work. They 29 do, however, add considerably to the complexity of the program because of the many branches and multiple paths of similar calculations that must be provided. In addition to the options previously described, a number of minor options have been incorporated in the final program to increase its flexibility and utility. They include the following. 1. Uydrogen ion concentration may be in the form of pcH, paH, or pwH. 2. Ionic strength may be calculated at each point, specified for each point, or constant. 3. Hydrogen ion activity coefficients may be calculated or specified at each point. 4. Total solution volume may be calculated or constant • s. The coefficients, A, B, and @in Equation 1 may be .1'- altered. Also, the ion size parameter for hydrogen ion, normally set at 5.0, may be changed. The permissible decimal range of quantities in programs coded by Fortran is lo- 38 to 10+ 38 • This range is generally sufficient, but in some problems may be greatly exceeded, causing meaningless results. Considerable attention was there- fore given to providing means by which certain quantities would be automatically scaled in· it,be proper direction when nee. ~ ' .. ~ essary, without changing the validity of any equations. 30 V. RBSULTS Much of the testing of the computational methods devel~ oped herein could be done only with theoretical titration curves. For the most part, these curves were calculated from various hypothetical dibasic acids. The problem of the mono- basic acid is considerably less complex in many respects, and has been largely ignored since any method capable of handling dibasic acids is almost certain to be more than sufficient for monobasic acids. Likewise, once the problem of the dibasic acid has been ' solved without resorting to graphical or other two dimensional limitations, additional hydrogen ions give no particular complications, in theory. In practice, the limited accuracy of ex- perimental data will likely be the greatest treatment of polybasic acids. pro~em in the For these reasons, dibasic acids are the principal ones considered in this work. A. Resolution of Successive Constants One of the greatest problems in the calculation of acid dissociation constants has been the differentiation of suecessive constants whose values differ only slightly. Gener- ally, if the ratio of the values of successive constants has been less than about 500, previ'~-~s. c•lculatioiis have employed na thematical artifices involving questionable assumptions. It 31 has been calculated (14) that a break will appear in the titration curve of a dibasic acid only if the ratio of constants is over sixteen. Since there exist several acids whose reported constants differ by even lesser amounts, it is important to test the differentiating ability, or "resolving power" of any new computational method. This has been done using theoretical data, to test the ultimate limits, and with modifications to simulate experimental data in order to determine the results likely to be obtained in practice. A series of titration curves was calculated for dibasic acids with ratios of dissociation constants varying from 1000 to 3. The initial parame~ers used are given in Table 1. Several of these curves have been plotted in Figure 3 to indicate the general curve shape obtained with various ratios of .JO. constants. These calculated curves are precise in pH, and within 0.001 ml of base at each point. Activity corrections were not made, since such corrections are somewhat time consuming, and ideally should have no effect on this part of the investigation. However, as a safeguard, several of the curves with low ratios of constants were also calculated with activity corrections to see if there were any effects peculiar to such corrections. 1. Ultimate resolution ·-.• •' ·.• These calculated curves were then processed to determine the dissociation constants, and the results are given in TableL 32 en J- z ::::> :c a.. 2 I EQUIVALENTS · OF . BASE -ADDED .' Figure 3. / .....· .... Calculated titration ·curveJ 'for variot;{s hypothetical dibasic acids with varying ratios of I 2 Ki K Conditions and results for the theoretical test of resolving power upon titration curves of dibasic acids (Acid concentration 0.05 M, base concentration 0.10 N, and initial solution volume 100.0 ml) Table 1. = Initial constants Ratio Calculated constants pK2 pel = = pKl PK2 Fractional Standard deviations .SK2 .I'Kl 3.00 3.52 4.00 4.52 6.00 6.00 6.00 6.00 1000 300 100 30 3.00 3.52 4.00 4.52 5.99 6.00 6.00 6.01 1 5 9 2 4.60 4.70 4.82 5.00 6.00 6.00 6.00 6. 00 25 20 15 10 4.60 4.70 4.82 5.00 6.00 6.00 6.00 6.01 1 X 10- 5 4 x 1o-5 2 x 1o-s 1 x 1o-s 1 x 10-6 4 x 1o-8 9 x 10-8 6.00 6.00 6.00 6.00 5 3 10 3 5.30 5.52 5.00 5.52 5.99 6.00 6.00 6.00 1 1 6 5 4 2 6 8 -~.' ' 5.30 . .. 5.52 5.ooa 5.52a •. awl ih activity correc-tions ) X 10-5 x 1o-6 X 10-6 X 10-5 x lo-4 X 10-4 x 1o-6 x 1o-4 2 1 3 1 x lo-5 X 10-6 x 1o-1 x 10-1 1 x 1o-8 x x x x 1o-8 1o-8 1o-9 1o-8 w w 34 It is evident from these results that this method is inherently capable of excellent resolution. It is instructive to note, however, that the answers obtained are not always exactly equal to the constants used to calculate the titration curvea. An error of 0.01 in pK is equivalent to an error of about 2% in K, and in several cases such errors were obtained. These errors are not reflected in the standard deviations, since this latter quantity is merely a measure of how well the answers fit the data, and not a measure of how accurate the answers are. The inclusion of corrections for. activity caused no difficulties. 2. Effects of errors A consistent error in experimental data maf result in a titration curve that is smooth and satisfactory in appearance When plot~ed, but is nevertheless inaccurate. An error -of up to 0.05 units in the standardization of a pH meter might not be unexpected under certain circumstances. To determine the effects of such an error, the pH values of the calculated curves were all changed by the same amount, and the resulting data processed to obtain the constants. in Table 2. / The results are given ....· The changes in pKl are quite .c:onsistent -·and not alarmingly large. The changes in pK2 are considerable, and no posi- Table 2. Conditions and results for the test of the effect upon dissociation constants of a consistent error in the titration curve Initial constants Calculated constants with +0.05 pH unit error Calculated constants with -0.05 pH unit error pKl pK2 pKl pK2 pKl pK2 3.00 3.52 4.00 4.52 4.60 6.00 6.00 6.00 6.00 6.00 3.09 3.(>1 4.08 4.61 4.69 4.61 4.80 5.04 5.25 5.18 2.91 3.43 3.91 4.44 4.51 Neg. 4.70 4.82 6.00 6.00 4.77 4.90 5.65 5.58 "_a 5.00 5.30 5.52 5.oob 5.52b 6.00 6.00 6.00 6.00 6.00 5.08 5.37 . 5.60 5.08 5.60 5.47 5.74 5.63 5.64 5. 76 4.63 -- a 4.92 5.23 5.44 4.92 5.44 ~his calculation was not completed bwith activity corrections " " ,," Neg. " " " " w tJt 36 tive values were obtained when the pH values were lowered. Activity corrections gave no change in pK1 , but did affect pK2 • The reason for this is not known. Experimental titration curves are unlikely to exhibit the precision demanded of the calculated curves, nor, it is hoped, will they have a consistent error of disturbing magnitude. gin. ~~at will be found are random errors of multiple ori- A precise determination of the effects of such errors is more than likely impossible. Since acids with suitably spaced constants are not readily available (if at all), and experimental titrations are not sufficiently accurate, attempts to determine the effects of random errors must be made with calculated data suitably modified to include such errors. Ideally, the errors should be applied to both pH and titrant volume readings, but this would seem to be an unnecessary complication for what can at best be only an approximation. the pH data were modified. Thus, only McComas and Rieman (19) estimated the accuracy of pH measurements with a glass electrode as t 0.03 units. ~ss Although other electrodes may be subject to error, it was considered reasonable to subject the pH data to a standard deviation of 0.05 units. A table of random digits, in conjunction with the standard Gaussian Distribution Curve, was used to calculate the error to be applied. Table 3 gives the direction and magnitude of the error assigned for each digit. 37 Table 3. Errors in pH assigned by random digit table for Sigma = 0.05 Digits Error + 0 1 2 3 4 5 6 7 8 9 0.006 0.020 0.034 0.072 0.083 All calculated curves were treated identically, and for a 28 point curve, the average deviation applied was -0.01 units. The results of the dissociation constant determina- tions f rom these modified curves are given in Table 4. Table 4. Conditions and results for the test of the effect upon dissociation constants of random errors in the titration curve Initial constants PK2 pKl Calculated constants pK2 pKl 3.00 3.52 4.00 4.52 4.60 6.00 6.00 6.00 6.00 6.00 2.84 3.54 4.10 4.49 4.57 Neg. 6.33 4.30 5.45 5.49 4.70 4.82 5.00 5.30 5.52 5.ooa 5.52a 6.00 6.00 6.00 6.00 6.00 6.00 6.00 4.60 4. 72 4.88 5.29 5.51 4.89 5.51 Neg. Neg. Neg. 5.85 5.82 Neg. 5.92 awith activity corrections 38 Once again, it is pK2 that is predominantly affected, both with and without activity corrections. However, the errors are consistent neither in direction nor magnitude. B. Resolution of Mixtures The mathematical resolution of a mixture of acids is considerably more difficult than the resolution of successive constants of a single acid. The first test was made upon a calculated curve for a monobasic acid, pK = 5, treating this curve as a mixture of monobasic acids in varying concentration ratios, with the total concentration equal to that used in calculating the curve. Ideally, the computations should re- sult in values of 1.0 x 10~ 5 for both constants. The results given in Table 5 indicate that this ideal was approached rather closely. Table 5. Conditions and results for the mathematical treatment of a single monobasic acid as a mixture of two monobasic acids Molar concentrations Acid 1 Acid 2 Dissociation constants x 105 Acid 1 Acid 2 0.0500 0.0495 o. 0490 0.0475 0.0450 0.0000 0.0005 0.0010 0.0025 0.0050 1.000 1.000 .999 .999 1.00 1.02 1.05a 1.02a .995 0.0425 0.0400 0.0350 0.0300 0.0250 0.0075 0.0100 0.0150 0.0200 0.0250 .998 .999 1.00 .991 1.00 1.01 1.00 .995 1.01 .997 aBetter values were obtained in these runs 39 As mentioned in Chapter IV, this part of the program is reiterative. Such methods~y occasionally oscillate around the correct answer, or perhaps even diverge, rather than converge to a final solution. was encountered. In the runs in Table 5, oscillation Ten iterations were permitted in each run, and the answers were taken from the · iteration which gave the smallest least-squares parameter. This was usually the best answer, although there were exceptions in two cases. A calculated curve for what might be considered a typical acid mixture was then processed; the results are given in Table 6. No difficulties were encountered in this calculation. Table 6. Conditions and results for the resolution of a mixture of a monobasic and a dibasic acid (Concentration of each acid 0.01 M) = Acid 1 Acid 2 Dissociation given 6.40 X 10-5 2.70 X l0-6 1.77 X lo-4 Kl K2 c. constants found 6.41 X lo-5 2.69 X l0-6 1.77 X l0-4 Consistency Experimental consistency was examined by titrating aliquots of a tartaric acid solution with sodium hydroxide, using a glass electrode. The pH meter was standardized against 0.05 M potassium biphthalate at the beginning of each titration. 40 There was no significant drift. The constants obtained from these titrations, with activity corrections applied, are given in Table 7. Table 7. Conditions and results for repetitive titrations of tartaric acid (Initial volume = 100.0 ml, acid concentration 0.1031 M, base concentration 0.05 N) = = Dissociation constants K1 X 104 K2 X 105 8.64 8.64 8.81 9.33 8.34 10.07 10.05 Standard deviations K1 X 106 ~ X 1010 4.34 6.24 4.35 4.28 4.19 5.34 12.5 10.7 4.33 8.8 3.76 5.32 2.41 3.00 7.8 10.5 5.2 6.5 4.31 4.12 4.17 Although 12 to 14 pH measurements were made in each titration, and all reasonable care was taken, there are considerable variations in the results. Here, unlike the tests with calculated data, it is K1 that shows the greatest variation, with values that bracket the commonly accepted 9.6 x 10·4 • The variations in K2 are much smaller than those in K1 , but the values differ somewhat from the accepted one of 2.9 x lo-5. Once again, the standard deviation is obviously not a valid indication of the accuracy of the computed constants. D. Improper Calculations The errors introduced by treating a dibasic acid as a mixture of monobasic acids were investigated by processing the 41 single acid calculated data as mixtures. From the results given in Table 8, it can be seen that this procedure will produce very good results when the ratio of constants is 100 or more, and reasonably good results are obtained at even lower ratios. Table 8. Below a ratio of 10, results were unsatisfactory. Conditions and results for the test of the effect upon dissociation constants of the treatment of a dibasic acid as a mixture of two monobasic acids Initial constants pKl pK2 Calculated constants pKl pK2 3.00 3.52 4.00 4.52 4.60 6.00 6.00 6.00 6.00 6.00 3.00 3.52 4.00 4.54 4.62 5.99 6.00 5.99 5.99 5.99 4.70 4.81 5.00 5.30 5.52 6.00 6.00 6.00 6.00 6.00 4. 72 4.86 5.05 Neg. 5.39 5.97 5.97 5.96 3.72 Neg. B. Experimental Titrations In addition to the titrations of tartaric acid previously mentioned, titrations were made on acetic acid, succinic acid, and on mixtures of tartaric and acetic, succinic and acetic, and tartaric and succinic acids. The last three would provide a severe experimental test of the resolving power of the method for mixtures. Unfortunately, of these three, only the last produced any positive results. Prom Table 9, it can be seen that the single acids approached the literature values fairly 42 closely, and the values for tartaric acid in the mixture are very close to the commonly accepted values. However, negative constants were obtained for succinic acid in this mixture. Table 9. Results of experimental titration& of various single acids and mixtures Acid Constant Experimental value 1.7S X 1o·S 5.96 x 10-S 6.6 X l0-5 2.18 x 10·6 . 9.81 X 10•4 2.8 x 1o·6 9.6 X 10-4 2.9 X lo-5 Acetic K 1.66 Succinic Kl K2 Tartaric + Succinic Tar. K1 Tar. K2 10-s Literature value 2.88 X X Sue. Kl Neg. Sue. K2 Neg. 10• 5 Data for the titrations giving successful results are tabulated in Appendix A. • 43 VI. DISCUSSION The computational procedures developed in this work have been shown, it is believed, to be fundamentally sound and inherently extremely accurate. However, the accuracy that can be attained in practice, by any method, may be far poorer than generally expected. Successive dissociation constants of small ratio, a major obstacle in most former methods, have been shown to present no difficulties attributable to such ratios. The thor- oughly satisfactory manner in which closely spaced constants are resolved is not, however, accompanied by equally satisfactory accuracy. It is this latter fact which casts some sus- picion upon all constants previously determined by titration rethocis . It should be emphasized that the matter of accuracy is la rgely an experimental problem, and neither necessarily nor probably a fundamental limitation of the method. Since the ''titrations" used for testing were calculated by reiterative methods, some tolerance had to be allowed. This was in the volume of base, which was within 0.001 ml at every point in a titration requiring 100.0 ml. Such accuracy in practice would be attainable only with exceptional care, even in weight titrations. Although, as shown, this may lead to a 2% error in dissociation constants, it is not unusual to find literature values expressed to three significant figures when even the 44 second is probably uncertain. Other experimental methods may involve less error, but they can not be judged in this work. Consistent pH errors produce effects somewhat greater than anticipated. For a monobasic acid, it might be expected that the change in pK would essentially equal the change in pH. Such a test was not made, but it now appears that the effect might not be quite so simple. The dibasic acid tests demon- strate that a simple displacement of the titration curve gives a not so simple displacements of pKs. An analysis of the math- ematical niceties involved in these displacements would have little practical value. conclusions can be drawn. However, two simple and constructive First, the magnitude of errors to be expected, if the work if performed with care, has been overestimated. Second, the effect of such errors as may be present can be considerable. These conclusions are also con- sistent with the experimental titrations done in this work. When considering the results of introducing random errors into the titration curves, it is well to remember that the curves do not retain their original shape, nor are they altered identically in two dimensions. With this in mind, one may conclude that the rather random results indicate excessive pessimism in the estimation of likely experimental error; this is then essentially the same result as obtained for consistent errors. Mixtures of acids proved to be no more difficult to re- 45 solve than single acids, within limits. Certainly the re- sults given in Tables 5 and 6 are as good as one could reasonably expect. However, more severe examples, such as mixtures of dibasic acids with overlapping constants, proved to be insoluble. Inaccuracies in the data are the most reasonable ex- planation for this failure. It is possible that titration data accurate to more significant figures would enable satisfactory resolution to be attained, but there would be no practical application. The almost total failure of the experimental titra- tions of mixtures to be properly resolved is not surprising. The solitary exception cannot be explained. In general, ti- tration of acid mixtures does not appear to be a fruitful undertaking, unless there is considerable separation of constants. The multiple titrations of tartaric acid give an indication of the results likely to be obtained by ordinary analytical procedures. These titrations were not the ultimate in re- finement nor accuracy, but were typical of ordinary laboratory practice. Better results would be desired, but the range of pK1 , 3.00 - 3.08, is not unreasonable in view of the previous tests, and pK2 , 4.36 - 4.39, covers an almost remarkably small range. The "accepted" values, to which these results were compared in section v, are not to be considered as ultimate stand:: . rds for comparison. They are perhaps the most widely accepted, but a cursory search of published constants will re- 46 veal both higher and lower values than those obtained in this work. For this reason, consistency is considered to be a more important criterion than conformance to any other particular work. On that basis, and in view of the effects of errors, these titrations may be considered quite satisfactory. The errors that resulted by assuming a dibasic acid to be a mixture of monobasic acids were not as extensive as anticipated. If all other factors are equal, the ratio of constants may apparently be as small as 100 without introducing appreciable errors. There is no merit in such an assumption if com- puting methods and facilities of the type used in this work are available, (in fact the mixture involves more work), but it does indicate that the limits of 500 to 1000 used by others are rather conservative. And that is, perhaps, the only assumption in previous calculations that is conservative. 47 VII. SUMMARY The primary goal of this work has been attained; dissociation constants have been calculated without use of simplifying assumptions, and with full consideration of all available data. Errors in the data have a considerable ef- fect on the answers obtained, and some calculations are simply not possible due to experimental inaccuracies. Many literature values must now be accepted with reservation for several reasons. These include unjustified or un- necessary simplifications in calculations, and the use of different pH scales in older work. Extremely accurate titrations are required to obtain dissociation constants of two or more significant figures, particularly for polybasic acids. If good data are available, however, the mathematical means to make full use of them are now at hand. 48 VIII. LITERATURE CITED l• ~· ~., 1. Dippy, J., S. Hughes, and A. Rozanski, 1959, 2492. 2. Jones, R. and D. Stock, 3. Kolthoff, I., Chern. Weekb1ad, 16, 1154, (1918). [Original n~vai1ab1e for-examination; abstracted in Chern. Abstr. 14, 13 (1920).] 4. Paul, T., ~· physik. Chern., 110, 417 (1924). 5. Dhar, N., z. anorg. allgem. 6. Bates, R., W. Hamer, G. Manov, and S. Acree, Bur. ~., ~' 183 (1942). 7. Hamer, W. and S. Acree, 605 (1936). B. Lewis, G. and M. Randall. Thermodynamics and the Free Energy of Chemical Substitution. New York, N.Y., McGraw-Hill Co. 1923. 9. Britton, H. Hydrogen Ions. 3rd ed., Vol. 1. N.Y., D. Van Nostrand Co. 1943. 10. Sorensen, S. and K. Linderstrom-Lang, Compt. Lab. Carlsberg, 15, No. 6 (1924). 11. Guggenheim, E., 12. Hitchcock, D., 13. Mori, Y., ~· QQ!!. Sci. Eng., 1, 205. [Original not available for examination; abstracted in Chem. Abstr., !, 2529 (1907).] 14. Auerbach, F. and E. Smo1czyk, 65 (1924). 15. Britton, H., 16. Cohnt E. 1 F. Heyroth, and M. Menkin, ~' 6V6 (1928). l• J· ~. §2£., 1960, 102. Chern.,~' l·~· li!!!· 323 (1926). ~· l• ~· li!!!· !1• Std., New York, ~· I!!Y· J. Phys. ~., ~' 1758 (1930). J. ~· ~· §2£., ~' 855 (1936). ~- Soc., ~· ~' physik. ~., 110, 1896 (1925). l• ~· ~- ~., 49 l· Chern. Soc., 12iQ, 855. 17. Speakman, J., 18. Crosbie, E. and J. Monahan. A General Least Squares Fitting Procedure. (Typewritten) Argonne, Illinois, Argonne National Laboratory. 1959. 19. McComas, W. and (1942). 20. The Rand Corporation. A Million Random Digits with 100,000 Normal Deviates. Glencoe, Illinois, The Free Press. 1955. w. Rieman, l• ~· ~· 22£•, ~' 2948 50 X. Table 10. Data for titrations of tartaric acid Acid concentration 0.01031 M; base concentration 0.0501 N; initial solution volume 50.00 ml. = = Ml of base APPENDIX A 1 2 = Solution pH 4 3 5 6 7 4.00 2.98 2.98 2.97 2.96 2.99 2.94 2.94 8.50 3.45 3.45 3.45 3.44 3.46 3.43 3.43 12.50 3.94 3.94 3.93 3.93 3.94 3.91 3.90 16.50 4.47 4.46 4.47 4.47 4.49 4.45 4.45 19.00 5.04 5.02 5.05 5.03 5.05 5.01 5.01 20.00 5.66 5.67 5.70 5.67 5.70 5.67 5.68 20.20 5.99 5.98 6.07 6.00 6.06 5.99 6.00 6.34 6.43 6.30 6.48 6.32 6.38 7.00 7.11 7.01 7.20 7.01 7.00 7.55 7.58 7.50 7.87 7.70 7.55 8.30 8.55 8.40 8.30 20.30 20.40 6.95 20.45 20.50 20.52 8.17 8.39 8.56 51 Table 11. Data for titration of acetic acid Acid concentration 0.02174 M; base concentration 0.0501 N; initial solution volume 50.00 ml. = = Table 12. = Ml of base Solution pH 1.00 3.00 6.00 10.00 14.00 3.56 3.99 4.32 4.67 5.00 18.00 20.00 21.00 21.30 21.50 5.45 5.85 6.34 6.70 7.26 Data for titration of succ1n1c acid Acid concentration = 0.01051 M; base concentration 0.0501 N; initial solution volume 50.00 ml. = = Ml of base Solution pH 13.50 3.63 4.05 . 4.46 4.87 5.28 16.50 18.50 19.60 20.20 20.60 5.70 6.08 6.41 6. 73 7.17 2.00 4.50 7.50 -lo. so 52 Table 13. Ml of base Data for titration of tartaric and succ1n1c acid mixture (Acid concentrations = 0.01031 M and 0.010437 M; base concentration = 0.0501 N; initial solution volume = 100.00 ml.) · Solution pH Ml of base Solution pH 1.00 2.00 3.00 4.00 5.00 2.77 2.84 2.92 3.00 3.09 26.00 27.00 28.00 29.00 30.00 4.63 4.70 4.80 4.89 4.99 6.00 7.00 8.00 9.00 10.00 3.15 3.23 3.31 3.40 3.48 31.00 32.00 33.00 34.00 35.00 5.09 5.20 5.30 5.40 5.53 11.00 12.00 13.00 14.00 15.00 3.55 3.62 3.70 3.77 3. 86 36.00 37.00 38.00 39.00 39.50 5.65 5.80 5.95 6.18 6.31 16.00 17.00 18.00 19.00 20.00 3.92 4.00 4.05 4.12 4.19 40.00 40.20 40.40 40.60 40.80 6.50 6.60 6. 71 6.84 7.05 21.00 22.00 23.00 24.00 25.00 4.26 4.32 4.40 4.48 4.55 41.00 41.10 7.35 7.55 53 XI. c c c c c c c c c c c c APPENDIX B WAYNE DUNNING, IOWA STATE UNIVERSITY THIS PROGqAM CALCULATES DISSOCIATION CONSTANTS AND THEIR STANDARD DEVIATIONS FOR A SINGLE ACID OR A MIXTURE OF TWO ACIDS. PRINCIPAL INPUT DATA CONSIST OF A PH TITRATION CURVE AND KNOWN ACID CONCENTRATIONS. IN ADDITION, CONCENTRATIONS MAY BE CALCULATED FROM A TITRATION CURVE AND KNOWN CONSTANTS, OR A THEORETICAL TITRATION CURVE MAY · BE COMPUTED. OPTIONS INCLUDE THE TITRATION OF A BASE, OR OF A SALT OF A WEAK ACID OR BASE. WWOllOO WW01026 WWD1002 WWD DIMENSION JUNK11401r JUNK2140r21r JUNK3(401 00000 DIMENSION SIZIONibl, CKPROOiblr CKINDiblr HAIONI81 0 HYDACTI41 0 WW01003 000001 OHACTI41, CMUI511, PHI511r ACTCFHI511o GAMMAI61, TNTHL(511o WWD10C4 OOOJ02 FACTORibl, ACTSCLI71, RESULTI61, ARI50,61, Ell41, FCI50lr FHI501oWWD1005 000003 DFI501t G(40,401, Rl40,11r Ul6,6l WW01006 COMMON JUNKl, JUNK2, JUNK3 00000 COMMON SIZIONo CKPROD, CKINO, HAlON, HYDACT 1 OHACT 1 CHU 1 PH 1 WWD1007 000001 ACTCFH, GAMMA, TNTML, FAC.TOR, ACTSCL, RESULT, AR, Eo FC, FH, OF, WWD1008 000002 G, R, U, AC!Dl, ACID2, CAC!Dl, CACID2, NACIOS, NCONl, NCON2, WWD1009 000003 NCONT, OENOM1, DENOM2, VNUMl, VNUM2, SCFTR, FN, Yr FB, MSCALE, WWD1010 000004 SUM, Q, 01, NDPTS, CMLTNT, ROOCL, VOLTL, CNAo VOLC, CLION WWD1011 C BEGINNING OF PROGRAM. THIS SECTION IS PRIMARILY FOR PROPER C INITIALIZATION OF THE PROGRAM. THE NECESSARY DATA IS READ IN, AND C THE VALUES OF CERTAIN CONSTANTS ARE SET. SET ICN SIZE PARAMETERS, DISSOCIATION CONSTANTS, AND INDIVIDUAL WWD1101 C WWD1102 C ION CONCENTRATIONS TO ZERO WWD1103 00401 00 403 I X 1, 6 WWD1104 00000 SIZIONIII 2 O. RESULTIII oa O. WWD1105 00000 CKPRODI I I " O. WWD1106 00403 CKIND([ I = 0. WWD1107 00000 00 405 I 2 1 0 8 WWD1108 00405 HAIONIII O. WWD1109 c WW01110 ZERO POWER OF HYDROGEN AND HYDROXIDE ACTIVITY EQUALS ONE c WWD1111 00000 HYDAC Til I "' 1. WWD1112 00000 OHAC Tl 11 = 1. 2 c c c UNLESS OTHERWISE SPECIFIED, HYDROGEN ION SIZE IS 5 HIONSZ 2 5. WWD 1113 C C 00000 00000 UNLESS OTHERWISt SPECIFIED, TEMPERATURE IS 25 DEGREES, AND DEBYE HUCKEL COEFFICIENTS ARE DBHFA 2 0.5092 DOHFB 2 0.32B6 WWD1115 WWDlll6 WWD1117 WWD1118 C UNLESS BETADH WWDlll9 c c c OTHERWIS~ = O. SPECIFIED, BETA IN D-H FORMULA IS ZERO WRITE HEADING, READ AND WRITE OPENING STATEMENT 00000 WRITE OUTPUT TAPE 9, 8 00000 READ 10 00000 WRITE OUTPUT TAPE 9, 10 PUNCH 10 WWD1121 WW01122 WWD1123 WWD1124 C READ CONTROL PARAMETERS 00000 READ 12 0 NTYP~1, NTVPE2 0 NTVPE3, NTVPE4, NTVPE5 0 NTVPE6o NTVPE7o 000001 NTVPE8, NTYPE9 WWD1125 WWD1126 WWIH127 c c C WRITE TYPE OF CALCULATION TO BE DONE IN THIS PARTICULAR RUN 54 1413, 411, 409), NTYPE1 OUTPUT TAPE 9, lit 415 OUTPUT TAPE 9, 16 415 OUTPUT TAPE 9, 18 001t07 001t09 00000 OOit 11 00000 001t13 GO TO WRITE GO TO WRITE GO TO WRITE 001t15 001t17 001t19 00000 001t21 READ ACID CONCENTRATIONS, AND WRITE WITH APPROPRIATE COMMENT OEPENOING . UPON WHETHER CONCENTRATION IS EXACT, OR AN INITIAL ESTIMATE. IF THERE IS ONLY ONE ACID, THE CONCENTRATION OF THE SECOND IS ZERO. READ 20, ACI01, ACI02 GO TU 1421, 421, 4191, NTYPE1 WRITE OUTPUT TAPE 9, 22, ACIOl, ACI02 GO TO 423 WRITE OUTPUT TAPE 9, 21t, ACI01, ACI02 c c c c c c c c c c c c 001t23 c c 00000 c c c c c WWD1129 WWil1130 WWOll:H WW01132 WW01133 WWIH l31t WW01135 WW01137 WWilll38 WW01139 WWOllltO WW01141 WWD1142 READ INITIAL VOLUME OF SOLUTION IN ML., NORMALITY OF TITRANT, IONIC STRENGTH IAN ESTIMATE UNLESS VALUE IS CONSTANT), MOLAR CONCENTRATION OF ANY ADDEO MONOVALENT SALT, DISSOCIATION CONSTANT OF WATER, AND DESIRED CLOSENESS OF FIT OF RESULTS IN PERCENT WW01147 READ 26, SOLNV, 8ASEN, GMU, CKN03, WCON, ERROR WRITE THE ABOVE QUANTITIES WRITE OUTPUT TAPE 9, 28, SOLNV, BASEN, GMU, CKN03, WCON, ERROR WW0111t9 WW01150 READ THE INDIVIDUAL DISSOCIATION CONSTANTS OR THE ESTIMATED VALUES OF THEM. THE FIRST FOUR ARE FOR THE FIRST ACID, THE LAST TWO FOR THE SECOND ACID. ANY CONSTANT WHICH DOES NOT EXIST MUST HAVE A VALUE OF ZERO. WW01152 00000 READ 30, ICKINOIII , I • 1, 61 c c 001t25 001t27 00000 001t29 c c c c 00431 00433 00000 00434 00000 c c c WRITE GO TO WRITE GO TO WRITE INDIVIDUAL DISSOCIATION CONSTANTS WITH COMMENTS 1429,427,4271, NTYPE1 OUTPUT TAPE 9, 32, ICKINOIII, I • lt 61 431 OUTPUT TAPE 9, 31t, ICKINDIII, • lt 61 IF ACTIVITY CORRECTIONS ARE NOT TO BE MADE, WRITE THIS FACT, SET ALL VALUES OF IONIC STRENGTH TO ZERO, AND DO NOT REAO IN THE ION SIZE PARAMETERS. GO TO 1435, 433, 4351, NTYPE2 WRITE OUTPUT TAPE 9, 36 DO 434 I = lt 50 CMUIIl,. O. GO TO 437 WWD1154 WWD1155 WWD1156 WW1Hl57 WW0115B WW01161 WW01162 WWD1163 WW01164 READ ANO WRITE THE ION SIZE PARAMETERS. VALUES FOR NONEXISTENT IONS SHOULD BE ZERO. 00435 READ 38, ISIZIONIIlo I • 1, 61 00000 WRitE OUTPUT TAPE 9, 40, ISIZIONIII, I • lt 6) WWDll66 WW01167 IF IONIC STRENGTH IS SPECIFIED AS CONSTANT, WRITE ITS VALUE AND SET ALL STORAGE VALUES TO IT. GO TO 1440, 439, 4431, NTYPE3 WRITE OUTPUT TAPE 9, 42o GMU DO 441 I • 1, 50 CMUIII • GMU WWD1168 WW01172 WW01173 WWDll 74 c c c 00437 00439 00440 OOH 1 c c IF VOLUME IS SPECIFIED AS CONSTANT, WRITE THIS FACT AND THE VALUE 55 00443 GO TO (447, 445), NTYPE4 00445 WRITE OUTPUT TAPE 9 I 441 SOL NV c c 00447 c 00449 00000 c 00451 00000 c 00453 c c WRITE THE TYPE OF PH READING SPECIFIED BY CONTROL PARAMETER 5 GO TO 1453 1 451, 449) 1 NTYPE5 W~ITE THAT PWH IS USED WRITE OUTPUT TAPE 9, 46 GO TO 455 WRITE THAT PCH IS USED W~ITE OUTPUT TAPE 9, 48 GO TO 455 WRITE THAT PAH IS USED WRITE OUTPUT TAPE 9, 50 WW01175 WWI)ll77 WWD1178 WWD1180 WWD1181 WWD1183 WWDll84 WWDll86 READ AND WRITE ION SIZE PARAMETER FOR HYDROGEN IF VALUE IS NOT 5.0 WWD1187 00455 GO TO 1459, 457), NTYPE6 WWDll90 00457 READ 52, HIONSZ WWD1191 00000 WR!Tt OUTPUT TAPt 9, 54, HIONSZ c c c READ AND WRITE NEW D-H COEFFICIENTS A AND B IF TEMPERATURE IS NOT 25 DEGREES WW01192 00459 GO TO 1463 1 4611 1 NTYPE7 WWD1194 00461 READ 56, DBHFA, ODHFB WWD1195 00000 WRITE OUTPUT TAPE 9, 58 1 DBHFA, DBHFD c c READ AND WRITE BETA IN D-H FORMULA IF BETA IS TO BE USED 00463 GO TO 1467, 465), NTYPEB 00465 READ 60, BETADii 00000 WRITE OUTPUT TAPE 9 1 62 1 DETADH c c 00467 c 00469 00000 c 00471 00000 c 00473 00000 c 00475 c c WRITE GO TO WRITE WRITE GO TO WRITE WRITE GO TO WRITE WRITE GO TO WRITE WRITE THE TYPE OF TITRATION SPECIFIED BY CONTROL PARAMETER 9 1475 1 473 1 471, 469) 1 NTYPE9 SALT OF BASE TITRATED WITH BASE OUTPUT TAPE 9, 64 477 BASE TITRATED WITH ACID OUTPUT TAPE 9, 66 477 SALT OF ACID TITRATED WITH ACID OUTPUT TAPE 9, 68 477 ACID TITRATED WITH BASE OUTPUT TAPE 9, 70 COUNT NUMBER OF ACIDS 00477 NACIDS = 1 004H IF IACID2l 901, 483, 481 00481 NACIDS = 2 c c WWDll96 WWD1198 WWD1199 WWD1200 WWD1203 WW01204 WWD1206 WW01207 WWD1209 WW IH210 WWD1212 WWD1213 WWD1214 WWD1215 WWD1216 WWD1217 COUNT NUMBER OF DISSOCIATION CONSTANTS FOR FIRST ACID NCON1 = 0 DO 489 I " 1, 4 IF ICKINDI!ll 902, 489, 487 NCON1 = NCON1 + 1 CONTINUE NCON2 = 0 WWbl218 WWD1219 WWD1220 WWD1221 WWD1222 WWD1223 WWD1224 COUNT DISSOCIATION CONSTANTS FOR SECOND ACID, IF ANY GO TO 14923, 49151, NACIDS AN INITIALIZATION FOR NON-LINEAR LEAST SQUARES, IF THERE ARE TWO ACIDS 04915 000 " 1000. WWD1225 WW01226 004tl3 00000 00485 00487 00489 o4n 1 c c 04913 c c WWD1228 56 c 00000 00000 04917 04919 04921 c c MAXIMUM NUMBER OF ITERATIONS ALLOWED PER PASS IN N-L LEAST SQS. NIO • 5 DO 4921 I • 5, 6 IF ICKINOII l l 913, 4921, 4919 NCUN2 • NCON2 + 1 CONTINUE TOTAL NUMOER OF CONSTANTS 04923 NCONT • NCON1 + NCON2 c c 00000 c c c 00000 04925 00000 04927 04929 04931 00000 c 00000 c c 04933 c c c c 00101 c c ABSOLUTE ERROR ERROR • ERROR I 100. OBTAIN PRODUCTS OF DISSOCIATION CONSTANTS RESET OVERFLOW TRIGGER IF ACCUMULATOR OVERFLOW 4925, 4925 CKPRODI1l • CKINDI1l DO 4927 I • 2, NCON1 CKPROOIIl : CKPROOII- 11 • CKINOIII GO TO 14933, 4931), NACIDS CKPROOI5l • CKIND15l CKPROOI6l • CKINDI5l • CKIN016l ERROR STOP IF A PRODUCT OF CONSTANTS IS OUT OF RANGE IF ACCUMULATOR OVERFLOW 909, 4933 TRANSFER TO PROPER SECTION OF PROGRAM DEPENDING ON TYPE OF CALCULATION OEING DONE GO TO 1101, 201, 3011, NTYPE1 SUBMASTER PROGRAM TO DETERMINE DISSOCIATION CONSTANTS GO TO READ IN TITRATION CURVE GO TO 501 RETURN FROM CURVE READ IN. DETERMINE MATRIX SIZE FOR SINGLE ACID 00103 NROWS = NCON1 00000 NCOLMS = NROWS + 1 c c c c 00000 00000 c c 00000 c c 00000 WWD122<,~ wwrH230 WWD123l WW01232 WWD1233 WWD1234 wwD1235 WWD1236 WWD1237 WWD1238 WWD1239 wWD1240 WWD1241 WWD1242 WWD1H3 WWD1244 WWD1245 WWD1246 WWD1247 WWD1248 WW01249 WWD1250 WWD139B WWD1399 WW01400 WW01401 WWD1402 WWD1403 WWD1404 WWD1405 WWD1406 SET ITERATION COUNTER AND SCALE CHANGE CHECKER TO ZERO CHECKER PREVENTS AN ATTEMPT TO SCALE IN BOTH DIRECTIONS SCALING IS NECESSARY TO KEEP DECIMAL POINT WITHIN ALLOWABLE RANGE WWD1407 MSCALE • 0 WWD1408 MCOUNT = 0 MCLLD = 0 INITIAL SCALING FACTOR EQUALS ZERO WWD1410 SCFTR = 0. WW01412 SET NONLINEAR ERROR FACTOR WWD1413 ERQO = .0001 • FLOATFINOPTSI GET SCALING QUANTITY 00000 IF ACCUMULATOR OVERFLOW 105, 105 00105 ACTSCLI1l = 10. •• ISCFTR • FLOATFINCONTll ERROR STOP IF SCALING QUANTITY OUT OF RANGE c 00000 I~ ACCUMULATOR OVERFLOW 906, 107 WWD1414 WW01415 SET NCNLINEAR ITERATION COUNTER TO ZERO 00107 LLD = 0 CLEAR RESULTS AND ARRAY FOR SINGLE ACID c 00109 GO TO 1111, 1151, NACIOS 00111 00 113 I • 1, NROWS ocooo RESULTIIl • O. OOOuO DO 113 J • 1, NCOLMS 00113 AR I I , J l " 0. WWD1418 WWD1419 WWD1420 WWD1421 WWD1422 WWD1423 WW01424 WWD1425 c c WWD1417 57 c c c 00115 c INITIALIZE LOOP AND GO TO ACTIVITY CORRECTION SECTION (GAMMA CALCULATOR) K • 1 OPTIONAL OUTPUT IF I SENSE SWITCH 11 116, 801 116 WRITE OUTPUT TAPE 9, 61 00000 GO TO 801 WWD1427 RETURN FROM GAMMA CALCULATOR AND BRANCH ON TITRATION TYPE 00117 GO TO 1125, 125, 119, 1191, NTYPE9 WWD1428 WWD1429 WWD11t30 WWD1431 OBTAIN SCALED HYDROXIDE ACTIVITIES 00119 DO 123 I = 1, NCONT 00123 ACTSCLII + 11 • ACTSCLIII • OHACTI21 · TOTAL NF.GATIVE ION CONCENTRATION c 00000 FN = -HYDACTI21 I GHYORO - CNA + COH + CLION 00000 GO TO 131 WWD1432 WW01433 WW0l434 WWD1435 WW01436 WW01437 OBTAIN SCALED HYDROGEN ACTIVITIES 00125 DO 129 I = 1, NCONT 00129 ACTSCLII + 11 • ACTSCLIII • HYDACTI21 TOTAL POSITIVE ION CONCENTRATION c 00000 FN = HYDACTI2l I GHYDRO + CNA - COH - CLION WWD1438 WW()1439 WWD1440 WWD1441 WWD1442 c c c c c c c c 00131 c 00000 c c 00133 c c c 00135 c 00137 c SCALEC FN TIMES PROPER POWER OF ACTIVITY Y • FN • ACTSCLINCONT + 11 IF OUT OF RANGE, SCALE UP IF ACCUMULATOR OVERFLOW 161, 133 TRANSFER OUT TO CALCULATE PROPER MATRIX ELEMENTS FOR THIS POINT GO TO 1601, 10011, NACIDS RETURN FROM OBTAINING ELEMENTS, SET LOOP FOR NEXT POINT SINGLE ACID K • K + 1 WWD1444 WWD1445 WWD1446 WWD1447 WW01448 WW01449 TEST FOR LAST POINT USED. IF FINISHED, SOLVE MATRIX. IF IK - NOPTSl BOlt 801, 701 WW01451 RETURN FROM MATRIX SOLVE. OBTAIN DIFFERENCE FROM OLD ANSWERS 00139 SUM : 0. 00141 DO 143 I = 1, NCONl 00000 SUM= SUM+ ABSFIIRESULTIII - CKPRODIIII I RESULTIIII REPLACE OLD ANSWERS WITH NEW c 00143 CKPRODIII = RESULTIII 00000 CKIND11l : RESULTI11 00145 IF I NCON1 - 1 I 904, 151, 147 00147 DO 149 I = 2, NCONl 00149 CKINDIII "RESULTIII I RESULTII- 11 WWD1452 WWD1453 WWD1454 WWD1455 WWD1456 WWD1457 WW01458 WWD1459 WWD1460 WWD1461 c c c WRITE ANSWERS AND DIFFERENCE FROM PREVIOUS SET WWD1462 WWD1463 00151 WRITE OUTPUT TAPE 9, 72, ICKINDIII, I • 1, 4), SUM PUNCH 3~, ICKINDillo I • 1, 4), SUM TEST FOR END. IF ANSWERS SATISFACTORY, OBTAIN STANDARD DEVIATIONS c WWD1469 00000 MCOUNT • MCOUNT + 1 153 IF !SUM- ERROR • FLOATFINROWSII 6001, 6001, 155 c c ANSWERS NOT GOOD ENOUGH. REPEAT IF NOT TOO MANY ITERATIONS 00155 MSCALE = 0 00157 IF IMCOUNT - 101 107, 6001, 6001 c c SCALE UP WWD1467 WWD1468 WWD1470 WWD1471 WW01472 58 00161 00163 00000 00000 c c IF !MSCALE) 905, 163, 163 MSCALE • 1 SCFTR • SCFTR + 1. Gn TO 105 SCALE DOWN 00171 IF !MSCALEl 173, 173, 905 00173 MSCALE • -1 00000 SCFTR ,. SCFTR - 1. O:JrrJ O Gn TO 105 c c c c TWO ACID, NON-LINEAR LEAST SQUARE SOLUTION SET MEASURED VALUt 0100 1 FM!K) "' Y CALCULATE ELEMENTS FOR SIXTH CONSTANT, IF ANY c 100 3 IF !CKPRODI6)) 1005, 1009, 1C05 01005 DO lu07 I • 1, NCONl 00000 Z = I 00000 L = NCONT - 1 - I 01007 Ell+l0l=!IZ•CACI01+2.•CACI02-FNl•ACTSCLillliiGAMMAIIl•GAMMAI6ll 00000 El6l ,. 112. • CAC!D2- FN) • ACTSCLINCONT- lll I GAMMA(6) 00000 GO TO lOll CALCULATE ELEMENTS FOR FIFTH CONSTANT, IF ANY c 1009 IF ICKPRODI5)) 1011, 1015, lOll 01011 00 1013 I • lo NCONl 00000 l = I OOOuO L • NCONT - I 01013 Ell+6l = IIZ•CAC!Ul + CACID2- FNI•ACTSCLill IIIGAMMAIII•GAMMA(5)) 00000 El5) = IICACID2- FNl • ACTSCLINCONTll I GAMMAI5l CALCULATE ELEMENTS FOR FIRST ACID c 01015 DO 1017 I "' 1, NCONl 00000 l ,. I 00000 L • NCONT + 1 - I 01017 Elll = I l l • CACIDl- FNl • ACTSCLIL)l I GAMMAIIl c C OBTAIN DIFFERENTIAL ELEMENTS OF MATRIX 01019 IF ACCUMULATOR OVERFLOW 1021, 1021 01021 AR(K, ll = Elll + E(7) • CKPRODI5l + Ellll • CKPRODI6) 00000 AR'!K, 21 ,. El2l + E!Bl • CKPROD!5l + Ell2l • CKPROD(6) 00000 AR(K, 31 • El3l + El9) • CKPRODI5) + El13) • CKPR00(6) 00000 AR!K, 4) a El4l + EllOl • CKPRODI5l + Ell4) • CKPRODI6l 00000 AR!K, NCONl+ll = El5l + El7l • CKPROD!ll + El8l • CKPRODI2l 000001 + El9l • CKPROD!3) + EllOl • CKPROD!It) 00000 AR(K, NCON1+2) a E!6) + Ellll • CKPROD!1) + Ell2) • CKPRODI2) 000001 + Ell3l • CKPROD!3l + Elllt) • CKPROD!Itl CALCULATE FC C 01023 FC!Kl • CKPROD!ll•Eill+CKPRODI21•EI2)+CKPRODI3l•EI3)+CKPRODI1tl• 010231 El4l+CKPROD!51•EI51+CKPROOI6l•EI6)+CKPR001ll•EI71•CKPROD(5)+ 010232 CKPRODI2l•EIBI•CKPRODI5l+CKPRODI3l•EI9l•CKPRODI5l+CKPROD!Itl• 010233 EllOI•CKPR00!5l+CKPROD!ll•EI1ll•CKPRODI6l+CKPRODI2l•EI12)• 010234 CKPRCDI6l+CKPRODI3l•Eil3l•CKPRODI6)+CKPROD!Itl•EI11tl•CKPPOOI6) 00000 IF ACCUMULATOR OVERFLOW 161, 1025 C SET LOOP FOR NEXT POINT 01025 K " K + 1 TEST FOR LAST POINT USED C 01027 IF IK - NDPTS) 801, 801 1 1380 c c c MODIFIED AN E 208 PROGRAM 01380 DO 1430 J • 1, NUPTS Ollt30 DFIJl • FMIJl - FC!Jl WWD1473 WW01474 WW01475 WWD1476 WWD11t77 WWD1478 WW01479 WW0141l0 WW014B1 W10Dl4A2 WW0141!3 WWD1484 WWD14B5 WW01486 WWD1407 WW01488 WWD1490 WWD1491 WW01492 WW01493 WW0llt91t WWOl495 WWD1496 WWD149B WW01499 WW01500 WW01501 WWD1502 WWD1503 WWD1504 WWD1505 WWD1506 WW01507 WWD1508 WWD1509 WWD1510 WW015ll WWD1512 WWD1513 WW01514 WWD1515 WWD1516 WW01517 WWD1518 WW01519 WWD1520 WW01521 WWD1522 WW01523 WWD1524 WWD1525 WW01526 WWD1527 WW0152B WWD1529 WWD1530 WWD1532 WW01533 WWOl534 ., .. 59 c TESTING SWITCH FOR OPTIONAL OUTPUT 01450 IF !SENSE SWITCH 31 1460, 1490 01460 no 1480 J = 1, ~OPTS 01480 WRITE OUTPUT TAPE 9, 74, IARIJ,KI,K • 1, NCONTit DFIJI c c CALCULATE DO 1520 l = 1, NCUNT Rllt 11 "O. DO 1520 J a 1, NDPTS R(L, 11 a Rllo 11 + ARIJ, ll • DFIJI DO 1570 l = 1, NCONT DO 1570 K " 1, NCONT Gilt Kl "' O. no 1570 J "' 1, NDPTS GIL,KI = GIL, Kl + ARIJ, ll • ARIJ, Kl IF ACCUMULATOR OVERFLOW 161, 1580 TEST SWITCH FOR R AND G OPTIONAL OUTPUT c 01580 IF !SENSE SWITCH 41 1590, 1600 01590 WRITE OUTPUT TAP~ 9, 74, IIGIL,KI, K•1,NCONTI, Rlloll, L•1oNCONTI 01490 01500 01510 01520 01530 01540 01550 01560 01570 00000 c c c 01600 01610 01615 01617 00000 00000 00000 01619 00000 c c _IF G Y =R, THEN MATINV RETURNS WITH R REPLACED BY Y AND G REPLACED BY G INVERSE f"M " 1 CALL MATINV IG, NCONT, R, MM, DETERMI GO TO 11620, 911, 16171, NTYPE1 CKINDill ,. ACIDl CKINDI21 " ACID2 Q 1 .. 0. DO 1619 J = 1, NDPTS 01 "' 01 + IDFIJI •• 2.1 GO TO 1760 WW01536 WW01537 wwrH538 WWD1539 WWD1540 WWD1541 WWD1542 WWD1543 WWD1544 WWD1545 WWD1546 WWD1547 wwrH548 WWD1549 WWD1551 WWD1552 WWD1553 WWD155't WWD1555 WWD1556 WWD1557 WWD1558 WWD1559 WWD1560 WWD1561 WWD1562 WWD1563 CHECK THE FIT 01620 01 .. o. 01625 DO 1630 J = 1, NDPTS 01630 01 = Ql + IDFIJI •• 2.1 IF ACCUMULATOR OVERFLOW 161, 1635 01635 Q "' A~SFIOOD- 011 01640 QOD = Q1 01645 LLD = LLD + 1 MCLLD • MCLLD + 1 IF FIT IS NOT GOOD ENOUGH, REPEAT IF NO. OF ITERATIONS IS c NOT TOO LARGE. CKPRODIJI CORRECTED IN ANY CASE c 1650 DO 1653 J • 1, NCONl 1653 CKPRODIJI • CKPRODIJI + RIJ,ll IF INCON21 911, 1660, 1655 1655 no 1659 J • 1, NCON2 1657 JJ • J + NCON1 1659 CKPRODIJ + 41 • CKPRODIJ + 41 + R(JJ, 11 01660 IF IQ - ERQDI 1680, 1680, 1665 01665 IF ILLO- NIDI 1670, 1680, l760 C TEST SWITCH FOR Y AND G INVERSE, OPTIONAL OUTPUT 01670 IF !SENSE SWITCH 41 1675, 1677 01675 WRITE OUTPUT TAPE 9, 74, II GIL,KJ, K • lt NCONTI, Rllt lie 1 l • 1, NCONTI, ICKPRODIL21t L2 • lt 61, 01 01677 GO TO 107 WWD1564 WWD1565 WWD1566 WWD1567 REPLACE DISSOCIATION CONSTANTS AND TEST FOR CLOSENESS, RECORRECT FOR ACTIVITY AND REITERATE IF NECESSARY 01680 SUM • O. 01685 RESULTI11 • CKPRODI1l 01690 IF INCON1 - 21 1705, 1695, 1695 WWD1582 WW01583 WW01584 WWD1585 WWD1586 c c c WWD1568 WWD1569 WW01570 WWD1571 WWD1572 WWD1575 WWD1576 WWD1578 WWD1579 WW01581 60 01135 01740 01745 01750 DO 1700 I a 2, NCON1 RESULTIII • CKPRODIII I CKPRODII- 11 IF INCON2- 11 1720, 1715, 1110 RESULTI61 • CKPRODI61 I CKPROOI51 RESULTI51 = CKPR00(51 DO 1130 I = 1, 6 IF (CKINOIIll 914,1130,1725 SUM= SUM+ ABSFIIRESULTIII- CKINDIIII I CKINOIIII CKINOIII = RESULTIII CONTINUE WRITE OUTPUT TAPE 9, 97, ICKINOIIlo I • 1, 61, SUM PUNCH 30, ICKINDIII, I • 1, 61 IF ISUM- ERROR • FLOATFINCONTII 1760, 1760, l11t0 MSCALE "' 0 MCOUNT = MCOUNT + 1 IF IMCOUNT- 101 107, 1760, 1760 01760 01765 01770 01775 01780 CALCULATE DO 1770 J DO 1770 K UIJ, Kl = DO 1780 L U(L, Ll 01695 01700 01705 1710 1715 01720 0172 5 1727 1130 00000 c c c WW01592 WW01593 WW0159 THE CORRELATION MATRIX = 1, NCONT = 1, NCONT GIJ , Kl I SCRTFI GIJ, Jl • G(K, Kl ) = 1, NCONT SCRTFI GIL, Ll • Q1 I FLOATFINDPTS - NCONT - 11 l C WRITE FINAL RESULTS 01785 WRITE OUTPUT TAPE 9, 76, 01790 WRITE OUTPUT TAPE 9, 78 01795 WRITE OUTPUT TAPE 9, 80, 01800 WRITE OUTPUT TAPE 9, 82 01810 00 1820 L a 1, NCONT 01820 WRITE OUTPUT TAPE 9, 84, 01830 WRITE OUTPUT TAPE 9, 86 01840 WRITE OUTPUT TAPE 9, 88, 018401 FMIJI, FCIJl, OFIJI, J 00000 GO TO 401 c c c c WWD1587 WWD1588 WWD1589 Q1, MCLLD, ACTSCLI11 IJ, CKINDIJI, U(J,J), J • 1, 6) (U(L,Kl, K = 1, NCONTI ITNTMLIJI, PHIJI, CMU(J), ACTCFHIJI, NDPTSI = 1, SUBMASTER PROGRAM FOR CALCULATION OF TITRATION CURVE READ LIMITS OF PH AND STEPPING INTERVAL 00201 READ 90, PHLOWR, PHUPPR, PHSTEP WRITE OUTPUT TAPE 9, 91 c INITIAL CONDITIONS 00000 K = 1 00000 CMUI1 I • GMU 00000 TNTML I 1 l = 0. 00000 PH I 11 • PHLOWR c c SCALING FACTOR 00203 ACTSCLI11 = l.OE30 IF TWO ACIDS, MOVE CONSTANTS OVER TO MAKE THEM CONSECUTIVE c 00205 GO TO 1801, 2071, NACIDS 00207 DO 209 I a 1, NCON2 00000 M • NCON 1 + I 00209 CKPROOIMI • CKPRODII + ltl c c 00000 c c 00211 c c WW01596 WW01597 WW01598 WWD1599 WW01600 WWD1601 WW01602 WW01603 WWD1601t WWfH605 WWD1606 WWD1609 WWD1610 WWD16ll WWD1612 WW01613 WW01611t WWD1615 WWD1616 WWD1617 WWD1618 WWD1620 WW01621 WWD1622 WWD1623 WWD1621t WWD1625 WWD1626 WWD1627 WWD1628 WWD1629 WWD1631 WWD1632 WW01633 GO TO ACTIVITY CORRECTION SECTION GO TO 801 WWD1631t RETURN AND TRANSFER ACCORDING TO TYPE OF TITRATION GO TO 1217, 217, 213, 2131, NTYPE9 WWD1635 TITRATIONS OF BASE WW01636 61 00 213 DO 215 I ., 1, 4 00215 ACTSCLII + 1 I • ACTSCLIII • OHACTI21 00000 GO TO 221 WW01631 WW01638 WW01639 TITRATIONS OF ACID 00217 DO 21c; I = 1, 4 00219 AC TSCLI I + 11 • ACTSCLI I I • HYOACTI21 WW0l640 WWDl641 WWD1642 WWD1643 c c c c 00221 00000 00223 00225 00227 00000 00000 00229 c c 00231 c c OBTAI~ ELEMENTS OF EQUATION DO 223 I • 1r NCONl WWDl645 WWD1646 WWD1647 EIII = IHAIONI11 • Z • ACTSCLI111 I CGAMMAIII • ACTSCLIJ + 111 WW01648 GO TO 1231, 2271, NACIDS WWD1649 DO 229 I = 1, NCON2 WWOl650 Z • I WW0l65l L = NCON1 + I EILI = IHAIONI61 • Z • ACTSCLI111 I IGAMMAII + 41 • ACTSCLII + 111WW01652 Z • I TRANSFER ACCORDING TO TYPE OF TITRATION GO TO 1245, 241, 237, 2331, NTYPE9 WWD1653 00233 00000 00235 00000 00000 TYPE 4 TITRATION, SALT OF BASE WITH BASE RQDNA = -HYOACTI21 I GHYDRO + COH + CLION DO 235 I = 1r NCONT RQONA = RQONA- IEIII • CKPROOIIII CMLTNT = IRQONA - CNAI • IVOLTL I BASENI GO TO 249 00237 00000 00239 00000 00000 TYPE 3 TITRATION, BASE WITH ACID TYPE 3 TITRATION RQOCL • HYOACTI21 I GHYORO - COH DO 239 I = lr NCONT RQDCL • RQDCL + IEIII • CKPRODIIII CMLTNT • IRQOCL - CLIONI • IVOLTL I BASENI GO TO 249 WW01660 WWD1661 WWDl662 WWD1663 WWD1664 WWD1665 00241 00000 00243 00000 00000 TYPE 2 TITRATION, SALT OF ACID WITH ACID TYPE 2 TITRATION RQDCL • HYOACTI21 I GHYDRO + CNA - COH DO 243 I • 1r NCONT RQDCL • RQDCL- IEIII • CKPRODIIII CMLTNT = IRQDCL- CLIONI • IVOLTL I BASENI GO TO 249 WWD1666 WWD1667 WWD1668 WW01669 WW01670 WWD161l TYPE 1 TITRATION, ACID WITH BASE TYPE 1 TITRATION RQONA • COH - HYDACTI21 I GHYDRO DO 247 I = lr NCONT RQDNA • RQDNA + IEIII • CKPROOIIII CMLTNT • IRQDNA- CNAI • IVOLTL I BASENI CONTINUF WWD1672 WW01613 WW01674 WWD1675 WWD1675A WWD1675B c c c c c c c c c 00245 00000 00247 c c 249 ADD TITRANT AND TEST FOR LIMIT 00251 TNTML Ill • TNTML Ill + CML TNT IF IICMLTNT •• 2.1- 1.0E-61 255, 255, 253 OPTIONAL OUTPUT c 253 IF !SENSE SWITCH 21 254, 803 254 wRITE OUTPUT TAPE 9, 92, TNTMLillr PHil), CMUillt GHYDRO GO TO 803 00255 WRITE OUTPUT TAPE 9, 92, TNTMLillt PHillt CMUillt GHYDRO c c DO NEXT POINT, If ANY LEFT WW01655 WW01656 WWD1657 WWD1658 · WWD1659 WW01676 WWD1677 WW01679 WWD1680 62 00257 PH(ll • PH(ll + PHSTEP 00259 IF IPH(1l- PHUPPRl 801, 801, 261 261 PUNCH 92, TNTMLillr PHill, CMUill, GHYDRO GO TO 401 c c c c SUBMASTfR PROGRAM TO CALCULATE CONCENTRATIONS OF ACIDS WW0168l WW01761t GO TO READ IN TITRATION CURVE 00301 GO TO 501 WWD1766 WWD1767 WWD1768 RETURN FROM READ IN. 00303 NROWS • NACIDS 00000 NCOLMS • NROWS + 1 WW01769 WWD1770 WW01771 c c DETERMINE MATRIX SIZE c c SET ITERATION COUNTER AND INITIAL SUM 00000 MCOUNT ,. 0 00000 SUM • 1. c c 00305 00000 00000 00000 00307 c c CLEAR RESULTS AND ARRAY 00 307 I • 1, NROWS RESULTIIl • O. E I II • o. DO 307 J • 1, NCOLMS ARII, Jl • O. INITIALIZE LOOP 00309 K • 1 00000 GO TO 801 RETURN FROM GAMMA CALCULATOR AND BRANCH ON TITRATION TYPE c 00311 GO TO 1315, 315, 313, 313), NTYPE9 00313 FN • -1. 00000 GO TO 317 00315 FN • 1. 00317 Y • FN • (HYDACTI211GHYDRO + CNA - COH- CLIONI c c OBTAIN ELEMENTS OF MATRIX VNUM1 • O. DO 321 I • 1, NCON1 WWD1772 WWD1773 WWD1774 WWD1775 WWD1776 WWD1777 WWD1778 WWD1779 WW01780 WWD1781 WWD1782 WWD1783 WWD1784 WWD1785 WWD1786 WWD1787 WWD1788 WWD1789 VNUM1 • VNUM1 + l • FACTOR! I l Elll • VNUMl • VOLC I DENOMl GO TO I 328, 3251, NACIDS ELEMENTS FOR SECOND ACID VNUM2 "' 0. DO 327 I • 1, NCON2 l = I VNUM2 = VNUM2 + l • FACTORII + 4) El2l = VNUM2 • VOLC I DENOM2 WWD1791 WWD1792 WWD1793 WWD1791t WWD1795 WWD1796 WWD1797 WWD1798 WWD1799 WW01800 WW01801 WWD1802 SOLVE FOR ANSWERS OR ERRORS IF ISUM- 1.0E-6l 345, 345, 329 WW01803 WWD1801t BUILD MATRIX DO 333 L • 1, NROWS ARIL, NCOLMSl "' ARIL, NCOLMSI + Elll • Y DO 33 3 M = 1, L ARIL, Ml : AR(L, Ml + EILI • EIMl K "' K + 1 IF IK - NOPTSl 801, 801, 701 WWD1805 WWD1806 WW01807 WWD1808 WWD1809 WWD1810 WWD18ll RETURN FROM MATRIX SOLVE 00337 SUM • IIACIDl - RESULT( 111 I AClDll •• 2. WWD1812 WWD1813 00319 00000 00000 00321 00000 00323 c 0032 5 00000 00000 00327 00000 c c 00328 c c 00329 00000 00331 00333 00000 00335 c c l .. I 63 00000 00339 00341 00000 00343 c c ACID1 • RESULTI11 GO TO 1343, 341lr NACIDS SUM= SUM+ IIACID2 - RESULT(211 I ACID21 •• 2. ACID2 a RESULTI21 WRITE OUTPUT TAPE 9, 99, ACIDlt ACID2r SUM MCOUNT s MCOUNT + 1 IF IMCOUNT - 101 305, 344, 344 344 SUM • -1.0E+10 GO TO 309 DETERMINE STANDARD DEVIATIONS. OBTAIN DIFFERENTIAL ELEMENT$ 00345 FMIKI • Y 00000 ARIK, 11 "'El11 00000 AR(K, 21 • El21 00 00 0 FCIKI • Elll • CACID1 + El21 • CACID2 00000 K " K + 1 TEST FOR LAST POINT USEO c 00347 IF 1K - NbPTSI 801, 801 1 349 c c SET NUMBE~ OF UNKNOWNS FOR ERROR TREATMENT NCONT • NACIOS NID • 0 ERQD • 0. COD " o. PUNCH 99, ACID1r ACI02, SUM 00000 GO TO 1380 00349 00000 00000 00000 c c c 00501 00503 00505 00507 00509 00000 00511 00000 00513 00000 00515 c c 00517 c c WW01814 WWD1815 WW01il16 WW01817 WW01818 WWD1821 WW01822 WW01823 WW01i24 WW01825 WW01826 WW01827 WWD1828 WW01829 WW01830 WW01831 WWD1832 GO TO 1505, 505, 5071, NTYPE2 GO TO 1515, 515, 5131, NTYPE3 GO TO 1511, 511, 5091, NTYPE3 READ 93, TNTMLIII, PHIIJ, CMUIIlr ACTCFHIII GO TO 517 READ 94, TNTMLIII, PHIII, ACTCFHIII GO TO 517 READ 96, TNTMLIII, PHIII, CMUIII GO TO 517 READ ~8, TNTMLIII, PHIII WWD1833 WW01683 WWD1684 WWD1685 WWD1686 WWD1687 WWD1688 WWD1689 WWD1690 WW01691 WW01692 WWD1693 WWD1694 WWD1695 WWD1696 TEST FOR END AT PH OF ZERO IF IPHIIII 907, 521, 519 WWD1697 WWDl698 READ IN TITRATION CURVE I • 1 READ NEXT POINT 00519 I • I + 1 00000 GO TO 503 WWD1699 WW01700 WWD1701 COUNT NUMBER OF POINTS 00521 NDPTS • I - 1 00523 GO TO 1103, 401, 3031, NTYPEl WWD1702 · WWD17D3 c c c c c c c FORMATION OF MATRIX OBTAIN ELEMENTS OF EQUATION 0060 1 DO 605 I • 1, NCON1 00 000 l • I 00000 L • NCON1 + 1 - I 00603 Elll • llll • CACID11- FNI I GAMMA(II I • ACTSCL(LI IF OVERFLOW, SCALE UP 00000 IF ACCUMULATOR OVERFLOW 161, 605 c WWD1705 WWfH706 WWD1707 WWD1708 WWD1709 WWD1710 WWD1711 WW0l712 WWD17U 64 00605 CONTINUE c c BUILD MATRIX 00607 DO 615 L = 1, NROWS 00000 ARIL, NCOLMSI :a ARIL, NCOLMSI + Elll • Y IF OVERFLOW, SCALE UP c 00000 IF ACCUMULATOR OVERFLOW 161, 609 00609 00 615 M • 1, L 00000 ARIL, Ml :a ARIL, Ml + EILI • EIMI 00000 IF ACCUMULATOR OVERFLOW 613, 615 DETER~INE WHETHER TO SCALE UP OR DOWN c 00613 IF IAHSFIEILII- 1.01 161, 161, 171 00615 CONTINUE 00617 GO TO 135 c c c c SOLVt: MATRIX RESET TRIGGERS 00701 IF ACCUMULATOR OVERFLOW 703, 703 00703 J '" NROWS - 1 00705 !FIJI 912, 707, 711 IF ONLY ONE ROW, SOLVE DIRECTLY c 00707 RESULTill • ARI1 0 21 I ARil, 11 00709 GO TO 1139, 912, 3371, NTYPEl c c FILL OUT MATRIX 00711 DO 715 K • 2, NROWS 00000 M • K - 1 00713 DO 715 L = 1, M 00715 ARIL, Kl :a ARIK, Ll OPTIONAL OUTPUT c IF ISENSE SWITCH 51 716, 717 716 WRITE OUTPUT TAPE 9, 51t IIARIK,LI, L • 1, 51t K • 1, NROWSI c c 717 00000 00719 00000 00723 00000 00000 0072'5 00727 c 728 00729 00000 00000 00000 00731 00733 00000 00000 00000 00735 00737 00739 c c c SOLVE OY TRIANGULARIZATION 00 727 I = 1, J M• I + 1 DO 727 K :a M, NROwS FB = -ARII, II I ARIK, II 00 727 L = I, NCOLMS ARIK, Ll " FB • ARIK, L1 + ARII, Ll IF ACCUMULATOR OVERFLOW 725, 727 IF IFB - 1.01 161, 161, 171 CONTINUE OPTIONAL OUTPUT IF ISENSE SWITCH 51 728, 729 WRITE OUTPUT TAPE 9, 55, IIARIK,L), L • 1, 51, K • lt NROWSI DO 737 I :a 1, NROWS SUM ,. 0. K • I - 1 M • NCOL MS - I IF IKI 912, 737, 733 DO 735 L • 1, K N = NCOLMS - L SUM • SUM + RESULTINI • ARIM, Nl IF ACCUMULATOR OVERFLOW 161, 735 CONTINUE RESULTIMI :a I ARIM, NCOLMSI -SUM I ARIM, Ml GO TO 1139, 912, 3371, NTYPEl ACTIVITY CORRECTION SECTION. THIS SECTION CALCULATES ACTIVITY COEFFICIENTS, VOLUME CORRECTIONS, IONIC CONCENTRATIONS, IONIC WWD1714 WWD1715 WW01716 WWD1717 WW01718 WWD1719 WW01720 WW01721 WWD1722 WWD1723 WW01724 WW01725 WW01726 WWD1727 WWD1728 WW01729 WW01730 WW0173l WW01732 WW01733 WW01734 WWD1735 WWD1736 WWD1737 WW01738 WWD1139 WW01740 WW017't1 WW01 742 WWD1741t WW01 745 WW01746 WWOl 747 WWD1 748 WWOl 749 WW01750 WW01751 WW01752 WWD1753 WWD1754 WWD1755 WWD1756 WW01757 WWD1758 WW01759 WWD1760 WWD1761 WWD1762 WWD1763 WW01251 65 c c c c c 00801 c c STRENGTH, ETC. THE SUBSCRIPT IKI IS SET OUTSIDE THIS SECTION FOR THE POINT UNDER CONSIDERATION. OOTAIN HYDROGEN ION ACTIVITY OR CONCENTRATION AT THIS POINT HYDACTI21 z 10. •• 1-PHIKII RESET OVERFLOft TRIGGER 00000 IF ACCUMULATOR OVERFLOW 803, 803 c c c 00803 c c 00805 00000 00000 00000 00807 00000 c c 00809 00000 00000 00000 c c c 00811 00813 00000 00815 00000 00817 c c 00819 00000 00821 c c 00823 00825 00000 00827 c c c 00829 00831 00000 c c c 833 WWDl259 TRANSFER DEPENDING UPON WHETHER OR NOT ACTIVITY CORRECTIONS ARE TO OE MADE. GO TO 1809, 805, 809), NTYPE2 WWD1260 NO CORRECTIONS. ALL ACTIVITIES EQUAL ONE GHYDRO : 1. ACTCFI-IKI z 1. GOXIDE : 1. DO 8J7 I : 1, 6 GAMMA I II z 1. GO TO 835 WWD1261 WWD1262 WWD1263 WWD1264 WWD1265 WWD1266 WWIH267 WWD1268 WW01269 WWD1270 WWD127l WWD1272 WWD1273 WW01274 ACTIVITY COEFFICIENTS FOR HYDROGEN AND HYDROXIDE IONS WWD1275 IF HYDROGEN ACTIVITY READ IN, DO NOT CALCULATE WW01276 GO TO 1815, 903, 8131, NTYPE2 WW01277 GHYDRO : hCTCFHIKI WWD1278 GO TO 817 WWD1279 GHYORO = 10. •• IASRMU I 11. + 8SRMU • HIONSZI - BETAMUI WWD1280 ACTCF~IKI z GHYORO WW0128l GOXIDE : 10. •• IASRMU I 11. + BSRMU • 3.51 - BETAMUI WWD1282 WWD1283 ACTIVITY COEFFICIENTS FOR IONS OF FIRST ACID WWD1284 00 821 I : 1, NCON1 WW01285 l = I • I GAMMAIII : 10. •• IASRMU • l I 11. + 8SRHU • SlZION(Ill - BETAHUI WWD1286 WWD1287 WWD1288 ACTIVITY COEFFICIENTS FOR IONS OF SECOND ACID WW01289 GO TO 1829, 8251, NACIOS WWD1290 DO 827 I "' 1, NCON2 WW01291 Z " I • 1 GAMMAII+41 • lO.••IASRMU•Z I 11. + BSRMU • SIZ10NII+411- BETAMUI WWD1292 ACTIVITY CORRECTIONS MADE. 0-H FACTORS COMPUTED SRMU = SQRTFICMUIKII ASRMU = -DBHFA • SRMU 8SRMU = DOHFB • SRMU 8ETAML = OETADH • CMUIKI CORRECT VALUE OF HYDROGEN ACTIVITY FOR CALCULATING USE DEPENDING UPON TYPE OF PH MEASUREMENT MADE. GO TO (835, 833, 8311, NTYPE5 HYDACTI21 • HYDACTI21 I GHYDRO GO TO 835 HYDACTI21 • HYDACTI21 • GHYDRO VOLUME CORRECTION SECTION TEST FOR CONSTANT VOLUME 00835 GO TO 1839, 8371, NTYPE4 00837 VOLTL • SOLNV 00000 GO TO 841 c c WWD1254 WWD1255 WW01256 WWD1257 CALCULATE TOTAL VOLUME WWD1293 WWD1294 WWD1295 WWD1294 WWD1297 WWD1298 WWD1299 WWD1300 WWOUOl WWD1302 WWDU03 66 00839 VOLTL • SOLNV + TNTMLIKI c c 00841 c c HYDROXIDE ION CONCENTRATION COH = WCON I IHYDACTI21 • GOXIDEI WW01304 WWD1305 WWD1306 VOLUME CORRECTION FACTOR 00000 VOLC • SOLNV I VOLTL WWDl307 WW01308 CONCENTRATIONS OF ACIDS, CORRECTED 00000 CAC!Dl = A~ID1 • VOLC 00000 CACID2 • ACID2 • VOLC WW0l309 WWDlllO WWD13ll c c c c 00843 c c BRANCH ACCORDING TO TYPE OF TITRATION GO TO (867, 865 0 847, 8451, NTYPE9 SALT OF BASE TITRATED WITH BASE 00845 CNA = TNTMLIKI • BASEN I VOLTL OOOJO CLION = CACID2 + CACID1 oo rJ£) 0 GO TO 849 ( UASE TITRATED WITH ACID 00 - h 7 CNA = O. 000 00 CLION a TNTMLIKI • BASEN I VOLTL ( POWERS OF HYDROXIDE ION ACTIVITY 00849 OHACTI21 • WCON I HYOACTI21 00000 OHACTI3l • OHACTI21 • OHACTI21 00000 0HACTI4l = OHACTI31 • OHACTI21 ERROR STOP IF PH OUT OF RANGE c 00000 IF ACCUMULATOR OVERFLOW 910, 850 ( c c 00850 00851 00000 00000 00000 c 00000 00852 0085 3 c 00000 c 00000 00855 00857 c 00859 00000 00000 00861 00000 00000 00863 00000 c c ION CONCENTRATION CALCULATION SECTION IF QUOTIENT OVERFLOW 851, 851 OENOM1 = 1. DO 853 I a 1, NCON1 FACTORIII = CKPRODIII I IGAMMAIII • OHACTIII-I FACTORIIl • FACTORitl I OHACTI21 IF RESULT OUT OF RANGE, SET VALUE TO ZERO IF QUOTIENT OVERFLOW 852, 853 FACTOR(()= O. DENOM1: OENOM1 + FACTORIII CONCENTRATION OF UNIONIZED BASE NUMBER ONE HAlON( 11 " CACID1 I DENOM1 CONCE~TRATION OF IONIC SPECIES DO 855 I • 1o NCON1 HAIONII + 11 • HAIONI11 • FACTORIII GO TO 1885, 8591, NACIDS REPEAT ABOVE FOR SECOND BASE DENOM2 = 1. DO 861 I .. 1, NCON2 FACTORII+41 • CKPRODII + 41 I IGAMMAII + 41 • OHACTII + 111 DENOM2" OENOM2 + FACTORII + 41 HAIONI61 • CACID2 I OENOM2 DO 863 I = 1, NCON2 HAIONII + 61 • HAIONI61 • FACTOR(l + 41 GO TO 885 TITRATION OF ACID SALT WITH ACID 00865 CNA " CACID1 + CACID2 00000 CLION a TNTMLIKI • BASEN I VOLTL 00000 GO TO 869 ACID TITRATED WITH BASE c 00867 CNA • TNTMLIKI • BASEN I VOLTL WW01312 WWD1313 WWDl311t WWOl315 WWDl316 WWD1317 WWDl3l8 WWD1319 WWD1320 WWD1321 WWD1322 WWD1323 WWD1324 WWD1325 WWD1326 WW01327 WWD1328 WWD1329 WW01330 WWD1331 WWD1332 WWD1333 WWD1334 WWD1335 WWD1336 WWD1331 WW01338 WW01339 WWD1340 WW0134l WW01342 WW01343 WWDl344 WWD1345 WW01346 WW01347 WWD134B WW01349 WWD1350 WW01351 WW01352 WWDl353 WWD1354 WW01355 WW01356 WWD1357 WW01358 67 00000 CLION a O. POWERS OF HYDROGEN ION ACTIVITY 00669 HYOACTI31 • HYOACT!21 • HYOACTI21 00000 HYOACTI41 a HYDACTI31 • HYDACTI21 ERROR STOP IF PH OUT OF RANGE c 00000 IF ACCUMULATOR OVERFLOW 910, 870 ION CCNCENTRATION CALCULATION SECTION c 00670 IF QUOTIENT OVERFLOW 871, 871 00671 OENOM1 a 1. 00000 DO 873 1 ~ 1t NCON1 00000 FACTORIII • CKPRODIII I IGAMMAIII • HYOACTIIII 00000 FACTORIII • FACTORIII I HYDACTI21 IF RESULT OUT OF RANGE, SET VALUE TO ZERO c 00000 IF QUOTIENT OVERFLOW 872, 873 00872 FACTORIII • O. 00873 OENOM1 • DENOM1 + FACTORIII CONCENTRATION OF UNIONIZED ACID NUMBER ONE c 00000 HAIONI11 • CACID1 I OENOM1 c WWD1359 WW01360 WW01361 WWDl362 WWD1363 WW01364 WWD1365 WW01366 WWOU67 WWDU68 WW01369 CONCENTRATION OF IONIC SPECIES 00000 DO 675 I = 1, NCONl 00675 HAIONil + 11 z HAIONill • FACTORIII 00671 GO TO 1885, 8791, NACIDS REPEAT ABOVE FOR SECOND ACID c 00879 OENOM2 • l. 00000 00 681 I a 1, NCON2 00000 FACTORII + 41 • CKPROOII + 41 I IGAMMAII + 4) • HYOACTII + lll 00861 OENOM2: DENOM2 + FACTORII + 4) 00000 HAIONI6l z CACI02 I DENOM2 00000 DO 663 I = 1, NCON2 00883 HAIONII + 61 • HAIONI61 • FACTORII + It) WWD1370 WW0137l WWD1372 WW01373 WWD1371t WWD1375 WWD1376 WWD1377 WWD1378 WWD1379 WWD1380 WW0l381 WWD1382 WWD1383 WWD1384 WWD1385 WWD1386 WWD1387 TRANSFER OUT IF NO ACTIVITY CORRECTIONS 00865 GO TO 1887, 891, 887), NTYPE2 TRANSFER OUT IF IONIC STRENGTH CONSTANT OR GIVEN AT EACH POINT c 00887 GO TO 1889, 891, 8911, NTYP£3 WWD1388 WW01389 WWD1390 WWD1391 C COMPUTE 00889 CMUIKI a 006691 + 4. • 006692 + 4. • WWD1392 WWD1393 WW01391t WWD1395 c c c c c c c c c c c c TRANSFER OUT TO PROPER SECTION Of MAIN PROGRAM. OUTPUT OPTIONAL. 891 IF !SENSE SWITCH ll 893, 895 893 WRITE OUTPUT TAPE 9, 63, Kt HYOACTI2lt GHYORO, CMUIKit VOLCt l IHAIONIKS), KS • 1, 81 895 GO TO 1117, 211, 311), NTYPE1 06001 00000 00000 00000 00000 c c c NEW IONIC STRENGTH .5 • I HYDACTI211GHYORO + CNA + COH + CLION + HA10NI21 HAIONI31 + 9. • HAIONI41 + 16. • HA10NI51 + HAIONI71 HAIONI81 I + ICKN03 • VOLCI WWD1396 WW01831o ERROR CALCULATION FOR DISSOCIATION CONSTANTS WWD1835 MUST SPECIFY TWO ACIDS TO ENTER NON-LINEAR TREATMENT AND CALCULATE STAND~RD DEVIATIONS WWD1836 WWD1837 NACIDS = 2 WWD1838 NIO " 0 WWDl839 ERQD • 0. WWD181t0 COD • O. WW0181tl GO TO 107 ERROR STOPS 00901 WRITE OUTPUT TAPE 9, 9010 GO TO lt83 WWD1842 WW0181t3 WW01844 68 00902 WRITE OUTPUT TAPE 9, 9020 GO TO 487 00903 WRITE OUTPUT TAPE 9, 9030 PUNCH 9030 PRINT 9080 STOP 3333'3 00904 WRITE OUTPUT TAPE 9, 9040 WRITE OUTPUT TAPE 9, 97, ICKINDII2l, 12 • 1 , 6 l , SUM 00000 GO TO 401 00905 WRITE OUTPUT TAPE 9, 9050 00000 GO TO 401 00906 WRITE OUTPUT TAPE 9, 9060 00000 GO TO 401 00907 WRITE OUTPUT TAPE 9, 9070 GO TO 503 00909 WRITE OUTPUT TAPE 9, 9090 NTYPE1 • 2 GO TO 501 910 GO TO 1920, 920, 9301, NTYPE6 920 WRITE OUTPUT TAPE 9, 9010 NTYPE6 • 3 930 GO TO 1135, 401, 940), NTYPE1 940 K • K + 1 IF ISUM- l.OE-61 347, 347, 335 00911 WRITE OUTPUT TAPE 9, 9110 PUNCH 9110 PRINT 9080 STOP 33333 00912 WRITE OUTPUT TAPE 9, 9120 00000 GO TO 401 913 WRITE OUTPUT TAPE 9, 9020 GO TO 4919 914 WRITE OUTPUT TAPE 9, 9020 GO TO 1760 c WW01846 WW018411 WWD1850 WW01851 WWD1852 WWDlUJ WW011154 WWOU55 WWD1856 WWDl860 WW01864 WW01866 WWD1867 00008 FORMAT I 92H1DUNNING DISSOCIATION CONSTANT CALCULATOR, TITRATION CWWD1027 WWD1028 000081URVE CRAWER, ANO CONCENTRATION FINDER WWD1029 0001D FORMAT 172HO WWD1030 000101 WWD1031 00012 FORMAT I9I21 WWD1032 00014 FORMAT 144HOTHIS PROGRAM CALCULATES ACID CONCENTRATIONS) WWD1033 00016 FORMAT 142HOTHIS PROGRAM CALCULATES A TITRATION CURVEI WWD1034 00018 FORMAT 147HOTHIS PROGRAM CALCULATES DISSOCIATION CONSTANTS) WW01035 00020 FORMAT IF8.5, F10.5) 00022 FORMAT 148HOORIGINAL ESTIMATES OF ACID CONCENTRATIONS ARE F9.6, WWD1036 000221 8H AND F9.6, 8H MOLAR) WW01038 00024 FORMAT 135HOORIGINAL ACID CONCENTRATIONS ARE F9.6, 000241 8H AND F9.6, 8H MOLARI WW01040 00026 FORMAT IF1D.5, 3F1D.7, E9.2, F6.11 WWD1041 00028 FORMAT 125H INITIAL SOLUTION VOLUME F8.3, 19HML, TITRANT CONC. 000281F7.4, 23HN, EST. IONIC STRENGTH F6.3, 18HMOLAR, ADDED SALT F6.~, WW01042 WW01043 0002826HMOLAR,/ 32H DISSOCIATION CONSTANT OF WATER E9.2, WW01041t 00028328H, DESIRED CLOSENESS OF FIT F5.1, 16H PERCENT AVERAGE) WW01045 00030 FORMAT I6F.10.31 00032 FORMAT 147HOINITIAL VALUES OF DISSOCIATION CONSTANTS ARE 6Ell.~l WW01046 WW01047 00034 FORMAT 150HOINITIAL ESTIMATES OF DISSOCIATION CONSTANTS ARE WW01048 000341 6Ell.3l WW01049 00036 FORMAT 133HOND ACTIVITY CORRECTIONS ARE MADE l WWDlO!SO 00038 FORMAT IF4.1, 5F5.1l 40 FORMAT 125HOIDN SIZE PARAMETERS ARE 6F5.ll WW01052 00042 FORMAT I32HOIONIC STRENGTH IS CONSTANT AT F6.3, 6H MOLAR) WW01053 00044 FORMAT I25HOVOLUME IS CONSTANT AT F8.3, 3H MLI 69 WWD1054 FORMAT !12HOPWH IS USEDI WWD1055 FORMAT 112HOPCH IS USEOI WWD1056 FORMAT ll2HOPAH IS USEDI I FORMAT !50HOTHE FILLED OUT MATRIX, AFTER INSTRUCTION 715, IS 1 I 5E20.8 II WW01057 00052 FORMAT IF4.11 WWD1058 00054 FORMAT !23H HYDROGEN ION SIZE IS F4.ll 55 FORMAT (54HOTHE TRIANGULARIZED MATRIX, AFTER INSTRUCTION 727, IS I 1 I 5E20.8 II WWD1059 00056 FORMAT IF8.5, Fl0.51 WWD1060 00058 FORMAT !26H 0-H COEFFICIENTS ARE A• F8.5, 6H, 8• F8.51 WWD1061 00060 FORMAl !FB.51 VOLC HAIONill HAlO 61 FORMAT !ll9HO K HYOACT GHYDRO ION.ST. 1N!21 HAION(31 HAION(4) HAION!51 HAION!61 HAIONI71 HAIONIBI I WWD1062 00062 FORMAT !14H D-H BETA IS F8.51 63 FORMAT !lH 13, E11.2, F8.4, F9.5, F7.3, 8F10.61 WWD1063 00064 FORMAT (32HOSALT OF BASE TITRATED WITH BASEl WWD1064 00066 FORMAT (24HOBASE TITRATED WITH AClDI WWD1065 00068 FORMAT !32HOSALT OF ACID TITRATED WITH ACIDI 70 FORMAT !24HOACID TITRATED WITH BASEl WWD1067 4Ello3t 00072 FORMAT (29HODISSOCIATION CONSTANTS ARE WW01068 000721 ZOH SUM OF SQUARES • F8.51 WWD1069 00074 FORMAT !1HO 8El4.71 76 FORMAT (4H001zE16.8, 36H TOTAL NO. OF NON-LINEAR ITERATIONS• 14, 1 18H SCALING FACTORz EB.ll WWD1071 STANDARD DEVIATION 00078 FORMAT !42HO J FINAL CKINDIJI WWD1072 00080 FORMAT !lH 13, E13.4, E22.81 WWD1073 00082 FORMAT 126HOTHE CORRELATION MATRIX lSI WW01074 00084 FORMAT llH 10E11.31 00086 FORMAT !83HOTITRANT ML PH IONIC STRENGTH H ACT COEF. FMIMEAS.IWWD1075 000861 FC!CALC.I DIFFERENCE I WW01077 00088 FORMAT!1H F8.3, F7.2, F11.6, F14.4, El4.3, 2El2.31 WW01078 00090 FORMAT !F6.2, F10.2, F9.21 H ACT COEF.IWWD1079 91 FORMAT !54HCTlTRANT ML PH IONIC STRENGTH 92 FORMAT !1H F8.4, F12.3, Fl2.6, Fl9.41 WWD1081 00093 FORMAT !F7.3, F10.3, Fl2.6, F8.41 WWD1082 00094 FORMAT IF7.3, Fl0.3, F10.41 WWD1083 00096 FORMAT !F7.3, F10.3, Fl2.6 I WWD1084 6El1.3, 00097 FORMAT !29HOOlSSOCIATION CONSTANTS ARE WWD1085 000971 20H SUM OF SQUARES • FB.5 I WWD1086 00098 FORMAT !F7.3, F10.3) 99 FORMAT !9HOACID1 = F8.5, 13H M., ACID2 • F8.5, 1 22H M., SUM OF SQUARES • E11.41 09010 FORMAT 173HOACID NUMBER TWO HAS NEGATIVE CONCENTRATION. ASSUME ONL 1Y ONE ACID PRESENT) WWD1089 09020 FORMAT !30HOA CKIND OR CKPROD IS NEGATIVE I WWD1090 09030 FORMAT (22HOWRONG TRANSFER IN 800 I WW01091 09040 FORMAT !34HOFIRST ACID HAS NO DISC. CONSTANTS! WWD1092 09050 FORMAT !38HOATTEMPTED TO SCALE IN BOTH DIRECTIONS WWD1093 09060 FORMAT !35HOOVERFLOW IN GETTING SCALING FACTOR ) WWD1094 09070 FORMAT 126HOA NEGATIVE PH ENCOUNTERED I 9080 FORMAT 145H IMPOSSIBLE ERROR STOP. DISCONTINUE PROGRAM.) WWD1096 09090 FORMAT !20HOCKPROD OUT OF RANGE I WWD1097 09100 FORMAT 128HOPH OUT OF RANGE, 849 OR 869 WWD1098 09110 FORMAT 123HOWRONG TRANSFER IN 1600 I WWD1099 09120 FORMAT 122HOWRONG TRANSFER IN 700 I 00046 00048 00050 51
© Copyright 2025 Paperzz