Introduction

Landfilling is the most frequently used method for solid waste management worldwide (Aslam et al. 2022). One of the environmental threats associated with this waste management procedure is landfill leachate generation. The fluid percolating via the landfill from the liquids present in the waste, rainwater, and outside pool leads to the generation of leachate (Yuan et al. 2021; Kucharska et al. 2022). Leachate is described by a high chemical oxygen demand (COD), biochemical oxygen demand (BOD5), ammoniacal nitrogen (NH3N), total organic carbon (TOC), suspended solids (SS), and heavy metals (Umamaheswari et al. 2020, Paula et al. 2022). Leachate also contains various molecular masses of organics, such as humic substances (HS), which are hazardous and resistant to biological treatment (Argun et al. 2020). The discharge of untreated leachate into the environment can pollute the soil and groundwater resources and is also hazardous to living organisms (Gautam et al. 2022). Therefore, the development of efficient methods for the treatment of landfill leachate has been actively studied. Over time the chemical composition of leachate changes due to the degradation of organic matter (Xu et al. 2018). Aged landfill leachate often contains higher recalcitrant organic matter than the young one, and biological treatment is not appropriate for decreasing the organic pollutants of aged leachate (Chen et al. 2020; Wu and Li 2021).

A combination of various treatment approaches such as chemical, biological, and physicochemical treatments is widely used to treat leachate. Recently, electrochemical processes have attracted widespread attention to treat landfill leachate (Ghimire et al. 2019, Guo et al. 2022). The electrocoagulation process is known as a promising technology because it has advantages such as high performance, operation at ambient pressure and temperature, and the ability to adjust to variations in flow rate and influent compositions (Niza et al. 2021). The results of a study by Huda et al. showed that the electrocoagulation process using iron electrodes reduced BOD, COD, and chromium content (Huda et al. 2017). Bagastyo et al. (2022) investigated the effectiveness of the electrocoagulation (EC) process based on the reduction of organic and nitrogenous contaminants in landfill leachate. Compared to the conventional coagulation process, this process also induces a small volume of sludge that could be proposed as an environmentally friendly process (Mehralian et al. 2021). In the electrocoagulation process, an electrolytic cell with an anode and a cathode involves the generation of coagulant ions by dissolving electrodes electrically. In this method, the metal ions and hydrogen gas generation occur at the anode and the cathode, respectively. Destabilizing of contaminants takes place by different reactions (Eqs. 12) occurring on the electrode's surface (Galvão et al. 2020).

$$({\text{Basic conditions}})\;{\text{Al}}^{3 + } + 3{\text{OH}}^{ - } \to {\text{Al}}\left( {{\text{OH}}_{3} } \right)$$
(1)
$$({\text{Acidic conditions}})\;{\text{Al}}^{3 + } + 3{\text{H}}_{2} {\text{O}} \to {\text{Al}}\left( {{\text{OH}}_{3} } \right) + 3{\text{H}}^{ + }$$
(2)

The formation of hydroxides/oxyhydroxides provides active sites to adsorb contaminants. Simultaneously, the hydrogen and oxygen gas bubbles released at the cathode and anode surfaces move the contaminant to the top of the solution (Eqs. 34), where it can be more easily agglomerated and removed (Huda et al. 2017, Galvão, de Souza et al. 2020).

$$2{\text{H}}_{2} {\text{O}}_{{\left( {\text{l}} \right)}} \to 4{\text{H}}_{{\left( {{\text{adq}}} \right)}}^{ + } + {\text{O}}_{{2\left( {\text{g}} \right)}} + 4{\text{e}}^{ - }$$
(3)
$$2{\text{H}}_{2} {\text{O}}_{{\left( {\text{l}} \right)}} + 2{\text{e}}^{ - } \to 2{\text{OH}}^{ - } + {\text{H}}_{{2\left( {\text{g}} \right)}}$$
(4)

The application of the electrocoagulation process to remove different contaminants has been presented frequently; however, most of these investigations were focused on development at the batch mode studies. Gautam et al. (2022) studied the treatability of landfill leachate by electrocoagulation process for COD reduction. Results indicated that the galvanized iron electrode could remove 90% of COD and other parameters (Gautam et al. 2022). Niza et al. (2021) investigated the efficiency of batch-mode electrocoagulation using plate electrodes in an old leachate treatment. Electrocoagulation with plate electrodes was able to achieve a 50% reduction of NH3-N (Niza et al. 2021). Galvão et al. (2020) studied the electrocoagulation process to treat landfill leachate utilizing a 2-L reactor with aluminum electrodes. The best removal efficiency was obtained 40% for COD at a current density of 128 A m−2 (Galvão et al. 2020).

