1 Introduction

Water is essential for human life and the environment. In recent years, many pollutants containing dyes from wastewater have posed a significant threat to environmental safety. This is the case for some synthetic dyes, especially those belonging to the xanthene class [1]. A wide range of applications have stimulated interest in xanthene, but some are toxic, either during direct use or as a compound dissolved in aqueous matrices [2]. Erythrosine B (Acid Red 51) is a water-soluble xanthene class of dye and organoiodine compound, specifically a derivative of fluorone defined by a conjugated π system, which leads to strong absorption and leads to the appearance of a characteristic cherry pink color [3]. It is widely used in practical applications for preparations for dyeing in the food, wool, silk nylon, cosmetic, and pharmaceutical industries [4]. Its overuse leads to various medical problems, including the nature of xenoestrogens in humans and animals, thyroid activities, neurotoxicity, carcinogenesis, and DNA damage behavior [5]. For the safety assessment, the acceptable daily intake (ADI) of Erythrosine B (EB) is 0.1 mg/kg body weight (BW)/day [3]. Therefore, rapid and prudent strategies are necessary to remove these dyes [3,4,5,6]. Moreover, the acidic water-soluble reactants are the most problematic contaminants because they tend to pass unaffected by conventional treatment systems. Treatment of colored wastewater is difficult and complicated due to the presence of stable and non-degradable aromatic compounds in the structure of dyes. Advanced oxidation processes (AOPs) have been extensively considered to overcome the dye problem in aquatic systems. Among AOPs, Electrochemical Advanced Oxidation Processes (EAOPs) perform well in removing toxic food dyes due to their high efficacy, less demanding activity, environmental friendliness, and the potential for minimal effort adequacy [7,8,9,10]. As one of EAOPs, electro-Fenton (EF) technology is an emerging and highly effective alternative for waste minimization and conservation [11,12,13,14,15,16]. Electro-Fenton is a technique whereby H2O2 is generated in situ at the surface of the cathode by an oxygen reduction reaction and directly used for the desired process. This approach not only reduces the cost of transport and storage of H2O2 and the chemical risks associated with this compound, but it also theoretically reduces the potential for the immediate decomposition of H2O2, facilitating the effective utilization (Eq. 1). In the next step, the resulting H2O2 could react with ferrous ions which acts as catalyst to generate homogeneous λOH by Fenton’s reaction (Eq. 2). In the last stage, Fe2+ can be continuously regenerated due to the reduction of Fe3+ at cathode surface (Eq. 3), drastically decreasing the formation of iron sludge [17, 18]. The described catalytic cycle accelerates the entire mineralization process. Since the optimum pH is around 3, trivalent iron ions and divalent iron ions are present in the solution. After this, hydroxyl radicals (λOH) can react with organic pollutants (R) until it is eventually oxidized to water and carbon dioxide (Eq. 4) [17].

$${\text{O}}_{2} + 2{\text{H}}^{ + } + 2{\text{e}}^{ - } \to {\text{H}}_{2} {\text{O}}_{2}$$
(1)
$$ {\text{Fe}}^{{2 + }} + {\text{H}}_{2} {\text{O}}_{2} \to {\text{Fe}}^{{3 + }} + {\text{OH}}^{ - } + {\text{HO}}^{ \cdot } $$
(2)
$$ {\text{Fe}}^{{3 + }} + {\text{e}}^{ - } \to {\text{Fe}}^{{2 + }} $$
(3)
$$R + {\text{HO}}^{ \cdot } \to {\text{CO}}_{2} + {\text{H}}_{2} {\text{O}} + {\text{mineral}}\,{\text{ions}}$$
(4)

The generation of hydroxyl radicals is extremely effective for the removal of organic compounds, such as dyes, due to the strong oxidant power of ·OH, which are able to react also with recalcitrant compounds. Another relevant aspect of electro-Fenton process relates to the electrode material used in the mechanism for the hydroxyl radical production. Indeed, these reactive species are usually produced by water discharge at anode surface using anodes with a high overpotential for oxygen evolution reaction [19]. Among them, boron-doped diamond (BDD) is one of the best performing materials due to its high overpotential (2.30 V) [19]. Nevertheless, the high cost (> 104 $ m−2) limits its utilization. In the electro-Fenton process, the hydroxyl radical production is based on reaction (2) between H2O2 and Fe2+ which are continuously generated at cathode usually made of carbonaceous materials which is drastically cheaper than BDD.

In general, the production of H2O2 has a significant effect on the degradation of pollutants in the reaction of electro-Fenton [20]. Hence, it is crucial to search for an effective cathode to achieve high H2O2 production and thus the selection of cathode materials attracted much attention [21,22,23,24,25,26]. Various cathode materials used in the experimental and laboratory range include carbon/graphite felt [12, 27], carbon fiber [28], reticulated vitreous carbon [29], carbon black [30, 31], activated carbon fiber, and walled-carbon nanotubes [32] are reported to offer low-cost, stable, high conductivity, facile preparation, and effective cathode materials for in situ H2O2 electro-generation [33, 34].

