Introduction

The discharge of synthetic dyes into natural water bodies, stemming from their extensive use across various industrial sectors such as textiles, leather, printing, food, cosmetics, and paint, poses significant environmental challenges on human health and underscores the pressing need for effective wastewater treatment strategies1. These dyes, characterized by complex molecular structures and persistent properties, present considerable hurdles to conventional treatment methods2, like biological treatment3, electrochemical oxidation4, and coagulation5. In response, the scientific community has increasingly turned its attention to alternative approaches, with adsorption emerging as a promising and environmentally conscientious method6. This method stands out as particularly effective in the removal of dyes due to its straightforward design, lack of toxic byproducts, affordability, and notable efficacy7,8,9. This study investigates the adsorption behavior of thionine dye (TH), a cationic dye commonly utilized in the textile industry10. As a member of the thiazine dye group, TH is distinguished by its vibrant violet hue and notable affinity to diverse surfaces11. The concentration of thionine dye in industrial wastewaters can vary significantly depending on the specific source and location of the effluent. Studies have reported that dye concentrations in wastewater can range from a few milligrams per liter (mg/L) to several hundred mg/L, depending on factors such as the type of industry, the dyeing process used, and the effectiveness of pre-treatment methods. Herein, we explore the adsorption dynamics of TH dye using an advanced composite material composed of chitosan, clay, cross-linked benzoin, and magnetic iron.

Chitosan (CS) is a positively charged polysaccharide consisting of D-glucosamine units12. It is obtained through the deacetylation process of chitin, which is the second most prevalent biopolymer in nature following cellulose13,14.CS exhibits several notable characteristics including biocompatibility, non-toxicity, biodegradability, biocompatibility, and antimicrobial properties15. The capacity of CS to adsorb substances can be explained by the existence of active functional groups such as amino (–NH2) and hydroxyl (–OH) within its molecular framework. These chemical entities enable CS to effectively attract and bind with other molecules or ions, thereby facilitating various adsorption processes8,16. However, the application of naturally derived chitosan in technologies for treating wastewater is limited because it faces obstacles such as its tendency to swell greatly, solubility in different organic acids, limited surface area, and substantial leaching17,18. The inclusion of clay in the composite offers additional benefits, including enhanced structural integrity and increased surface roughness, both crucial for effective dye adsorption19,20,21. The synergistic interaction between chitosan and clay forms the basis for an adsorbent material with superior performance22,23,24,25,26,27,28.

The incorporation of cross-linked benzoin, with its carbonyl-rich structure, serves as a crucial reinforcement, imparting mechanical strength and introducing essential functional groups for effective participation in adsorption processes29,30,31. This strategic choice aligns with the principles of Schiff base chemistry, promoting the formation of Schiff bases through condensation between amino groups and carbonyl groups32. These Schiff bases play a dual role in enhancing efficiency and selectivity while contributing to the structural integrity of the composite material33. Catalyzing Schiff base formation by cross-linked benzoin represents the cornerstone of the extraordinary adsorption capabilities of our composite materials. Realizing the profound importance of fundamental Schiff chemistry is integral and motivates us to outperform conventional adsorption for unparalleled specificity and efficiency in thionine dye removal from aqueous environments33. The catalysis of Schiff base formation by cross-linked benzoin represents a fundamental aspect of the extraordinary adsorption capabilities of our composite materials34.

The magnetization of the composite with Fe₃O₄ introduces an innovative dimension to the adsorption process35. Unlike conventional approaches focused solely on recovery, the magnetic responsiveness of Fe₃O₄ is strategically utilized to optimize adsorption conditions36. The presence of Fe₃O₄ is anticipated to enhance the mass transfer rate and distribution of the composite within the dye-containing solution, thereby potentially improving the overall efficiency of TH dye removal. Additionally, the application of external magnetic fields enables efficient separation and regeneration of the adsorbent, offering practical advantages for large-scale wastewater treatment processes37. In contemporary research, there has been significant attention towards the synthesis and application of magnetic CS–Fe3O4composites, which have emerged as promising materials for adsorption processes. These composites have found extensive utilization in the eliminating of various contaminants such as pharmaceuticals, dyes, and metal ions. This indicates their potential effectiveness in addressing environmental and industrial pollution challenges through efficient adsorption techniques8,38,39.

Notably, the formulation of the compound was guided by Expert Design software utilizing the Box-Behnken Design (BBD) model. Expert Design plays a pivotal role in guiding the evolution and refinement of experimental designs across various scientific disciplines40. Its notable advantage lies in facilitating statistical experimental designs, thereby providing a structured approach to explore the impact of key parameters on composite performance41,42. This systematic framework enabled us to methodically modulate the levels of independent variables (factors) and assess their influence on the response variable (TH dye adsorption). Such an approach facilitated a comprehensive analysis of experimental data, empowering informed decision-making and enabling the optimization of experimental conditions to achieve desired outcomes.

This paper introduces a multifaceted composite material, CS-CY/Benz/Fe3O4, designed for the adsorption of TH. Through the combination of chitosan, clay, cross-linked benzoin, and magnetized Fe3O4, guided by the Expert Design program BBD model, we aim to create a robust adsorbent with synergistic properties. This study seeks to contribute valuable insights to the field of environmental remediation and wastewater treatment, particularly in optimizing adsorption conditions for enhanced efficacy. The optimization of critical factors influencing TH dye adsorption, including adsorbent dosage, pH of the solution, temperature, and duration, was conducted using Box-Behnken design within the framework of RSM. Additionally, alternative forms of isotherm and kinetic models were investigated. Ultimately, a credible explanation for the adsorption of TH dye by the CS-CY/Benz/Fe3O4 composite was proposed.

