Introduction

Although water is one of the most essential natural resources for life, it isn’t always present. Over and above, the quality of the accessible water resources is progressively decadence as a result of the ever-growing industrial, agricultural and various human activities and the inefficiency of the currently applied water and wastewater treatment processes.

Synthetic dyes are organic compounds that are widely used in coloring textile, plastic, leather, cosmetics, plastics, food, paper, and medicine. They are light-, heat-, and oxidants-resistant, most of them are non-biodegradable and some of them are hazardous, carcinogenic, teratogenic and mutagenic. Thence, whensoever the wastewater engendered during the production and application of synthetic dyes enters, directly or indirectly, the water resources, it undermines human life and obliterates the ecosystems (Isik et al. 2023; Kadi et al. 2023; Semião et al. 2023). The catastrophic impacts of dye-polluted water on human health and environment dictated their effective removal from wastewater. Techniques like adsorption (El Malah et al. 2021), biodegradation (Bhatia et al. 2017), membrane filtration (Abdel-Karim et al. 2021), ion exchange (Joseph et al. 2020), photocatalytic degradation (Mansor et al. 2023), electrochemical degradation (Guenfoud et al. 2014), etc., have been tested to treat dye-polluted water. Out of the different treatment techniques, adsorption has been widely preferred owing to its desirable traits including efficiency, flexibility, simplicity, inertness toward toxic pollutants, and low expense (Isik et al. 2023; Rubangakene et al. 2023; Sari Yilmaz 2022). Utilizing waste material and agriculture and plant residues as adsorbents cuts the cost of waste disposal, conserves the environment and cuts the cost of the adsorption process (El Bendary et al. 2021; Ramírez-Rodríguez et al. 2023). Among the different low-cost adsorbents, biosorbents are of great significance because of their high availability, abundance of potential adsorption sites, eco-friendly nature, and sustainability (Isik et al. 2023; Ponce et al. 2021; Ramírez-Rodríguez et al. 2023; Semião et al. 2023).

The vast majority of biosorption studies use the biosorbents in powdered form and sometimes in nano-sizes. In general, unarguably the adsorption efficiency of a biosorbent increases as its particle size decreased. So, applying a biosorbent in powdered or nano-sized form has higher efficiency than immobilized, micro- and macro-sized forms. However, the aggregation, blocking and hard and costly post-treatment recovery of powdered and nano-sized materials restrict their practical applicability (Al Hawash et al. 2022; Jang et al. 2016; Zeng et al. 2023). Moreover, the environmental fate, and negative impacts of nano-sized materials have attracted the public and academic concerns recently (Al Hawash et al. 2022; Hund-Rinke and Simon 2006; Kong et al. 2011; López-Serrano et al. 2014; Moore 2006). As a result, great efforts are made to develop easily separable materials for water treatment. Several strategies have been used to get easily separable materials. For instance, the targeted material can be combined with a magnetic component which facilitates the magnetic separation of the composite. However, this approach adds additional step and increases the cost of the treatment process. Another approach is to immobilize the material onto micro-, and macro-sized supports or to prepare the material in a sponge-like, micro-, and milli-sized forms (Al Hawash et al. 2022; Cao et al. 2021; Mansor et al. 2023; Radwan et al. 2021; Radwan et al. 2016; Wu et al. 2023). The materials prepared by this approach can be easily manipulated and separated directly or by simple gravity sedimentation.

Casuarina equisetifolia tree, a member of the Casuarinaceae family, is widely cultivated on the side of the roadways, around homes, and close to seas as a decoration and/or fence. The Casuarina equisetifolia fruit waste (CEFW) is abundant, therefore, has been frequently utilized as activated carbon precursor (Boumediene et al. 2022; El Nemr et al. 2007; Ravichandran et al. 2018) or pulverized and used as a biosorbent (Dahri et al. 2018; Mokkapati et al. 2016; Prasanthi et al. 2016). However, to the best of our knowledge, the intact CEFW has never been used as a biosorbent yet. In addition, tailoring the chemical modification of the intact CEFW to enhance the selective removal of methylene blue (MB) or to simultaneously remove MB and methyl orange (MO) from dye-polluted water has not reported before. In this context, we targeted the upcycling of the intact CEFW biomass as an easily separable biosorbent for the treatment of dye-polluted water. With the sake of augmenting the biosorption efficiency, the surface of the intact CEFW was chemically modified by different agents. The changes of the characteristics of pristine CEFW after different modifications were monitored by attenuated total reflection Fourier transform infrared (ATR-FTIR), field emission-scanning electron microscopy (FE-SEM), energy-dispersive X-ray (EDX), and N2 adsorption at 77K. The biosorption efficiency of the intact CEFW was evaluated using a mixture of cationic (MB) and anionic (MO) dyes to mimic the real composition of dye-polluted water effluents. The biosorption performance was studied at different contact times, initial pH, initial concentrations of dyes mixture solution, and dosages of the intact CEFW. The pseudo-first order (PFO), pseudo-second order (PSO) and Elovich equations were used to model the kinetics of adsorption. And the Freundlich and Langmuir equations were used to model the equilibrium data in single and two component systems in order to glean data about the nature of interaction between the biosorbent and dyes and the effect of the co-existence of MB and MO on their biosorption.

Materials and methods

Materials

