Introduction

Water is an essential element of ecosystem. The existence of pharmaceutical products and chemical dyes in water and wastewater is toxic and carcinogenic, posing a threat to all living organisms on the trophic chain, including human health. As soon as they released in water, it becomes unsafe for drinking and so resulting numeral health problems. Consequently, the elimination of these contaminants is imperative. While water is contaminated, several consequences can occur, such as temperature and color changing, undesired acidity or alkalinity, unpleasant odor, and turbidity caused by organic or inorganic solids. Moreover, the generated wastewater of various industries such as food production, leather processing, paper production, printing, paints, and cosmetics, which also contain dyes, pose a significant threat to the environment by being discharged into fresh waters1,2,3,4,5,6,7,8,9,10.

Azo colors constitute around 70% of the 800,000 tons of colors delivered globally each year, making them the most used and hazardous dyes in the textile industry. Due to their aromatic complex nature, azo dyes resist traditional wastewater handling methods, posing environmental challenges. Reactive dyes, including azo, anthraquinone, oxazine, and phthalocyanine groups, are favored for their enduring color in textiles. However, the toxicity of dyestuffs, especially azo colors, is a growing concern, requiring innovative and cost-effective methods for their removal from material wastewater. This is vital due to the high resistance of azo colors to sunlight degradation, posing a substantial environmental risk11,12,13,14,15,16,17.

Pharmaceuticals, including the widely used non-prescription anti-inflammatory medication ketoprofen (2-(3-benzoylphenyl) propionic acid), have been found in groundwater, surface water, and streams, as well as in sludge, soil, and sediment samples. The inefficiency of treatment plants contributes to this presence. Ketoprofen, known for its affordability, is commonly prescribed for muscle and joint pain, arthritis, and inflammation, but prolonged or excessive use can lead to adverse health effects, including gastrointestinal problems. Despite the lack of specific legislation, increasing environmental and health concerns have prompted the scientific community to improve methods for the elimination of pharmaceutical compounds like ketoprofen18,19,20,21,22,23,24,25.

Therefore, there is a pressing need for an effective system to eliminate these compounds from aquatic environments. Various methods, including separation membrane, chemical oxidation, and biodegradation, have been utilized for organic compound removal. However, these approaches often produce secondary pollutants or involve time-consuming processes. The adsorption process, employing affordable and readily available adsorbents, stands out as one of the most efficient, straightforward, and cost-effective methods for removing dyes and drugs26,27,28,29,30,31,32,33,34,35. As the effectiveness of adsorption is closely tied to the quality and cost efficiency of the adsorbent, diverse materials have undergone scrutiny in recent years. The application of luffa in adsorption processes has garnered significant acclaim among researchers36,37,38,39,40,41. Luffa is composed of three main components: cellulose (60%), hemicelluloses (30%), and lignin (10%), classifying as a lignocellulosic material. Its fibrous nature, large surface area, impressive mechanical strength, low cost, light weight, and renewable origin are its most notable advantages.42,43,44.

This investigation signifies an innovative effort as it introduces a novel modification process applied to luffa for the first time, involving silver nanoparticles. This transformation makes it a highly effective adsorbent for removing both ketoprofen and reactive yellow 15 from water. Raw luffa inherently possesses a limited capacity for adsorbing contaminants. To overcome this limitation, luffa was modified with silver nanoparticles. Silver nanoparticles are recognized for their significant adsorption capacity for various chemical species, including methylene blue, agrochemicals, and organic compounds like quinolones, pyrene, and ketones. Moreover, they have been employed for the adsorption of inorganic compounds45,46,47,48,49,50. Silver nanoparticles meticulously prepared via the chemical oxidation method. The selection of the chemical oxidation method was driven by its effectiveness in surface functionalization, increased surface area, enhanced adsorption affinity, and its alignment with eco-friendly practices51,52,53. This resulted in the creation of a novel nanocomposite, denoted as luffa-silver nanoparticles (LF/AgNPs). Essentially, luffa served as a supportive matrix for the silver nanoparticles, enhancing its adsorptive capabilities. The LF/AgNPs displayed remarkable potential as an adsorbent and exhibited substantial removal rates. Notably, LF/AgNPs offered a cost-effective, eco-friendly, and non-toxic solution for the elimination of ketoprofen and reactive yellow 15. The study precisely explored various crucial parameters, including pH, contact time, concentration, adsorbent dosage, and agitation technique to optimize the adsorption process. Furthermore, the research delved into mathematical modeling, precisely assessing the kinetics and adsorption isotherms, providing valuable insights into the intricate adsorption mechanisms at play.

Materials and chemicals

Materials and equipment

