^T °F

*<*

IMBS TECHNICAL NOTE 928

**&uro*

U.S. DEPARTMENT OF COMMERCE/ National Bureau of Standards
NATIONAL BUREAU OF STANDARDS

The National Bureau of Standards 1 was established by an act of Congress March 3, 1901. The Bureau's overall goal is to strengthen and advance the Nation's science and technology

and facilitate their effective application for public benefit. To this end, the Bureau conducts

research and provides: (1) a basis for the Nation's physical measurement system, (2) scientific and technological services for industry and government, (3) a technical basis for equity in trade, and (4) technical services to promote public safety. The Bureau consists of the Institute for Basic Standards, the Institute for Materials Research, the Institute for Applied Technology,

the Institute for Computer Sciences and Technology, and the Office for Information Programs.

THE INSTITUTE FOR BASIC STANDARDS provides the central basis within the United

States of a complete and consistent system of physical measurement; coordinates that system

with measurement systems of other nations; and furnishes essential services leading to accurate and uniform physical measurements throughout the Nation's scientific community, industry,

and commerce. The Institute consists of the Office of Measurement Services, the Office of Radiation Measurement and the following Center and divisions:

Applied Mathematics — Electricity — Mechanics — Heat — Optical Physics — Center

for Radiation Research: Nuclear Sciences; Applied Radiation — Laboratory Astrophysics 2 — Cryogenics - — Electromagnetics - — Time and Frequency ". THE INSTITUTE FOR MATERIALS RESEARCH conducts materials research leading to improved methods of measurement, standards, and data on the properties of well-characterized

materials needed by industry, commerce, educational institutions, and Government; provides

advisory and research services to other Government agencies; and develops, produces, and

distributes standard reference materials. The Institute consists of the Office of Standard

Reference Materials, the Office of Air and Water Measurement, and the following divisions:

Analytical Chemistry — Polymers — Metallurgy — Inorganic Materials — Reactor

Radiation — Physical Chemistry.

THE INSTITUTE FOR APPLIED TECHNOLOGY provides technical services to promote

the use of available technology and to facilitate technological innovation in industry and Government; cooperates with public and private organizations leading to the development of

technological standards (including mandatory safety standards), codes and methods of test; and provides technical advice and services to Government agencies upon request. The Insti- tute consists of the following divisions and Centers: Standards Application and Analysis — Electronic Technology — Center for Consumer

Product Technology: Product Systems Analysis; Product Engineering — Center for Building

Technology: Structures, Materials, and Life Safety; Building Environment; Technical Evaluation and Application — Center for Fire Research: Fire Science; Fire Safety Engineering.

THE INSTITUTE FOR COMPUTER SCIENCES AND TECHNOLOGY conducts research and provides technical services designed to aid Government agencies in improving cost effec- tiveness in the conduct of their programs through the selection, acquisition, and effective utilization of automatic data processing equipment; and serves as the principal focus within

the executive branch for the development of Federal standards for automatic data processing

equipment, techniques, and computer languages. The Institute consists of the following

divisions: Computer Services — Systems and Software — Computer Systems Engineering — Information Technology.

THE OFFICE FOR INFORMATION PROGRAMS promotes optimum dissemination and

accessibility of scientific information generated within NBS and other agencies of the Federal Government; promotes the development of the National Standard Reference Data System and

a system of information analysis centers dealing with the broader aspects of the National Measurement System; provides appropriate services to ensure that the NBS staff has optimum

accessibility to the scientific information of the world. The Office consists of the following

organizational units:

Office of Standard Reference Data — Office of Information Activities — Office of Technical

Publications — Library — Office of International Relations — Office of International Standards.

1 Headquarters and Laboratories at Gaithersburg, Maryland, unless otherwise noted; mailing address Washington, D.C. 20234.

- Located at Boulder. Colorado 80302.

JMfflffiifflMnmiWllTIWOT
lii of standards

t QkCc.

Computer Programs for the Evaluation of

Activity and Osmotic Coefficients

Bert R. Staples and Ralph L. Nuttall

Physical Chemistry Division

Institute for Materials Research

National Bureau of Standards

Washington, D.C. 20234

Sponsored by the

Office of Standard Reference Data

National Bureau of Standards Washington, D. C. 20234

^*HT OF ~ ?

z\

\

V) J

*<**AU Of

«'

U.S. DEPARTMENT OF COMMERCE, Elliot L. Richardson, Secretary

Edward 0. Vetter, Under Secretary

Dr. Betsy Ancker-Johnson, Assistant Secretary for Science and Technology ^ C NATIONAL BUREAU OF STANDARDS, Ernest Ambler, Acting Director

Issued December 1976
National Bureau of Standards Technical Note 928

Nat. Bur. Stand. (U.S.), Tech. Note 928, 56 pages (Dec. 1976) CODEN: NBTNAE

U.S. GOVERNMENT PRINTING OFFICE

WASHINGTON: 1976

For sale by the Superintendent of Documents, U.S. Government Printing Office, Washington, D.C. 20402

(Order by SD Catalog No. C13.46:928). Stock No. 003-003-01711-6 Price $1.10

(Add 25 percent additional for other than U.S. mailing).
CONTENTS

Page No.

1. Introduction 2

2. Fundamental Thermodynamic Relationships 4

3. Correlation of Experimental Data 5

4. Types of Data Sources 6

5. Experimental Methods Measuring the Activity of the

Solvent 7

5.1 Direct Vapor Pressure Measurements 7

5.1a. Program: 'VAPOR' 8

5.2 Isopiestic Equilibration 12

5.2a. Program: 'ISOPSTC' 12

6. Experimental Methods for Measuring the Activity of the

Solute 17

6.1 EMF Of Galvanic Cells without Liquid Junction .... 17

6.1a. Single-fluid cells 17

6.1b. Two-fluid cells 17

6.1c. Program: 'EMF' 18

6.2 EMF of Galvanic Cells with Transference 23

6.2a. Program: 'TRFNO' 24

7. Fitting the Data 30

7.1a. Program: 'EVALU' 30

8. Calculation of Tables of Phi and Gamma at Rounded

Molalities 39

8.1a Program: 'GAMPHI' . 39

9. Summary 47

10. References 48

iii
FOREWORD

The National Standard Reference Data System was established in

1963 for the purpose of promoting the critical evaluation and disseminatior.

of numerical data of the physical sciences. The program is coordinated

by the Office of Standard Reference Data of the National Bureau of

Standards, but involves the efforts of many groups in universities,

government laboratories, and private industry. The primary aim » of the

program is to provide compilations of critically evaluated physical and

chemical property data. These tables are published in the Journal of

Physioal and Chemioal Referenee Datas in the NSRDS-NBS series of the

National Bureau of Standards, and through other appropriate channels.

The task of critical evaluation involves careful analysis and

comparison of data retrieved from the scientific literature. Computer

programs are developed by NSRDS Data Centers when necessary to assist

in this analysis. Such programs are made available when they are felt

to be of value to the research community at large.

Further information on NSRDS and the publications which form the

primary output of the program may be obtained by writing to the

Office of Standard Reference Data, National Bureau of Standards,

Washington, DC 20234.

David R. Lide, Jr., Chief

Office of Standard Reference Data

IV
COMPUTER PROGRAMS FOR THE EVALUATION OF ACTIVITY AND OSMOTIC COEFFICIENTS

Bert R. Staples and Ralph L. Nut tall

ABSTRACT

A number of specialized computer programs have been developed

for the purposes of calculating thermodynamic properties directly

from experimental data and for subsequent data manipulation, including non- linear least-squares fitting of the data to empirical

or semi-empirical equations that describe the function over a range

of compositions, temperatures or other parameters. The details of

the programs used in the critical evaluation of mean activity and

osmotic coefficients and sample runs for each program are discussed.

Osmotic coefficients can be calculated from direct vapor pressure

measurements or from isopiestic molalities. Activity coefficients

can be calculated from electromotive force measurements of galvanic

cells, both without liquid-junction and with transference. A nonlinear least-squares program fits data from all sources as a function

of <f> and In y. Once the parameters of the fitting equation have

been obtained, another program can be used to calculate a table of ex

m, y, <{>, a , and AG at rounded molalities,

w

Keywords: Activity coefficients; aqueous; computer programs; data

evaluation; electrolytes; electromotive force; isopiestic method;

non- linear least squares; osmotic coefficients; thermodynamic

properties; vapor pressure.

1
1. Introduction

The Electrolyte Data Center at the National Bureau of Standards is

engaged in the critical evaluation of equilibrium thermodynamic properties of electrolyte solutions. A number of specialized computer programs have been developed for the purposes of calculating thermodynamic

properties from experimental data and for subsequent data manipulation,

including non-linear least-squares fitting of the data to empirical or

semi-empirical equations to describe the function over a range of compositions, temperatures or other parameters.

The computer programs form an essential part of the evaluation

scheme. The documentation of the operations involved in such critical

evaluations is desirable, in order to provide a set of tested programs

suitable for the reduction of experimental data and as a ready reference

for users of these programs.

This Technical Note presents the detailed equations involved in the

critical evaluation of mean activity and osmotic coefficients and the

details of programs which provide machine- calculation of these and

related properties. The programs are listed in the Extended BASIC

language and have been run on a time-shared CDC-6000 series system. In

some cases data are obtained from stored on-line files.

The programs described in this Technical Note calculate values for

the mean activity or osmotic coefficient from raw experimental data. The

program 'VAPOR' calculates the osmotic coefficient, <|>, from direct vapor

pressure measurements while $ is calculated from isopiestic molalities

by means of the program 'ISOPSTC'.
Activity coefficients, y , are calculated from emf measurements of

galvanic cells, both without liquid junction ('EMF') and with transference ('TRFNO*).

A non- linear least-squares program, 'EVALU 1 , fits data from all

sources as a function of molality <f> and In y . Once the parameters of

the fitting equation have been obtained, another program, 'GAMPHI', can

be used to calculate a table of m, y, , d>, a , and AG at rounded

+ w

molalities.

The most recent values of the fundamental constants [1] have been

utilized throughout this Technical Note. Other constants refer to water

at 298.15 K but are easily adapted to other temperatures or solvent systems.

Figures in brackets indicate the literature references on page 48.
2. Fundamental Thermodynamic Relationships

Fundamental electrolyte thermodynamic relationships have been

discussed in detail previously [2]. A summary is presented here.

The standard state is chosen such that the standard free energies

of the dissociated and undissociated molecules are the same. Then the

activity is given by

asalt

= a

2 = (a+

a

-

} " a

±

(1)

where v = v + v . (2)

o Then u

2 = y

2 + vRT ln a

+ ^

, 1/v , v+ v- v+ v-N l/v , IS where a

+ = a = (m m y y ) (4)

and taking a geometric mean of the ion activity coefficients

. v+ v-.l/v ft.\ Y

± = (y+

Y_ ) (5)

The mean ionic molality, m+

, is

m+ = m(v +

+ v_ -) (6) a

+ ^+ " ^ (7)

± m

±

The properties of electrolytic solutions are, in general, directly

related to the ionic strength of the solution, defined by:

I -1/2E z

2m. (8) m

1.11

where z is the ionic charge number, and the subscript m designates I on

the molality scale.

For a solution consisting of a single salt, m = v m and m_ = v_m,

where m is the molality of the salt added. For such a solution of a

pure salt, one then obtains

v+ v-.l/v m(v v_ ) \o)
3. Correlation of Experimental Data

To fit activity coefficient data over a range of composition the

equation

lny

- z,z A I 1 + - ' mm

1/2

2 3 + Cm + Dm + Em +

1 + B I 1/2

(9)

m

is used to correlate the experimental data.

The parameters B, C, D, E, etc. are empirical [2] . The osmotic

coefficient and excess Gibbs energy can be expressed in terms of the

same parameters by

<f> = 1 +

+ " m

[-(1 + B I 1/2

) + 2 In (1 + B I 1/2) + 1/(1 + B I 1/2

)]

B I

2 3 + lCm + 2Dm +3 Em +,.. (10)

and

,„ex „... \ z z A

AG = vmRT ) + - m

