File 2: Manual

NOTATIONS

Somewhat different notations are applied in the paper and in the Manual and Computer programs. Namely, the letter D is put for D (delta) and all the symbols are written in line (not in subscripts or superscripts). For example, DVP is written as DVP.

The program, written in DELPHI language, is designed for simulated pH–static titration of cyanides according to the modified Liebig–Denigès (L-D) method. The simulating procedure consists of three stages, namely:

Stage 1: Calculation of starting pH–value;

Stage 2: Simulated ‘classical’ titration with adjusting (AD) solution, up to a pre–assumed pH0–value;

Stage 3: Simulated pH–static titration.

Stage 1

Insert into or change the contents of the corresponding windows setting:

(a)  the values for:

CKCN, CKI, CDEA, VD

i.e. molar concentrations of the species: KCN, KI, DEA and volume of titrand D taken for titration.

(b)  the starting (guessed) values for fundamental variables:

–log[CN], –log[DEA], pH, –log[SO4], –log[I], –log[AgCN2]

written in File 3 as

pCN , pDEA , pH , pSO4 , pI , pAgCN2

In the window maxSS (default value = 10E–14), the convergence criterion for the optimisation function (SS) is defined. For accurately calculated fundamental variables, the SS value obtained from optimisation should be smaller than the maxSS value (see Eq. 15 in the paper).

After introducing the indicated values in (a) and (b) and pushing the CALCULATION OF STARTING pH button, the optimising procedure starts. The pH value and SS are displayed in the window Details. If the convergence is not attained, a message is supplied. Failure to converge takes place when the starting (guessed) values for the variables are too distant from the correct values.

Remarks 1

·  All the data and variables potentially needed in the system are included in the program. The program chooses automatically the variables needed for the simulated titration. If H2SO4 is not used (is not needed) in the system, a void window for –log[SO4] does not stop the simulating procedure.

·  Values for the fundamental variables chosen are calculated on the basis of composition (concentrations, volumes) and physicochemical data (equilibrium constants).

·  The fundamental variables taken above refer to the predominating species at the start of the titration in Stage 2. This choice enables better approximation of the starting values to be done.

Stage 2

Addition of NaOH or H2SO4 as AD enables the pre–assumed pH0 value to be attained; pH0 is the starting value assumed before pH–static titration. For this purpose, the values:

pH0, CAD, DVAD

are introduced / changed and the calculating procedure starts after pushing the pH0 adjusting button; DVAD is an increment of AD titrant added (to reach pH0 value) according to titrimetric mode, VAD = sum(DVAD)i. The increment DVAD depends on the resolution (minimal distance between marks) of the burette scale and equals 1 µL, for example; the resolution influences the accuracy attainable in pH-static titration.

Remarks 2

By comparing the pH value calculated in stage 1 with the pre–assumed pH0 value, the program decides which one of the solutions: NaOH or H2SO4 should be added as AD.

The calculations can be stopped after pushing the button Stop (for stages 2 and 3).

In area Details, the successive pairs: (pH, SS) are displayed, where pH corresponds to the successive volume of AD added.

After the pre–assumed pH0 value is attained, the optimised values of the corresponding fundamental variables are displayed in area Details, together with the objective function (SS) value related to V [ml] of NaOH or H2SO4 added up to the point where the pH0 value was attained.

Stage 3

At this stage, the simulated, pH–static titrimetric procedure is carried out. At the start for this titration, the values for

CP, DVP, CA, DDVA, N

are introduced/changed. DDVA is an increment of AT added (to reach pH0 value) according to titrimetric mode; DVA = sum(DDVA)i; for further remarks, see comments in Stage 2.

The calculating procedure starts after pushing PH-STATIC TITRATION button.

In the window Details successive values for pairs (VP, SS) are displayed.

Notations:

CP – concentration [mol/L] of PT

PT – primary titrant, added in portions DVP, successively and alternately, with portions DVA of AT

AT – auxiliary titrant, added according to ‘classical’ titrimetric mode; AT returns the solution to the starting pH0 value

N – number of PT (and AT, as well) portions added during the titration

Remarks 3