Casuarina equisetifolia fruit waste (CEFW) was collected from a garden in the valley higher institute for engineering and technology, Egypt, washed with copious amount of distilled water (DW) then drier in an oven at 105 °C. Figure S1 presents a digital image of CEFW. Hydrogen peroxide (H2O2, 30%), sodium chloride (NaCl, ≥ 99.0%), cetyltrimethylammonium bromide (CTAB, ≥ 99%), methylene blue (MB), and methyl orange (MO) were purchased from Sigma-Aldrich and used as received.

Modification of Casuarina equisetifolia fruit waste

CEFW was modified by four different processes: (I) H2O2 treatment, (II) H2O2 followed by NaCl treatment, (III) H2O2 followed by NaCl then CTAB treatment, and (IV) CTAB treatment. In H2O2 treatment, 100 g of the dried CEFW was shaken with 1 L of 0.1 M H2O2 at 60 °C for 6 h. Then the biomass was separated, washed with DW, and dried at 60 °C. A portion of the H2O2 treated biomass (80 g) was shaken with 1 L of 1 M NaCl at room temperature. After 24 h the biomass was separated, washed with DW, and then dried at 60 °C. Two routes were pursued for the CTAB treatment. In the first route, 20 g of H2O2/NaCl sequentially treated biomass was shaken with different concentrations of CTAB solution in order to define the optimum concentration of CTAB. In the second route, the pristine CEFW was shaken with 20 mM CTAB solution. In both routes the shaking was conducted at 40 °C for 24 h. Subsequently, the biomass was separated washed with DW until no turbidity was observed on addition of 0.1 M AgNO3 to the washing water then dried at 60 °C. The codes of the different samples and concentrations of treatment agents are given in Table 1.

Table 1 Codes and conditions of modification of CEFW biomass

Characterization of the pristine and modified Casuarina equisetifolia fruit waste

The functional groups, morphology, elemental composition and porous structure of the pristine and modified CEFW were identified using Jasco 4100 attenuated total reflection Fourier transform infrared (ATR-FTIR), JEOL 6400 F field emission-scanning electron microscopy (FE-SEM), energy-dispersive X-ray (EDX), and BELSORP-max surface analyzer, respectively. For SEM and EDX analysis the samples were prepared by coating with a thin film of gold, while for N2 adsorption at 77 K the samples were degassed at 60 °C for 24 h before analysis. The obtained N2 adsorption data was treated by the Brunauer–Emmett–Teller model to get the specific surface area (SBET) and the nonlocal density functional theory (NLDFT) to get the pore size distribution curves.

Biosorption performance of the pristine and modified Casuarina equisetifolia fruit waste

The biosorption affinity of the pristine and modified Casuarina equisetifolia fruit waste toward cationic and anionic dyes was evaluated by batch experiments using an orbital shaker incubator (DAIHAN ThermoStable™ IS-30, Korea). The experiments were conducted at 26 °C and shaking speed of 200 rpm using MB and MO as representatives for the cationic and anionic dyes, respectively. A specific volume (V (L)) of the mixed dyes solution, initial concentration (Co) 10 mg/L of each dye, was shaken with a precisely weighed amount (m (g)) of either pristine or modified CEFW then aliquots were withdrawn at different interaction times. A JASCO V730 (Japan) double-beam UV–Vis spectrophotometer was used to measure the remaining concentrations (Ct, mg/L) of both MB and MO at λmax 664 nm and 465 nm, respectively. The Co and Ct were used to calculate the percentage removal (R, %) of each of MB and MO following Eq. 1.

$$ R (\% ) = \left( {1 - \frac{{C_{t} }}{{C_{o} }}} \right) \times 100 $$
(1)

After electing the most promising biomass, the effects of initial pH (pHo) of mixed dyes solution, biomass amount, and initial concentration of both single and mixed dyes solution on the biosorption efficiency were investigated. All the aforementioned experiments were conducted as a function of interaction time. The caption of the figures states the exact and detailed conditions of each experiment.

The collected kinetic data was modeled using the common pseudo-first order (PFO) (Langergren and Svenska 1898), pseudo-second order (PSO) (Blanchard et al. 1984) and Elovich (Roginsky and Zeldovich 1934) models. While, the isotherm data was modeled using the well-known Freundlich (Freundlich 1906) and Langmuir (Langmuir 1918) models. The correlation coefficient (R2), reduced Chi-square (χ2) and sum of squared residuals (SSR) were used to test the applicability of the kinetics and isotherm models and to determine which of them is most suited the experimental data. The nonlinear forms of the kinetic and isotherm models in addition to error equations are given in the supporting information.

The effect of the co-existence of MB and MO on their biosorption was determined by calculating the ratio of equilibrium adsorption capacity (Rq,i) in the binary and single systems using Eq. 2.

$$ R_{q,i} = \frac{{q_{b,i} }}{{q_{s,i} }} $$
(2)

where qb,i and qs,i are the equilibrium adsorption capacity of a specific dye in the binary and single system, respectively. The value of Rq,i indicates whether the co-existence of dyes promotes (Rq,i > 1), hinders (Rq,i < 1) or does not affect (Rq,i = 1) the uptake of the target dye.

Results and discussions

