Introduction

Water contamination is one of the major problems worldwide1. It not only harms the environment and human health, but it also negatively affects the social and economic sectors. In developing countries, it is well-known even for the general public, where water pollution is mainly caused due to the discharge of untreated or partially treated industrial and municipal wastewater into water streams2. Industrial wastewater is highly toxic to living organisms, particularly plants, and this wastewater contains pathogenic and non-pathogenic microorganisms, organic substances (dyes, pigments, plant material, food, protein), and inorganic substances (metal particles, ammonia, and gases). These contaminants may damage living beings and the environment if they are discharged without being treated, hence it is vital to treat them before disposal3,4.

Dyes are one of the most common sources of water contamination, owing to poor treatment procedures used all over the world. The release of dyes and their end products into water resources has extremely harmful effects on aquatic organisms, even at low concentrations. They prevent sunlight transmission and penetration, impairing aquatic plants’ photosynthetic activities, and have acute and chronic consequences, such as serious damage to living things and mutagenic and carcinogenic problems, by disrupting the normal functions of organs like the kidney, reproductive system, central nervous system, liver, and brain5,6,7,8. Moreover, the dyes produced by textile industries have been reported to cause respiratory disorders, especially for workers subjected to them during work1,9.

One of the harmful dyes is methylene blue (hereafter, MB), which is a synthetic chemical compound with a deep blue color. It has various applications in various fields, including medicine, biology, and industry. Its chemical formula is C16H18N3SCl, and it is also known by the name methylthioninium chloride or simply10. The MB dye is a common dye used in the coloring and dyeing of cotton, wool, and silk. It can have negative health effects, such as inflammation of leptomeninges, nausea, and neuronal apoptosis. Moreover, MB has been reported to cause other disorders such as vomiting, cyanosis, jaundice, increased heart rate, hypertension, as well as tissue necrosis11. MB is a dangerous univalent cationic dye that has been known to cause cancer in both people and animals10. MB is used as a treatment to treat methemoglobinemia, psoriasis, West Nile virus, and duck hepatitis B infections, in addition to its application in the textile industry. It can produce high blood pressure, cardiac depression, the formation of Heinz bodies, cyanosis, and jaundice, all of which are probable side effects of induced tissue necrosis in humans12.

Many methods for removing dyes from wastewater have been documented, including biological, chemical, and biochemical processes, and membrane treatments13,14,15. These techniques have a number of drawbacks, including a high cost, the production of non-biodegradable by-products, incomplete dye removal, and the generation of huge quantities of hazardous sludge7,16. Because of adsorption’s flexibility in operation, simplicity in design, and the removal of dyes without any toxic consequences compared to other methods17,18, they are widely used and successful technologies for the removal of dyes from wastewater.

Micron-sized porous particles technology is one of the most promising applications in industry, medicine, and agriculture. It is the process of modifying matter at the Micron-sized porous particles-scale to produce brand-new systems and structures. Because surface area grows as particle size decreases, Micron-sized porous particles (NPs) differ from micro-particles in terms of their optical, magnetic, and electrical properties19. The NPs are considered effective materials to combat pollution and clean up a contaminated environment. The material’s size of the Micron-sized porous particles scale has a proportion of atoms on its surface increases, which has a huge surface area and a high surface reactivity20. The structure and properties of Micron-sized porous particles are known to be influenced by the procedures used to make them. Ball milling is a top-down method for producing homogeneous Micron-sized porous particles21. It’s also a form of grinder that’s used to grind or blend minerals for use in mineral dressing operations22, and it’s been demonstrated to improve solid-state chemical reactivity23.

Adsorption is one of the most efficient treatments for textile wastewater processing. It is a low-cost technique for removing colors and/or decolorizing textile wastewater. Several factors may be at work in the adsorption mechanism of dye molecules, including hydrophobic interactions, van der Waals forces, electrostatic contacts, and hydrogen bonding. Although the use of relatively inexpensive adsorbents for textile dye removal is cost-effective, it requires a large volume of adsorbents and is limited in comparison to activated carbon24. Furthermore, they face challenges in large-scale implementation.

Calotropis procera (Aiton) W.T. Aiton is a species of flowering plant abundant in North Africa and the Arabian Peninsula, it contains many secondary metabolites, which are biologically active and structurally unique compounds25, in addition to chemical constituents such as alkaloids, steroid, terpenoids, resin, glycosides, and carbohydrates26,27. Extracts from C. procera have been reported to possess analgesic, anti-inflammatory, and antioxidant properties. Also, its leaves are used in traditional medicine as an expectorant and anti-inflammatory to treat paralysis, ulcers, and rheumatic pains, as well as it is highly effective in curing anorexia, flatulence, intestinal worm infestation, indigestion, malarial fever, asthma, and cough28. On the other hand, C. procera leaves have been reported as adsorbent material to remove Zn (II) Ions from wastewater, where it showed maximum removal (75.2%) of Zn29. Moreover, Oyelude and Owusu30 investigated the use of C. procera leaf powder modified with HCl for the removal of MB dye from an aqueous solution.