Ketoprofen and RY15 were obtained from Temadkala Pharmaceutical Company (IRAN) with a purity of more than 99%. The specific chemicals used in this study including polyvinyl pyrrolidone (1000 MV), ethane-1,2-diol (99.8%), silver nitrate (99.99%), 3-aminopropyl triethoxy silane (APTES) (99%), 2-hydroxybenzaldehyde (99%), ethanol (EtOH) (96%), methyl alcohol (99.99%), hydrochloric acid (37%), and sodium hydroxide were purchased from Merck Company.

Synthesis of luffa powders

The luffa was purchase from a store located in Isfahan. The luffa was reduced in size by being fragmented and purified with distilled water to eliminate any foreign matters that could dissolve into the water. Subsequently, it was dehydrated in an oven set at 40 °C for 4 h. After that, the reduced fragments of luffa were ground for 25 min using a ball mill operating at 20 Hz, resulting in white luffa powder.

Applying silver nanoparticles to the surface of luffa for modifying

APTES and 2-hydroxybenzaldehyde were utilized as connectors to surge the quantity of Ag on the surface of luffa through silver nanoparticle modification54. The first step involved refluxing 1 g of luffa powder with 70 mmol APTES and 25 ml of EtOH for 48 h, resulting in a precipitate labeled A. The solid substance obtained was subjected to filtration and multiple washing procedures with DI water and EtOH and dried at 40 °C for 4 h. Next, substance A in solid form was refluxed with 10 mmol 2-hydroxybenzaldehyde and 25 ml EtOH for 24 h, resulting in another precipitate named B. This collected solid was subjected to filtration and multiple rounds of washing with DI water and ethanol, and dried at 40 °C.

The chemical reduction approach was employed to synthesize silver nanoparticles in the third step55. AgNO3 was utilized as a precursor, and polyvinylpyrrolidone (PVP) and ethylene glycol (EG) were utilized as stabilizer and reducing agent, respectively. To dissolve PVP in EG, a flask was loaded with 40 ml of Ethylene glycol and 4 g of PVP and placed in an ultrasonic bath. The potential interaction that may occur between PVP and silver nitrate in the process of AgNPs formation is illustrated in Fig. 1.

Figure 1
figure 1

The potential interaction of PVP and AgNO3 during the formation of AgNPs.

A reddish-brown solution, called Solution C, was produced by gradually adding a solution to 2 mmol of silver nitrate in a container that was protected by aluminum foil. The container was then put in an ultrasonic bath at 25 °C for duration of 30 min until the reaction was completed.

To modify the surface of the luffa by AgNPs, the magnetic stirrer was used to stir precipitate B and solution C for a duration of 48 h in a dark area. Once the reaction was complete, the brown collected solid was subjected to filtration and multiple rounds of washing with distilled water and EtOH, and subsequently, it was dried for 1 h at a temperature of 40 °C. Figure 2 illustrates the different steps involved in the preparation of the LF/AgNPs adsorbent.

Figure 2
figure 2

The preparation process of LF/AgNPs.

Experimental method

The adsorption experiments were carried out in a 10 mL falcon tube under consistent agitation using digital vortex mixers at ambient temperature. Investigations were carried out under optimum contact time, contaminant concentration, pH, and adsorbent dosage by one-at-a-time method. A solution of HCl/NaOH with a concentration of 0.1 M was utilized to adjust the pH. To perform the adsorption of ketoprofen and RY15 onto LF/AgNPs, a 10 mL solution of the contaminant was blended with the adsorbent. Following the conclusion of the adsorption process, the solution underwent centrifugation at 5000 rpm for 10 min to separate the LF/AgNPs. The residual concentration of contaminants was then determined spectrophotometrically. The following equations show the calculation methods for ketoprofen and RY15 adsorbed at equilibrium qe (mg/g), and the removal rate:

$${{\text{q}}}_{{\text{e}}}=\frac{\left({{\text{C}}}_{0}-{{\text{C}}}_{{\text{e}}}\right)\times {\text{V}}}{{\text{m}}}$$
(1)
$$\mathrm{Removal efficiency }(\mathrm{\%})=\frac{{{\text{C}}}_{0}-{{\text{C}}}_{{\text{e}}}}{{{\text{C}}}_{0}}\times 100$$
(2)

\({{\text{C}}}_{0}\) (mg/L) is the starting concentration, \({{\text{C}}}_{{\text{e}}}\) (mg/L) is the equilibrium concentration of contaminant, m (mg) is the adsorbent dosage added to the solution, and V (ml) is the volume of the solution56,57.

Characterization

