1 Introduction

The exponential growth of the global population has led to a significant increase in industrialization, particularly in the textile industry [1]. Reports indicate that over 60 billion kilograms of textile products are produced annually worldwide, with each kilogram requiring approximately 200 L of water [2]. Among various dyes used in industries such as textiles, paint, cosmetics, and pharmaceuticals, indigo carmine (IC) is a well-known anionic dye [3, 4].

With socio-economic development, the generation of massive waste has become a pressing issue, posing challenges for environmental pollution management, as only a fraction of this waste is naturally biodegradable. Consequently, biomass collection and utilization have become crucial concerns. As a result, extensive research has focused on adsorption using different biomass adsorbents for separation and purification purposes. Various experiments utilizing raw eucalyptus bark have been conducted to determine the optimal IC adsorption capacity [5]. Furthermore, investigations on the continuous adsorption-desorption of IC using an invasive macrophyte, Salvinia minima, have demonstrated high MB removal rates of 75–78% [6]. Wen et al. [7] achieved an impressive IC adsorption capacity of 370 mg/g using a cationic adsorbent prepared from corn stalk biomass. Conversely, the dried biomass of Rhizopus oryzae exhibited lower adsorption capacity, achieving only 50 mg/g of IC removal [8]. In another study, Sen et al. utilized pinecone biomass from Pinus radiata and achieved approximately 109.89 mg/g of IC removal at 30 °C [9]. Similarly, Li et al. successfully adsorbed 110.13 mg/g of IC using bulk kitchen waste [10].

In this work, a comprehensive study to compare the performance of two different materials for treating textile dye-containing wastewaters, polluted with IC, was conducted. To that end, raw biomass from pomegranate peels and its derived biochar were tested as adsorbents. A new optimization model using the central composite design (CCD) to evaluate the technical aspects of both materials was used. Additionally, the kinetics, isotherms, and thermodynamic behaviors of these adsorbents were also studied to gain a deeper understanding of the adsorption process and the possible mechanism.

2 Experimental

2.1 Materials and apparatus

In this study, we utilized various analytical instruments and techniques to investigate the properties of the samples. The ultra-violet (UV) spectrophotometer mentioned in this paper has been previously referenced in works by Sassi et al. [11, 12]. For elemental analysis, a high-resolution compact scanning electron microscope (SEM) of the third generation, manufactured by HITACHI and model FlexSEM1000 II, was employed [11, 12]. To ensure empirical comparison, both the raw perlite and the samples were subjected to the same conditions. They were mixed with water under optimal parameters such as acidity (pH), contact time (t min), dye content (C mg/L), and temperature (T K). Subsequently, the mixture was filtered, washed, and dried.

2.2 Preparation of biomass and its derived biochar

The sample collection of the pomegranate fruit variety “Punica granatum” was conducted in Tunisia, in the Gabes region (in Kattena) during the month of October 2022. Raw pomegranate peels (RPP) were collected and then cleaned multiple times with running water to remove dust and small microorganisms. Afterwards, the material was cut into small pieces and immersed in water for 24 h until the peels color disappeared. The well-washed RPP were dried in an oven at 50 °C for 24 h. After 24 h of drying, the RPP were further cut into smaller pieces and then ground. Subsequently, they were passed through a sieve with a particle size of 212 μm. The choice of this small particle size of 212 microns is to achieve the best possible adsorption. According to Lima et al. [13], this property plays a crucial role in elucidating the material’s performance in adsorbing dye molecules because surface textural characteristics are significant factors in the adsorption process. The ground and sieve pomegranate peels were washed with distilled water until the water became clear in order to remove impurities and dust. Subsequently, this material underwent drying in an oven at a temperature of 100 °C for 24 h. After drying, the adsorbent was ground into a fine powder using a grinder, and then the nanoparticles underwent calcination in a furnace at 1000 °C. The carbonization process is considered complete after 2 h. The obtained paste was gradually cooled and then frozen at −4 °C, followed by lyophilization. Finally, the biochar is ready as a dry powder.

Figure 1 illustrates the steps involved in preparing our materials.

Fig. 1
figure 1

Materials origin and preparation

2.3 Methods and reagents

