Introduction

Water has played an important and diverse role in human life and civilisation, so water-related issues such as scarcity and poor water quality must be addressed1. One of the most successful solutions to this problem is the management of non-renewable water resources, especially in developing countries. Greywater (GW) reuse is an essential water conservation approach2. GW is a fraction of domestic wastewater from showers, handwashing basins, laundry, and kitchen sinks, whereas black water includes wastewater from toilets and bidets. GW accounts for 50–75% of water usage; hence, reusing GW can be an excellent technique for addressing water scarcity. GW contains fat, oil, numerous anions and cations, other organic compounds from cooking, and residues from daily personal care products such as toothpaste, shampoo, soap, shower gel, and detergent surfactants. Toxic micropollutants, such as those from personal care and home items, are also found in GW3.

Most treatment methods for removing total suspended solids (TSS) and organic matter have opted to meet the regulations and needs of GW reuse, such as irrigation and toilet flushing. Coagulation/flocculation4 or biological treatment processes such as constructed wetland5, rotating biological contactor (RBC)6, sequencing batch reactor (SBR)7, membrane bioreactor (MBR)8, and up-flow anaerobic sludge reactor (UASB)9 have been proved not to offer the full treatment of GW. It should also be noted that each of these processes has their own drawbacks. For instance, constructed wetlands have low selectivity and need a large surface area; regeneration of adsorbents is a crucial factor in adsorption processes, and membrane filtration technologies usually require high operating costs10. On the other hand, advanced oxidation processes (AOPs) have been widely used in recent years to treat various effluents and have been proven to be fruitful. According to findings published in the scientific literature, AOPs can improve industrial wastewater biodegradability, eliminate micropollutants from polluted water, and offer high-quality water for reuse11. To limit the risk of human contact, GW reuse for agriculture activities requires advanced treatment. Several advanced oxidation processes, such as Fenton oxidation12, persulfate oxidation13, photocatalysis14, photooxidation15, photo-Fenton16, and ozonation17,18, have been studied for this purpose.

During the last decade, special attention was paid to hybrid processes for treating different effluents. Among them, electrocoagulation (EC) successfully removes several organic and inorganic matter from wastewater19,20,21. When it comes to treating a wide range of wastewater, EC has shown to be a flexible method22. Agglomeration of contaminants is accomplished via the EC method, which employs electrochemically created iron and aluminium coagulants (Fig. 1a)23. The oxidation of anodes produces cations (Fe3+ and Al3+) that can destabilise colloidal systems24. Recently, AOPs have been coupled by this process to create free radicals for the oxidation of organic molecules to increase the performance of the EC process. Even yet, it is true that the EC/AOPs technique can be applied to separate and destroy a wide range of contaminants25.

Figure 1
figure 1

Principal reactions in (a) electrocoagulation and (b) electrooxidation process.

Electrooxidation (EO) oxidises pollutants by forming hydroxyl radicals on the anode or creating oxidants in the solution26. Its performance highly depends on the anode material27. Anodic oxidation can be indirect or direct based on the responsible reaction mechanism. However, partial oxidation occurs in indirect oxidation, while full mineralisation occurs in direct oxidation28. During direct oxidation, also called electrochemical oxygen transfer reaction, after adsorbing onto the anode surface, direct electron transport oxidises pollutants on the anode. In contrast, during indirect electrooxidation, also termed mediated anodic oxidation, chemical oxidants are produced in situ via anodic oxidation, such as active chlorine and persulphate or via cathodic reduction, such as hydrogen peroxide. It is also possible to produce active chlorine species by electrooxidation in the presence of chloride ions (Fig. 1b). The production pathways of hydroxyl radicals and active chlorine species are given in Eqs. (1), (2), (3) and (4)29.

$${\text{M }} + {\text{ H}}_{2} {\text{O}} \to {\text{M}}({}^{ \cdot }{\text{OH}}) \, + {\text{ H}}^{ + } + {\text{ e}}^{ - }$$
(1)
$${\text{2H}}_{{2}} {\text{O}} \to {\text{O}}_{{2}} + {\text{ 4H}}^{ + } + {\text{ 4e}}^{ - }$$
(2)
$${\text{2Cl}}^{ - } \to {\text{Cl}}_{{2}} + {\text{ 2e}}^{ - }$$
(3)
$${\text{Cl}}_{{2}} + {\text{ H}}_{{2}} {\text{O}} \to {\text{ClOH }} + {\text{ Cl}}^{ - } + {\text{ H}}^{ + }$$
(4)

