Sorption of metals on minerals is a key process in treatment water, natural aquatic environments, and other water-related technologies. Sorption processes are usually simulated with surface complexation models; however, identifying numeric values for the thermodynamic constants from batch experiments requires a robust parameter estimation technique that does not get trapped in local minima. Recently, particle swarm optimization (PSO) techniques have attracted many researchers as an efficient and effective optimization technique to find (near-)optimum model parameters in several fields of research. In this work, uranium at low concentrations was sorbed on quartz at different pH, and the hydroPSO R optimization package was used – the first time – to calibrate the PHREEQC geochemical model, version 3.1.2. Results show that thermodynamic parameter values identified with hydroPSO are more reliable than those identified with the well-known parameter estimation (PEST) software, when both parameter estimation software are coupled to PHREEQC using the same thermodynamic input data. In addition, post-processing tools included in hydroPSO were helpful for the correct interpretation of uncertainty in the obtained model parameters and simulated values. Thus, hydroPSO proved to be an efficient and versatile optimization tool for identifying reliable thermodynamic parameter values of the PHREEQC geochemical model.

Particle swarm optimization technique (PSO) is an evolutionary optimization technique proposed by Eberhart and Kennedy (1995) and was influenced by the activities of flocks of birds in search of corn (Kennedy and Eberhart, 1995; Eberhart and Kennedy, 1995). Both PSO and genetic algorithms (GAs) share a few similarities (Eberhart and Shi, 1998). GAs have evolutionary operators like crossover or selection, while PSO does not have it (Eberhart and Shi, 1998). Recently, PSO has been implemented in a wide range of applications, e.g., in the water resources (e.g., Bisselink et al. 2016; Zambrano-Bigiarini and Rojas, 2013; Abdelaziz and Zambrano-Bigiarini, 2014; Formetta et al., 2014), geothermal resources (Ma et al., 2013; Beck et al., 2010), finance and economics (Das, 2012), structural design (Kaveh and Talatahari, 2009; Schutte and Groenwold, 2003), and applications of video and image analysis (Donelli and Massa, 2005; Huang and Mohan, 2007; Abdelaziz et al., 2018). For example, the groundwater model MODFLOW2000/2005 was linked with PSO to estimate permeability coefficients (Sedki and Ouazar, 2010) and a multi-objective PSO code was used to derive rainfall–runoff model parameters by introducing the Pareto rank concept (Gill et al., 2006). Notwithstanding recent popularity, PSO has never been used to calculate the parameters of a surface complexation model (SCM) simulating sorption behavior of metal and metalloids on mineral surfaces. Hence, this paper attempts to examine the efficiency and effectiveness of PSO for parameter estimation of a surface complexation model as the PHREEQC (Parkhurst and Appelo, 1999).

Nowadays, a number of PSO software codes exist, such as MADS (Harp and
Vesselinov, 2011; Vesselinov and Harp, 2012) and OSTRICH (Matott, 2005), with
most of the codes using the basic PSO formulation developed in 1995. However,
in this paper, we use the latest standard particle swarm optimization proposed
in literature (Clerc, 2012; Zambrano-Bigiarini et al., 2013), named SPSO2011,
as implemented in the hydroPSO R package (R Core team, 2016) version 0.3-3
(Zambrano-Bigiarini and Rojas, 2013, 2014). hydroPSO is an independent R
package that includes the newest standard PSO (SPSO-2011), which was
specifically developed to calibrate a wide range of environmental models. In
addition, the plotting functions in hydroPSO are user-friendly and aid the
numeric and visual interpretation of the optimization results. The source
code, installation files, tutorial (vignette), and manual are available on