Nevertheless, the overall efficiency of an electro-Fenton process depends on many process parameters. The conventional practice is to improve one factor by maintaining other factors fixed, which does not depict the combined effect of all the factors involved. This method requires a high number of experiments to determine the optimum levels, which leads to high costs (longer time and higher materials consumption for doing research) of study and does not consider the interactions between the selected parameters [35]. The disadvantages of the single-factor improvement process can be eliminated by optimizing all the influencing parameters together by statistical experimental design. Furthermore, parameters might have synergistic effects, and the combined effects must be evaluated. Response Surface Methodology (RSM) is a set of statistical and mathematical methods useful for experiment design and model development by considering parameter interactions and process optimization. It features high accuracy, low experimental cost, and excellent prediction performance. RSM can be used to improve chemical processes, which a second-order polynomial equation can describe. It consists of three stages: experiment design, response surface modeling, and optimization [36,37,38]. More in detail, the three phases are as follows: (1) experimental design for determination of process factor’s values ​​based on experiments are conducted and data are collected; (2) experimental modeling of the approximation of the relationship (i.e., the response surface) between responses and factors; and (3) optimization to obtain the best response value based on the experimental model [39]. Types of symmetrical experimental designs include three-level factorial design, central composite design (CCD), Doehlert matrix, and Box–Behnken.

Despite all the health and environmental concerns introduced above about EB, its resistance to conventional wastewater treatment [40], the Erythrosine B oxidation with EAOPs is not deeply investigated. To the best of authors knowledge, most of the studies consider photocatalytic process for the degradation of such xanthene dye [41,42,43], and only two works applied electrochemical processes [7, 44]. More in detail, in the first work, the degradation of EB has been performed using Ti-PbO2 anode [7]. The second one [44] used an electro-Fenton process, but it analyzed the coupling with irradiation source for a photoelectron-Fenton process, and a deeper comprehension of the electro-Fenton performances is still missing.

With this background, the work proposed here aims to evaluate EB dye removal by an electro-Fenton process with Ti/RuO2 (DSA®) as an anode and carbon felt as a cathode. The influence of the primary process parameters (applied current, iron concentration, and stirring rate) and the search of optimal degradation conditions have been investigated with the experimental design methodology through Doehlert design, which helps the pursuit of optimal operating conditions, limiting the number of experiments. In the second part of the study, the optimized results are compared with the performance reported in the literature for dye removal using EAOPs and a preliminary economic analysis is proposed.

2 Experimental

2.1 Chemicals

The dyestuff solution was prepared by dissolving Erythrosine B (C20H6I4Na2O5 dye content 90%, Sigma-Aldrich), used without further purification, to a concentration of 100 mg L−1. Sodium sulfate decahydrate (Na2SO4·10H2O, Sigma-Aldrich) is added as supporting electrolyte. Iron (II) sulfate heptahydrate (FeSO4·7H2O, 99%, Sigma-Aldrich) is used as an iron source. All the solutions have been prepared in bi-distilled water. Analytical-grade NaOH and H2SO4 were used to adjust the initial pH of the solution. The initial pH of the solution, measured with a pH glass electrode (HANNA Instruments®) calibrated with standard buffers at pH 4, 7, and 10.1, was adjusted to 3 by sulfuric acid (H2SO4 95–97% -Fluka Analytical®) 1 M.

2.2 Electrolysis system

Electro-Fenton treatments were conducted in an open, undivided, cylindrical glass cell containing 300 mL of solution, (100 mg L−1 EB), for 30 min under galvanostatic conditions, applying a constant current using an AMEL 2055 potentiostat/galvanostat. The solution was stirred with a mechanical motor to avoid concentration gradients. All the experiments were carried out at room temperature. Carbon felt (Carbone Loraine) was used as a cathode (10 × 7 cm with a thickness of 0.5 cm) placed in the center of the cell. The anode was a Ti/RuO2 net (150 × 60 mm), which covered the inner wall of the cell. Before starting the electrolysis, compressed air was bubbled for 10 min through the solution (max flow rate 3 L min−1 at 0.014 MPa) to saturate the aqueous solution; the air flow has been also kept constant during the working time.

The applied current, the iron concentration, and the stirring rate were chosen as factors for the Doehlert design, as shown in the next section.

The concentration removal of EB is followed by UV–vis spectroscopy using a Jasco V-630 spectrophotometer and cells with a 1 cm path length at the characteristic wavelength of 526 nm. Therefore, the specific energy consumption (Ec, kWh m−3) is calculated by Eq. (5):

