Introduction

The intensive use of dyes in our modern life, especially in the textile and leather industry can have a negative impact on the environment (Kant 2012). The effluents containing dyes are often very complex and require intensive treatment because of their stability, their low biodegradability and high toxicity (Ratna 2012). Sadly, about 15% of the total world production of dyes is lost during the dyeing process and is released in the textile effluents (Jose et al. 2013); hence, the growing need to protect the environment from these harmful chemicals. Over the years, a lot of techniques were used to treat the textile wastewater and solve the problem of industrial effluents, such as biological treatment (Agostina et al. 2014), adsorption (Ramesh and Sreenivasa 2015), ozonation (Ahao et al. 2006), coagulation–flocculation (Guibal and Roussy 2007) and membrane filtration (Goksen and Yetis 2006). These methods are rather costly and little efficient (Mollah et al. 2004). Recently, adsorption and electrocoagulation emerged as very effective solutions to overcome the major drawbacks of conventional processes in removing unwanted wastewater effluents (Hamdan and El-Naas 2014). These methods have the ability to remove a wide range of pollutants (Barrera-Díaz et al. 2014; Elabbas et al. 2016), such as phenolic wastes (Adhoum and Monser 2004), petroleum refinery wastewater (Gousmi et al. 2016), organic wastewater (Mahvi et al. 2011) ammoniac and phosphate treatment wastewater (Adebayo et al. 2015), textile wastewater (Saeed et al. 2015), and removal of heavy metals (Umran and Sadettin 2015).

Methylene blue (basic dye) and indigo carmine (anionic dye) are widely used in the Tunisian textile industry in coloring paper, paper stock coating, dyeing cottons and wools, etc. (Vadivelan and Vasanth Kumar 2005; Alpat et al. 2008). The chemicals used in coloring and finishing phases are very harmful and lead to groundwater pollution which requires real solutions to improve the quality of dye and save water resources without affecting the yield and the quality of the textile production. The electrocoagulation process is deemed an economical and environmental choice to minimize the drawbacks of conventional wastewater treatment technologies (Ricordel et al. 2010); it provides a number of benefits, such as low cost, compatibility, and safety (Mollah et al. 2004). It is based on the generation of a coagulating agent in situ via the application of a direct current through a sacrificial metal anode, usually iron or aluminum. This process has been successfully used for the treatment of wastewater. Unfortunately, the use of direct current declines the efficiency of the process because of the impermeable oxide layer formed on the cathode surface; which prevents the effective current transfer between the anode and the cathode (Subramanyan et al. 2011). Contrariwise, adopting AC can be the best solution for this problem thanks to the periodicity of this current that prevents the oxide layer formation and accelerates the reaction speed. Subramanyan et al. (2011) and Cerqueira et al. (2014) showed the importance of alternating current (AC) in the removal of pollutants by the electrocoagulation (EC) process through the dissolution of different electrode, such as Mg, Al, Fe and Zn. Achieving maximum pollutant removal in a minimum time was the common goal of all these researches. As an alternative, we attempted to achieve an effective dye removal by the electrocoagulation process using two Pb (99%) electrodes by adopting AC and DC taking into account the electrode dissolution, the time needed for the treatment, the cost and the energy consumed. A comparison with the coagulation–flocculation process was made as well. Various parameters were studied, such as initial pH, initial dye concentration, voltage, current density and temperature. FTIR, SEM and UV–visible characterizations of dyes before and after treatment with AC and DC were done. Finally, the mathematical modeling of the kinetics and adsorption isotherms was made.

Materials and methods

Dye solutions preparation

Methylene blue (purity 95%) and indigo carmine (purity 85%) were obtained from Fluka™ and Acros™, respectively. Stock solutions were prepared by dissolving equal amounts of dye in distilled water to give a concentration of 1 g/L. All working solutions were prepared by diluting the stock solution with distilled water to the needed concentrations which varied from 10 to 40 mg/L for the IC and from 20 to 80 mg/L.

Coagulation–flocculation experiments

