1 Introduction

In recent decades, the pollution of water resources has become a significant concern due to rapid industrialization and the exponential growth of the population [1, 2]. Among the various types of pollution, dyes represent a prominent class of contaminants [3]. Once dyes enter aqueous systems, they render the water unsuitable for use, posing challenges for effective treatment. This difficulty arises from the complex molecular structure of dyes and their synthetic origin, which contribute to their stability and resistance to natural degradation [4]. Dyes play a crucial role as raw materials in industries such as textiles, food, cosmetics, and leather [5]. These dyes can be broadly categorized as either natural or synthetic. Natural dyes do not undergo any chemical treatment derived from sources such as insects, minerals, animals, and plants [6]. On the other hand, synthetic dyes are chemically synthesized, known for their high stability and often exhibit toxicity toward living organisms [7]. Commercial synthetic dyes can be classified based on color, structure, and application methods [8]. Due to their toxicity, carcinogenicity, and potential harm to the environment and human health, synthetic dyes pose significant threats [9]. Additionally, dyes may be divided into three categories based on how they charge up when dissolved in aqueous media: cationic, anionic, and non-ionic dyes. Crystal violet (CV), a widely used cationic synthetic dye in the textile industry, is a triarylmethane dye that is also used in paints and biological stains. Due to its intense color, CV is very visible, even in low quantities. This contributes to significant color pollution, which can block light from penetrating water bodies and harm aquatic life [10].

Various techniques have been employed to eliminate dyes from wastewater, such as membrane filtration, adsorption, ozone treatment, improved oxidation processes, bioremediation, and flocculation/coagulation. However, these methods face significant challenges in terms of high operational costs, limited effectiveness, and adverse environmental impact, making them impractical for industrial applications. Each method has its own limitations, considering factors such as design, efficiency, and cost, resulting in relatively low removal efficiencies and prohibitive operating expenses [11]. Among the available techniques, adsorption stands out as a more competitive option due to its accessibility and economically favorable pollutant removal rate. It is crucial to seek adsorbents that not only meet industrial water treatment standards but also exhibit low cost, environmental friendliness, high efficiency, and wide availability [12]. Through a variety of processes, such as hydrophobic contact, electrostatic attraction, interactions, and hydrogen bonding, dyes are bound to the surface of the adsorbent during the adsorption process. Surface complexation plays a significant role, wherein ions bind to various functional groups present on the surface of the adsorbent, and electrostatic interactions occur between the adsorbate and the surfaces of the adsorbent [13].

A variety of adsorbents, such as silica gel, iron nanoparticles, commercial activated alumina, ion exchange resins, cellulose-based materials, and commercial activated carbon, are commonly used for removing dyes from wastewater [12, 14]. Among these options, activated carbon is widely employed in wastewater treatment; however, its limited selectivity and high cost pose challenges in certain applications [15]. On the other hand, cellulose, the most abundant biopolymer, possesses attractive qualities such as non-toxicity, regenerability, biocompatibility, and biodegradability, making it a favorable bioadsorbent for dye wastewater treatment [16, 17]. Cellulose plays a structural role in the primary cell wall of green plants, various forms of algae, and fungal oocysts. It is widely distributed in nature, with approximately 33% cellulose content in all plant materials (wood: 40–50%, cotton: 90%). Industrial cellulose is primarily derived from wood pulp and cotton [18]. Furthermore, cellulose is employed in a variety of ways as a starting material for chemical transformations, the creation of films and filaments, and the synthesis of cellulose derivatives that are used in many industries [19]. Modified cellulose structures have also been developed as adaptable sorbents for removing dyes from aqueous media [14]. Each unit of cellulose has two functional groups, hydroxyl and methylol. It features a well-organized structure without branching or lateral chains and exhibits a semi-crystalline nature, combining amorphous and crystalline phases [20]. Despite the hydrophilic nature of its two types of hydroxyl groups (primary hydroxyl at the sixth carbon, methylol group, and secondary hydroxyl at the third and fourth carbon), cellulose does not dissolve in water or common solvents due to the strong hydrogen bonding between its chains. The crystalline nature of cellulose arises from the hydrogen bond interactions among cellulose chains and the van der Waals attractions between glucose molecules [20]. The abundant hydroxyl groups in cellulose allow for modifications with functional groups such as mercapto, carboxyl, oximido, and sulfo groups, which enhance selectivity and dye adsorption performance [21]. Various functional groups, including the additional hydroxyl (-OH) group, isothiouronium group, mercapto (-SH) group, carboxyl (-COOH) group, and amino (-NH2) group, have been investigated for their adsorption behavior when incorporated into cellulose.

2 Materials and methods

2.1 Material