H2O2 is a low-cost and nontoxic strong oxidizing agent. Pretreating biomass by H2O2 enriches its surface with oxygen-containing functional groups which are potential adsorption sites (Nguyen et al. 2021). H2O2 oxidizes the hydroxyl groups of the biomass to carboxyl groups, hence creates a weak cation exchanger (Shukla and Pai 2005). Post-treatment, the residual H2O2 self-decomposes into green products, specifically, O2 and H2O (Nguyen et al. 2021). Similarly, NaCl is a low-cost and easily available material. Treatment with NaCl aims to convert the potential adsorption sites from the H+ form to the Na+ form. This conversion is expected to improve the cation exchange capacity of the material because the exchange of Na+ is easier than H+ due to the size of ions (Chubar et al. 2004; Kasperiski et al. 2018; Yazıcı et al. 2008). Finally, functionalization of a biomass with CTAB endows its surface with cationic character (Kasperiski et al. 2018).

Characteristics of the pristine and modified Casuarina equisetifolia fruit waste

Surface functional groups identification

The surface functional groups of the pristine and modified CEFW were analyzed using ATR-FTIR and the results are displayed in Fig. 1. The FTIR spectrum of the pristine CEFW shows the presence of aliphatic C–H stretching vibrations of alkanes or alkyl groups at 2922 cm−1 and 2850 cm−1 (Arici 2021; Shukla and Pai 2005), C=O stretching of carboxylic acids at 1730 cm−1 (Dahri et al. 2013; Kasperiski et al. 2018), conjugated alkene C=C stretching at 1600 cm−1, O–H bending at 1436 cm−1 (Chandarana et al. 2021), C–H bending or asymmetric deformation at 1373 cm−1 (Mohamed et al. 2015), CH2 wagging at 1315 cm−1 (Mohamed et al. 2015), C–O stretching of the guaiacyl unit of lignin at 1243 cm−1 (Mohamed et al. 2015), asymmetric C–O stretching of cellulose at 1160 cm−1 (Mohamed et al. 2015), C–O stretching of cellulose, hemicellulose and lignin at 1032 cm−1 (Mohamed et al. 2015), and aromatic C–H out-of-plane bending at 900–670 cm−1.

Fig. 1
figure 1

a FTIR and b and c EDX analysis of CEFW and CEFW-5, respectively

Several changes can be observed in the FTIR spectrum after H2O2 treatment (sample CEFW-1). Specifically, (I) the relative intensity of the peaks at 2922 cm−1, 2850 cm−1, 1730 cm−1, 1600 cm−1, and 1243 cm−1 decreased, (II) the peaks at 1730 cm−1 and 1600 cm−1 shifted to higher wavenumber (1761 cm−1 and 1618 cm−1), (III) the peaks at 1436 cm−1, 1373 cm−1 and 1032 cm−1 totally disappeared, (IV) the relative intensity of the peak at 675 cm−1 increased considerably, and (V) new peaks appeared at 3725 cm−1, 3704 cm−1, 3625 cm−1, 3600 cm−1, 1700 cm−1 and 1540 cm−1. It is documented that H2O2 treatment of lignocellulosic materials degrades lignin, solubilizes some hemicellulose, and makes cellulose accessible. The oxidative degradation of lignin results in the formation of quinones, alcohols, phenols, and aldehydes as intermediates. Further oxidation results in opining the benzene rings and inserting carboxylic groups forming mono and dicarboxylic acids as final products (Chen and Davaritouchaee 2023; More et al. 2021). However, it is worthy to highpoint that complete oxidative degradation of lignin using H2O2 requires adjusting the pH (to 11.50) and temperature (around 90 °C) (More et al. 2021) which is not the case in the current study.

The observed decrease in the relative intensities of C–H, C=C and O–H (at 1436 cm−1) bands is due to their oxidation. While the disappearance and decreasing of C–O bands at 1032 cm−1 and 1243 cm−1, respectively, is mostly a result of the scission of some chains of lignin, and cellulose. The solubilization of hemicellulose and the scission of chains of lignin, and cellulose lead to decreasing the mass of vibrating molecules causing a shift of the bands of C=O and C=C to higher wavenumbers. Also, the solubilization of hemicellulose made the in-ring C–C stretch of the aromatic skeletal of lignin more pronounced which reflected by the appearance of band at 1540 cm−1. The appearance of the bands of O–H groups at 3700 cm−1 and 3600 cm−1 indicates the formation of alcohols, and phenols (Md Salim et al. 2021; Ramadhani et al. 2020). Similarly, the emergence of band at 1700 cm−1 indicates the formation of α,β-unsaturated aldehydes and ketones. The intensification of the band at 675 cm−1 (corresponds to the C–H bending of the –C≡C–H group) indicates the formation of alkyne structures after H2O2 treatment. Overall, the H2O2 treatment inserted additional hydroxyl, carbonyl and alkyne groups and exposed the aromatic structures of the CEFW.