To study the morphological characteristics and perform elemental analysis of the adsorbent, scanning electron microscopy (SEM) coupled with energy dispersive X-ray (EDAX) analysis was employed. The analysis was carried out using the Te-scan, MIRA III equipment from the Czech Republic. To determine the functional group present in the adsorbents, Fourier Transform Infrared spectrometry (FT-IR) was conducted using a Thermo AVATAR IR spectrophotometer, with a spectral range of 4000–400 cm−1. Brunauer–Emmett–Teller (BET) technique was used to obtain the porous structural data for luffa sponge, powdered luffa, and LF/AgNPs. The concentration variations in the solutions were determined using a UV–Visible spectrophotometer (T80 + , PG, UK). Additionally, X-ray diffraction (XRD) patterns were obtained using a diffractometer (Bourevestnik, DRON-8) equipped with Cu Kα radiation and operated at 40 kV and 40 mA, over a range (2θ) of 10°–80°.

Results and discussion

Characterization

As shown in Fig. 3, EDAX analysis is employed to exhibit the elements present in the LF/AgNPs structure. In addition, the luffa contains the 2-hydroxybenzaldehyde linker, which plays a more significant role compared to other components. The detection of silicon and nitrogen peaks in the analysis can be indicative of the presence of the 3-aminopropyl triethoxysilane linker. To summarize, the appearance of a silver peak in the analysis may show the presence of silver particles on the surface of the LF/AgNPs adsorbent. Moreover, it is evident that the element with the highest distribution is carbon. This can be attributed to the presence of carbon in both the luffa structure and the salicylic aldehyde linker structure.

Figure 3
figure 3

EDAX spectra of LF/AgNPs.

Figure 4a depicts the structure of a luffa sponge. The SEM image displays that unmodified luffa has a fibrous structure with varying fiber diameters. However, as seen in Figs. 4b, the fibrous structure is lost in the luffa powders. Figures 4c exhibit pictures of the LF/AgNPs structure, in which the luffa surface is covered with silver nanoparticles having a spherical shape, and their arrangement can be clearly observed. On the LF/AgNPs substrate, Fig. 4d illustrates the size distribution of silver nanoparticles, indicating an average size ranging from 20 to 25 nm.

Figure 4
figure 4

SEM images of (a) luffa sponge, (b) luffa powder, (c) LF/AgNPs, (d) size distribution of silver nanoparticles on the LF/AgNPs adsorbent.

The TEM image of LF/AgNPs offers a detailed glimpse into the structure of silver nanoparticles, as depicted in Fig. 5. The image distinctly illustrates the uniform dispersion of silver nanoparticles within the luffa framework, devoid of any agglomeration. Moreover, the image reveals that the silver nanoparticles assume a spherical form.

Figure 5
figure 5

TEM image of LF/AgNPs.

Table 1 presents the porous structural data obtained from BET analysis for luffa sponge, powdered luffa, and LF/AgNPs. The luffa sponge exhibits a limited surface area, but after ball-milling, both surface area and pore volume increase. Ball-milling disrupts the fibrous structures of luffa, exposing more surfaces and opening its pores. The surface area of LF/AgNPs is comparable to powdered luffa, but the pore volume is reduced, possibly due to the dispersion of nanoparticles within the pores. While the presence of silver nanoparticles decreases porosity, it enhances active adsorbent sites for the elimination of contaminants.

Table 1 The porous structural data obtained from BET analysis.

FT-IR analysis was conducted to confirm the process of modifying the surface of luffa by using AgNPs. Figure 6a depicts the raw luffa spectrum, and the peak observed around 3400 cm−1 is the stretching vibrations of OH– groups on the surface of luffa. Additionally, the peak observed at approximately 2900 cm−1 is associated with both symmetric and asymmetric stretching vibrations of C–H bonds. The peak observed around 1650 cm−1 is the vibrations of C=C and C=O bonds. The stretching vibration peaks observed at approximately 1055 cm−1 and 1115 cm−1 suggest the presence of C–OR and anhydroglucose in cellulose, as reported in previous studies4,42,58. Figure 6b presents the spectrum of LF/AgNPs which demonstrates the investigation of the binding of 4-aminopropyl triethoxysilane molecules on the surface of luffa. The bending and stretching vibration peaks of the N–H bond were not visible in the spectrum due to the overlapping of the peaks at 1650 cm−1 and 3400 cm−1. However, it can be observed that the intensity of these peaks has increased59. The presence of a Si–O–C peak observed at approximately 1240 cm−1, along with the aforementioned peaks, provides evidence of the attachment of an amino linker to the luffa structure, as reported in previous studies60. Moreover, the C=N peak observed at 1634 cm−1 provides evidence of the binding of salicylic aldehyde to 4-aminopropyl triethoxysilane, which forms an imine group61. The vibrational peaks associated with the stretching of C=C bonds in the aromatic ring of salicylic aldehyde are visible at approximately 1634 cm−1 and 756 cm−1. It is worth noting that the peak observed at 1634 cm−1 has overlapped with the previous peaks, and its intensity has increased62. Peaks observed in the range of 1400–1500 cm−1 are associated with the vibration of the –N–C– group. It should be noted that the stretching peak at 1650 cm−1, which belongs to the C=O group of polyvinyl pyrrolidone, is observed to overlap with the previous peaks. Additionally, it is observed that the peak at 502 cm−1 corresponds to the vibration of the Ag–O bond42,63,64.

