1 Introduction

Pharmaceuticals are extensively utilized compounds aimed at preventing and treating diseases [1]. Pharmaceutical chemicals are dangerous and toxic pollutants for living things and the environment because of their low biodegradability, bioaccumulation, high persistence and some negative consequences. They are methodically discharged into the environment through processes like drug manufacturing, processing, and distribution, as well as from hospitals, aquaculture, animal farms, and wastewater treatment facilities [2]. Since the conventional wastewater treatments are not engineered to eliminate these specific pollutants, a significant portion of pharmaceutical compounds cannot be entirely eradicated during the treatment process. They must be effectively treated to eliminate them from the waterways to safeguard human health and the ecology from their possible toxicity and other negative impacts. Advanced oxidation processes [3,4,5], membrane processes [6, 7], electrocoagulation [8,9,10], biodegradation [11,12,13], and adsorption [14,15,16,17] are extensively employed methods for removing pharmaceuticals from water systems. Among these processes, the adsorption process stands out as the optimal treatment approach for eliminating pharmaceuticals from wastewater. This is attributed to its simplicity, efficacy, cost-effectiveness, low sludge generation, versatility in handling diverse pollutants, and its non-induction of by-product formation or degradation [18,19,20].

Despite the predominant focus of pharmaceutical adsorption studies on widely used antibiotics, analgesics, synthetic hormones, and anti-inflammatories, which are frequently found at elevated concentrations in wastewater, there remains a dearth of research pertaining to the elimination of less commonly used and relatively recent market entrants. Among these, tadalafil (TDL) is an example of such products with limited usage and recent introduction to the market. Tadalafil, a potent pharmaceutical compound widely used for the treatment of erectile dysfunction, has gained significant attention in recent years due to its presence in aquatic environments [21, 22]. Therefore it is crucial to avoid such contamination by using alternative techniques such as adsorption to remove it from waste water. Up to this point, some studies have been done on the methods of determination, the monitoring, and the hazardous consequences of TDL. However, investigations on removal from the waters have not yet been conducted.

In recent years, there has been a growing trend in researching the adsorption of pollutants using cost-effective, readily available, and highly efficient adsorbents. This shift towards exploring alternatives to commercial activated carbon is primarily motivated by the natural, economic, and eco-friendly attributes of waste materials. Utilizing these waste materials not only aids in pollution control but also makes a valuable contribution to the economy [23, 24]. Waste eggshells are considered useless and are disposed in landfills without any pre-treatment. Owing to the huge amount of waste material, numerous studies have been carried out to identify beneficial application areas. [25].

Therefore, the purpose of this study was to investigate the viability of employing the raw eggshells as an adsorbent to remove TDL from aqueous solution. Furthermore, extending beyond traditional adsorption techniques, this study harnessed the power of response surface methodology (RSM) through the Box–Behnken design (BBD) to predict the optimal process parameters. These parameters, including pH, adsorbent amount, and temperature, were fine-tuned under varying adsorption conditions to enhance their effectiveness in wastewater treatment. Moreover, the study explored adsorption isotherms and kinetics, aiming to provide a comprehensive understanding of tadalafil removal and to assess the feasibility of utilizing raw eggshell powder as an adsorbent. By employing these advanced methodologies and exploring the potential of natural materials like eggshells, this research opens up new possibilities for efficient and sustainable wastewater treatment.

2 Materials and methods

2.1 Chemicals

All chemicals, reagents as well as Tadalafil were supplied from Pharmactive Pharmaceuticals. Deionized water was used in all experiments. The pH of the aqueous solutions was adjusted with 0.1 M hydrochloric acid (HCl) or sodium hydroxide (NaOH).

2.2 Preparation of the adsorbent

Eggshells (ES) were collected from household and kitchen waste. They were cleaned several times with deionized water to get rid of pollutants and impurities before being used, and they were then dried for 12 h at 70 °C in an oven. To prepare the eggshells for future use as an adsorbent, they were lastly crushed, sieved, and placed in sterile containers containing a powdered form.

2.3 Characterization of adsorbent

Scanning electron microscopy (SEM) was used to observe the morphology of eggshell powder. The identification of crystalline species present in eggshell powder was recorded by XRD analysis. Studies by Fourier-transform infrared spectroscopy (FTIR) was performed to identify functional groups on the surface of the eggshells.

2.4 Experimental design by response surface methodology