1 "

B

3 I

(2 - B I 1/2

)B I 1/2

- 2 In (1 + B 1 1/2

)

2 3 +lcm+lDm + 1 Em + (11)

where I is used to represent I . m
4. Types of Data Sources

Most determinations of activity and osmotic coefficients of an

electrolyte solution are based on these experimental techniques

(1) vapor pressure lowering

(2) Isopiestic or vapor pressure equilibration

(3) freezing point depression

(4) boiling point elevation

(5) electromotive forces (emfs) of galvanic cells without

liquid junction

(6) emfs of galvanic cells with transference

(7) diffusion

The first four measure the activity of the solvent and the last

three measure the activity of the solute.
5. Experimental Methods Measuring the Activity s of the Solvent

5.1 Direct Vapor Pressure Measurements

Direct measurement of the vapor pressure over a solution is a

method for determining the activity of the solvent. For the data using

the pure solvent as reference, the solvent activity, a.. , and the osmotic

coefficient of the salt, <j>, can be calculated for each experimental

point by

In a, = ln(P/P ) + BT (P-P ) (12)

1 O _T U

RT

and

- 1000 lna.

(13)

* = ^

X

where P is the pressure of the solvent vapor over the solution and P is

that over pure solvent. For water at 25 °C, we take P = 3168.6 Pa

o

(23.766,. Torr) [3], and B , the second virial coefficient for water

3 -1

vapor, -992 cm .mol ' from the Steam Tables [4]. Corrections for nonideality of water vapor are given by the second term on the right of

eq (12).

The program "VAPOR" was designed to perform the calculation of the

osmotic coefficients from data obtained from direct vapor pressure

measurements
5.1a. Program: VAPOR

General Description.

The program VAPOR, using the vapor pressure of the pure solvent,

P , and the measured vapor pressure of the solution, P, calculates the

activity of the solvent in the solution.'

The osmotic coefficient is then calculated using eq (13) . The

procedure is presented diagramatically in figure 1.

The program listing is presented in list 1. Notations and explanatory statements are indicated in lines beginning with "REM" (remarks). A sample run is presented as list 2.
C (TYPE OF DATA);

c = 0, if m, vp; c = 2, if m, log P/Pq

TITLE

N (NUMBER OF POINTS)

N1 (NUMBER OF IONS

PER MOLECULE)

V1 (VAPOR PRESSURE OF

PURE SOLVENT)

M (MOLALITY IN molkg 1 ), V (VAPOR PRESSURE IN TORR)

PRINT TABLE

m, aw, <p

Fig. 1. Flow Diagram for: 'VAPOR'
LIST 1 76/09/15. 14.42.44.

PROGRAM VAPOR 00100 REM: B. STAPLES X3632. PROGRAM BSVAPOR 00110 REM: VERSION 6-23-75. CADDS VP CORR. FOR NON-IDEAL H20)

00120 REM: CALCULATES ACTIVITIES AND OSMOTIC COEFFICIENTS FROM 00130 REM: VAPOR PRESSURE MEASUREMENTS. 00140 DIM MC 100).FC100). VC 100).PC 100).LC 100).AC 100)

00150 DIM PIC 100). Al C 100)

00160 REM: DATA BEGINS AT 1000// TYPE OF DATA. TI TLE. * POINTS. NU. 00170 REM: VP REF.CV1). THEN SETS OF M. PRESSURE EVERY 10 LINES. 00180 READ C 00190 PRINT

00200 PRINT

00210 READ AS 00220 REM: AS IS TITLE. C=2 IF DATA IN FORM OF MOLAL. LOGCP/P0).

00230 REM: V=VAP. PRESS. . F=ACTIVITY H20. P=PHI (OSMOTIC COEFF.)

00240 READ N.N1.V1

00250 PRINT " OSMOTIC COEFFICIENTS FROM VAPOR PRESSURE."

00260 PRINT " ========================================="

00270 PRINT

00280 PRINT

00290 PRINT AS 00300 PRINT

00310 PRINT " WITHOUT CORRECTION"

00320 PRINT" . WATER WATER" 00330 PRINT"MOLALITY ACTIVITY PHI ACTIVITY PHI" 00340 PRINT

00350 FOR 1=1 TO N 00360 IF C=2 THEN 00390

00370 READ MCI). VCI)

00380 GO TO 00410

00390 READ MCI). LCI)

00400 GO TO 00440

00410 FCI)=VCI)/V1

00420 L(I)=LOGCFCD)

00430 GO TO 00460

00440 LCI)=LCI)*LOGC 10)

00450 FCI)=10. tCLCI)/LOGC10))

00 460 PCI)=LCI)*C-55.S08/CN1*MCI) )) 00 470 P1CI) = C55. 508/CNl*MCI)))*C5.33464E-5*C VCD-VD)

00480 ACI)=LCI)-5.33464E-5*CVCI)-V1 ) 00490 Al CI)=EXPCACI))

00500 PRINT USING 00560. MC I ) ; Al C I

)

iPC I ) +P1 C I ) J FC I ) JPC I

)

00510 NEXT I 00520 PRINT

00530 PRINT

00540 PRINT"REF. VP CH20. 25 DEG.) = "VI 00550 : *.####* ».»999» #.0*41** *.#?*## f.f 00560: 9. **#** #. mount if. ##91 tt.aaintn f 9 . * # # 9 00570 : *.#**** t.mnnnt 00580 PRINT

00590 PRINT

00600 PRINT

00610 FOR 1=1 TO N 00620 PRINT FILECTAPE 1) USING 00 570. MC I ) J PC I ) +P1 C I

)

00630 NEXT I 00640 PRINT

00650 PRINT

1000 DATA 01010 DATA CACL2 PETIT C1965) VP 1020 DATA 13.3.23.7627

01030 DATA .25.23.480

01040 DATA .5.23.204

01050 DATA .75.22.791

01060 DATA 1.22.377

1070 DATA 1.5.21.460

01080 DATA 2.20.447

01090 DATA 2. 5. 19. 183 01100 DATA 3.17.815

01110 DATA 3.5.16.277

01120 DATA 4.14.814

01130 DATA 4.5.13.295

01140 DATA 5.11.836

01150 DATA 6.9.272

9999 END

10
List 2

RUN

76/05/04. 16.22

PROGRAM VAPOR

52

OSMOTIC COEFFICIENTS FROM VAPOR PRESSURE.

CACL2 PETIT (1965) VP

WITHOUT CORRECTION

WATER WATER

MOLALITY ACTIVITY PHI ACTIVITY PHI

.25000 .98812 .8847 .98810 .8858

.50000 .97652 .8793 .97649 .8804

.75000 .95916 1 .0287 .95911 1 .0300

1 .00000 .94176 1 .1 103 .94169 1.1117

1 .50000 .90321 1 .2558 .90310 1 .2573

2.00000 .8 60 62 1 .388 7 .8 60 47 1 .3903

2.50000 .80747 1 .5827 .80727 1 .58 45

3.00000 .7 499 4 1 .7748 .7 49 70 1 .7767

3.50000 .68 52 5 1 .9981 .68 498 2.0002

4.00000 .62371 2.1836 .62341 2.18 58

4.50000 .55980 2.38 55 .559 49 2.38 78

5.00000 .498 41 2.5768 .49809 2.5792

6.00000 .390 49 2.8998 .39019 2.9022

REF. VP (H20* 25 DEC) = 23.7627

SS 0.469 SECS

RUN COMPLETE.

11
5.2 Isopiestic Equilibration

In the isopiestic vapor equilibration method, a reference solution and

another solution are allowed to come to equilibrium through the vapor

phase, thus the activity of the solvent in the reference solution is

equal to the activity of the solvent in the solution being determined.

Analysis of each solution, after such equilibration, allows the determination

of a set of isopiestic molalities.

Since the activity of the solvent, a.. , is equal in each solution,

one can determine the osmotic coefficient, <J>, from eq (13) by

v m 4 /i / n =

r r

Y r , (14) vm where the subscript r denotes values for the reference salt used.

The program "ISOPSTC" was designed to perform the calculation of

4> from the isopiestic molalities determined experimentally.

5.2a. Program: ISOPSTC

General Description.

The program ISOPSTC, using the isopiestic molalities and the constants

of eq (10) for calculating <j> , calculates <f> by means of eq (14) . The procedure

is diagrammatically presented in figure 2. It should be noted that "ISOPSTC"

can be also incorporated in the more complex evaluation program "EVALU", discussed

later. A separate and self-contained listing is presented as list 3. List 4

illustrates a sample program run for "ISOPSTC". Table 1 gives the codes used to

designate each charge-type.

12
ENTER: / TITLE, B$

ENTER: CHARGE TYPE (U) (SEE TABLE 1),

AND NUMBER OF POINTS (N2)

ENTER: / REF. SALT (C$) AND ITS CHARGE TYPE (U1)

READ SETS OF ISOPIESTIC

MOLALITIES FROM DATA FILE OF PROGRAM

PRINT:

REF SALT AND CONSTANTS FOR REF.

CALCULATE FROM r IN eq (14)

PRINT TABLE OF mr, r, 0/0r

, m,

Fig. 2. Flow Diagram for : 'ISOPSTC*.

13
Table 1. Designation of Charge-Type Code

Charge-type Ionic Strength I z

4- z_ v Salt type

Selection code factor 1/m = [1 7 .v.z. 1 2 i

1 1

2 3

3 6

4 10

5 4

6 15

7 12

8 9

9 42

10 16

1 2 1-1

2 3 1-2; 2-1

3 4 1-3; 3-1

4 5 1-4; 4-1

4 2 2-2

6 5 2-3; 3-2

8 3 2-4; 4-2

9 2 3-3

12 7 3-4; 4-3

16 2 4-4

14
LIST 3. 76/09/15. 14.47.23. PROGRAM ISOPSTC

130100 REM*** PROGRAM TO CALCULATE OSMOTIC COEFFICIENTS FROM 00110 REM; ISOPIESTIC MOLALITIES.

00120 REM: VERSION 10-3-75. 00130 REM: ENTER CONSTANTS FOR REFERENCE SALT FOR HAMER-WU EQN.

00135 REM: AT LINE NO. 1000. 00140 REM: TAPE1 IS THE DATA FILE OF ISOPIESTIC MOLALITIES

00150 REM: M REF. * M 'UNKNOWN' 00160 REM: U IS CHARGE TYPE* Nl IS THE NO. OF DATA POINTS. 00170 REM: CHARGE TYPE SPECIFIED ACCORDING TO TABLW 1 IN TEXT: 00180 REM: 1 (1:1 SALT)* 2 <2:l» 1:2)* 3 (3:1* 1:3)1 4 (4:1. 1:4)

00185 REM: ETC

00190 DIM Mt(300).M2(300)»Pl(300).P2(300)»P3(300)»Gl(300)»G2(300).G3(30ll)

00200 DIM D2(300).D4(300)»D5(300)»Y(300).X(300). W(300)

00210 DIM P9(300)

00220 REM: R(I)= IONIC STRENGTH* Q(I)= CHARGE OF CATION* AND

00230 REM: T(D= NU. THE TOTAL NO. OF IONS SALT PRODUCES.

00240 FOR 1=1 TO 10 00250 READ Rd).Q(I). Td)

00260 NEXT I 00270 A=. 51084 00280 A4=A*(LOG(10))

00290 PRINT

00300 PRINT" TITLE:"INPUT BS 00310 PRINT

00320 PRINT"ENTER CHARGE TYPE (SEE TABLE 1 IN TEXT) » NO. POINTS:"

00330 INPUT U.N1 00340 PRINT

00350 PRINT

00360 PRINT" REF. SALT* AND ITS CHARGE TYPE "INPUT C$» Ul 00370 FOR I=1T08 00380 READ Aid)

00390 NEXT I 00400 PRINT

00410 PRINT

00420 REM: Aid) ARE THE CONSTANTS FOR THE REFERENCE SALT IN EQN.

