Introduction

In recent years, the improvement of technology and analytical methods has led to detecting a new group of pollutants in the water, wastewater, soil, and air, called emerging pollutants (EPs). EPs have caused great concern in human societies due to the adverse effects on human health and destructive environmental effects (Khan et al. 2020). EPs include human and veterinary pharmaceutical, cosmetic products, plasticizers, surfactants, and herbicides whose toxicological effects are relatively unidentified. In the water and soil ecosystems, traces of pharmaceuticals compounds and their metabolites have been detected even in low concentrations (Stavbar et al. 2017). H1 antihistamines are a group of widely used drugs prescribed for treating and preventing allergy-based diseases. Hydroxyzine (HDZ) is one of the first suggested antihistamines for controlling, managing, and preventing skin irritation, urticaria, atopic dermatitis, and dermatosis. Moreover, HDZ is one of the most effective antihistamines in treating chronic itching, eczema, and skin allergies (Luján et al. 2020; Thomas et al. 2019).

Even in a low concentration, the damaging effects of pharmaceuticals in the environment were their toxic effects and endocrine disruption in humans. Moreover, bioaccumulation in the food chain, disruption in the photosynthetic function of aquatic plants, and disruption in the natural balance of ecosystems cause great concern to communities' public health. (Zhao et al. 2017, Iqbal 2016). Therefore, it is essential to remove these environmental pollutants using efficient treatment technologies. Several techniques were developed and applied to minimize their contents in waters and wastewater, such as Fenton, electrochemical degradation (Xia and Dai 2018, Abbas et al. 2018), ozonation (Kharel et al. 2020; El-Taliawy et al. 2018), membrane processes (Mamo et al. 2018; Rosman et al. 2018), and adsorption by application of activated carbons (Köpping et al. 2020; Jaria et al. 2020).

The electrocoagulation (EC) process is one of the most efficient water and wastewater purification methods due to its high efficiency, safe, green, and environment-friendly technique. This method released metal ions from the anode electrode, and H2O was hydrolyzed at the cathode electrode to generate H2 gas. Finally, the metal ions form flocculates that trap the pollutants while the H2 gas floats these particles (Tahreen et al. 2020, Vepsäläinen and Sillanpää 2020). So far, various pollutants from different wastewaters have been successfully treated using the electrocoagulation process, such as dye (Bilińska et al. 2020), heavy metal (Kim et al. 2020), pharmaceutical compounds (Lu et al. 2021), pesticide (Pinedo-Hernández et al. 2020), and other pollutants (Isik et al. 2020; Syam Babu et al. 2020).

Response surface methodology (RSM), based on the sub-category of central composite design (CCD), is a set of mathematical and statistical operations that can logically reduce the number of experiments. The developed model can simultaneously measure the main effects of variables and their interactions and quadratic effects (Yang et al. 2020). To the best of our knowledge, this is the first time chitosan has been employed as an efficient adsorbent besides the electrocoagulation process as a hybrid treatment technique for removing hydroxyzine using the CCD in response surface methodology (RSM). Considering the high removal efficiency, the developed treatment process could be a promising, simple, cost-effective procedure for removing HDZ from polluted aqueous solutions. The possible mechanism of the treatment process is explained to understand the exact procedure that occurred throughout the process. Eventually, the aims of the study are as follows: (1) to investigate the effects of various operating parameters such as initial HDZ concentration, solution pH, current density, reaction time, and chitosan dosage, (2) optimization of the HDZ removal efficiency and investigation of the main, interaction, and cubic effects of critical operating parameters, including initial HDZ concentration, chitosan dosage, contact time, current density, and solution pH, (3) study and comparison of electrocoagulation, adsorption, and hybrid treatment processes.

Materials and methods

Chemicals

Hydroxyzine hydrochloride (C21H27ClN2O2.2HCl, ˃98.5%) was obtained from Pursina pharmaceutical Co, Tehran, Iran. Other chemicals such as chitosan (2-Amino-2-deoxy-(1 → 4)-β-D-glucopyranan, high purity), hydrochloric acid fuming (HCl, 37.0%), sodium sulfate (Na2SO4, ≥ 99.0%), sodium hydroxide (NaOH, ≥ 98.0%), and sodium chloride (NaCl, ≥ 99.9%) were obtained from Merck Company.

Experiment setup and analytical methods