Response surface methodology (RSM) is a powerful blend of mathematical and statistical techniques aimed at optimizing processes, making it suitable for examining both the relative and intricate interactions among various factors [26]. The application of experimental design in adsorption processes can yield multiple benefits, such as enhanced product yields, reduced development timelines, decreased overall costs, and diminished process variability. Among the various RSM design strategies, we employed the Box-Behnken Design (BBD) to analyze the individual and complex impacts of process variables on TDL removal. The independent variables selected were temperature, pH and adsorbent amount, while the response variable was the efficiency of TDL removal (%). Table 1 provides a comprehensive overview of the independent variables, their experimental ranges, and the three levels associated with each variable for TDL removal. To conduct the BBD, we carried out 17 experiments, including 5 centered points, using Stat-Ease software (Design-Expert 11.0 trial version, Stat-Ease, Inc.).

Table 1 Three levels of independent variables for Box Behnken Design

2.5 Adsorption experiments

The experiments, incorporating the independent variables derived from the BBD design, were executed in an Erlenmeyer flask filled with a TDL concentration of 20 mg/L. These flasks were placed on an orbital shaker. The experiments were initiated by introducing the adsorbent into the TDL solution, aligning with the desired process variable values. To fine-tune the solution's pH, either 0.1 M NaOH or HCl solutions were employed. The flasks were agitated at 175 rpm. Throughout the experiments, samples were periodically withdrawn at specified time intervals. Subsequently, to eliminate the adsorbent particles, the samples underwent centrifugation. After centrifuging, by using a UV/vis spectrophotometer at a wavelength of 284 nm, the TDL concentration was measured [27]. The adsorption equilibrium was reached after 1 h. The amount of Tadalafil adsorbed (mg g−1) and the removal efficiency (%) were computed as follows Eqs. (1) and (2):

$$\mathrm{\%\;Removal }= \frac{C0-Ce}{C0} \times 100$$
(1)
$$\mathrm{qe\;}(\mathrm{mg }{g}^{-1}) = \left(C0-Ce\right)\times \frac{V}{m}$$
(2)

where C0 is the initial concentration of Tadalafil (mg L−1), and Ce is equilibrium concentration of Tadalafil (mg L−1), V and m are represented to the total volume (L) and adsorbent amount (g), respectively.

In this study, a three level Box-Behnken design was applied. According to the Box–Behnken design, 17 experiments were performed for evaluating the individual and combined effects of these parameters. Table 2 displays the experiment parameters for pH, temperature, and adsorbent quantity as well as the observed removal efficiency findings.

Table 2 % Removal values obtained from Box-Behnken design matrix

2.6 Adsorption isotherm and kinetic studies

A vital concept that demonstrates the correlation between the concentration in an equilibrium condition and the amount of dye adsorbed is the adsorption isotherm [24, 28] Models such as the Langmuir and Freundlich models were chosen to analyze the tadalafil adsorption experiment data.

Langmuir model

Langmuir model (Eq. 3) is used to define that the adsorption occurs single layer on the adsorbent's surface, and no additional adsorption occurs after that.

$$\frac{{C}_{e}}{{q}_{e}}=\frac{1}{{q}_{max}*{K}_{L}}+\frac{1}{{q}_{max}}{C}_{e}$$
(3)

where, KL is the equilibrium constant associated with binding site affinity (L/mg) and qmax is the maximum adsorption capacity (mg/g).

Freundlich model

The multilayer adsorption on a heterogeneous surface with an inconsistent nonuniform distribution of energy and active sites is described by the Freundlich model (Eq. 4) [24, 29, 30].

$$\ln\;{\mathrm q}_{\mathrm e}=\ln\;{\mathrm K}_{\mathrm F}+\frac1{\mathrm n}\ln\;{\mathrm C}_{\mathrm e}$$
(4)

where KF and n are coefficients indicate the adsorption capacity and adsorption intensity, respectively [31].

Adsorption kinetics is used to explain the mechanism of the adsorption processes and adsorption behaviour. Among the several methodologies accessible for analysis of adsorption mechanism, two kinetic models, the pseudo first order model (Eq. 5) and the pseudo second order model (Eq. 6), were used to assess the data from the tadalafil adsorption process as follows:

  • Pseudo first order model:

    $$log\frac{{q}_{e}-{q}_{t}}{{q}_{e}}=\frac{{k}_{1}t}{2.303}$$
    (5)

    where; k1 (min−1) is the rate constant; qt (mg/g) is the adsorbed amount at time t [32].

  • Pseudo second order model:

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

    where, k2 (g/mg.min) is the rate constant of pseudo second order model [32].

3 Results and discussion

3.1 Characterization

To gain a deeper understanding of the eggshell structure, scanning electron microscopy (SEM), X-ray diffraction (XRD), and Fourier-transform infrared spectroscopy (FTIR) analyses were conducted. SEM is utilized to investigate the morphology of eggshells both before and after the adsorption of tadalafil, as illustrated in Fig. 1a and b. It can be observed that the eggshell exhibits an irregular, rough, and porous surface characterized by high granularity, along with numerous tubular holes distributed throughout the entire adsorbent surface. This particular structural characteristic proves advantageous in the adsorption process on the solid, enhancing the available surface area for interaction with pharmaceutical compounds [33]. Surprisingly, following the adsorption process, only minimal differences were observed, as depicted in Fig. 1b.