The FTIR spectrum of the CEFW sequentially treated by H2O2, NaCl and CTAB (sample CEFW-5) shows significant variation in comparison to that of treated with H2O2 (sample CEFW-1). The peaks at 3700 cm−1 and 3600 cm−1 which are corresponding to O–H groups almost disappeared likely due to their interaction with CTAB. A broad band appeared at around 3400 cm−1 which can be attributed to the O–H stretching vibrations of the intermolecular hydrogen bonding. The intensity of the peaks of the aliphatic C–H stretching vibrations of alkanes groups (at 2922 cm−1 and 2850 cm−1) sharply increased owing to the addition of CTAB on the surface. The addition of CTAB on the surface of CEFW also resulted in decreasing the intensity of the peaks of conjugated alkene C=C stretching (at 1600 cm−1). Moreover, the appearance of peak around 1460 cm−1 which corresponds to R4–N+ group of CTAB provides a proof of the success of the modification process. The appearance of overlapping peaks of C–N and C–O stretching at 1112–1052 cm−1 further elucidate the presence of CTAB on the surface. All these observations agree with previous reports on the modification of biomasses by CTAB (Arici 2021; Kasperiski et al. 2018). Totally, the FTIR results demonstrated the successful incorporation of CTAB with the CEFW.

Elemental composition

The elemental composition of the pristine (CEFW) and CTAB modified (CEFW-5) biomasses was evaluated using EDX analysis. The EDX spectrum of CEFW displayed in Fig. 1b shows the presence of C, O, Al, Si, K, Ca, and Fe elements. The observed C and O contents (41.76 wt % and 45.89 wt %, respectively) of CEFW in this work is very similar to the values reported by Amran and Zaini (Amran and Zaini 2021) (47.9 wt % and 44.7 wt %, respectively) and Ravichandran et al. (2018) (43.87 wt % and 49.07 wt %, respectively). After the sequential modification of CEFW by H2O2, NaCl and CTAB (sample CEFW-5, Fig. 1c), the Ca and K elements vanished and the Al content decreased. This observation indicates that these cations were exchanged by CTAB. Mahmoodi et al. (2014) illustrated that CTAB modification starts by ion exchange mechanism where the counterions of the substrate are exchanged by the cationic CTAB. The EDX spectrum of CEFW-5 (Fig. 1c) also shows increasing the C content and the appearance of N element. This observation is a clear result of the adsorption of CTAB which contains 62.6 wt % of C and 3.8 wt % of N onto the pristine CEFW. Overall, the results of EDX analysis demonstrate the successful modification of CEFW by CTAB.

Morphology visualization

The morphology of the surfaces of pristine and modified CEFW was investigated using SEM analysis to probe the effect of modification on the surface. Figure 2a shows that the carpels of the pristine CEFW have a non-porous wrinkled surface. After H2O2 treatment (Fig. 2b) the wrinkled surface of the carpels becomes obviously porous, etched and cracked. It is documented that H2O2 treatment at room temperature can create artificial pores on the surface of biomasses through chemical etching (Junior et al. 2021). Therefore, it is predicted that H2O2 treatment could increase the surface area, total pore volume and pore sizes. The results in Table 2 proves this assumption where the surface area, total pore volume and mean pore size of H2O2 treated biomass (CEFW-1) is about 3, 3.7 and 1.6, respectively, times those of the pristine biomass (CEFW). The SEM images of the sample treated by CTAB (CEFW-5, Fig. 2c, d) showed that in spite the surface of the carpels turned into highly coarse granular surface with numerous evenly distributed white spots, it kept its wrinkled character in addition to some of the pores and cracks generated by H2O2 treatment. Undoubtedly, the emerged coarse granular morphology of the surface and the appearance of white spots are a result of CTAB deposition inside the pores and on the surface of the carpels. The observed morphology of the CTAB treated biomass resulted in a remarkable increase in the surface area and total pore volume as displayed in Table 2. The surface area and total pore volume of the CTAB treated biomass (CEFW-5) is 1.8 and 1.6, respectively, times those of the H2O2 treated biomass (CEFW-1). Conspicuously, the CTAB treatment clogged the pores causing an immense reduction on pore size as evident from Table 2 and Fig. 3b.

Fig. 2
figure 2

SEM images of a CEFW, b and c CEFW-1, and d, e CEFW-5

Table 2 Textural parameters of the pristine and modified CEFW
Fig. 3
figure 3

a N2 adsorption–desorption isotherms and b NLDFT pore size distribution curves of pristine and modified CEFW

Porosity characteristics

The shape of N2 adsorption–desorption isotherm identifies the isotherm type which gives information about the nature of both porous structure of the material and the adsorption process. Figure 3a shows the N2 adsorption–desorption isotherms of the pristine and modified CEFW. Two distinctive features of the isotherms of all materials can be observed; (I) the amount of N2 adsorbed increase almost linearly at the middle section of the isotherm, and (II) the amount of N2 adsorbed do not reach a saturation state, the adsorption is unrestricted even at high p/p0. These features fit well type II of the International Union of Pure and Applied Chemistry (IUPAC) classification of physisorption isotherms. Type II accounts for unlimited monolayer-multilayer adsorption. The point at which the middle almost linear section starts is indistinct indicating that multilayer adsorption begins before the completion of monolayer coverage. Figure 3a shows also the presence of hysteresis loops that belong to type H3 of the IUPAC classification. Type H3 loop is observed with slit-shaped pores (Sing 1985; Thommes et al. 2015).

The NLDFT pore size distribution curves displayed in Fig. 3b shows that the mean pore size of the pristine CEFW is 4.39 nm which can be classified as narrow mesoporous. The H2O2 treatment (sample CEFW-1) increased the width of the pores considerably, the mean pore size become 7.25 nm, owing to the etching effect of H2O2. On contrary, CTAB treatment reduced the pore sized to 0.73 nm which can be due to the deposition of CTAB inside the pores. Thus, the CTAB treated samples can be classified as microporous.

