Organic Pollutants Removal from Olive Mill Wastewater Using Electrocoagulation Process via Central Composite Design (CCD)

: Electrocoagulation (EC) was studied in this study as a potential alternative approach for treating Olive Mill Wastewater (OMW). Aluminum plates were utilized as anode and cathode to evaluate the removal of Chemical Oxygen Demand (COD) from OMW and the aluminum electrode’s weight loss. Central Composite Experimental Design (CCD) and Response Surface Methodology were used to optimize its performance. Anodes were weighed before and after each electrocoagulation experiment, to compare the experimental and the theoretical dissolved aluminum weights calculated using Faraday’s law. We discovered the following EC conditions for CCD: current density = 15 mA/cm 2 , pH = 4, and electrolysis time of 30 min. Under these conditions, the maximum COD removal ratio was 41%, equating to an Al weight loss of 288.89 g/m 3 at an estimated operating cost of 1.60 USD/m 3 . According to the response optimizer, the most economical operating settings for COD removal efﬁciency of 58.888% are pH 4, a current density of 18.41 mA/cm 2 , electrolysis time of 36.82 min, and Al weight loss of 337.33 g/m 3 , with a projected running cost of 2.00 USD/m 3 .


Introduction
Olive Mill Wastewater (OMW) is released with different quantities and composition, depending on the region, age of growth, harvesting season, yearly changes, and olive type. In general, OMW comprises 83-96% water, 3.5-15% organics, and 0.5-2% mineral salts. The organic component is made up of sugars (1-8%), N-compounds (0.5-2.4%), organic acids (0.5-1.5%), lipids (0.02-1%), and phenols and pectins (1-1.5%). OMW could include high concentrations of dyes that float on the surface of water bodies, and further reduce light penetration and the plants' photosynthetic activities. Additionally, suspended particles can suffocate aquatic species and reduce their oxygen utilization ability. The presence of phytotoxic phenolics means that untreated OMW is not allowed to be utilized for irrigation in agriculture because of the potential health risks. Effluent treatment and disposal are complicated because of OMW's varied chemical make-up, the cyclical nature of olive production, and the mills' dispersed geographic location. Numerous strategies lation processes. Olive Mill Wastewater (OMW) is a menace to the environment and has developed into a problem that the olive industry must address. Due to OMW's dark color, high Biological Oxygen Demand (BOD), COD, and phytotoxic concentration cannot be discharged directly into clean or coastal waters [7,8]. The objectives of this study are threefold (1) examine OMW treatment by the EC process to reduce the organic load (chemical oxygen demand (COD)) and achieve improved OMW management, (2) study the impact of current density, pH and exposure time on the EC process, anode consumption, and electrode weight loss, and (3) represent an economic evaluation of the EC batch-scale approach for OMW treatment based on Response Surface Methodology (RSM) methodology model simulation.

OMW Sample
The raw OMW was collected from a decanter that received wastewater related to cleaning duties at Al-Fayrouz Olive Mill in El-Arish, North Sinai, Egypt. OMW was stored at a freezing temperature (−15 • C), and the needed volume for experimentation was 800 mL. The findings of the OMW analysis, as well as the measurement methods, are listed in Table 1. A low BOD/COD ratio implied that the biological process would not be effective for treating the OMW under study.

Electrolytic Systems
All electrolytic tests were conducted in an open, undivided, 900 mL cylindrical glass cell. Figure 1 schematically depicts a monopolar electrode in a parallel connection used to treat OMW in a 900 mL beaker. Six aluminum plates with dimensions of 2 cm × 9.5 cm × 2 faces, with an effective surface area of 96 cm 2 , were mounted vertically with a 15 mm inter-electrode gap. Aluminum was chosen as the sacrificial anode rather than iron, because ferrous ions are oxidized by air, increasing the wastewater color. Aluminum plates were cut from commercial grade (95-99%) sheet material with a thickness of 3 mm. Three alternate plates were attached to the positive pole of the DC power source, while the remaining three were connected to the negative pole, operating as anode and cathode, respectively. The power supply had an Amperemetre with a 0-20 amps digital reading range and a voltage range of 0-200 volts [9]. maining three were connected to the negative pole, operating as anode and cathode, respectively. The power supply had an Amperemetre with a 0-20 amps digital reading range and a voltage range of 0-200 volts [9].