The optimization process was carried out using the STATISTICA software program (Version 12.4 November 2018, USA). The model used was the CCD with five levels (−δ, −1, 0, +1, +δ) with binary response tools and three factors (contact time, dye concentration, and temperature) [12, 14].

All chemicals and dyes were procured from Sigma-Aldrich. The hazardous dye investigated in this study is the IC. The formula and UV spectra of this dye are deeply presented in the supplementary data.

2.4 Adsorption experiments

Batch experiments were carried out to assess the adsorption performance. The study investigated the impacts of different initial concentrations of IC.

The remaining IC concentrations in the solution were measured using UV-visible spectrometry (UV-1800, Metrometer, France). The removal efficiency (RE) was calculated using the following formula:

$$RE=100\times \frac{\left({C}_0-{C}_e\ \right)}{C_0}$$
(Eq. 1)

Here, C0 and Ce represent the initial and equilibrium IC concentrations (mg/L) in the solution at t0 and te, respectively.

3 Results and discussion

3.1 The pHzc parameter

The pH at the point of zero charge (pHpzc) refers to the pH value where the surface charge of a material is neutral. In the case of our materials, Fig. 2 illustrates how the pH at the end of a process (pHfinal) changes with the initial pH (pHinitial).

Fig. 2
figure 2

Surface pH variation as a function of solution pHinitial of RPP and BPP

The pHpzc values for RPP and BPP materials were determined to be 4.12 and 7.56, respectively. When the pH was below the pHpzc, the surface of the adsorbent carried a positive charge, promoting the adsorption of anionic dyes, as demonstrated by Sassi et al. [12]. Conversely, when the pH exceeded the pHpzc, the adsorbent surface became negatively charged, favoring the adsorption of cationic dyes. In this study, the contaminant being investigated was IC, which is an anionic dye. Consequently, the highest adsorption capacities of both materials RPP and BPP were observed in an acidic pH range, specifically at pH = 3.0. The effect of pH is primordial for CI removal success. In fact, the highest removal is always recorded for anionic dyes at pH range when the material is positive charged (i.e., pH = 3).

3.2 CCD optimization model

In this study, we utilized STATISTICA 12.8.0 software to analyze the adsorption of IC (insert compound) onto pomegranate peels. To optimize the process, we employed the CCD model and response surface methodology (RSM), aiming to determine the optimum conditions for several factors under investigation. By implementing RSM based on the CCD, we were able to minimize the number of experiments, as previously reported by Diao et al. [15]. Following the recommendations of Sassi et al. [16] and Pils and Laired [17], the impact of each studied factor, as well as their interactions, on the adsorption yield (Y%: adsorption yield) was evaluated using CCD. For the selected factors, namely contact time, IC concentration, and the media temperature, the experimental field is outlined in Table 1.

Table 1 Experimental field for the studied factors

δ is the code of rotatability and orthogonality for the adopted CCD calculated using Eq. 2 [18]:

$$\delta=\sqrt[4]{\textstyle\frac{n_f\;\times\;\left(\sqrt n-\;\sqrt{n_f}\right)^2}4}$$
(Eq. 2)

where nf is the number of runs proposed by the factorial plan (Eq. 3), and n is the total number of runs suggested by the CCD model, explained in Eq. 4 [16]:

$${n}_{f}={l}^{\textrm{3}}$$
(Eq. 3)
$$n=n_f\;+\;l\;\times\;3\;+c\;\times\;r$$
(Eq. 4)

where l is the level, c is the number of model centers, and r is its repetition number. In our case, n and the code δ are 16 runs and 1.69, respectively. The equivalency between the design codes and factor values was presented by Sassi et al. [16]; the error analysis is detailed in the supplementary data, and the adsorption yield was calculated using Eq. 5:

$$Y\ \left(\%\right)=\frac{C_{ads}}{C_0}\times 100$$
(Eq. 5)

To compare and optimize the IC adsorption yields onto the biomass (raw pomegranate peels) and its derived biochar, a binary compilation of the CCD model has been applied.

The optimum conditions generated by the software are presented in Fig. 3.

Fig. 3
figure 3

Optimum conditions of the IC adsorption onto pomegranate peels A biomass (RPP) and B biochar (BPP)