Zygophyllum coccineum L. is a succulent plant that can survive and exist under harsh conditions such as aridity, salty soil, and dry climatic conditions, it contains bioactive organic secondary compounds (tannins, saponins, flavonoids, alkaloids, and phenols31. These two species are growing with substantial biomass in desert and salt-affected lands. It has been shown to be effective in removing a variety of pollutants from water, including lead, cadmium, nickel, and MB. The plant’s biomass is a good source of adsorbent materials such as cellulose, hemicellulose, and lignin. These materials can be used to remove pollutants from water by binding to them through chemical or physical interactions32.

The applicability of eXtreme Gradient Boosting (XGBoost) in the adsorption of dyes experiments is well-supported by its demonstrated effectiveness in various studies. XGBoost, a powerful machine learning algorithm, has been utilized to predict and optimize conditions in dye adsorption processes, showcasing its potential to enhance experimental efficiency and accuracy. Moreover, XGBoost, has been instrumental in identifying key factors affecting adsorption capacity, such as initial concentration and surface area. This ability to explain and understand the contributions of different factors aids in adsorbent designs and improving adsorption efficiency33,34.

Furthermore, The integration of XGBoost with experimental and theoretical methods, such as DFT calculations, has provided deeper insights into adsorption mechanisms. This combination allows for a comprehensive understanding of the factors affecting dye adsorption, including the impact of background ions35.

While adsorption-based methods for removing methylene blue (MB) are well established, most existing studies have relied on conventional biosorbents or untreated plant materials, with limited exploration of how particle size and plant species influence removal efficiency under standardized conditions. Nevertheless, the adsorption-based removal of MB dye using biosorbents still addresses a significant gap in the search for sustainable, cost-effective, and environmentally friendly wastewater treatment solutions. Although various agricultural wastes have been studied, Z. coccineum and C. procera remain underutilized despite their resilience, abundance in harsh environments, and rich phytochemical profiles. The scientific gap this research fills is twofold: first, it provides a comparative evaluation of two underexplored desert plant species in micro- and Micron-sized porous particles-structured forms; second, it examines whether the transition from micro to Micron-sized porous particles scale significantly improves removal efficiency (R%), thereby informing whether the added cost and effort of Micron-sized porous particles processing is justified. By identifying which scale and species offer optimal performance, the study contributes valuable insights into biomass optimization strategies for dye removal. Additionally, the study contributes to the broader research landscape by emphasizing the importance of scalable, green alternatives and exploring adsorption behavior under various parameters. These findings can help guide future work on cost-benefit analyses, industrial scalability, and integration into existing wastewater treatment frameworks.

The current study aims to evaluate the efficacy of using micro and Micron-sized porous particles-scale Z. coccineum and C. procera plants in removing MB dyes from simulated wastewater, identify the factors that affect the removal of MB dyes by using these particles, and compare the MB removal percentage of the two used scaled particles and knowing the difference between them as a function of removal percentage. In addition to assess the applicability of eXtreme Gradient Boosting (XGBoost) in dye adsorption experiments and evaluate the effectiveness of XGBoost in predicting and optimizing adsorption conditions to enhance experimental accuracy and efficiency.

Results and discussion

Physico‑chemical characteristics of the used bio-sorbent

Fourier Transform Infrared (FTIR) spectroscopy was employed to examine the molecular structure, chemical bonding, and functional groups of the biosorbent particles before and after methylene blue (MB) bio-sorption at an initial MB concentration of 100 ppm. This analysis provides valuable insights into the functional groups responsible for the remediation process.

Figure 1 presents the FTIR spectra of the biosorbent particles, revealing distinctive functional groups critical to MB adsorption. The eight materials exhibited characteristic O–H stretching vibrations around 3410 cm⁻¹, which correspond to the presence of amorphous carbon36,37,38. Additionally, a minor peak at approximately 2920 cm⁻¹ is attributed to the C–H stretching vibration, including –CH₃, –CH₂, CHO, and CH groups associated with cellulose functional groups39,40,41.

Notable peaks in the 1200–900 cm⁻¹ range indicate polysaccharide functional groups such as C–C, C–O, C–O–C, and C–O–P, which are key structural components of cellulose and lignin in the biosorbent materials. These groups are believed to play an essential role in MB adsorption. Similarly, a stretching vibration of C = O was observed around 1640 cm⁻¹, while the peak near 1040 cm⁻¹ was attributed to C–O stretching vibrations42,43.

The FTIR spectra of the biosorbents before and after MB bio-sorption showed accurate but meaningful shifts in wavenumbers, indicating interactions between MB molecules and functional groups on the biosorbent surface. For instance, the Micron-sized porous particles-Cal particles displayed a shift in the C–O stretching peak from 1054 cm⁻¹ before adsorption to 1058 cm⁻¹ after MB adsorption. A similar shift was observed in the micro-Cal sample, from 1047 cm⁻¹ to 1035 cm⁻¹, and in the Micron-sized porous particles-Zygo and micro-Zygo samples, with wavenumber changes from 1036 cm⁻¹ to 1035 cm⁻¹ and from 1038 cm⁻¹ to 1039 cm⁻¹, respectively. These shifts are linked to the stretching vibrations of the lignin’s –OCH₃ group, which interacts with MB during the bio-sorption process.

Fig. 1
Fig. 1
Full size image

FTIR of the used bio-sorbent particles; (1): Micron-sized porous particles-Calotropis procera (before bio-sorption), (2): micro-C. procera (before bio-sorption), (3): Micron-sized porous particles-Zygophyllum coccineum (before bio-sorption), (4): micro-Z. coccineum (before bio-sorption), (5): micro-Z. coccineum after treatment, (6): Micron-sized porous particles-Z. coccineum after treatment, (7): Micron-sized porous particles-C. procera after treatment, (8): micro-C. procera after treatment.

The peak around 3410 cm⁻¹ (O–H stretching) and the band at approximately 1640 cm⁻¹ (H–O–H bending) are associated with adsorbed water. The slight wavenumber shifts in these peaks after MB adsorption suggest a change in the physical adsorption process at the biosorbent surface.

Additional evidence of adsorption interaction comes from the behavior of carboxylic groups. Peaks around 1736 cm⁻¹ (Micron-sized porous particles-Cal), 1728 cm⁻¹ (micro-Cal), 1736 cm⁻¹ (Micron-sized porous particles-Zygo), and 1724 cm⁻¹ (micro-Zygo) shifted to 1733 cm⁻¹, 1652 cm⁻¹, 1735 cm⁻¹, and 1640 cm⁻¹, respectively, upon loading with MB. This shift highlights the role of carboxylic groups, which, due to their negative charge, form electrostatic interactions with the positively charged MB molecules.

Finally, the IR spectrum region between 1200 and 900 cm⁻¹, dominated by polysaccharide functional groups (C–C, C–O, C–O–C, and C–O–P vibrations), further underscores the structural contribution of cellulose and lignin in MB adsorption. The observed shifts and changes in intensity in this region validate the significant role of these functional groups in the biosorption process.

These findings confirm that the bio-sorbents, both at the micro and Micron-sized porous particles scale prepared particles, effectively interact with MB molecules via their functional groups with the preference of Micron-sized porous particles-particles, demonstrating their potential as eco-friendly materials for wastewater treatment.

.

Fig. 2
Fig. 2
Full size image

XRD patterns of the used bio-sorbent particles; (2): Micron-sized porous particles-Zygophyllum coccineum, (4): Micron-sized porous particles-Calotropis procera, (5): Micron-sized porous particles-Z. coccineum after treatment, (7): Micron-sized porous particles-C. procera after treatment.

The crystalline structure of the bio-sorbent particles was examined using X-ray diffraction, as presented in Fig. 2. All samples display a broad diffraction band centered at approximately 2θ ≈ 22°, corresponding to the (002) reflection of cellulose-based materials. This diffuse feature, together with the absence of sharp peaks, indicates that the particles possess a predominantly amorphous structure, which is typical for lignocellulosic sorbents derived from plant biomass. This behavior is consistent with earlier studies reporting that the amorphous fraction in cellulose generates an extended halo that overlaps with the (002) band, leading to substantial line broadening and reduced visibility of crystalline domains32,44.

Given the dominance of the amorphous region, the measured peak width in such systems inevitably includes contributions from both the true crystalline broadening and the underlying amorphous halo. Although background subtraction can refine the numerical full width at half maximum (FWHM), it does not change the qualitative interpretation of the data for materials where the amorphous component overwhelms the crystalline signatures. For this reason, the XRD results in this study are interpreted qualitatively rather than used to extract crystallite sizes. Small variations in the 2θ position among samples (21.7°–22.3°) and the corresponding interplanar spacing (7.903–8.140 Å) likely reflect minor differences in the chemical composition of the biomass precursor and structural disorder inherent to plant fibers, rather than any true modification of the cellulose lattice. Importantly, dye adsorption does not introduce new crystalline phases, nor does it shift or sharpen the (002) reflection, indicating that the dye interacts primarily with amorphous regions and surface functional groups rather than altering the cellulose backbone. Moreover, The broad nature of these peaks, along with the absence of additional sharp reflections, indicates the predominantly amorphous character of the used particles. Peak broadening in such systems is generally attributed to the low degree of crystallinity, small crystallite domains, and structural disorder.

Overall, the XRD profiles confirm that the bio-sorbent particles are largely amorphous, with only limited nanocrystalline domains embedded within a disordered matrix. Such an amorphous structure enhances the accessibility of active sites and is advantageous for adsorption applications, as widely reported for lignocellulosic sorbents44,45.

Figure 3 presents the scanning electron microscopy (SEM) images of the biosorbent particles derived from Calotropis procera and Zygophyllum coccineum at different size fractions, both before and after methylene blue (MB) adsorption. The images were acquired at an accelerating voltage of 15 kV with magnifications of ×2,888 and ×3,888, providing detailed visualization of the surface architecture characteristic of lignocellulosic materials. Figure 3a and b show the micro-sized fractions of Calotropis procera and Zygophyllum coccineum. Both materials exhibit irregular particle boundaries, fibrous fragments, and rough surface textures typical of plant-derived lignocellulose, which contains intertwined domains of semicrystalline cellulose, hemicellulose, and lignin. Such heterogeneous and uneven surfaces are known to enhance adsorption performance by increasing the availability of functional groups and active binding sites. Figure 3c and d display the corresponding micron-sized porous fractions before MB exposure. These particles show markedly higher surface roughness, fissures, and pore openings compared to the micro-sized material. The enhanced porosity and greater textural complexity are expected to improve sorption capacity by facilitating dye diffusion and increasing accessible surface area.

Following MB sorption, Fig. 3e and f illustrate the morphological changes in Calotropis procera. Surface coverage by MB residues, localized aggregation, and the appearance of denser surface films indicate successful dye attachment. Similar features are observed in Zygophyllum coccineum (Fig. 3g and h), where the formation of distinct deposits and surface modifications further confirm effective MB uptake. These sorption-induced changes align with the behavior of lignocellulosic biosorbents, in which dye molecules interact primarily with hydroxyl-rich cellulose regions and lignin-associated functional groups. Collectively, the SEM analysis confirms that the biosorbents consist of micron-sized porous lignocellulosic particles with textural attributes favorable for adsorption. The morphological evolution after MB exposure, including increased surface coverage and particle bridging, supports the enhanced sorption performance of the porous particle fraction and highlights the role of surface accessibility and pore structure in governing dye uptake efficiency.

Fig. 3
Fig. 3
Full size image

SEM images of the used bio-sorbent particles; (a): Micro-Calotropis procera, (b): Micro-Zygophyllum coccineum, (c): Micron-sized porous particles-Calotropis procera, before MB bio-sorption (d): Micron-sized porous particles-Zygophyllum coccineum, before MB bio-sorption (e, f): Micron-sized porous particles- Calotropis procera with MB particles, (g,h): Micron-sized porous particles-Zygophyllum coccineum with MB particles.

Thermogravimetric graphs of the used bio-sorbent particles are shown in Fig. 4, as the thermal degradation behavior provides insights into the stability, composition, and thermal resistance of the bio-sorbents.

There were three main weight-loss phases noticed. The first degradation stage > 10% till around 100 °C may be attributed to the release of water molecules and atmospheric gases that are attached to the surfaces of the used bio-sorbent particles, this stage is more pronounced in the Micron-sized porous particles-sized samples ((2) and (4)), likely due to their higher surface area, which increases moisture retention. The second weight-loss step with total weight loss from 100 to 300 °C which was allocated to the release of water and residual solvent from the internal pores of the used bio-sorbent particles44,45. Moreover, Significant mass loss occurs in this temperature range, corresponding to the breakdown of hemicellulose, cellulose, and other organic constituents. The degradation step appears sharper in Micron-sized porous particles-sized samples ((2) and (4)), suggesting a more homogeneous structure and enhanced thermal reactivity.

Gradual degradations are observed in the third step from 300 to 700 °C due to the cleavage of the backbones of the used bio-sorbent particles and the degradation of lignin and residual carbonaceous materials10,44. Furthermore, The residual mass at higher temperatures is lower in micro-sized bio-sorbents ((1) and (3)), indicating that Micron-sized porous particles-sized bio-sorbents have better thermal stability due to their structural modifications.

Fig. 4
Fig. 4
Full size image

TGA curves of the used bio-sorbent particles; (1): Micro-Zygophyllum coccineum, (2): Micron-sized porous particles-Z. coccineum, (3): Micro-Calotropis procera, (4): Micron-sized porous particles-C. procera.

According to these results, the used Micron-sized porous particles-bio-sorbent particles demonstrated high thermal characteristics compared with other micro-particles46. Micron-sized porous particles-sized Zygophyllum coccineum and Calotropis procera show enhanced thermal stability compared to their micro-sized counterparts. Also, the sharp degradation peaks in Micron-sized porous particles-sized samples suggest higher thermal reactivity, possibly due to increased porosity and a larger surface-to-volume ratio. Besides, the higher residual mass in Micron-sized porous particles-bio-sorbents implies structural robustness, potentially enhancing their performance in adsorption applications. Finally, the TGA analysis confirms that Micron-sized porous particles-sized bio-sorbents exhibit better thermal resistance and structural integrity than their micro-sized counterparts. These findings support the improved efficiency and durability of Micron-sized porous particles-bio-sorbents in adsorption applications, making them more suitable for high-temperature processes or prolonged usage in wastewater treatment.

Figure S1 shows the N2 adsorption-desorption curve of the used bio-sorbent particles. Powdered particle surface analysis showed the BET surface areas to be 24.40, 72.55, 78.38, and 86.91m2 g[-1 for micro-Z. coccineum, Micron-sized porous particles-Z. coccineum, micro-C. procera, and Micron-sized porous particles-C. procera, respectively. The surface area of both particles is relatively high, but the difference between the micro- and Micron-sized porous particles-scaled particles is quite evident. In addition, there is a difference in the surface area between Z. coccineum and C. procera, at both the micro and Micron-sized porous particles scale. This difference gives C. procera a preference over Z. coccineum, which in turn increases its bio-sorption capacity, as shown in the upcoming sections. From the abovementioned outcomes, the used particles achieved a significantly high surface area, which confirms their potential applicability to adsorb the pollutants from wastewater10. For the total pore volume and the average pore diameter of the used biosorbent materials, low-pressure N2 gas adsorption analyses were used to characterize micropores in a porous media. N2 adsorption/desorption isotherms and hysteresis patterns are used to investigate the pore structure characteristics of the used biosorbent materials along with their physisorption mechanisms47.

According to the classification of IUPAC, the hysteresis patterns of all the used biosorbent materials fall into the H3-type as shown in Figure S1, indicating that the slit-shaped pores are the prevailing pore types48. It is quite evident from the figure that both of the Micron-sized porous particles biosorbent materials have higher total pore volume and average pore diameter than the micro biosorbents, as the total pore volume was 0.006 and 0.004 cm3. g[-1 for Micro-Zygophyllum coccineum and Micro-Calotropis procera, respectively, while it was 0.005 and 0.0104 cm3 .g[-1 for Micron-sized porous particles-Z. coccineum, and Micron-sized porous particles-C. procera, respectively. The same trend was also observed with the average pore diameter. A higher total pore volume means that the used Micron-sized porous particles biosorbent material has more surface area available for adsorption. A larger average pore diameter means that the pores are larger and can accommodate larger adsorbate molecules. The MB dye molecule is relatively large, therefore, the average pore diameter of the used biosorbent particles is important for ensuring that the MB dye molecules can access all of the pores of the used biosorbent particles. The effect of mesopore volume on biosorption capacity was obvious for larger adsorbates. This might be due to that mesopores reduce the length of the diffusion path of the micropores and that the length would generally show a stronger impact on the diffusion of larger molecules49.

The adsorption of small molecules reached equilibrium more quickly than the adsorption of large molecules. Furthermore, the resins with small pores are easy to lower their adsorption capacities for large molecules because of the pore blockage effect.

Moreover, compared to other biosorbents reported in the literature for MB removal, Micron-sized porous particles-Cal exhibits superior or comparable textural properties was well illustrated in Table 1. For example, cotton stalk and phosphoric acid treated cotton stalk had a surface area of 2.81 and 7.26 m²/g, respectively (Deng, Hui, et al. “Adsorption of methylene blue on adsorbent materials produced from cotton stalk.” Chemical engineering journal 172.1 (2011): 326–334.), while mangosteen peels showed 3.78 m²/g (Nasrullah, Asma, et al. “High surface area mesoporous activated carbon-alginate beads for efficient removal of methylene blue.” International journal of biological macromolecules 107 (2018): 1792–1799.). Even engineered biosorbents such as activated carbon from Moringa oleifera leaf exhibited a BET surface area of 1.69 m²/g (Do, Tra Huong, et al. “Study on methylene blue adsorption of activated carbon made from Moringa oleifera leaf.” Materials Today: Proceedings 38 (2021): 3405–3413.). Thus, the Micron-sized porous particles-Cal biosorbent developed in this study shows significantly higher surface area and porosity, affirming its promising potential for MB removal from aqueous systems.

Table 1 A quantitative comparison of the surface area and porosity of Micron-sized porous particles-Cal with those of other biosorbents previously reported for methylene blue adsorption presented in tabular form.

Bio-sorption investigation (Batch Equilibrium)

Effect of Contact Time on MB Bio-sorption

The effect of contact time on the bio-sorption of MB onto the used biosorbents was investigated over 300 min of time intervals, as illustrated in Fig. 5A. The MB removal percentage increased with increasing contact time until it reached equilibrium at 240 (micro/Micron-sized porous particles-Zygo and micro-Cal) and 180 min (Micron-sized porous particles-Cal) for an initial dye concentration of 10 mg/l. When the equilibrium time for each bio-sorbent was reached, the removal percentages remained almost constant with longer contact times. The removal percentage of MB dye onto the used micro/Micron-sized porous particles-Zygo, and micro/Micron-sized porous particles-Cal increased from 0.73 to 85.11%, 27.29–90.66%, 7.60-90.54%, and from 81.71 to 94.38% when the contact time increase from 5 to 300 min for micro/Micron-sized porous particles-Zygo, micro-Cal, and Micron-sized porous particles-Cal, respectively.

It was so obvious that both of the used Micron-sized porous particles-sorbents have the highest percentage of MB removal than the used micro-bio-sorbents (approximately 5% difference in the removal% between micro and Micron-sized porous particles), which might be due to the abundance of available active sites at the used Micron-sized porous particles-bio-sorbent particles surfaces due to their high surface area. Additionally, the rapid dye removal before equilibrium time can be explained by a large number of unoccupied surface-active sites were available for adsorption in the first stage, and after time-lapse, the residual unoccupied sites are difficult to be obtained because of the repulsive forces between dye molecules and adsorbent50,51,52.

Moreover, the rapid dye removal in the first stage is due to the presence of large binding sites53, and because of this abundance of available vacant active bio-sorbing sites, the bio-sorption capacity increases significantly, and afterward adsorption rate reduces due to the reduction in the number of active sites and the molecules of MB encounter greater resistance when going deep into the pores of the adsorbent54, this second stage was called slow sorption process55. Ghoniem, et al.56 found that it took 60 min for MB dye to reach equilibrium when adsorbed onto Pseudomonas alcaliphila NEWG-2. El-Kady, et al. 46 reported that it took 150 min for BR 46 dye to reach equilibrium when adsorbed onto the poly (AN-co-py)/ZrO2 composite material. Additionally, micro and Micron-sized porous particles-Cal have higher removal percentages than the micro and Micron-sized porous particles-Zygo, because the concentration of the bioactive secondary compounds (Tannins, Saponins, Flavonoids, and Alkaloids in C. procera are higher than Z. coccineum57. Wang, et al. 47 used tannins supported on cellulose microfibers as binding sites to combine MB through electrostatic attractions, which makes it with an excellent adsorption effect of TM microfibers.

Fig. 5
Fig. 5
Full size image

Effect of Contact Time (min) (A), Material Dosage(g) (B), pH (C), Initial MB Concentration (ppm) (D)on the MB removal percentage (%).

Effect of Bio-Sorbent Dosage

The used bio-sorbent particle dosage has a significant impact on the bio-sorption efficacy. The influence of adsorbent dose in the bio-sorption of MB was studied to find the most effective dose of adsorbent that achieves the maximum dye removal. The effect of the used bio-sorbent particle dosage on the MB removal percentage was investigated after 240 min for micro/Micron-sized porous particles-Zygo and micro-Cal, and for 180 min for Micron-sized porous particles-Cal, this is well illustrated in Fig. 5B. To estimate the effect of the bio-sorbent dose on the MB bio-sorption process, different weights of the used bio-sorbent particles (micro/Micron-sized porous particles-Zygo, micro/ Micron-sized porous particles-Cal) from the range of (0.05–0.5 g) at equilibrium were used. As illustrated in Fig. 5, the removal efficiencies of the MB dye increase with the increase in the used bio-sorbent material dosage, as the removal percentage increases from 87.52 to 92.41%, 89.72–96.33, 91.07–96.45, and 91.68–99.51% for the used bio-sorbent particles micro/Micron-sized porous particles-Zygo and micro/Micron-sized porous particles-Cal, respectively, when their weights increased from 0.05 to 0.5 g. The maximum removal percentage (99.56%) was recorded with 0.5 g of the used Micron-sized porous particles-Cal, followed by micro-Cal, then Micron-sized porous particles-Zygo, and finally micro-Zygo. This behavior is attributed to the increase of the active sites on the used bio-sorbent particles’ surface subjected to bio-sorption and subsequently increases their sorption capacity. Chemically, this phenomenon was related to an increase in the used bio-sorbent particle function groups (hemicellulose, cellulose, and lignin groups).

Moreover, the rate of MB removal was increased gradually as the mass of adsorbents got larger due to the increase in adsorbent pores and adsorption sites. When the mass of the adsorbent reached a specific level, the adsorption would tend to approach equilibrium. Then, at higher adsorbent dosages, there were insufficient MB dye molecules in the solution to bind to all accessible adsorption sites entirely, leading to a surface equilibrium condition and a decrease in the adsorption capacity per unit mass of adsorbent55. Another study also found the same trend58.

Effect of solution pH on MB bio-sorption

The influence of MB solution pH on its removal percentage was shown in Fig. 5C, which reveals that the MB dye removal percentage increases with increasing solution pH, as it increased from 50.58 to 70.70%, 63.69–85.06%, 48.99–77.59%, and from 59.32 to 96.72%, for micro/Micron-sized porous particles-Zygo, micro-Cal, and Micron-sized porous particles-Cal, respectively, when the dye solution pH was increased from 3 to 11. It was so obvious that both of the used Micron-sized porous particles-sorbents (Micron-sized porous particles-Zygo and Micron-sized porous particles-Cal) have the highest percentage of MB removal than the used micro-bio-sorbents, additionally, micro/Micron-sized porous particles-Cal has a higher removal percentage than micro/Micron-sized porous particles-Zygo, which might be because of the fact that In basic or alkaline solution the electrostatic interaction between the dye cations (positive charges) and the used bio-sorbent particles was increased due to the presence of excess OH however in acidic solution the presence of H+ may compete with the dye cations46.

At low pH values, adsorbents carry positive charges. Because of the electrostatic repulsion, it is difficult for the cationic MB dye to be adsorbed on the positively charged surface, which reduces the amount of removed MB dye59. While, with increasing pH value the concentration of hydroxide ions in the solution increased which made the dissociation degree of MB small, and as a result, the clearance rate of MB improved60. Moreover, the cationic nature of the used dye attributed to this behavior (increasing the dye removal percentage in the alkaline medium and decreasing it in the acidic medium) which has a naturalization trend in alkaline media better than acidic medium61.

Effect of initial MB concentration

The effect of the initial concentration of MB dye on its removal percentage was conducted in the range of 5, 10, 20, 50, and 100 ppm using 0.1 g of the used bio-sorbent particles for 240 min (micro/Micron-sized porous particles-Zygo, micro-Cal) and 180 min for the used Micron-sized porous particles-Cal as presented in Fig. 5D. It was clear from the figure that, the MB dye removal percentage is inversely proportional to its initial concentration, as it decreased from 86.580 to 51.825%, 97.773–56.543%, 94.288–56.747, and from 98.571 to 57.350% when the MB concentration increased from 5 to 100 ppm using the prepared bio-sorbent particles (micro/Micron-sized porous particles-Zygo, micro-Cal, and Micron-sized porous particles-Cal), respectively. The same trend of the used Micron-sized porous particles-sorbents (Micron-sized porous particles-Zygo and Micron-sized porous particles-Cal) having the highest percentage of MB removal than the used micro-bio-sorbents, and micro/Micron-sized porous particles-Cal had a higher removal percentage than the micro/Micron-sized porous particles-Zygo. This behavior could be explained by an increase in driving force due to the concentration gradient with increasing the initial dye concentration that overcomes the mass transfer resistance of MB molecules between the aqueous and solid phases62. The same trend was also observed by Patel, et al.63.

Adsorption Equilibrium

To study the equilibrium bio-sorption of MB dye onto the used bio-sorbent (micro/Micron-sized porous particles-Zygo and micro/Micron-sized porous particles-Cal), the effect of dye solution concentration was observed in a batch mode of operation at the adsorption equilibrium times of 240 and 180 min for micro/Micron-sized porous particles-Zygo, micro-Cal, and Micron-sized porous particles-Cal, respectively. The Langmuir, Freundlich, and Temkin isotherm models were fitted to the isotherm data from the current study. The Langmuir equilibrium model is valid for monolayer bio-sorption onto a homogeneous surface of the bio-sorbent. A plot of Ce/qe versus Ce should present a straight line with a slope of 1/qm and intercept 1/qmK. The obtained R2 values of the plots indicated its high values (micro-Zygo R2 = 0.984, Micron-sized porous particles-Zygo = 0.846, micro-Cal = 0.894, and Micron-sized porous particles-Cal = 0.963). The Langmuir parameters for MB bio-sorption, the Langmuir maximum adsorption capacity (qm), which assumes monolayer adsorption, and K, were calculated from the slope and intercept of Fig. 6, and they were (micro-Zygo qm = 24.770, Micron-sized porous particles-Zygo = 29.886, micro-Cal = 29.560, and Micron-sized porous particles-Cal = 31.326 mg/g). While K values were (micro-Zygo = 0.085, Micron-sized porous particles-Zygo = 0.094, micro-Cal = 0.110, and Micron-sized porous particles-Cal = 0.147 L/mg).

Fig. 6
Fig. 6
Full size image

Freundlich, Langmuir, Temkin, and Dubinin–Radushkevich (D-R) Adsorption Isotherm onto the used bio-sorbent (micro/Micron-sized porous particles-Zygo, micro/Micron-sized porous particles-Cal) particles.

The surface heterogeneity is related to the Freundlich constants. When ln qe is plotted against ln Ce, a straight line with a slope of 1/nf and intercept ln KF is obtained. KF is a measure of adsorption capacity, and n is a measure of adsorption efficiency. For the linearized plot of the equation. The linear plot’s slope and intercept yielded estimates for the Freundlich constants nf were (2.76, 2.88, and 2.58) and KF were (43.281, 53.948, and 55.508) for the used bio-sorbent (Micron-sized porous particles-Zygo, micro-Cal, and Micron-sized porous particles-Cal), respectively. The Temkin isotherm model’s energetic heterogeneity of the adsorption sites and physicosorption process (KT = 1.697, 7.0963, 4.501, and 0.058 kJ/ mol), and n (n = 4.460, 3.47, 4.079, and 4.460 kJ/ mol), for the used bio-sorbent (micro/Micron-sized porous particles-Zygo, micro/ Micron-sized porous particles-Cal) particles, respectively well, as indicated by the R2 value. According to R2 measurements, the fitness of each isotherm was assessed, and the Langmuir model had the highest R2 values for micro-Zygo (0.984) compared to Freundlich’s (0.963), and Temkin’s (0.872), while, it was fitted to Freundlich model for the other bio-sorbents (0.955, 0.936, and 0.984) compared to Langmuir’s (0.846, 0.894, and 0.963) and Temkin’s (0.832, 0.855, and 0.93) for the other used bio-sorbent (Micron-sized porous particles-Zygo, micro-Cal, and Micron-sized porous particles-Cal). Figure 6 demonstrates the plots from the three different used isotherm models.

The intercept and slope of the graphs were used to calculate the parameters of each model, which were then summarized in Table 2. According to the obtained results after the fitness of each of the three used isotherms, and the data was best described by the Langmuir model with high R2 values for micro-Zygo, it can therefore be said that the Langmuir isotherm model accurately depicted the homogeneous nature of the micro-Zygo bio-sorbent surface as well as the monolayer coverage of the MB molecule. Typically, the Langmuir isotherm presumption is that (i) adsorption could not advance outside of monolayer coverage, (ii) only one molecule of the adsorbate can fit in each of the equivalent surface sites, and (iii) the occupation of nearby sites does not affect MB molecules’ ability to adsorb at a specific location64.

Table 2 Langmuir, Temkin, and Freundlich parameters for MB adsorption onto the used bio-sorbent (micro/Micron-sized porous particles-Zygo, micro/ Micron-sized porous particles-Cal) particles at room temperature.

Due to the high correlation coefficient (R2) when compared to the other two isotherms, MB bio-sorption onto the used bio-sorbent (Micron-sized porous particles-Zygo, micro-Cal, and Micron-sized porous particles-Cal) fit well with the Freundlich isotherm model. This result shows that the system is heterogeneous, that the adsorption is reversible, and that the process is not just limited to the formation of monolayers65. According to the obtained Langmuir maximum adsorption capacity (qm), it reveals that the used Micron-sized porous particles-Cal has the highest adsorption capacity, followed by Micron-sized porous particles-Zygo, then Micro-Cal, and finally, micro-Zygo, which indicates that the used Micron-sized porous particles-particles were more efficient for MB bio-sorption than the used micro-scale particles. While, K, which represents bio-sorption energy also has the same behavior which confirms the high ability of the used micron-sized porous particles used with nanocrystalline domains-particles. On the other hand, the Temkin isotherm model considers how indirect adsorbate/adsorbate interactions affect the adsorption process. It also assumes that as surface area increases, the heat of adsorption (∆Hads) for all molecules in the layer decreases linearly66. Adsorbate-adsorbant interactions’ effects on the adsorption process are considered by the Temkin isotherm model (Table 2). Generally, the typical adsorption energies, [RT/b ln (KT)], in the range of 8–16 kJ mol[-1, are lined with chemisorption and b value higher than 80 kJ /mol. Since the R² values for both the Langmuir and Freundlich isotherm models were relatively close across all biosorbents, it was difficult to definitively conclude whether the adsorption process was dominated by monolayer or multilayer adsorption, or whether it was governed primarily by physisorption or chemisorption. To gain further insight into the nature of the adsorption mechanism, we applied the Dubinin–Radushkevich (D–R) isotherm model, which estimates the mean adsorption energy (E). Based on the D–R results, Micro-Zygo has the highest value of qm (7.12E-03 mol/g), indicating relatively high capacity under D–R assumptions., while the energy of biosorption (ε) were 7.65 kJ/mol for Micro-Zygo indicating borderline physisorption, while for Micron-sized porous particles-Zygo and Micron-sized porous particles-Cal were 13.8 and 14.1 kJ/mol, respectively indicating ion exchange or weak chemisorption. Finally, it was1.95 kJ/mol for Micro-Cal, indicating physisorption. The obtained results suggest that the biosorption process is not governed by a single mechanism but also a hybrid of monolayer and multilayer adsorption involving both physisorption and chemisorption, particularly in the case of the Micron-sized porous particles-based plant material biosorbents.

Kinetic models of MB bio-sorption process onto the used bio-sorbent particles

The four used models (pseudo-first order, pseudo-second order, Elovich, and intra-particle diffusion) are fitted to the experimental data in order to clarify the adsorption kinetics. Based on the linear regression correlation coefficient, 2, the best-fit model was selected. If the pseudo-first-order kinetics is fitted to the experimental data, a plot of ln (qe−qt) versus t should present a linear relationship as Fig. 7; Table 3 lists the values of k1 and R2 of the pseudo-first-order kinetic model based on the slope of the plot, R2 value of all the used micro and Micron-sized porous particles-particles were recorded (0.979 for micro-Zygo, 0.914 for Micron-sized porous particles-Zygo, 0.982 for micro-Cal, and 0.992 for Micron-sized porous particles-Cal).

Fig. 7
Fig. 7
Full size image

Adsorption Kinetics Models (pseudo-first-order, pseudo-second-order, Elovich, and Intraparticle diffusion) for MB adsorption onto the used bio-sorbent (micro/Micron-sized porous particles-Zygo, micro/Micron-sized porous particles-Cal) particles at room temperature.

Also, the estimated values of qe, calculated with the equation, differed from the experimental values, (experimental = 4.255 and calculated = 4.242 mg/g for micro-Zygo, Micron-sized porous particles-Zygo qexperimental= 4.719, qcalculated =2.340, micro-Cal qexperimental = 4.725, q calculated = 4.662, Micron-sized porous particles-Cal qexperimental = 4.506, qcalculated = 0.520). A plot of t/qt versus t should show a linear relationship if the pseudo-second-order kinetics are applicable to the experimental data. The slope and intercept of the plot of the pseudo-second-order can be used to calculate the values of qe and k, respectively. The values of R2 for the bio-sorption of MB dye onto the used bio-sorbent particles were higher than R2 of the first-order which were (0.981 for micro-Zygo, 0.999 for Micron-sized porous particles-Zygo, 0.990 for micro-Cal, and 0.999 for Micron-sized porous particles-Cal). For the simple Elovich kinetics to be applicable, a plot of qt versus ln t should show a linear relationship. Table 3 lists the estimated Elovich equation parameters based on the slope and intercept of the linearization of the basic Elovich equation.

Finally, the intraparticle diffusion model is our final model to consider for describing the kinetics of MB dye onto the used bio-sorbent particles. Figure 7 shows a plot of qt versus t1/2 for the bio-sorption of MB dye molecules onto the used bio-sorbent (micro/Micron-sized porous particles-Zygo, micro/Micron-sized porous particles-Cal) particles. Figure 7 demonstrates that not all the MB bio-sorption processes had straight lines pass through the origin, except micro-Zygo and micro-Cal’s lines. The values of the kid obtained from the slopes of the two straight lines are listed in Table 3.

The kinetics of MB dye bio-sorption onto the used bio-sorbent particles could be described well with the pseudo-second-order equation because the model fits the kinetic data very well and R2 has a very high value. Chemisorption involving valent forces may be the rate-limiting step in these adsorption processes, according to this evidence. In addition, a comparison between the calculated values of qe and those determined from the experimental data. This comparison was made at the intersection points of the pseudo-second-order reaction kinetic curve. The results showed that the estimated and true values were nearly equal.

Table 3 Different kinetic models parameters for bio-sorption of MB onto the used bio-sorbent (micro/Micron-sized porous particles-Zygo, micro/Micron-sized porous particles-Cal) particles at room temperature.

Moreover, one of the best models for describing the kinetics of chemisorption is the simple and direct Elovich model67. The value of ß represents the number of bio-sorption sites that are available for MB dye molecules for the bio-sorption process, whereas ὰ represents the amount of material adsorbed when ln t = 0, or when t = 1 h. Understanding the adsorption behavior of the first step is made much easier thanks to this value68. Additionally, the results determined that the Elovich equation had a strong R2 value fit to the experimental data. This implies that the chemisorption process, which involves valence forces through the sharing or exchange of electrons between the bio-sorbent and bio-sorbate, may be involved in the studied bio-sorption systems.

The bio-sorption of any metal ions or pollutants like dyes from an aqueous phase to a solid phase takes several steps. The first step is bulk diffusion which involves the movement of MB dye molecules from the aqueous phase to the surface of the solid phase. The second step includes the diffusion of dye molecules through the boundary layer to the surface of the solid particles, and the third and last stage is the pore diffusion or intraparticle diffusion which involves the transport of dye molecules from the solid particle surface to the interior pores. This process might be a rate-limiting step because its rate is so slow. According to Fig. 7 which showed that the straight lines did not pass through the origin, except for micro-Zygo and micro-Cal’s lines, might result from the variation in mass transfer rates between the first and last stages of the bio-sorption process for the used Micron-sized porous particles-scale particles (Micron-sized porous particles-Zygo and Micron-sized porous particles-Cal), while the mass transfer rates between the same stages was stable in case of the micro-scale particles (micro-Zygo and micro-Cal). Additionally, the departure of the lines from the origin shows that pore diffusion is not the only rate-controlling step in the bio-sorption process for Micron-sized porous particles-Zygo and Micron-sized porous particles-Cal, and vice versa for micro-Zygo and micro-Cal69.

The comparison of MB biosorption of the present study with other previously reported studies is shown in Table 4. The micro and Micron-sized porous particles biosorbent materials in the present study are quite comparable to that for fungal biomass70, while it is higher than sugarcane bagasse71, the aquatic plant Lemna minor72, coconut dregs73, Triticum aestivum74, and other synthetic materials75.

Table 4 Comparison of the bio-sorption capacity of the bio-sorbent used in the present study to remove MB dye with those of previous studies.

eXtreme gradient boosting (XGBoost)

The applicability of the XGBoost model in predicting the removal percentages of Micro Zygo, Micron-sized porous particles-Zygo, Micro-Cal, and Micron-sized porous particles-Cal prepared particles was evaluated under diverse experimental conditions,, including contact time (min), the used bio-sorbent dosage (g), Initial MB dye concentration (ppm), and solution pH. In order to assess the model’s accuracy, key statistical metrics such as Mean Squared Error (MSE), Mean Absolute Error (MAE), and Root Mean Squared Error (RMSE) were analyzed in Table 5.

Table 5 The evaluation metrics for predicting (R%) of the used bio-sorbents across varying time intervals.

The evaluation metrics for predicting the removal percentages of four types—Micro Zygo, Micron-sized porous particles-Zygo, Micro-Cal, and Micron-sized porous particles-Cal— Across varying time intervals (5 to 300 min), indicate promising results with relatively low error values across different metrics. The Mean Squared Error (MSE) values for Micro Zygo, Micron-sized porous particles-Zygo, Micro-Cal, and Micron-sized porous particles-Cal are 0.0074, 0.1407, 0.0088, and 0.0027, respectively. These low MSE values signify a strong agreement between the predicted and actual removal percentages, particularly for Micron-sized porous particles-Cal and Micro Zygo.

The Mean Absolute Error (MAE) values further support this accuracy, with Micron-sized porous particles-Cal recording the lowest MAE at 0.0513, indicating highly precise predictions. Micron-sized porous particles-Zygo shows a slightly higher MAE at 0.2709, suggesting more variation between predicted and actual values for this removal type. Similarly, the Root Mean Squared Error (RMSE) values indicate minimal deviations, with Micron-sized porous particles-Cal again being the most accurate at 0.0515, followed by Micro Zygo at 0.0858.

Fig. 8
Fig. 8
Full size image

The actual and predicted values of of the used bio-sorbents (R%) over time.

Figure 8 illustrates the (R%) of the four used bio-sorbents (Micron-sized porous particles-Zygo, Micron-sized porous particles-Cal, Micro Zygo, and Micro-Cal ) over a 300-minute period. The (R%) of Micron-sized porous particles-Zygo, Cal, Micron-sized porous particles-Cal, and Micro Zygo particles over time were evaluated using both actual experimental data and predictions generated by the XGBoost model. The comparison between actual and predicted values, as illustrated in the plot, demonstrates that the XGBoost model effectively captures the overall trends of (R%) over time, with strong alignment observed for most removal types. Specifically, for Micron-sized porous particles-Zygo and Micron-sized porous particles-Cal removal, the predicted values closely follow the actual data, indicating high model accuracy. While minor deviations were observed, particularly at the initial time points (0–20 min) and near the plateau regions (beyond 250 min), the model’s performance remains robust, especially during the mid-range periods (50–150 min). These results validate the utility of XGBoost as a predictive tool for modeling removal dynamics, enabling accurate estimations of removal percentages over time. The model’s strength lies in its ability to integrate complex nonlinear relationships between time and removal rates, providing insights into the system’s behavior without requiring extensive experimental trials. By accurately predicting removal rates, the XGBoost model facilitates a deeper understanding of the temporal evolution of removal processes and highlights the efficiency of the system in achieving target removal percentages.

Table 6 Evaluation metrics for predicting (R%) of the used bio-sorbents using different doses of them.

The evaluation metrics for predicting the (R%) of Micro Zygo, Micron-sized porous particles-Zygo, Micro-Cal, and Micron-sized porous particles-Cal dosages of 0.05, 0.1, 0.2, and 0.5 g demonstrate the model’s performance. The Mean Squared Error (MSE) values are 0.088, 0.040, 0.124, and 0.06, respectively, indicating a good fit between the predicted and actual values, particularly for Micron-sized porous particles-Zygo. The Mean Absolute Error (MAE) values further confirm this accuracy, with Micron-sized porous particles-Zygo recording the lowest at 0.20, followed by Micron-sized porous particles-Cal at 0.24. The Root Mean Squared Error (RMSE) values show minimal deviations, with Micron-sized porous particles-Zygo and Micron-sized porous particles-Cal exhibiting the most accurate predictions at 0.20 and 0.24, respectively. These metrics suggest reliable prediction performance across varying adsorbent dosages Table 6.

Fig. 9
Fig. 9
Full size image

The actual and predicted values of of the used bio-sorbents (R%) using different doses of them.

Figure 9 illustrates the relationship between the used bio-sorbents dosage (g) and the (R%) of Micron-sized porous particles-Zygo, Cal, Micron-sized porous particles-Cal, and Micro Zygo, comparing actual experimental data with predictions generated by the XGBoost model. The results show that (R%) consistently increase with increasing dose, highlighting that the material dosage as a critical factor influencing removal efficiency. Micron-sized porous particles-Cal and Cal removal exhibit steeper trends, indicating higher sensitivity to dose changes, while Micron-sized porous particles-Zygo and Micro Zygo show more gradual increases. The XGBoost model demonstrates strong predictive accuracy, as evidenced by the close alignment between predicted and actual values, particularly for Micron-sized porous particles-Cal and Cal removal, where the overlap is nearly perfect. However, minor deviations are observed for Micro Zygo and Micron-sized porous particles-Zygo at lower weights (e.g., around 0.1), where the model slightly underestimates the actual data. These findings validate the model’s ability to capture the nonlinear relationship between the used bio-sorbents dosage (g) and the (R%), providing a powerful tool for predicting system behavior. The XGBoost model’s predictive capability not only complements experimental data but also enables process optimization by identifying optimal material dose conditions, reducing the need for extensive experimental trials, and offering insights into enhancing removal efficiency across varying conditions.

Table 7 Evaluation metrics for predicting (R%) of the used bio-sorbents at different MB dye concentrations (mg/l).

Table 7 illustrates the predicting the removal percentages of Micro Zygo, Micron-sized porous particles-Zygo, Micro-Cal, and Micron-sized porous particles-Cal at different MB dye concentrations (mg/l) demonstrate high prediction accuracy with minimal errors. The Mean Squared Error (MSE) values are 0.0010, 0.0061, 0.0075, and 0.0407, respectively, indicating a strong agreement between the predicted and actual removal percentages, particularly for Micro Zygo. The Mean Absolute Error (MAE) values show Micron-sized porous particles-Cal having the highest variation at 0.2018, while Micro Zygo records the lowest at 0.0311. The Root Mean Squared Error (RMSE) values further confirm this pattern, with Micro Zygo at 0.03117 and Micron-sized porous particles-Cal at 0.2017. These results highlight reliable and accurate predictions for removal efficiency across varying MB dye concentrations.

Fig. 10
Fig. 10
Full size image

The actual and predicted values of the used bio-sorbents (R%) at different initial MB dye concentration (mg/l).

Figure 10 presents the relationship between initial MB dye concentration and the (R%) of Micron-sized porous particles-Zygo, Micro-Cal, Micron-sized porous particles-Cal, and Micro Zygo particles, comparing actual experimental data (solid lines) with predictions (dashed lines) generated by the XGBoost model. The (R%) generally decrease as dye concentration increases, indicating an inverse relationship between dye concentration and removal efficiency. Micron-sized porous particles-Cal particles removal shows a more gradual decline, maintaining higher (R%) across increasing dye concentrations, whereas Micron-sized porous particles-Zygo and Micro Zygo (R%) exhibit sharper reductions, especially at higher dye concentrations. The XGBoost model demonstrates strong predictive performance, as evidenced by the close alignment of predicted values with actual data points. For Micron-sized porous particles-Cal removal, the predicted values almost perfectly match the actual data, while minor deviations are observed in the predictions for Micron-sized porous particles-Zygo and Micro Zygo removal, particularly at intermediate dye concentrations. These findings validate the model’s ability to capture complex, nonlinear trends between dye concentration and removal efficiency.

The observed trend of decreasing removal rates with increasing dye concentration is likely attributed to factors such as competition for adsorption sites and saturation of removal capacity, the same findings were observed in the batch experiments.

Table 8 Evaluation metrics for predicting (R%) of the used bio-sorbents at different MB dye concentrations (mg/l).

Table 8 illustrate predicting the removal percentages of Micro Zygo, Micron-sized porous particles-Zygo, Micro-Cal, and Micron-sized porous particles-Cal particles at different pH levels (3, 5, 7, 9, and 11) reveal promising results with minimal errors. The Mean Squared Error (MSE) values are 0.0095, 0.0058, 0.0005, and 0.0006, respectively, indicating a strong fit between the predicted and actual removal percentages, especially for Micro-Cal and Micron-sized porous particles-Cal, which have very low MSE values. The Mean Absolute Error (MAE) values further reflect this trend, with Micro-Cal showing the least deviation at 0.0233, followed by Micron-sized porous particles-Cal at 0.0244, while Micro Zygo has the highest MAE at 0.0976. The Root Mean Squared Error (RMSE) values mirror the MAE, with Micro-Cal and Micron-sized porous particles-Cal again exhibiting the lowest errors at 0.02334 and 0.024372, respectively. These metrics suggest that the model predicts the removal efficiency accurately across different pH levels, with particularly high accuracy for Micro-Cal and Micron-sized porous particles-Cal.

Figure 11 illustrates the (R%) of the used bio-sorbents Micro Zygo, Micron-sized porous particles-Zygo, Micro-Cal, and Micron-sized porous particles-Cal particles as a function of pH. The figure compares the actual removal rates (solid lines) with those predicted by an XGBoost model (dashed lines). The (R%) generally increase with rising pH, reflecting enhanced removal efficiencies under more alkaline conditions. Micron-sized porous particles-Cal particles removal shows the steepest increase, reaching the highest (R%) across the pH range, while Micron-sized porous particles-Zygo and Micro Zygo (R%) exhibit a more moderate increase. The XGBoost model demonstrates strong predictive performance, as evidenced by the close agreement between predicted and actual values for all removal types. This alignment is particularly notable for Micron-sized porous particles-Cal and Cal removal, where predictions nearly overlap with the actual data, validating the model’s accuracy. Minor discrepancies are observed for Micro Zygo and Micron-sized porous particles-Zygo removal at intermediate pH levels, suggesting slight limitations in capturing localized variations. These results highlight the model’s ability to accurately capture nonlinear relationships between pH and removal efficiency. By accurately predicting (R%), the XGBoost model facilitates an enhanced understanding of system performance under varying dye concentrations, Contact time, bio-sorbent dosage, and pH offering valuable insights for optimizing operational parameters and reducing experimental effort in the development of efficient removal systems, reducing time, and resource consumption in future applications.

Fig. 11
Fig. 11
Full size image

The actual and predicted values of the used bio-sorbents (R%) at different pH.

Mechanism of interaction

The MB adsorption onto the used bio-sorbents is influenced by many factors, including the functional groups’ characteristics of the dye, the textural and surface properties of the used bio-sorbents, the diffusion behavior of the MB molecules, and the mode of interaction between MB and the used bio-sorbents75. The bio-sorption process can occur through chemisorption, physisorption, or their combination, based on the interaction nature Fig. 12. The bio-sorption process of MB onto the used bio-sorbents is accomplished through π–π interaction, electrostatic attraction, and hydrogen bonding. The positively charged MB dye molecules can interact with the negatively charged phenolic and O–H groups of polyphenols in the used bio-sorbents. The bio-sorbents contain negatively charged functional groups (e.g., carboxyl and hydroxyl groups) that facilitate electrostatic attraction, enhancing dye biosorption, and this mechanism plays a significant role in acidic to neutral pH conditions, where surface charges promote attraction. The interaction between MB and the used bio-sorbents may be due to hydrogen bonding, π–π interactions, or a combination of both78. MB molecules contain hydrogen bond donor and acceptor sites, allowing interactions with bio-sorbent functional groups such as hydroxyl (-OH) and carbonyl (C = O) groups Fig. 12. These hydrogen bonds stabilize the dye adsorption, particularly in micro- and Micron-sized porous particles-structured bio-sorbents with abundant oxygen-containing groups. In addition to π–π interaction occurs between the aromatic rings in MB and conjugated π-electron systems of the bio-sorbent surface which contain lignin, flavonoids, and phenolic compounds, which provide π-electron density and enhance adsorption through this interaction.

Moreover, The functional groups found in plants, such as tannins, saponins, flavonoids, alkaloids, and phenols, play a significant role in the adsorption of dyes from wastewater. These compounds contribute to the plants’ ability to bind and remove toxic substances, including dyes, through various mechanisms.

  • Tannins: These polyphenolic compounds are effective biosorbents due to their high hydroxyl group content, which facilitates the chelation of dyes, enhancing adsorption efficiency81. So, it can interact with dye molecules through electrostatic interactions.

  • Saponins: Present in various plant extracts, saponins exhibit surfactant properties that can disrupt dye molecules, aiding in their removal from aqueous solutions82.

  • Flavonoids: Known for their antioxidant properties, flavonoids also contribute to dye adsorption through their ability to form complexes with dye molecules83.

  • Alkaloids and Phenols: These compounds enhance the overall adsorption capacity of plant materials by interacting with dye molecules, thus facilitating their removal from contaminated water84. They can interact with dye molecules through hydrogen bonding.

According to our investigation, The estimated value of bioactive organic secondary compounds (tannins, saponins, flavonoids, alkaloids, and phenols) in Calotropis procera were (15.49, 23.5, 13.71, 24.61 and 21.08 mg/g dry weight), respectively. While they were, (8.23, 13.33, 8.83, 7.31 and 17.96 mg/g dry weight) in Zygophyllum coccinum.

Fig. 12
Fig. 12
Full size image

Bio-sorption mechanism of methylene blue dye onto used bio-sorbent (Micro, Micron-sized porous particles-Zygo, Micro, and Micron-sized porous particles-Cal) particles.

FTIR spectroscopy was used to analyze the bio-sorbent particles before and after MB bio-sorption. The results showed that the peaks at 1736, 1728, 1736, and 1724 cm[-1 in the used (Micron-sized porous particles-Cal, micro-Cal, Micron-sized porous particles-Zygo, and micro-Zygo) before MB bio-sorption shifted to1733, 1652, 1735, and 1640 cm[-1 in the same samples loaded with MB molecules. This shift is due to the involvement of carboxylic groups in the adsorption process. Carboxylic groups are negatively charged, and MB is positively charged. This charge difference is responsible for the electrostatic force of attraction between the two molecules. Moreover, according to the SEM image, The presence of aggregated MB particles in (f) and (h) suggests that both physical adsorption (van der Waals forces) and chemical interactions (hydrogen bonding, electrostatic forces) contribute to MB uptake. Moreover, Micron-sized porous particles-sized bio-sorbents (Micron-sized porous particles-Zygophyllum and Micron-sized porous particles-Calotropis) exhibit higher surface area, more active sites, and enhanced porosity, leading to greater adsorption capacity than micro-sized counterparts.

Materials and methods

Bio-sorbent particles preparation

The shoot systems of Z. coccineum and C. procera plants were collected from Wadi Araba, the Eastern Desert, Egypt, which is an arid valley extending from the east at Za’farana on the Red Sea to the west up to the Nile Valley, north of Beni Souef (lies between Lat. 28° 28–29° 19 N and Long 31° 50 − 32° 38 E). The plant was identified by Dr. Yasser El-Amier ( an author), PhD of plant taxonomy, Faculty of Science, Mansoura University. The plant specimens were identified according to the flora books of Egypt. A representative herbarium specimen with no. Mans.0010420003 for Z. coccineum and Mans.0010116003 for C. procera were deposited in the Herbarium of College of Science, Mansoura University, Egypt.

The selection of Z. coccineum and C. procera for preparing the biosorbent in the research was based on several key factors:

  1. 1.

    Abundance and Availability: Both plants are widely available in (Wadi Araba) (the study area where plant samples collected from) is one of the largest drainage systems of the Eastern Desert in Egypt, which stretches eastward from the Nile Valley to the Gulf of Suez and the Red Sea, making them accessible and cost-effective for large-scale applications.

  2. 2.

    Phytoremediation Potential: These plants have shown significant potential in phytoremediation, meaning they can absorb and accumulate pollutants from the environment. This makes them suitable candidates for removing dyes like methylene blue from wastewater. Calotropis procera has demonstrated significant bioaccumulation of heavy metals like chromium, nickel, and lead, with a bioconcentration factor indicating its efficiency in metal uptake85. Native Availability: These plants are native to regions with contaminated soils, ensuring their availability for large-scale applications86.

  3. 3.

    Eco-Friendly Properties: Utilizing naturally occurring plants aligns with sustainable and eco-friendly practices, reducing the environmental impact compared to synthetic materials.

The shoot systems of both plants were rinsed with tap water and then with distilled water multiple times to eliminate all contaminants and dust from their surfaces. Subsequently, they were air-dried at room temperature for two weeks. A portion of the dried samples was crushed with a mortar to get a micro-scale particle from the used bio-sorbents particles, which were sieved with a 1700 μm sieve, and they were named (Micro-Zygo and Micro-Cal).

For the reduction of micro-particles to Micron-sized porous particles-particles, the other part of the dried samples was first ground in a mixer grinder, then the obtained fine particles were milled for 6 h in a high-energy planetary ball mill (rpm100; retsch, Germany) using a 2 mm diameter ball to reduce microparticles to Micron-sized porous particles. After that, the prepared bio-sorbents were stored in airtight plastic containers to avoid humidity, and they were named and coded with (Micron-sized porous particles-Zygo and Micron-sized porous particles-Cal).

Dye solution preparation

In this study, the contaminant used was MB dye (Sigma Aldrich: purity ≥ 82%), which is a cationic dye with a maximum absorbance peak at 664 nm. The chemical formula of MB is C16H18ClN3S, and its chemical structure is shown in Table 9. A stock solution of MB dye was prepared by adding 0.1 g of MB dye in 1000 ml distilled water to obtain a concentration of 100 ppm. The experimental solutions were prepared by diluting the stock solution to the required concentration with distilled water.

Table 9 Properties of the chemicals used throughout the study.

Characterization of the used bio-sorbent particles

The morphological structures in addition to chemical compositions of the bio-sorbent particles used in the study were examined using scanning electron microscopy (SEM), model JEOL JSM-6010LV, Japan, to determine their characteristics. The used bio-sorbent particles were covered with a fine gold layer before being subjected to SEM analysis to improve their conductivity and reduce charging effects in addition to Fourier Transform Infrared Spectroscopy (Termo-Scientifc Nicolet, USA). Pellets were made by mixing samples with KBr and compressing them into disks so that they could be analyzed in the FTIR instrument. The FTIR spectra of the bio-sorbent particles were measured using an FTIR spectrometer (FTIR-8400 S, Shimadzu, Kyoto, Japan) in the wavenumber range of 400–4000 cm⁻¹ with 32 scans per sample and a resolution of 8.000 from 400.1737 to 3999.8091. The X-ray spectra of the bio-sorbent particles were obtained using Shimadzu XRD-6100 with Cu–Kα radiation at λ = 1.54 Å to study the crystallinity of the particles. The thermal stability of the bio-sorbent particles was examined using TGA (TGA; Shimadzu TGA-50, Japan, SII 6300, Exstar) under N2 with a heating rate of 10 °C/min up to 1000 °C, and the weight loss of the material was recorded. The Brunauer-Emmett-Teller (Beckman Coulter SA3100, Brea, CA, USA) was used to detect the pore size and surface area of the bio-sorbent particles.

Batch experiments

Exploring the Effectiveness of the prepared bio-sorbents for MB removal in water was performed and repeated three times to obtain accurate evidence via a batch adsorption technique. The batch adsorption technique was used to evaluate the removal of MB from a synthetic wastewater sample.

At room temperature, Biosorption was investigated experimentally by putting 0.1 g of the used bio-sorbents particles (micro, Micron-sized porous particles-Zygo), and (micro, Micron-sized porous particles-Cal) and 50 ml aliquots of 10 ppm dye solution were added to 250 ml conical flasks. The conicals were shaken under a Fixed agitation speed of 200 rpm for a specific time with different intervals. Following the agitation period, At regular intervals, 5 ml samples were drawn from the flasks and centrifuged at 10,000 rpm for 10 min. A photoelectric colorimeter(AP-101) APEL, Jaban (light source High-brightness LEDs, Transmittance/0 ~ 110%T%, Absorbance/0 ~ 1.999ABS, wavelength: 254 nm–185 nm, temperature control: 10 °C to 40 °C), then measured the absorbance of the remaining dye solution at 664 nm, allowing for the colorimetric determination of the residual dye concentration. For the batch experiments, the contact time was 5–300 min, the initial concentration of the MB was 5- 100 mg/L, the used bio-sorbent particles dosage was 0.05–0.5 g, and the solution pH was optimized at 3–11. The amount of dye biosorption at equilibrium (qe) (mg/g) was calculated from the following equation:

$${q}_{e}=\frac{({\text{C}}_{0}-{\text{C}}_{e})\text{V}}{\text{W}}$$

Where C0 (mg/L) is the MB initial concentration, Ce (mg/L) is the dye concentration at equilibrium, V (L) is the used volume of MB solution, and W (g) is the used bio-sorbent particle mass. While dye removal percentage can be calculated as follows:

$$\text{\%}ofdyeremoval=\frac{{C}_{0}-{C}_{e}}{{C}_{0}}\times100$$

Where C0 is the MB initial concentration and Ce (mg/L) is the equilibrium concentration of MB dye in solution. Investigating the Optimal Conditions for Methylene Blue Bio-sorption by focusing on Processing Parameters such as initial dye concentration, contact time, solution pH, and the used bio-sorbed material dosage.

Bio-sorption isotherms

Understanding the interaction between the liquid and solid phases at equilibrium is crucial for analyzing the adsorption process87. To delve into the reaction mechanism and bio-sorption behavior of Methylene Blue (MB) onto different bio-sorbent particles (Micro, Micron-sized porous particles-Zygo, Micro-Cal, and Micron-sized porous particles-Cal), an equilibrium study was conducted. This involved shaking varying initial dye concentrations (5-100 ppm) with 0.1 g of each bio-sorbent for specific durations: 240 min for Micro, Micron-sized porous particles-Zygo, and Micro-Cal, and 180 min for Micron-sized porous particles-Cal. The resulting data was then fitted to Langmuir, Freundlich, and Temkin models, with the results summarized in Table 10. This analysis provides valuable insights into the underlying mechanisms of MB adsorption onto these bio-sorbent materials.

Table 10 Langmuir, Freundlich, and Temkin models’ equations for bio-sorption of the used bio-sorbent (Micro, Micron-sized porous particles-Zygo, Micro, and Micron-sized porous particles-Cal) particles.

Kinetic study

Bio-sorption kinetics is an essential factor to investigate the effectiveness of the bio-sorbent particles used. Additionally, it might make the bio-sorption mechanism easier to explain. Four widely used kinetic models were used in our study, including the pseudo-first-order, and pseudo-second-order models that were suggested by Ho and McKay88, Elovich, and Intra-particle diffusion kinetics models.

The kinetic study was performed by shaking 50 mL MB dyes (10 ppm) with 0.1 g of the used bio-sorbent (Micro, Micron-sized porous particles-Zygo, Micro, and Micron-sized porous particles-Cal) particles for different time intervals (5–300 min). The concentration of remaining dye in the solution was determined after each time interval, and the amount of dye bio-sorbed at each time interval (qt, mg/g) was plotted against time (t, min) for kinetic modeling. Table 11 shows the equations and parameters of the bio-sorption kinetic models that were used.

Table 11 Different adsorption kinetics models’ equations for bio-sorption of MB onto the used bio-sorbent (Micro, Micron-sized porous particles-Zygo, Micro, and Micron-sized porous particles-Cal) particles at room temperature.

Applicability of eXtreme gradient boosting (XGBoost)

Friedman89 proposed Extreme Gradient Boosting (XGBoost), a powerful, scalable, and supervised version of the Gradient Boosting (GB) approach. XGBoost attempts to reduce the loss function by iteratively adding weak learners (decision trees) to enhance overall model accuracy. The model optimizes the regularized objective function as illustrated in Eqs. (1) and (2) 90.

$$\begin{array}{c}min\\\theta\end{array}\sum_{i=1}^{n}l({a}_{i},{\widehat{a}}_{i})+\sum_{k=1}^{k}{\Omega}\left({f}_{k}\right)$$
(1)
$${\Omega}\left({f}_{k}\right)=\gamma{T}_{k}+\frac{1}{2}{\uplambda}{{w}_{k}}^{2}$$
(2)

Where, \(l({a}_{i},{\widehat{a}}_{i})\) is the loss function measuring the difference between the true value \({a}_{i}\)​ and the predicted value \({\widehat{a}}_{i}\)​.

\({\Omega}\left({f}_{k}\right)\) is the regularization term controlling model complexity, where γ penalizes the number of leaves \({T}_{k}\) in a tree, and λ controls the magnitude of leaf weights \({w}_{k}\)​. \(k\) is the number of trees.

XGBoost applies a second-order Taylor expansion of the loss function to better capture complex relationships and update tree splits. The gradient and Hessian are computed as illustrated in Eq. (3).

$$g_{i} =\frac{\partial{l} \left(a_{i},{\widehat{a}}_{i}\right)}{\partial{\widehat{a}}_{i}} \quad and \quad h_{i} =\frac{{\partial}^{2}l\left({a}_{i},{\widehat{a}}_{i}\right)}{\partial{{\widehat{a}}_{i}}^{2}}$$
(3)

These gradients direct the optimization process, increasing accuracy while decreasing overfitting via regularization. XGBoost’s resilience and efficiency make it a dominating model in prediction of all three types of removal.

Conclusions

This study demonstrated the efficacy of Micron-sized porous particles-sized Zygophyllum coccineum (Micron-sized porous particles-Zygo) and Calotropis procera (Micron-sized porous particles-Cal) biosorbents in the removal of methylene blue (MB) dye from synthetic wastewater. Adsorption performance improved with increased contact time and biosorbent dosage, with the highest removal efficiency observed for Micron-sized porous particles-Cal under the conditions of 180 min, 100 ppm initial dye concentration, and 0.5 g/L biosorbent dosage.

Characterization results further support these findings. FTIR analysis confirmed the presence of key functional groups (–OH, C–H, C = O, and C–O) on the biosorbents’ surfaces, which are responsible for dye binding. Notably, shifts in peak positions and intensities after MB adsorption indicate successful interaction between the dye molecules and biosorbent functional groups. XRD patterns revealed broad (002) diffraction peaks in all samples, characteristic of amorphous cellulose structures. A slight reduction in 2θ values after Micron-sized porous particles sizing suggests increased interlayer spacing, possibly enhancing dye accessibility and surface reactivity. SEM images revealed notable morphological differences between micro- and Micron-sized porous particles-sized materials: micro-scale particles displayed irregular, compact surfaces, while Micron-sized porous particles-particles exhibited rougher, porous textures with significantly more surface exposure—particularly in Micron-sized porous particles-Cal—supporting their superior adsorption performance.

Isotherm modeling indicated that MB adsorption onto Micron-sized porous particles-Zygo was best described by the Langmuir model, while the Freundlich model provided a superior fit for Micron-sized porous particles-Cal. Kinetic data conformed to a pseudo-second-order model, suggesting that chemisorption governs the adsorption mechanism. Notably, Micron-sized porous particles-scale biosorbents exhibited enhanced surface area, greater adsorption capacity, and faster kinetics compared to their micro-scale counterparts.

In addition, the application of the XGBoost machine learning model effectively predicted removal efficiencies for all biosorbent types under varying experimental conditions, including time, pH, dye concentration, and biosorbent dosage. The model demonstrated high predictive accuracy, particularly for Micron-sized porous particles-Cal and micro-Zygo, as evidenced by low values of Mean Squared Error (MSE), Mean Absolute Error (MAE), and Root Mean Squared Error (RMSE). The modeling results confirmed established experimental trends, such as improved removal efficiency with increasing adsorbent dosage and a decline in performance at higher dye concentrations. Alkaline pH conditions were found to favor dye removal.

Collectively, these findings underscore the potential of Z. coccineum and C. procera as sustainable, low-cost, and environmentally benign biosorbents for wastewater treatment applications. The integration of advanced predictive modeling further enhances process understanding and optimization, reducing the need for extensive empirical trials.

Future research should aim to optimize these biosorbents for real-world, large-scale applications, and assess their potential for conversion into activated carbon or biochar. Investigations into various activation techniques, including physical and chemical modifications, may further enhance their adsorption performance and broaden their applicability in water purification technologies. This study aligns with the United Nations Sustainable Development Goals, particularly SDG 6: Clean Water and Sanitation and SDG 12: Responsible Consumption and Production. By utilizing underexploited wild plant species as low-cost, biodegradable biosorbents, we contribute to sustainable water purification strategies that minimize reliance on synthetic chemicals and high-energy inputs. Additionally, the repurpose of natural waste materials supports a circular economy approach, promoting resource efficiency and environmental responsibility. These contributions highlight the potential of our work to advance scalable, eco-friendly solutions in the context of global sustainability efforts.