00430 REM: Ml* M2 ARE ISOPIESTIC MOLALITIES (M1=REF.)

00440 FOR I=1T0 Nl 00450 INPUT FILE(TAPEl) M1(I).M2(I)

00460 NEXT I 00 470A3=A4*Q(U1)*SQR(R(U1))

00480 Al (

1

>=A1(1)*SQR(R(U1>)

00490 PRINT

00500 PRINT" REFERENCE IS "» CS 00510 PRINT

00520 PRINT"CONSTANTS USED FOR REFERENCE:"

00530 PRINT

00540 FOR 1=1 T08 00550 PRINT Aid).

00560 NEXT I 00570 PRINT

00580 PRINT

00585 PRINT BS 00590 PRINT

00595 PRINT

00600 PRINT "Ml (REF)"."PHI1 (REF)"*" PHI /PHI (REF)"» " M2"."PHI"

00610 PRINT

00620 FOR I=1T0 Nl 00630 D1=SQR(M1 (I))

00640D3=1+A1( 1 )*D1 00 650 Pld)=l-A3*(D3-2*L0G(D3)-1/D3)/AK1) t3/MKI)

00660FORJ=2TO8

00 670 P1(1)=P1(I) + (LOG(10))*A1(J)*M1(I)»(J-1)*(J-1 )/J

00680NEXTJ

00 690 P2(I)=P1(I)*M1(I)*T(U1 )/M2(I)/T(U)

00700 P9(I)=P2(I)/P1(I)

00710 PRINT USING 00730, Ml ( I ) » P 1 ( I

)

>P9( I ) » M2( I

)

• P2( I

)

00715 PRINT FILE(TAPE2) M2(I)*P2(I)

00720 NEXTI 00730 '.99.9999 99.9999 9.09999 <)ii,>H)<ttt 99.999U

aenAti rem: output formats are specified by line beginning with " : ". 00750 PRINT

00760 PRINT

00770 REM: FIRST SET OF DATA ARE PROPER FACTORS FOR IONIC STRENGTH CALCN,

00780DATA1»1»2»3»2»3»6» 3i A, I'd, A, <h, A, Am 2, 1 5, 6, 5> 1 2, 8» 3. 9, 9, 2. 42. 1 2 ,7, 1 6, »I4 2- 1000 DATA 1.295. 7 . E- 5» 3.5990E-3. -1.94540E-4. 0.0.0.0

9999 END READY.

15
List A

GET*TAPE1=R0BSULP

READY.

RUN

76/05/04. 16.41.10.

PROGRAM ISOPSTC

TITLE: ? H2S04 ROBINSON

ENTER CHARGE TYPE (SEE TABLE 1 IN TEXT) » NO. POINTS

? 2, 10

REF. SALT* AND ITS CHARGE TYPE ? KCL* 1

REFERENCE IS KCL

CONSTANTS USED FOR REFERENCE:

1.295 •00007 .003

H2S04 ROBINSON

Ml (REF) PHI1 (REF) PHI/PHK

.2140 .9120 .73313

.2434 .9098 .73324

.388 5 .9028 .74106

. 4036 .9024 .74451

.5446 .8993 .75138

.6647 .8981 .7 59 70

.7268 .8977 .75993

.8200 .8976 .7698 4

.8702 .8976 .77434

.9245 .8978 .77938

-1 .94540E-4

M2

.1946

.2213

.349 5

.3614

.4832

.5833

.6376

.7101

.7492

.7908

PHI

.6686

.6671

.6691

.6718

.6757

.6823

.6822

.6910

.6951

.6997

SS 0.496 SECS.

RUN COMPLETE.

16
6. Experimental Methods for Measuring the Activity of the Solute

6.1 Electromotive Force of Galvanic Cells without Liquid-Junction

There are two types of cells without liquid junction:

A. Single fluid cells and B. Two-fluid cells.

6. la. Single-fluid cells

For the cells of the type

M(Hg) (£)|MX(m); AgX(s), Ag(s), (15)

using the expression in eq (6) to represent a , the emf can be expressed

by

E = E° - vRT In m+ y + nF

Hereafter y will be used to represent y +.

Substituting for m from eq (6) one then obtains

E = E° vRT In nF [(••-•••)

1/v

my

from which y may be calculated.

Using one molality as a reference, eq (16) can be rewritten as

E - E =

r vRT In my

nF (my).

where E is the emf of the cell at reference molality, m , and y is

r r r the reference activity coefficient at that molality.

6.1b. Two-fluid cells

A representative example of a two-fluid galvanic cell is

Ag(s), AgCl(s); MCI (m) M Hg(£) MCI (m )

; AgCl(s), Ag(s) 1 x "V ' r

(16)

(17)

(18)

(19)

The emf of this cell is

E = + VRT In mY

(my)

(20)

17
6.1c. Program: EMF

General Description

This program calculates mean activity coefficients, y , from emf

measurements without liquid- junction based on a reference molality and a

reference activity coefficient. Differences between the emf, E, at each

molality, and the emf, E , at the reference molality are computed and y

is derived from eqs (18, 20) in this manner. Data from one-fluid or

two- fluid cells can be used in this program. Corrections are applied to

the voltage measurements, if needed, to convert the emf from international volts to volts. The procedure used is presented as a flow

diagram in fig 3, and the program "EMF" is shown in list 5. List 6 is

a sample run for a single fluid cell and list 7 is a sample for a twofluid cell.

18
COUNTER, C (C = 1 IF ONLY ONE SET OF mr, 7r; C = IF MULTIPLE SETS OF mr, yt

)

CONSTANTS: R. T, N1, F R = GAS CONSTANT 8.31441 J- mol 1

, K ' T = THERMODYNAMIC TEMPERATURE. K

F = FARADAY CONSTANT, 96484.56 C • mol ' N1 = n, equiv • mol '

/

T' TLE /

Q1, Q2, VI, F9

01 = IF THERE IS NO CORRECTION TO ABSOLUTE VOLTS REQUIRED.

Q2 = if E° IS NOT USED. i.e. eq (18). VI = VALUE OF E° IN VOLTS.

F9 = v IN eq (16).

N = (NUMBER OF POINTS), Ml (m r

), G1(7r)

DATA IN FORM:

SET OF m (molality), E (emf) WHEN C = 1 (above). OR SETS OF m, E. mr

, E r, etc., WHEN C = 0.

NO

(USE E° OF CELL)

CALCULATE E' = E r - E

CALCULATE ln(mr yr)

E- 1.0003384

CALCULATE I \n~, FROM eq (18)

PRINT TABLE:

m, e, yly,, y

Fig. 3. Flow Diagram for : 'EMF'

19
LIST 5, 76/09/15. PROGRAM

1 4.35.54.

EMF 00100

001 10 00120 00130

00140

001 50 00160

00170

00180

00190 00200

00210

00220

00230 00240 00250

00260

00270

00280 00290

00300

00310 00320

00330

00340 00350

00360

00370

00380

00390 00400

00410

00420 00430

440 00450 00460 00470

00480 00490

00500 00510

00520 00530

00540

00550

00560

00570

00580 00590

00600

00610 00620

00630

00640

00650 00660

00670

00680

00690 00700

00710

00720 00730

00740

01000

01010 01020

01030

01040

1050 01060

01070 01080

1090

01 100 01110

1 120

01 130 99999

REM***B. STAPLES X3632

REM: VERSION 3-20-75.

REM: DATA BEGINS AT 1000// I DENTI FI ER. CONSTANTS. I DENTI FI ERS» REM: M» EMF COR MCREF). GAMCREDJ M. EMF) 1 PAIR PER LINE

REM: EVERY 10 LINE #S ••

REM***510 M» EMF ETC 1 DIM MC50).EC50)» GC50).LCS0>

DIM M1C50)»G1C50)

PR I NT" = = = = = = = = = = = = = = = = = = = = =

SET PER LINE. »AC50) EVERY 10 LINES $***

EMF CMEAS.) GAM/GAM*

EMF CMEAS. )"J

PRINT" CALCULATION OF ACTIVITY COEFFICIENTS FROM EMF DATA. PRINT

REM: IF ONE REF. M AND GAMMA I SET C=l REM: IF MORE THAN A SINGLE REF. M AND GAM . J SET C=0 READ C READ R.T.N1.F

READ AS PRINT AS PRINT

IF C=l THEN 00330 PRINT" REFERENCE REFERENCE" PRINT" MOLALITY GAMMA MOLALITY PRINT"CR> GAMMA"

GO TO 00350 PRINT" MOLALITY GAMMA LOGC GAMMA) PRINT" GAM/GAMCREF.)" PRINT

REM: Q1=0 (NO CORR. TO ABS. VOLTS)J Q2=0 CNO E 2ER0)» V1=E 2ER0 READ QI.Q2. VI. F9 READ N.M1.G1 K=R*T*CLOUC10))/CN1*F>

REM: PROPER FACTOR CF9) NEEDED ACCORDING TO CELL EQUATIONJ N1=NL) K=F9*K

FOR 1=1 TO N IF C=l THEN 00 450 READ M1.G1 READ MCI). ECU

IF Q1=0 THEN 03480 ECI)=ECI)*1. 0003384

IF Q2=0 THEN 00500 ECI)=V1-ECI)

S=LOGCMl*Gl)/LOGC 10) LCI)=CECI)/K) +S -LOGCMCI))/LOGC10)

GCI)=10tLC I) IF C=l THEN 00560 PRINT USING 00600. M 1 . Gl . MC I ) . EC I ) . GC I ) /Gl . GC I

)

GO TO 00570 PRINT USING 00590. MC I ) . GC I ) . L C I ) . EC I ) . GC I ) /Gl PRINT FILECTAPE1) MCD.GCI)

NEXT I

: ##.#*#### *#.#### -#.«#*«## -*. **#*** «.#***«

: *#.#*##*# *.*##* n.ntmmn -».#*##»* h.huh^h a.tttt REM: IF OUTPUT TAPE OF M. GAM. REQUIRED. AT END,OF RUN TYPE:

REM: SAVE.TAPE1=CFILE NAME) PRINT

PRINT

IF C=0 THEN 00 670 PRINT"REF. MOLALITY = "Ml" REF. GAMMA = "Gl PRINT

IF Qi=0 THEN 00700 PRINT " EMF CORRECTED TO ABS. VOLTS." PRINT" ======================================" PRINT

PRINT

REM: VALUES OF FUNDAMENTAL CONSTANTS FROM COHEN + TAYLOR.

REM: U. PHYS.CHEM. REFERENCE DATA. 2. 663 C1972). DATA i DATA 8.31441.298.15.2.96484.56

DATA CACL2 SCATCHARD+TEFFT C1930) DATA 1.0.0.3

DATA 9. . 10029. . 5214

DATA .009921. -.0761 DATA .010509. -.0742

DATA .02 59 4. -.0 439 DATA .02758. -.0412

DATA .041 13. -.02982

DATA .12634. .0078 DATA .4420.. 558 DATA .6589.. 0768

DATA .9301.. 0961

5

END

20
u.

UJ

<ro co r~ -. s> ^ o r*- co cs cvj<sf-oo^r-«ioc"»co

•tcocvjoj—

O

O

— CO

u

•l-l

LT>

«T U. n s • til o co q a:

CQ

in

to z

OS

<t s a: \ toO

(X

a.

h-

<aQ

U.

II

U

II

II z

II o

11 a:

II u.

11

11 to

II

H

11 z

11 UJ

II f«

11u

11 u.

u.

II Ul **.

II o

II o

II

II

II

II HH

II >

II t-l

II

H

II

U

II <t

II

II

II

II

II

II

u,ozo

-1

11 oo

COoH

U.U.

UJ+a

a:

<ixo

<£O

00

CM

-Ja

<xo

co

UJ

2:

u.z

UJs

2:<coo

t-t -J

<t-Jo

vOinm^Tscoo^co

CVJ<M—>

— CO®— CVJOO

— CMOCVJOOOOOOOO

—

\o *! co

— or-mvOvo

SOSSSQOQS I I

vO^"r-tr)Ln<TcvjQC0

oor-

— <soocor^'i:TcM oio^r^co — o ^ cm m s o — to r- •r vo COCOOOOCOOOCOvO

»-.«__0JC\JCMCM

— I I I I I I I I I

CM

— Qt^COcomvOS) -LnuisvovoncAiw