$${\text{Ec}} = \frac{{U_{{{\text{cell}}}} .I.t}}{{3600.{\text{V}}}},$$
(5)

where Ucell is the average cell voltage (V), I is the current (A), t is the electrolysis time (s), and V is the volume of the treated solution (l).

2.3 Experimental response surface methodology: Doehlert design

A Doehlert design was used to find the optimum conditions for electro-Fenton degradation of Erythrosine B. The number of experiments “\(N\)” is given by Eq. (6):

$$N = n^{2} + n + c,$$
(6)

where n is the number of variables and c is the number of central points. In this work, we studied the influences of 3 independent variables: \(X_{1}\): applied current (A); \(X_{2}\): iron concentration (mM); and \(X_{3}\): stirring rate (rpm). For n = 3, the matrix comprised 13 experiments which were uniformly distributed within the space of the coded variables (\(X_{i}\)). The number of replicates in the central point of the design was fixed at 3 (experiments 13–15) to obtain an estimation of the experimental error.

Each operating variable \(X_{i}\) was studied at different levels of detail as imposed by the Doehlert method: the applied current was studied at five levels (0.5, 0.1, 0.4, 0.2, and 0.3 A), the iron concentration at seven levels (5.5, 9.397, 1.603, 6.7915, 4.2085, 8.0965, and 2.9035 mM), and the stirring rate at three levels (174, 500, 827 rpm). The low and high levels of each variable were designated as \(-1\) and \(+1\), respectively, corresponding to the minimum and maximum values of the experimental range of each independent variable (Table 1). Each independent variable was coded as \(X_{i}\) and determined by the following equation:

$$X_{i} = \frac{{x_{i} - x_{0} }}{{\Delta x_{i} }}$$
(7)

where \({X}_{i}\) is a dimensionless code value of the independent variable, \({x}_{i}\) is the uncoded value of the independent variable, \({x}_{0}\) is the central point, and \(\varDelta {x}_{i}\) is the step change value between low level (\(- 1\)) and high level (\(+1\)) [45]. Table 2 reports Doehlert matrix in coded units and the corresponding operating values for each experiment.

The selected dependent variables or response functions (\(Y\)) were EB removal efficiencies at 30 min (YEB removal%) and the associated energy consumption (YEc). The EB removal efficiency has been calculated as follows:

$$EB\left( \% \right) = \frac{{\left[ {EB} \right]_{0} - \left[ {EB} \right]_{{30}} }}{{\left[ {EB} \right]_{0} }} \times 100,$$
(8)

where [EB]0 is the starting concentration and [EB]30 is the final concentration after 30 min of treatment.

The experimental response associated with a Doehlert matrix (for three variables) is represented by a quadratic polynomial model:

$$Y = {b}_{0}+ \sum {b}_{i}{X}_{i}+ \sum {b}_{ij}{X}_{i}{X}_{j}+ \sum {b}_{ii}{X}_{i}^{2},$$
(9)

where \(Y\) is the response of the system, \({b}_{0}\) is the constant of the model, \({b}_{i}\) represents the main effect of the factor i, \({b}_{ii}\) is the estimation of the second-order effect, and \({b}_{ij}\) is the estimation of the interaction between the factors i–j [45].

The experimental data were fitted using MATLAB® to derive the coefficients of the polynomial interpolation. The significance of each coefficient is examined using its p-value, and the stepwise technique is applied to maintain only the significant predictors. This technique consists of removing (or adding in other cases) the predictors one by one, starting with those having the highest p-values and re-examining if there are still insignificant predictors after each step.

Table 1 Coded factors and experimental range for each experimental variable used for the application of Doehlert matrix
Table 2 Doehlert matrix for experimental design with three variables and the corresponding experimental conditions for each

3 Results and discussion

3.1 Degradation kinetic

For each experiment, the removal of EB and the effectiveness of EF process have been evaluated using UV–Vis spectrophotometry. The absorption spectra of EB at room temperature present an absorption band at about 526 nm, which is directly related to the characteristic bond of the dye and color solution. Figure 1 shows the decay of EB concentration during the electro-Fenton on a solution with 100 mg L−1 of pollutant, an applied current of 0.5 A, a stirring rate of 500 rpm, and an iron concentration of 5.5 mM.

During the electrolysis the EB concentration decreases continuously until it is almost fully removed after 30 min, thanks to the production of a large amounts of λOH radicals electrogenerated (Eqs. 1, 2, 3, 4) [45]. This result confirm the high activity of hydroxyl radicals in the disruption of chromophore bonds [46].

Fig. 1
figure 1

Evolution of EB concentration as a function of time during electrolysis of EB. Conditions: [EB] = 100 mg L−1; I = 0.5 A; [Fe2+] = 5.5 mM; supporting electrolyte [Na2SO4] = 50 mM; stirring rate = 500 rpm; pH = 3