Figure 6
figure 6

FT-IR spectra of (a) raw luffa and (b) LF/AgNPs.

The X-ray diffraction (XRD) pattern of LF/AgNPs is depicted in Fig. 7. The XRD pattern of LF/AgNPs displays peaks at 2θ of 35.84, 45.68, 64.76, and 77.64, which are the lattice planes (111), (200), (220), and (311), respectively, indicating the face-centered cubic (FCC) silver nanoparticle structure. Therefore, the XRD pattern clearly indicates that the synthesized silver nanoparticles are crystalline in nature42. Furthermore, the obtained diffraction patterns were compared with JCPDS card numbers, and it was found that they closely matched with the card number 04-0783.

Figure 7
figure 7

XRD pattern of LF/AgNPs.

The potential zeta test was conducted to measure the surface charge of luffa and LF/AgNPs at pH 3–7. Figure 8 displays the outcomes, revealing that LF/AgNPs had a PZC value of 5.39. The original luffa material carried a negative charge, but the alteration of its surface with silver nanoparticles led to a modification of its charge. When the pH value is below 5.39, the LF/AgNPs material acquires a positive charge that is notably cationic when the pH is at 3. If the pH value exceeds 5.39, the surface of the adsorbent becomes negatively charged. It is worth noting that each particle demonstrates distinct characteristics at varying pH levels. By selecting the suitable pH level, this arrangement can govern the behavior and reaction of the adsorbents in different environments.

Figure 8
figure 8

Diagrams of LF/AgNPs and raw luffa zeta potential at pH 3–7.

Investigation of the Effect of various parameters on the adsorption process

Effect of agitation technique

The stirring method is a crucial factor to consider as it enhances the contact area between the sample solution and the adsorbent. To this end, three stirring techniques, namely mechanical stirring, vortex, and ultrasonication, were assessed. As shown in Fig. 9, the elimination efficiency is greater for vortex and magnetic stirring. The reason for the lower removal rate in the ultrasonication method can be the expulsion of particles from the surface of the adsorbent due to the intensity of the ultrasonic waves.

Figure 9
figure 9

The effect of agitation technique within 10 and 30 min under the optimum conditions.

Effect of solution pH

Another parameter that affects the adsorption process is pH. The initial pH value can be adjusted to determine the features of the adsorbent, such as the surface charge and ionization degree. In this study, the influence of pH was investigated over a range of 2–11. As previously mentioned, the LF/AgNPs had a PZC of 5.39. This implies that the surface charge is positive when the pH is less than 5.39, and negative when the pH is greater than 5.39. On the one hand, since ketoprofen is in the weak acidic range (ketoprofen pKa = 4.45), it can exhibit different behaviors at different pH levels. For instance, at pH levels below pKa, ketoprofen exist as a neutral species, whereas at pH levels higher than pKa, it is present in anionic form. The pH-dependent adsorption of Ketoprofen onto LF/AgNPs is illustrated in Fig. 10. The peak adsorption rate was observed at pH = 5 for Ketoprofen, where the anionic form of ketoprofen can be electrostatically adsorbed onto the positively charged adsorbent. For pH values below pKa, the neutral form of Ketoprofen can adhere to the surface through Van der Waals interactions or hydrogen bonding. On the other hand, the removal efficiency of RY15 is also shown in Fig. 10. RY15 removal efficiency dropped from 98 to 6% by increasing the pH from 2 to 11. The higher rate of RY15 elimination by LF/AgNPs at acidic pH is assigned to the electrostatic attraction among the charged molecular substances of adsorbent and RY15 molecules. By reducing the pH to 2, these positively charged groups become more available. Electrostatic exchanges between these opposing groups with negative and positive charges could be the primary system concerning ketoprofen and RY15 removal. Through an electrostatic interaction, the negative \({-{\text{SO}}}_{3}^{-}\) group of the anionic dye interacts with a positive composite group, as reported in previous studies65.

Figure 10
figure 10

The effect of pH on the removal of RY15 and ketoprofen under the optimum conditions (contact times of 60 min and 40 min, adsorbent dosage of 25 mg and 25 mg, and initial concentrations of 100 mg/L for ketoprofen and 25 mg/L for RY15, respectively).

Effect of contact time