·  After each addition of the primary titrant (PT), the pH = pHj is returned to the initial pH0 value by titration with the auxiliary titrant (AT).

·  The precipitate AgI appears at the end point (e) of the titration. Up to the end point, the system is homogeneous. At the point where the solubility product for AgI is crossed, the computer automatically changes the fundamental variable: from the –log[AgCN2] to the –log[AgI] for the precipitate AgI concentration, and makes some further changes in the program). After the precipitation starts, the message ”AgI precipitates” appears in area “Details” at the corresponding pair (VP, SS), and later.

The possible precipitation of other solid phases, i.e. AgCN, Ag2O or Ag2SO4, is also taken into account. If the solubility product of (at least one of) the accompanying solid phases is crossed, the titration is stopped and a warning message appears. To avoid the precipitates other than AgI, some changes in concentrations (CKI, CDEA) are needed.

The results are supplied in two files:

VA_VP.txt

VA_VP_pH.txt

that are the basis for visualisation of the results obtained.

Similar procedures can be adapted for simulation of other – pH–static or classical titrations.

Visualisation of the results obtained

The results are visualised after choosing between options:

VA vs VP or pH vs VP+VA

and pushing the Draw button; the Chart window is opened.

The Chart window has three areas: (1) the Plot, (2) the Cursor position (that marks the cursor position), and (3) the „Chart properties” group. The options in the „Chart properties” group include:

Show grids – the grid appears when turning on this option;

X-axis properties – the button opening the window where parameters for the X–axis can be changed;

Y-axis properties – the button opening the window where parameters for the Y–axis can be changed;

Print – the plot is printed

Close – the window with the plot is closed.

A particular example

Action of the program will be presented on an example.

Let us assume that VD=50 mL of the solution containing KCN (CKCN = 0.002 mol/L), KI (CKI = 0.002 mol/L) and DEA (CDEA = 0.002 mol/L) be adjusted to pH0 = 10.0 with volume VAD of CAD = 0.01 mol/L AD titrant (NaOH or H2SO4) added according to titrimetric mode, in increments (portions) DVAD = 0.001 mL. Total volume (VAD) of AD titrant is the sum of successive increments DVAD. Then the solution be treated with portions DVP = 0.5 mL of AgNO3 (CP = 0.01 mol/L) used as primary titrant (PT) and the original pH0 value of the solution be returned (re-adjusted) by addition of NaOH (CA = 0.01 mol/L) as auxiliary titrant (AT), added in increments DDVA = 0.001 mL. The volume DVA of AT is the sum of successive increments DDVA.. PT and AT are added alternately and repeatedly; total number of PT+AT additions assumed, i.e. (PT, AT)j , be equal N = 20.

For construction of pH-static titration curve, plotted in co-ordinates (VP, VA), total volumes (VPj and VAj) of PT and AT added up to j-th point (j = 1,…,N), were registered; VPj is the sum of DVP added up to j-th point, and VAj is the sum of DVAj added up to j-th point.

After loading the file with computer program on the disc and unpacking, one clicks the icon „pH-stat.exe” and the following window (Fig. 1) is opened.

Fig. 1

The numbers seen in the corresponding windows, as defaults, can be changed according to actual needs. All windows are filled with numbers; nonetheless, the program uses, as input data, only the values needed on actual stage of simulation procedure. The areas not explored on defined stage of calculation procedure, has not to be filled up.

I

On the first stage, the pH value of the solution taken for pH-static titration is calculated. For this purpose, in the indicated areas (with windows), the following data, referred to concentrations and volume, are introduced (Fig. 2):

CKCN = 0.002

CKI = 0.002

CDEA =0.002

VD = 50

Then the approximate (guessed or calculated off-line) starting values for fundamental variables required on this

stage (i.e. for pH, –log[CN] , –log[DEA]), are introduced. The approximate values are as follows:

–log[CN]= 2,5,

–log[DEA] = 2,5,

pH = 9

Then the following default value for the convergence criterion function is accepted

maxSS=1E–14 (= 1.0×10–14)

Fig. 2

Click the button CALCULATION OF STARTING pH. Then, in the area Details, the optimized values for fundamental variables are displayed (Fig. 3), together with the convergence function value, obtained at the optimal point. Simultaneously, the button pH0 ADJUSTING is activated.