The response surface methodology (RSM) is a practical approach for analyzing the relationships between several input and response parameters. The RSM technique was applied to improve the optimized response that is affected by various independent parameters. This method will use to reduce the requirement for performing repeated experiments for tests with several factors.

Based on our knowledge, no study has been performed to convert a landfill leachate treatment system developed from a batch experiment into a continuous-flow landfill leachate treatment system that can be used in industrial-scale systems. Accordingly, this study aims to develop an electrocoagulation continuous-flow reactor for treating landfill leachate in terms of COD, BOD5, TOC, NH3-N, color, turbidity, and heavy metals removal. In addition, the optimization of the continuous-flow electrocoagulation process was carried out using response surface methodology. The performance of electrocoagulation continuous-flow reactors (CFR) was also compared by using both aluminum and iron electrodes. The effect of various parameters on the performance of CFR-EC reactor as well as electrical energy consumption was also studied.

Materials and methods

Analysis and characterization of landfill leachate

The landfill leachate was collected from a detention pond at the sanitary landfill treatment plant in Yazd (Iran). The landfill leachate samples were kept at 4 C for all experiments. The characteristics of leachate are depicted in Table 1. The landfill leachate was analyzed based on standard methods in terms of physicochemical parameters such as chemical oxygen demand (COD-5220), total organic carbon (TOC-5310), biochemical oxygen demand (BOD5-5210), total suspended solids (TSS-2540 D), NH3-N (4500), pH (AZ Instrument Corp, 86,502 AZ), turbidity, and color (APHA 2005). The COD concentration was measured using COD reagent vials at the wavelength of 600 nm (Lovibond COD Tube Tests, Germany). For the BOD5 analysis, a dissolved oxygen meter was utilized to measure the dissolved oxygen values at 5 days of incubation (YSI 5000, USA). The color was determined using a UV–Vis spectrophotometer at the wavelength of 720 nm (DR6000, HACH, USA). The concentrations of heavy metals (Cr6+, Pb2+, As3+, Mg2+, B3+, Mn3+, Ni2+, and Ba2+) were measured by atomic absorption spectrometry (PinAAcle 900F, PerkinElmer, USA). All chemicals utilized were purchased from Merck Company.

Table 1 Characterization of landfill site leachate

Set-up of CFR-EC reactor

Figure 1a, b depicts the schematic of the CFR-EC reactors with the new configuration of the anode and cathode. Based on Fig. 1, the two cylindrical electrocoagulation reactor of 2-L internal volume was equipped with twelve parallel tubes (20 cm × 0.6 cm; gap e = 4 cm), utilized as anode and cathode, respectively. In both reactors, the anode with a smaller diameter (19 cm × 16.83 cm) was placed into the anode with a larger diameter (19 cm × 21.91 cm) to achieve more surface area. The gap between the anode and cathode was fixed at 1.27 cm to decrease energy failures. Either aluminum or iron electrodes could be used to compare the effect of electrode metal. The two CFR-EC reactors were connected to a digital DC power supply (DAZHENG PS-305D, China) supplying a current density ranging from 0.14 to 1.1 mA cm−2. The efficiency of the CFR-EC reactor for the removal of contaminants was calculated using Eq. (5).

$${\text{\% R}} = \frac{{{\text{C}}_{{\text{i}}} - {\text{C}}_{{\text{f}}} }}{{{\text{C}}_{{\text{i}}} }} \times 100$$
(5)

where Ci (mg L−1) and Cf (mg L−1) are related to the initial and final contaminant concentrations of raw and treated leachate, respectively.

Fig. 1
figure 1

A Schematic of the CFR-EC reactor: (1) input, (2) peristaltic pump, (3) flow control valve, (4) CFR-EC reactor, (5) anodes, (6) cathodes, (7) output valve, (8) treated leachate, (9) effluent, (10) sludge disposal. B Cross-sectional view of CFR-EC reactor surface: a anode [diameter: 20.32 cm], b anode [diameter: 15.24 cm], c cathodes, d flow direction

Leachate treatment in the CFR-EC reactor