Materials and methods

Materials

The raw clay utilized in this study was sourced from southern Algeria (Djelfa) and underwent the processing steps detailed in the referenced method43. Chitosan (CS) was procured from Sigma-Aldrich. Iron (III) chloride tetrahydrate (FeCl2·4H2O) and iron (II) chloride hexahydrate (FeCl3·6H2O) were obtained from HmbG Chemicals and Bendosen Laboratory Chemicals, respectively. Thionine dye, acetic acid (CH3COOH), sodium hydroxide (NaOH), and hydrochloric acid (HCl) were sourced from R&M Chemical. The characteristics of Thionine (3,7-diamino-5-phenothiazinium) dye are: (λ max = 569 nm), Molecular formula (C₁₂H₁₀ClN₃S), Molecular weight (263.75 g/mol).

Preparation of benzoin cross-linker agent

Benzoin was synthesized by condensing 50 mL ethanol, 30 mL distilled water, and 30 mL benzaldehyde with 2.6 g KCN. The blend was subjected to heating at 75 °C for an hour, which led to the formation of a solid orange precipitate. After washing and drying, 15 mg benzoin was dissolved in 150 mL ethanol, stirred at 76 °C for an hour. The resulting substance was then undergoes cooling in an ice bath, resulting in the formation of a yellowish-white solid. This solid is isolated through filtration using a Buchner funnel and is washed several times with cold water to ensure thorough removal of cyanide ions. The refined substance is subsequently purified through recrystallization from ethanol, thereby improving its purity and crystalline arrangement.

Synthesis of Benzoin and CS-CY/Benz/Fe3O4 bio-composite

To prepare the CS-CY/Benz/Fe3O4 biocomposite, a mixture of 10 g CS flakes and 3.33 g clay particles (CY) was mixed with 50 mL of 5% acetic acid and stirred at ambient temperature for 24 h to ensure complete dissolution of the CS and incorporation of the CY molecules into the CS structure. Next, FeCl2.4H2O (3.6 g) and FeCl3.6H2O (5.2 g) were dissolved in 10 ml of deionized water and added to the CS-CY solution with agitation for 1 h at room temperature. To obtain the magnetic beads, CS-CY/Fe3O4 was injected into a 2 M NaOH solution (600 mL) using syringe needle and stirred for 5 h. The newly formed magnetic CS-FA/Fe3O4 beads were rinsed with distilled water to eliminate any remaining traces of the sodium hydroxide solution. To crosslink the granules, a mixture of 180 ml ethanol, 20 ml water, drops of acetic acid, and 3.2 g benzoin was prepared and the CS-FA/Fe3O4 beads was added and stirred at 80 °C. After 3 h of stirring, the CS-FA/Fe3O4 beads underwent multiple rinses with deionized water to eliminate excess ions. Subsequently, they were dried at a temperature of 60 °C and stored for future investigation. The synthesis process is described in Fig. 1.

Fig. 1
figure 1

Synthesis of CS-CY/Benz/Fe3O4 bio-composite.

Characterization

Various analytical methods and techniques were employed to characterize the CS-CY/Benz/Fe3O4 bio-composite. The Brunauer–Emmett–Teller (BET) method was employed to calculate the estimated specific surface area (SBET), The amino (-NH2) group content in the bio-composite was determined through pH-potentiometric titration44, X-ray diffraction (XRD) was utilized to examine the crystallinity and amorphous nature of the CS/Benz/CY/Fe3O4 bio-composite. Fourier Transform Infrared (FTIR) spectroscopy (Perkin-Elmer, Spectrum RX I) was employed to identify the surface functional groups of the CS- CY/Benz/Fe3O4 bio-composite both before and after dye adsorption. The morphological features of the bio-composite before and after dye adsorption were determined using a scanning electron microscope (SEM, Zeiss Supra 40 VP, Germany). The point of zero charges (pHpzc) was calculated following a reported method45.

Design of experiment

This study utilized a three-level BBD with three central points per block to explore the impact of various factors on thionine dye removal, employing Response Surface Methodology (RSM). The experiment involved a 100ppm concentration of thionine dye in an aqueous solution, with temperature, adsorbent dose, pH, and time chosen as the independent variables (refer to Fig. 2). The adsorbent dose was selected over adsorbent concentration as a design parameter to maintain precise control over the quantity of adsorbent interacting with the dye, ensuring consistent evaluation of adsorption efficiency without the variability introduced by changing solution volumes. A series of 29 experimental trials were executed, with comprehensive descriptions of the chosen independent variables’ levels and intervals provided in Table 1.

Table 1 Codes and actual variables and their levels in BBD.

The BBD was chosen for this study due to its unique advantages in optimizing the adsorption process parameters for thionine dye removal. Unlike Central Composite Designs (CCD), such as Central Composite Circumscribed (CCC) and Central Composite Face-Centered (CCF) designs, BBD requires fewer experimental runs, particularly for cases involving three or four factors. For example, with three factors, BBD requires only 15 runs compared to 20 runs needed for a CCD. This reduction in the number of runs helps save time, labor, and materials, making it a more cost-effective choice. Additionally, BBD uses only points within the original factor ranges, avoiding the need for extreme factor combinations, which can lead to impractical or unsafe conditions and potential data loss. This makes BBD a safer and more practical choice when avoiding combined factor extremes is necessary.