The results in Table 2 show that the BET surface area of the samples follows the order CEFW-5 > CEFW-1 > CEFW-6 > CEFW. Therefore, it can be concluded that all applied modifications have increased the surface area to different extents. In general, it is known that agricultural residues have low surface area (Kasperiski et al. 2018). However, it worth to mentioned that the recorded surface area of the pristine CEFW is higher than the reported value of rice bran (0.46 m2/g) (Oliveira and Franca 2011), Euterpe Oleracea treated by H2O2, NaOH, and H2SO4 (0.54, 0.15 and 0.14 m2/g, respectively) (Junior et al. 2021), pine bark (0.41 m2/g) (Zhang and Leiviskä 2020) and aqai stalk (0.4 m2/g) (Kasperiski et al. 2018). In addition, the different treated CEFW samples have higher surface area than that of rice husk (1.13 m2/g) (Penha et al. 2016), four genotypes of canola grains treated by H2O2, NaOH, and H2SO4 (Shukla and Pai 2005), glycidyl trimethyl ammonium chloride modified pine bark (0.43 m2/g) (Zhang and Leiviskä 2020), and CTAB modified aqai stalk (1.6 m2/g) (Kasperiski et al. 2018). Notably, the sample CEFW-6, which results from direct treatment of pristine CEFW by CTAB, has the lowest surface area among the different modified samples. This can be ascribed to the low surface area of the pristine CEFW.

Biosorption performance of pristine and modified Casuarina equisetifolia fruit waste

The effect of the different applied modifications on the biosorption capacity of CEFW was determined to find the best biosorbent. Figure 4 shows the time profile for the removal percentage of MB, and MO by the pristine and different modified CEFW. The pristine CEFW can gradually and selectively remove MB from its mixture with MO. After 3 h of contact, the pristine CEFW removed 81% of MB and no removal of MO was observed. This finding revealed that the pristine CEFW can be used as a selective biosorbent to separate and concentrate MB from its mixture with MO. Sometimes selectivity is required to enable retrieving specific components of the wastewater.

Fig. 4
figure 4

Simultaneous removal of MB and MO by the pristine and modified CEFW samples. a MB, b MO and c comparison between MB and MO removal. Co 10 mg/L MB and 10 mg/L MO, pHo 6, dosage 5 g/L

Unexpectedly, the treatment of the pristine CEFW by H2O2 has insignificant effect on its biosorption properties. Where the removal pattern and percentage of MB by the H2O2 treated CEFW (sample CEFW-1) is very similar to that of the pristine CEFW. The reason for this result is that although H2O2 treatment increases the potential adsorption sites, these sites were either in the neutral or protonated forms which limit their adsorption ability. After the NaCl treatment, these adsorption sites converted to the Na+ form with high adsorption ability. Therefore, the removal of MB was faster and higher. The removal percentage of MB after 30 min was 46%, 41%, and 80% for the pristine CEFW, H2O2 treated CEFW (sample CEFW-1), and H2O2, and NaCl sequentially treated CEFW (sample CEFW-2), respectively. As well, the removal percentage after 3 h was 81%, 80% and 91% for CEFW, CEFW-1 and CEFW-2, respectively. Hence, we can conclude that the sample CEFW-2 is the best for the selective removal of MB. Figure S2 shows the UV–Vis spectra of the MB/MO mixed dye solution before and after biosorption onto CEFW-2.

The sequential treatment of pristine CEFW by H2O2, NaCl and CTAB rendered the biomass the ability to remove the anionic dye MO and decreased its affinity to MB. This is logical as CTAB introduced quaternary ammonium cations on the surface of biomass. These groups repel the cationic MB and attract the anionic MO. The added amount of CTAB defines the extent of adsorption of both MB and MO. As depicted in Fig. 4c, increasing the amount of CTAB causes an increase in the removal percentage of MO and a decrease in the removal percentage of MB. The sample CEFW-5 achieves near balanced removal of MB and MO. Specifically, CEFW-5 removed 35% MB and 28% MO. Thus, the sample CEFW-5 can be selected as the best performing one for the simultaneous removal of MB and MO. Notable, the sample prepared by direct treatment of pristine CEFW by CTAB (sample CEFW-6) achieved higher removal of MO (34%) and lower removal of MB (20%) compared to the sample treated sequentially by H2O2, NaCl, and same amount of CTAB (CEFW-5). This observation indicates that sequential treatment produces a biosorbent with near balanced negative and positive adsorption sites.

In general, the pH of the solution affects significantly the adsorption process. The pH changes the surface charge of the adsorbents and the ionic state of the pollutants and controls the electrostatic interactions and hydrogen bonding (Andrade et al. 2023; Rubangakene et al. 2023). Therefore, we evaluated the effect of solution pHo on the selective removal of MB by CEFW-2 (Fig. 5a–c) and the simultaneous removal of MB and MO by CEFW-5 (Fig. 5d–f).

Fig. 5
figure 5

Effect of pHo on the removal of MB and MO. CEFW-2 (a) MB, (b) MO, (c) comparison between MB and MO removal. CEFW-5 (d) MB, (e) MO and (f) comparison between MB and MO removal. Co 10 mg/L MB and 10 mg/L MO, dosage 5 g/L

