# Numerical Simulation of Non-Linear Models of Reaction--Diffusion for a DGT Sensor
## 4 Results and Analysis  
Initially, the algorithm was implemented in FORTRAN and used to calculate the concentration profiles in a DGT, when it was introduced into a solution containing a metal (M) and a ligand (L) that react according to the scheme  
\[\mathrm{M}+\mathrm{L}\ \xrightleftharpoons[k_{\mathrm{d}}]{k_{\mathrm{a}}}\ \ \mathrm{ML}. \tag{28}\]  
Figure 6 shows the normalized concentration profiles for metal (\(q_{\mathrm{M}}\)) and complex (\(q_{\mathrm{ML}}\)) in the DGT numerically computed after 4-h of deployment.  
Figure 5: Scheme of space discretization.  
Numerical results are in good agreement with the experimental accumulation of Cd by DGT sensors in Cd-NTA systems [3]. Also, our results are in full agreement with the data obtained by simulating the same physicochemical system using commercial COMSOL Multiphysics(r) software (COMSOL, Inc., Los Altos, CA, USA).  
Besides, systems containing a mixture of metal and various ligands were successfully simulated [16], showing a higher computer speed than commercial software. Table 1 shows a comparison in computing times between our program and the commercial COMSOL Multiphysics(r) software, for the case of a DGT that was submerged during 4-h in solution containing a metal (M) and one or more ligands (L).  
Although the finite differences method was used, the method adopted for spatial discretization is not essential in terms of the work shown. As it was already explained, the suggested algorithmic novelty consists of proper database management, parallel to the iterative resolution of the non-linear system, solving species one by one for every time. Thus, for a standard simulation involving the resolution of hundreds of tri-diagonal systems, the computational cost is proportional to the number of points \(n\). Instead, trying to solve a few systems of complete linear equations, whose dimension equals to \(n\) times the number of species (\(numeq\)), the computational cost will be proportional to the cube, not of \(n\), but of \(n\times numeq\). The gain in runtime is clear; it is enough to consider \(n=1000\), whatever the number of involved chemical species, to realize that. Certainly, the finite elements method would increase a little more the speed of the simulations, so the possibility of its use should not be rejected. However, the proposed iterative scheme has proved to be efficient even in the worst possible scenarios, as is the use of finite difference method.  
\begin{table}
\begin{tabular}{l c c c} \hline \hline  & **1 M + 1 L** & **1 M + 2 L** & **1 M + 14 L** \\ \hline Program & 3’ 35” & 5’ 01” & 45’ 31” \\ COMSOL & 10’ 11” & 14’ 25” & 1 h 6’ 34” \\ \hline \hline \end{tabular}
\end{table}
Table 1: Computing time for simulation of the diffusion–reaction processes for a DGT deployed 4 h in solutions containing one metal (M) and one or more ligands (L).  
Using this algorithm, analysis of rigorous digital simulation of the diffusion-reaction processes in experimental accumulation by DGT sensors in several systems led to important theoretical developments related to DGT functioning [3; 17; 18; 19].