First, 2 L of landfill leachate was mixed on the magnetic stirrer at 150 rpm to achieve a homogenized solution. Then, landfill leachate through a pump was transferred to the CFR-EC reactor after pH adjustment (3.0–11.0). After a hydraulic retention time (HRT: 10.0–90.0 min, Q: 200 − 22.2 mL min−1), the treated leachate was discharged into the effluent tank through the outlet valve. The effluent was collected in a 50-ml beaker. Three applied current densities (ACD) of 0.14, 0.64, and 1.1 mA cm−2 were chosen to evaluate the influence of current density on the removal efficiency. The generated sludge in the reactor was then permitted to settle for 30 min. All experiments were conducted at room temperature (25 ± 0.5 °C).

Optimization of the CFR-EC reactor

The Box-Behnken model was performed to optimize the influences of ACD, pH, and HRT on the removal rate using the Design Expert software (Ver. 13).

Cost-effectiveness analysis

Analysis of operating costs including consumptions of electrodes, energy, and disposal of sludge.

From an economic view, the operating cost of the new CFR-EC reactor was evaluated based on the amount of electrode and electrical power consumed (Eq. 6).

$${\text{OC }}\left( \$ \right) = {\upalpha }_{1} {\text{C}}_{{{\text{Power}}}} + {\upalpha }_{2} {\text{C}}_{{\text{Electrode }}}$$
(6)

where α1 and α2 are the unit cost of electricity and electrode materials, respectively. CPower (kWh m−3) and CElectrode (kg m−3) are associated with power consumed and electrodes, respectively. According to the Iran market 2022, unit costs were 0.002 $/kWh of electricity and 0.66 $/kg of iron, respectively. Based on Faraday’s second law (Eq. 7), the rate of electrodes consumed can be determined by the consumed weight of electrodes (Abdulhadi et al. 2021).

$${\text{C}}_{{{\text{Electrode}}}} \left( {\text{g}} \right) = \frac{{{\text{j}}_{amp} \times {\text{HRT}}_{{{\text{sec}}}} \times {\text{MW}}_{{{\text{g}}.{\text{mol}}^{ - 1} }} }}{{3 \times 96500_{{{\text{C}}.{\text{mol}}^{ - 1} }} \times {\text{V}}_{{{\text{m}}^{3} }} }}$$
(7)

where j, HRT, MW, and V are the applied current density (amp), retention time (sec), molecular weight (g mol−1), and volume of solution (m3), respectively. Energy consumption was also calculated based on Eq. (8).

$${\text{C}}_{{{\text{Power}}}} \left( {{\text{KWh}}.{\text{m}}^{3} } \right) = \frac{{{\text{j}}_{{{\text{amp}}}} \times {\text{V}}_{{{\text{volt}}}} \times {\text{HRT}}_{{{\text{sec}}}} }}{1000}$$
(8)

where V is the actual cell voltage (volt).

Results and discussion

Interaction of variables on CFR-EC reactor performance