Coagulation–flocculation tests were carried out by a jar test at neutral pH. In each beaker, 250 mL of the solution were placed to be treated. Stock solutions were prepared periodically by dissolving 1 g of coagulant and flocculant in 1 L of distilled water. The concentration of coagulant (aluminum sulfate (Al2(SO4)3) and flocculant (NACLO Optimer 9601 PULV) were, respectively, varied from 100 to 300 mg/L and from 40 to 120 mg/L. Physical and chemical properties of Al2(SO4)3 and NACl Optimer 9601 PULV are presented in Table 1. The reagent addition sequence was done in two stages. First, coagulant was added to the solution with a coagulation stirring speed of 200 ppm. Then the flocculant was added in the solution with an agitation flocculation speed of 50 ppm. The flocculation-coagulation was carried out followed by a settling period. The physical and the chemical properties of the coagulant and the flocculant used are presented in Table 1.

Table 1 Physical and chemical properties of Al2(SO4)3 and NAClO Optimer 9601 PULV

Electrocoagulation experiments

The electrocoagulation tests were done using two electrodes of lead (Pb (99%) of size (12.4 cm × 0.5 cm) and inter electrode distance was 4 cm. They were immersed in 100 mL of an aqueous solution of dyes with concentrations ranging from 20 to 80 mg/L of MB and from 10 to 40 mg/L of IC using AC and DC for a voltage that varies between 6 to 15 V. All the experiments were triplicated. To increase the electrical conductivity of the dye solution, we added an amount of sodium nitrate (NaNO3) at a concentration of 10 g/L to obtain higher conductivity values. The control of the elimination of MB and IC from the solution was investigated at different pH values ranging from 2 to 10) using AC and DC sources of current. The residual concentrations of dyes were determined by spectrophotometry (Bichrome Libra S.22) at λ max of 610 and 663 nm, respectively, for IC and MB at different times (5 min, 10 min, …) until saturation. Fourier transform infrared spectrometry (FTIR) (Pekin Elmer Spectrum two) was used to analyze the functional groups in the dye molecules before and after treatment. Scanning electron microscopy (SEM) was performed using a JEOL JSM 5400 scanning microscope after coating them with gold using a JEOL JFC-1199E ion sputtering device. The dye removal efficiencies were calculated from the difference between initial and final concentration of each dye. The dye removal rates were obtained by Eq. (1):

$$ \% {\text{ dye removal }} = \frac{{\left( {C_{0} - C_{i} } \right)}}{{C_{0} }} \times 100, $$
(1)

where C o is the initial dye concentration (mg/L) and the concentration C i is the residual dye concentration at any time (mg/L).

Results and discussions

Effect of coagulant and flocculant types on the removal of MB and IC

To optimize the effect of the coagulation–flocculation on the removal of MB and IC from the solution, tests were made at pH = 7, T = 25 °C, C dye = 20 mg/L. Results are shown in Table 2. The rate of dye removal increased from 11.25% to 13.20 for the MB and from 27.5% to 29.25 for the IC when the concentration of coagulant and flocculant were varied from 40 to 120 mg/L. These results confirm the poor applicability of this process for the elimination of such dyes.

Table 2 Tests with different concentration of sulfate of alumina and NaClO Optimer

Effect of the electrocoagulation process on the removal of dyes from solution

Effect of initial pH on the elimination of dyes

The initial pH is one of the main factors that control the performance of EC (Mollah et al. 2004). The control of the elimination of MB and IC from the solution was investigated at different pH values ranging from 2 to 10 using two sources of AC and DC. Generally, the pH varies during the process. This variation depends on the type of electrode material and the initial pH (Chaminda et al. 2005). Maximum dye removal was obtained for neutral pH (Fig. 1). The % dye removal of MB reached 99.38 and 96.43%, respectively, for AC and DC and the % dye removal of IC reached about 100 and 98.5%, respectively, for AC and DC. According to the Pourbaix diagram Pb–H2O, the formation of PbO2 is favored at pH between 2 to 7 and at a higher voltage. These conditions favor the elimination of dyes. The electrodes used in this study were made of lead (Pb 99%) and the reactions were:

Fig. 1
figure 1

Effect of initial pH on the removal of IC (A) and MB (B) from aqueous solution. C 0 = 10 mg/L, voltage = 15 V, d = 2 cm, T = 298 K, t = 180 min, V(coag) = 300 mg/L, V(floc) = 120 mg/L

At the anode:

$$ {\text{Pb}} \to {\text{Pb}}^{2 + } + 2{\'e },\quad {\text{Pb}}/{\text{Pb}}^{2 + } = - \, 0.13\,{\text{V}}/{\text{HE}}, $$
(2)

At the cathode:

$$ 2{\text{H}}_{2} {\text{O}} + 2{\'e } \to {\text{H}}_{2} + 2{\text{OH}}^{ - } ,\quad {\text{H}}_{2} {\text{O}}/{\text{H}}_{2} = 0\,{\text{V}}/{\text{NHE}} . $$
(3)

In the solution:

$$ {\text{Pb}}^{2 + } + 2{\text{OH}}^{ - } \to {\text{Pb}}\left( {\text{OH}} \right)_{2} . $$
(4)

At neutral pH: O2 and Pb belong to different domains. Lead can be oxidized by dissolved oxygen following this reaction:

$$ {\text{Pb }}\left( {\text{OH}} \right)_{2} \to {\text{PbO}} + {\text{H}}_{2} {\text{O}} . $$
(5)

The Pb2+ ions generated in the solution can produce the corresponding hydroxides for a large interval of pH. These hydroxides have the ability to react with the counter ions in the solution; which leads to the neutralization of particles and then to the elimination of dyes (Subramanyan and Jothinathan 2011).

Effect of voltage on the elimination of dyes

The evolution of the rate of dye removal by AC and DC is shown in Fig. 2. It was found that the removal rate of dyes increased from 65 to 85% and from 24.5 to 68.3%, respectively, for AC and DC as the voltage increased from 6 to 15 V. Consequently, the contact time for the elimination of dyes decreased. Similar results were obtained by Subramanyan et al. (2011). According to Ohm’s law (Eq. 6):

$$ U = R \cdot I, $$
(6)

the voltage U between the electrodes is imposed on the intensity of the current passing through the solution and its resistance R. With the increase of the applied voltage in the solution, the number of charge carriers increases too, which leads to an increase of the conductivity which improves the efficiency of dye removal.

Fig. 2
figure 2

Effect of voltage on the removal of IC (A) and MB (B) from aqueous solution. C 0 = 10 mg/L, pH = 7, d = 2 cm, T = 298 K, t = 180 min, V(coag) = 300 mg/L, V(floc) = 120 mg/L

Effect of initial concentration on the elimination of dyes

To estimate the effect of the initial dye concentration on the removal of MB and IC from solution, experiments were conducted at varying initial concentrations from 10 to 80 mg/L for the MB (Fig. 3A) and from 10 to 40 mg/L for the IC (Fig. 3B) using AC and DC under room temperature, for neutral pH and for a voltage of 15 V. Figure 3 shows that the rate of dye removal increased in parallel with initial dye concentration. The rate of dye removal of MB reached 98.8 and 97.3%, respectively, for AC and DC (Fig. 3A), the same behavior was observed for IC where the rate of dye removal reached 100 and 98.5% for AC and DC (Fig. 3B), respectively. These results may be explained by the collision theory that states the existence of more substance in a system increases the chance that molecules collide and speed up the rate of the reaction. Therefore, the increase in the dye concentration causes an increase in the number of ions in solution involving a higher adsorption capacity. By comparing the effect of AC and DC, it is obvious that both currents have similar elimination efficiency potential. However, AC was more rapid and its energy consumed was lower.

Fig. 3
figure 3

Effect of initial concentration on the removal of MB (A) and IC (B) from aqueous solution. pH = 7, T = 298 K, t = 180 min, d = 2 cm, V(coag) = 300 mg/L, V(floc) = 120 mg/L

Effect of current density on the elimination of dyes

The current density is an important factor which greatly controls the reaction rate in most electrochemical processes. It is determined by dividing each measured current through the surface of the electrode (Chen 2004; Pandian et al. 2013). The effect of the current density on the removal of IC and MB is shown in Table 3. As illustrated here, the rate of dye removal increased with the increase of current density from 0.1 to 0.5 A/m2. The rate of dye removal of IC reached about 100% for AC with an energy consumed of 4.35 × 10−7 kWh/m3 and about 99% for DC with an E c of 2.03 × 10−6 kWh/m3 and for the rate of dye removal of MB, it reached about 99% with an E c of 4.89 × 10−6 kWh/m3 and 96.5% with E c of 7.61 × 10−6 kWh/m3, respectively, for AC and DC. According to previous studies, the removal efficiency of dye is linear to the applied current due to the generation of more coagulating agent when higher current flow passes through the electrodes (Daneshvar et al. 2004).

Table 3 Difference between AC and DC on the removal of IC (a) and MB (b) and their effect on E c

Effect of temperature on the elimination of dyes

The effect of temperature on the removal of MB and IC by electrocoagulation is shown in Fig. 5. Different temperature values (298,308 and 318 K) were tested for neutral pH, an initial concentration of 20 mg/L and a voltage of 15 V. Maximum dye removal was obtained at room temperature; it reached about 89.8 and 77.5%, respectively, for AC and DC for the IC (Fig. 4A) and reached about 88.2 and 79.5%, respectively, for AC and DC for the MB (Fig. 4B). An increase in temperature was followed by a decrease of the rate of dye removal for both AC and DC. In fact, the rate of dye removal decreased from 89.8 to 62.3% and from 77.5 to 56%, respectively, for AC and DC for the IC and from 88.2 to 45% and from 62.3 to 40%, respectively, for AC and DC for the MB due to an increase in temperature from 298 to 318 K. This result indicates that the process could be considered as an exothermic process. Similar result was previously discussed by Subramanyan et al. (2011).

Fig. 4
figure 4

Effect of temperature on the removal of IC (A) and MB (B) from aqueous solution. pH = 7, T = 298 K, t = 180 min, d = 2 cm, V(coag) = 300 mg/L, V(floc) = 120 mg/L, C 0 = 40 and 80 mg/L

Comparative study between the EC and the coagulation–flocculation on the removal of IC and MB

To establish the efficiency of the EC process relative to the coagulation–flocculation process used to remove MB and IC from aqueous solutions, a comparative study was done based on the rate of dye removal capacity and the time needed for the process. For the coagulation–flocculation process, we followed the evolution of the concentration after the run of 20 min of agitation with the jar test. We used the same solution without jar test. Based on Fig. 5, current accelerated the speed of the rate of dye removal relative to results in the absence of current. Since the first 30 min, the rate of dye removal passed from 14.36 to 99.8% and from 10.4 to 98.2% for the IC, respectively, for AC and DC for a current density of 0.5 A/m2. Contrariwise, it reached only 27.5% with the coagulation flocculation process. The rate of MB removal passed from 35.4 to 98.3% and from 21.6 to 97.42%, respectively, for AC and DC for a current density of 0.5 Å/m2 and it reached about 11.25% for the coagulation–flocculation process. As a conclusion, the EC process has a better potential of dye removal relative to classical coagulation–flocculation process.

Fig. 5
figure 5

Kinetics of changes in the rate of dye removal of IC (A) and MB (B) over time with and without current pH = 7 V, d = 2 cm T = 298 k, t = 180 min, v(coag) = 300 mg/L v(floc)120 mg/L, C 0(IC) = 40 mg/L, C 0(MB) = 80 mg/L

Characterization by Fourier transforms infrared spectroscopy (FTIR) and spectrophotometer UV–visible

A simplified comparison between bands before and after treatment with current was done using a UV–visible spectrophotometer. Figure 6 showed that there was no appearance for new bands for both dyes. There was only a difference in the intensity of bands. This suggests that the removal of dyes was done by adsorption.

Fig. 6
figure 6

UV-visible spectra of indigo carmine (A) and methylene blue (B) obtained at 0, 60, 120 and 180 min of electrolysis with Pb electrodes using direct current, U = 15 V, J = 0.5 A/m2, c 0 = 10 mg/L, pH = 7, U = 15 V

Figure 6A presents the FTIR spectrum of IC-lead hydroxide. Adsorption bands at 3107 and 3419 cm−1 are assigned to amine group, two peaks located at 1040, 1085 cm−1 were assigned to stretching vibration of sulfonic acid in IC, an adsorbent band located at 1622 cm−1 was assigned to the vibration C=C aromatic bond. Another peak located at 1741 cm−1 associated to a C=O bond and finally, a peak located at 662 cm−1 characteristic of the Pb oxygen vibration. Figure 6B presents the FTIR spectrum of MB-lead hydroxide. A simple analysis of the spectra indicated the presence of a strong peak located at 3435.81 cm−1 characteristic of O–H stretching vibration in the Pb(OH)2 structure. Another peak located at 1633.2 cm−1 assigned to the bent vibration H–O–H. The one located at 1040.2 cm−1 is assigned to Pb–O–H bending and the large peak located in the range (800–550) cm−1 indicates the Pb oxygen vibration (Fig. 7).

Fig. 7
figure 7

FTIR spectra of the MB (B) and the IC (A) before and after treatment with AC and DC. a Pure dye, b dye after treatment with AC and c dye after treatment with DC

Morphological characterization (SEM)

The morphology of the Pb electrodes surface before and after two kinds of treatment with (AC, DC) was characterized by SEM as shown in Figs. 8 and 9. For the pure Pb electrode it has a solid structure with a number of well-ordered pores, it is clearly visible that there was an absence of oxide layer on the surface before treatment with current. After treatment with AC and DC, the surface was totally changed. Both structures were constituted by an agglomerate of heterogeneous particles of different sizes: one was ductile (Fig. 9A) when AC was fed and the other was frangible (Fig. 9B) when DC was fed with the presence of a rich layer of white lead following a secondary crystallization for both AC and DC. This layer was wider and more expanded for DC; which may be attributed to a higher material consumption in the case of DC. The structure of the electrode surface was found to be solid crystal constituted of several big heterogeneous particles surrounded by a layer of white lead resulting in a uniform dissociation of Pb electrode (Fig. 9C). Finally, the electrode surface was found rougher with more disordered particles which can be assimilated to dents when DC was fed (Fig. 9D). After FTIR analysis, UV characterization and SEM observations, it was well confirmed that dye elimination leads to an adsorption and not an electrocoagulation process.

Fig. 8
figure 8

SEM image of the pure Pb anode

Fig. 9
figure 9

SEM image of the Pb anode used in the presence of MB before and after electrolysis with (AC) (A) and (DC) (B), and in the presence of IC after electrolysis with (AC) (C) and (DC) (D)

Thermodynamic study of the electro-adsoprtion of methylene blue and indigo carmine

The values of ΔS° and ΔH° can be calculated from the equation Van’t Hoff:

$$ {\text{Ln}} k_{\text{c}} = \Delta S^\circ /R - \Delta H^\circ /RT, $$
(7)
$$ \Delta G^\circ = - RT\ln k_{\text{c}} , $$
(8)
$$ K_{\text{C}} = C_{\text{ads eq}} /C_{\text{rest equi}} , $$
(9)

where \( \Delta G^\circ \) is the free energy (KJ/mol), K C the equilibrium constant, R is the gas constant (8.314 J mol−1 K−1, T is the temperature (K), C ads eq is the concentration of adsorbed dye at equilibrium (mg/L), C rest is the concentration of remaining dye in solution at equilibrium (mg/L). ΔS° and ΔH° were determined from the slope and intercept of the Van’t Hoff linear plots of Ln k c versus 1/T. The thermodynamic aspect was investigated at 298, 308 and 318 K. The thermodynamic parameters like Gibbs free energy ΔG° (KJ mol−1), enthalpy ΔH° (kJ mol−1), and entropy ΔS° (J mol−1 K−1), were presented in Tables 4 and 5. The value of Gibbs free enthalpy was negative, which shows the spontaneous character of the reaction. The negative value of the enthalpy shows that the adsorption of the IC and MB is an exothermic phenomenon. This process would lead to decreasing randomness (Atmani et al. 2009; Ncibi et al. 2007). Therefore, the adsorption was possible and rapid for low temperature. These results are similar to those found by Subramanyan et al. (2011).

Table 4 Thermodynamic study for the elimination of IC (C i  = 10 mg/L) AC (1) and DC (2)
Table 5 Thermodynamic study for the elimination of MB with (AC (1) and DC (2)) (C i  = 10 mg/L)

Adsorption kinetic

To estimate the adsorption mechanism, the equilibrium adsorption capacity and the constant rate, two kinetic models, namely first order and second order modes were used. The adsorption kinetics was obtained using a graphical presentation of the adsorbed amount Q a (mg of dye/g) as a function of time t (min):

$$ Q_{\text{a}} = \frac{{\left( {C_{0} - C_{i} } \right) \times V}}{M}. $$
(10)

The adsorption of dyes was analyzed using first order Lagergren model (Lagergren 1898; Ho 2004)

$$ {\text{d}}Q/{\text{d}}t = k_{1} (Q_{\text{e}} - Q_{\text{t}} ), $$
(11)

where t is the time (min) and k 1 is the equilibrium rate constant of the pseudo-first-order model (min−1). Where: Q e is the amounts of the dye adsorbed at equilibrium in mg/g. The linearized form of this model is determined by the following equation

$$ log({Q_{\text{e}} - Q})\,=\,log({Q_{\text{e}}})-{\frac{{k_{1}}.{t}}{2303}}.$$
(12)

The second model used to fit the experimental data of the dye adsorption is the pseudo-second-order, which is applicable to a larger interval of time (Ncibi et al. 2006). It is described as follow:

$$ \frac{{{\text{d}}Q}}{{{\text{d}}t}} = k_{2} \left( {Q_{\text{e}} - Q} \right)^{2} . $$
(13)

After integration and by applying the condition t = 0 to t = t and Q = 0 Q= Q e, the integrated form of the non-linear shape becomes:

$${\frac{t}{Q}}\,=\,{\frac{1}{{k_{2}}.{Q_{\text{e}}}}}\,+\,{\frac{t}{Q_{\text{e}}}},$$
(14)

where k 2 is the equilibrium rate constant of the pseudo-second-order model adsorption (g/mg min). The kinetics of MB and IC adsorption were studied by both models. The modeling results expressed by the rate constants, the calculated equilibrium adsorption capacities, and the linear regression coefficients obtained at all concentrations are presented in Table 6. The best fitting for MB with AC and DC was obtained for the pseudo-second-order model with best regression coefficients (R 2) and minimum value of non-linear chi-square test (chi2). In addition, the calculated Q e with the pseudo-second-order (Q e2) gave acceptable values when compared to the experimental ones. On the other hand, the initial adsorption rate (h 1 and h 2) and the rate constant (k 1 and k 2) increased with AC. This result shows that the rate of dye removal using AC is much faster than DC. Contrariwise, the best fitting for IC with AC and DC was obtained for the pseudo-first-order. Particularly in the case of MB, the initial adsorption rate (h 2 = k 2·Q 2e ) reached 296.5 (mg g−1 min−1) using AC. This value was much higher than for the case of DC where h 2 reached only 1.75 (mg g−1 min−1)

Table 6 Constant parameters calculated for different adsorption isotherms of MB and IC

Adsorption isotherms

To determine the most appropriate correlation for the equilibrium curves, the pH was kept at 7 and the concentration of dyes at 20 mg/L. Three equilibrium models were developed to describe equilibrium relationships: Langmuir, Freundlich and Sips. The linear form of the Langmuir equation can be written as Eq. (15) (Langmuir 1916):

$${Q_{\text{e}}}\,=\,{Q_{\text{m}}}\times\left[\kern-0.15em\left[{\frac{{k_{1}}.{C_{\text{e}}}}{{1+{k_{1}}.{C_{e}}}}} \right]\kern-0.15em\right]$$
(15)

where, Q m is the maximum adsorption capacity (mg/g) and k L is the Langmuir equilibrium constant (L/mg). The linearized of Langmuir adsorption is expressed by (Eq. 16)

$$ \frac{C_\text{e}}{Q_\text{e}} = \frac{1}{Q_\text{m}}\cdot {K_\text{L}} + \frac{C_\text{e}}{Q_\text{m}},$$
(16)

Freundlich isotherm can be expressed by (Eq. 17)

$$ q_{\text{e}} = k_{\text{f}} \times C_{\text{e}}^{{\frac{1}{n}}} , $$
(17)

(Freundlich 1906) can be linearized in other form and the Freundlich constants can be determined as follows (Eq. 18):

$$ \ln Q_{\text{e}} = \ln k_{\text{f}} + \left( {\frac{1}{n}} \right)\ln C_{\text{e}} , $$
(18)

where, k f [(mg/g) × (L/mg)1/n] is the Freundlich constant indicating the adsorption capacity and n (dimensionless) is the Freundlich constant indicating the adsorption intensity. The Sips model is a combination between Langmuir and Freundlich model isotherms (Foo and Hameed 2010), it has the form (Eq. 19):

$$ Q_{\text{e}} = \frac{{Q_{\text{m}} \left( {k_{\text{S}} C_{\text{e}} } \right)^{{m_{\text{S}} }} }}{{1 + \left( {k_{\text{S}} C_{\text{e}} } \right)^{{m_{\text{S}} }} }}, $$
(19)

where, Q e is the monolayer adsorption (mg g−1) and k s is the Sips constant related to the energy of adsorption. The isotherms fit and their parameters were, respectively, calculated using non-linear regression analysis. According to Table 7; the experimental data were better described by Freundlich and Sips models for both processes and for MB and IC. The Langmuir isotherm was less suitable to explain the adsorption of MB and IC, as compared to the Freundlich and Sips isotherms. The Freundlich isotherm could be used for heterogeneous process. According to these results, we deduce the occurrence of multilayer coverage of MB and IC. The n values ranging between 1 and 10 constituted a measure of adsorption intensity or surface heterogeneity, becoming more heterogeneous as its value was around to 10 (Kesraoui et al 2015). Therefore, the Freundlich exponent value was equal to 1 for MB and IC; both were in the 1–10 range indicating favorable adsorption (Ncibi et al. 2006). Sips isotherm is a combination between Langmuir and Freundlich forms isotherm models (Foo and Hameed 2010). At low dye concentrations, the Sips equation was reduced to the Freundlich equation (Vargas et al. 2011).

Table 7 Constants of Langmuir, Freundlich and Sips models

Conclusion

The efficiency of the electrocoagulation process for the removal of MB and the IC from solution in comparison with the coagulation–flocculation was successfully proved. The results showed that maximum removal rate of dyes were obtained for neutral pH, higher current density and higher voltage. The use of AC allows a maximum removal rate of dyes for both IC and MB with minimum energy consumed compared to direct current. UV–visible, SEM and FTIR analysis before and after treatment with AC and DC for both IC and MB dyes showed that the elimination of those dyes can lead to an adsorption. The thermodynamic study showed that the adsorption of IC and MB is an exothermic process and spontaneous while the kinetic study showed that the process follows a pseudo-second-order model for the MB and pseudo-first-order for the IC, initially much faster in the case of AC. The adsorption isotherm studies showed that the Freundlich and Sips models present a good fit to the experimental data.