The CCD model generated optimum conditions for both materials, with a contact time (tc) of 77 and 39 min, an IC concentration of 36 and 93 mg/L, and media temperature of 328 K for biomass and biochar, respectively. These optimal conditions will be adopted for all the subsequent tests. The experimental design successfully demonstrated the effectiveness of each factor within the experimental domain. At these optimum conditions, the adsorption yields were found to be 55% for the biomass and 99% for the biochar, indicating a higher removal percentage compared to other studies that used spontaneous adsorption on agricultural waste biomass or multi-wastes biochar compounds. Indeed, Lee et al. [19] achieved a value of 86% adsorption of fluor, while Cai et al. [20] only eliminated 88% of aniline vapor using the biomass adsorbent. The mathematical prediction model, represented by Eqs. 6, 7, provides a means of predicting yields for future experiments in this field:

$${Y}_{RPP}\left(\%\right)=(30.02)-\left(5.37\times {X}_1\right)+\left(3.61\times {X}_2\right)-\left(3.75\times {X}_3\right)+\left(2.01\times {X}_1{X}_2\right)-\left(1.28\times {X}_1{X}_3\right)+\left(2.55\times {X}_2{X}_3\right)+4.25$$
(Eq. 6)
$${Y}_{BPP}\left(\%\right)=(63.46)-\left(10.22\times {X}_1\right)+\left(1.06\times {X}_2\right)-\left(3.74\times {X}_3\right)+\left(1.25\times {X}_1{X}_2\right)-\left(1.96\times {X}_1{X}_3\right)+\left(2.45\times {X}_2{X}_3\right)+4.86$$
(Eq. 7)

However, there were limitations in the predictive modeling process. It was evident that the contact time significantly influenced the adsorption yields for both materials. The impact of contact time and temperature appeared to be inversely proportional to the response since the a1 is negative for both materials. Furthermore, the coefficient values for the dye’s concentration factor were positive, indicating a directly proportional effect. All interaction coefficient values were less than the residual (Δy = 4.25 and 4.86 for the RPP and BPP, respectively). This observation may neglect the effect of interaction between factors for both materials.

The effectiveness of the CCD model was demonstrated by its ability to accurately predict values for both materials, as shown in Fig. 4, which displayed a good fit between the experimental and predicted results.

Fig. 4
figure 4

Linearity test between predicted and observed responses values of the IC adsorption yields pomegranate peels A biomass and B biochar

The effectiveness of the adsorption process modelization for both materials can be observed in Fig. 4. It is evident that the CCD model is well-suited for representing the adsorption process for both the biomass and the biochar. This is supported by the regression coefficients R2, which were found to be 0.9819 and 0.9687 for the biomass and the biochar, respectively, indicating a strong correlation between the model and the experimental data.

Furthermore, Fig. 4 provides additional insights. It shows that the adsorption yield’s mean for the biomass falls within a relatively low range, spanning from 10 to 50%. On the other hand, the biochar exhibits a significantly higher adsorption yield’s mean, ranging from 55 to 99%. These findings clearly indicate that the adsorption capacity of the biochar surpasses that of its original biomass. In summary, the results presented in Fig. 4 provide strong evidence supporting the superiority of the biochar in terms of adsorption capacity when compared to its biomass precursor.

In the rest of this study, all experiments will be conducted under the optimal conditions determined by the CCD model generated using STATISTICA software.

3.3 Batch adsorption process

The biomass and derived biochar were used to apply a treatment to a colored wastewater with IC dye. At this stage, a new parameter is used to evaluate the IC removal, which is the adsorption capacity, calculated using Eq. 8:

$${Q}_{\left( mg/g\right)}=\frac{C_{ads}}{C_0}\times \frac{V}{m}$$
(Eq. 8)

where the concentrations of IC in the solution, represented by C0 (initial concentration) and Ce (equilibrium concentration) in milligrams per liter (mg/L), were determined in relation to the adsorbent mass (g) and the solution volume (L). At the optimum conditions, the respective amounts of IC adsorbed were 137.5 mg/g for the biomass and 247.5 mg/g for the biochar, corresponding at 55 and 99% of RE, respectively.

In order to study the adsorption mechanism, kinetic, isotherm, and thermodynamic studies were occurred.

3.3.1 Kinetic studies

Figure 5 shows the evolution of the adsorption capacity function of contact time.