Different electrode materials affect the performance of the CFR-EC process. The most widely applied electrodes are aluminum and iron since they are effective, cheap, and available. The applicability of the CFR-EC process and the interaction between the COD removal with different variables are displayed in Fig. 2 and Table 2. Based on Table 2, the CFR-EC reactor with an iron electrode had a better removal rate than the aluminum electrode concerning COD removal. The maximum removal rate of COD (59%) with CFR-ECFe reactor was obtained at an ACD of 1.1 mA cm−2, pH of 11.0, and HRT of 50 min (40 mL min−1), while the least amount of COD reduction (9.5%) occurred when the pH of leachate was neutral (7.0), ACD at its lowest (0.14 mA cm−2), and HRT value of 10.0 min. As exhibited in Fig. 2a, c, an increase in ACD enhanced the COD removal efficiency using both electrodes. With the increase in ACD, the extent of anodic dissolution of aluminum and iron leads to the generation of a greater amount of hydroxide flocs to remove contaminants. Also, the bubble-generation rate with rising ACD increases, the bubble size declines, and the amount of metal oxidized boosts producing more efficient and swifter elimination (Abbasi et al. 2020). In this condition, the electrocoagulation process improves and further gas bubbles will be distributed at the cathode, inducing the flotation of pollutants (Betancor-Abreu et al. 2019; Igwegbe et al. 2021). Similarly, raising the HRT shows an increase in the generation of Fe (OH)3, Al (OH)3, and H2 gas bubbles, which also positively correspond to the removal of COD. The highest COD removal was achieved in the first 50.0 min at 1.1 mA cm−2 using both electrodes. Within 90.0 min applying ACD of 0.64 mA cm−2, the removal rate of COD was relatively reduced and reached 39% and 48% using Fe and Al electrodes, respectively (Fig. 2b–d). The shorter HRT required to reach more satisfactory performance of EC process (i.e., HRT: 50.0 min) could be expressed by the presence of coagulant species [(Fe(OH)3(s) and Al(OH)3 (s)] that were produced in the first times of the process. In this state, the capture of colloidal particles and soluble organic compounds by agglomeration and adsorption processes causes faster contaminant removal in the solution (Hakizimana et al. 2017). Generally, the degradation of COD by the electrocoagulation process occurs through coagulant species [(Fe(OH)3(s)], where the colloidal particles and soluble organic compounds are captured by agglomeration and adsorption processes that lead to faster pollutant removal in the solution. Zampeta et al. (2022) reported a similar result using aluminum electrodes in a continuous electrocoagulation reactor. When treating printing ink wastewater with COD 20,000 mg L−1, the maximum removal efficiency was obtained after 65-min treatment at 83 mA cm−2 of ACD, while the HRT raised to 90 and 110 min at the lower ACD (42 and 21 mA cm−2) (Zampeta et al. 2022). The removal efficiency of contaminants is directly influenced by the concentration of metal ions and hydroxyl generated on the electrodes that are proved by Faraday’s law (Safari et al. 2016; Igwegbe et al. 2021). According to Faraday's law, coagulant amounts theoretically have a direct relationship with the ACD and HRT in an electrocoagulation reactor. Thus, when the HRT of the process is increased, the amount of metal ions as coagulant agents increases; consequently, the percentage of COD removal is improved. Figure 2 also presents the removal of COD as a function of the pH, which was varied from pH 3.0 to pH 11.0 for both the iron and aluminum electrodes. From the results, it is evident that the removal of COD was higher in the alkaline conditions compared to the acidic condition. The removal of COD was found to be more effective at the initial pH of 11.0. This finding was in accordance with other results that investigated the removal efficiency of pollutants (Manikam et al. 2019). Indeed, the acidic condition is undesirable for COD removal due to the reduction in the amount of OH species generated during the electrocoagulation process and the possibility of corrosion occurring within the aluminum electrodes, which leads to lower removal efficiency. With the increase in pH during the electrocoagulation process due to the hydrogen gas evolution on the cathode and the hydroxyl ions enhancement in the solution, high percentage removal was achieved. Generally, the iron electrode was more effective for landfill leachate treatment than aluminum which may be due to the high adsorption capacity of hydrous ferric oxides.

Fig. 2
figure 2

BBD-3D response plots for the treatment of landfill leachate. [a, b: (CFR-ECFe)] and [c, d: (CFR-ECAl)]

Table 2 Condition of the experiments and responses based on BBD

Optimization of the parameters

The BBD was employed to develop a regression model that investigates the influence of parameters on COD removal using both electrodes. Equations (9, 10) are related to COD removal using iron and aluminum electrodes, respectively. Coefficients in Eqs. (9 and 10) show the effect of all influential parameters on COD removal.

$${\text{\% R}}_{{{\text{CFR}} - {\text{EC}}_{{{\text{Fe}}}} }} = 28.9 + 9.98{\text{A}} + 8.81{\text{B}} + 4.46{\text{C}} + 6.69{\text{A}}^{2} - 5.84{\text{C}}^{2}$$
(9)
$$ {\text{\% R}}_{{{\text{CFR}} - {\text{EC}}_{{{\text{Al}}}} }} = 8.78 - 5.51{\text{A}} + 8.48{\text{B}} + 0.339{\text{C}} + 0.55{\text{A}}^{2} - 1.28{\text{B}}^{2} - 0.002{\text{C}}^{2} $$
(10)

Also, Fig. 3 presents data related to the relationship between the experimental and predicted values. The results of ANOVA for evaluation of the accuracy and significance of the quadratic model are shown in Table 3. Three indexes of the ANOVA, R2, P-value, and lack of fit, have been utilized to evaluate the accuracy of the model (Pormazar and Dalvand 2022). From Table 3, it can be concluded that the selected model has high R2 and adj R-squared. Two models have a very low P-value (< 0.0029 and < 0.0001 for Fe and Al electrodes), demonstrating the model is significant (Zarei et al. 2017). The lack of fit index with 0.0771 and 0.0831values indicates the excellent significance of the models concerning COD removal. As shown in Table 3, all parameters are significant in COD removal. The high F-values of 36.45 and 126.76 with Fe and Al electrodes are related to the effect of pH demonstrating that pH is the most effective variable for COD removal. After that, the parameters of ACD and HRT have a great effect on the electrocoagulation process to remove COD, respectively.

Fig. 3
figure 3

Experimental value versus predicted value

Table 3 ANOVA for the quadratic model of COD removal

To assess the compressive performance of the CFR-EC in the treatment of landfill leachate, the treatment was performed at optimized conditions. Figure 4 presents the percentage removal of COD, BOD5, TOC, NH3-N, color, turbidity, and heavy metals of the landfill leachate after treatment using the iron electrode. The findings illustrated that the removal efficiency of COD, TOC, BOD5, and NH3-N reached 59, 55, 64, and 27%, respectively, at optimum conditions. In this condition, the removal rate of color and turbidity were 59 and 86%, respectively. Also, 50 to 99% of heavy metals were successfully eliminated during the EC process. Figure 5 shows the photographs of real landfill leachate before and after treatment using the CFR-EC process. As shown in Fig. 5, the CFR-EC process can successfully treat and eliminate the pollutants from the real landfill leachate.

Fig. 4
figure 4

The overall performance of CFR-ECFe to treat landfill leachate. (ACD: 1.1 mA cm−2, pH: 11.0, and HRT: 50.0 min [40.0 mL min−1])

Fig. 5
figure 5

Real landfill leachate before and after treatment using CFR-ECFe process (HRT: 50.0 min)

Mechanism of COD degradation by CFR-EC process

Figure 6 displays the degradation pathway of COD using the CFR-EC process. As shown in Fig. 6, COD degradation usually involves the following steps: 1. sacrificing the anode under the effect of a current density to generate of metal cations; 2. the production of OH ions on the cathode; 3. formation of MOH(s) with high adsorption capacity to adsorb COD molecules; 4. oxidation of COD molecules to less toxic products; 5. neutralization of COD molecules with metal ions; 6. aggregation of neutralized pollutants and their adsorption; 7. flotation using the gases produced in the CFR-EC reactor. Generally, degradation of contaminants takes place through neutralization of negatively charged colloidal particles via cation hydrolysis products and removal of pollutants in the form of amorphous hydroxides.

Fig. 6
figure 6

Mechanism of COD degradation by CFR-EC process

Operating cost of the CFR-EC process

The cost–benefit analysis demonstrates that the energy consumption in the CFR-ECFe reactor was 0.013 kWh m−3 in the optimum condition. The electrode consumption (0.33 Kg m−3) cost at the optimum condition estimated based on a price of 0.66 $ kg−1 was 1.6 × 10−4 $. Then, the total operating cost for the CFR-EC process was 0.21 $/m3 of landfill leachate treatment. It can be concluded that the CFR-EC process is a cost-efficient and viable technique for treating landfill leachate with high COD concentration.

Comparison of the CFR-EC reactor with other studies

Different types of electrocoagulation reactor have been developed to treat leachate. Table 4 shows the comparative efficiency of different electrocoagulation reactor used for landfill leachate treatment. As is depicted, the CFR-EC reactor with novel configuration indicates a suitable performance to treat landfill leachate.

Table 4 Performance of different electrocoagulation reactor for COD removal from leachate

Conclusions

Successful application of the CFR-EC reactor was reported to treat aged landfill leachate with high COD values (approximately 75,000 mg L−1) by choosing three basic operational variables (ACD, pH, and HRT) and providing information about the cost–benefit analysis of the process. The CFR-EC reactor with an iron electrode had better removal efficiency than the aluminum electrode. The results illustrated that the treatment of leachate using CFR-ECFe reactor leads to 59, 64, 55, and 27% COD, TOC, BOD5, and NH3-N reduction, while the removal percentage of color and turbidity was obtained 59 and 86%, respectively. Removal percentages of heavy metals such as Cr6+, Pb2+, As3+, Mg2+, B3+, Mn3+, Ni2+, and Ba2+ were obtained 50, 70, 80, 99, 81, 99, 20, and 65% at optimized conditions (ACD: 1.1 mA cm−2, pH: 11.0, and HRT: 50.0 min [40.0 mL min−1]). Total operating costs were calculated as 0.21 $/m3 with the iron electrode. In summary, the application of a CFR-EC reactor to treat aged landfill leachate with high COD concentrations is efficient and cost-effective.