The biomass CEFW-2 removes MB solely at pHo 4, 6, 8, and 10 (Fig. 5a). But at pHo 2 minor removal of MO was recorded (Fig. 5b). Figure 5c illustrates that the removal of MB was minimal at pHo 2 (37%), continuously increased up to pHo 6 (91%), and then slightly decreased at pHo 8 and 10 (82%). Figure S3 shows the chemical forms of MB at the different pHo. At pH < 2.6 the two ends –N(CH3)2 groups become protonated (\({\text{{-}NH(CH}}_{{3}} {)}_{{2}}^{ + }\)) resulting in the tri-protonated form (\({\text{MBH}}_{{3}}^{{2 + }}\)) of MB, at 2.6 < pH < 8.33 both the mono- (MBH) and di-protonated (\({\text{MBH}}_{{2}}^{ + }\)) forms of MB coexist, and at pH > 8.33 the deprotonation of the nitrogen atom in the central cycle of MB molecule endows the MB a negative charge (MB) (Bensedira et al. 2022). Thus, at pHo 2 the functional groups on the surface of the CEFW-2 become protonated and repel the tri-protonated MB (\({\text{MBH}}_{{3}}^{{2 + }}\), Fig. S3) causing a low removal. As the acidity of the solution decreases, the protonation of the surface functional groups decreases, and consequently the electrostatic attraction between CEFW-2 and the mono- (MBH) and di-protonated (\({\text{MBH}}_{{2}}^{ + }\)) forms of MB and the removal percentage increases. At alkaline pHo (pHo 8 and 10), both MB and the surface functional groups of CEFW-2 become negatively charged causing a repulsion and decreasing the removal percentage. However, the only slight decrease in removal at pHo 10 indicates that electrostatic attraction is not the only interactions involved in the adsorption. As illustrated above, the sample CEFW-2 contain carbonyl, and aromatic groups. These groups can be involved in the biosorption of MB. The aromatic rings and carbonyl groups of CEFW-2 can interact with the aromatic rings of MB via π-π and n → π interactions, respectively. According to Fig. 5c, pHo 6 achieves the higher removal of MB, hence further experiments using CEFW-2 will be conducted at pHo 6.

On the other side, MO is an anionic dye with a pKa of around 3.4 (Nikiforova et al. 2008). MO exists in the zwitterion (+MO) form at pH˂3.4 and the anion (MO) form at pH > 3.4. The two chemical forms of MO are shown in Fig. S4. Thus, the observed minor removal of MO at pHo 2 is a result of weak electrostatic attractions between the protonated surface functional groups of the CEFW-2 and the zwitterion form of MO, π-π interactions between the aromatic rings of CEFW-2 and MO, and n → π interactions between the carbonyl groups of CEFW-2 and the aromatic rings of MO. At pHo 4–10, the strong repulsion forces between the anion form of MO and the electron rich surface functional groups of the CEFW-2 hinders the adsorption process.

Figure 5d, e, and f exposes that the biomass CEFW-5 can remove MB and MO simultaneously at the different studied pHo but the removal percentage varies according to the pHo. Figure 5d, f shows that MB removal increases monotonically with pHo, i.e., the removal percentage of MB increased as the pHo increased and reached the highest value (58%) at pHo 10. The electrostatic repulsion between the protonated surface functional groups of CEFW-5 and \({\text{MBH}}_{{3}}^{ + }\) (Fig. S3) at pHo 2 prevents approaching the MO to the surface of CEFW-5 and leads to the observed low removal (8%) of MB. Increasing the pHo diminishes the protonation of the surface functional groups, and results in electrostatic attraction between CEFW-5 and MBH and \({\text{MBH}}_{{2}}^{ + }\) forms (Fig. S3) of MB, thus increases the removal percentage. At pHo 8 and 10 the R4–N+ groups on the surface of CEFW-5 drives the electrostatic attraction with MB form (Fig. S3) of MB.

Figure 5e, f shows that acidic pHo (pHo 2 and 4) promotes the removal of MO. The removal percentage was 38% at pHo 2 and slightly increased to 42% at pHo 4. At pHo 2 MO is adsorbed mainly via the electrostatic attraction between the R4–N+ groups and the protonated electron rich functional groups on the surface of CEFW-5 from one side and the +MO form (Fig. S4) of MO from the other side. At pHo 4 MO changes to the MO form (Fig. S4) leading to stronger electrostatic interaction and consequently slightly higher removal percentage. Further increase in the pHo leads to repulsion between the electron rich functional groups on the surface of CEFW-5 and the MO form (Fig. S4) of MO. However, at pHo 8 and 10 low percentage of MO is removed via weak electrostatic attraction between the R4–N+ groups of CEFW-5 and the MO form of MO. It is worth noting that Fig. 5f demonstrates that the pHo can control and direct the biosorption toward either MB or MO. At acidic pHo the CEFW-5 become more selective to MO while at alkaline pHo the CEFW-5 become more selective to MB. Based on the results displayed in Fig. 5f, pHo 6 achieves balanced simultaneous removal of MB and MO, thus will be selected for further study.