Fig. 5
figure 5

Adsorption capacity evolution of IC dye onto pomegranate peels biomass (RPP) and biochar (BPP) function of contact time

As depicted in Fig. 5, the biomass exhibits a slow kinetic adsorption of IC dye. It is noteworthy that the maximum Qt was attained after approximately 60 min of contact time. Conversely, the biochar demonstrates a faster adsorption capacity, reaching its maximum within the initial 40 min. Another intriguing observation is that the theoretical Qt values were 138 mg/g and 248 mg/g for the RPP and BPP, respectively.

Purpose to understand the kinetic mechanism of RPP and BPP during the IC adsorption, some kinetic models were applied, and their equations are detailed in the supplementary data.

Figure 6 and Table 2 gather the pseudo-first order (PPO), the pseudo-second order (PSO), the intra-particular diffusion (IPD), and the Elovich models.

Fig. 6
figure 6

Kinetic linear modelization of the IC adsorption onto RPP and BPP A PFO, B PSO, C IPD, and D Elovich (pH = 3, T = 328 °K)

Table 2 PFO, PSO, IPD, and Elovich parameters and model correlation coefficients

The investigation of Fig. 6 and Table 2 shows that the regression coefficients (R2) of the PSO and Elovich kinetic models were close to unity for both materials. The first model suggests that the adsorption rate is influenced not only by the dye’s concentration in the liquid phase but also by the material’s adsorption capacity [21]. Furthermore, the Elovich kinetic model appears to fit well with the adsorption process of IC onto pomegranate peels biomass and biochar, with R2 values of 0.9177 and 0.9647, respectively. The model’s parameter β provides an estimated value for the desorption rate of IC dye from RPP and BPP. The low β values of 0.069 and 0.202 g/mg for RPP and BPP materials, respectively, confirm that the IC adsorption process is not spontaneously reversible. The adsorption process mechanism will be detailed in the next section with the isothermic study.

3.3.2 Isotherm studies

Figure 7 depicts the change in adsorption capacity over IC concentration.

Fig. 7
figure 7

IC adsorption capacity evolution onto pomegranate peels biomass (RPP) and biochar (BPP) function of equilibrium dye concentration

As shown in Fig. 7, the saturation of biochar is twice as large as that of pomegranate peels biomass. Specifically, the biochar (BPP) reached a saturation point (Qmax) of 228 mg/g starting from the IC dye concentration of 100 mg/L, whereas the pomegranate peels biomass (RPP) saturated earlier at the Qmax of 67 mg/g. This result confirms that the BPP possesses a higher adsorption capacity compared to the RPP.

Figure 8 and Table 3 gather the Langmuir, Freundlich, Temkin, and Dubinin-Radushkevich (D-R) isotherm models.

Fig. 8
figure 8

Isotherm linear modelization of the IC adsorption onto RPP and BPP A Langmuir, B Freundlich, C Temkin, and D Dubinin-Radushkevich (D-R) (pH = 3, T = 328 °K)

Table 3 Langmuir, Freundlich, Temkin, and Dubinin-Radushkevich parameters and model correlation coefficients

Various isotherms were tested to investigate the mechanism of IC adsorption onto pomegranate peels biomass and biochar. The four isotherms with higher regression coefficients (R2) were selected, namely Langmuir, Freundlich, Temkin, and D-R. All of these isotherms exhibited R2 values greater than 0.91.

Firstly, according to Lima et al. [22, 23], the Langmuir isotherm suggests monolayer adsorption with a unique type of interaction between the adsorbent and adsorbate (surface homogeneity) [24]. The isotherms interpretation has been enhanced according to the work of Dos Reis et al. [25, 26]. Additionally, the Freundlich isotherm proposes multilayer dye adsorption with a heterogeneous surface. Furthermore, the Temkin model indicates that the IC dye adsorption occurs within the pores of both materials. Finally, the D-R isotherm introduces a parameter that is proportional to the adsorption heat. Indeed, if this parameter, denoted as ΔE, is lower than 8 kJ/mol, the adsorption is considered physical. However, if ΔE exceeds 8 kJ/mol, it suggests a chemisorption process. In our case, the ΔE values were found to be 13.89 kJ/mol and 20.33 kJ/mol for pomegranate peels biomass and biochar, respectively. This result suggests a chemical IC dye adsorption process for both RPP and BPP materials, which will be further confirmed by a thermodynamic study.