Compared to other advanced oxidation processes, EO offers several advantages, such as eliminating the need for chemicals, the small footprint, and the reduction of pathogens30. Various electrodes coated with metal oxides have been examined for their electrocatalytic activity in the EO process. These anodic electrodes include graphite, Ti/Pt, Ti/Pt-Ir, Ti/PbO2, Ti/PdO-Co3O4 and Ti/RhOx-TiO2, Ti coated with oxides of Ru/Ir/Ta and BDD31. Ghimire et al.32 investigated using mesh-type platinum-coated titanium (Ti/Pt) to reduce COD and ammonium in domestic wastewater. They found that the indirect electrooxidation of pollutants proceeded well on a Ti/Pt anode, which achieved over 97% removal efficiency. In addition to enhancing the process, various anodically-generated oxidising agents such as peroxide, Fenton’s reagent, sodium chloride, chlorine, hypochlorite, or peroxodisulfate were added to the wastewater to react with both organic and inorganic pollutants.

Barisci et al.33 compared eight combinations of electrodes in treating domestic GW by EC and found that the highest COD removal was attained with the Al–Fe–Fe–Al combination at a current density of 1 mA/cm2 and an initial pH of 7.62. These operation conditions yielded almost complete anionic surfactant (MBAS) removal, while COD concentration reduced from 229 to 4.4 mg/L. No noticeable improvement in process performance was observed at the highest current density tested (1.5 mA/cm2). Other studies have also shown the practicality of EC for GW treatment34.

In contrast to EC, EO is a more time-consuming process but reliably eliminates pollutants35. Low or no chemical requirements and ease of application make EC and EO the most promising electrochemical treatment methods36. Rubí-Juárez et al.37 treated a carwash wastewater, the character of which was very close to GW, by the integrated EC-EO process using Al and boron-doped diamond (BDD) electrodes and reached 82% COD removal.

To the best of the author’s knowledge, there is no scientific research in which the combination of these processes is used to treat real GW, and the only EC-AOP process used in this area was the EC-Ozone combination17,18. The treatment of GW by the hybrid EC-EO process using an Al anode and iron cathode in EC and Ti/Pt anode and stainless steel cathode in EO was proposed for the first time, which also overcomes the relatively high operating costs of the AOPs. This process was previously used for dairy wastewater treatment and proved effective as Ti/Pt is a stable material for electrooxidation38.

According to the literature39, EO has successfully removed pollutants from water containing soluble organic matter. However, it is unsuitable for purifying water with a high suspended solids concentration. As a result, before directing wastewater to an EO treatment system, it is necessary to treat it first using a proper method to eliminate the suspended solids. Therefore, this study combined the EO system with the EC method to effectively remove COD, colour, turbidity, and TOC from GW. Additionally, Response Surface Methodology (RSM) and Central Composite Design (CCD) were used to optimise the effect of key variables on the performance of the EC-EO hybrid process in terms of turbidity, colour, and organic matter (COD and TOC) removal. The optimised variables were the current density, initial pH and electrolysis time.

Materials and methods

GW characterisation

The required samples of GW were collected from residential units (generated from bathtubs, showers, hand basins, kitchen sinks, and laundry room sinks) in Qazvin, Iran, using polypropylene containers and stored at 4 °C in the laboratory. Characterisation of these GW samples is outlined in Table 1, which shows that the GW samples have high strength compared to the published data, the COD concentrations varied between 1300 and 2000 mg/L (average 1560 mg/L), and intense colour (850–2000 ADMI) was observed. The turbidity of the samples ranged from 150 to 500 NTU, which is attributed to high particulate matter content (particularly COD and particulate matter).

Table 1 The characteristics of raw GW used in the present study.

Analytical methods and instruments

All analyses were performed following the Standard Methods42. COD was measured according to 5220 D: Closed Reflux, Colourimetric Method using a digestion reactor (LT200, Hach, USA) and direct reading spectrophotometer (DR 6000: UV–Vis, Hach, Germany) at a wavelength of 620 nm. After acidification, the TOC content of samples was determined following the 5310B: High-Temperature Combustion Method using a multi-parameter TOC analyser (CONSORT C831, Belgium). Turbidity and colour measurements were conducted according to 2130 B: Nephelometric Method and 2120 F: ADMI Weighted-Ordinate Spectrophotometric Method, using a spectrophotometer (2100 AN, Hach, Germany) and a spectrophotometer (DR 6000 UV–Vis, Hach, Germany), respectively. A digitally calibrated conductometer (Leybold 666,222, Germany) and a multi-parameter analyser (CONSORT C831, Belgium) were used to measure the electrical conductivity and pH of the samples, respectively. The removal of GW was calculated using the following equation43:

$${\mathrm{R}}_{\mathrm{e}}\left(\mathrm{\%}\right)=\frac{\left({\mathrm{C}}_{0}-{\mathrm{C}}_{\mathrm{t}}\right)}{{\mathrm{C}}_{0}}\times 100$$
(5)

where C0 and Ct are the initial and final concentrations of the pollutants, respectively.

Experimental set-up of batch sequential EC-EO and procedure

Figure 2 depicts the experimental set-up. In the EC reactor, the Al anode and Fe cathode were connected to a direct current power supply (model JPS303D, Iran) to supply adjustable voltage (0–30 V) and applied current (0–3 A) in a monopolar arrangement. EC electrodes had a surface area of 40 cm2 and an inter-electrode spacing of 1 cm. A magnetic stirrer (model SHA R-50, Iran) was used to ensure the complete mixing of the fluid throughout the EC cell. In each run, 550 mL of GW was fed into the EC reactor after pH adjustment using H2SO4 or NaOH (1 M). The effluent of EC then flowed through the EO cell, which has a similar configuration to the EC unit with mesh-type platinum-coated titanium (Ti/Pt) with the dimensions of 14 × 10 × 1 mm as anode and flat-plate stainless steel (grade 304) of the same size as a cathode. The material used for the anode had a platinum coating of 1 µm thickness. It was produced through a series of processes, including punching, pulling, annealing, acid-washing, and coating.

Figure 2
figure 2

Experimental set-up used in the present study.

After each run, a sample of 20 mL was drawn with a syringe from the centre of the EO reactor at specified time intervals. The effluent samples were analysed after centrifuging at 3000 rpm for 15 min. EC electrodes were cleaned completely with sandpaper and rinsed with water at the end of each run to eliminate any solid residues on the surfaces to avoid passivation.

Response surface methodology

RSM and CCD are effective statistical tools for modelling and optimising the simultaneous impacts of key parameters within a four-factor, five-level framework44,45. These five levels are categorised as two axial points, two factorial points, and one central point for each variable. These two statistical tools were used in this study for the modelling and optimising the effects of four key variables, namely current density (0.75–3.75 A), initial pH (2–12), EC time (10–50 min), and EO time (15–95 min), on the performance of the EC-EO process in terms of COD, colour, turbidity, and TOC removal efficiency. The four variables are coded as shown in Table 2, noting that -α and + α represent the extreme levels for each variable.

Table 2 The coded levels and range of the studied variables.

Factorial designs only predict the variables’ linear trend and cannot determine curvature or critical points in the designed space46; therefore, RSM was used to model the process with the least number of experimental runs and with a precise analysis of the variables in different formats. Based on the number of variables, a specific number of experiments are designed according to the following equation:

$$E = 2^{v} + 2V + P$$
(6)

where E is the number of demanded experiments for analysis, V is the number of independent variables, and P is the number of replications at the central point. Twenty-nine trials were designed using parameters from a framework of four variables and five stages in the present study. The empirical model, as shown by Eq. (7), was a second-order polynomial regression, which was used to study the interaction between y and the independent variables:

$$y={\beta }_{0}+\sum_{i=1}^{k}{\beta }_{i}{x}_{i}+\sum_{i=1}^{k}{\beta }_{ii}{x}_{i}^{2}+\sum_{1\le i\le j}^{k}{\beta }_{ij}{x}_{i}{x}_{j}+\varepsilon$$
(7)

where y denotes the result (removal efficiency of COD, TOC, turbidity, and colour in percentage), j is second-order, i is the linear constant, β0 is a constant coefficient, βi is the regression constant, βii is the quadratic coefficient, and βij is the interaction coefficient. Also, xi and xj are the coded independent variables.

Result and discussion

RSM experimental design