The EB concentration profile allows assessing the kinetic behavior of this reaction. In these experiments, reaction kinetics were studied, and regression coefficients were calculated for the pseudo-first and second-order reactions.

The kinetics related to the removal rate of EB in aqueous solutions during the electrolysis can be expressed by the following equation:

$$r = - \frac{d \left[EB\right]}{dt} = {k}_{obs} {\left[EB\right]}^{ \alpha },$$
(10)

where \({k}_{obs}\) is the observed degradation rate constant.

The integrated rate equation describing the first-order kinetics (α = 1) is given below:

$$Ln\left(\frac{[EB{]}_{t}}{[EB{]}_{0}}\right) = - {k}_{obs} t$$
(11)

where \([EB{]}_{t}\) is the concentration of EB at time t and [EB]0 is the concentration at time 0.

A second-order kinetic (α = 2) can be expressed using the integrated rate equation:

$$\frac{1}{[EB{]}_{t}}- \frac{1}{[EB{]}_{0}} = {k}_{obs} t$$
(12)

The first- and second-order kinetics evolution of EB concentration with time during the treatment are reported in Fig. 2 and b, respectively.

Fig. 2
figure 2

a The first-order kinetics model for EB concentration decay with time. b The second-order kinetics model for EB concentration decay with time. Conditions: [EB] = 100 mg L−1 EB; I = 0.5 A current intensity; [Fe2+] = 5.5 mM; supporting electrolyte [Na2SO4] = 50 mM; stirring rate = 500 rpm; pH = 3

Based on the square regression coefficient \({R}^{2}\), the adjustment regression coefficients \({R}_{1}^{2}, {R}_{2}^{2}\) relatives to pseudo-first order and second order are 0.4746 and 0.9911, respectively. The higher regression coefficient \({R}^{2}\) value of the plot of \(\frac{1}{[EB{]}_{t}}- \frac{1}{[EB{]}_{0}}\) as a function of time confirms the pseudo-second-order kinetics in agreement with several studies [47,48,49,50].

3.2 Doehlert design analysis

Doehlert matrix design under RSM was employed to study the optimum values of the selected variables. The effects of operational parameters on the two responses, EB Removal (YEB removal%, %) and the energy consumption (YEc, kWh m−3) after 30 min, were analyzed by response surface contour plots and quadratic model. The experiments are performed using MATLAB® code and their results are shown in Table 2. The relationships between independent variables (current intensity, iron concentration, and stirring rate) and the responses have been expressed as shown in Eqs. (13) and (14).

$$Y_{{{\text{EB}}\,{\text{removal\% }}}} = 98.23 + 8.3X_{1} + 8.96X_{2} + 4.82X_{3} - 11.71X_{1}^{2} - 8.47X_{2}^{2} - 2.73X_{3}^{2} - 10.31X_{1} X_{2} - 4.44X_{1} X_{3} - 9.98X_{2} X_{3}$$
(13)
$$Y_{{{\text{Ec}}\left( {{\text{kWhm}}^{{{\text{ - 3}}}} } \right)}} = 1.24 + 1.1X_{1} - 0.034X_{2} + 0.02X_{3} + 0.13X_{1}^{2} + 0.0833X_{2}^{2} + 0.0545X_{3}^{2} - 0.0115X_{1} X_{2} + 0.1082X_{1} X_{3} + 0.1785X_{2} X_{3}$$
(14)

Coefficients \({b}_{0}\) = 98.23 (for EB removal %) and \({b}_{0}=\) 1.24 (for energy consumptions) give the responses in the central point of the domain (all \(X_{i}\) = 0, experiment n°13), while \({b}_{i} (A, B,C)\), \({b}_{ii} ({A}^{2}, {B}^{2},{C}^{2})\), and \({b}_{ij} (AB, AC, BC)\) coefficients provide information about the influences of these three variables in the process.

Tables 3 and 4 show the analysis of variance (ANOVA) for EB Removal % and energy consumption, respectively. To check the significance and adequacy of the models, regression coefficient (\(R^{2}\)) and Fisher’s distribution test (test) were performed. As a result, the calculated F-values obtained (18.07 for \(Y_{{{\text{EB}}\,{\text{Removal\% }}}}\) and 104.16 for \(Y_{{Ec}}\)) confirm that recorded responses are well fitted by the models. In addition, the p-values for YEB removal%, % and YEc were 0.0182 and 0.0014, respectively, lower than 0.05 (limit of significant), which explained the stability and significance of the model [51]. The significance of each coefficient was checked by p-value, which, in turn, is necessary to understand the pattern of the mutual interactions between the test variables. The larger the F-value and smaller the p-value, the more significant the corresponding coefficient [52]. Among the test variables, I (\({X}_{1}\)) and [\({\text{F}\text{e}}^{2+}\)] (\({X}_{2}\)) have high F-value and low p-value, producing the most significant effects on degradation efficiency. These findings can be interpreted as a result of an appropriate relationship between the variables and degradation efficiency. In addition, the results showed that the coupled effects were generally lower than the main factors, and only the interactions of A–B (current and iron concentration) were significant. On the other hand, it was observed that the quadratic terms representing the interaction of I and stirring rate (\(X_{1} \cdot X_{3} )\), \({\text{F}\text{e}}^{2+}\) concentrations and stirring rate (\(X_{2} \cdot X_{3}\)), and the stirring rate squared term (\(X_{3}^{2}\)) are not significant for EB Removal %. Consequently, it shows a minor effect on the degradation efficiency. Conversely, on \(Y_{{Ec}}\) only current intensity \(X_{1}\) is significant, having the greatest impact on the target value, with highest F-value (927.83) and lowest p-value (< 0.0001).

