4. METHOD OF SOLUTION
The code solves a reduced set of simultaneous non-linear equations. The conceptual model embodied in PHREEQE and HARPHRQ is the ion-association model of Pearson and Noronha to obtain values for a set of key independent variables. These results are then used to solve for all other unknowns sought. The key independent variables in PHREEQE are:
1. aH+ the activity of the hydrogen ion in solution;
2. ae- the activity of the electron in solution;
3. the activity of a single aqueous (master) species for each element;
4. the amount of mass transferred between each mineral phase and solution to achieve equilibrium.
From these data, the code calculates the dependent variables, including activities of all other aqueous species specified. The equations used to solve for key independent variables are:
1. Electrical neutrality;
2. Electron balance;
3. Mass balance;
4. Mineral equilibrium.
Where a constant pH is to be maintained, the electrical neutrality equation is removed from the refinement procedure in HARPHRQ. The equations are solved using:
1. a continued-fraction approach for the mass-balance equations; and
2. a modified Newton-Raphson approach for the remaining equations.
The activity coefficient can be calculated in HARPHRQ using the Debye-Huckel and Davies corrections from PHREEQE, and also a modified Davies correction. The modified Davies option uses the Davies expression up to ionic strength 0.3 mol dm-3 and then maintains the magnitude of this correction at ionic strengths above the cut-off value.