Furthermore, BBD is either rotatable or nearly rotatable, which ensures a consistent variance of the predicted response across all points equidistant from the design center, leading to reliable optimization results. While it shares some limitations with Central Composite Inscribed (CCI) designs, such as having regions of poor prediction quality, BBD strategically places experimental points to provide adequate coverage of the design space for developing an accurate quadratic model. This, combined with its requirement of only three levels for each factor—unlike CCC and CCI designs, which require five levels—simplifies the experimental setup. Overall, BBD was selected for its efficiency, practicality, and ability to provide reliable optimization with fewer experimental runs, making it ideal for studies with limited resources or where extreme conditions need to be avoided.

Fig. 2
figure 2

Schematic illustration of the process.

Equation 1 explicitly formulates a quadratic polynomial of second order, illustrating a mathematical relationship between the factors that exert influence and the adsorption efficiency of Thionine dye.

$$\:Y\:=\:{\beta\:}_{0}+\:\sum\:_{j=1}^{m}{\beta\:}_{\dot{j}}{x}_{j}+\:\:\sum\:_{j=1}^{m}{\beta\:}_{jj}{{x}^{2}}_{j}+\:\sum\:\sum\:_{i<j=2}^{m}{\beta\:}_{\dot{i}j}{x}_{i}{x}_{j}+\epsilon\:$$
(1)

Where, β0 stands for a constant coefficient, where xi and xj represent the variables under investigation with i and j ranging from 1 to m. The coefficients βi, β(i i), and β(i j) correspond to the linear, binomial, and combined effects, respectively. The variable m signifies the total count of factors being examined, and εdenotes the error term46,47.

The CS-CY/Benz/Fe3O4composite was introduced into a 100 mL solution of the prepared Thionine dye, followed by agitation through continuous shaking at a rate of 200 beats/min utilizing a Heidolph unimax1010 incubator (D-91126, Germany). The sorbents were segregated by employing an external magnetic force, followed by filtration of the solution utilizing a syringe filter with a pore diameter of 0.45 μm. The quantification of TH dye concentration was conducted via UV-Vis. Series by SECOMAM) at a wavelength of λ = 569 nm. The effectiveness of removing TH dye, expressed as the removal efficiency (DR %), was calculated utilizing Eq. (2)48.

$$\:DR\%=\:\:{{(C}_{0}-{C}_{e})/C}_{0}*\:100$$
(2)

Where, Co (mg/L) denotes the initial concentration of the TH dye, while Ce (mg/L) represents the concentration of the TH dye when equilibrium is reached.

The efficacy of the developed mathematical models for the five responses was assessed through Analysis of Variance (ANOVA), which also scrutinized the individual, interactive, and quadratic impacts of the four examined factors. The statistical importance of the regression coefficients was evaluated using Fisher’s F-value. The specific data pertaining to the experimental design and the removal of TH dye can be found in Table 2.

Table 2 Experimental data for TH removal utilizing a 4-Variable BBD matrix.

Batch adsorption study

The removal of TH through adsorption was studied in a controlled batch adsorption setup employing CS-CY/Benz/Fe3O4. Optimal conditions resulting in the highest TH removal (97.95%) were identified: employing 0.05 g of CS-CY/Benz/Fe3O4, maintaining a pH of 4.0, operating at 60 °C, and allowing a contact time of 20 min, as observed in experiment 28 from Table 2. Subsequent to this, batch adsorption studies were conducted, and kinetic and isotherm aspects were explored under the optimized parameters. The adsorption isotherm investigation involved varying Thionine concentration from 50 to 350 mg/L, with a contact period ranging from 0 to 420 min. The equilibrium adsorption capacity of CS-CY/Benz/Fe3O4was determined using a specific formula49.

$$\:{q}_{e}=\left({C}_{0}-{C}_{e}\right)V/W$$
(3)

Where, qe (mg/g) denotes the adsorption capacity, while V (L) represents the volume of the TH dye solution, and W (g) indicates the quantity of the adsorbent, specifically the weight of the CS-CY/Benz/Fe3O4 composite.

Results and discussion

Physicochemical properties

The physicochemical characteristics of the CS-CY/Benz/Fe3O4 composite, as detailed in Table 3., underscore its suitability for TH adsorption from aqueous solutions. Notably, the composite demonstrates commendable surface properties, as evidenced by its quantified parameters. With a BET surface area measuring 11.6196 m2/g, the material exhibits a substantial adsorption interface per unit mass, indicating pronounced adsorption potential for dye molecules. Moreover, the observed average pore diameter of 14.1439 nm implies the presence of mesopores within the composite, facilitating the diffusion of dye molecules throughout its structure. The notable presence of NH2 groups, determined to be 30% via pH potentiometric titration, augments the material’s affinity for positively charged dye species, thereby enhancing its efficacy in TH dye sequestration. Collectively, these attributes underscore the CS-CY/Benz/Fe3O4 composite’s promise as an effective adsorbent for TH dye remediation in contaminated aqueous environments.

Table 3. Physicochemical Characteristics of the CS-CY/Benz/Fe3O4 composite.

XRD analysis

The crystallographic arrangement of the CS-CY/Benz/Fe3O4 composites produced was examined using X-ray diffraction (XRD), as depicted in Fig. 3. The XRD analysis revealed two prominent diffraction peaks observed at 10.4° and 20° angles, corresponding to the crystal lattice’s (020) and (110) planes, respectively13. A representation of these crystal lattice structures is shown in Fig. 4, highlighting the arrangement of atoms within the (020) and (110). In addition, the XRD patterns exhibit pronounced diffraction peaks at various 2θ positions for Fe3O4, specifically at 30.04°, 35.39°, 43.01°, 53.36°, 56.88°, 62.46°, and 74.88°. These peaks align with the crystal planes (220), (311), (400), (422), (511), (440), and (622), respectively, indicating the cubic structure of Fe3O4. Importantly, these observations are consistent with the established pattern of Fe3O4(JCPDS Note 01-089-0688)50. Distinct reflections appearing at 2θ = 26° and 28° are attributed to CY, a conclusion supported by relevant literature sources51,52. XRD analysis offers significant understandings regarding the crystalline makeup and structural attributes of the CS-CY/Benz/Fe3O4 composites, consistent with recognized trends and affirming the existence of the targeted constituents within the produced substance. The XRD analysis of the composite material, including the crystallographic planes (hkl), corresponding 2θ angles, sin θ values, d-spacings, full width at half maximum (FWHM), and crystallite sizes, is presented in Table 4.