Fig. 1
figure 1

SEM images of eggshell (a) before and (b) after adsorption

Figure 2 displays the X-ray diffraction pattern of the eggshell powder. The XRD analysis of the eggshell powder unequivocally verified the predominance of a thermodynamically stable calcite (CaCO3) phase within the sample [34]. In Fig. 2, all the distinctive peaks observed appeared to align closely with the characteristics of CaCO3, which underlines the significant hardness of the eggshell. This research effectively established the presence of more than 90% CaCO3 with a rhombohedral structure, which is consistent with findings from prior studies in the field [34,35,36]. This diffractogram confirms that the compound is pure and crystalline [35].

Fig. 2
figure 2

XRD pattern of eggshell before and after the adsorption

The FT-IR analysis of the eggshell, both before and after adsorption, as presented in Fig. 3, indicates that the eggshell primarily consists of carbonate functional groups of CaCO3. Examination of the graph reveals a prominent absorption peak of the carbonate mineral at 1407 cm-1. Additionally, two other peaks are observed at 712 and 874 cm-1, which are attributed to the out-of-plane and in-plane deformation vibration bands of CaCO3 [25]. The most distinctive characteristic band of eggshells is the C-O stretching vibration band related to carbonate, which was observed at 1407 cm-1 in this study. Furthermore, a faint band around 1799 cm-1 corresponds to C = O bonds associated with carbonate, and a shoulder appears at 1066 cm-1, attributed to the symmetric stretching of CO3 [25]. It's worth noting that the characteristic O–H peak at 3662 cm-1 mainly results from the absorption of moisture and water molecules during the eggshell preparation process [35]. On the other hand, the presences of amines and amides in the eggshell exhibiting significant peaks at intensity of 1589 and 1383 cm−1. Nevertheless, following the adsorption process, changes were seen in the vibration bands of the eggshells that were utilized as the adsorbent material. These changes suggest a relationship between the eggshells and tadalafil. [37, 38].

Fig. 3
figure 3

FT-IR analysis of eggshell before and after the adsorption

3.2 Optimization of process variables

3.2.1 Box–Behnken design and regression model

Based on the experimental data from Table 2, the mathematical relationship between the response values and the independent process variables was demonstrated using the second order model. Eq. 7 represents the model that demonstrated the removal efficiency in relation to pH (x1), temperature (x2), and amount of adsorbent (x3).

$$\mathrm{Removal\;}\left(\mathrm{\%}\right)=117.04+4.585{{\text{X}}}_{1}-3.599{{\text{X}}}_{2}-10.942{{\text{X}}}_{3}-0.3{{\text{X}}}_{1}{{\text{X}}}_{2}+1.38{{\text{X}}}_{1}{{\text{X}}}_{3}+0.055 {{\text{X}}}_{2}{{\text{X}}}_{3}-0.968{{{\text{X}}}_{1}}^{2}-0.052{{{\text{X}}}_{2}}^{2}+0.399{{{\text{X}}}_{3}}^{2}$$
(7)

To figure out whether or not the second order model is significant, ANOVA analysis is necessary [39, 40]. Table 3 lists the outcomes of the ANOVA analysis performed to remove TDL. The table indicates that there was statistical significance (P < 0.0001) for the second order model. "Lack of fit" has a P-value of 0.1232, meaning that it is not significant in relation to the pure error. For the model to fit, a non-significant lack of fit was considered desirable. In addition, the quadratic terms of pH and temperature, as well as the interaction terms of AB and AC, had a considerable impact on the elimination of TDL, according to the significance of the model coefficients. Furthermore, the coefficient of determination (R2 = 0.9997) showed that the model accounted for 99.97% of the response's overall variation. The model's predicted outcomes and the experimental data exhibited a strong correlation, as evidenced by the high R2 and adjusted R2 values (R2adj = 0.9992). Additionally, Fig. 4 helped to clarify the relationship between predicted and actual response values, and the cluster points around the diagonal line showed a good model fit.

Table 3 ANOVA table for removal of tadalafil
Fig. 4
figure 4

Plot of the predicted values versus actual values of TDL removal

3.2.2 Effects of process variables

To increase the removal efficiency of TDL, the Box-Behnken design was utilized to ascertain the independent and interaction effects of the process variables (amount of adsorbent, pH and temperature).

The solution pH plays a crucial role in adsorption as it can alter the surface charge of the adsorbent, the degree of ionization, and the speciation of adsorbate species [39]. In line with the Box-Behnken, pH values ranging from 3 to 5 were chosen, revealing that the efficiency of tadalafil removal increased with an increase in solution pH.