Typically, the elimination efficiency is dependent on the duration of contact between the adsorbate and sorbent. In general, the removal of pharmaceuticals tends to increase with the contact time until equilibrium is attained. After the equilibrium point, there is typically no significant further uptake of the adsorbate. The effect of contact time on the adsorption process of ketoprofen and RY15 were investigated in the range of 0–100 min for ketoprofen, and 0–80 min for RY15. As depicted in Fig. 11, the elimination rate of Ketoprofen and RY15 increased with an increase in time until a maximum time of 60 min and 40 min is reached respectively. The equilibrium state was achieved at 60 min for ketoprofen and 40 min for RY15. This suggests that the adsorbent becomes saturated with the adsorbate after the equilibrium point. Accordingly, at these points, the optimum contact times were established for the following investigations.

Figure 11
figure 11

The effect of contact time on the (a) ketoprofen and (b) RY15 removal under the optimum conditions (pH levels of 5 and 2, adsorbent dosage of 25 mg and 25 mg, and initial concentrations of 100 mg/L for ketoprofen and 25 mg/L for RY15, respectively).

Impact of initial concentration

The initial concentration is one of the most crucial factors that have an impact on the adsorption rate. It is necessary to confine the influence of the primary concentrations of ketoprofen and RY15. The effect of initial concentration on the removal efficiency is illustrated in Fig. 12a,b. The maximum removal efficiency of 98% was seen at both ketoprofen and RY15 in concentrations of 100 mg/L and 25 mg/L, respectively. The lowest removal of 49% for ketoprofen and 47% for RY15 was observed at 300 mg/L and 200 mg/L, respectively. At lower concentrations, the total available active zones remain constant, allowing effective removal of contaminants. As concentrations increase, the number of contaminant molecules rises, potentially exceeding the capacity of the available active zones. Consequently, higher concentrations result in lower removal efficiency, indicating that all active zones are not utilized efficiently. Just about all ketoprofen and RY15 were removed. Furthermore, the adsorption capacity is higher at lower concentrations because a greater proportion of available active sites can accommodate adsorbate molecules. At higher concentrations, the saturation of active sites may occur, leading to a plateau or decrease in adsorption capacity despite the overall increase in the number of adsorbate molecules in the system. To address this paradox and optimize factors, a concentration of 100 mg/L for ketoprofen and 25 mg/L for RY15 was selected for further investigations. This concentration optimization ensures effective utilization of available active zones while maintaining high removal efficiency for both ketoprofen and RY15.

Figure 12
figure 12

The effect of initial concentration on the (a) ketoprofen and (b) RY15 removal under the optimum conditions (pH levels of 5 and 2, contact times of 60 min and 40 min, and adsorbent dosage of 25 mg for ketoprofen and 25 mg for RY15, respectively).

Effect of adsorbent dosage

The significance of adsorbent dosage is primarily linked to the removal efficiency and overall cost of the process. The adsorption rate of Ketoprofen and RY15 were assessed by varying the dosage of LF/AgNPs at the optimal contact time. As depicted in Fig. 13, the highest removal rate of 97% and 99% was achieved for ketoprofen and RY15 respectively with a dosage of 25 mg of LF/AgNPs. As the amount of adsorbent increased, the removal percentage also increased, which is likely due to the increase in active sites resulting from the higher adsorbent dosage. A 25 mg sorbent dosage was chosen in the following investigations to optimize the remaining factors.

Figure 13
figure 13

The effect of adsorbent dosage on the ketoprofen and RY15 removal under the optimum conditions (pH levels of 5 and 2, contact times of 60 min and 40 min, and initial concentrations of 100 mg/L for ketoprofen and 25 mg/L for RY15, respectively).

Adsorption isotherm

Understanding the adsorption isotherm is important to determine an optimal elimination procedure. This study utilized the non-linear forms of Langmuir, Freundlich, Temkin, and Dubinin–Radushkevich (D–R) equations to characterize the equilibrium adsorption at a temperature of 25 °C. The constant factors related to the analyzed isotherms are described in Table 2. R2 (Regression coefficient values) defines the practicality of the model. The closer the R2 value goes to one, the better the isotherm model could define the elimination procedure. The Langmuir model is the most widely used equation that considers the adsorbed substance to form a monolayer with a thickness of one molecule. In the Langmuir model, the adsorption occurs as a single layer of molecules. The equation for the non-linear form of the Langmuir adsorption isotherm model is expressed as below66,67:

Table 2 Basic parameters calculated for isotherms.
$${{\text{q}}}_{{\text{e}}}=\frac{{{\text{q}}}_{{\text{m}}}{{\text{K}}}_{{\text{L}}}{{\text{C}}}_{{\text{e}}}}{1+{{\text{K}}}_{{\text{L}}}{{\text{C}}}_{{\text{e}}}}$$
(3)