The mass of biosorbent is another parameter that affects the biosorption process significantly as it is closely linked to the adsorption sites, surface area available for pollutant adsorption and cost efficiency (Isik et al. 2023). In general, increasing the amount of adsorbent provides more adsorption sites and increases the surface area resulting in increasing the amount of pollutant removed (El Bendary et al. 2021; Koryam et al. 2022, 2023). However, most powdered adsorbents tend to agglomerate when their dosage increases beyond certain levels. Agglomeration of an adsorbent causes a reduction of the available adsorption sites and surface area and lengthening the diffusion path. Consequently, the amount of pollutant removed decreases (El Bendary et al. 2021). In this study, the results displayed in Fig. 6a illustrates that the removal percentage of MB continuously increased with increasing the amount of CEFW-2. A sharp increase in the removal percentage was achieved by increasing the CEFW-2 amount from 2 g/L (35%) to 3 g/L (60%). Another significant and sharp increase in the removal percentage achieved by further increasing the amount of CEFW-2 to 5 g/L. Almost complete removal (91%) of MB was achieved using 5 g/L of CEFW-2 after 90 min at pHo 6. Thence, an amount of 5 g/L of CEFW-2 was used for further experiments.

Fig. 6
figure 6

Effect of dosage on the removal of MB and MO. a CEFW-2/MB, b CEFW-5/MB, c CEFW-5/MO and d comparison between MB and MO removal. Co 10 mg/L MB and 10 mg/L MO, pHo 6

A similar trend can be observed for the simultaneous removal of MB and MO by CEFW-5. Figure 6b–d shows that the removal of both MB and MO monotonically increased when the amount of CEFW-5 increased. The removal of MB increased from 35 to 46% then to 55% and the removal of MO increased from 28 to 40% then to 45% by increasing the amount of CEFW-5 from 5 to 6 g/L then to 8 g/L, respectively. Based on these findings we selected a dosage of 8 g/L for further study.

The effect of contact time on the amount of MB and MO dyes adsorbed by either CEFW-2 or CEFW-5 is displayed in Fig. 7. The majority of MB is adsorbed by CEFW-2 (Fig. 7a) in the first 30 min then minor increase in the adsorption can be noticed with increasing contact time. Precisely, the amount adsorbed in the first 30 min was 1.60 mg/g (R% = 80%) then increased to 1.82 mg/g (R% = 91%) at 180 min. The fast adsorption step is a result of the abundance of adsorption sites and the collisions between the MB molecules and CEFW-2 is high due to the high concentration gradient in the beginning of contact time. As time went by, the number of available and accessible adsorption sites decrease and the concentration gradient decrease as well causing the observed plateau phase (Amran and Zaini 2021; Isik et al. 2023; Shaheen et al. 2022). Contrariwise, the adsorption of both MB and MO onto CEFW-5 (Fig. 7b, c) has a gradual nature, i.e. the amount adsorbed increase gradually with contact time. The amount of MB and MO adsorbed by CEFW-5 increased from 0.29 mg/g (R% = 33%) and 0.25 mg/g (R% = 18%) at 30 min to 0.57 mg/g (R% = 55%) and 0.69 mg/g (R% = 38%), respectively, at 240 min.

Fig. 7
figure 7

Kinetics of the simultaneous removal of MB and MO. a CEFW-2/MB (Co 10 mg/L MB and 10 mg/L MO, pHo 6, dosage 5 g/L). b CEFW-5/MB, and c CEFW-5/MO (Co 10 mg/L MB and 10 mg/L MO, pHo 6, dosage 8 g/L)

In order to determine the step that controls the adsorption rate and to describe the kinetics of MB and MO biosorption onto CEFW-2 and CEFW-5, the data of adsorption at different contact times was treated by the PFO, and PSO kinetic equations. The resulting fitting curves are presented in Fig. 7 and the calculated kinetic parameters are given in Table 3. The visual examination of Fig. 7 indicates that all studied kinetics models can fit the biosorption data. The values of R2 for all studied kinetic models (Table 3) are greater than 0.97 confirming that all studied kinetic models can satisfactorily predict the experimental data. The biosorption of MB onto CEFW-2 is exceptional where the visual examination shows that PFO cannot fit the kinetic data. Also, the value of k1 (Table 3) for the biosorption of MB onto CEFW-2 looks unrealistic in spite of the high R2 value.

Table 3 Calculated parameters of PFO and PSO kinetic models

The observation that different kinetic models can fit the experimental data indicates that several processes are involved in the adsorption process. Comparing the values of R2, and error functions listed in Table 3 reveal that the suitability of the kinetic models to the experimental data follows the order PSO > Elovich > PFO. The PSO is valid for adsorption systems in which the sharing of electrons between the adsorbent and adsorptive (chemisorption) is the rate-limiting step (Amran and Zaini 2021; Andrade et al. 2023; Arici 2021; Dahri et al. 2013; Jang et al. 2016). Fitting to Elovich model confirms that chemisorption plays important role in the adsorption process and that the surface of the biosorbent is heterogeneous (Koryam et al. 2022; Wu et al. 2009).