3.3.3 Thermodynamic studies

The Van’t Hoff method was employed to estimate the thermodynamic parameters. In recent studies by Lima et al. [22, 23, 27], the expression for the thermodynamic equilibrium constant for adsorption (Ke°) was calculated. The authors deduced the following expression for the dimensionless thermodynamic equilibrium constant [28, 29]:

$$K{{}^{\circ}}_e=\frac{Q_e}{C_e}=\frac{K_e}{\gamma }=\frac{\left(1000.{K}_g.{M}_{IC}\ \left[ IC\right]{}^{\circ}\right)}{\gamma }$$
(Eq. 9)

where γ is the activity, M is the IC molecular weight (466 g/mol), and Ke is the best fitted isotherm.

$$\Delta G{}^{\circ}=-R\ T\ Ln\ {K}_e^{{}^{\circ}}$$
(Eq. 10)
$${K}_e{}^{\circ}=\mathit{\exp}\left(-\frac{\Delta G{}^{\circ}}{R\ T}\ \right)$$
(Eq. 11)
$$\Delta G{}^{\circ}=\kern0.5em \Delta H{}^{\circ}-T\Delta S{}^{\circ}$$
(Eq. 12)
$${K}_e{}^{\circ}=\mathit{\exp}\left(-\frac{\Delta H{}^{\circ}}{R}\times \frac{1}{T}+\frac{\Delta S{}^{\circ}}{R}\ \right)$$
(Eq. 13)
$$Ln\ {K}_e{}^{\circ}=\left(-\frac{\Delta H{}^{\circ}}{R}\ \right)\ \frac{1}{T}+\frac{\Delta S{}^{\circ}}{R}$$
(Eq. 14)

Figure 9 illustrates the changes in adsorption capacity with varying temperatures and is presented in the Van’t Hoff plot.

Fig. 9
figure 9

A Evolution of IC dye adsorption capacity as a function of temperature (pH = 3) and B the Van’t Hoff curve of RPP and BPP

The graph depicted in Fig. 9A indicates that as the temperature increases, the adsorption quantities also increase. This suggests a proportional relationship between reactor temperature and the amount of adsorbed material, confirming the endothermic nature of IC adsorption onto both biomass and biochar as previously suggested. The higher adsorption capacity at elevated temperatures may be attributed to the enlargement of pore size and/or activation of the nano-adsorbent surface [30]. It is noteworthy that the selectivity ratio favors IC adsorption, with recorded maximum capacities (Qmax) of 136 mg/g for RPP and 245 mg/g for BPP. These findings further confirm that the optimal condition for the process is the pH of 3.

Figure 9B presents Van’t Hoff curves with regression coefficients (R2) of 0.9891 for RPP and 0.9654 for BPP, respectively. The close proximity of these values to unity indicates that the Van’t Hoff method can effectively predict the thermodynamic parameters of the IC adsorption process. The thermodynamic parameters obtained using Eq. 12 and Eq. 14 are listed in Table 4.

Table 4 Thermodynamic parameters of the IC adsorption process onto pomegranate peels biomass and biochar

It is important to highlight that the negative values of ΔG° confirm the spontaneous nature of the IC dye adsorption processes. Additionally, the positive value of ΔH° for both material RPP and BPP (29.48 and 35.24 kJ/mol, respectively) indicates that the IC adsorption process is endothermic. Moreover, both enthalpy values are above 20 kJ/mol, suggesting that chemical adsorption takes place [31, 32]. Moreover, the positive values of ΔS° for both adsorbents indicate an increase in surface randomness and disorder [33, 34]. This further confirms the occurrence of chemisorption. These results align with the findings of the kinetic and isotherm studies.

3.4 Adsorption characterization and mechanism

3.4.1 SEM characterizations

The biomass and biochar morphologies before and after IC adsorption were investigated by SEM. The micrographs are presented in Fig. 10.

Fig. 10
figure 10

SEM micrographs before IC adsorption onto the dried particles of pomegranate peels biomass (A) and biochar (B) and after adsorption (C, D) at optimum conditions (pH = 3, T = 328 K)