In the Langmuir adsorption isotherm model, qe (mg/g) represents the equilibrium adsorption capacity, qm (mg/g) is the maximum adsorption capacity, Ce (mg/L) is the equilibrium concentration of adsorbate in the solution after adsorption, and KL (L/mg) is the Langmuir constant. RL is an additional factor used to forecast the likelihood of the adsorption process. RL is a unitless separation factor that should always fall between zero and one to indicate favorable adsorption (0 < RL < 1). The isotherm type is determined by the value of RL, where RL = 1 represents a linear isotherm, RL > 1 indicates unfavorable adsorption, and RL = 0 signifies irreversible adsorption. Equation (4) defines the separation factor RL, where C0 refers to the maximum initial concentration of the adsorbate, measures in parts per million (ppm), and KL denotes the Langmuir constant66,67,68,69.

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

The Freundlich model operates on the premise that the adsorbent surface is non-uniform or heterogeneous in nature. This theory suggests that the active sites of the adsorbent are unevenly spread across its surface and possess varying energies, allowing for the adsorption of multiple layers. The Freundlich isotherm equation lacks a fundamental basis and is considered an empirical model. Equation (5) represents the Freundlich isotherm model68,69:

$${{\text{lnq}}}_{{\text{e}}}={{\text{lnk}}}_{\mathrm{F }}+ \frac{1}{{\text{n}}}\mathrm{ ln}{{\text{C}}}_{{\text{e}}}$$
(5)

Hence, if a graph is plotted with ln e on the horizontal axis and ln qe on the vertical axis using linear regression, the surface adsorption data will adhere to the Freundlich isotherm model. In this situation, the intercept on the origin of the graph is equivalent to ln KF, while the slope is equal to 1/n. When 1/n = 0, it suggests the adsorption is irreversible; when 0 < 1/n < 1, it indicates a favorable adsorption process; and when 1/n > 1, it implies an unfavorable adsorption process. The Temkin isotherm, represented by Eq. 6, is used to determine the adsorption heat between Ketoprofen and RY15 onto the LF/AgNPs adsorbent. This isotherm considers the interaction between the two substances:

$${{\text{q}}}_{{\text{e}}}=(\frac{{\text{RT}}}{{{\text{b}}}_{{\text{T}}}}){\text{ln}}({{\text{K}}}_{\mathrm{T }}{{\text{C}}}_{{\text{e}}})$$
(6)

In the equation, R is the universal gas constant (8.314 J/mol K), \({{\text{b}}}_{{\text{T}}}\) (J/mol) is related to the adsorption heat constant, \({{\text{K}}}_{{\text{T}}}\) is the equilibrium binding constant (L/g), and T (K) is the temperature69,70. The Dubinin–Radushkevich isotherm model is a mathematical model used to describe the adsorption behavior of porous materials. The non-linear form of the D–R isotherm is particularly employed to analyze the adsorption of gases or solutes onto solid surfaces, often in the context of porous materials. Equation (7) represents the non-linear form of the D–R isotherm model:

$${{\text{q}}}_{{\text{e}}}={{\text{q}}}_{{\text{m}}}{\text{exp}}\left({-\mathrm{K\varepsilon }}^{2}\right)$$
(7)
$$\upvarepsilon ={\text{RTln}}(1+\frac{1}{{{\text{C}}}_{{\text{e}}}})$$
(8)
$${\text{E}}=\frac{1}{\sqrt{2{\text{K}}}}$$
(9)

qm (mg/g) is the maximum adsorption capacity, K (mol2/kJ2) is the D–R isotherm constant, ε (J/mol) is the Polanyi potential, given by Eq. 8, where R is the gas constant (8.314 J/mol K), T (K) is the temperature, and Ce (mg/L) is the equilibrium concentration of the adsorbate. Equation (9) is related to the calculation of the mean free energy using the Polanyi potential. The model assumes that the adsorption process occurs on a heterogeneous surface, and the Polanyi potential is used to account for the variation in adsorption energy on the surface. The non-linear D-R isotherm is valuable in understanding the adsorption mechanism and energetics in heterogeneous systems66,67,71.

Figure 14 illustrates a graphical representation of Langmuir, Freundlich, Temkin, and D–R isotherm models. Table 2 provides the calculated basic parameters for each of the isotherms. Although some regions of the surface exhibit single-layer adsorption, the Langmuir model does not fit the experimental data well, as indicated by its lower R2 values when compared to the Temkin model. In both scenarios involving the elimination of ketoprofen and RY15, the Temkin isotherm exhibits higher R2 values, specifically 0.997 for ketoprofen and 0.963 for RY15, demonstrating a strong correlation with the observed adsorption data. The Temkin isotherm model assumes a uniform spread of binding energies and accounts for the indirect interaction between LF/AgNPs and contaminants. According to the Temkin isotherm hypothesis, the adsorption heat decreases linearly with increasing surface coverage. The results affirm that the adsorption process of ketoprofen and RY15 can be characterized as a chemisorption process. The Temkin isotherm provides a means to quantify the heat of adsorption, where a positive bT indicates an exothermic process. Furthermore, the D–R model was not fitted well to experimental data and has the lowest correlation coefficients for both contaminants.