After using the five-level coding scheme shown in Table 3, the CCD method was performed to assess the effect of the studied variables on COD, TOC, turbidity and colour removal by the EC-EO process. The number of replications at the central points for each variable is to identify the errors of the model and the quality of the final regression. Among 29 experimental runs, 24 runs were designed in factorial and axial points, while the rest of the runs (#4, #6, #12, #16, and #19) were at the central point (2.25 A, 7, 30 min, and 55 min) replicated.

Table 3 CCD experimental design and the response results for GW treatment using EC-EO processes.

Development and validation of RSM models

The derived model and its parameters were evaluated using the analysis of Variance (ANOVA) technique. Table 4 presents the results, which are used in ANOVA calculations. These calculations involve taking data from each experimental run and using it to determine the terms in the mathematical model. The average and variance of each term are then calculated, along with the mean of the variances of that term. This is done by dividing the sum of the variances of the samples by the degree of freedom (df) of the corresponding term. It can be said that df is defined as the number of parameters used to define the related term47. The mathematical model predicts each response with a specific set of experimental conditions. This prediction is slightly different from the experimental results. The difference between the experimental and mathematical results is defined as the residue of those data. The significance of each term is explained as the ratio of the mean variances of that term to the mean variances of the residuals. The resulting ratio is called the “F-value” of that term, demonstrating the model’s potency in predicting responses in a wide range of operational conditions. The F-value of a model must be more significant than the p-value of the model to acquire the correct results. The COD, colour, turbidity and TOC model F values were calculated as 61, 104.6, 78.17, and 55.97, respectively. Lack of fit (LOF) indicates the weakness of the model or the proportion of the errors resulting from the mathematical inaccuracy of the derived equation. LOF is calculated by replicating limited experiments in the central point discussed in the previous sections. It is anticipated that the F-value of LOF is insignificant48. In the present study, the estimated LOF value for the model was found to be insignificant for all responses (p-value > 0.05), namely the COD, colour, turbidity and TOC (p-values: 0.1577, 0.2356, 0.2959, and 0.1745; respectively). Therefore, it could be said that the model is accepted, suitable, and considerable for pollutant removal using the EC-EO hybrid process. The obtained result shows the deviation between the experimental and predicted data; the residues are due to random errors, which should constitute a normal distribution49. “P-value” is the probability of the hypothesis that an important breakthrough occurs in the model accuracy while adding a specific term, and it is another parameter that demonstrates the significance of the model and the parameter50. It was also found that the P-value was less than 0.0001 for all four responses, confirming that the model was correct and highly significant.

Table 4 ANOVA results of quadratic for COD, colour, turbidity, and TOC removals.

The results shown in Table 4 proved that the developed quadratic model was statistically significant as it has 99% confidence and a p-value of 0.0001 for removing all modelled pollutant parameters. Similarly, all factors have substantial effects on COD removal (ANOVA, p-value < 0.05) except C2 (p-value = 0.3060) and interaction of AC (p-value = 0.3344). For the turbidity removal, all quadratic coefficients (A2, B2, C2, and D2), linear effect of B, and interaction of AC were significant, while the other factors were insignificant. The high values of R2 (0.98) and Adj-R2 value (0.97), the coefficient of variation (C.V.) value (1.15%) and the insignificant value for LOF (23.59) confirmed that the mathematical model is applicable to the turbidity removal according to the various combination of variables values. All interactions except AB and quadratic coefficients of A2 and B2 were insignificant for TOC removal. All linear effects (A, B, C and D) have a substantial impact on TOC removal (except C) and colour removal (except B). Relatively high values of R2 verified the applicability of the quadratic model developed for both colour and TOC removals from GW by the EC-EO hybrid process.

The predicted vs. actual plot in Design Expert software shows R2 in graphical form; see Fig. S1. Experimental data are anticipated to be distributed evenly and with the minimum deviation from the predicted data in the R2 graph. Fig. S1 clearly shows that all the responses and experimental data are well distributed on the y = x line, indicating the accuracy of the regression and the polynomial model.

The residuals are anticipated to be mostly from random errors, which should be distributed normally. As seen in Fig. S2, the residuals are distributed semi-evenly around the normal line, which indicates the prediction potency of the model.

RSM could not derive cubic or higher exponent equations due to the limited number of tests. However, it is capable of modelling data in a quadratic equation. For all four responses, the quadratic equation with coded coefficients (− α, − 1, 0, 1, + α) for each term is demonstrated in Eqs. (8) to (11). The coded equations are proportional to the real states in their coefficient; however, the coefficients are scaled to the dimensions that the variables are analysed in a three-dimensional space. In the equation, the bigger the absolute value of a term, the more impact it makes on the response. Also, the negative coefficients represent the adverse effect on the response.

$$ \begin{aligned}{\text{COD removal }}\left( \% \right) \, & = \, + {93}.{66 } + { 2}.0{\text{1 A }} - \, 0.{\text{84 B }} - \, 0.{\text{71 C }} + { 2}.00{\text{ D }} - { 2}.{\text{28 AB }} + \, 0.{\text{29 AC }} - { 2}.0{\text{8 AD }} \\ &\quad+ \, 0.{\text{89 BC }} - {1}.{\text{21 BD }} + { 2}.{\text{44 CD }} + \, 0.{\text{79 A}}^{2} \, - { 4}.{\text{54 B}}^{2} \, - \, 0.{\text{24 C}}^{2} \, + \, 0.{\text{74 D}}^{2}\end{aligned} $$
(8)
$$ \begin{aligned}{\text{Colour removal }}\left( \% \right) \, & = \, + {95}.{67 } + { 5}.{\text{49 A }} + \, 0.{\text{36 B }} + \, 0.{\text{74 C }} + { 1}.0{\text{1 D }} - \, 0.{\text{52 AB }} + \, 0.0{\text{7 AC }} - \, 0.{\text{69 AD }} \\ &\quad+ { 1}.{\text{15 BC }} - \, 0.{5}0{\text{ BD }} + \, 0.{\text{15 CD }} - {2}.{6}0{\text{ A}}^{{2}} - \, 0.{4}0{\text{ B}}^{{2}} - \, 0.{\text{41 C}}^{2} - \, 0.0{\text{4 D}}^{{2}}\end{aligned} $$
(9)
$$ \begin{aligned}{\text{TOC removal }}\left( \% \right) \, & = \, + {95}.{322 } - { 3}.0{\text{1 A }} - { 3}.{\text{28 B }} - \, 0.0{\text{6 C }} + { 2}.00{\text{ D }} - { 1}.{\text{21 AB }} + \, 0.{\text{51 AC }} + \, 0.0{\text{5 AD }} \\ &\quad+ \, 0.{\text{28 BC }} - \, 0.{\text{69 BD }} + \, 0.{\text{17 CD }} - \, 0.{\text{39 A}}^{{2}} - { 3}.{\text{11 B}}^{{2}} - \, 0.{\text{81 C}}^{{2}} - \, 0.{\text{11 D}}^{{2}}\end{aligned} $$
(10)
$$ \begin{aligned}{\text{Turbidity removal }}\left( \% \right) \, & = \, + {93}.{648 } - \, 0.0{\text{5 A }} - { 9}.{1}0{\text{ B }} + \, 0.{\text{38 C }} + \, 0.{\text{43 D }} + \, 0.{\text{33 AB }} + \, 0.{\text{87 AC }} \\ & \quad+ \, 0.{2}0{\text{ AD }} + \, 0.{\text{65 BC }} + \, 0.{\text{58 BD }} - \, 0.0{\text{9 CD }} - \, 0.{\text{75 A}}^{{2}} \\ &\quad- { 2}.{\text{89 B}}^{{2}} - \, 0.{\text{81 C}}^{{2}} - {\text{ 1.04 D}}^{{2}}\end{aligned} $$
(11)

Model analysis via 3-D surface

Effect of current density and initial pH on the process performance

Electrochemically produced Al3+ undergoes hydrolysis in the bulk solution to form hydrolysis products, which involve charge neutralisation and sweep flocculation of colloids or adsorption of pollutants onto Al hydroxide during EC process51. Increasing initial pH and current density speed up these hydrolysis-polymerisation reactions. \({\text{Al}}{{\text{(H}}_{2}\text{O)}}_{4}{\text{(OH)}}^{2+}\), \({\text{Al}}{{(\mathrm{H}}_{2}\mathrm{O})}_{5}{(\mathrm{OH})}^{2+}\), \({\text{Al}}{(\mathrm{OH})}^{2+},\) \({\text{Al}}{\text{(OH)}}_{2}^{+}\), \({\text{Al}}{(\mathrm{OH})}_{4}^{-}\), \({\text{Al}}_{2}{\text{(OH)}}_{2}^{4+}\), \({\text{Al}}_{6}{\text{(OH)}}_{15}^{3+}\), \({\text{Al}}_{7}{\text{(OH)}}_{17}^{4+}\), \({\text{Al}}_{8}{\text{(OH)}}_{20}^{4+}\), \({\text{Al}}_{13}{\text{(OH)}}_{34}^{5+}\), and \({\text{Al}}_{13}{{\text{O}}}_{4}{\text{(OH)}}_{24}^{7+}\) can form through these reactions depending on the solution pH51,52,53,54. In the pH range of 4–7, the positively charged polymeric Al hydroxo complex species dominate in the reaction solution. These species are important in destabilising negatively charged particles through charge neutralisation. Among the polymeric species, Al13 is the dominant species in situ formed during 5–15 min of EC time in the pH range of 5–7 at low current intensities51. Al13 is more readily available for adsorption and charge neutralisation at around neutral pH55. Amorphous Al(OH)3(H2O)3 forms in the pH range of 5–8, providing a larger surface area for rapid adsorption of soluble organic compounds and trapping of the colloidal pollutants56. At alkaline pH values (> 9), this destabilisation capacity reduces as negatively charged \({\text{Al}}{\text{(OH)}}_{4}^{-}\) becomes dominant species51, or the number of positive surface sites of freshly formed Al(OH)3 to be attached decreases at a pH higher than pHzpc of 8.457.

Figure 3a–d revealed a strict relationship between initial pH and current density. While almost complete turbidity removal was achieved at an initial pH of 2, the lowest pollutant removal efficiencies were obtained at an initial pH of 12. Removal efficiencies of all pollutants were practically the same at a current density of 2.25 and an initial pH of 7. Such a high turbidity removal performance attained at an initial pH of 2 was attributed to the combined effect of charge neutralisation and sweep flocculation. This effect was clearly apparent when EC was initiated at pH 4.5. In the initial pH range of 4.5–7.0, an improvement in organic matter (COD and TOC) removal performance was evident. A similar improvement was also observed when the current density increased from 0.75 A to 3.75 A. Two mechanisms are responsible for organic matter removal; the first is adsorption/entrapment on freshly produced Al(OH)3(H2O)3 flocs. This mechanism was also responsible for turbidity removal in EC operation. The second mechanism is indirect oxidation in the EO reactor at acidic pH values58,59. EC-EO process performance tended to reduce at alkaline initial pH values due to the formation of \({\text{Al}}{\text{(OH)}}_{4}^{-}\), decrease in active sites on the surface of Al(OH)3(H2O)3 flocs and poor oxidative properties. Nevertheless, it could be inferred that the decolourisation rate was not significantly affected by initial pH and current density (except 0.75 and 1.5 A) as more or less the same colour removal efficiencies were attained at current intensities of 2.25 and 3.0 A.

Figure 3
figure 3

Effect of current density and initial pH on (a) COD removal, (b) TOC removal, (c) turbidity removal, and (d) colour removal.

Effect of electrolysis time on the process performance

A closer inspection of data in Figs. 4 and 5 demonstrated that both EC and EO times have similar effects on process performances. Nevertheless, a slight difference between the response surfaces (cf; Figs. 4a and 5a) of COD removal performances is also evident. Although the shortest EC and EO times (10 and 15 min, respectively) yielded almost equal pollutant removal efficiencies at 2.25 A and initial pH 7, increasing the EO time from 55 to 95 min resulted in 7% additional COD removal (99.78%). Similar improvement in organic matter removal was also observed at initial pH 4.5 and current intensities of 1.5 and 3.0 A for a constant EC time of 40 min. For instance, extending the EO time from 35 to 75 min at a current density of 3.0 A and an EC time of 40 min, COD and TOC removal efficiencies increased from 91.87% and 89.81% to 97.5% and 96.4%, respectively. At the current density of 1.5 A, initial pH of 4.5 and EC time of 20, almost complete mineralisation corresponding to 99.39% TOC removal was achieved by extending EO to 75 min. Based on the data, it could be concluded that an extension in EO time promoted further degradation of organic matter via indirect oxidation. The data obtained from run 28 also confirmed this conclusion. Virtually complete COD removal (99.78%) and high TOC and colour removals (97.43% and 97.78%, respectively) were obtained by prolonging the EO time to 95 min. 20-min extension, either from 20 to 40 min or 30 to 50 min in EC time, remarkably reduced COD and TOC removals, which could be explained by a decrease in the concentration of positively charged polymeric Al species promoting charge neutralisation or in the capacity of Al hydroxide flocs as solution pH shifted to its pHzpc. Considering that almost the same colour and turbidity removal efficiencies were attained at the same current density (i.e. 1.5 or 3.0 A) and initial pH of 4.5 without affecting EC and EO times applied, the main responsible mechanism for removal of both pollutants is the charge neutralisation by positively charged polymeric Al hydroxo complex species or adsorption onto Al hydroxide flocs54.

Figure 4
figure 4

Effect of current density and EC time on (a) COD removal, (b) TOC removal, (c) turbidity removal, and (d) colour removal.

Figure 5
figure 5

Effect of current density and EO time on (a) COD removal, (b) TOC removal, (c) turbidity removal, and (d) colour removal.

Comparison with the scientific literature

It should be noted that a limited number of the studies dealt with treating GW by electrochemical processes. For example, in the study of Nasr et al.56, the GW was treated using EC having Al electrodes, and turbidity removal increased with increasing amperage and extending reaction time up to 30 min, and increasing the EC time did not provide additional improvement in turbidity removal. Bani-Melhem et al.60, who used the EC method to remove COD and turbidity from solutions, reported that (i) the COD removal efficiency increased up to 96% with increasing the applied current density up to 9.36 mA/cm2, (ii) turbidity removal efficiency exceeded 98.5% when the applied current density was greater than 7.02 mA/cm2 and (iii) 15 min electrolysis time was sufficient to remove 96% COD removal. Similar effects were also noticed by Karichappan, Venkatachalam and Jeganathan41 during the treatment of GW by EC using stainless steel electrodes; the latter noticed that the COD, total solids (SS) and fecal coliform (FC) removal efficiencies increased with the increase of the current density up to 20 mA/cm2 and treatment time up to 15 min, while almost constant removal efficiencies were obtained at the higher current densities (25–30 mA/cm2) and EC times (15–30 min). To the best of the author’s knowledge, no information about the effect of initial pH on EC process performance for GW treatment is available in the literature. Only a few studies investigated pH change during the EC process initiated at the original pH of the GW60,61. Therefore, the authors are not able to compare the results presented for initial pH with literature data. The other operating parameters, such as current density and electrolysis time, exhibited similar trends in the removal of organic matter, colour and turbidity. Based on this evaluation, it could be concluded that our data were consistent with the recent scientific literature56,60,62,63.

Pareto chart analysis

As demonstrated in the ANOVA results, a precise significance level for each variable can be obtained using the sum of squares. In other words, dividing each variable sum of squares by the model sum of squares gives the order of significance of the variables on the response by arranging the variables by the ratio amount. This procedure is completed to four main variables in this process, and it is demonstrated in the Pareto chart in Fig. 6 that for COD removal, current density and EO time have a comparative effect much further than that of the two other variables, accounting for only 8.26% and 8.28, respectively. However, the current density has the main dominant effect on colour removal, with 73.59% of the independent variables’ impact. For TOC removal, current density and pH have the main effects more than EO time, and the effect of EC time on the TOC removal was negligible. Finally, pH has the main effect on turbidity removal, which overshadows other variables nearly completely by 88.44%. The Pareto chart can compare independent variables for their impact on the responses. However, as is evident from ANOVA tables, quadratic and interactive forms of the variables have significant effects in most of the responses. Equation (11) signifies the reaction direction to a high COD removal rate, which occurs in acidic pH with low current density in a long reaction time. On the other hand, Eq. (12) shows that current density and its quadratic form are the most significant variables affecting the colour removal rate further than reaction time. Equation (13) indicates that pH and its quadratic form have the most adverse effect on TOC removal, while EO time mainly contributes to the high TOC removal. Also, Eq. (14) asserts that pH and its quadratic form have the most adverse effect on turbidity removal, which means that most turbidity removal occurs at acidic pH levels. Based on these results, it could be concluded that the impact of variables and their combinations on the responses vary considerably, and it is a complex procedure to find an optimum way in order to maximise all the responses simultaneously. As a result, the RSM optimisation module is exploited in this endeavor.

Figure 6
figure 6

Pareto chart demonstrating the relative significance of the variables on the various responses.

Desirability function and optimisation of experimental conditions

To optimise the process and reach the desired levels of responses simultaneously, the Design Expert was used to predict the optimum operational parameters. In this stage, all responses were given the same importance and weight to be maximised and the operating parameters, including current density, initial pH, EC time, and EO time, were in the range of the definitions. As it is demonstrated in Fig. 7, the software predicted 44 solutions arranged in the order of desirability from 0 to 1. One of the solutions was selected with a desirability of 0.967, which means that the probability of the prediction coming true is about 97%. The level of each factor and the corresponding responses are written below each desirability plot. The software foretells that while maintaining EO time, EC time, current density and pH at 94.5944 min, 31.647 min, 2.63697 A and 4.46296, respectively, the removal efficiencies of COD, TOC, colour, and turbidity are 99.9932%, 99.39%, 99.4392%, and 95.2932%, respectively (with a probability of 97%).

Figure 7
figure 7

Desirability plot for optimisation (the value of variables and responses are written below each curve).

In Fig. S3, the yellow region demonstrates all analogous amounts for initial pH and current density that will result in the desired levels of the responses discussed in the desirability plot. In the yellow region, when the process was conducted at EC time = 31.67 min, and EO time = 93.28 min, current density and initial pH should be 2.6 A and 4.67 to maximise COD, colour, turbidity and TOC removals. To evaluate the optimisation accuracy, results obtained at optimal conditions showed that the COD, colour, turbidity and TOC removals were 96.1%, 97.5%, 90.9% and 98%, respectively, which were close to the predicted results (99.99%, 99.3%, 95.41%, and 99.39%, respectively). This similarity between the measured and predicted results confirms that the model can be employed to optimise the EC-EO process on larger scales.

Operational cost

There is scarce literature on the treatment of persistent organic pollutants using integrated EC-AOPs that has investigated the cost of the operation in real wastewater. EC and EO, standalone treatment technologies, are energy-based, which consume a large amount of energy to degrade such pollutants completely. Therefore, to minimise overall energy consumption, the use of EC as a first treatment stage is recommended. Moreover, EC reduces the longer treatment time of the oxidation process, which leads to a reduction in overall treatment time as well as overall energy consumption. The EC-EO process has been found to be dependent on operational costs, which could be a major drawback, especially in large-scale industrial applications64. Cost determination of the EC-EO reactor was carried out by determining the cost of electricity consumption and the cost of the electrode for treating 1 m3 GW at the optimum conditions (I = 2.6 A, EC time = 31.67 min, EO time = 93.28 min, EC voltage = 25 V, EO voltage = 15 V, and pH = 4.67).

The operating cost (US$/kg) is calculated using Eq. (12), which involves the cost of electrical energy, electrode material, and maintenance.

$$OPC\left(\$/{m}^{3}\right)=\left[a\times {Q}_{energy}\right]+\left[b\times {Q}_{electrode}\right]$$
(12)

a and b are the Iranian Ministry of Energy’s pricing of 0.08 US$ per 1 kWh of energy and the Iranian market’s price of 1.95 US$ for 1 kg of Al and 2500 US$ for 1 kg of titanium, respectively. The energy consumption for each pollutant is designated by Qenergy (kWh/kg pollutant eliminated) (Eq. 13), whereas electrode material consumption is indicated by Qelectrode (kg Al/kg pollutant removed) (Eq. 14)43.

$${Q}_{energy}=\frac{U\times I\times t}{\left({C}_{0}-{C}_{t}\right)\times {V}_{R}}$$
(13)
$${Q}_{electrode}=\frac{{M}_{V}\times I\times t}{Z\times F\times \left({C}_{0}-{C}_{t}\right)\times {V}_{R}}$$
(14)

where C0 and Ct represent the initial and final pollutant concentrations (mg/L), respectively; U refers to the operating electrical potential (volt); I defines the applied current (A); t is the EC and EO time (hour); and VR denotes the effluent volume (L). Electrical energy consumption (EEC) is defined as the amount of electricity consumed per 1 mg of removed pollutants. Operating costs (OPCs) were computed to determine the process’s economic viability. MV is the anode’s molecular mass (Al = 26.98 g/mol in EC and Ti = 47.87 g/mol in EO); Z is the number of transported electrons (Z = 3 for Al and Z = 2 for Ti); and F is Faraday’s constant (96,485.33 C/mol). All chemical consumptions were ignored in the calculation, as Na2SO4 addition was unnecessary under optimal conditions.

The average OPC and energy consumption for the EC-EO process to remove COD, colour, turbidity, and TOC were calculated as 0.014$/m3 and 0.01kWh/kg COD removed, 0.083$/m3 and 0.008kWh/kg colour removed, 0.075$/m3 and 0.062kWh/kg turbidity removed, and 0.105$/m3 and 0.079kWh/kg TOC removed, respectively. Various studies described the operating cost analysis of real wastewater treatment using EC-EO by applying different electrode materials, tabulated in Table 5. As seen in the table, when scaling up the reactor, the cost of the process may change due to various expenses related to the wastewater characteristics, reactor, chemical dosage, and reagent requirements. Hence, it is essential to consider this factor during the scale-up process.

Table 5 Summary of the cost analysis of the EC-EO method described in the literature for real wastewater treatment.

Conclusions

The obtained results indicated that integrating the EC and EO processes offers an applicable combination by taking full advantage of these two methods; the EC method is a rapid and effective method for wastewaters that contain suspended solids but is also an ineffective approach for the elimination of persistent dissolved organic pollutants, and EO can breakdown persistent organic pollutants completely, however, it is also a slow and energy-intensive technique for suspended solids removal. The results also indicated that the efficiency of the EC-EO treatment system in colour and turbidity removal depends on the current density and pH. The results also showed that the best operating parameters were a current density of 2.6 A, EC time of 31.67 min, EO time of 93.28 min and pH of 4.67, which resulted in removal efficiencies of 96.1% (COD), 97.5% (colour), 90.9% (turbidity), and 98% (TOC). The process's energy requirements were 0.01kWh/kg for COD, 0.008kWh/kg for colour, 0.062kWh/kg for turbidity, and 0.079kWh/kg for TOC, with an operating cost of 0.28$/m3. Future research should focus on developing novel and durable photo-active dimensionally stable anodes to extend the lifetime of water electrolysers, reduce operating costs, and improve overall electrochemical system performance. Moreover, to enhance the understanding of the strengths and limitations of each unit, it is recommended to evaluate individual unit performance before integrating them into a complete system. This can be achieved through analyzing the efficiency of the electrocoagulation reactor and electrooxidation cell under different operating conditions, which will offer valuable insights into their respective performance metrics.