The peak at 2θ = 10.4° was used to calculate the number of layers in the composite material because it corresponds to the (020) plane, which typically represents the largest interlayer spacing within the chitosan-clay (CS-CY) component of the composite. This low-angle peak is ideal for determining the interlayer distance, a critical factor when calculating the number of layers in layered structures. Using Bragg’s Law, the interlayer spacing (d-spacing) was calculated, and the crystallite size (D) was determined using the Scherrer equation. The number of layers was then calculated as the ratio of the crystallite size to the d-spacing. Based on this calculation, the number of layers in the composite material is determined to be 02, indicating a bilayer structure within the chitosan-clay component.

Table 4 XRD Data Analysis of Composite Material showing Crystallographic Planes (hkl), corresponding 2θ angles, sin θ values, d-Spacings, full width at Half Maximum (FWHM), and Crystallite sizes.
Fig. 3
figure 3

The XRD patterns of CS-CY/ Benz/Fe3O4 composite.

Fig. 4
figure 4

Representation of the chitosan crystal lattice structures, illustrating the atomic arrangement within the (020) and (110) planes.

FT-IR analysis

Distinct functional groups in CS-CY/Benz/Fe3O4 and CS-CY/Benz/Fe3O4 + TH (after adsorption of thionine dye) were identified through FTIR spectroscopy, as depicted in the Fig. 5. In the elemental analysis of the material before adsorption, specific peaks were observed: Peaks in the range of 3400 cm⁻¹ to 3500 cm⁻¹ corresponded to the stretching vibrations of -NH2and -OH functional groups53. The peak at 2711 cm⁻¹ indicated the extension vibration of CH groups54. The peak at 1600 cm⁻¹ was associated with the N–H bending of the primary amine group and the stretching vibration of C = N resulting from the interaction between − NH2groups of CS and C = O groups of benzoin55. The vibration observed at 1384 cm⁻¹ was attributed to the CN stretching vibration54. The peak at 1028 cm⁻¹ represented the CO2 (C-O-C) expansion vibration56, The identification of peaks at 424 cm⁻¹, 470 cm⁻¹, 576 cm⁻¹, and 642 cm⁻¹ signifies the existence of Si-O and Fe-O functional groups, respectively. Specifically, the presence of Si-O functional groups is indicative of quartz57,58, suggesting the presence of clay within the material. Moreover, the detection of iron-associated (Fe-O) peaks59,60 confirms the successful loading of both clay and iron into the composite material. The FTIR spectrum of CS-CY/Benz/Fe3O4+ TH exhibited significant alterations in the intensities of the -OH and N-H bands following the adsorption of TH54. This observation provides compelling evidence of the functional interaction between the active material and thionine dye molecules.

Fig. 5
figure 5

FTIR spectra of CS-CY/Benz/Fe3O4 and CS-CY/Benz/Fe3O4 + TH dye.

SEM analysis

The SEM analysis of the CS-CY/Benz/Fe3O4 composite before and after TH adsorption provides valuable insights into its morphology and adsorption behavior. Initially, the external structure of the composite displays a rough and uneven surface, featuring small noticeable indentations dispersed in a random pattern (Fig. 6a). This coarse texture implies a significant surface area and abundant pore formation, hinting at the integration of Fe3O4 into the polymer framework of CS-CY. The presence of these nanoparticles, distributed along the outer surface, enhances the overall surface area and pore structure, facilitating molecular diffusion—a crucial aspect for effective dye adsorption. The enhanced surface characteristics created by Fe3O4 offer abundant inner space for adsorption, contributing to the composite’s efficacy as an adsorbent.

Upon TH adsorption, the surface morphology undergoes noticeable changes (Fig. 6b). The surface experiences a densification process, exhibiting reduced apparent voids on its exterior. This change is linked to the adherence of TH molecules onto the composite’s surface. As TH molecules load onto the adsorbent surface, they occupy available sites and fill in the voids, resulting in a denser and smoother surface appearance. The changes observed in the external structure support the occurrence of adsorption, emphasizing the connection between TH molecules and the combined surface.

Fig. 6
figure 6

SEM images of (a) CS-CY/Benz/Fe3O4, (b) CS-CY/Benz/Fe3O4 after TH adsorption.

Analysis of thionine removal % response

Model and fitting

BBD model analysis

The investigation employed BBD-RSM software to assess the decolorization response of TH dye. This software facilitated the exploration of the separate and combined impacts of independent variables such as adsorption dose (A), pH (B), temperature (C), and time (D) on the decolorization process. Statistical evaluation of the experimental outcomes was performed through analysis of variance (ANOVA), as detailed in. Table 5.

Table 5 ANOVA results for the Thionine removal % quadratic model.

The ANOVA table delineating the quadratic model of response surface methodology is presented in Table 5. This table indicates that the model exhibits a notable P-value of less than 0.0001 and an F-Value of 22.92. This suggests that the terms within the model significantly influence the response variable of TH removal %47. According to the ANOVA table (Table 6), four linear terms A: Adsorbent dosage, B: pH, C: Temperature, D: Time, in addition to three quadratic terms B: pH*B: pH, two Two-way interactions terms A: Adsorbent dose*C: Temperature, B: pH*D: Time, are the significant model terms that are affecting the Thionine removal % model significantly. As listed at the bottom of the ANOVA table, the model has a non-significant Lack-of-fit with an F-value of 01.58 and a P-value of 0.35.