COCVlTUOooQQCOOO

t— r-v0vou">tnmto>o

cvjQ^ooco^cacacs) osioolo — cocao*-*

OQinr-^-vOcvjcocs

CS

— CVJCXJ-^W'TiOCO SQscata-^' voc>

CM

if)•

II

II II

ll <L II Z II S II <c II

II

ll • II u. II UJ II a: • II CO II H II -J » O II > II

II • II CM CO 11 <s CO ll <S> <t II •-• II • II H II

II

II

a 11 UJ II >« H 11 H 11 HH UJ ll _1 oc 11 <E ££ II _1 O II O O II £ II U. || • s

u. UJ UJK

CO

UJ

CO

«-* r~ • CO UJ • H

<ss UJ

-1

a.sz

CO r> CO a:

21
OLD,

FILE NAME: EMF

TAPE

01020

01030

01040

01050

01060

01070

01080

01090

01 100

011 10

01120

01130

011 40

01 1 50

NOR

"READY.

DATA

DATA

DATA

DATA

DATA

DATA

DATA

DATA

DATA

DATA

DATA

DATA

DATA

DATA

CACL2

1*0*0, 3

1 1* .0099* .73035

.0435* .04870

.0628* .06070

.0781* .06885

.0897* .06685

•1 41 1* .08940

•3069* .1 1735

.71 58* .1 5605

1 .2081* . 18289

1 .5378* .20232

1 .9833* .21 702

3.502* .30047

List 7

FOSBINDER (1929)

RUN

76/05/05.

PROGRAM

13.51 . EMF

57,

CALCULATION OF ACTIVITY COEFFICIENTS FROM EMF DATA.

CACL2 FOSBINDER (1929)

MOLALITY GAMMA LOGC GAMMA) EMF (MEAS.) GAM/GAI

.043500 .5884 -.230338 .04871 6 .80562

.062800 .5565 -.254535 .060721 .76196

.078100 .5529 -.257353 • 068873 .75704

.089700 .4570 -.3 400 40 .066873 .62 5 79

•141 100 .521 7 -.282573 .089430 .71 433

.306900 .49 55 -.30 49 68 .1 1 7390 .67842

.715800 .5801 -.236506 .1 56103 .79 42 6

1 .208100 .6898 -.161255 .182952 .94453

1 .537800 .8974 -.047022 .202388 1 .228 70

1 .983300 1 .0191 .008200 .217093 1 .39530

3.502000 5.0348 .701986 .300572 6.89375

EF. MOLALITY = .0099 REF. GAMMA = .73035

EMF CORRECTED TO ABS. VOLTS.

SS 0.446 SECS.

RUN COMPLETE.

22
6.2 Electromotive Force of Galvanic Cells With Transference

A cell with transference can be illustrated as

Ag(s), AgCl(s); MCl(m

r )|MCl(m); AgCl(s), Ag(s)

The emf of this cell is given bym

E = _ /'• vRT /. t+

d[ln (my)] (21)

nF m

r where t is the cation transference number.

The integration required is carried out in the program 'TRFNO' by means

of the following procedure. Since t usually varies only slightly as a

function of molality, following Robinson and Stokes (5] we define x by

the equation

7 = -' + x (22) + +

i Here t , is the transference number at a reference molality, m' , x will

t be only a small fraction of 1/t . Hence:

-d log (my) = ^ (p dE + xdE) (23)

where

k = vRT(£nlO)/nF (24)

This can be integrated between m and m' to give, since E = when

m = m'

:

m

xdE (24) log

(

Y^')

=

kt' + +k J

m

In this manner, the integral in eq (24) is quite small and can easily be

evaluated by graphical or numerical integration without introducing

inaccuracies in the activity coefficient.

23
6.2a. Program: TRFNO

General Description

The program 'TRFNO 1 , calculates the activity coefficient ratio

y/y > where y is the activity coefficient at the reference molality,

from the transference number and emf of cells with liquid-junction. The

procedure is diagrammatically shown in figure. 4. The program listing

(list 8) follows the flow diagram and a sample output is shown as list 9.

INPUT

'read title, a$

read molecular weight, w

read density parameters, do, d1, d2, d3

READ DATA IN SETS OF C, Emf: C,'l), E(l) READ PARAMETERS TO calc t+: AO, A1, A2, A3/

CONVERT c TO m

CORRECT emf TO VOLTS

CALCULATE t+ AT EACH m

INTEGRATE ROUTINE

DESCRIBED IN TEXT

CALCULATE RATIO 7/7,.

CALCULATE 7 FROM RATIO AND 7r

PRINT TABLE OF m, c, E. t+. ihr- y /

Fig. 4. Flow Diagram for : 'TRFNO'

24
List 8 LIST

76/05/05. 13.25.03.

PROGRAM TRFNO

10 REM PROGRAM NCCWT3 CALCULATES ACTIVITY COEFFICIENT RATIOS*

11 REM GAMMA/GAMMA(REF>* FROM DATA FROM MEASUREMENTS OF EMF OF

12 REM CONCENTRATION CELLS WITH TRANSFERENCE. FOR EXAMPLE:

13 REM AG-AGCL/CACL2(M(REF))//CACL2(M)/AGCL-AG CI)

14 REM AUXILIARY DATA NEEDED ARE TRANSFERENCE NUMBERS AND DENSITIES.

15 REM TRANSFERENCE NUMBERS ARE CALCULATED FROM AN EQUATION:

16 REM T(+)=K0+Kl*C».5+K2*C+K3*Ctl .5 C2>

17 REM IN WHICH C IS EQUIVELANTS PER LITER.

18 REM DENSITY IS CALCULATED FROM AN EQUATION:

19 REM D=D0+Dl*C+D2*Ct 1 .5 <3>

20 REM IN WHICH C IS MOLARITY* (MOLES/LITER).

21 REM DATA ARE GIVEN IN LINE 5000 AND FOLLOWING IN ORDER:

22 REM A $= TITLE

23 REM N5=NU IONS/MOLECULE.

24 REM N6=N EQUI VELANTA/MOLE

25 REM W=MOLECULAR MASS.

26 REM D0*D1*D2 ARE COEFFICIENTS IN DENSITY EQUATION (3).

27 REM N9 = NUMBER OF SETS OF DATA.

28 REM FOR EACH SET OF DATA:

29 REM AS(J) = TITLE OF DATA SET* J. 30 REM B$(J)=CONCENTRATION UNITS OF DATA SET J. C=MOLARI TY*M=MOLALIT

31 REM K(J) = UNITS OF EMF DATA. 1 = VOLTS*0= VOLTSC INTERNATI ONAL) . 32 REM N<J)=NUMBER OF POINTS IN DATA SET J.

33 REM Ml (J)=REFERENCE CONCENTRATION FOR DATA SET J. 34 REM M(I)*E<I)=N(J) PAIRS OF C0NCENTRATI ON-EMF DATA.

35 REM K0*K1*K2*K3 ARE COEFFICIENTS FOR TRANSFERENCE NUMBER EQ. (2).

100 DIM M(50)*C(50>* DC50)*M1<50)

102 DIMEC50)

110 DIM K(50)*LC50)*A(50)

112 DIM X1(50)*X2(50)*X3(50)*X(50)*Y(50)

114 DIM GK50)*G2(50)*G3<50)*G4(50)*G5<50)*G6<50>

120 READ AS

122 READ N5*N6

124 LET B=. 0256918359

125 LET B=B*N5/N6

126 LET B=l/B

130 READW

1 40 READ D0*D1*D2

1 50 LET NC0>=0

1 55 READN9

1 60 FOR J=l TO N9

1 65 READ AJCJ)

166 READ B$(J)

167 READ K(J)

1 70 READ N(J)

175 LET NCJ)=NCJ-1 )+NCJ)

180 READ Ml (J)

185 FOR I=N(J-1>+1 TO NCJ)

190 READ M(I)*ECI>

192 IF K(J)=0 THEN 195

193 LET ECI)=E(I)*1 .0003384

195 NEXT I 200 NEXT J 210 LET N=N(N9)

240 READ K0*K1*K2*K3

245 GOTO 275

25
2 50 FOR J=l TO N9 List 8 cont. 252 LET M1CJ)=M1CJ)*1 E-4

254 NEAT J

2 70 FOR 1= 1 TO N 271 LET MCI)=MCI)*lE-4

272 LET ECI)=ECI)*lE-3

273 LET ECI)=-ECI)

274 NEXT I 2 75 FOR J=l TO N9

278 IF BSCJ)="C" THEN 400

279 FOR I=NCJ-1)+1 TO NCJ)

280 LET M=M(I ) 290 GOSUB 1500

300 LET DCI)=D

310 LET CCI )=C

320 NEAT I 340 LET M=M1 (J)

350 GOSUB 1500

360 LET D1(J)=D

370 LET CI CJ)=C

380 GOTO 510

400 FOR I=NCJ-1)+1 TO N(J)

405 LET C(l )=MCI)

410 LET C=CCI)

420 GOSUB 2000

430 LET M(I)=M

440 LET DCI) = D 450 NEAT I 460 LET CI CJ)=Ml (J)

470 LET C=M1(J)

480 GOSUB 2000

490 LET Ml CJ)=M

500 LET Dl CJ)=D

510 NEAT J 515 GOTO 680

550 FOR J=l TO N9

560 FOR I=NCJ-l)+2 TO NCJ)

570 LET E(I)=E(I)+ECI-1

580 NEAT I 590 NEAT J 680 FOR 1=1 TO N 700 LET C=N6*C(I)

7 10 GOSUB 2200

720 LET KCI )=K

750 NEAT I 7 55 FOR J=l TO N9

760 LET C=N6*C1 CJ)

7 70 GOSUB 2200

780 LET Rl CJ)=K

8 10 NEAT J

8 55 FOR J=l TO N9

860 FOR I=NCJ-1)+1 TO NCJ)

862 IF MCI)<M1CJ) THEN 880

864 LET JCJ)=I

8 70 GOTO 890

880 NEAT I 890 NEAT J

9 60 FOR J=l TO N9

965 FOR I=NCJ-1)+1 TO NCJ)

970 LET ACI ) = 1 /KCD-1/R1 CJ)

975 NEAT I 980 NEAT J

26
98 5 FOR J=l TO N9

990 GOSUB 2500 List 8 cont. 1040 FOR I=N(J-1)+1 TO N<J)

1050 LET GUI >=LOG(Ml (J>/M(I >)-B*E< I )./Rl (J)-B*Y(I)

1060 LET G2(I)=EXPCG1(I) > 1070 NEXT I 1080 NEXT J

1230 PRINT"CONCENTRATION CELLS WITH TRANSFERENCE "JA$

1240 PRINT

1250 PRINTUSING 4010

1255 PRINT

1260 FOR J=l TO N9

1265 PRINTUSING4000,M1 CJ)*C1CJ)»" ">R1CJ>

1270 NEXT J

1272 PRINT

1275 PRINT

1278 FOR J=l TO N9

1280 FOR I=N(J-1)+1 TO NCJ)

1282 PRINTUSING 4000> M< I )# CC I

)

, EC I

)

#K( I) » Gl ( I ) * G2C I

)

1284 NEXT I 1286 PRINT

1288 NEXT J 1290 FOR 1= 1 TO N

1300 PRINT:NDTG: M(I)iG2(I)

1310 NEXT I 1320 RESTORE:NDTG:

1 490 GO TO 9999

1499 REM: SUBROUTINE 1500 TO 1560 CALCULATES C AND D FROM M.

1500 LET D=D0

1 510 LET D3=D

1520 LET C=M*D3/C1+W*M/1000)

1530 LET D=D0+Dl*C+D2*Ctl .5

1540 IF ABSCD-D3)<1 E-6 THEN1560

1 550 GO TO 1 510