The impact of temperature on the adsorption of tadalafil was investigated at temperatures of 25, 35, and 45 °C. The experimental findings revealed a modest reduction in tadalafil removal as the temperature increased from 25 °C to 45 °C. This suggests that the tadalafil adsorption process using eggshell adsorbent is governed by an exothermic mechanism. The observed behavior could be attributed to the deactivation of active sites on the composite at higher temperatures, resulting in a diminished sorption capacity of the composite at elevated temperatures.

Additionally, the removal percentages of TDL through adsorption exhibit significant enhancement with increasing amounts of adsorbent. In the case of eggshell, as the quantity increased from 5 to 10 g 500 mL-1, the removal efficiency increased. This behavior can be attributed to the increase in surface area and the number of active sites on eggshell at higher dosages. As concluded, it can be said that the most significant influences on TDL adsorption are the adsorbent quantity and pH.

Response surface curves are created using a statistically valid model to identify optimal conditions for achieving maximum tadalafil removal and to comprehend the interaction among process variables. Both 3D and 2D curves serve as graphical representations of the regression equation (Eqs. (3)). Each curve illustrates infinite combinations of two test variables when one test variable is held at the zero level. The surface enclosed within the smallest ellipse in the contour curve designates the highest predicted value of the response. Figure 5a–c shows the 3D response surface plots for the tadalafil removal that were created to clarify the effects of the variable interactions. The highest removal (73%) was obtained at solution pH of 5.0, 25 °C and adsorbent amount of 7.5 g/500 mL. The effects of solution pH and temperature is shown in Fig. 5a. As can be seen from this figure, the maximum removal of TDL was achieved at the highest solution pH and lowest temperature. The effects of solution pH and adsorbent amount is shown in Fig. 5b. Maximum removal of TDL was obtained at the highest solution pH and the adsorbent amount. Similarly, the effects of temperature and adsorbent amount is shown in Fig. 5c. Maximum removal was observed at the lowest temperature and the highest adsorbent amount.

Fig. 5
figure 5

3D plots for removal of tadalafil

3.3 Adsorption isotherms

The data collected from experiments conducted under optimal parameters, where varying quantities of adsorbent were added to the tadalafil solution, were employed to analyze Langmuir and Freundlich isotherms. The adsorption isotherm models of tadalafil removal is shown in Fig. 6. Table 4 displays the model parameters and statistical values for the Freundlich and Langmuir models. The Freundlich isotherm model was identified as the most suitable fit for the tadalafil removal data, displaying high values of the correlation coefficient (R2) and low values of the standard error when compared to the Langmuir isotherm within the examined range. The 1/n constant in the Freundlich isotherm denotes the adsorbent's sorption intensity and the adsorption mechanism. Furthermore, this finding suggests that the dye is mostly adsorbed onto the adsorbent's heterogeneous surface [29] and the adsorption mechanism may be chemisorption [24].

Fig. 6
figure 6

Adsorption isotherm models (a) Langmuir isotherm (b) Freundlich isotherm

Table 4 The isotherm model parameters and statistical values for tadalafil removal

3.4 Adsorption kinetics

Kinetic modeling studies were carried out using the experiments conducted under optimum parameters to perform a kinetic evaluation of the data obtained. The mechanism of the adsorption process was investigated using pseudo-first-order and pseudo-second-order kinetic models. The adsorption kinetic models of tadalafil removal is shown in Fig. 7. Table 5 presents the model constants and statistical data for the kinetic models. The pseudo second order kinetic model was found to be the most suitable one for all of the experimental data with a high coefficient of determination and a low standard error between various models, as can be seen from this table. The pseudo-second-order kinetic model is likewise founded on the sorption capacity of the solid phase and operates under the premise that the sorption process is characterized by a chemisorption mechanism. This mechanism involves valence forces and entails the sharing or exchange of electrons between the sorbent and the sorbate [32].

Fig. 7
figure 7

Adsorption kinetic models (a) Pseudo first order model (b) Pseudo second order model

Table 5 The kinetic model parameters and statistical values for tadalafil removal

4 Conclusion

The present study focused on the removal of tadalafil from aqueous solutions using eggshells as an economical adsorbent. Using BBD, the effects of pH, temperature, and amount of adsorbent, on the removal efficiency were investigated. The variables that were found to be most effective in removing tadalafil were the pH and the amount of adsorbent. The isotherm data for tadalafil removal using eggshell fitted well to the Freundlich isotherm model. Furthermore, in the studies of adsorption kinetic was determined that kinetics of tadalafil follows the pseudo second order model. In conclusion, based on the outcomes of this study, it is evident that eggshell exhibits substantial potential as a cost-effective, novel, and efficient alternative adsorbent for the removal of pharmaceutical and other environmental pollutants.