Moreover, it is evident that the estimated R² and adjusted R² exhibit a satisfactory concurrence, standing at 79.47% and 91.64% correspondingly. The adjusted R² closely aligns with the R² value of 95.82%, indicating a strong correlation between observed and anticipated values. All three metrics approach unity (1 or 100%), affirming the model’s suitability for predictive purposes within the investigated scope.

Arranging the terms of the model based on their level of significance yields the subsequent sequence: C: Temperature > D: Time > B: pH > A: Adsorbent dose > B: pH*B: pH > B: pH*D: Time > A: Adsorbent dose*C: Temperature > A: Adsorbent dose*B: pH > C: Temperature*C: Temperature > A: Adsorbent dose*A: Adsorbent dose > B: pH*C: Temperature > A: Adsorbent dose*D: Time. The C: Temperature” demonstrated the most significant influence on the percentage of TH removal, followed by “D: Time” and “B: pH.” The respective impacts of these factors on the removal percentage of TH are depicted in a Pareto chart (Fig. 7).

Table 6 Signifiant tems rank.
Fig. 7
figure 7

Pareto chart of the standardized effects for Thionine removal % response.

According to Pareto chart seven terms (C: Temperature, D: Time, B: pH, A: Adsorbent dose, B: pH*B: pH, B: pH*D: Time, A: Adsorbent dose*C: Temperature, ) surpass the reference line of statistical significance set at α = 2.14, indicating that these effects are statistically significant.

The generated quadratic model equation in terms of uncoded factors is as follows:

$$\begin{aligned} Thionine\; removal \;{\%} &= 67.8 + 281 A: Adsorbent dose- 19.79 B: pH \\& \quad + 2.132 C: Temperature- 1.17 D: Time \\& \quad + 1547 A: Adsorbent doseA: Adsorbent dose \\& \quad + 0.653 B: pHB: pH - 0.00954 C: Temperature \\& \quad C: Temperature+ 0.0004 D: TimeD: Time \\& \quad + 38.4 A: Adsorbent doseB: pH- 11.47 A: Adsorbent dose \\& \quad C: Temperature+ 4.19 A: Adsorbent doseD: Time \\& \quad + 0.0347 B: pHC: Temperature+ 0.2138 B: pHD: Time \\& \quad + 0.0082 C: TemperatureD: Time\end{aligned}$$
(4)

The equation (Eq. (4)) represents the quadratic mathematical model that shows the relation between the Thionine removal % and all the studied variables. In the equation Eq. (4) A: Adsorbent dose, C: Temperature, D: Time, A: Adsorbent dose*A: Adsorbent dose, B: pH*B: pH, D: Time*D: Time, A: Adsorbent dose*B: pH, A: Adsorbent dose*D: Time, B: pH*C: Temperature, B: pH*D: Time, C: Temperature*D: Time, has a positive influence on the Thionine removal %, while other terms i.e., B: pH, C: Temperature*C: Temperature, A: Adsorbent dose*C: Temperature, have positive effects means reduces the TH removal %. Worth noting that the C: Temperature factor and D: Time have more significant impact on the TH removal % compared to the other terms.

Normal plot

The standard effects plot (Fig. 8a) vividly illustrates both the adverse and favorable impacts. When the effects are placed at a greater distance from 0 on the positive range of the x-axis have a higher magnitude as seen with B: pH, on the other hand when the effects are placed at lower values than 0 they have lower as seen with C: Temperature. Additionally, observations indicate that deviations farther from 0 exhibit a greater influence on the response variable, exemplified by the impact of the temperature factor (C) as depicted in the plot.

Normal probability plot

Based on the normal probability plot for TH removal percentages as depicted in Fig. 8b, the data points closely align with the straight red line, suggesting that the data in this study conform closely to a normal distribution61,62.

Fig. 8
figure 8

(a) Normal plot of the standardized effects, (b) The normal probability Plot for Thionine removal %.

Residual vs. fitted value

Figure 9a shows the plot of residuals against fitted values for the TH removal %. The scatter plot of the data reveals a random distribution of points both above and below the zero line, lacking any discernible pattern or trend, thereby suggesting the absence of serial correlation within the dataset.

Versus order plot

The graph of residual versus observation order for TH removal % response shown in Fig. 9b. The plotted data depicting TH removal percentage against order does not exhibit any discernible pattern of either increasing or decreasing residuals. This absence of trend indicates a random dispersion of residuals, suggesting the absence of systematic error or bias within the model. This observation underscores the effectiveness of the model in accurately fitting the experimental data.

Fig. 9
figure 9

(a) Versus fits plot for Thionine removal % response, (b) The Residual vs. observation order plot of Thionine removal %.

The histogram of residuals for Thionine removal % response is shown in Fig. 10. As seen for the Thionine removal % response no outliers or skewness is presented according to its histogram of residuals.

Fig. 10
figure 10

Histogram of residuals for Thionine removal %.

Probability plot

According to the findings presented in Fig. 11, the data points closely align with a straight line. The calculated p-value, which stands at 0.567, surpasses the significance threshold of 0.05. This suggests that, based on the null hypothesis, the data conforms to a normal distribution. The probability plot depicted in Fig. 11 illustrates the removal percentage of TH. Remarkably, the data points are notably aligned along a straight line, suggesting a close adherence to the expected normal distribution pattern. This visual alignment is further corroborated by a computed p-value of 0.567, surpassing the conventional significance threshold of 0.05. This result indicates strong support for the null hypothesis, affirming that the dataset indeed conforms to a normal distribution.