To maximize the adsorption capacity of the biosorbents and to understand the mechanism of adsorption, single and binary adsorption isotherm studies were conducted. Figure 8 displays the experimental adsorption isotherms along with Freundlich and Langmuir fitted curves. The values of the parameters of Freundlich and Langmuir models are listed in Table 4. Figure 8 reveals that, in general, the equilibrium adsorption capacity of MB and MO in single and binary components systems steeply increased with increasing their initial concentration. Exceptionally, the increase of equilibrium adsorption capacity was minor for the adsorption of MO onto CEFW-5 in the single component system (Fig. 8c). Another finding that can be visually inferred from Fig. 8 is that the equilibrium adsorption capacity in the binary component system was considerably higher than that of the single component adsorption. This observation was verified numerically by calculating Rq,i. Figure S5 presents the relation between Rq,i and Co. The values of Rq,i were greater than 1 for all adsorption systems at all studied initial concentrations. This means that the co-existence of MB and MO promotes the adsorption of each other. Similar trend has been observed before (Chen et al. 2020; Li et al. 2017; Shi et al. 2022). The reason for this trend is that the adsorbed dye molecules could provide new adsorption sites for the other dye. It is documented that organic dyes self-aggregates forming dimers, trimers and higher aggregates based on their concentrations. The dimeres of MB and MO have positive and negative charge, respectively, at each end. One end of the dimers of MB undergoes electrostatic attraction with the negative charge on the surface of CEFW-5 while the other end can electrostatically attract the anionic MO. Likewise, one end of the dimers of MO undergoes electrostatic attraction with the positive charge on the surface of CEFW-5 and the other end can electrostatically attract the cationic MB molecules. Thus, MB and MO behaves as new adsorption sites and enhances the biosorption of each other’s (Li et al. 2017; Shi et al. 2022).

Fig. 8
figure 8

Single and binary biosorption isotherms of MB and MO. a CEFW-2/MB (pHo 6, dosage 5 g/L, interaction time 4 h), b CEFW-5/MB, c CEFW-5/MO (pHo 6, dosage 8 g/L, interaction time 4 h)

Table 4 Calculated parameters of Freundlich and Langmuir adsorption isotherm models

The raw biosorption equilibrium data of the single and binary systems were treated by the non-linear forms of Freundlich, and Langmuir isotherm models. Figure 8 presents the fitting curves and Table 4 lists the calculated parameters of the isotherm models. Comparing the suitability of the Freundlich, and Langmuir in terms of the R2 and error functions values shows that Freundlich model simulates the experimental biosorption equilibrium data of MB in all studied systems better than Langmuir model. Notably, the biosorption of MO onto CEFW-5 can be well simulated by both Freundlich, and Langmuir, however, Freundlich gives slightly better fit. Thus, it is convincing to conclude that Freundlich model can fit the equilibrium biosorption data for all studied systems better than Langmuir model. This outcome implies that the adsorption sites on the surface of the biosorbents have different energies (heterogeneous surface) and that biosorption of MB and MO onto the biosorbents has multilayer character. The Freundlich exponent nF is usually used to inform whether the adsorption is favorable (nF > 1), unfavorable (nF < 1), or linear (nF = 1). Also, it informs whether the adsorption is chemisorption (nF > 1) or physisorption (nF < 1) (Metwally et al. 2018; Sumaraj et al. 2020). The values of nF for the biosorption of MB onto CEFW-2 and MO onto CEFW-5 in the single and binary systems are > 1 suggesting that the biosorption is favorable chemical process. This outcome agrees with the finding of kinetic study that chemisorption has a key role in the biosorption process. In contrast, the values of nF for the biosorption of MB onto CEFW-5 in the single and binary systems are < 1 suggesting that the biosorption is poor physical process. This observation looks contradict the chemisorption suggestion of the kinetic study. But both suggestions can be correct. It has been reported before that both physisorption and chemisorption co-occur (Abdel Ghafar et al. 2020; Mohammed 2011). In these cases, a layer of adsorptive is firstly adsorbed on the surface of the adsorbent via chemical process then another layer is physically adsorbed resulting in the formation of multilayer of adsorbate.

Conclusions

Undoubtedly powdered and nano-sized materials have higher adsorption efficiency than immobilized, micro-, macro- and millimeter sized materials. But, the tricky and high cost preparation methods, hard and costly post-treatment separation, in addition to the rising concerns about the fate and environmental impacts of powdered nano-sized materials boost the utilization of low-cost materials in the form of macro-, and millimeter sizes. This inspired us to exploit the intact Casuarina equisetifolia as a biosorbent. The pristine Casuarina equisetifolia was modified by two different methods to enhance its ability to selectively remove MB form its mixture with MO or simultaneously remove MB and MO. The characterization results showed that the pristine Casuarina equisetifolia has a non-porous wrinkled surface composed of aliphatic and aromatic structures containing carbonyl and hydroxyl groups. The H2O2 treatment rendered the pristine CEFW a porous structure, added hydroxyl, carbonyl and alkyne groups and uncovered the aromatic structures. CTAB treatment increase the surface area, enriched the aliphatic content, and added R4–N+ groups to the biomass. The biosorption studies revealed that the pristine CEFW removes selectively MB from a mixture with MO. The selective biosorption ability of CEFW significantly enhanced by treatment with H2O2 followed by NaCl. And the simultaneous removal of MB and MO was possible only after CTAB treatment. The optimum selective removal of MB (91%) was achieved using 5 g/L of CEFW-2 after 90 min at pHo 6. On the other hand balanced simultaneous removal of MB (55%) and MO (45%) was achieved using 8 g/L of CEFW-5 after 90 min at pHo 6. The kinetic and isotherm studies showed that the biosorption involves several processes dominated by chemisorption and multilayer. Conclusively, the results illustrated that Casuarina equisetifolia can be used as a green and low-cost biosorbent for the removal of dyes from contaminated water.