Sodium hydroxide, sodium hypochlorite from NCIC (El-Nasr Co. for Intermediate Chemicals), thiourea, and nicotinic acid from Sigma-Aldrich were used for the modification and extraction of cellulose from pumpkin seed hulls. Sodium chlorite and glacial acetic acid were supplied by Sigma-Aldrich and Merck, respectively. Crystal violet (CV) from Sigma-Aldrich was the basic dye utilized in this investigation. Given that it is well known to have significant adsorption onto solids, the CV was chosen for this investigation. This dye’s maximum wavelength of absorption is 590 nm. The Egyptian pumpkin seed hulls (PSH) were acquired by manually removing them from pumpkin seeds purchased from a local market. In the laboratory, the collected hulls underwent a series of washing steps using hot tap water to eliminate any attached dirt. Subsequently, the hulls were rinsed with deionized water and dried in an oven at 333K for 48 h until a constant weight was achieved. After drying, the PSH material was ground and sieved to obtain particles of different sizes, with a target size of 0.8 mm. Finally, the processed PSH was stored for future utilization.

2.2 Extraction of cellulose from pumpkin seed hulls

The untreated pumpkin seed hulls with a particle size of 0.8 mm were fully submerged in a NaOH solution (20 g sample: 200 g NaOH). The mixture was stirred for 90 min at 353 K using a water-bath setup. Subsequently, the solution was filtered, and the hulls were washed multiple times with distilled water to remove any excess alkali containing lignin. These processed hulls will be referred to as alkali-treated pumpkin seed hulls.

After the drying process, the treated pumpkin seed hulls underwent a bleaching step using sodium hypochlorite. A mixture consisting of 100 g of treated hulls, 300 ml of water, and 300 ml of NaOCl was prepared in an airtight Pyrex bottle to preserve the released chlorine for bleaching. The mixture was vigorously stirred and heated at 323 K in a water bath for 30 min. The solution was decanted, and another portion of 300 ml of water and 300 ml of NaOCl was added to the mixture, which was again maintained at 323 K for 30 min. The entire reaction took place over a total period of 1 h.

Following the reaction, the mixture was allowed to cool and then filtered. The filtered material was washed multiple times with distilled water to eliminate any excess NaOCl. Subsequently, it was dried and stored in a desiccator for future use as the cellulose adsorbent “CS.” All the above were dried at 333 K for 48 h.

2.3 Chemical modification of cellulose

Cellulose was divided into three portions for further processing. In the first section, 30 g of cellulose was added to 500 ml of nicotinic acid (0.2 M). Similarly, in the second section, 30 g of cellulose was combined with 500 ml of thiourea (0.2 M). Both sections were vigorously stirred and heated at 353 K using a water bath for 8 h. Afterward, the two sections were cooled, filtered, dried at 323 K for 48 h, and then washed multiple times with distilled water to eliminate any excess nicotinic acid and thiourea. The sections were then dried at 333 K for 3 h and stored in desiccators for future use. The first section, referred to as the cellulose-nicotinic acid adsorbent CSN, was specifically treated with nicotinic acid. The second section, known as cellulose-thiourea adsorbent CST, underwent treatment with thiourea. On the other hand, the third section of cellulose remained untreated and was utilized as a cellulose adsorbent CS. The sections were then dried at 333 K for 3 h and stored in desiccators for future use.

2.4 Characterization of the prepared samples