Fig. 11
figure 11

Probability plot of Thionine removal %.

Response surfaces plots

Contour plots depicting three-dimensional (3D) response surfaces were generated to illustrate the interaction between pairs of variables, with the remaining variable held constant at its midpoint. These contour plots facilitate the examination of the collective impact of the variables on TH removal percentage, enabling observation of TH removal percentage values across various factor levels.

The contour plot depicted in Fig. 12a illustrates the combined influence of Adsorbent dose (A) and pH (B) on the percentage of TH removal, with the remaining factors held constant at their midpoint values. As can be seen that higher TH removal % values are obtained at higher levels of A: Adsorbent dose and lower levels of B: pH. Meanwhile, Lower levels of TH removal % are found at the higher levels of pH and lower levels of A: Adsorbent dose. Similarly, (Fig. 12b) shows the response curve concerning A: Adsorbent dose and C: Temperature on TH removal %, while holding the other factors at their middle value. This figure indicates a direct proportional relationship between TH removal % and both C: Temperature and A: Adsorbent dose.

The combined impact of the A: Adsorbent dose and D: Time on the percentage of TH removal is depicted in Fig. 12c, with the remaining factors held constant at their midpoint. The figure illustrates that elevating the levels of both A: Adsorbent dose and D: Time leads to higher percentages of TH removal. Conversely, lower levels of both factors result in decreased TH removal percentages.

Figure 12d illustrates the interaction between B: pH and C: Temperature on Thionine removal % while holding the other factors at their center value. It shows that higher Thionine removal % values are obtained at higher levels of C: Temperature and lower levels of B: pH.

The interactive effect between B: pH and D: Time, while holding the other factors at their middle level, is shown in (Fig. 12e). As indicated by the figure, higher Thionine removal % is achieved at higher levels of D: Time and lower levels of B: pH.

The interaction between C: Temperature and D: Time on the percentage of TH removal, with other variables held constant at their midpoint values, is depicted in Fig. 12f. As observed, the figure indicates that higher Thionine removal % values are obtained at higher levels of both D: Time and C: Temperature. In other words, thionine removal increases directly proportional to both D: Time and C: Temperature.

Fig. 12
figure 12

The contour plots of the interaction of each two variables. (a) the contour plots of A: Adsorbent dose and the B: pH, (b) the contour plots of A: Adsorbent doseand C: Temperature interaction, (c) The contour plots of A: Adsorbent dose and D: Time interaction, (d) the contour plots of B: pH and C: Temperature interaction, (e) the contour plots of B: pH and the D: Time interaction, (f) the contour plots of C: Temperature and D: Time interaction.

Figure 13 illustrates the main effects plots representing the % response of TH removal. The efficiency of removal escalates in direct correlation with the augmentation of all factors (A: Adsorbent dose, C: Temperature, D: Time (min)), except for pH, where the efficiency undergoes an inverse relationship. As the factors A, C, and D increase, so does the removal efficiency, showcasing a clear positive trend. However, in the case of pH, as it decreases, the removal efficiency tends to increase, demonstrating a converse association.

Fig. 13
figure 13

Main effects plot of Thionine removal %.

Optimization

Using the optimization criteria described earlier, we were able to achieve a maximum desirability of 100%, which was associated with the maximum TH removal of 99% using the absorbent. The optimal conditions for achieving this level of removal were determined to be A: Adsorbent dose = 0.08 g, B: pH = 5.91, C: Temperature = 54.34 °C and D: Time = 29.7 min, as shown in the Fig. 14.

Fig. 14
figure 14

Desirability ramp for optimization.

Following the execution of an experimental run under these optimal conditions, a TH removal rate of 98.78% was obtained, closely aligning with the predicted response. This outcome serves as validation for the model’s ability to accurately forecast responses within the examined range.

pHpzc analysis

The pHpzc analysis of CS-CY/Benz/Fe3O4 yielded a value of 7.6, shown in the Fig. 15, indicating a positively charged surface at this pH. This observation suggests a potential affinity for organic dyes with anionic groups to attach to the surface of CS-CY/Benz/Fe3O4, especially when the solution pH is equal to or below the determined pHpzc. It is important to note that while electrostatic attractions play a role in this interaction, their influence is comparatively lower than that of other forms of interactions. This is particularly evident in the case of TH, which is positively charged. In such instances, the adsorbent-adsorbate affinity is predominantly governed by interactions like Yoshida H bonding, hydrogen bonding, and pi-interactions. These non-electrostatic forces play a more substantial role in facilitating the interaction between the CS-CY/Benz/Fe3O4 surface and the positively charged TH, underscoring the nuanced and multifaceted nature of the adsorption process.

Fig. 15
figure 15

pHpzc of CS-CY/Benz/Fe3O4.

Adsorption study

The impact of varying initial concentrations (ranging from 50 to 350 mg/L) over different time intervals on TH dye adsorption by CS-CY/Benz/Fe3O4 was systematically investigated. As illustrated in Fig. 16, the adsorption capacity (mg/g) exhibited a non-linear relationship with stirring time. Notably, all curves corresponding to different initial concentrations exhibited an initial upward trend within the first 20 min, reaching equilibrium gradually. The swift adsorption kinetics observed in the initial minutes underscore the active chemical potential of the compound. This observation is further substantiated by the enhanced adsorption rates of thionine dye at different concentrations (50, 100, 150, 200, 250, 300, and 350 mg/L), with recorded values of 102.59, 198.85, 296.26, 384.60, 473.67, 577.12, and 660.86 mg/g, respectively. The findings highlight the efficient adsorption performance of the synthesized material across a range of initial concentrations and time periods.