Analytical Analysis
All analytical techniques followed Standard Procedures [10]. We evaluated the pH of wastewater samples using a portable calibrated pH metre (pHep ® , HANNA, HANNA INSTRUMENTS UNITED STATES, INC., Woonsocket, RI, USA). The pH 4.2 and pH 7 buffers were used for calibration. Adjustments of pH to the desired values were made with 1 M NaOH and/or 1 M H2SO4. Turbidity measurements were conducted with a Digital Nephlometer (Orbeco-Hellige ® , Orbeco-Hellige Inc., Toms River, NJ, USA). Calibration was performed using ready-to-use standards. Nephlometric Turbidity Units were used to quantify turbidity (NTU). Voltage and current are displayed immediately on the power supply. The electrode was cleaned (rinsed with HCl 10%concentration) to remove the oxides formed at the anode surface, dried, and weighed at the start and end of each experiment to calculate the anode's weight loss. A 3-digit electrical balance was used to determine the mass loss of the anode electrode during the process [11]. According to [12], true color (color of the filtrated sample) was determined, spectrophotometrically, at 410 nm against reference Pt-Co solutions. Total suspended solids were measured after filtration and dried at 103-105 °C by the gravimetric method. Chemical oxygen demand (COD), was measured by the closed reflux colorimetric method. Biochemical oxygen demand (BOD), was measured by the 5-day test method. Oil and Greases (OG), were determined by the partition gravimetric method. Total phenols, TP, were assessed by the Folin-Ciocalteau method using tyrosol as standard. All compounds utilized in the investigation were analytically pure and obtained from Egypt-based sources.