hydroPSO is used in this article, for the first time, to estimate the
parameters of a surface complexation for uranium(VI)–quartz system, to properly
capture the non-linear interactions between the model parameters. The aim of
this article is to examine the suitability of hydroPSO as a global
optimization tool for parameter estimation of geochemical models, in
particular PHREEQC v3.1.2. To this end, surface/sorption reaction constants
(

PEST and PSO are both model-independent parameter optimizers; i.e., they do not require making any change to the model code. PEST uses the Gauss–Marquardt–Levenberg method to minimize, in the weighted least squares sense, the differences between observations and the corresponding model-simulated values (Abdelaziz and Bakr, 2012; Edet et al., 2014). PEST is a gradient-based algorithm that initially calculates the Jacobian matrix and is then used to build and upgrade parameter set, to enhance the searching ability to obtain a better objective function value (Doherty, 2010). The model then iterates adjusting the model parameters on the basis of a new Marquardt lambda value (Doherty, 2010), which drives the objective function for faster convergence. As a local optimizer, PEST is sensitive to the initial condition (see a complete description in Doherty, 2010). In contrast, PSO is global optimizer which randomly initializes a population of particles within the D-dimensional parameter space. PSO allows initializing the position of each particle using a random uniform distribution or Latin hypercube sampling (LHS), while velocities can be initialized at zero, with two different random distributions, or with two different LHS strategies (see Zambrano-Bigiarini and Rojas, 2013). Velocity and position of each particle in the parameter space are updated in successive iterations following equations specific to the selected PSO version (see a complete description in Zambrano-Bigiarini and Rojas, 2013, and Abdelaziz and Zambrano-Bigiarini, 2014). As a state-of-the-art global optimizer, PSO is less subject get trapped in local minima compared to PEST.

PHREEQC version 3.1.2 (Parkhurst and Appelo, 1999) and the database of Nuclear
Energy Agency thermodynamic (NEA_2007) (Grenthe et al., 2007), as well as the
LLNL database (Lawrence Livermore National Laboratory) are used to model
sorption of metal species. Both databases were modified by setting constant
values for

Complexation reactions with their respective

Q_xOH is the silanol surface site.

There are different type of SCMs, such as the generalized two-layer model (GTLM),
non-electrostatic model (NEM), constant capacitance model (CCM), diffuse-layer
model (DLM), and modified triple-layer model (modified TLM). Here, a GTLM (Dzombak and Morel, 1990) was used to simulate the
sorption behavior of U(VI) on quartz. The GTLM was used instead of other
models because it is relatively simple and can be used in a wide range of
chemical conditions. A comprehensive review of the GTLM is presented in Dzombak
and Morel (1990). Quartz is a non-porous and non-layered mineral, and
therefore the actual area of surface is supposed to be equal to the specific
surface area. In this study, the surface of quartz is considered as a single
binding site which takes the charge for every surface reaction. The sorption
reactions and

The sorption of U(VI) on quartz was investigated and discussed by Huber and
Lützenkirchen (2009) without considering the formation of alkaline metal
uranyl carbonates. The formation of Mg-, Ca-, and Sr–uranyl-carbonato
complexes shows a significant impact on the sorption of uranium on quartz.
This was studied by Nair and Merkel (2011) in batch experiments adding 10 g
of powdered quartz to 0.1 L of water containing rather low U(VI)
concentrations (

Table 1 displays the parameter ranges used to optimize the six parameters selected to calibrate PHREEQC, based on Nair et al. (2014).

Flow chart used to couple

Inverse modeling is a complex issue for modelers as a result of the numerous
uncertainties in model parameters and observations (e.g., Carrera et al.,
2005; Beven, 2006). PSO is an evolutionary optimization algorithm originally
developed by Kennedy and Eberhart (1995), which has proven to be highly
efficient when solving a large collection of case studies from different
disciplines (see, e.g., Poli, 2008). In PSO, each individual of the
population searches for the global optimum in a multi-dimensional parameter
space, considering the individual and collective past experiences. The
canonical PSO algorithm starts with a random initialization of the particles'
positions and velocities within the parameter space. Velocity and position of
each particle in the parameter space are updated in successive iterations
following equations specific to the selected PSO version, in order to find
the minimum or (maximum) value of a user-defined objective function (see a
complete description in Zambrano-Bigiarini and Rojas, 2013). In the last
decades, several improvements have been proposed to the canonical PSO
algorithm, and the selected optimization tool implements several of them in a
single piece of software. The hydroPSO R package v0.3-3 (Rojas and
Zambrano-Bigiarini, 2012; Zambrano-Bigiarini and Rojas, 2013, 2014) is a
model-independent optimization package, which implements a state-of-the-art
PSO algorithm to carry out a global parameter optimization, and it has been
successfully applied as calibration tool for both hydrogeological and
hydrological models (Zambrano-Bigiarini and Rojas, 2013; Thiemig et al.,
2013; Abdelaziz and Zambrano-Bigiarini, 2014; Bisselink et al., 2016). In
particular, hydroPSO implements six PSO variants (equations used to update
particles' position and velocities), four topologies (ways in which particles
are linked during each iteration), two initialization of particles' positions
(random uniform distribution or Latin hypercube sampling), and five
alternatives for initializing particles' velocities, among other fine-tuning
options (see Zambrano-Bigiarini and Rojas, 2013). In the application of
hydroPSO to PHREEQC, the following configuration was used: a swarm with
10 particles, 200 iterations, LH initialization of particle positions and
velocities, random topology with five informants, acceleration coefficients

For numerical optimization, the residual sum of squares (RSS or SSR; see
Eq. 1) was utilized to compute the goodness of fit (GoF) between the
corresponding model outputs (

One approach to evaluate model performance is by plotting the simulation
against observed values (i.e., visualizing model outputs), as shown in
Fig. 1. The coefficient of determination (

Scatter plot with the experimentally observed and calculated values of uranium carbonate (sorption percentage).

In hydroPSO, there are two types of criteria for convergence:

“absolute”, when the global optimum found in a given iteration is below/above a user-defined threshold (useful for minimization/maximization problems where the true minimum/maximum is known); and

“relative”, when the absolute difference between the model performance in the current iteration and the model performance in the previous iteration for the best performing particle is less than or equal to a user-defined threshold (useful to prevent too many model runs without any improvement in the optimum found by the algorithm).

Evolution of the normalized swarm radius (

The boxplots in Fig. 4 are graphical representations of the values sampled
during optimization. The bottom and top of the box show the first and third
quartiles of the distribution of each one of the surface/sorption reaction
constants (

Boxplots for the optimized parameters. The horizontal red lines indicate the optimum value for each parameter. Parameter names are defined in Table 1.

Quasi-three-dimensional dotty plots.

Quasi-three-dimensional dotty plots in Fig. 5 depict the goodness-of-fit values achieved by different parameter sets. They are suitable for identifying ranges where different sets of parameters lead to the same model performance (equifinality, Beven, 2006). So, Fig. 5 also shows the model performance as function of the interaction of different parameter ranges. The (quasi-)three-dimensional dotty plot shown in Fig. 5 is a projection of the values of pairs of parameters onto the RSS response surface. Parameter values where the model presents high performance are shown in light blue (points density), whilst the parameter values where the model shows low performance are shown in dark red (points density). Figure 5 was used to identify regions of the solution space with good and bad model performance.

Empirical cumulative density functions for each calibrated parameter.

Histograms of calibrated parameter values. Horizontal axis shows the sampled range for each parameter, and the vertical axis represents the amount of parameter sets in each of the classes used to divide the horizontal axis.

Visual inspection of Fig. 5 shows a good exploratory capability of PSO because the particles are well spread over the entire range space. It is clearly visible that the parameter samples are denser around the optimum value (lowest SSR), showing a small uncertainty range around the optimum value.

Correlation matrix between model performance (SSR) and calibrated
parameters. Red lines represent lowest smoothing, using locally weighted
polynomial regression, and numbers in the upper panel represents the
Pearson-moment correlation coefficient between each pair of parameters.
Vertical and horizontal axes illustrate the physical range utilized for
parameter optimization.

Figures 6 and 7 give a graphical summary for optimized parameters. Empirical
cumulative density functions (ECDFs) in Fig. 6 show the sampled frequencies
for the six calibrated parameters. The horizontal gray dotted lines show the
median of the distribution (cumulative probability equal to 0.5), while the
vertical gray dotted lines depict the corresponding parameter value displayed
at the top of every panel in Fig. 6. The thin vertical red line in Fig. 7 points out
the optimum value achieved for each parameter. Histograms in Fig. 7 show
near-normal distributions for

Observed and simulated sorption of uranium in quartz vs. pH with
both PEST and hydroPSO calibrated

Figure 8 illustrates the correlation matrix among

Figure 9 shows the model output using hydroPSO fitted

It is worthwhile to mention that the surface complexation constants for
Eqs. (1), (2), and (5) (Table 1) are more important, and the equations that
are less important are Eqs. (3), (4), and (6) in optimizing the

The experimental conditions used to calibrate PHREEQC with hydroPSO were the
same as during the PEST optimization carried out by Nair et al. (2014). In
other words, PEST was applied for the same experiment and the same data, and
Fig. 9 shows that the

The coupling of hydroPSO and PHREEQC was successfully carried to estimate surface complexation constants for uranium (VI) species on quartz, based on a data set published by Nair and Merkel (2011), and Nair et al. (2014). The open-source hydroPSO R package proved to be a useful tool for inverse modeling of surface complexation models with PHREEQC and allowed a prompt evaluation of the calibration results. Furthermore, thermodynamic values obtained with hydroPSO provided a better match to observation sorption rates in comparison to those obtained with PEST, using the same input data and experimental setup.

PHREEQC is available at

All authors contributed to the writing of the paper. RA developed the coupling of PHREEQC and hydroPSO, carried out all simulations, and prepared the manuscript. MZB, BJM, and SN were involved in visualizing and writing some chapters. RA and co-authors contributed in reviewing and editing.

The authors declare that they have no conflict of interest.

The authors thank the topical editor Claire Levy and the anonymous reviewers whose helped us to improve the original manuscript significantly. The authors would also like to thank Autumn Dinkelman for proofreading this paper. Edited by: Claire Levy Reviewed by: two anonymous referees