## 2 Materials and Methods
#### 3.1.1 Change in pH Value  
An increase in the pH value is observed at all current densities, and the dynamics of this increase depend on the applied current intensity (Figure 1a).  
At the lowest current density, the solution's pH value rises gradually over the first 20 min and then stabilises at around 8.4. The higher the current density, the faster the final pH value is reached. In addition to the current density, the initial pH value also affects its change during the EC process (Figure 1b). The higher the initial pH value, the faster the final (stable) value is reached. Regardless of the initial conditions, the final pH of the TY solution is around 8.4 in all experiments, which is consistent with the literature data [58; 59; 60]. During the EC process, the pH of the solution shifts from acidic (or neutral) to alkaline, and a minimum pH of 8.0 is expected at the end [61]. The main cause of the pH increase under acidic conditions is the reduction of water at the cathode, which leads to the production of gaseous hydrogen and hydroxide ions (OH)- [59; 60; 62].  
\[2\mathrm{H_{2}O}+2\mathrm{e^{-}}\to 2\mathrm{OH^{-}}+\mathrm{H_{2}} \tag{1}\]  
The pH change is also influenced by the electrochemical dissolution of the anode, during which Al\({}^{3+}\) ions are released:  
\[\mathrm{Al}\rightarrow\mathrm{Al^{3+}}+3\mathrm{e^{-}} \tag{2}\]  
Figure 4: Three-dimensional surfaces of output parameters (\(T\), pH, \(c\) = \(f\) (\(t\), initial pH)) for: (**a**) 0.008, (**b**) 0.016, and (**c**) 0.024 A cm\({}^{-2}\).  
If the anode potential is sufficiently high, secondary reactions can also occur, in particular oxygen evolution [47; 62; 63; 64]:  
\[2\mathrm{H_{2}O}\rightarrow\mathrm{O_{2}}+4\mathrm{H^{+}}+4\mathrm{e^{-}} \tag{3}\]  
The Al\({}^{3+}\) ions produced at the anode undergo spontaneous hydrolysis reactions, which lead to acidification of the anode environment and the formation of various monomeric species, according to the following order:  
\[\mathrm{Al^{3+}+H_{2}O}\rightarrow\mathrm{Al(OH)^{2+}+H^{+}} \tag{4}\]  
\[\mathrm{Al(OH)^{2+}+H_{2}O}\rightarrow\mathrm{Al(OH)^{+}_{2}+H^{+}} \tag{5}\]  
\[\mathrm{Al(OH)^{+}_{2}+H_{2}O}\rightarrow\mathrm{Al(OH)_{3}+H^{+}} \tag{6}\]  
This is a simplified scheme, as dimeric, trimeric, and polynuclear hydrolysis products of aluminium can also be formed, e.g., Al\({}_{2}\)(OH)\({}_{2}\)\({}^{4+}\), Al\({}_{3}\)(OH)\({}_{4}\)\({}^{5+}\), Al\({}_{6}\)(OH)\({}_{15}\)\({}^{3+}\), Al\({}_{7}\)(OH)\({}_{17}\)\({}^{4+}\), Al\({}_{8}\)(OH)\({}_{20}\)\({}^{4+}\), Al\({}_{13}\)O\({}_{4}\)(OH)\({}_{24}\)\({}^{7+}\), and Al\({}_{13}\)(OH)\({}_{34}\)\({}^{5+}\)[65; 66; 67]. The resulting cationic aluminium hydrolysis products can further react with OH\({}^{\prime}\) ions and finally transform into amorphous Al(OH)\({}_{3}\) in the bulk solution through complex precipitation kinetics [62; 65; 66; 67]. The mode of action of the coagulant (Al\({}^{3+}\)) in the EC process is generally explained by two interrelated mechanisms: the charge neutralisation of negatively charged colloidal particles by cationic hydrolysis products and adsorption of impurities on the amorphous hydroxide precipitate (the so-called \"sweep flocculation\"). Based on theoretical predictions and data from the literature, the formation of the Al species mentioned strongly depends on the pH value [68]. At a pH below 3.5, Al\({}^{3+}\) is the predominant species. However, at a pH of 4\(-\)9, the predominant chemical Al species is Al(OH)\({}_{3}\)(s) (and its polymerised species), which has a large surface area useful for the rapid adsorption of soluble organic compounds and for the trapping of colloidal particles. However, at a higher pH (\(>\)9), the predominant species is Al(OH)\({}_{4^{-}}\), which does not coagulate pollutants [68; 69; 70].