The HDZ removal process was done on a lab scale and at ambient temperature. The experimental set-up for electrocoagulation (EC) of the wastewater consisted of two electrodes, a glass reactor (with 9 cm height and 7 cm internal diameter), and a DC power supply. The iron electrodes with dimensions of 4.0 cm high, 2.0 cm wide, and 1.0 mm thick were prepared and used after polishing with sandpaper and washing with 20% hydrochloric acid. Before each experiment, 250 mL of the synthetic wastewater was transferred into the reactor. Two iron electrodes were placed in the electrochemical reactor in parallel and with a distance of 3 cm. 50 mM of sodium chloride (NaCl) as the supporting electrolyte was added to the reactor. Using the magnetic stirrer, the working solution was in the reactor at 150 rpm. The effects of all variables, including HDZ concentration, solution pH, current density, and reaction time, were studied at different conditions as listed in Table 1. At the end of the EC process, the samples were filtered using a 0.2 µm filter and investigated for remaining concentrations of HDZ using a spectrophotometer UV/Vis at 235 nm. The HDZ removal efficiency is defined as follows in Eq. 1 (uz Zaman et al. 2021):

$$ {\text{\% Removal HDZ }} = { }\frac{{{\text{C}}_{i} - {\text{C}}_{{\text{t}}} }}{{{\text{C}}_{0} }} \times 100 $$
(1)
Table 1 Experimental level of the independent variables in the treatment process

where Ci and Ct (mg L–1) denote the concentration of HDZ before and after the treatment process at time t, respectively.

Electrical energy consumption (EEC) in the EC process was calculated as follows in Eq. 2 (Minas et al. 2017; Sharif et al. 2021):

$$ {\text{EEC}} = \left( {\frac{{{\text{UIt}}}}{{\text{V}}}} \right) $$
(2)

where U, I, t, and V are applied voltage (U), applied electrical current (A), reaction time (h), and volume of sample (L), respectively.

Process variables and experimental design

Four variables, including initial HDZ concentration, solution pH, current density, and reaction time, were employed for making the central composite design (CCD). The relation between the mentioned variables was estimated as follows (Almomani and Bohsale 2020, Alibabaei et al. 2021):

$$ Y = \beta_{0} + \mathop \sum \limits_{i = 1}^{n} \beta_{i} X_{i} + \mathop \sum \limits_{i = 1}^{n} \beta_{ii} X_{i}^{2} + \mathop \sum \limits_{i = 1}^{n - 1} \mathop \sum \limits_{j = i + 1}^{n} \beta_{ij} X_{i} X_{j} + \varepsilon $$
(3)

where Y is the response; Xi and Xj are the variables; β0 is the constant coefficient; βi, βii, and βij are the interaction coefficients of linear, quadratic, and interaction effects, respectively; n is the number of studied factors, and ɛ is the error. The range and the levels of the variables investigated in this study are given in Table 1.

Results and discussion

RSM approach and statistical analysis

Response surface methodology (RSM) was used to evaluate the main effects of parameters, their simultaneous interactions, and quadratic effect to achieve the optimum condition for the treatment process. Experimental data, including the responses, are shown in Table 2.

Table 2 The designed experiments and values of HDZ removal efficiency as the response

The quadratic model Adjusted R2 (Adj.R2) and predicted R2 (Pred.R2) are 0.9791 and 0.9743, respectively. Accordingly, it was shown that the predicted model could describe nearly 97.9% of the total variation. The results from the analysis of variance (ANOVA) for the model are given in Table 3. The model F-value of 152.7 and the p-value < 0.0001 also recommend that the model was significant.

Table 3 Analysis of variance (ANOVA) of the proposed model for the developed treatment process

Experimental results were fitted to a polynomial model. The polynomial model in terms of coded factors only for the significant factors (p-value ≤ 0.05) is as below:

$$ {\text{Removal HDZ}}\left( {\text{\% }} \right) = 71.95 - 5.62{\text{X}}_{1} + 7.38{\text{X}}_{2} + 5.20{\text{X}}_{3} + 3.63{\text{X}}_{4} - 2.19{\text{X}}_{2}^{2} - 2.94{\text{X}}_{4}^{2} $$
(4)

where X1, X2, X3, and X4 are initial HDZ concentration, solution pH, current density, and reaction time, respectively. The intercept parameter (β0 = 71.95%) denotes the average percentage of HDZ removal when all factors are fixed at their center point. However, two variables revealed quadratic effects (\({\mathrm{X}}_{2}^{2},\) and \({\mathrm{X}}_{4}^{2}\)) significantly influencing the response. These effects are further described in the next section. To determine the exact contribution of each operating parameter to the response, the graphical Pareto analysis was demonstrated according to Eq. 5:

$$ {\text{P}}_{{\text{i}}} = \frac{{{\text{b}}_{{\text{i}}}^{2} }}{{\sum {\text{b}}_{{\text{i}}}^{2} }} \times 100{ }\left( {{\text{i}} \ne 0} \right) $$
(5)

where bi represents the estimation of the main effect of the variables. The main effects of X1, X2, X3, and X4 denote the initial HDZ concentration, solution pH, current density, and reaction time, respectively. As seen in Fig. 1, the contribution of the main variables to the HDZ removal was 22.61%, 38.99%, 19.36%, and 9.43, respectively. Furthermore, the contributions of the X2 and X4 with the quadratic effects of \({\text{X}}_{2}^{2} ,{ }\) and \({\text{ X}}_{4}^{2}\) to the HDZ removal efficiency were 3.43% and 6.19%, respectively. Thus, it could be inferred that the pH solution, initial HDZ concentration, current density, reaction time, the quadratic effect of reaction time, and pH solution were the most contributing factor to HDZ removal, respectively.

Fig. 1
figure 1

Pareto analysis for developed HDZ removal model

Data were analyzed to check the normality of the residuals, as shown in Fig. 2. It can be seen from Fig. 2-a that data on this plot were reasonably close to a straight line (R2 = 0.9855). The correlation between the actual and predicted values of response (% Y) for the removal of HDZ is shown in Fig. 2-b. Therefore, the obtained results propose that the model accurately predicted the removal efficiency of the treatment process throughout the experimental runs because residual results were distributed near the diagonal.

Fig. 2
figure 2

Residual diagnostics of developed HDZ removal model: a normal probability plot vs. externally studentized residuals, b predicted vs. actual plot

Figure 3 shows that the removal efficiency of HDZ decreases by 22.5% (83.2% to 60.7%) by increasing the initial HDZ concentration from 5 to 50 mg L−1 at the center point of the variables, including 12.5 mA cm−2 current density, solution pH of 7, and 16.5 min reaction time. According to the Pareto analysis (Fig. 1), the initial concentration of HDZ was identified as the second parameter affecting the removal efficiency of HDZ. This phenomenon is because of the number of coagulation agents (metal hydroxides) formed during the EC process that has a remarkable capacity to trap, sediment, and remove HDZ molecules. At higher concentrations of HDZ, because the formed metal hydroxides are constant, the removal efficiency of hydroxyzine was decreased.

Fig. 3
figure 3

Contour plot of the reaction time and initial HDZ concentration on the HDZ removal efficiency

Solution pH with a contribution of 38.9% showed the most significant effect on the removal efficiency of HDZ during the treatment process. As seen in Fig. 4, the removal efficiency of HDZ increased from 48.4% to 78.1 by increasing the solution pH from 4 to 10. At the center point of the operational parameters, including 27.5 mg L−1 initial HDZ concentration, 12.5 mA cm−2 current density, and 16.5 min reaction time, the maximum removal efficiency was obtained at pH 9.5 (85.1%). HDZ has two main pKa at 2.47 and 6.95. Due to the amine group's protonation, the HDZ molecules exist in a cationic form at a pH lower than 2.47. On the other hand, at the low pH condition, iron hydroxides, which are the hydrolysis products of Fe3+, are soluble; therefore, they cannot absorb the HDZ molecules. At pH between 2.47 and 6.95, HDZ exists as the zwitterion due to the loss of the proton from the phenolic moiety. Therefore, the removal efficiency is also increased in this range. The maximum removal occurred at a pH range of 7.0–10.0. At the pH range of 6.7–10.0, HDZ prevails as the anionic form due to the loss of the proton from the carbonyl system and phenolic moiety. However, Fe(OH)3 and [Fe(OH)2]+ are the main species of Fe3+ hydrolysis reactions (see reactions 6, 7, 8, 9, 10, 11, 12, 13). Therefore, the efficiency of removal in this range increases (Sandoval et al. 2021, Khandegar and Saroha 2013, Pulkka et al. 2014).