1 560 RETURN

1999 REM: SUBROUTINE2000 TO 2020 CALCULATES M SND D FORM C 2000 LET D=D0 + D1*C+D2*CM .5

2010 LET M=C/CD-W*C/1000)

2020 RETURN

2199 REM: SUBROUTINE 2200 TO 2230 CALCULATES TRANSFERENCE NUMBERS.

2200 LET K=K0 + Kl*SQR(O+K2*C+K3*Ct 1 .5

2230 RETURN

2499 REM:SUBROUTINE 2500 TO 2580 CALCULATES INTEGRAL OF X DE

2500 LET N3=NCJ)

2510 LET N4=N(J-1 )+l

2520 LET P=J(J)

2530 GOSUB 3000

2580 RETURN

3000 LET Y<P)=X<P)*ECP)/2

3010 FOR Q=P+1 TO N3

3020 LET Y(Q)=Y(Q-1 )+(XCQ)+XCQ-l ))*(E(Q)-E(Q-l))/2

3030 NEXT Q

3040 LET YCP-1 )=X(P-1 )*E(P-1 )/2

3050 FOR Q=P-2 TO N4 STEP-1

3060 LET Y(Q)=YCQ+1 )+(X(Q)+X(Q+l ) )*(E(Q)-ECQ+1 ) )/2

3070 NEXT Q

3080 RETURN

4000:##. nnnnnn ##.####*# -#*.##**** #.#*#### -#.#*#*#$ ##.#4«*>im

4310: M - C E T LNCG/GR)) G/GCR)

27
List 8 cont.

5000 DATA CACL2 LUCASSE TRANSF. CELL 1925 1« 5005 DATA 3*2

5010 DATA 110.986

5020 DATA .99707* .0924*-. 00 42

5025 DATA 1 5030 DATA G1*M*0* 11

50 40 DATA 0.01

5045 DATA .01 547* •00601* .02006* .00974

5047 DATA .03955* .01898* .04966* .02198

5049 DATA .08053* .02841* .1612* .03683

5050 DATA .3208* .04600* .6162* .05487

5060 DATA 1 .013* .06264

5065 DATA 1 .600* .07164

5070 DATA 2.58 6* .08357

7120 DATA..4392*-. 1375* .1620*-. 1660

9999 END

28
CT\

CO

m

OJo

*"•

_J

-J

Ul r> in NO <nT NO t- CO o a: •nT S3 W^ — ON <r v^ CM 53 m S! r- ON • CO NO CO r~ <— S3 m

u. \ T r» r^

m OJ S3 10 o <T OJ S3 SJ S3 S3 2

<c

cmi-u cc r- CO CO ON OJ OJ CO CD CO NO s> *-* NO NO CO V 00 OJ CO NO o> in

<x CD NO CO r- in OJ in o v^ s> ON m r- t- OJ D 2 CO OJ in ON 00 mm

-J -J •1 •1 •OJi e OJ1 •CO1 • ini

OJ-1

©

m "NT CO s> CO o in m On •—•

nO NO

<r rM CO nO 00 ^ *"N o nt ON NO On nO ON co H> in «—i

<_i S3 S3 ON CO

ui OJ "NT nT ^r "sT CO CO o OJ 2 •«T•

UJ S) C2 S) S3 S> 53

u. mm ^J- CO CO •—*

CO co S3 r» ON ON "NT CO z NO ON 00 •-* CO NO

<t S3 5) «— OJ OJ CO

a: LU SJ SI S3 S3 S3 S3 H • • e • • • XH

t—i

:s • Os S3 •<T <T r- nO <T • CO CO NO oj ON S3 nO nO S3 CO

co _! o sT ON nT •q-

_ OJ o • _J On m On ON ON SI S3 UJ m UJ <s «* *•* CO \T CO NO co

CO o a SI S3 59 S3 Si S3

m

m • o • 53

CO s 2 ON • ** o • UJ • E-t H 53 bJ in <r S3 S3 S3 S3 S3 a S3 -J si K S3 t^ NO m O CO S3 CL. s £ H S3 nT 5> m nO m OJ s

in <n 2 S>

m S3 ON ON S3 •—» o

53 q: UJ

M •-* OJ CO •\T CO NO o a \ o o s: S3 S3 S3 S3 S3 s> mm z| -o o 2 • 2

Z)| P- o:

O CO

D

KJ Q. o co CC

29
7. Fitting the Data

7.1a. Program : EVALU

The program EVALU is a non- linear least squares fit of the data,

eqs (9,10). The program fits Y (either <j> or In y or both) as a function

of molality (eqs 9 or 10) for a set of experimental points.

Factors for different charge-type salts are read into the program

(see table 1) then the letters designating the parameters (B, C, D, etc)

for eqs- (9, 10) . The title is inputted via a conversational mode followed by the charge-type code (see table 1) the number of <|> data points,

Nl; the number of y points, N2, the number of parameters, L, and the

number of iterations, S.

The specified number of m, <f> data pairs, Nl are read from a file

(TAPE3) or can be read from within the program data statements if this

command is changed to a simple read statement. This read statement is

skipped if Nl = 0.

Next the number of m, y data pairs, N2, are read from a file (TAPE4)

This statement can also be modified to a simple read statement. This

read statement is skipped if N2 = 0. The program prints out the original

data before starting the calculations; it is recommended that these

print statements be deleted or by-passed to save time, particularly if

large data files are being read.

The initial estimates for each of the 8 parameters are read, any

except the first, B, may be zero. Then an alphanumeric statement 'TEST'

is read to insure that the proper data format has been followed up to

this point. Various terms of eq (11) are calculated, plus the deviations and the standard deviation. Then a fitting procedure is performed, the parameters are incremented, and the calculation of fit is

30
repeated for the specified number of iterations. Finally, a table of

m, Y (^ and/or In ^) and, AY is printed, along with two calculated

output files TAPE1: m, (j> (calculated) and TAPE2: m, V (calculated).

These output files may then be saved on line and used in future

calculations.

The flow diagram, figure 5, and listing, list 10, of the program

follow. An example of the output of EVALU is shown in list 11.

A warning that users should note is that errors may probably

result from putting this program on a computer with 32 or 36 bit

V

words instead of a CDC computer with 60 bit words, due to the matrix

inversion used.

31
READ P. PARAMETERS

FOR EQS (9.10)

B. C. D. E. F. G. H. I >

/ INPUT: TITLE /

/ INPUT CHARGE TYPE. NO OF o DATA

/POINTS. NO OF -, DATA POINTS. NUMBER OF/ PARAMETERS WANTED FOR EQUATION. /

NO OF ITERATIONS /

YES (CONTINUE. DATA STATEMENTS ARE OK)

CALCULATE AY I Y(expef) Y(calc)] V = 6 Of In y

CALCULATE a (std dm.) OF FIT

OUTPUT PRINT FILES

(TAPE 1) = m. © (TAPE 2) =m, > T

Fig. 5. Flow Diagram for

32

'EVALU'
List 10

LIST

76/05/04. 10.28.09.

PROGRAM EVALU

00100

001 10

00120

00130

001 40

00150

00160

00170

00180

00190

00200

00210

00220

00230

00240

00250

00260

00270

00280

00290

00300

00310

00320

00330

00340

00350

00360

00370

00380

00390

00400

00410

00420

00430

00440

00450

00460

00470

00480

00490

00500

00510

00520

00 530

00540

00550

00560

00570

REM*** B. STAPLES X3632. PROGRAM TO FIT PHI AND GAMMA DATA.

REM*** VERSION 1-28-75. DATA FROM FILES* AND INPUT SOME.

REM* TAPE3= PHI DATA FILE* TAPE4= GAMMA DATA FILE.

REM* UNCHARGE TYPE <H+)*N1=# PHI 'S* N2=# GAMMA'S*

REM* L=# PARAMETERS IN FIT EQN.*P=PHI DATA? = REM* P=0 NOCNOT PHI BUT ISOPIESTIC MOLALITIES: M1CREF.)*M2) P=l*

REM* IF DATA ARE IN FORM: M*PHI . DIM MK300)*M2C300)*P1 < 300) *P2< 300 )* P3C 300 ) * Gl C 300 )* G2C 300 ) * G3( 309)

DIM D2<300)*D4C300)*D5(300)*Y<300)*XC300)* W<300>

DIM P9C300)

FOR 1=1T0 10

READ R(I)*Q(I)*TU)

NEXT I FOR 1=1 T08

READ P$<I)

NEXT I A=. 51084

A4=A*CLOG(10))

PRINT

PRINT" TITLE: M INPUT B$

PRINT

PRINT" ENTER: CHARGEC2+) * #PHI* #GAMMA* ^PARAMETERS* #REI TERATIONS*

INPUT U*N1*N2*L*S

LET N=N1+N2

PRINT

PRINT

IF N1=0 THEN 00500

REMi INPUT M* PHI FROM DATA FILE (TAPE3)

FOR 1=1 TO Nl

LET U(I)=1

INPUT FILECTAPE3) M2(I)*P2<I)

NEXT I PRINT B$

PRINT

PRINT

PRINT " M"* " PHI"

FOR 1 = 1 TO Nl

PRINT M2U)* P2CI)

NEXT I PRINT

IF N2=0 THEN 00630

REM* INPUT M* GAMMA

F0RI=N1+1 TO N

INPUT FILECTAPE4) M2<I)*G2U)

WCI)=1

NEXT I PRINT B$

PRINT

FROM INPUT FILE (TAPE4)

33
List 10 cont. 00580 PRINT

00590 PRINT " M"*" GAMMA"

00600 F0RI=N1+1 TO N

00610 PRINT M2(I)»G2(I>.

00620 NEXT I 00630 PRINT

00 640 FOR 1=1 T08

00650 READ A2CI)

00660 NEXT I 00670 READ TS

00680 IF "TEST"=T$ THEN 00720

00690 PRINT" YOU MADE A BOO-BOO IN THE DATA INPUT STATEMENTS"

00700 STOP

00710 REM: CALCULATION OF VARIOUS TERMS OF EQN

00720 FOR I=1T0 N 00730 D2CI)=SQR(M2CI)*R(U>>

00740 NEXT I 00750 A3=A4*QCU>

00760 A5=A*Q(U>

00770 V=0

00780FORI=1TON

790D4CI )=1+A2( 1 >*D2CI>

00800D5(I )=D4(I)-2*L0G(D4CI ) )-l/D4(I ) 00810 NEXTI

00820 FOR 1=1 TO Nl

0830 Y(I>=1-A3*D5(I)/CA2C1 ) t 3*M2< I > *R< U)

>

00840FORJ=2TOL

008 50 YCI)=YCI>+A2<J)*M2CI) t < J1

)*< J- 1 > /J

008 60NEXTJ

00870X(I)=P2(I>-Y(I)

00880V=V+X(I ) t2

00890NEXTI

00900 F0RI=N1+1 TO N 00910 Y(I)=-A3*D2<I)/D4(I)

00920 FOR J=2T0L

00930 Y(I)= YCI )+A2(J)*M2(I )

t

(J-l ) 00940 NEXT J

00950 XCI)=L0GCG2(I))-YCI>

00960 V=V+XCI)t2

00970 NEXT I 00980 V2=V

00990 V=V/<N-L)

01000 V1=SQR<V)

01010 IFS=<0 THEN 01500

01020 PRINT

01030 REM: A2CI) ARE NEW PARAMETERS FOR FITTING EQN

01040FORI=1TOL

01050PRINTA2(I)>

01060NEXTI

01070PRINT

01080 PRINT V#V1

01090PRINT

01 100S=S-1

01110 REM: MATRIX CALCULATIONS FOR FIT

01 120MAT2 = 2ER(L-WL-1 )

1 130MATH=2ER(L-1*L-1>

01 1 40MATB=EER(L-1

)

01 1 50MATG=£ERCL-1>

34
List 10 cent.

011 60 FOR 1=1 TO Nl

01 1 70 F<

1

>=3*A3*D5CI>/(A2<1 ) t 4*M2< I ) *R< U> ) -A3*D2( I) /( A2C

1

)*D4(I> t2)