Table 3 Analysis of variance (ANOVA) and statistics for EB removal % (YEB removal%, % )

The description of the relation between the variables (Xi) and the responses (YEB removal%,YEc), and the goodness of the model fitting was checked by the determination of coefficient (\(R^{2}\)). The model is acceptable if not less than 95% of the data fit into the model [53]. In this study, the value of determination coefficient \(R^{2}\) for Removal % and EC is 0.9819 and 0.9986, respectively, indicating that only 1.81% (Removal %) and 0.14% (Ec) of the total variations were not explained by the regression model. It means that the mathematical model was adequate to cover more than 98.19% (Removal %) and 99.86% (Ec) of the total variations. A high \(R^{2}\) coefficient ensures a satisfactory adjustment of the quadratic model to the experimental data. In addition, the adjusted coefficient of determination value also explains the goodness of the model and the \({\text{adjusted}} - R^{2}\) values were 0.9276 (Removal %) and 0.9872 (Ec). The ratio of \(R^{2}\) and \({\text{adjusted}} - R^{2}\) was close to 1, which meant that the relationship between the independent variables (\(X\)) and the response (\(Y\)) could be well explained by the regression model [54].

Table 4 Analysis of variance (ANOVA) and statistics for energy consumption YEc

Figure 3a and b shows the relationship between the actual and predicted values of EB Removal % and energy consumption, respectively. The points were distributed relatively close to the straight line, indicating that the results predicted by the model were broadly consistent with the experimental results.

Adequate Precision (AP) is defined as a measure of the range in predicted response related to its associated error; in other words, a signal-to-noise ratio that has a desired value equal to 4 or higher [55, 56]. Since, all AP values were higher than 4 (12.2644 and 34.7302 for color removal and energy consumption, respectively), we can conclude that its performance is satisfactory.

Fig. 3
figure 3

Plot of predicted vs. experimental values obtained in the RSM: a EB removal % and b energy consumption

3.3 Response surface and contour plots: optimization discussion

The effects due to factor interactions (current intensity, iron concentration, and stirring rate) on the response (Removal % and energy consumption) were studied. Figures 4 and 5 represent the 3D (surface) and 2D (contour) plots from the cross-factor interactions on YEB removal% and the YEc, respectively.

The first considered couple was the applied current-iron concentration as shown in Figs. 4a and b and 5 a and b.

The best performances were obtained close to the central point, while the trend near the boundaries of the domain changes related to the coupling of variables considered. In particular, poor efficiencies were obtained for low iron concentration (\(X_{2} = - 1\)) and low current (\(X_{1} = - 1;X_{2} = - 1\)). For example, for the test at (\(X_{1} = + \,0.5;X_{2} = - \,0.866)\) and at \((X_{1} = - 1;X_{2} = 0)\), their removal rate is the lowest and reached 88.27% and 91.57%, respectively, suggesting that the process is strongly affected by these two parameters and their interaction, as confirmed by their p-value \(<0.05\). Indeed, when the iron concentration is fixed in the center of its range (\(X_{2} = 0\)), the applied current greatly affects the removal of EB, and the maximum is observed in the intermediate currents. In fact, a rise of applied current from 0.1 A (X1 = − 1) to 0.3 A (X1 = 0) can enhance the EB removal and due to the acceleration of the rate of \({\text{H}}_{2}{\text{O}}_{2}\) production according to Eq. (1) and also to the faster regeneration of Fe2+ from Eq. (3), which leads to the generation of a higher amount of hydroxyl radicals (Eq. 2). However, a further increase of the applied current to 0.5 A (X1 = + 1) reduce the removal efficiency due to the promotion of parasite reactions of water formation from oxygen reduction (Eq. 15), hydrogen evolution (Eq. 16), or hydrogen peroxide reduction (Eq. 17) [42]:

$$2{\text{H}}^{ + } + 2{\text{e}}^{ - } \to {\text{H}}_{2}$$
(15)
$${\text{O}}_{2} + 4{\text{H}}^{ + } + 4{\text{e}}^{ - } \to 2{\text{H}}_{{\text{2}}} {\text{O}}$$
(16)
$${\text{H}}_{{\text{2}}} {\text{O}}_{{\text{2}}} + 2{\text{H}}^{ + } + 2{\text{e}}^{ - } \to 2{\text{H}}_{{\text{2}}} {\text{O}}$$
(17)

On the contrary, the corresponding energy consumption (Fig. 5a, b) is strongly influenced by the applied current and its p-value (< 0.0001) is very small, with a high F-value of 927.83. An increase in current leads to a significant increase in energy consumption due to the change in the cell voltage, which goes from 1.6 V (at 0.1 A) to 3.1 V when operating at high current.

For a large production of λOH radicals from Fenton’s reaction (Eq. 2), it is necessary that \({\text{H}}_{2}{\text{O}}_{2}\) and Fe2+ are close to the stoichiometric ratio. The amount of \({\text{H}}_{2}{\text{O}}_{2}\) is directly related to the applied current (Eq. 1), while the iron concentration depends mainly on the initial content and the regeneration rate (Eq. 3). On the other hand, when fixing the applied current at X1 = + 0.5 and changing the initial iron concentration, the EB removal increases with increasing iron concentration. Nevertheless, at high Fe2+ content and extreme current values (X1 = ± 1), the decolorization efficiency decreases to 90%. At low current (X1 = − 1), this behavior can be explained by a lower iron regeneration and H2O2 production, while at high current (X1 = + 1) the following reaction can occur:

$${\text{Fe}}^{{2 + }} + ^{ \cdot } {\text{OH}} \to {\text{Fe}}^{{3 + }} + {\text{OH}}^{ - }$$
(18)

The activation of reaction 18 is detrimental because such recombination between iron (II) and hydroxyl radicals penalized both reactions (2) and (4).

Concerning energy consumption, the concentration of iron has a slighter effect with a lower reduction in the term of 0.1 kWh m−3 when the concentration increases.

Figures 4c and d and 5c and d exhibit the dependence of the EB removal and energy consumption, respectively, as a function of applied current (X1) and stirring rate (X3). This pair of parameters is very pertinent because it strongly influences limiting processes, such as charge transfer and mass transport. The plot of Fig. 5c and d is extremely useful to confirm that both the current and mass transport conditions affect EB removal and their p-value below 0.05. As can be seen, the point defined by (X1 = − 1, X3 = − 1) provides the lowest performance of all datasets and the highest removal was obtained at high current X1 = [0,+ 1] and high stirring rate X2 = [0, + 1]. When the current ranges from − 0.5 to 0, the increase in stirring rate enhances the removal efficiency, which suggests that the process is under mass transport control in these operating conditions. It becomes under charge transfer when the current X1 moved to [0, + 1] because, in this range, the EB decomposition was almost unaffected by the stirring rate. On the other side, Fig. 5c and d shows that the energy consumption is more dependent on the applied current than the stirring rate, and the energy consumption is approximately constant along with the X3 domain when the current is constant.

Finally, Figs. 4e and f and 5 e and f show the dependence of the EB removal and energy consumption, respectively, as a function of iron concentration (X2) and stirring rate (X3). Regarding EB removal, poor performances are obtained for low iron concentration and low stirring rate (X2 = − 1 and X3 = − 1). On the other hand, upon fixing X3, the removal is enhanced by increasing iron concentration, and the removal rate reaches the maximum when X2 ranges in this interval [0,+1], and the maximum removal rate surface (≤ 100%) is significant when X3 ≥ + 0.5, while the removal has a decrease at (X2 = + 1 and X3 = + 1). Concerning energy consumption, the parameters have a negligible effect on it. Indeed, when X3 = [− 1, − 0.5], the energy consumption has a slight decrease of 0.3 kWh m−3 with increasing iron concentration. On the other hand, it can reach the optimal value upon X2 ≥ + 0.5 and then grows with the increase of iron concentration for X3=[0,+1].

Doehlert matrix has been performed to determine the optimum parameters to maximize EB removal and minimize EC. The optimum has been selected balancing removal performance and energy consumption. Maximum removal efficiency of 98.15% with minimum energy consumption of 0.74 kWh m−3 is achieved with test number 6, which has been carried out at X1 = − 0.5, X2 = 0.866, and X3 = 0 corresponding to I = 0.2 A, stirring rate = 500 rpm, and [Fe2+] = 9.397 mM.

RSM is usually adopted to find process optimum, but Eqs. (13) and (14) can be used also to predict the system performance in an experimental random point belonging to the domain. Then, the accuracy of the model to estimate EB removal and energy consumption has been evaluated through three different electro-Fenton tests carried out in the conditions summarized in Table 5. These working conditions are inside the experimental domain reported in Table 1 but are different from the conditions defined by Doehlert matrix (Table 2). The comparison between the experimental data and the values estimated by the model confirms the model’s reliability in predicting system performance.

