Figure 1: Inner and outer fixed-point activity algorithms
Inner fixed-point activity algorithm
This algorithm is the most commonly used algorithm. At each Newton loop, the activity coefficients are updated according to the new ionic force. From a strictly mathematical point of view, this method is then a quasi-Newton method because the Jacobian matrix Z is an approximation of the derivative of the objective function.
Outer fixed-point activity algorithm
Here, we propose this new algorithm. For a given set of values for the activity coefficients, the Newton procedure is iteratively run until convergence is achieved. Once convergence is reached, the activity coefficients are updated according to the ionic strength computed at the time of convergence. This procedure is repeated until no changes are detected in the activity coefficients. We then obtain a true Newton algorithm where the Jacobian matrix used is truly the derivative of the objective function.
Derivative of the activity coefficients in the Jacobian matrix
One can find an approach in the PHREEQC code [15] for including the derivative of the activity coefficients in the Jacobian matrix. By deriving the objective function, one obtains:
We then must calculate the derivative of the activity coefficients. Because the activity coefficients are strongly dependent on the ionic strength, we write:
We then compute two parts:
  1. The derivative of the activity coefficients versus the ionic strength . This component is model-dependent and simple to compute regardless of which model is used. These elements are given for the 3 presented models in equations to .
  2. The derivative of the ionic strength versus the logarithm of the activity components.