Figure 14
figure 14

Isotherm fitted curves (non-linear) of Ketoprofen and RY15 adsorption.

Adsorption kinetics

The rate of the adsorption procedure onto the LF/AgNPs adsorbent is significant in all interactions. The Pseudo first-order (PFO) kinetic equation is expressed as follows4,72:

$${{\text{q}}}_{{\text{t}}}={{\text{q}}}_{{\text{e}}}(1-{{\text{e}}}^{-{{\text{k}}}_{{\text{l}}}{\text{t}}})$$
(10)
$${\text{ln}}\left({{\text{q}}}_{{\text{e}}}-{{\text{q}}}_{{\text{t}}}\right)={{\text{lnq}}}_{{\text{e}}}-{{\text{K}}}_{{\text{l}}}{\text{T}}$$
(11)

K1 (1/min) represents the rate constant of the Pseudo first-order kinetic model. Another model used to describe the adsorption kinetics is the Pseudo second-order model (PSO), which can be expressed using the following equation:

$$\frac{{\text{t}}}{{{\text{q}}}_{{\text{t}}}}=\frac{{\text{t}}}{{{\text{q}}}_{{\text{e}}}}+\frac{1}{{{\text{k}}}_{2}{{\text{q}}}_{{\text{e}}}^{2}}$$
(12)

K2 (g/mg min) represents the rate constant of the Pseudo second-order kinetic model.

The third equation is the Elovich equation and is expressed as below:

$${{\text{q}}}_{{\text{t}}}=\frac{1}{\upbeta }{\text{ln}}(\mathrm{\alpha \beta t}+1)$$
(13)

\(\mathrm{\alpha }\) is equivalent to the primary adsorption rate (mg/g min), and \(\upbeta\) is the desorption constant (g/mg). Moreover, \(\upbeta\) is linked to the surface coverage degree and activation energy for chemisorption.

Equation (14) represents the non-linear form of the fractional power equation:

$${{\text{q}}}_{{\text{t}}}={{\text{k}}}_{{\text{p}}}{{\text{t}}}^{{{\text{v}}}_{{\text{p}}}}$$
(14)

The antilogarithm of intercept directs to the \({{\text{k}}}_{{\text{p}}}\) value. \({q}_{t}\) is the amount of analyte adsorbed at time t. \({V}_{p}\) is a constant usually below one if adsorption kinetic data suits well into the power function model. Figure 15 illustrates the plots of Pseudo first-order, Pseudo second-order, Elovich, and fractional power adsorption kinetics73,74.

Figure 15
figure 15

Kinetic fitted curves (non-linear) of ketoprofen and RY15 adsorption.

According to the data presented in Table 3, the correlation coefficient (R2) and adsorption capacity were evaluated to determine the most appropriate kinetic model. When comparing the correlation coefficients for ketoprofen removal, it was found that the pseudo-first-order model (R2 = 0.989) outperformed the other models indicating that it is the leading model that manages the adsorption procedure. The R2 values of pseudo-second-order, Elovich, and fractional power models were 0.987, 0.948, and 0.912 respectively. Regarding RY15 removal, the pseudo-second-order model demonstrated superior performance compared to other models, with a correlation coefficient (R2) of 0. 997. The R2 values of pseudo-first-order, Elovich, and fractional power models were 0.967, 0.992, and 0.972 respectively. Furthermore, when using the pseudo-second-order model, the calculated equilibrium capacity value of ketoprofen (qe, cal = 43.914 mg/g) and RY15(qe, cal = 28.925 mg/g), were found to be closer to the corresponding experimental value (qe, exp) compared to the results obtained from the other models. Figure 15 presents the results obtained from the mentioned models, including the plots generated through non-linear curve fitting. Table 3 presents the parameters associated with each of the adsorption kinetics.

Table 3 Kinetic parameters for RY15 and Ketoprofen adsorption.

Possible mechanism of Ketoprofen and RY15 adsorption by LF/AgNPs adsorbents