Table 5 Coded factors and corresponding experimental variables for the three tests carried out to check the reliability of RSM to estimate system performance (EB removal and energy consumption)
Fig. 4
figure 4

Response of Doehlert analysis on EB removal process as a function of coupled factors. a, b Current (X1) and iron concentration (X2); c, d current (X1) and stirring rate (X1); e, f iron concentration (X2) and stirring rate (X3)

Fig. 5
figure 5

Response of Doehlert analysis on Ec as a function of coupled factors. a, b Current (X1) and iron concentration (X2); c, d current (X1) and stirring rate (X1); e, f iron concentration (X2) and stirring rate (X3)

4 Comparison with other EAOPs for dyes degradation

As shown in Table 6, many electrochemical advanced oxidation processes have been proposed for dye removal.

Panizza’s group [55, 57,58,59] studied the removal of some dyes from low conductive solutions and at natural pH using solid polymer electrolyte systems under different experimental conditions. The system consisted of a sandwich with a BDD anode/Nafion®324 membrane/RuO2 cathode. The experimental results showed that this method could eliminate the dyes but with higher energy consumption (ranging from 36.3 to 60 kWh m−3 regardless of the types of dyes).

Over the last decades, combining anodic oxidation (AO) with ultrasound has been identified as a promising method for degrading dyes. The elimination of Alizarin Red S (ARS) dye using a sono-electrochemical process was investigated by Zhu et al. 2018 [60]. Almost 100% color removal and 27.5 kWh m−3 of energy consumption were achieved for 100-mg L−1 ARS concentration with a 0.05-M Na2SO4 electrolyte, at 30 °C and pH of 4.97 after 3 h, at a frequency of 20 kHz using a boron-doped diamond (BDD) anode. More recently, Sabrine et al. [7] obtained a complete elimination of Allura Red AC (AR) and EB in 60 and 90 minutes of reaction time, respectively, at a frequency of 40 kHz by sono-electrochemical process using a Ti/PbO2 anode. Energy consumptions of about 17 and 20 kWh m−3 for AR and EB, respectively, were obtained operating at 0.75 A, 800 rpm, and 0.05-M Na2SO4 at natural pH.

Among electrochemical treatments, electro-Fenton has been reported to consume less energy per mole of contaminants degraded, which can be attributed to a lower required potential (− 0.4 V vs. SHE) for hydroxyl radical production.

Kuleyin et al. [61] studied the advanced treatment of biologically treated textile wastewater using EF technology as a polishing step for complete decomposition using graphite plate anode and cathode in batch and continuous operations. After 30 min of reaction time, 89% color removal was obtained at pH 3.0, 2 mM concentration of Fe2+, and applying a current intensity of 0.55 A, when a batch system was used. In a continuous system, 89% color, 93% COD and 58% TOC removal efficiencies were attained at pH 3, current intensity 1.65 A, Fe2+ of 2 mM, and flow rate 25 mL min −1. The corresponding average energy consumption and electrical energy efficiency were estimated as 16 kWh m-3 and 17 kWh m-3order−1. Titchou et al. [62] showed successful degradation of 60 mg L−1 of Direct Red 23 through EF process using BDD and DSA anodes and carbon graphite (CG) cathode at pH 3. The BDD electrode provided a better mineralization rate than DSA, and after 6 h of electrolysis a TOC removal of 93% and an energy consumption and operating cost of 2.01 kWh g−1 TOC and 3.36 US $ m−3, respectively, were reached with BDD/CG cell in the medium made of 75% Na2SO4 + 25% NaCl at pH 3 and 5-mA cm−2 current density.

A direct comparison between electro-Fenton, solar photo-electro-Fenton, and UVA photo-electro-Fenton processes has been presented by Clematis et al. [44] for the treatment of EB using BDD anode and carbon felt cathode at pH = 3. Results highlighted that both UVA photo-electro-Fenton and solar photo-electro-Fenton can eliminate COD in 90 min, while a conventional electro-Fenton does not reach 90% COD removal after 2 h. Photo-electro-Fenton with a UVA-100 W lamp has one of the best removal performances, but it is not suitable for application due to high energy demand, up to 515.6 kWh m-3. UVA-25 W lamp maintains a high-performance removal with a lower Ec about 187.9 kWh m-3. Nevertheless, the lowest and most competitive energy demands were obtained with a solar photo-electro-Fenton system, where energy consumption is only related to the electrochemical process (20.9 kWh m-3) and removal is complete.

Table 6 summarizes the comparison between the optimized results obtained in this work and the studies described above. The analysis of the table shows how the optimization proposed here for the electro-Fenton makes such a process highly competitive both in terms of removal efficiency and energy consumption.

Table 6 Comparison of studies concerning the treatment of dyes by EAOP