Fig. 3

II

On the next stage, the pH of the solution is adjusted to the pre-assumed pH0–value. For this purpose, the values for: pH0 , CAD (concentration of AD titrant) and DVAD (incremental volume for AD titrant) are introduced (Fig. 4):

pH0 = 10

CAD = 0.01

DVAD = 0.001

Owing to the fact that pH0 is lower than pH value calculated for the solution taken for titration, the starting value for variable –log[SO4]

–log[SO4] = 2.4

is assumed and the button pH0 ADJUSTING is pressed.

On this stage, we need not to introduce again the starting values for fundamental variables (pH, –log[CN] , –log[DEA]) that were used in previous step of the optimization procedure. The updated values for the corresponding variables, i.e. ones obtained on the pH0 –adjusting step, were taken as starting values for the system obtained after addition of the first increment of AD titrant. In the course of further AD titrant addition, the fundamental variables values obtained after preceding increment addition, were applied as the starting values after successive increment addition.

Fig. 4

The results obtained are as ones presented in Fig. 5.

As we see, the program compares the pH value of the solution taken for titration with the pre-assumed pH0 value and automatically decides whether one of AD titrants (H2SO4 or NaOH) designed for this purpose, should be applied in particular case. The results of calculations, i.e. pH values and convergence function values, are displayed in the window Details, after any successive increment DVAD of AD titrant added. Then pH value, nearest to the pH0 value, is selected and displayed together with the optimized values for fundamental variables and the corresponding convergence function value. In the last line, the volume VAD and the kind of AD titrant added, are specified.

Fig. 5

As we see, the program compares the pH value of the solution taken for titration with the pre-assumed pH0 value and automatically decides whether one of AD titrants (H2SO4 or NaOH) designed for this purpose, should be applied in particular case. The results of calculations, i.e. pH values and convergence function values, are displayed in the window Details, after any successive increment DVAD of AD titrant added. Then pH value, nearest to the pH0 value, is selected and displayed together with the optimized values for fundamental variables and the corresponding convergence function value. In the last line, the volume VAD and the kind of AD titrant added, are specified.

III

The third stage of the simulating procedure is the pH-static titration; it is the main part of the titrimetric procedure.

In the corresponding windows, the values for: concentration (CP) of PT, volume (DVP) of PT portion, concentration (CA) and volume increment DDVA for AT, and number of steps (N) are introduced. It should be stressed that the term ‘one step’ consists of addition of a single portion DVP of PT followed by addition of volume DVA of AT; the latter volume consists of a defined number of increments DDVA.

In the corresponding windows we insert (Fig. 6):

CP = 0.01

DVP = 0.5

CA = 0.01

DDVA = 0.001

N = 20

Additionally, we must write the starting values for variables : –log[I] ,–log[AgCN2]. In the corresponding areas we write:

–log[I] = 3,0

–log[AgCN2] = 4,0

and then the button pH–STATIC TITRATION is pressed.

The program uses, as the starting values, the optimized values for other fundamental variables, i.e.

pH, –log[CN], –log[DEA], –log[SO4]), obtained in the preceding step of optimization procedure.

Fig. 6

After calculations, the window as in Fig. 7 is displayed.

Fig. 7

In area „Details”, the volumes (VP) of PT and the corresponding convergence function (SS) values are displayed. If the solubility product for pr1 = AgI is crossed, this information is also displayed in the window. In this case, the program automatically displaces the variable log[AgCN2] for the new variable – log[pr1] and the corresponding records in the algorithm are ‘put in motion’.

The results of simulations are displayed as two kinds of plots, namely (1) VA vs. VP and (2) pH vs. VP+VA plots. The choice between the plots is done in area „Draw chart”, by pressing the button „Draw”. The VA vs. VP plot obtained from the calculations is as in Fig. 8.

Fig. 8

The pH vs VP+VA plot is as one presented below (Fig. 9).

Fig. 9

Clicking the buttons „X–axis properties” and „Y–axis properties” enables to choose between properties (e.g. the choice of scale) of both axes (Fig. 10).