Fig. 16
figure 16

Effect of different concentrations of TH dye with contact time on adsorption, dose = 0.05 g, pH = 4, T = 60 °C, V = 100 ml.

Adsorption kinetics

Adsorption kinetics involves investigating the speed at which adsorption processes take place, offering insights into how adsorbate molecules interact with adsorbent surfaces over time. Various models are employed to elucidate adsorption kinetics, with the most common being the pseudo-first-order63and pseudo-second-order models64. The pseudo-first-order model suggests that the rate of adsorption is proportional to the number of vacant sites on the surface of the adsorbent (Eq. 5). Conversely, the pseudo-second-order model proposes that the rate-limiting step in adsorption is a chemisorption process involving electron sharing or exchange between the adsorbent and adsorbate. The equation for this model is given by (Eq. 6), A comprehensive understanding of adsorption kinetics is essential for optimizing processes, predicting equilibrium adsorption capacities, and designing effective adsorption systems.

$$\:{q}_{t}={q}_{e}(1-\:{exp}^{-{k}_{1}t})$$
(5)
$$\:{q}_{t}=\raisebox{1ex}{${q}_{e}^{2}\:{k}_{2}t$}\!\left/\:\!\raisebox{-1ex}{$1+{q}_{e}{k}_{2}t$}\right.$$
(6)

The empirical findings of this study involve analyzing kinetic models, as illustrated in Fig. 17, to derive pertinent parameters and elucidate fundamental concepts regarding adsorption mechanisms. A comprehensive summary of the outcomes is presented in Table 7, suggesting that the first kinetic model adequately describes the kinetic data across various concentrations of the primary TH dye investigated. Furthermore, the concordance with the PFO model suggests that the adsorption process primarily hinges on the accessibility of vacant sites on the adsorbent surface during the initial stages. The adsorbate molecules are quickly attracted to and occupy these vacant sites.

Fig. 17
figure 17

Plots for pseudo first- and pseudo second order adsorption kinetics.

Table 7 Kinetic parameters of PFO and PSO in the adsorption of TH dye on CS-CY/Benz/Fe3O4.

Adsorption isotherms

In order to evaluate the effectiveness of the CS-CY/Benz/Fe3O4 composite in adsorbing TH dye and to gain insights into the interaction mechanism between TH dye molecules and the CS-CY/Benz/Fe3O4material, adsorption isotherm experiments were conducted. Various nonlinear equilibrium models, including Langmuir65, Freundlich66, and Temkin67, were utilized to analyze the experimental data. The mathematical expressions for these equilibrium models are denoted as Langmuir (Eq. 7), Freundlich (Eq. 8), and Temkin (Eq. 9), respectively.

$$\:{q}_{e}=\raisebox{1ex}{${q}_{max}{K}_{a}{C}_{e}$}\!\left/\:\!\raisebox{-1ex}{$(1+{K}_{a}{C}_{e})$}\right.$$
(7)
$$\:{q}_{e}={K}_{f}{C}_{e}^{1/n}$$
(8)
$$\:{q}_{e}=RT/{b}_{T}\:\text{l}\text{n}\left({K}_{T}{C}_{e}\right)$$
(9)

In the presented equations, qe qe” stands for the adsorption capacity measured in mg/g, qmax represents the maximum adsorption capacity, also measured in mg/g, Ce stands for the concentration of TH dye at equilibrium in mg/L, Ka is the Langmuir constant in L/mg, Kf is the Freundlich constant, and KT represents the Temkin constant. The parameters associated with the isotherm models under investigation have been compiled in Tables 8 and depicted in Fig. 18.

Fig. 18
figure 18

Adsorption isotherms of TH dye by CS-CY/Benz/Fe3O4, (dose = 0.05 g, pH = 4, temperature = 60 °C, volume of dye = 100 mL).

Table 8 Characteristics of Isotherm models for the Adsorption of TH Dye on CS-CY/Benz/Fe3O4.

The Table provides essential parameters from Langmuir, Freundlich, and Temkin isotherm models, aiming to understand the interaction between the CS-Cy/Benz/Fe3O4 compound and Thionine dye. The Freundlich model, yielding the highest R2 value (0.96%), offers valuable insights into the adsorption behavior. This model characterizes heterogeneous surfaces and multilayer adsorption, with Kf (163.11 (mg/g) (L/mg)1/n) indicating concentration-dependent adsorption capacity. The significant coefficient of determination (R2) indicates a strong relationship between the empirical and predicted data, confirming the suitability of the Freundlich model in elucidating the adsorption behavior of TH dye onto the CS-CY/Benz/Fe3O4 compound. The Freundlich isotherm model suggests the compound’s efficient and versatile adsorption behavior, particularly beneficial for wastewater treatment applications.

Adsorption thermodynamics

The field of adsorption thermodynamics delves into the thermodynamic intricacies of adsorption processes, scrutinizing key parameters like enthalpy (∆H◦), Gibbs free energy (∆G◦), and entropy (∆S◦). ∆G◦ gauges the spontaneity of the process, while ∆H◦ and ∆S◦ shed light on the thermal aspects and randomness accompanying adsorption. These parameters are calculated using specific equations, (Eqs. 10, 11,12)68,69,70.

$$\:{\varDelta\:G}^{^\circ\:}=-RTLn{K}_{d}$$
(10)
$$\:{K}_{d}={q}_{e}/{C}_{e}$$
(11)
$$\:Ln{K}_{d}=\:{\varDelta\:S}^{^\circ\:}/R-{\varDelta\:H}^{^\circ\:}/RT$$
(12)