Then, such a comparison of the mentioned methods with the results of this paper indicated that EF degradation optimized with Doehlert matrix is an enhanced process for removing EB from aqueous solutions, especially in terms of Ec (0.74 kWh m−3) and reaction time. In fact, these results agree with the literature; for example, Hussain et al. [63] studied the electrochemical degradation of sunset yellow using response surface methodology RSM and at optimal conditions, the dye was removed after 48.42 min of electrolysis time with a lower Ec about 0.34 kWh m−3.

It can be seen that EF with RSM has a lower energy demand than most of the other technologies. These examples highlight the outstanding performance of the EF process using RSM in removing dye molecules from water.

5 Economic analysis under optimized conditions

A preliminary cost analysis has been performed for the optimized conditions identified by RSM. The initial capital expenditure (CAPEX) can be estimated considering that the most relevant cost is associated with electrode materials [65, 66]. In this study, the system uses a carbon felt cathode (20–50 € m−2) and a DSA® anode (1–5 × 103 € m−2) [65]. The experiments of this study have been carried out in batch conditions, and to preserve the kinetic in a process scale-up it is important to maintain constant the ratio between the area electrode and treated volume in each process run. Based on these assumptions, the specific cost (\({C}_{el,\$ {m}^{-3}}\)) for each electrode can be calculated as follows:

$$C_{{el,\$ m^{{ - 3}} }} = \frac{{A_{{\exp }} }}{{V_{{\exp }} }}C_{{el,\$ m^{{ - 2}} }},$$
(19)

where Aexp is the experimental electrode area in m−2, Vexp is the experimental solution volume in m−3, and \({C}_{el,\$ {m}^{-2}}\) is the specific cost of the electrode in $ m−2. Then, taking into account the price ranges previously reported, the CAPEX associated with electrodes is included between 0.47 ÷ 1.2 k€ m−3 and 30 ÷ 150 k€ m−3 for carbon felt and DSA®, respectively. Then, most of the initial costs are related to the DSA electrode which can impact from 94.2% up to more than 99% of the overall initial investment for the cell materials. The fact that the system can efficiently operate with these two electrode materials represents a significant reduction in CAPEX. Indeed, it can provide good performance also without the usage of boron-doped diamond anode, which currently has a cost one order of magnitude higher than DSA (2.5 ÷ 3.5 × 104 € m−2).

The main operating costs are associated with energy consumption and the iron addition when the effluent does not contain the catalyst required by the electro-Fenton. The energy costs are highly affected by the geographical position of the plant. In 2023, the average price of energy for non-household consumers in the European Union (EU) was 0.188 € kWh−1 [67]. The iron sulfate used as a source of electrocatalyst is available in a range of 0.2–1.5 € kg−1. Then, considering the required process consumptions defined with the experimental campaign, the lowest specific cost for energy and chemical consumption (FeSO4 7 H2O) is 0.139 € m−3 and 0.522 € m−3, respectively, for an overall cost of 0.661 € m−3. On the other hand, operating in an unfavorable market price, the costs grow up over 4 € m−3.

6 Conclusion

The electrochemical oxidation of Erythrosine B was investigated employing the electro-Fenton method coupled with a response surface methodology and an experimental design. The preliminary experiments showed the suitability of electro-Fenton to remove the persistence dye using an undivided cylindrical glass cell containing 100 mg L−1 of Erythrosine B, which follows a pseudo-second-order kinetic. The influence of applied current, iron concentration, and the stirring rate has been evaluated in the operating range of 0.1–0.5 A, 1–10 mM, and 100–1000 rpm, respectively. Response surface methodology has been applied coupled with Doehlert matrix for three factors to optimize the operating conditions. EB removal and energy consumption have been selected as model responses. A significant relationship between predicted and experimental values was shown by ANOVA with \({R}^{2}\) \(= 0.9819\) and p-value \(< 0.0182\) for \({Y}_{EB Removal \%}\) and \({R}^{2}\) \(= 0.9874\) and p-value \(< 0.0014\) for \({Y}_{Ec}\). In addition, ANOVA and a proposed quadratic model suggested that current density is the most critical parameter, whether considered as a single effect or coupled with iron concentration, on the efficiency of the electro-Fenton process for both responses.

Doehlert matrix was performed to determine the optimum parameters to maximize EB removal and minimize EC. The optimum has been selected balancing removal performance and energy consumptions. Maximum removal efficiency of 98.15% with minimum energy consumption of 0.74 kWh m−3 was achieved at optimum conditions (I = 0.2 A, stirring rate = 500 rpm, and [Fe2+] = 9.397 mM). Moreover, the model has also been positively tested for the prediction of system performance in conditions different from those defined by Doehlert matrix, and the preliminary economic analysis reported in the last part of the manuscript highlights the competitiveness of such a process.