Figure 10A and B depict the morphologies of pomegranate peels biomass (RPP) and biochar before and after adsorption of the IC dye. The RPP exhibits organic particles with a lignocellulosic form. Upon pyrolysis and the breakdown of cellulose, hemicellulose, and lignin compounds, the biochar displays a more pronounced appearance with surface pores. The adsorption of the IC dye brings about transformations on the surface of both RPP and BPP. The biomass particles agglomerate and become swollen, indicating the successful adsorption of IC. Furthermore, the biochar loses its surface pores and regularity, possibly suggesting a change in its structural composition.

3.4.2 FTIR characterizations

The biomass and biochar before and after adsorption have been analyzed using FTIR analysis. The spectra of all samples were added in Fig. 11. The carmine indigo

Fig. 11
figure 11

FTIR spectra before and after IC adsorption onto the dried particles of pomegranate peels A biomass and B biochar at optimum conditions (pH = 3, T = 328 K)

Firstly, the comparison between biomass and biochar spectra (Fig. 11A and B) shows that the pyrolysis breaks down the complex organic molecules present in biomass into simpler compounds. Indeed, this process can result in the release of volatile gases, such as methane, carbon dioxide, and various organic compounds, leaving behind the biochar solid residue. Moreover, the pyrolysis generally [35,36,37,38,39] reduces the content of heteroatoms like oxygen, nitrogen, and sulfur in the biomass. This results in a higher carbon content in the remaining material. The analysis of Fig. 11A and B (the CI spectrum) shows the characteristic bands. Firstly, the bands around 3300 cm−1 are associated with vibrations of hydroxyl groups (-OH). Moreover, bands around 1700 cm−1 are associated with vibrations of carbonyl (C=O) groups. All these bands are present in the RPP and BPP spectra confirming the adsorption of CI onto these materials.

These observations provide confirmation of the IC dye adsorption onto both the biomass and its biochar materials.

3.4.3 IC dye adsorption mechanisms

Based on the results obtained below, the mechanism of pomegranate peels biomass and biochar during IC dye adsorption can be estimated. The proposed mechanism is illustrated in Fig. 12.

Fig. 12
figure 12

Interaction mechanism between the IC dye molecules and the pomegranate peels biomass and biochar during the adsorption process at generated optimum conditions (pH = 3, T = 328 K)

To gain a better understanding of the interaction strength between the IC and either RPP or BPP, a proposed mechanism is suggested in Fig. 12.

It should be noted that a smaller ΔE corresponds to a shorter bond length and a stronger interaction force [40]. Furthermore, literature [41] revealed that the interaction force between N-H-N involved π-π interaction and Van der Waals forces displayed as a green color in Fig. 12. The interaction forces between other functional groups appeared red, indicating hydrogen bonding [40, 41]. These findings align with our hypothesis support the proposed adsorption models. In addition, the ΔEad values (adsorption energy), calculated in the isotherm models, further confirming that -COOH and -OH are the primary adsorption functional groups [42]. Additionally, this bonding provides the endothermic nature of IC-RPP and IC-BPP adsorption as observed in the experimental results.

3.5 Literature comparison of CI removal using a biomass and its biochar

In order to evaluate the impact of utilizing biochar in lieu of biomass, Table 5 provides a comparative overview of CI adsorption capacities across different materials as reported in the existing literature.

Table 5 Literature comparison of pollutant removal using a biomass and its derivative biochar

4 Conclusion

Raw biomass of pomegranate peels (RPP) and the resulting biochar (BPP) can be considered suitable adsorbents for the removal of dye-containing wastewaters. The pH of the zero-charge point (pHzc) of RPP and BPP were significantly different with values of 4.12 and 7.56, respectively. The optimal contact times required to achieve maximal adsorption efficiency were 77 min for RPP and 39 min for BPP. Furthermore, the optimal temperature was identified as 328 K for both materials, indicative of an endothermic nature of the adsorption process. Under these optimized conditions, the respective dye REs were measured at 55% for RPP and an 99% for BPP. FTIR and SEM analyses have proved the adsorption of the dye onto the surfaces of both RPP and BPP materials. Additionally, mechanism of adsorption, which involved π-π interaction and Van der Waals forces, has been proposed.