The systematic presentation of results, as delineated in both a Fig. 19 and a Table 9, offers an in-depth examination of the thermodynamic aspects governing the adsorption dynamics between CS-CY/Benz/Fe3O4 and thionine dye. The positive ∆S° values signify an escalation in molecular disorder during adsorption, implying potential molecular reorientation at the interface. This intricacy is rooted in the multifaceted nature of CS-CY/Benz/Fe3O4, where diverse functional groups and surface characteristics contribute to the nuanced thermodynamic responses observed. The positive ∆H◦ values underscore the endothermic nature of the process, necessitating an input of energy for robust bond formation. The consistently negative ∆G◦ values at various temperatures underscore the spontaneous nature of adsorption, with higher temperatures further amplifying spontaneity. This highlights the inherent affinity between CS-CY/Benz/Fe3O4 and TH dye, supported by elevated Kd values indicating a robust affinity between adsorbate and adsorbent. In summary, the collective data paints a nuanced picture of a spontaneous and endothermic adsorption process, intricately associated with increased disorder. This dynamic behavior particularly thrives under elevated temperature conditions, providing valuable insights into the thermodynamic suitability of CS-CY/Benz/Fe3O4 for practical applications, such as wastewater treatment.

Fig. 19
figure 19

Illustrates the Ln kd graph plotted against the reciprocal of temperature (1/T).

Table 9 The table displays the findings derived from the thermodynamic investigation.

Adsorption mechanism

Understanding the complex mechanism underlying the adsorption of CS-CY/Benz/Fe3O4 on thionine is essential to unravel the multifaceted interplay between the diverse forces and attractions that govern this process. Our study delves into the potential contributions of Yoshida H bond, hydrogen bonding, π-π interactions, and n-π interactions, along with the possibility of electrostatic interactions, chemical bonds, and surface functional groups, demonstrating the precise and complex nature of this adsorption mechanism in Fig. 20. Hydrogen bonding plays a pivotal role, especially when CS-CY/Benz/Fe3O4 and thionine possess hydrogen bond donor and acceptor groups. Hydrogen bonds can form between the hydrogen atoms in the functional groups of the composite material and the nitrogen atoms in thionine. The plausibility of chemical bonds, including covalent or ionic bonds, contributing to the adsorption mechanism is considered. If the reactive sites on the surface of CS-CY/Benz/Fe3O4 engage in chemical reactions with thionine, covalent bonds may be generated. Hydrogen bonding is observed in this context with free hydrogen molecules on the surface of CS-CY/Benz/Fe3O4 forming bonds with nitrogen atoms in the thionine dye. The mechanism of Yoshida H bonding is manifested by the bonding of hydrogen atoms in the –OH molecule of CS-CY/Benz/Fe3O4 to the aromatic rings of the thionine dye. In addition, n-π interactions can be established between the lone pair of electrons from the oxygen and nitrogen atoms of CS-CY/Benz/Fe3O4 and the aromatic rings of thionine. Furthermore, π–π interactions may occur between the aromatic rings of benzoin and the π orbitals of the aromatic rings in the molecular structure of the dye. Electrostatic attraction usually occurs between the positive ions (N+, S+) of the thionine dye and the negative ions (O) of the adsorbed compound. The adsorption process may also involve layer-by-layer growth, with subsequent thionine layers attaching to the initially adsorbed layer of CS-CY/Benz/Fe3O4. This growth is affected by factors including concentration, temperature, and the kinetics of the adsorption process.

In summary, a comprehensive understanding of the adsorption mechanism of CS-CY/Benz/Fe3O4 on thionine involves a myriad of forces, including Yoshida H bond, hydrogen bonding, π-π interactions, and n-π interactions, as well as chemical and surface interactions. Bonds. Looking at functional groups and growing layer by layer adds to the complexity. Further experimental analyzes and in-depth studies are warranted to reveal additional insights into the specific molecular interactions that constitute this complex adsorption mechanism.

Fig. 20
figure 20

Visualization of the potential adsorption mechanism between the composite material CS-CY/Benz/Fe 3 O 4 and TH dye.

Conclusion

The synthesized composite of magnetic chitosan-benzoin/Fe3O4 (CS-Benz/Fe3O4) demonstrated high effectiveness in removing TH dye from water solutions. Through optimization of adsorption parameters using BBD within Response Surface Methodology (RSM), an impressive TH removal efficiency of 99% was achieved. The optimal conditions for TH removal were determined as pH approximately 5.91, adsorbent dose of 0.08 g, temperature of 54.34 °C, and time of 29.7 min. Adsorption kinetics followed a pseudo-second-order (PSO) model, with the Freundlich isotherm model accurately describing the equilibrium data, indicating a notable adsorption capacity of 660.86 mg/g at 350 mg/L TH concentration and 333.15 K temperature. The adsorption mechanism involved various interactions such as electrostatic attractions, n-π interactions, hydrogen bonding, and Yoshida H-bonding. Importantly, the CS-Benz/Fe3O4 composite exhibited excellent magnetic responsiveness, facilitating easy separation from water using an external magnetic field after adsorption. These findings not only highlight the potential of magnetic chitosan-based composites as efficient and sustainable solutions for removing TH dye pollutants from water systems but also pave the way for the development of advanced environmental remediation technologies. The novelty of our work lies in the high removal efficiency and the ease of separation of the adsorbent, which could lead to practical applications in wastewater treatment processes. Future research should focus on the scalability of this technology and its application to a broader range of water pollutants, thereby contributing to the advancement of sustainable environmental solutions.