01 180FORJ=2TOL

01190F(J)=(J-1 >*M2(I)t(J-l )/J

01200 NEXT J

01210 GOSUB 01310

01220 NEXT I 01230 F0RI=N1+1 TO N

01240FO >=A3*D2(I) t2/D4CI>»2

01250 FOR J=2 TO L

01260 F(J)=M2<I) t(J-l ) 01270 NEXT J

01280 GOSUB 01 310

01290GO TO 01380

01300 REM: SUBROUTINE FOR CALCULATING NEW CONSTANTS OF FIT EQN

01310FORJ=0TOL-1

01320FORK=JTOL-1

01330H(J#K>=H<J*K)+F(J+1 ) *FCK+ 1 ) *W< I

)

01340NEXTK

01350G(J)=GCJ)+X(I)*FCJ+1)*W(I)

01360NEXTJ

01370 RETURN

01380NEXTI

01390FORJ=1TOL-1

01 400FORK=0TOJ-1

01410H(J#K>=HCK, J>

01420NEXTK

01 430NEXTJ

01 440MAT2=INV(H)

01450MATB=Z*G

01460FORI=1TOL

01470A2(I)=A2<I)+B(I-1 ) 01480NEXTI

01 490 GO TO 00770

01500FORI=1TON

01510 Gl CI) = -A3*D2(I)/D4U>

01520FORJ=2TOL

01 530G1CI>=G1CI)+A2(J)*M2(I> t(J-1)

01 540NEXTJ

01550 G3CI)=EXP(G1CI)>

01560 P3CI)=A-A3*D5(I)/A2<n t3/M2(I)/R(U)

01570 FOR J=2T0 L

01580 P3CI)=P3CI>+A2(J)*M2(I) t(J-l)*(J-l ) /

J

01590 NEXT J

0t600NEXTI

01 610 FOR 1=1 TO L

01620 El CX')-V*2CI-1« 1-1)

01630 E(I) = SQR(EKD)

01640 NEXT I 01650PRINT

01660 PRINT

01670 PRINT

01680 REM: OUTPUT FORMATTING AND PRINTING

01690 PRINT"STD DEV Y(OBSVD) Y=LN(GAMMA) AND/OR PHI"

01 700 PRINT VI

35
List 10 cont.

01710 PRINT

01720 PRINT"PARAMETER"*"STD DEV."

1730 FOR 1=1 TO L

01740 PRINT P$(I>" "JA2CI)#ECI>

01750 NEXT I 01760 PRINT

01770PRINT

01780 IF N2>0 THEN 01810

01790 PRINT B$

01800 PRINT

01810 PRINT

01820 IF N1=0 THEN 01910

01830 PRINT" MOLALITY"* " Y = PHI"*"DEL PHI"

01840 REM: PROVISION IS MADE FOR SAVING AN OUTPUT FILE "TAPE1" WHICH

01850 REM: CONTAINS M AND DELTA PHI (EXP-CALC)

01860 FOR 1=1 TO Nl

01870 PRINT FILE(TAPEl) USING 02000* M2CI)JX(I)

01880 PRINT USING 01890* M2( I > * Y<)*XC I ) 01890 : ###.###### -##.###### -##.*###

01900 NEXT I 01910 PRINT

01920 IF N2=0 THEN 020 30

01930 PRINT" MOLALITY"* "Y= LNC GAMMA)"* "DEL LNCGAMMA)"*" GAMMA"* "DEL frA*i«M" 1940 REM: PROVISION FOR SAVING AN OUTPUT FILE "TAPE2" WHICH

01950 REM: CONTAINS M AND DELTA GAMMA (EXP-CALC.)

01960 FORI=Nl+l TO N 01970 PRINT FILE<TAPE2) USING 02000*M2( I

)

i G3<

)-G2( I ) 01980 PRINT USING 0201 0*M2( I )# Y<

)*X( I )* G3( I )* G2C I

)

-G3( I

)

01990 NEXT I 02000 : #*#.##*### -#.#####

02010 : -###.*####* -##.#*#### -##.##### -###•##### -##.###*

02020 REM: OUTPUT FORMATS ARE SPECIFIED BY LINE BEGINNING WITH " : ".

02030 PRINT

02040 REM: 1ST DATA IS PROPER FACTORS FOR IONIC STRENGH CALCULATIONS

02050 REM* NEXT ARE INITIAL PARAMETERS* FOLLOWED BY "TEST" TO INSURE

02060 REM: PROPER INPUT FORMATS HAVE BEEN FOLLOWED.

02070DATA1* 1*2*3*2*3* 6*3* 4* 10* 4* 5* 4* 4*2* 15* 6* 5* 12*8*3*9*9*2* 42*12* 7* 1 6* ft,Z

02080 DATA B*C*D*E*F*G*H*I

02090 DATA 1.5*1*1*1*0*0*0*0

02100 DATA"TEST"

021 10 END

36
List U

GEJ* TAPE3= FINPHI1

READY.

GET* TAPE 4= FINGAM1

READY.

RUN

76/05/05. 13.41.22.

PROGRAM EVALU

TITLE: ? CACL2 PARTIAL DATA FIT FOR EXAMPLE.

ENTER! CHARGE<2+>* #PHI* #GAMMA* #PARAMETERS* #REI TERATIONS*

? 2* 10*10* 5* 3

CACL2 PARTIAL DATA FIT FOR EXAMPLE.

M PHI

.25 .88465

2 1 .388 66

2.5 1.58271

3 1.77477

3.5 1 .9981

4 2.18362

4.5 2.38549

5 2.57681

6 2.89981

1.985 1 .388 69

CACL2 PARTIAL DATA FIT FOR EXAMPLEM GAMMA

.03504 .60 4364

.0 629 4 .558764

.1032 .52389 4

.0435 .588386

.0628 .5565

.0781 .552901

.002 .847781

.005 .78 4028

.01 .723185

.02 .656759

1 .5 1 1 1 4032.95 63. 5055

1 .59738 .369807 6.93341E-2 -9.86412E-4 -5.80757E-4

1 .00885E-4 1 .00442E-•2

37
List 11 cont.

1.59788 .373576 6.76287E-2

1.00327E-4 1.00163E-2

-6. 4701 7E-4 -6.04453E-4

STD D'EV YCOBSVD)

1 .001 63E-2

Y=LNCGAMMA> AND/OR PHI

PARAMETER

B 1.59787

C .373585

D 6.76236E-2

E -6.45916E-4

F -6.04533E-4

STD DEV.

4.20983E-2

7.201 64E-2

4. 10491E-2

9.08279E-3

6.77734E-4

MOLALITY Y= PHI DEL PHI

.250000 .8 7 50 46 .0096

2.000000 1.395613 -.00 70

2.500000 1 .581887 .0008

3.000000 1.778835 -.0041

3. 500000 1.98231

6

.01 58

4.000000 2.187403 -.00 38

4.500000 2.388399 -.0029

5.000000 2.5788 58 -.0020

6.000000 2.898649 .0012

1 .985000 1 .390226 -.0015

MOLALITY Y= LNC GAMMA) DEL LNCGAMMA) GAMMA DEL GAMMA

.03 50 40 -.489265 -.01 431 .61308 -.00871

.0 629 40 -.579552 -.00248 .5601

5

-.00139

.103200 -.653642 .00718 .52015 .00375

.043500 -.522439 -.00793 .59307 - .00469

.062800 -.579209 -.00688 .56034 -.00384

.078100 -.612507 .01993 .54199 .01091

.002000 -.161 407 -.00373 .85095 -.0031

6

.005000 -.239096 -.00 421 .78734 -.00331

.010000 -.315398 -.00869 .729 50 -.00631

.020000 -.40 6649 -.01379 .66588 -.00912

SS 1 .660 SECS.

RUN COMPLETE.

38
8. Calculation of Tables of Phi and Gamma at Rounded Molalities

8.1a. Program: GAMPHI

General Description

The program GAMPHI, using the constants obtained for the fitting

equation in the evaluation procedure eq (11), calculates values for the

mean activity coefficient, the osmotic coefficient, the activity of the

solvent (HO) and the excess Gibbs energy at specified molalities or

prints a table at rounded molalities up to a maximum molality specified

by the user. The program is primarily a conversational program, where

the user is asked questions during the run, which directs the pathway

and output of the program.

The data inputs may all be easily converted to internal read

statements, if the conversational mode is not desired.

In all cases of input questions, a typed-in "YES" is a positive

input and anything else is assumed to be negative. If the input asked

for is a number, then a number must be entered, even if zero (e.g. the

number of points in a file and the maximum molality in the table).

Choices are made for the following courses of action, listed in the

order of their appearance in the program:

a. Charge type?

b. Single molality? 'YES' or 'NO'

c. Use data listed at line no. 1300? Input 'YES' or 'NO'

d. Input data from a file? Input 'YES' or 'NO'

(1) If so - enter number of data points. Input N

If none of the three choices are specified, the user is asked to input

the maximum molality for the table to be printed.

A table is printed from to the maximum molality at (a) 0.001.

mol'kg intervals to 0.1 mol'kg , then at (b) 0.01 mol-kg intervals

39
to 0.1 mol*kg , at (c) 0.1 mol'kg intervals to 2.0 mol'kg , and at

(d) every 0.5 mol'kg intervals thereafter. The program is listed as

list 12 and sample outputs are illustrated in lists 13, 14, 15, and 16.

READ

DATA

STOP

Fig. 6. Flow Diagram for : 'GAMPHI'.

40
List 12 LIST

76/05/05. 09.37.11.

PROGRAM GAMPHI

00100 REM* BRS VERSION 2-26-75. CALCULATES GAMMA AND PHI AT

00110 REM*SELECTED MOLALITIES OR PRINTS TABLE.

00120 REM: MODIFIED 10-2-75.

00130 REM: ENTER (8) CONSTANTS FOR HAMER-WU MODIF. EQN. AT LINE NO. 1200

03140 REM: INPUT DATA: SET OF MOLALITIES*

00150 REM: OUTPUT: M* GAMMA* PHI* ACTIVITY CH20)* EXCESS GIBBS ENERGY

00160 DIM G2<200}«G9(200)*A7(200);A9(200)

00170 DIM X(200)*G(200)#P(200)»G1(200)

00180READA*B

00190FORI=1TO10

00200READ Y<I)»2(I)*W(I)

00210NEXTI

00220 PRINT"CHARGE TYPE (LIST LINE NO. 1160 FOR EXPLANATION) =" INPUT V

00230 PRINT"SINGLE M" INPUT T$

00240 PRINT

00250 PRINT" USE SET OF MOLALITIES ENTERED AT LINE NO. 1300" INPUT S$

00260 IF "YES"=S$ THEN 00300

00270 PRINT " INPUT MOLALITIES FROM FILE" INPUT R$

00280 IF "YES"=R$ THEN 00300

00290 GOTO 00310

00300 PRINT" NO. OF POINTS" INPUT N 00310FORI=1TO8

00320READCCI)

00330NEXTI

00340 PRINT

00350 PRINT

00360 PRINT" CONSTANTS USED: "CC 1

)

I CC2) i CC 3) I C< 4) i CC 5) J CC 6) I C< 7) J C<8

)

00370 PRINT

00380 LET A=A*SQR(YCV>>

00390 LET CC1>=CC1)*SQR<YCV>>

00400 IF "YES"=R$ THEN 00660

00410 IF "YES"=T$ THEN 00630

00420 IF "YES"=S$ THEN 00660

00430 PRINT

00440 PRINT"MAXIMUM MOLALITY REQUIRED IN TABLE = " INPUT T 00450 PRINT

00460 PRINT

00470 PRINT" ***********

00480 N= 2*CT-2)+30

00490LETX(1)=.001

00500 FOR 1=2 TO 10

00510 X(I)=X<I-1 )+.001

00520 NEXT I 00530 FOR 1= 11 TO 19

00540 X(I)=X(I-1)+.01

00550 NEXT I 00560 FOR 1=20 TO 28