Figure 16 presents the potential mechanism of Ketoprofen and RY15 adsorption by the LF/AgNPs. Through the modification of the surface of luffa with silver nanoparticles, it is hypothesized that various scenarios could occur. The best scenario for the adsorption mechanism of Ketoprofen and RY15 onto the LF/AgNPs involves the interaction of silver nanoparticles with the aromatic ring of Ketoprofen and RY15. The binding of Ag(I) to the conjugate system of the aromatic ring occurs through the π-metal bond42,75,76. Furthermore, the modification of the LF/AgNPs surface resulted in a positively charged adsorbent. This positive charge plays a crucial role in the adsorption of anionic Ketoprofen and RY15 in the. During the synthesis of the LF/AgNPs adsorbent, aromatic groups were introduced into the structure by adding salicylic aldehyde. These aromatic groups can form π–π interactions with the aromatic ring of Ketoprofen and RY15. Moreover, the hydrogen groups present on the surface of the luffa structure can result in the adsorption of Ketoprofen and RY15 molecules. Formation of hydrogen-bonding and π-Hydrogen bonding between the LF/AgNPs adsorbent and contaminants.

Figure 16
figure 16

Possible mechanism of ketoprofen and RY15 adsorption on LF/AgNPs adsorbent.

Reusability of LF/AgNPs

From an economic standpoint, the choice of adsorbent holds paramount importance both in laboratory experiments and industrial applications in the field of adsorption. Researchers are actively exploring the utilization of economical biomaterials derived from natural sources that are abundantly available in the environment. The reusability of an adsorbent is one of the critical factors that affect the overall cost of the removal process77. The present study rigorously examined the reusability potential of LF/AgNPs under optimized conditions, as visually represented in Fig. 17. The results show that the removal percentage of Ketoprofen and RY15 decreased after undergoing five cycles of use. Impressively, even after experiencing five cycles of use, the removal efficiency for ketoprofen and RY15 adsorption consistently exceeded 85%. Washing LF/AgNPs with ethanol enhances the bonding of Ketoprofen and RY15 with the hydroxyl groups of ethanol, which facilitates the separation of the contaminants from the adsorbent surface. The reduced recovery process also suggests that some Ketoprofen and RY15 molecules tend to attach strongly to the adsorbent surface and are not easily separated during the recovery process. Therefore, in terms of reusability, LF/AgNPs adsorbents demonstrated satisfactory results for the adsorption of Ketoprofen and RY15.

Figure 17
figure 17

Reusability of LF/AgNPs for RY15 and ketoprofen adsorption.

Comparison of LF/AgNPs with other adsorbents

Numerous studies have been conducted to eliminate Ketoprofen and RY15, emerging contaminants, from aqueous solutions. Tables 4 and 5 present a comparison of LF/AgNPs adsorbent with other natural-based adsorbents that have been investigated in recent years for their ability to remove Ketoprofen and RY15. Comparing various adsorbents based solely on their adsorption capacity is not sufficient. To make a more accurate comparison, other factors such as the removal percentage and contact time for adsorption should also be taken into consideration. LF/AgNPs adsorbent showed an excellent removal efficiency of 94% for ketoprofen, and 98% for RY15. The adsorption capacity for ketoprofen and RY15 were 56.88 and 97.76 mg/g respectively. In comparison to various natural-based adsorbents, the LF/AgNPs adsorbent demonstrates its suitability and practicality for effectively removing Ketoprofen and RY15 from aqueous solutions.

Table 4 Comparison with other adsorbents for the removal of Ketoprofen.
Table 5 Comparison with other adsorbents for the removal of Reactive yellow 15.

Conclusion

This study has demonstrated that the LF/AgNPs adsorbent is highly effective in removing Ketoprofen and RY15 from water media. The addition of Ag nanoparticles to the surface of the adsorbent changes its charge from negative to positive, empowering electrostatic attraction with anionic Ketoprofen and RY15 and altogether progressing its adsorption proficiency. According to the results obtained, the maximum removal efficiencies of Ketoprofen and RY15 from aqueous solutions were 94% and 98% respectively, indicating the high performance of the LF/AgNPs adsorbent in removing Ketoprofen and RY15. The most likely mechanism for the adsorption of Ketoprofen and RY15 is the interaction between the π-electrons of the aromatic ring of Ketoprofen and RY15 and the existed metal (Ag) nanoparticles on the surface of the adsorbent. This type of interaction is known as π–π stacking, and it plays a significant role in the adsorption of organic compounds onto metal surfaces. When it comes to eliminating ketoprofen, the similarity in R2 values between the Freundlich and Temkin models implies that the adsorption process can adhere to both systems. This suggests the existence of multi-layer adsorption on the adsorbent's surface. In the case of RY15 removal, the Freundlich model is more suitable for describing the adsorption mechanism. Furthermore, it was observed that the pseudo-first-order model surpassed the other models in eliminating ketoprofen. This suggests that it is the primary model governing the adsorption process. In the case of RY15 removal, the pseudo-second-order model exhibited better performance in comparison to other models. Regarding reusability, it is noteworthy that the removal efficiency for ketoprofen and RY15 consistently stayed above 85% even after undergoing five usage cycles. Consequently, in the realm of recyclability, LF/AgNPs adsorbent demonstrated encouraging results for the adsorption of both Ketoprofen and RY15.