## 2 Materials and Methods
### Anode Consumption and Sludge Characterisation
Sedimentation ability is closely related to the mechanism of dye removal, which is described in the literature by five basic steps: (1) oxidation of the aluminium anode and formation of metal ions [75; 76; 77]; (2) formation of oxygen and hydrogen bubbles through water hydrolysis; (3) hydrolysis of metal cations and formation of various coagulating species that destabilise the electrostatic forces between the particles; (4) aggregation of coagulants with dye molecules; and (5) coupling of aggregates with gas bubbles and their ascent to the surface by flotation. The kinetics of sludge formation during EC and its subsequent sedimentation strongly depend on the experimental conditions. An increase in the current density leads to a more intensive dissolution of the Al anode, which results in a larger mass of the generated sludge [47; 48]. Since the amount of Al dissolved depends primarily on the level of current flow and not on the initial pH value, the mass of sludge formed is almost independent of the pH value [47; 48]. On the other hand, sedimentation ability is not determined by the total mass of the sludge, but by the physicochemical properties of the flocs formed [47; 78]. Experimental results show that at higher pH values, larger, more compact, and denser aluminium hydroxide flakes are likely to form, leading to faster separation and settling [16]. Conversely, at lower pH values, smaller and more dispersed aggregates are likely to form, resulting in slower settling, even if the sludge mass is larger [78]. It is important to note that pH also significantly affects removal efficiency. At a lower pH, there is an increased concentration of highly reactive Al\({}^{3+}\) ions and simple hydroxyl species, which effectively destabilise dye molecules through charge neutralisation and adsorption mechanisms [47; 78]. As a result, azo dyes are removed faster and more efficiently at lower pH values than at higher pH values, although the sludge settles more slowly [78]. In addition, lowering the pH enhances the cathodic reduction of water (Equation (3)), resulting in a greater amount of hydrogen microbubbles. These bubbles significantly im  
Figure 6: (**a**) Schematic representation of the determination of the sedimentation ability. Settling ability of the suspensions during settling after the EC process at: (**b**) different current densities (pH = 7.0; RUN 1, 4, and 5) and (**c**) different initial solution pH (\(i\) = 0.024 A cm\({}^{-2}\); RUN 5, 8, and 12). prove flocculation as they aggregate more easily with coagulant particles and adsorbed dye molecules, allowing them to rise to the surface more easily during EC [47]. In summary, although sludge settles faster at higher pH values, probably due to the formation of larger and denser flocs, overall dye removal efficiency is higher at lower pH values due to the higher reactivity of the aluminium ions, higher hydrogen bubble production, and better flocculation [47; 78]. Therefore, the choice of optimal electrocoagulation conditions requires a careful balance between the efficiency of pollutant removal and the dynamics of sludge deposition. Table 4 shows the characterisation of sludge using SEM/EDS analysis. The main elements in all cases are Al and O (from Al(OH)\({}_{3}\)) and C and S (from the removed dye); their content varies depending on the EC process conditions. In some cases, the sludge also contains varying amounts of other elements (Na, Mg, Cl, etc.). The experimental observations regarding removal efficiency suggest that the EC process can be optimised by adjusting parameters such as current density and pH. For example, when the current density increases from 0.008 to 0.024 A cm\({}^{-2}\) at a pH of 7.0, the C content increases from 5% to 50%. When the initial pH is lowered to 3.0, the C content increases to 55-60%. In contrast to C, the content of S in the sludge is significantly lower, but it also increases.