00570 X(I)=X(I-l)+.l

00580NEXTI

00590 FOR 1=29 TO N 00600LETX(I)=X(I-l)+.5

00610NEXTI

00620 GO TO 00660

00630 PRINT

41
List 12 cont. 00 640 PRINT" M =" INPUT XCJ.)

00650LETN=1

00660FORI=1TON

00670 IF "YES"=RS THEN 00700

00680 IF "YES"=S$ THEN 00720

00690 GO TO 00730

00700 INPUT FILECTAPE1) XCI)

00710 60 TO 00730

00720 READ XCI)

.

00730 LET M=X(I

)

00740LETQ=SQRCM>

00750LETD=1+CC 1 )*Q

760 Gl CI) = -CLOGC10>)*HCV)*A*Q/D

7 65 FOR J=2 TO 8

7 70 GHI)=Gl(I) + (LOG(10))*C(J)*Mt(J-n

775 NEXT J

00780 LET G<I>=EXP(G1(I)>

00790LET G2(I) = 1. + GKI)

00800LETL=LOG(D)

00810LETPCI >= 1-2. 30258 5*C2CV)*A/CC 1 ) r 3/M* ( D-2*L- 1 /D> ) 815 FOR J=2 TO 8

8 20 PCI)=PCI) + CLOGC10>>*CCJ)*MtCJ-l )*CJ-1 >/J

825 NEXT J

00850 A9(I)=PCI)*WCV)*M/55.5081

00860 A9CI)=EXPC-A9CI>>

008 70 G9C

I

>=WCV>*X CI >*8.31 441*298.1 5* C1-PCI>+L0GCGCI>>>

00880 NEXT I 00890PRINT

00900 IF "YES"=CS THEN 00950

00910 PRINT

00920 PRINT

00930 PRINT" MOLALITY"!" GAMMA";" PHI";"

00940 PRINT

00950 FOR 1=1 TO N

00960 IF X(I)>8 THEN 01000

00970 IF XCI)>3 THEN 01020

00980 PRINT USING 01130* XC I >* GC I >*PC I >* A9C I >* G9C I > 00990 GOTO 01030

01000 PRINT USING 01150* XC I >* G< I ) * PC I >* A9 C I >* G9 ( I

)

1010 GO TO 01030

01020 PRINT USING

1030 PRINT FILECTAPE2)

01040 NEXT I 01050 PRINT

01060 PRINT

01070 PRINT"ANOTHER M" INPUT

01080 IF "YES"=C$ THEN 00630

01090 DATA .5108 4* .328 66

01 100 DATA 1* 1*2* 3*2* 3* 6* 3* 4* 10* 4* 5* 4* 4*2* 1 5* 6* 5* 12*8* 3; nn.u»#H ##.#### #.$$#$$#

##.### ##.#### #.####

#tm.#it mt.mtu #.####

2.0442E-2* 5.7927E-3* -2.886E-4

A CH20)";" fceu 6(£X)"

011 40* XCI)*GCI)*PCI)*A9CI)*G9CI)

xci >;gci >;pci >; G9Ci>

C£

01130 : ##.###

01140 : ##.$##

01150 : ##.*##

1200 DATA 1.449 5* 1210 DATA

1290 REM:

1295 REM:

09999 END

9*2* 42* 12* 7* 16, [L

} 1.

0*0*0*0

START SET

DATA HERE

OF MOLALITIES AT

FOR NACL 3-2-76

LINE NO. 1300 -- IF DESIRED.

42
List 13

RUN

76/05/05. 09.47.09.

PROGRAM GAMPHI

CHARGE TYPE (SEE TABLE 1 IN TEXT) = ? 1 SINGLE M? YES "T

USE SET OF MOLALITIES ENTERED AT LINE NO. 1300 ? NO

INPUT MOLALITIES FROM FILE ? NO

*—

CONSTANTS USED: 1.4495 .020442 5.79270E-3 -2.88600E-4

M =? 1 .23456

MOLALITY GAMMA

1.235 .6548

PHI

.9 452

A (H20)

.958827

DEL G(EX)

-2256.

ANOTHER M ? NO

SS 0.517 SECS.

RUN COMPLETE.

43
List 14

ANOTHER EXAMPLE

1300 DATA 1.1*2.1*3.5*6.04

RUN

76/05/05. 09.54.56.

PROGRAM GAMPHI

CHARGE TYPE CSEE TABLE 1 IN TEXT) = ? 1 SINGLE M? NO —

USE SET OF MOLALITIES ENTERED AT LINE NO. 1300 ? YES

NO. OF POINTS? 4 —

CONSTANTS USED: 1.4495 .020442 5.79270E-3 -2.88600E-4

MOLALITY GAMMA PHI A (H20) DEL GCEX)

1 .100 .6554 .9395 .963448 -1974.

2.100 .6715 .9893 .927876 -4035.

3.500 .7 46 1 .0795 .8727 -6468.

6.0 40 .991 1 .2731 .7580 -8453.

ANOTHER M ? NO

SS 0.535 SECS

RUN COMPLETE.

44
List 15 THIS IS ANOTHER EXAMPLE:

RUN_

76/05/05. 09.49.20.

PROGRAM GAMPHI

CHARGE TYPE (SEE TABLE J IN TEXT) = ? 1 SINGLE M? NO "~

USE SET OF MOLALITIES ENTERED AT LINE NO. 1300 ? NO