$$ {\text{Fe}}_{{\left( {\text{s}} \right)}} \to {\text{ Fe}}_{{\left( {{\text{aq}}} \right)}}^{2 + } + 2{\text{e}}_{{\left( {{\text{aq}}} \right)}}^{ - } \quad \left( {{\text{Anode}}} \right) $$
(6)
$${\text{2H}}_{2} {\text{O}}_{{\left( {\text{l}} \right)}} {\text{ + 2e}}_{{\left( {{\text{aq}}} \right)}}^{ - } {\text{ H}}_{{2\left( {\text{g}} \right)}} {\text{ + 2OH}}_{{\left( {{\text{aq}}} \right)}}^{ - } \quad \left( {{\text{Cathode}}} \right) $$
(7)
$$ {\text{Fe}}_{{\left( {{\text{aq}}} \right)}}^{2 + } + 2{\text{OH}}_{{\left( {{\text{aq}}} \right)}}^{ - } \to {\text{Fe}}\left( {{\text{OH}}} \right)_{{2_{\left( s \right)} }} \quad \left( {\text{Alkaline conditions}} \right) $$
(8)
$$ {\text{Fe}}_{\left( s \right)} + {\text{2H}}_{{2}} {\text{O}}_{\left( l \right)} \to {\text{ Fe}}\left( {{\text{OH}}} \right)_{{2_{\left( s \right)} }} + {\text{H}}_{{2_{\left( g \right)} }} \quad \left( {\text{Overall reaction}} \right) $$
(9)
Fig. 4
figure 4

Contour plot of the solution pH and initial HDZ concentration on the HDZ removal efficiency

Additional mechanism suggested for the production of iron species occurs as follows:

$$ 4{\text{Fe}}_{{\left( {\text{s}} \right)}} \to { }4{\text{Fe}}_{{\left( {{\text{aq}}} \right)}}^{2 + } + 8{\text{e}}_{{\left( {{\text{aq}}} \right)}}^{ - } \quad \left( {{\text{Anode}}} \right) $$
(10)
$$ 8{\text{H}}_{{\left( {{\text{aq}}} \right)}}^{ + } + 8{\text{e}}_{{\left( {{\text{aq}}} \right)}}^{ - } \to 4{\text{H}}_{{{2}\left( {\text{g}} \right)}} \quad \left( {{\text{Cathode}}} \right) $$
(11)
$$ 4{\text{Fe}}_{{\left( {{\text{aq}}} \right)}}^{{2 + }} + 10{\text{H}}_{{2}} {\text{O}}_{{\left( {\text{l}} \right)}} + O_{2\left( g \right)} \to 4{\text{Fe}}\left( {{\text{OH}}} \right)_{3\left( s \right)} + 8{\text{H}}_{{\left( {{\text{aq}}} \right)}}^{ + } \quad \left( {\text{Acidic conditions}} \right) $$
(12)
$$ 4{\text{Fe}}_{{\left( {aq} \right)}}^{2 + } + 10{\text{H}}_{{2}} {\text{O}}_{\left( l \right)} + O_{2\left( g \right)} \to 4Fe\left( {{\text{OH}}} \right)_{3\left( s \right)} + 4{\text{H}}_{2\left( g \right)} \quad \left( {Overall \, reaction} \right) $$
(13)

Current density and reaction time are two basic parameters that affect the reaction rate and generation of coagulation agents during the treatment process. The variation in the value of HDZ removal efficiencies with changing the applied reaction time (3–30 min) at different current densities (5–20 mA cm−2) is shown in Fig. 5. As shown in Fig. 5, the removal efficiency of HDZ was increased by increasing the current density. The obtained results revealed that 61.5% of the HDZ could be removed at the low current density of 5 mA cm−2, where increasing the current density up to 20 mA cm−2 increased the removal efficiency of HDZ to the value of 82.3% at the center point of the operational parameters, including the solution pH of 7, 27.5 mg L−1 initial HDZ concentration and 16.5 min reaction time. Increasing current density increased the generation rate of coagulant agents on the anode during the EC process.

Fig. 5
figure 5

The 3D plot of the reaction time and current density effects on the HDZ removal efficiency