Experimental Design
This study used 15 tests to examine how operating parameters affect electrocoagulation. When using response surface methodology (RSM), the dependent variable (y) is first approximated using an estimate of the genuine functional relationship with the set of independent variables [12]. As shown in Table 2, a statistical technique utilizing a Central Composite Design (CCD) was employed to determine the relationship between COD removal efficiency and AL anode loss. A total of 15 tests were conducted for three components at five levels, with one point at the center point using the response surface methodology incorporating CCD. Table 2 offers a list of coded independent variables and factor levels. The required number of experiments (N), expressed as follows: 2 k (2 3 = 8 star points) + 2k (2 * 3 = 6 axial

Analytical Analysis
All analytical techniques followed Standard Procedures [10]. We evaluated the pH of wastewater samples using a portable calibrated pH metre (pHep ® , HANNA, HANNA INSTRUMENTS UNITED STATES, Inc., Woonsocket, RI, USA). The pH 4.2 and pH 7 buffers were used for calibration. Adjustments of pH to the desired values were made with 1 M NaOH and/or 1 M H 2 SO 4 . Turbidity measurements were conducted with a Digital Nephlometer (Orbeco-Hellige ® , Orbeco-Hellige Inc., Toms River, NJ, USA). Calibration was performed using ready-to-use standards. Nephlometric Turbidity Units were used to quantify turbidity (NTU). Voltage and current are displayed immediately on the power supply. The electrode was cleaned (rinsed with HCl 10%concentration) to remove the oxides formed at the anode surface, dried, and weighed at the start and end of each experiment to calculate the anode's weight loss. A 3-digit electrical balance was used to determine the mass loss of the anode electrode during the process [11]. According to [12], true color (color of the filtrated sample) was determined, spectrophotometrically, at 410 nm against reference Pt-Co solutions. Total suspended solids were measured after filtration and dried at 103-105 • C by the gravimetric method. Chemical oxygen demand (COD), was measured by the closed reflux colorimetric method. Biochemical oxygen demand (BOD), was measured by the 5-day test method. Oil and Greases (OG), were determined by the partition gravimetric method. Total phenols, TP, were assessed by the Folin-Ciocalteau method using tyrosol as standard. All compounds utilized in the investigation were analytically pure and obtained from Egypt-based sources.

Experimental Design
This study used 15 tests to examine how operating parameters affect electrocoagulation. When using response surface methodology (RSM), the dependent variable (y) is first approximated using an estimate of the genuine functional relationship with the set of independent variables [12]. As shown in Table 2, a statistical technique utilizing a Central Composite Design (CCD) was employed to determine the relationship between COD removal efficiency and AL anode loss. A total of 15 tests were conducted for three components at five levels, with one point at the center point using the response surface methodology incorporating CCD. Table 2 offers a list of coded independent variables and factor levels. The required number of experiments (N), expressed as follows: 2 k (2 3 = 8 star points) + 2k (2 × 3 = 6 axial points) + 1 (center point), was used to optimize the primary parameters affecting COD removal and Al anode loss and their interactions (i.e., pH, current density, and contact duration) [13]. Three replicates of each experiment were conducted, and the average values were given. Following each run, the electrode surfaces were washed for 5 min with a 5% (v/v) HCl solution to remove any remaining oxide and/or passivation layer [14]. The studies were carried out at ambient temperatures of between 30 and 35 • C. In the current study, the RSM was dependent on a full-quadratic regression model Equation (1) to fit the experimental results [9,15].
where ß o , ß i , ß ii , and ß ij are the regression coefficients for the intercept, linear, square, and interaction terms, respectively; and x i and x j are independent variables. The variables were coded according to the following equation: where α is the coded value of the independent variable; x i is its real value; x o is its real value at the center point, and ∆x is the step-change in the variable x i . Coded factors and uncoded factors are listed in Table 2.
The coefficient of determination, R 2 , was used to determine the model's quality and predictive potential. Using three-dimensional response surface plots, the individual and synergetic impacts of the operating factors on the response variables were mapped from the created mathematical model. The details of this methodology have been previously published [16,17]. Where Y 1 is the expected COD removal efficiency (percentage) and Y 2 is the anode (Al) loss weight in grams; x 1 is the pH (1.954-10.364); x 2 is the contact duration (3.18-36.82) min, and x 3 is the current density (1.59-18.41) mA/cm 2 .

Analysis of Variances
The results CCD indicated that the quadratic model fit the three responses based on the response surface regression analysis. The regression analysis technique is used to simultaneously solve multivariable problems. Equation (3) illustrates the quadratic equations used to represent the removal of parameter COD (y 1 ). The coefficient of determination (R 2 ) between measured data and simulated outcomes, adjusted R 2 , and anticipated R 2 values for COD removal were (0.992, 0.977, and 0.862). A high R 2 -value indicated the proposed model's dependability. This investigation included a model reduction to check that the models were appropriate for the responses. As shown in Table 3, the independent variables "current density" and "pH" had substantial positive linear effects on the COD removal ratio (p < 0.05). Additionally, a substantial negative effect (p < 0.05) for the quadratic component "pH" was observed. However, for the linear and quadratic terms of "electrolysis time," respectively, there were insignificant effects (p > 0.05). Additionally, the negative effect was expressed in quadratic terms of "current density." However, substantial positive impacts (p < 0.05) were seen for the two-way interaction factors "electrolysis time" and "current density," as well as significant negative effects for the two-way interaction terms "pH" and "electrolysis time". To simplify the correlation between the inputs and output, the insignificant components were eliminated, and a new regression model was derived in Equation (4), as shown in Table 4: The quadratic equations used to depict Al weight loss (y 2 ) are depicted in Equation (5). The coefficient of determination between measured data and simulated results (R 2 ), adjusted R 2 , and predicted R 2 were (0.994, 0.983 and 0.841) for Al weight loss (g).
As shown in Table 5, the independent variables "current density" and "pH" had significant positive linear impacts on anode weight reduction (p < 0.05). Additionally, a substantial negative effect (p < 0.05) for the quadratic component "pH" was observed. However, minor negative impacts (p > 0.05) on the linear term "electrolysis time" were identified, as well as insignificant positive effects on the quadratic term "current density". However, substantial positive impacts (p < 0.05) were seen for the two-way terms "electrolysis time current density" and "pH electrolysis time", as well as significant negative effects for the two-way terms "pH current density" and "pH electrolysis time". For simplification, the insignificant components were eliminated, and a new regression model was derived in Equation (6) [15,18]: The model was statistically tested using Fisher's analysis of variance (ANOVA) to examine if the second-order polynomial equation was compatible with the experimental data or not. As shown in Table 6, the ANOVA result for COD elimination and Al weight loss had high F-values of 74.03 and 98.32, respectively. These F values indicate that the regression equation could explain the majority of the variation in the response and that the model terms have a considerable effect on the response. R 2 values of 0.987 and 0.992 were obtained for the COD elimination and Al weight loss models, respectively, implying a satisfactory degree of correlation between the measured and predicted values.
A p value less than 0.05 indicates that the model and its terms are statistically significant. Additionally, the statistical analysis indicates that the independent variables account for 97.67 and 99.24 percent of the variation in COD elimination efficiency and Al weight loss, respectively. The model does not account for only 2.33 and 0.76 percent of the variation, respectively. The predicted R 2 value is a metric that indicates how well a model predicts a response value [19,20]. To be in reasonable agreement, the adjusted R 2 and anticipated R 2 should be between 0.20. If they are not, the data or the model may be at fault. In our example, the projected R 2 values for COD elimination percentage and Al weight reduction (0.943, 0.959) are reasonably close to the modified R 2 values (0.973, 0.982). COD removal and Al weight loss were revealed to be statistically significant (p < 0.01). The ANOVA statistics demonstrated that the equations described the connection between the response and the significant variables properly. The models show a high R 2 , a substantial F-value, an insignificant p-value for lack of fit, and a low standard deviation and coefficient of variance. The Pareto chart and the major effects of each parameter on the COD elimination efficiency are depicted in Figures 2 and 3. We may deduce from the graphs and coefficients of Equation (4) that pH was the most significant variable affecting COD removal, because its coefficient is the biggest in absolute value (11). This coefficient has a positive sign, indicating that increasing pH within the investigated range would enhance the COD removal efficiency. Additionally, the influence of current density (CD) is beneficial because when these parameters shift from low to high, an increase in COD removal is noticed. Because an increase in CD results in an increase in the amount of dissolved aluminum in solution, the amount of aluminum hydroxide Al(OH) 3 produced is critical for increasing the percentage of COD removed. Because its coefficient is the smallest absolute magnitude, the electrolysis time is the least significant variable (−0.854).
Our model's interaction term determines the curvature of the graph's contour lines. This demonstrates that lowering the pH from 10 to 2 improves COD R.R at CD (18.41 mA/cm 2 ). This interaction is crucial because the pH of the solution has a considerable effect on the experimental range used in this investigation. Changes in the duration of electrolysis have no greater effect. The Pareto chart and the major effects of each parameter on anode weight decrease are depicted in Figures 4 and 5. We may deduce from the graphs and coefficients of Equation (6) that pH and current density are the most critical variables affecting anode weight loss, as their coefficients are greater than the others.  Our model's interaction term determines the curvature of the graph's contour lines. This demonstrates that lowering the pH from 10 to 2 improves COD R.R at CD (18.41 mA/cm 2 ). This interaction is crucial because the pH of the solution has a considerable ef-   Our model's interaction term determines the curvature of the graph's contour lines. This demonstrates that lowering the pH from 10 to 2 improves COD R.R at CD (18.41 mA/cm 2 ). This interaction is crucial because the pH of the solution has a considerable ef-  fect on the experimental range used in this investigation. Changes in the duration of electrolysis have no greater effect. The Pareto chart and the major effects of each parameter on anode weight decrease are depicted in Figures 4 and 5. We may deduce from the graphs and coefficients of Equation (6) that pH and current density are the most critical variables affecting anode weight loss, as their coefficients are greater than the others.    variables affecting anode weight loss, as their coefficients are greater than the oth

Variables Effect on COD Removal Efficiency and Al's Weight Loss
To match major interaction factors in the new simplified fitted model. As a result, main effects and interaction plots were constructed from proposed regression models [21].

Significant Linear Terms-Current Density Effect
The current determines the rate of coagulant dosing, bubble formation rate, and the fluid regime (mixing) within the reactor. Thus, the current determines particle collision, floc development, and the ability of flotation to remove material, both pollutant and coagulant [22]. As illustrated in Figure 3, the influence of current density on the effectiveness of COD removal should be explored. The efficiency of COD elimination increased to 20% when the current density was increased from 1.59 to 18.41 mA/cm 2 . At pH = 7 and a constant electrolysis period of 20 min, the electrodes (anode) consumed 0.122-0.200 kg Al/m 3 OMW. This is a high amount compared to the theoretical value of 0.55 kg Al/m 3 of wastewater indicated in Table 7. Any further increase in current density (380 mA/cm 2 ) significantly increases electrode consumption (1.4 kg Al/m 3 experimental value and 0.9 kg Al/m 3 theoretical value). Still, no additional COD removal occurs regardless of the current utilised [23,24]. A similar observation was made previously by Holt et al. [18]. It was explained that at higher currents, the supply of aluminum ions is created more rapidly than during the coagulation phase, resulting in a drop in removal efficiency on an equivalent aluminum basis. As a result, the theoretical dissolution of Al(III) from the sacrificial anode that should precipitate as Al(OH) 3 is compared to the electrode weight loss following the reaction period [13].
As illustrated in Table 7, all measured weight losses approximate the Faradaic values; nevertheless, the gap between these two values grows as current density increases.

Significant Linear Terms-pH Effect
The pH of the EC solution is critical. Experiments were conducted at a range of pH values ranging from 1.954 to 10.364 to determine the influence of pH on Al anode dissolution. Al weight loss increased from 88 to 175 mg/L when the pH was changed from 1.954 to 4.000. While increasing the pH from 7.000 to 10.364 resulted in a considerable reduction in Al weight loss from 166.67 to 0.00 mg/L (r −0.885, p 0.001). Figure 5 illustrates the effect of the initial pH. Al is oxidized in the acidic range to generate Al 3+ , but in the alkaline range, it forms AlO 2 − . The maximum COD removal efficiency was reported at acidic pH values, where the concentration of hydroxyl ions on the Al-surface causes the chemical dissolution of the Al. Al is a highly strong hydride forming, and the hydrogen produced by the cathodic process will join with Al to form hydrides.
In a parallel reaction, water is also electrolyzed, producing tiny bubbles of oxygen at the anode and hydrogen at the cathode, resulting in the flotation of the coagulated particles. Following the treatment process, a significant change in pH values is seen. The rates of anodic dissolution of metals are often substantially dependent on the solution composition, notably on the anion type and concentration [25][26][27]. The rates rise when surface-active anions are added. As a result, the initial step in anodic metal dissolution is adsorption of an anion and creating a chemical bond with a metal atom. This bonding enables the metal atom (ion) to be ripped from the lattice and solvated in succeeding phases. The pH increases in an acidic medium (pH up to 4); in alkaline solutions, the pH decreases (pH above [8][9]. When neutral solutions are used, a negligible movement in pH toward more positive values can be noticed. The buffering capacity of the cathode explains this at these pH values and the generation of hydroxyl ions. The production of Al (OH) 4 − complexes explains the drop in pH in alkaline circumstances ions. Additionally, acidic environments promote the breakdown of aluminum anodes [28,29]. Due to the solubility of the oxide layers, the passivation sheet that shields metals from electrochemical and chemical dissolution is absent [29,30].
Cathode : 2H + + 2 e − → H 2 (g) ↑ Al 3+ undergoes monomerization to form soluble monomers such as Al(OH) 2 + and Al(OH) 2+ . These monomeric cations can undergo hydroxypolymerization to become hydroxy-polymeric cations such as Al 2 (OH) 2 4+ and Al 6 (OH) 15 3+ . COD R.R efficiency of 24.5 percent at pH 4 is due to efficient sedimentation of pollutant molecules, as described in Equations (8) and (9). Furthermore, at this pH, Al(OH) 3 is the superior coagulant. As a result, at a pH of 4, the maximum COD R.R was 47%. The solubility diagram of aluminum hydroxide clearly illustrates the effect of pH on the solubility of Al(OH) 3 . Additionally, when aluminum plates are oxidised in acidic environments and water is reduced, Al 3+ is formed. According to Hanafi et al. [11], the optimal pH for electrocoagulation treatment of OMW wastewater is less than 6.

Significant Two-Way Interaction Terms of Electrolysis Time and Current Density
The duration of the EC process affects its efficiency. The time required for electrolysis determined the generation of Al 3+ ions from aluminum electrodes [30]. The results demonstrate a connection between time and current density, as illustrated in Figures 6 and 7. When the time in acidic solution was extended from 3.18 to 36.82 min, and the current density was increased from 1.59 to 18.4 mA/cm 2 , COD R.R and Al weight loss increased. While the weight loss of COD R.R. and Al reduced as the duration in alkaline solution increased from 3.18 to 36.82 min, as illustrated in Figures 6 and 7. In acidic solutions, as the time required for electrolysis rose, the mixing and reaction time increased proportionately [31]. As the extent of anodic dissolution increases, the amount of Al (OH) 3 (S) required to create coagulants increases following Faraday's law. holes on the electrode surface. The dissolving efficiency reduces with increasing pH levels because secondary processes such as oxygen evolution occur at the anode [33].  holes on the electrode surface. The dissolving efficiency reduces with increasing pH levels because secondary processes such as oxygen evolution occur at the anode [33].

Significant Two-Way Interaction Terms of pH and Current Density
On COD R.R., there is a strong correlation between the starting pH and the current density. At the low end of the current density range (2-8) mA/cm 2 , the COD R.R. and As time passed, more hydrogen bubbles were formed at the cathode; these bubbles increased the cell's degree of mixing and flotation capability, increasing the percentage removed [32,33]. The rapid generation of Al ions at higher currents is explained by the chemical hydrolysis of the cathode and the corrosion pitting process, which results in holes on the electrode surface. The dissolving efficiency reduces with increasing pH levels because secondary processes such as oxygen evolution occur at the anode [33].

Significant Two-Way Interaction Terms of pH and Current Density
On COD R.R., there is a strong correlation between the starting pH and the current density. At the low end of the current density range (2-8) mA/cm 2 , the COD R.R. and anode weight loss were lowered by reducing the pH (9-2) to 36.82 min. The COD removal efficiency and anode weight loss were enhanced under the same conditions but with a larger current density limit (8)(9)(10)(11)(12)(13)(14)(15)(16)(17)(18) mA/cm 2 , as illustrated in Figures 8 and 9. Due to Faraday's rule (Equation (10)) at high constant current density. At an acidic pH of 4, the solubility of Al(OH) 3 is at its lowest value, and the adsorption process (Equations (11) and (12)) is predominant [31]. As a result, efficiency rose, but bubble generation increased at lower current densities and an acidic starting pH, resulting in disruptive flocs that reduced the removal ratio. Faraday's minimum is denoted as: Adsorption process: COD pollutants + Al(OH)3 → sludge (pH ˃ 6.5) COD pollutants − polymeric Al + Al(OH)3 → sludge (13)

Al(OH)3 + OH − Al(OH) − 4 ↔ (pH ˃ 9)
where the current in ampere (A) Where C is Al concentration in the EC cell, M is the molecular weight of anode (Al) (g mole −1 ), t EC is the applied electrolysis time (second), I is Z the chemical equivalence, F the Faraday's constant and W is the electrolytic cell volume.
In alkaline pH and a lower current density limit, COD R.R was decreased by increasing pH. In alkaline pH, the main reaction is given in Equation (13) [32]. According to Faraday's electrochemical equations, the coagulant created by the anode was proportionate to the total electric charge passing through or current density. As the current density rose, a considerable amount of Al (OH)3 coagulant was created to destabilize the colloidal particles, resulting in the formation of additional precipitates that settled easily [34]. Although the measured mass changed directly to the applied current density, it was somewhat greater than the theoretical mass. The mass loss of the anode was greater than the theoretical value [35]. Beyond this point, a significant difference is observed; this mass overconsumption of aluminum electrodes is explained by the fact that, at higher currents, the supply of aluminum ions is generated rapidly due to the chemical hydrolysis of the cathode and the "corrosion pitting" phenomenon, which results in holes on the electrode surface [33]. Adsorption process: COD pollutants + Al(OH) 3 → sludge (pH > 6.5) COD pollutants − polymeric Al + Al(OH) 3 where the current in ampere (A) Where C is Al concentration in the EC cell, M is the molecular weight of anode (Al) (g mole −1 ), t EC is the applied electrolysis time (second), I is Z the chemical equivalence, F the Faraday's constant and W is the electrolytic cell volume.
In alkaline pH and a lower current density limit, COD R.R was decreased by increasing pH. In alkaline pH, the main reaction is given in Equation (13) [32]. According to Faraday's electrochemical equations, the coagulant created by the anode was proportionate to the total electric charge passing through or current density. As the current density rose, a considerable amount of Al (OH) 3 coagulant was created to destabilize the colloidal particles, resulting in the formation of additional precipitates that settled easily [34]. Although the measured mass changed directly to the applied current density, it was somewhat greater than the theoretical mass. The mass loss of the anode was greater than the theoretical value [35]. Beyond this point, a significant difference is observed; this mass overconsumption of aluminum electrodes is explained by the fact that, at higher currents, the supply of aluminum ions is generated rapidly due to the chemical hydrolysis of the cathode and the "corrosion pitting" phenomenon, which results in holes on the electrode surface [33].

Significant Two-Way Interaction Terms of pH and Electrolysis Time
Increasing the pH from 2 to 10 and the electrolysis time from 3.18 to 36.82 min had a detrimental effect on the electrocoagulation process at a current density of 18.41 mA/cm 2 , where COD removal effectiveness decreased significantly from 75% to 15%. These findings suggested that the maximum COD removal effectiveness was achieved at a pH of (4-2). The findings in Figures 10 and 11 demonstrate that extending the electrolysis time increases the percentage of COD removed from the solution to 75%, owing to the increased concentration of Al ions [9,30]. For instance, Figure 10 demonstrates that after 36.82 min, a maximum percentage of COD removal of 75% is attained; the percentage of COD removed increases somewhat as the electrolysis time is increased further.

Significant Two-Way Interaction Terms of pH and Electrolysis Time
Increasing the pH from 2 to 10 and the electrolysis time from 3.18 to 36.82 min had a detrimental effect on the electrocoagulation process at a current density of 18.41 mA/cm 2 , where COD removal effectiveness decreased significantly from 75% to 15%. These findings suggested that the maximum COD removal effectiveness was achieved at a pH of (4-2). The findings in Figures 10 and 11 demonstrate that extending the electrolysis time increases the percentage of COD removed from the solution to 75%, owing to the increased concentration of Al ions [9,30]. For instance, Figure 10 demonstrates that after 36.82 min, a maximum percentage of COD removal of 75% is attained; the percentage of COD removed increases somewhat as the electrolysis time is increased further.
ings suggested that the maximum COD removal effectiveness was achieved at a pH of (4-2). The findings in Figures 10 and 11 demonstrate that extending the electrolysis time increases the percentage of COD removed from the solution to 75%, owing to the increased concentration of Al ions [9,30]. For instance, Figure 10 demonstrates that after 36.82 min a maximum percentage of COD removal of 75% is attained; the percentage of COD removed increases somewhat as the electrolysis time is increased further. This is consistent with earlier findings. In actuality, the soluble Al 3+ cations predominate when the pH is less than 4, the soluble aluminate anions predominate when the pH is greater than 10. The insoluble Al(OH)3 form predominates when the pH is greater than 10. Al(OH)15 3+ , Al7(OH)17 4+ , Al8(OH)20 4+ , and Al13O4(OH)24 7+ have also been observed to form polymeric species. Aluminum's Lewis acidity balances the generation of OH-anions at the cathode, resulting in a buffer effect and a final pH between 7 and 8, which is signif- This is consistent with earlier findings. In actuality, the soluble Al 3+ cations predominate when the pH is less than 4, the soluble aluminate anions predominate when the pH is greater than 10. The insoluble Al(OH) 3 form predominates when the pH is greater than 10. Al(OH) 15 3+ , Al 7 (OH) 17 4+ , Al 8 (OH) 20 4+ , and Al 13 O 4 (OH) 24 7+ have also been observed to form polymeric species. Aluminum's Lewis acidity balances the generation of OHanions at the cathode, resulting in a buffer effect and a final pH between 7 and 8, which is significantly different from the pH achieved with typical chemical coagulation utilizing Al salts. As a result, monomeric and polymeric species cause the production of amorphous Al(OH) 3 "sweep flocs" with large surface areas that are advantageous for fast adsorption of soluble organic molecules and particles entrapment [36].
The amount of time spent in the EC process affects its efficiency. The time required for electrolysis determined the generation of Al 3+ ions from Aluminum electrodes. Figure 11 illustrates the effect of EC time on anode consumption when the EC time was adjusted from 3.18 to 36.82 min. When the EC time was raised from 3.18 to 20.00 min, the quantity of aluminum weight lost fell from 188.89 to 111.11 ppm. While increasing the EC duration from 20.00 to 36.82 min resulted in an increase in Al weight loss from 111.11 to 177.78 ppm, respectively. This is owing to the fact that the concentrations of coagulant species created during the EC vary with time. Unlike pH, however, these alterations will have a limited effect. At longer time intervals of between 20 and 30 min, a maximum of more than 44% COD R.R is found. The findings of this study corroborate those of previous research, demonstrating that the optimal quantity of COD elimination occurred about 20 min [31]. Considering the cost and efficacy of treatment, the best reaction time was typically 20-30 min [34]. This is because as the duration of the electrolysis rose, the time required for mixing and reaction increased as well. It may be viewed as a result of the fact that as time passed, more hydrogen bubbles were formed at the cathode; these bubbles increased the degree of mixing and flotation ability of the cell, increasing the percentage removed [32]. The average effectiveness of COD removal increased from 18.0 to 26.6 percent when the electrolysis period was increased from 10 to 30 min (r 0.9518, p 0.1524). These findings suggested that a relatively long electrolysis period had a beneficial effect on the EC method used to treat OMW. Due to a rise in the amount of metal hydroxide flocs, a longer working duration is beneficial in removing COD from OMW. To boost COD removal efficiency, this tendency favours sweep coagulation followed by precipitation [9]. There was an increase in the removal efficiency as the concentration of dissolved coagulants at the Al electrode rose.
A considerable amount of coagulant dissolving from the Al electrode may explain this. To absorb more pollution particles, the electrodes' produced Al and hydroxyl ions [34]. This was not employed due to the large energy and electrode usage. Reaction times of 20-30 min were recommended in the literature for cost and effectiveness. If the colloids have overdosed, they may reverse their charge and become scattered, reducing the coagulant's efficacy and the electrode's life expectancy. Increasing electrolysis time can cause secondary reactions [36].
Additionally, another study [2,37] stated that there are two plausible explanations. To begin, an excess of counter ions from the coagulant (iron) may result in charge reversal, in which the net charge on the particles is reversed due to the adsorption of an excess of counter ions. Second, the particles are restabilized if there are insufficient colloidal particles available for bridging or if the surface of the colloidal particle is saturated or if the colloidal particle is sterically stabilized. Figure 12 illustrates an optimization plot for estimating industrial COD removal efficiency and AL weight loss versus current density and electrolysis time. These graphs are from the Equations (4)- (6). The overlay plot shows 18.41 mA cm -2 and 36.82 min at pH = 4 for 58.89% COD elimination and 337.33 g/m 3 Al weight loss. At the same time, extending the time increases electricity consumption, an increase in aluminum weight loss, an increase in chemicals used to control the pH, and a change in the chemical composition of the water. When the EC technique was used in this study, electricity and Al electrodes usage were considered two significant cost concerns. Costs may also vary according to the conductivity, kind, and features of wastewater, global parameter fluctuations, the level of destruction, and the type of sludge sought. The following equation [38] is used to calculate the operating cost of a process for treating 1 m 3 wastewater:

Optimization of Operating Conditions with Cost Estimation
Operating cost = C energy + C electrode (15) The operating cost for treating 0.90 L of OMW with electrocoagulation was estimated to be 0.05 $/kWh under optimal conditions, with a current density equal to 18.41 mA/cm 2 , electrode effective area equal to 96 cm 2 , an electric potential equal to 9.5 V, electric current equal to 1.8 A, aluminum loss in the EC cell equal to 337.30 g/m 3 and contact time equal to 36.82 min. 16.82 W and 0.0103 kWh, respectively, of power and energy, were consumed. It may be estimated that the energy required to treat 1 m 3 of water is 11.47 kWh, 2.00 USD/m 3 estimated operating cost.

Comparison with Phenomenological Conclusions
The ideal treatment settings for genuine olive mill effluent (AL anode, pH 4, 30 min electrolysis time, 15 mA/cm 2 current density) were determined by the abovementioned trials. Prior to deciding on the sort of treatment, it is critical to conduct treatability research. As shown in Table 8, writers [39][40][41][42][43][44][45][46][47] conducted research on electrocoagulation to remove COD from water. Chemical oxygen demand (COD) is a significant statistic since it reflects the total reduction in OMW contaminants. COD was effectively eliminated by electrocoagulation (41% removal ratio). Though this was less than the values presented in

Comparison with Phenomenological Conclusions
The ideal treatment settings for genuine olive mill effluent (AL anode, pH 4, 30 min electrolysis time, 15 mA/cm 2 current density) were determined by the abovementioned trials. Prior to deciding on the sort of treatment, it is critical to conduct treatability research. As shown in Table 8, writers [39][40][41][42][43][44][45][46][47] conducted research on electrocoagulation to remove COD from water. Chemical oxygen demand (COD) is a significant statistic since it reflects the total reduction in OMW contaminants. COD was effectively eliminated by electrocoagulation (41% removal ratio). Though this was less than the values presented in Table 8, it could be attributed to wastewater characteristics such as the use of diluted or synesthetic wastewater with a low COD strength. Thus, the current findings establish electrocoagulation's potential for post-treatment COD mitigation.

Conclusions
In a laboratory batch investigation, the effectiveness of the EC approach for COD reduction of genuine Olive Mill Wastewater was evaluated together with anode weight loss. This investigation aimed to optimize the EC method for treating OMW by reducing COD and electrode weight. RSM was used to optimize the trials by assessing the interactive impacts of three essential process parameters on COD elimination and the weight loss of the Al electrode [11,48]. Experimental results indicate that pretreatment with EC in OMW is an efficient approach for COD elimination. With R 2 > 0.98 and 0.99 for COD elimination and anode weight reduction responses, respectively, the proposed quadratic model suited the experimental data quite well.
The RSM analysis revealed that three operating variables (initial pH, current density, and electrolysis time) had a substantial effect on two responses, as well as their interacting effects (COD removals and anode weight loss by electrocoagulation). The optimal removal efficiency for COD and anode weight loss was determined using a Central Composite Experimental Design (CCD). pH had a substantial effect on COD elimination, according to statistical analysis of the data. The optimal and economically viable current density and electrolysis time are 18.41 mA cm −2 and 36.82 min at pH = 4, respectively, with 58.89 percent COD elimination and 337.33 g/m 3 Al weight loss, with an estimated operating cost of 2.00 USD/m 3 . As a result, we propose that RSM be used to optimize the EC process.