INPUT MOLALITIES FROM FILE ? NO """"

CONSTANTS USED: 1.4495 .020442 5.79270E-3 -2.88600E-4

MAXIMUM MOLALITY REQUIRED IN TABLE =? 0.10

**********

MOLALITY GAMMA PHI A (H20) DEL GCEX)

.001 .9651 .9884 .999964 -0.

.002 .9519 .9841 .999929 -0.

.003 .9 422 .9809 .999894 -1 . .004 .9343 .9784 .999859 -1 . .00 5 .9276 • 9 762 .999824 -1 . .006 .9216 .9 743 .999789 -2.

.007 .9163 .9726 .999755 -2.

.008 .911 4 .9710 .999720 -3.

.009 .9069 .9696 .999686 -3.

.010 .9028 .9683 .999651 -3.

.020 .8719 .9587 .999309 -9.

• 030 .8509 .9524 .998971 -17.

.0 40 .8349 .9477 .998635 -25.

.050 .8218 .9 440 .998301 -35.

.060 .8108 .9410 .997968 -45.

.070 .8013 .9384 .997636 -56.

.080 .7929 .9363 .997305 -67.

.090 .7854 .9344 .996974 -79.

.100 .7786 .9328 .996645 -91 . .200 .7340 .9237 .993366 -231 . .300 .7090 .9207 .990097 -393.

.400 .6927 .9203 .98 6824 -570.

.500 .6812 .9212 .983541 -757.

.600 .6728 .9231 .980242 -950.

.700 .6666 .9256 .976926 - 1 1 49 . .800 .6621 .9285 .973590 -1352.

ANOTHER M ? N0

SS 1.043 SECS.

RUN COMPLETE.

45
List 16 NEfa FTTe NAMEt DATASPL

READY.

TEXT

ENTER TEXT MODE.

1 .1 2.3

5.5

6.0

1* .123* .001

EXIT TEXT MODE.

SAVE *DEL*

NOSORT

READY.

.SAVE

READY.

OLD

FILE NAME: GAMPHI

READY.

.get* tape1 = dataspl

"ready.

RUN

76/05/05. 09.59.10.

PROGRAM GAMPHI

CHARGE TYPE <SEE TABLE 1 IN TEXT) = ? 1 SINGLE M? NO, —

USE SET OF MOLALITIES ENTERED AT LINE NO. 1300 ? NO

INPUT MOLALITIES FROM FILE ? YES

~~" NO. OF POINTS? 7 ""

CONSTANTS USED: 1.4495 .020442 5.79270E-3 -2.88600E-4

MOLALITY GAMMA PHI A <H20) DEL G(EX)

1 .100 .6554 .9395 .963448 -1974.

2.300 .6791 1.0010 .920394 -4425.

5.500 .928 1 .2306 .7836 -8339.

6.000 .986 1.2700 .7599 -8451.

7.000 1.118 1.3480 .7118 -8210.

.123 .7653 .9297 .995888 -120.

.001 .9651 .9884 .999964 -0.

ANOTHER M ? NO

SS 0.684 SECS<

RUN COMPLETE.

46
9 . Summary

This technical note describes tested programs which are suitable

for the reduction of experimental data to calculate <f> and y from the

four methods presented. A non- linear least squares program has been

ex detailed as a correlating function and tables of m, <j>, y, a , and AG

can be produced using this correlating equation.

The authors invite comments concerning these programs and their

use. We solicit programs written by others and are interested in other

methods of calculation and testing equations for examining electrolyte

data.

Future publications will describe such programs as those used for

the calculation of <j> from freezing point data, as well as for other

thermodynamic quantities, such as heats of dilution, solution, equilibrium

constants, and other quantities, from various experimental methods.

47
10. References

[1] Cohen, E. R. , and Taylor, B. N., J. Phys. Chem. Reference Data, 2,

663 (1973).

[2] Staples, B. R. , and Nuttall, R. L., J. Phys. Chem. Reference Data,

6^ xxx (1977), in press.

[3] Stimson, H. F. , J. Res. Nat. Bur. Stand., 73A, 493 (1969). *

[4] Keenan, J. H. , Keyes, F. G. , Hill, P. G., and Moore, J. G. , "Steam

Tables", Int'l Ed. - Metric Units, John Wiley & Sons, Inc., New

York (1969) p. 148.

[5] Robinson, R. A., and Stokes, R. H. , "Electrolyte Solutions," 3rd

ed., Butterworth and Co., London, (5th impression, 1970).

48
FEDERAL INFORMATION PROCESSING STANDARD SOFTWARE SUMMARY

01. Summary date

Yr. Mo. Day m04. MSM Software date

Yr. 7l£Mo. A£

Day HZ

02. Summary prepared by (Name and Phone) Dr. Bert R. Staples (301) 921-3632

05. Software title COMPUTER PROGRAMS FOR THE EVALUATION OF ACTIVITY AND OSMOTIC COEFFICIENTS

06. Short title

03. Summary action New Replacement Deletion an a

Previous Internal Software ID

07. Internal Software ID

08. Software type

Automated Data

r~| System HO Computer Program n Subroutine/Module

09. Processing mode

~] Interactive

f~] Batch

[77] Combination

10. General

Application area

Computer Systems

("J Support/Utility Q IT) Scientific/Engineering

|~| Bibliographic/Textual

Management/

Business

Process Control Other

Specific Evaluation of properties

of electrolyte solutions

11. Submitting organization and address 316.05

Physical Chemistry Division

National Bureau of Standards

Washington, DC 20234

12. Technical contact(s) and phone Bert R. Staples (301) 921-3632

Ralph L. Nuttall (301) 921-2765

13. Narrative A number of specialized computer programs have been developed for the purposes

of calculating thermodynamic properties directly from experimental data and for subsequent

data manipulation, including non-linear least-squares fitting of the data to empirical or

semi -empirical equations that describe the function over a range of compositions, temp- eratures or other parameters. The details of the programs used in the critical evaluation

of mean activity and osmotic coefficients and sample runs for each program are discussed.

Osmotic coefficients can be calculated from direct vapor pressure measurements or from

isopiestic molalities. Activity coefficients can be calculated from electromotive force measurements of galvanic cells, both without liquid-junction and with transference. A

non-linear least-squares program fits data from all sources as a function of and In Y- Once the parameters of the fitting equation have been obtained, another program can be

used to calculate a table of m, y, ($, aw, and £G at rounded molalities.

14. Keywords Activity coefficients; aqueous; computer programs; data evaluation; electrolytes:

electromotive force; isopiestic method; osmotic coefficients; non-linear least squares;

thermodynamic properties; vapor pressure

15. Computer manufr and model

CDC 6000-series

16. Computer operating system

KR0N0S 2.1.1

17. Programing language(s)

BASIC

18. Number of source program state- ments900

19. Computer memory requirements Minimal20. Tape drives N/A21. Disk/Drum units N/A22. Terminals One

23. Other operational requirements

Data file

24. Software availability

Available DLimited B

ln-house only

25. Documentation availability

Available Inadequate aln-house only

26. FOR SUBMITTING ORGANIZATION USE

185-101 Standard Form 185

1974 July

U.S. Dept. of Commerce—NBS

(FIPS. Pub. 30)

49
NBS-114A (REV. 7-73) U.S..DEPT. OF COMM. BIBLIOGRAPHIC DATA

SHEET

1. PUBLICATION OR REPORT NO. NBS TN-9P.R

2. Gov't Accession

No.

3. Recipient's Accession No.

4. TITLE AND SUBTITLE

COMPUTER PROGRAMS FOR THE EVALUATION OF ACTIVITY AND

OSMOTIC COEFFICIENTS

5. Publication Date December 1976

6. Performing Organization Code

7. AUTHOR(S) Bert R. Staples and Ralph L. Nuttall

8. Performing Organ. Report No.

9. PERFORMING ORGANIZATION NAME AND ADDRESS

NATIONAL BUREAU OF STANDARDS

DEPARTMENT OF COMMERCE

WASHINGTON, D.C. 20234

10. Project/Task/Work Unit No. 3165156

11. Contract/Grant No.

12. Sponsoring Organization Name and Complete Address (Street, City, State, ZIP)

Office of Standard Reference Data

National Bureau of Standards

Washington, D. C. 20234

13. Type of Report & Period Covered Final

14. Sponsoring Agency Code

15. SUPPLEMENTARY NOTES

16. ABSTRACT (A 200-word or less factual summary of most significant information. If document includes a significant

bibliography or literature survey, mention it here.)

A number of specialized computer programs have been developed for the purposes

of calculating thermodynamic properties directly from experimental data and for

subsequent data manipulation, including non-linear least-squares fitting of the

data to empirical or semi -empirical equations that describe the function over a range of compositions, temperatures or other parameters. The details of the

programs used in the critical evaluation of mean activity and osmotic coefficients

and sample runs for each program are discussed. Osmotic coefficients can be

calculated from direct vapor pressure measurements or from isopiestic molalities.

Activity coefficients can be calculated from electromotive force measurements of

galvanic cells, both without liquid-junction and with transference. A non-linear

least-squares program fits data from all sources as a function of and In Y. Once the parameters of the fitting equation have been obtained, another program

can be used to calculate a table of m, Y, 0, aWf and AGex at rounded molalities.

17. KEY WORDS (six to twelve entries; alphabetical order; capitalize only the first letter of the first key word unless a proper name; separated by semicolons) Activity coefficients; aqueous ; computer programs; data

evaluation; electrolytes; electromotive force; isopiestic method; osmotic coefficients

non-linear least squares; thermodynamic properties; vapor pressure

18. AVAILABILITY [x] Unlimited

]] For Official Distribution. Do Not Release to NTIS

Order From Sup. of Doc, U.S. Government Printing Office Washington, D.C. 20402, SD Cat. No. C13 . U6 '. 928

]J Order From National Technical Information Service (NTIS)

Springfield, Virginia 22151

19. SECURITY CLASS

(THIS REPORT)

UNCLASSIFIED

20. SECURITY CLASS

(THIS PAGE)

UNCLASSIFIED

21. NO. OF PAGES

56

22. Price

$1.10

USCOMM-DC 29042-P74

Special Issue Sales American Chemical Society 1155 16th St., N.W., Washington, D. C. 20036

Please send 420 page supplement to the Journal

of Physical and Chemical Reference

Data, Volume 2, "Physical and Ther- modynamic Properties of Aliphatic Alcohols," at the prices checked below.

Members: Hard cover edition: D $33.00 Nonmembers: Hard cover edition: D $33.00 Members: Soft cover edition: $10.00 Nonmembers: Soft cover edition: $30.00

copies of the Please send

Members: Hard cover edition: $60.00 Nonmembers: Hard cover edition: $60.00 Members: Soft cover edition: $25.00 Nonmembers: Soft cover edition: $55.00 Check or money order must accompany order. $1.00 extra for foreign postage and handling. Name

Important

Additions

TO THE JOURNAL OF PHYSICAL AND

CHEMICAL REFERENCE DATA

Two comprehensive reference volumes, each, like the Journal itself, published by The American

Institute of Physics, The National Bureau of Standards and The American Chemical Society . .

your triple assurance of their accuracy, immediacy, and usefulness.

SUPPLEMENT NO. 1 TO VOLUME 2 "Physical and Thermodynamic

Properties of Aliphatic Alcohols"

by R. C. Wilhoit and B. J. Zwolinski, Thermodynamics Research Center, Department of Chemistry, Texas A&M University. The most exhaustive review and critical analysis of selected physical and

thermodynamic properties of aliphatic alcohols that has been published.

Coverage of the important properties of the liquid, vapor, and ideal gaseous

states as well as pertinent solid state data necessary for equilibrium

calculations ordinarily encountered in chemical and chemical engineering

applications. All available quantitative data on each property for each aliphatic alcohol are fully documented and critically analyzed providing a "data bank"

for the 640 monohydroxy alcohols in the carbon range of Ci to Cso. Internally consistent tables of critical, standard, or selected "best" values are tabulated

for each compound. Index included.

SUPPLEMENT NO. 1 TO VOLUME 3 "Thermal Conductivity of the Elements:

A Comprehensive Review"

by C. Y. Ho, R. W. Powell, and P. E. Lilly, 1974 Thermophysical Properties Research Center, Purdue University. Comprehensive review of the world's thermal conductivity data presents recommended or estimated values for all 105 elements. Reliable thermal

conductivity data for those elements which can be used as standard reference materials to calibrate or check apparatus. Original data, specimen characterization and measurement

information for 5200 sets of raw data. Detailed discussions for each element, review of the

available experimental data and considerations by which the authors arrived at final assess- ments. Complete bibliographic citations for 1658 references. Only original sources have been used. All cited documents are available

at TPRC in standard microfiche.

copies of the 796 page supplement to the Journal

of Physical and Chemical Reference

Data, Volume 3, "Thermal Conductivity

of the Elements: A Comprehensive

Review," at the prices checked below.

Address

City State. .Zip.

American Chemical Society
NBS TECHNICAL PUBLICATIONS

PERIODICALS JOURNAL OF RESEARCH reports National Bureau

of Standards research and development in physics,

mathematics, and chemistry. It is published in two

sections, available separately:

• Physics and Chemistry (Section A)

Papers of interest primarily to scientists working in these fields. This section covers a broad range of physical and chemical research, with major emphasis on

standards of physical measurement, fundamental constants, and properties of matter. Issued six times a year. Annual subscription: Domestic, $17.00; Foreign, $21.25.

• Mathematical Sciences (Section B)

Studies and compilations designed mainly for the mathematician and theoretical physicist. Topics in mathematical statistics, theory of experiment design, numerical

analysis, theoretical physics and chemistry, logical design and programming of computers and computer sys- tems. Short numerical tables. Issued quarterly. Annual

subscription: Domestic, $9.00; Foreign, $11.25.

DIMENSIONS/NBS (formerly Technical News Bulletin) —This monthly magazine is published to inform

scientists, engineers, businessmen, industry, teachers,

students, and consumers of the latest advances in science and technology, with primary emphasis on the work at NBS. The magazine highlights and reviews

such issues as energy research, fire protection, building

technology, metric conversion, pollution abatement,

(health and safety, and consumer product performance.

In addition, it reports the results of Bureau programs

in measurement standards and techniques, properties of matter and materials, engineering standards and services, instrumentation, and automatic data processing.

Annual subscription: Domestic, $9.45; Foreign, $11.85.

NONPERIODICALS

Monographs—Major contributions to the technical liter- ature on various subjects related to the Bureau's scientific and technical activities. Handbooks—Recommended codes of engineering and

industrial practice (including safety codes) developed

in cooperation with interested industries, professional

prganizations, and regulatory bodies.

Special Publications—Include proceedings of conferences Sponsored by NBS, NBS annual reports, and other

special publications appropriate to this grouping such

as wall charts, pocket cards, and bibliographies.

Applied Mathematics Series—Mathematical tables, manuals, and studies of special interest to physicists, engineers, chemists, biologists, mathematicians, computer programmers, and others engaged in scientific and technical work.

^National Standard Reference Data Series—Provides

^quantitative data on the physical and chemical properties of materials, compiled from the world's literature

"and critically evaluated. Developed under a world-wide

iiprogram coordinated by NBS. Program under authority

|pf National Standard Data Act (Public Law 90-396).

NOTE: At present the principal publication outlet for

these data is the Journal of Physical and Chemical

Reference Data (JPCRD) published quarterly for NBS

by the American Chemical Society (ACS) and the American Institute of Physics (AIP). Subscriptions, reprints,

and supplements available from ACS, 1155 Sixteenth

St. N.W., Wash. D. C. 20056. Building Science Series—Disseminates technical infor- mation developed at the Bureau on building materials,

components, systems, and whole structures. The series presents research results, test methods, and performance criteria related to the structural and environmental

functions and the durability and safety characteristics of building elements and systems.

Technical Notes—Studies or reports which are complete

in themselves but restrictive in their treatment of a

subject. Analogous to monographs but not so comprehensive in scope or definitive in treatment of the subject area. Often serve as a vehicle for final reports of work performed at NBS under the sponsorship of other government agencies.

Voluntary Product Standards—Developed under proce- dures published by the Department of Commerce in Part

10, Title 15, of the Code of Federal Regulations. The

purpose of the standards is to establish nationally rec- ognized requirements for products, and to provide all concerned interests with a basis for common understanding of the characteristics of the products. NBS

administers this program as a supplement to the activities of the private sector standardizing organizations.

Consumer Information Series—Practical information,

based on NBS research and experience, covering areas

of interest to the consumer. Easily understandable language and illustrations provide useful background knowledge for shopping in today's technological marketplace.

Order above NBS publications from: Superintendent

of Documents, Government Printing Office, Washington,

D.C. 20A02. Order following NBS publications—NBSIR's and FIPS

from the National Technical Information Services,

Springfield, Va. 22161. Federal Information Processing Standards Publications

(FIPS PUBS)—Publications in this series collectively constitute the Federal Information Processing Standards Register. Register serves as the official source of information in the Federal Government regarding stand- ards issued by NBS pursuant to the Federal Property

and Administrative Services Act of 1949 as amended,

Public Law 89-306 (79 Stat. 1127), and as implemented

by Executive Order 11717 (38 FR 12315, dated May 11, 1973) and Part 6 of Title 15 CFR (Code of Federal

Regulations).

NBS Interagency Reports (NBSIR)—A special series of interim or final reports on work performed by NBS for

outside sponsors (both government and non-government). In general, initial distribution is handled by the sponsor; public distribution is by the National Technical Information Services (Springfield, Va. 22161) in paper copy or microfiche form.

BIBLIOGRAPHIC SUBSCRIPTION SERVICES

The following current-awareness and literature-survey

^bibliographies are issued periodically by the Bureau:

Cryogenic Data Center Current Awareness Service. A

literature survey issued biweekly. Annual subscripi tion: Domestic, $20.00; Foreign, $25.00.

Liquified Natural Gas. A literature survey issued quarterly. Annual subscription: $20.00.

Superconducting Devices and Materials. A literature survey issued quarterly. Annual subscription: $20.00.

Send subscription orders and remittances for the pre- ceding bibliographic services to National Bureau of Standards, Cryogenic Data Center (275.02) Boulder,

Colorado 80302.
U.S. DEPARTMENT OF COMMERCE

National Bureau of Standards

Washington. DC. 20234

OFFICIAL BUSINESS

Penalty for Private Use. $300

POSTAGE AND FEES PAID

U.S. DEPARTMENT OF COMMERCE COM-215

SPECIAL FOURTH-CLASS RATE BOOK

.QV-UT/O/y YEARS

19Q1-197B BS