Due to the increased generation of coagulation agents rate, the removal efficiency of HDZ is improved. In other words, the higher current density will generate a higher number of flocs (coagulant agents), which will trap and sediment the HDZ molecules and enhance the HDZ removal efficiency. In the investigation of the treatment of oil tanning effluent by electrocoagulation by Lakshmi et al., with increasing current density, COD removal efficiency increased due to the generation of more coagulant agents (Lakshmi and Sivashanmugam 2013). After 25 min of the treatment process, the remaining concentration of HDZ in the treatment reactor was deficient. The adsorption rate of HDZ on the flocs decreased, even though the rate of flocs generation remains constant due to the constant applied current density. However, at very low current densities, no considerable removal efficiency was observed because the amount of produced flocs was insufficient to remove all the HDZ molecules in the solution. It required more time to achieve higher HDZ removal efficiency. As seen in Fig. 5, the removal efficiency of HDZ increases from 52.9% to 67.4% by increasing the applied reaction time from 3 to 30 min. Maximum removal efficiency occurred in 25 min, at the center point of the operational parameters, including 12.5 mA cm−2 current density, solution pH of 7.0, and 27.5 mg L−1 initial HDZ concentration. However, further increasing the time to 25 provided a slight reduction of the HDZ, which would not be applied because of the high energy, and electrode consumption. Mansoorian et al. reported the optimum time for lead and zinc removal in alternating current using iron, and stainless steel rod electrodes were 30 and 40 min (Mansoorian et al. 2014).

Optimization of treatment process

As expressed in Eq. 4, the developed model was employed to determine the optional conditions for the HDZ removal. The desired inputs were selected to achieve maximum HDZ removal (˃80%) during the treatment process. Table 4 provides information on the five approaches suggested for attaining the mentioned goal. As can be seen, five solutions could result in removal efficiencies greater than 80% under the proposed conditions. Approach (V) was selected as the optimal condition due to its proximity to a neutral pH of the treated solution and low current density and reaction time.

Table 4 Suggested approaches to achieve maximum HDZ removal

Effect of chitosan dosage as a coagulant aid

Coagulant aids are often necessary to further enhance the coagulation performance in the water. Therefore, a new solution to contaminant removal could be using chitosan as a novel, cheap, and safe coagulant aid. Figure 6-a shows the electrocoagulation process under the optimum condition, including an initial HDZ concentration of 25 mg L−1, pH solution of 8.0, the current density of 12 mA cm−2, and reaction time of 15 min using different concentrations of chitosan as a coagulant aid. The results showed that the removal efficiencies increased from 86.5% to 99.7% by increasing the chitosan dosage from 0.01 to 0.05 g L−1. On the other hand, increasing the chitosan dosage from 0.01, 0.02, 0.03 to 0.05 g L−1 increased the electrical energy consumption (EEC) during the electrocoagulation process from 0.374, 0.412, 0.438 to 0.553 kWh m−3, respectively. The contribution of the electrocoagulation process, the adsorption process, and the hybrid process under the optimum condition is demonstrated in Fig. 6-b. Asaitambi et al. treated the distillery effluent using ozone-assisted electrocoagulation; their results showed that in optimal conditions, the EEC was 5.1 kWh m−3 (Asaithambi et al. 2012). Also, de Carvalho et al. removed methylene blue dye using electrocoagulation/banana peel adsorption process; their results indicated that under optimal conditions, the energy consumption was 1.65 Wh g−1 (de Carvalho et al. 2015). In addition, Zaidi et al. removed the doxycycline using electro-coagulation coupled electro-flotation process; their results showed that in optimal conditions (pH of 7.03, and current intensity of 5.4 mA cm−2, and reaction time of 80 min), the EEC when using NaNO3, KCl and NaCl as supporting electrolyte were 3.675, 1.455, and 1.505 kWh m−3, respectively (Zaidi et al. 2019).

Fig. 6
figure 6

a Removal efficiency and EEC during the treatment process under different chitosan dosages. b contribution of electrocoagulation, adsorption, and hybrid process for the HDZ removal efficiency

According to the obtained results, at the chitosan dosage of 0.03 g L−1, the removal efficiency and EEC of 99.3% and 0.438 kWh m−3 were achieved, which is introduced as the optimal condition.

Conclusion

In this study, the HDZ removal efficiency from the polluted water was investigated by the hybrid process of electrocoagulation and adsorption using iron electrodes and chitosan. Analysis of variance (ANOVA) showed a high determination coefficient, and an adequate prediction second-order regression model was achieved. A satisfactory agreement between the experimental and predicted HDZ removal efficiency was obtained, which confirmed the accuracy and validity of the HDZ removal model. The maximum HDZ removal and electrical energy consumption were obtained in the optimum condition at 99.3% and 0.438 kWh m−3, respectively. The obtained results showed that the applied hybrid treatment process could be considered a practical alternative approach for the treatment of HDZ to achieve a higher quality aqueous solution.