The scanning electron microscope (SEM, FEI inspect S) was employed (made in the USA). Fourier transform infrared spectroscopy (FT-IR) was conducted using a Thermo Scientific model Nicolet spectrometer, covering a range of 4000 to 400 cm−1, (made in the USA). X-ray diffraction (X' Pert PRO PANalytical-Netherlands device) with a monochromatic radiation source of Cu Kα was utilized (made in the UK). To determine the specific surface area of the adsorbents, a NOVA e-Series analyzer was employed (made in the USA). Additionally, thermal analysis (TGA) was performed using a Perkin Elmer model TGA4000 and heat from 30 to 600 °C at 10 °C/min (made in the USA).

2.5 Adsorption studies

In order to investigate the behavior of the sorption of crystal violet dye on different cellulose samples, namely parent CS, CSN, and CST, 50 mL of the dye solution was mixed with 0.1 g of each cellulose sample. The mixtures were agitated at a fixed speed and for a specific duration, depending on the experimental circumstances being studied. The studies were conducted at a variety of temperatures (295 K, 303 K, 313 K, and 323 K), a first CV conc. = 3.742 ppm, times ranging from 1 to 90 min, and pH ranging from 3 to 9. The suspensions were centrifuged, and the supernatant was examined using a Lambda UV/vis spectrophotometer (Perkin Elmer) to measure how much dye had been removed from the aqueous solution. Using the following formula, the adsorption capacity and dye removal percentage were determined.

$${\mathrm{q}}_{\mathrm{t}}=\frac{{\mathrm{C}}_{0}-{\mathrm{C}}_{\mathrm{t}}}{\mathrm{M}}\mathrm{ V}$$
(1)
$$\mathrm D\mathrm y\mathrm e\;\mathrm r\mathrm e\mathrm m\mathrm o\mathrm v\mathrm a\mathrm l\;\%=\frac{{\mathrm C}_0-{\mathrm C}_{\mathrm e}}{{\mathrm C}_0}\times100$$
(2)

where qt, Co, and Ce are the amounts of adsorbed dye, the initial concentration of adsorbed dye, and the equilibrium concentration of adsorbed dye, respectively. And M and V are the weight of the adsorbent and the volume of the CV dye solution, respectively.

figure a

Structure of crystal violet dye.

3 Results and discussion

3.1 Characterization

3.1.1 Estimation of Holocellulose and Ash Content in PSH

Analysis of the chemical composition of PSH by using the TAPPI standard method (TAPPI T 413) showed a holocellulose content of 73.4%, and small amounts of ash of 0.81% were estimated. These substances have plenty of hydroxyl groups that can bind to cationic dyes [22].

3.1.2 Infra-red spectra

FTIR spectra (Fig. 1) of PSH powder, CS, CSN, and CST are gathered to investigate the hydrogen-based interactions and chemical functions for the modified cellulose preparation. The O–H stretch of the cellulose network is shown by a broad and distinct peak in the FTIR spectra of PSH at 3270 \({\mathrm{cm}}^{-1}\). The bands at 2930 cm−1 and 2860 cm−1 correspond to C–H stretching of methyl groups [23]. The peak at 1630 cm−1 is ascribed to the C = O (ketones, aldehydes, lactones, and carboxyl) derivatives [24]. The low intensity at 1510 cm−1 is attributed to aromatic C = C functionality [25]. Additionally, the structural skeleton of cellulose in PSH was validated by C–CH/O–CH bending modes at 1410 cm−1 and 1380 cm−1. The cellulose structure’s C–O–C and C–O connections are visible in the vibrational peak at 1030 cm−1. The signal at 563 cm−1 is a C–O–H twist-bending vibration [26].

Fig. 1
figure 1

FTIR spectra of pumpkin seed hulls PSH, cellulose CS, cellulose-nicotinic acid CSN, and cellulose-thiourea CST

The FTIR spectrum of CS powder exhibits vibrational features at 3320, 2910, 1730, 1370, 1320, and 560 cm−1, corresponding to O–H stretching, C–H stretch, C = O stretch, C–CH bending mode, and O–CH bending mode [27]. The backbone of the cellulose structure, which is based on the C–O–C and C–O links, was revealed by the numerous vibrational peaks at 1150, 1110, and 1030 cm−1 [28]. These vibrational peaks proved that cellulose had been prepared from pumpkin seed hulls.

The FTIR spectrum of CSN exhibits vibrational features at 1600, 1510, 1470, 1420, and 1320 cm−1 corresponding to C = O carboxyl, C = N stretching, aromatic C = C functionality, N–O stretching, and C–N stretching, respectively. This may result from the interaction of nicotinic acid and CS [29].

The FTIR spectrum of CST exhibits vibrational features at 1510, 1470, 1420, 1320, 1260, and 1200 cm−1 corresponding to C = N stretching, aromatic C = C functionality, N–O stretching, C–N, C = S, and C–S stretching, respectively. This may be due to the interaction of thiourea and CS [30].

The findings show that several peaks were shifted. These spectral changes suggest that certain functional groups on the CS surface and their modification may be involved in the biosorption process and its modification.

3.1.3 X-ray diffraction

The XRD analysis was conducted to investigate the crystalline structure of both the modified and native PSH. In Fig. 2, and in order to calculate the crystallinity index (CrI) of biosorbents, the Segal equation was used as follows [31]:

$$\mathrm{CrI }(\mathrm{\%})=\frac{\left({I}_{002 }- {I}_{AM}\right)}{{I}_{002}}\times 100$$
(3)

where the \(\left({I}_{002}-{I}_{AM}\right)\) is the intensity of the crystalline peak and I002 is the total intensity.

Fig. 2
figure 2

XRD patterns of PSH, CS, CSN, and CST

The native PSH displayed characteristic peaks at approximately 16°, 22.5°, and 34.5°, which correspond to the crystalline phase of cellulose. Using Eq. (3), the PSH crystallinity index (CrI) was 64.67% [32]. The XRD pattern of the cellulose sample CS revealed prominent peaks at 16.0°, 22.5°, and 34.5°, indicating an increase in crystallinity after the extraction process. The CS crystallinity index (CrI) was 83.24%.

Furthermore, the XRD pattern of the modified cellulose-nicotinic acid CSN exhibited changes in the crystalline peaks, which became sharper. This suggests an enhancement in the crystalline phase following the modification and addition of nicotinic acid. The CSN crystallinity index (CrI) was 84%. Similarly, the XRD data indicated an increase in the crystallinity of cellulose after the addition of thiourea. The CST crystallinity index (CrI) was 83.33%.

3.1.4 Brunauer–Emmett–Teller

To assess the specific surface area of CS, CSN, and CST, the Brunauer–Emmett–Teller (BET) analysis was conducted. The findings revealed that the specific surface area of cellulose CS was determined to be 1.3570 m2/g. Upon modification and the addition of nicotinic acid, the specific surface area of CSN increased to 2.4421 m2/g. Additionally, the modification of cellulose using thiourea resulted in a specific surface area of CST equal to 1.361 m2/g.

3.1.5 Thermal studies (thermogravimetric analysis)

Figure 3 shows the thermogravimetric analyses performed on pumpkin seed hull-derived cellulose and its modification. All samples, PSH, CS, CSN, and CST, exhibited an initial weight loss at 125 °C as a result of water molecules trapped inside cellulose pores evaporating. The PSH showed a noteworthy weight loss of 44.523% over a temperature range of 210 to 430°C, with the greatest degradation peak occurring at 360.66 °C, demonstrating the thermal disintegration of cellulose [33]. The CS showed a notable weight loss of 50.405% over a temperature range of 195–440 °C, with the greatest degradation peak occurring at 348.86 °C. The CSN showed a considerable weight loss of 55.642% over a temperature range of 215–420 °C, with the greatest deterioration peak shifting to 350.72 °C due to the addition of nicotinic acid. The CST displayed a considerable weight loss of 57.774% over a temperature range of 225–410 °C, with a maximal deterioration peak shifted to 359.09 °C due to the addition of thiourea.

Fig. 3
figure 3

TGA curves of PSH, CS, CSN, and CST

3.1.6 Scanning electron microscope

Figure 4 displays electron micrographs of (a) PSH, (b) CS, (c) CST, and (d) CSN. The image in Fig. 4a reveals that PSH possesses significant, large, and well-developed irregular cavities that are clearly apparent as dark spots. Upon cellulose extraction from PSH, as depicted in Fig. 4b, the number of pores noticeably increases, providing a favorable environment for dye trapping and adsorption. In Fig. 4c, CST exhibits abundant porosity with well-organized porous channels, wherein the cellulosic network enhances the integrity of the pore boundaries. However, in Fig. 4d, CSN displays a highly disorganized porous structure despite its high porosity. The incorporation of thiourea into cellulose strengthens the structure compared to CS and improves the porous volume compared to CST. Similarly, the blending of nicotinic acid with cellulose results in increased pore formation compared to CS.

Fig. 4
figure 4

SEM images and Eds of a PSH, b CS, c CST, and d CSN

3.1.7 Eds analysis

The elemental composition of the examined materials (a) PSH, (b) CS, (c) CST, and (d) CSN is determined using EDS analysis, as shown in Fig. 4. It is observed that raw PSH is composed of C, O, and Ca. After alkaline treatment, we will see a drop in O to remove impurities classified as lignin, hemicellulose, and excess metals to obtain crystalline cellulose. When cellulose is modified by thiourea, it observes that CST is composed of C, O, N, and S. When cellulose is modified by nicotinic acid, it observes that CSN is composed of C, O, and N (Figure 4).

3.2 Effect of crystal violet concentration on adsorption process

Given that the adsorbent material can only absorb a certain quantity of crystal violet dye, the initial dye concentration is critical to the adsorption process. During batch adsorption tests, 0.05 g of raw and composite materials were individually added to 50 mL solutions with different concentrations of crystal violet dye (ranging from 1.46 to 3.742 ppm). In order to examine the effects of various starting dye concentrations on adsorption, the tests were carried out at an ambient temperature of 295 K for 90 min. For cellulose CS, an increase in crystal violet initial concentration resulted in a higher adsorption capacity. For CS, the removal percentages were 46.2%, 58.6%, 66%, and 72.3%, and the exact dye adsorption capacity in mg/g were 0.337, 0.542, 0.8605, and 1.352 for concentrations of 1.46 ppm, 1.842 ppm, 2.852 ppm, and 3.742 ppm, respectively. This indicates that the surface of the initial substance has vacant binding sites, allowing for greater adsorption of crystal violet dye. In the case of nicotinic acid-loaded cellulose CSN, the status was somewhat changed. The percentages of dye removal of crystal violet on the composite surface were 46.4%, 58.6%, 66%, and 75.5%, and the exact dye adsorption capacity in mg/g were 0.339, 0.540, 0.852, and 1.4125 for concentrations of 1.46 ppm, 1.842 ppm, 2.852 ppm, and 3.742 ppm, respectively. It is evident that the removal percentage of crystal violet dye increases with increasing concentration. Similarly, for thiourea-loaded cellulose CST, the removal percentages of crystal violet dye on the composite surface were 47.1%, 59%, 70.5%, and 78.2%, and the exact dye adsorption capacity in mg/g were 0.344, 0.543, 0.9105, and 1.4625 for concentrations of 1.46 ppm, 1.842 ppm, 2.852 ppm, and 3.742 ppm, respectively (Fig. 5). Again, it is clear that the removal percentage of crystal violet dye increases with increasing concentration. Increasing the initial crystal violet dye concentration leads to a higher adsorption capacity and overcomes the resistance to mass transfer, which increases the driving force between the adsorbent and the adsorption medium. As the starting ion concentration rises, so does the number of ions that the adsorbent can remove. However, at larger concentrations, certain ions could not be adsorbed because the binding sites were saturated [34].

Fig. 5
figure 5

Effect of crystal violet initial concentration on CS, CSN, and CST adsorption capacity

During the 90-min test, all samples (CS, CSN, and CST) exhibited a relatively slower uptake, reaching a constant or equilibrium state at 90 min. At this point, the amount of dye removed was small, and the adsorption capacity remained constant. The accumulation of dye molecules’ blocking effect on pores and channels, which causes a slower rate of dye absorption into most adsorbents, is thought to be the cause of the decrease in uptake capacity in later stages [35].

3.3 Effect of pH on adsorption process

The pH of the solution is a crucial factor that significantly influences the efficiency of the adsorption process for crystal violet dye as well as the overall charge of the adsorbent [36]. Moreover, the acidity of the environment impacts the adsorbent’s ability to compete for hydrogen ions and cationic dye molecules on its surface [37]. In this study, we investigated the influence of pH in the pH range of 3 to 9 on the adsorption process under the specified experimental conditions [36]. The adsorption capacity significantly increased at a constant dye concentration (3.742 ppm) when the starting pH was raised from 3 to 7.5, yielding removal percentages of 72.3%, 75.5%, and 78.2%, and the exact dye adsorption capacities in mg/g were 1.352, 1.4125, and 1.4625 for CS, CSN, and CST, respectively (Fig. 6) [36]. However, beyond a pH of 7.5, the removal efficiency of the adsorbents CS, CSN, and CST decreased (Fig. 6) [36]. The adsorption capacity is highly dependent on the solution’s pH, which affects the surface charge and the chemistry of the cellulose materials [36]. In acidic conditions, the adsorption capacity was lower due to the abundance of H+ ions, which resulted in the protonation of active sites on the adsorbent and competed with cationic dye molecules for adsorption [37]. As the pH increased, the deprotonating of active sites enabled electrostatic interactions with the oppositely charged dye molecules, leading to higher adsorption capacity. The optimal pH for maximum adsorption was found to be 7.5, beyond which the adsorption capacity decreased [36]. This decrease could be attributed to the presence of hydroxyl groups in basic media, which competed with the negatively charged adsorbents CS, CSN, and CST for interaction with CV [38]. Therefore, a pH value of 7.5 was selected as the optimal condition and utilized for all subsequent adsorption studies [36]. Point zero charge (PZC) is a very useful parameter in sorption studies that allows one to hypothesize on the ionization of functional groups and their interactions with adsorbates. The pHpzc (pH of zero net proton charge) is defined here as the pH value at which the net surface charge is equal to zero. The determination of pHpzc was conducted by adjusting the pH of a 50 mL 0.01 M NaCl solution to a value between 2 and 12. CS, CSN, or CST 0.15 g was added, and the final pH was measured after 48 h under agitation. The pHpzc is the point where pHinitial − pHfinal = 0. PZC depends on the pH of the solution and the surface of the adsorbent. In this work, pH of CSN > PZC (PZC of CSN is 5.61, pH of the solution is 7.6), the surface of the adsorbent accomplishes negative charge, which indicates that acidic functional groups are present in CSN. Thus, at higher pH, this dye is susceptible to better adsorption. The pH value of pHpzc in CST is 5.18. The more negative pHpzc resulted in the deprotonation of the functional groups present on the surface of the CST and consequently acted as the attracting sites for the CV dye molecules, which will favor the electrostatic adsorption of CV dye. The pH value of pHpzc of CS is 6.0. The surface of the adsorbent accomplishes negative charge, which results in the deprotonation of functional groups present on the surface of CSN, which is good for electrostatic adsorption of CV dye.

Fig. 6
figure 6

Effect of crystal violet initial PH on CS, CSN, and CST adsorption capacity

3.4 Effect of adsorbent dosage

The quantity of adsorbent employed is a key factor that significantly influences the adsorption of dyes and directly impacts the percentage of dye removal. In this work, different doses of both the as-prepared cellulose and its modified forms, CS, CSN, and CST, were utilized, ranging from 0.05 to 1.0 g, under specific conditions (room temperature, pH = 7.5, initial concentration = 3.742 ppm) [39].

Figure 7 illustrates the adsorption behavior of CV dye in relation to varying doses of the adsorbents. It is evident that increasing the dosage of the tested adsorbent leads to a corresponding increase in the amount of CV dye eliminated from the solution [39]. This is explained by the large number of exchangeable and active groups that are present on the surfaces of CS, CSN, and CST, which readily interact with the molecules of dye, increasing removal efficiency per unit weight of the adsorbent [39].

Fig. 7
figure 7

The impact of various CS, CSN, and CST dosages on the adsorption of crystal violet dye

However, beyond a dosage of 0.1 g, the observed increments in removal capacity become negligible. This could be due to the saturation of the binding sites, where the number of available binding sites exceeds the number of CV molecules present in the fixed initial concentration utilized in this study [40], where at 0.1 g of CS, CSN, and CST the exact dye adsorption capacity in mg/g was 1.352, 1.4125, and 1.4625, respectively, and at 1.0 g of CS, CSN, and CST the exact dye adsorption capacity in mg/g was 1.444, 1.4335, and 1.4655, respectively.

3.5 Adsorption isotherm models

The Freundlich and Langmuir adsorption isotherm models are the two most often utilized in this context. As a result, these two isotherms’ models have been used to analyze the data from this study (Fig. 8). At a temperature of 295 K, the equilibrium isotherms of crystal violet dye adsorption on cellulose and its modifications were determined. Models for Freundlich’s [41] and Langmuir’s [42] isotherms’ linear equations were used to fit the experimental data.

Fig. 8
figure 8

The (a, b, c) Freundlich and (d, e, f) Langmuir isotherm models linear plots for CS, CSN, and CST adsorbents, respectively

The experimental data were fitted using two common isotherms, as indicated in Eqs. (4) and (5):

The linear form of the Freundlich model is as follows:

$${\mathrm{logq}}_{\mathrm{e}}=\frac{1}{n}{\mathrm{log}}_{{\mathrm{C}}_{\mathrm{e}}}+{\mathrm{logk}}_{F}$$
(4)

The linear form of the Langmuir model is as follows:

$$\frac{{\mathrm{C}}_{\mathrm{e}}}{{\mathrm{q}}_{\mathrm{e}}}=\frac{1}{{\mathrm{k}}_{l}{Q}_{max}}+\frac{{\mathrm{C}}_{\mathrm{e}}}{{Q}_{max}}$$
(5)

Another important parameter (\({R}_{\mathrm{L}}\)) called the separation factor was calculated:

$${R}_{L}=\frac{1}{1+{\mathrm{k}}_{\mathrm{L}}{\mathrm{C}}_{0}}$$
(6)

where the equilibrium concentration (Ce) is measured in mg/L and qe is the amount adsorbed at equilibrium (mg/g). The Freundlich constant (Kf) is related to the adsorption capacity of the adsorbent (mg1−(1/n) L1/n/g). The kF (mg/g) results are estimated from the linear plots’ intercept. The (1/n) value, which is calculated from the slope of the plots of Freundlich Eq. (4) is the Freundlich-exponent related to adsorption intensity.

Where (\({Q}_{max}\)) is the maximum adsorption capacity of the adsorbent (mg/g), KL is the Langmuir constant related to the energy of adsorption (L/mg), and C0 represents the sorbate’s starting concentration (mg/g). KL and \({\mathrm{Q}}_{\mathrm{max}}\) can be calculated from the slope and intercept of the linear plot of 1/qe versus 1/ce. Another important parameter, RL, called the separation factor, was calculated to identify whether an adsorption system is favorable or unfavorable. The relationship in Eq. (6) can be used to calculate RL in the temperature range of 295–323 K for crystal violet. RL describes the type of Langmuir isotherm (RL = 0 irreversible, RL between 0 and 1 A favorable, RL = 0 linear, and unfavorable RL > 1).

The values of (n) in Freundlich Eq. (4) are (2.91, 3.18, and 3.52) for crystal violet on CS, CSN, and CST, respectively. The value of kF was also (1.36, 1.37, and 1.38) of al CS, CSN, and CST, respectively, indicating better sorption at the experimental conditions.

In terms of R2 values (0.99998, 0.99996, and 0.99999) for al. CS, CSN, and CST, respectively, it is obvious that the Langmuir equation gave superior fitting. compared with Freundlich (0.99993, 0.99984, and 0.99996) for al. CS, CSN, and CST, respectively. In terms of R2 values, it is obvious that the Langmuir equation gave superior fitting as presented in (Table 1) and (Table 2), demonstrating that this adsorption is chemical adsorption. The relationship between the amount of dye adsorbed and its equilibrium concentration in solutions was described by the Langmuir model. It is demonstrating that the isotherms could be well fit for the experimental data of crystal violet adsorption on these substances [43].

Table 1 Adsorption isotherm parameters of dye on CS, CN, and CT in aqueous solution
Table 2 Adsorption isotherm parameters of dye on CS, CN, and CT in aqueous solution

The values of \({\mathrm{Q}}_{\mathrm{max}}\) are (1.035, 1.083, and 1.134 mg/g) of al CS, CSN, and CST, respectively, whereas according to the intercepts of the plots, the values of (KL) for crystal violet are (0.2352, 0.1971, and 0.1613 mol L−1) of al CS, CSN, and CST, respectively. The values of (RL) for al CS, CSN, and CST are (0.5317, 0.5755, and 0.6236), respectively, and they indicate a very favorable sorption at the solution temperatures examined in this study. The Qmax parameter denotes equilibrium monolayer saturation. The detected K values implied a high affinity of al CS, CSN, and CST to CV dye, where K specifies the binding affinity for CV dye.

3.6 Kinetic modeling

The experimental data on the adsorption of crystal violet dye on CS, CSN, and CST were tested in terms of pseudo-first-order, pseudo-second-order, intraparticle diffusion, and liquid-film diffusion (Fig. 9).

Fig. 9
figure 9

Kinetic models of a pseudo-first order, b pseudo-second order, c intra-particle diffusion model, and d liquid film diffusion for CS, CSN, and CST

The pseudo-first-order kinetic equation is as follows:

$$\mathit{log}\left({\mathrm{q}}_{\mathrm{e}}-{\mathrm{q}}_{\mathrm{t}}\right)={\mathit{log}}_{{\mathrm{q}}_{\mathrm{t},1,\mathit{cal}}}- {\mathrm{K}}_{1}\mathrm{t}$$
(7)

where qt and qe are the amount of solute adsorbed per unit weight of adsorbent (mg/g) at t (min) and equilibrium, respectively. k1 (min−1) is a pseudo-first-order rate constant that can be determined by plotting log (qe \(-\) qt) versus t.

The pseudo-second-order equation:

$$\frac{\mathrm{t}}{{\mathrm{q}}_{\mathrm{t}}}=\frac{1}{{\mathrm{k}}_{2}{\mathrm{q}}_{\mathrm{e},2}^{2}}+\left(\frac{1}{{\mathrm{q}}_{\mathrm{e},2}}\right)\mathrm{t}$$
(8)

In this equation, qe is the quantity of soluted sorbate at equilibrium (mmol/g), qt is the quantity of soluted sorbate on the surface at any time t (mmol/g), and K2 is the rate constant of pseudo-second-order sorption (gm mmol−1 min−1). After plotting t/qt vs. t, the intercept and slope may be used to determine k2 and qe.

$$\mathrm{h }= {\mathrm{k}}_{2}{\mathrm{q}}_{\mathrm{e},2}^{2}$$
(9)

where h mmol g−1min−1 is the constant that provides the value of the rate of initial adsorption; this constant can be experimentally determined from the plot of t/qt vs. t.

Intra-particle diffusion model:

The intraparticle diffusion's initial rate is written as follows:

$${\mathrm{q}}_{\mathrm{t}} = - {\mathrm{k}}_{\mathrm{ipd}} {\mathrm{t}}^{0.5} +\mathrm{ c}$$
(10)

where kipd is the rate coefficient of intraparticle diffusion (mg g−1min−0.5) and c (mmol g−1) provides information about the thickness of the boundary layer. The slope and intercept of a linear plot of qt vs. t0.5 can determine ki and c.

Liquid-film diffusion model:

The Liquid-film diffusion’s initial rate is written as follows:

$$\mathrm{ln}(1-\mathrm{ F })= {\mathrm{k}}_{\mathrm{fd}}\mathrm{ t}+\mathrm{ c}$$
(11)

where kfd is the liquid-film diffusion rate coefficient, the equilibrium fraction attainment is F = \({q}_{t}/{q}_{e}\), and c provides information about the thickness of the boundary layer. The slope and intercept of a linear plot of \(\mathit{ln}(1- F )\) vs. t can determine kf and c.

The results for all adsorbents show that crystal violet has a strong correlation coefficient with the pseudo-second-order kinetic model (R2 > 0.99) as presented in Table 3. In addition, the calculated qe from the pseudo-second-order model is very closely similar to the experimental qe for crystal violet adsorption by CS, CSN, and CST. Therefore, the pseudo-second-order model is the best model to predict the kinetic behavior of crystal violet adsorption.

Table 3 Kinetic parameters CV on cellulose, CN, and CT in an aqueous solution

The high applicability of the pseudo-second-order model for this work’s kinetic data at all temperatures generally agrees with other studies results. Thus, the kinetics of crystal violet adsorption could be well described by the pseudo-second-order equation [44, 45].

3.7 Thermodynamic studies

In general, various thermodynamic parameters were taken into consideration to assess the feasibility and nature of the adsorption process. Thermodynamics of CV adsorption from their solutions onto CS, CSN, and CST were studied in this work at 295, 303, 313, and 323 K with optimized parameters. The enthalpy value ∆H° (kJ mol−1), entropy value ΔS° (J mol−1K−1), and free energy of activation value ΔG° (kJ mol−1) were calculated using the following equations:

$$\mathrm{\Delta G }= \Delta \mathrm{H }-\mathrm{ T \Delta S}$$
(12)
$$\Delta \mathrm{G }= - RT\mathrm{ l}n{\mathrm{k}}_{\mathrm{d}}$$
(13)

where \({\mathrm{k}}_{\mathrm{d}} = \frac{{\mathrm{q}}_{\mathrm{e}}}{{\mathrm{c}}_{\mathrm{e}}}\)

$$\mathrm{log }{\mathrm{k}}_{\mathrm{d}} = \frac{\Delta \mathrm{S}}{2.303\mathrm{ R}} - \frac{\Delta \mathrm{H}}{2.303\mathrm{ RT}}$$
(14)

In this study, the temperature range of 295–323 K was examined, and it was observed that the adsorption process of CV occurred spontaneously, as indicated by the negative values of ∆G° shown in Table 4. This suggests that higher temperatures are favorable for improved adsorption. The positive values of entropy change (∆S°) further support the presence of increased randomness at the solid-solution interface during the adsorption process. Specifically, for CT, the enthalpy change (∆H°) exhibited a negative value, indicating an exothermic adsorption process of CV onto CS and CSN. Conversely, for CS and CSN, the enthalpy change (∆H°) showed a positive value, indicating an endothermic nature of the adsorption process [46].

Table 4 Thermodynamic parameters of dye on CS, CSN, and CST in aqueous solution

To evaluate the surface coverage and adsorption kinetics, the modified Arrhenius equation [47] was employed. The calculated values for Ea (apparent activation energy) and S* (sticking probability) were found to be positive, as presented in Table 3. Moreover, the obtained S* values were less than 1, indicating a very high likelihood that the surfaces of CS, CSN, and CST will adhere to the CV dye [48, 49].

$$\uptheta = 1 - \frac{{\mathrm{C}}_{\mathrm{e}}}{{\mathrm{C}}_{0}}$$
(15)
$${S}^{*} = (1-\uptheta )\mathrm{ exp }(- \frac{\mathrm{Ea}}{\mathrm{RT}} )$$
(16)

4 Adsorption mechanism

Accurate knowledge of the adsorption mechanism is necessary in order to completely comprehend the adsorption mechanism by which crystal violet dye binds to the prepared adsorbents. Actually, depending on the surface and textural properties of the adsorbent and how the adsorbate diffuses toward it, the sorption process of CV dye occurs through chemisorption. In this particular case, the dye is removed by the oxygenated functional groups (–COO − , and –OH), (–NH2) group, and (–SH) group and present on the surface of the as-prepared CS, CSN, and CST in aqueous media, as evidenced by FTIR spectra. These groups possess a potent power to draw species with an opposing charge and ward off those with the same charge. Since CV is cationic, this leads it to be strongly drawn from the solution to the surface of the composite CS, CSN, and CST (Scheme 1). The Langmuir isotherm is followed during the adsorption process, and the kinetic data indicates that the chemisorption mechanism governs the adsorption of CV dye.

Scheme 1
scheme 1

Adsorption mechanisms of dye removal

5 Conclusion

This study examined the adsorption behavior of crystal violet dye on cellulose and its modified forms, nicotinic acid-loaded cellulose CN and thiourea-loaded cellulose CT. The adsorption process followed a pseudo-second-order kinetic model, indicating a chemical adsorption mechanism, with monolayer adsorption observed according to the Langmuir isotherm model. Thermodynamic analysis revealed that cellulose and nicotinic acid-loaded cellulose exhibited spontaneous and exothermic adsorption, while thiourea-loaded cellulose showed endothermic behavior. The characterization techniques employed, including XRD, BET analysis, and electron microscopy, provided insights into the structural and morphological changes of the cellulose materials. Thiourea-loaded cellulose demonstrated superior adsorption capacity compared to cellulose and nicotinic acid-loaded cellulose, highlighting its potential for effective dye removal in wastewater treatment applications. Further research can explore the broader application of modified cellulose materials for the removal of other pollutants in wastewater treatment processes.