Introduction

Contamination of water bodies with pharmaceuticals has become a growing concern worldwide. Nonsteroidal anti-inflammatory drugs (NSAIDs) are a class of medications that are used extensively worldwide to treat pain and inflammation. [1]. Since this group of drugs is easily available without a prescription, it is one of the leading pharmaceutical compounds that pollutes the environment quickly and uncontrollably [2]. Naproxen, belonging to the NSAID class, is a pain reliever that is widely used in the treatment of many diseases, such as degenerative joint disease, rheumatoid arthritis, acute gout, pain, and inflammation [3, 4]. Consequently, it is consumed in significant amounts by both humans and animals. Approximately 72% of the naproxen excreted has the propensity to undergo hydrolysis and subsequently enter aquatic ecosystems [5, 6]. The World Health Organization (WHO) has verified the existence of high-dose drugs ranging from to 15–25 μg/L in drinking water [7, 8]. Long-term accumulation of pharmaceutical compounds, such as naproxen, in water and soil causes toxic effects, which are dangerous for living organisms [9]. Therefore, the removal of naproxen and other drug residues from water sources is important [10].

Many different methods are used for the removal of pharmaceutical compounds from aquatic environments. Examples of these methods include electrochemical oxidation [11], membranes [12], coagulation-ozonation [13], ultrasonic cavitation treatment [14], photocatalysis [15], bio-electrochemical oxidation [16], volatilization [17], sedimentation [18], Fenton-based processes [19], and adsorption [20,21,22]. Among these methods, the adsorption method is preferred because of its simpler design, high efficiency, low-cost operation, and excellent performance [23].

One of the most important aspects of the adsorption process is adsorbent selection. A wide variety of adsorbents have been used in adsorption studies, such as zeolites [24], clay [25], carbon nanotubes [26], silica-based nanoparticles [27], iron-based materials [28], metal–organic frameworks [29], and biochar [30,31,32].

Biochar is a carbonaceous substance that is produced through the thermolysis (~ 700 °C) of various forms of biomass, including agricultural and forest residues, animal waste, and sludge, among others, in an environment that is either low in oxygen or completely devoid of it [33]. Biochar has a large specific surface area, abundant pore structure, numerous functional groups, good ion exchange ability, and good thermal stability. The physicochemical characteristics of biochar play a significant role in determining the surface interactions and adsorption mechanisms. Increasing the pyrolysis temperature enhances the characteristics of biochar, specifically its specific surface area and microporous structure, resulting in significant adsorption capabilities [34, 35].

There are studies on biochar obtained using walnut shells in the literature. However, the properties of walnut shell biochar (WSB) are affected by the raw material properties (type of walnut, climatic conditions in which it is grown, etc.), pyrolysis conditions (temperature, heating rate, residence time, etc.), and natural composition (moisture content, lignin, cellulose, and hemicellulose content, etc.) of walnut shells. In this study, biochar was obtained from the shells of Chandler-type walnuts grown in Burdur province, Turkey, using one- and two-step pyrolysis process at different temperatures (500, 600, 700, 700 + 700 °C). The biochar obtained was used as an adsorbent for naproxen removal from aqueous systems, and the WSB obtained by two-stage pyrolysis showed the highest removal efficiency (92%). Examination of the physicochemical attributes of the resulting walnut shell biochar (WSB) involved a comprehensive array of analytical techniques, including SEM (scanning electron microscopy), EDX (energy dispersive X-ray), BET (Brunauer–Emmett–Teller), XRD (X-ray diffraction), TGA (thermogravimetric analysis), and FTIR (Fourier transform iInfrared). Multiple experimental parameters, such as pH, initial naproxen concentration, adsorbent quantity, contact time, pHpzc, and temperature, were systematically investigated to gain insight into the naproxen adsorption process by WSB in aqueous solutions. The equilibrium results were analyzed using various adsorption isotherm models including the Langmuir, Sips, Temkin, and Freundlich models. Additionally, four adsorption kinetic models, pseudo-first-order (PFO), pseudo-second-order (PSO), Elovich, and intraparticle diffusion (IPD), were applied to characterize the adsorption kinetics. The thermodynamic parameters (ΔH°, ΔG°, and ΔS°) were determined to ascertain whether the adsorption process involved physical and/or chemical adsorption mechanisms. This comprehensive investigation aimed to elucidate the intricacies of the naproxen adsorption process onto WSB and its underlying thermodynamic and kinetic aspects.

Materials and methods

Materials

Naproxen sodium salt (≥ 98%), sodium hydroxide (≥ 98%), sodium chloride (99%), hydrochloric acid (37%), methyl alcohol (≥ 99.9%), acetonitrile (99%), ethyl alcohol (≥ 99%) were obtained from Sigma Aldrich and utilised without additional purification.

Production of walnut shells biochar

The walnut shells (WS) used in this study were sourced from Chandler walnut trees grown in the Karamanlı District of Burdur, Turkey. The peels separated from the fruit were washed several times with tap water and distilled water and dried at 70 °C for 48 h. The dried walnut shell residues were then pulverized using a ball mill, resulting in particles ranging from 0.16 to 0.25 mm in size. Walnut shell biochars were prepared by one- and two-step methods at different pyrolysis temperatures (500, 600, 700, 700 + 700 °C) [30]. Approximately 25 g of dried WS was placed in a porcelain crucible with a lid and then transferred to a muffle furnace. One-step pyrolysis was conducted at different temperatures (500, 600, 700 °C), 10 °C/min, and 4 h in a non-circulating air atmosphere. In the two-stage pyrolysis, this procedure was repeated twice. The biochar samples were thoroughly washed with distilled water until the filtrate attained a neutral value. Before being preserved in a desiccator for future use, the biochar was dried for 24 h at 80 °C to maintain a constant humidity.

Characterization of walnut shell biochar

To assess the functional groups present in walnut shell biochar, Fourier transform infrared (FT-IR) spectra were recorded using a Perkin Elmer Frontier model spectrometer. A KBr pellet was used for the analysis, and the spectra were measured within the range of 500 to 4000 cm−1. The thermal stability and mass loss properties of the walnut-shell biochar were determined using a Seiko SII TG/DTA 7200 thermal analyzer. LEO SEM-440-EDX was used to analyze the morphology and chemical composition of the biochar. A Bruker AXS D8 model X-Ray Diffraction equipment with a voltage of 40 kV, a current of 40 mA, and 2θ in the range of 10° to 90° was used to determine the crystal structure of the walnut shell biochar.

Nitrogen adsorption and desorption isotherm analyses were conducted using a surface characterization analyzer (Quantachrome Quadrasorb SI). Liquid nitrogen was used for the measurements, which were performed at a constant temperature of 77 K. Using a T60 UV–vis spectrophotometer (PG Instruments), the amount of naproxen in the aqueous solution was calculated. The point of zero charge (PZC) of the walnut shell biochar was determined using the common drift method [36]. In this method, a 25 mL solution of 0.1 M NaCl was mixed with approximately 50 mg of walnut shell biochar. Using 1 M NaOH or 1 M HCl, the pH of the solution (pH_initial) was varied from 2 to 12. An Orion 3 Star pH meter was used to measure the pH (pH_after) of the solutions after stirring the suspensions for 24 h at 25 °C and 120 rpm.

Adsorption and desorption experiments

The adsorption capacity of walnut shell biochar for the selective removal of naproxen ions at room temperature was evaluated using a batch system. First, the ability of WSBs to remove naproxen from aqueous media at different pyrolysis temperatures was tested (Fig. S1). According to the results, naproxen removal rates were calculated as 700 + 700-WSB (92%) > 700-WSB (79%) > 600-WSB (28%) > 500-WSB (5%). Based on these results, 700 + 700-WSB was selected as the adsorbent to remove naproxen from aqueous media because it exhibited the best removal efficiency.

Several crucial parameters were investigated to optimize the adsorption process for naproxen removal from water samples. These parameters included pH values ranging from 5.0 to 8.0, contact times from 0 to 300 min, different amounts of adsorbent (0–2 g/L), varying initial naproxen concentrations (10–400 mg/L), and temperatures of 25 °C, 40 °C, and 55 °C. The pH of the aqueous solution plays a remarkable role in the adsorption of naproxen. The pH of the samples was adjusted within the range of 5.0–8.0, while keeping other experimental conditions constant, such as the amount of 700 + 700-WSB (2 g/L), naproxen concentration (10 mg/L), temperature (25 °C), and contact time (4 h). To examine the adsorption equilibrium, a range of initial naproxen concentrations (10–400 mg/L) were investigated at various temperatures (25, 40, and 55 °C) over a duration of 4 h. The adsorption kinetics study was conducted at 25 °C for contact times ranging from 10 to 300 min. Filtration was used to separate the solid–liquid mixture after the adsorption process was completed. Using a PG Instruments T60 Model UV–vis spectrophotometer, the absorbance data at a wavelength of 232 nm were used to calculate the amount of naproxen in the solution. The R% (removal efficiency), quantity of naproxen adsorption Qt (mg/g) at a specific time, and quantity of naproxen adsorbed at equilibrium Qe (mg/g) were calculated using Eq. (1)-(3). By conducting these experiments and analyzing the data, valuable insights were gained regarding the optimal conditions for naproxen removal and the adsorption characteristics of walnut shell biochar.

$${\text{R}}\% = \frac{{{\text{C}}_{{0}} - {\text{C}}_{{\text{t}}} }}{{{\text{C}}_{{0}} }} \times 100$$
(1)
$${\text{Q}}_{{\text{t}}} = \frac{{{\text{C}}_{{0}} - {\text{C}}_{{\text{t}}} }}{{\text{m}}} \times {\text{V }}$$
(2)
$${\text{Q}}_{{\text{e}}} = \frac{{{\text{C}}_{{0}} - {\text{C}}_{{\text{e}}} }}{{\text{m}}} \times {\text{V }}$$
(3)

here C0 (mg/L), Ce (mg/L), and Ct (mg/L) represent the initial ion concentration, equilibrium ion concentration, and ion concentration in the liquid phase at any given time. V (L) represents the volume of the ion solution and m (g) represents the total amount of adsorbent used. The results of the triple adsorption studies are presented as the mean value and standard deviation (SD). A non-linear optimization technique was utilized to obtain the relevant variables of the models employed in the adsorption isotherm and kinetics. The ishoterm and kinetic model equations and parameters used are listed in Tables S1 and S2.

After the adsorption investigation with 10 mg/L of naproxen, 2 g/L adsorbents, pH 6.8, and 25 °C was completed, the solution was filtered. The 700 + 700-WSB adsorbent was washed with distilled water and dried at 60 °C for 12 h for desorption. For the desorption of naproxen adsorbed on 700 + 700-WSB, various desorption agents including acetonitrile, methanol, ethanol, 0.5 mol/L NaOH and, 0.5 mol/L HCl were utilized. 700 + 700-WBS@Naproxen (50 mg naproxen-loaded WBSs) was used for the desorption investigation, which was conducted using 25 mL of each desorbing agent for 4 h. The solutions were then filtered through filter paper and a UV spectrometer was used to measure the resulting naproxen concentrations.

Adsorption data modeling

In this study, the experimental equilibrium data were fitted with the Langmuir [37], Sips [38], Temkin [39] and, Freundlich [40] mathematical models. Table S1 contains all isotherm model equations and parameters. In addition, PFO [41], PSO [42], Elovich [43] and IPD [44] models were used to fit the kinetic experimental data. Table S2 contains all kinetic model equations and parameters.

Results and discussion

Characterization of walnut shell biochar

The pH of the solution has a significant impact on the surface charge of each adsorbent. The point at which the positive charge density on the surface of the adsorbent is equal to the negative charge density is known as the point of zero charge (PZC) of the material in solution (Fig. S2a). To understand the effect of pH on the adsorption behaviour, it is very important to know the pHpzc of the adsorbent. Based on this methodology, the superior adsorption of cations occurs at a pH level greater than the pHpzc, whereas the enhanced adsorption of anions transpires at a pH level lower than pHpzc. The pKa value of naproxen (Fig. S2b) is approximately 4.19 [7, 45], indicating that naproxen exists predominantly in its anionic form when the solution pH exceeds its pKa value. Calculation of the point of zero charge (pHpzc) for the 700 + 700-WSB adsorbent yielded a value of 7.15. It is hypothesized that electrostatic attraction plays a more significant role in the adsorption of naproxen on WSB than other interactions (such as pore filling, π-π interactions, and hydrogen bonding) when the pH is lower than pHpzc.

The FTIR spectrum of the 700 + 700-WSB and 700 + 700-WSB@Naproxen showed some well-defined bands (Fig. 1a). The prominent functional group vibrations of 700 + 700-WSB and 700 + 700-WSB@Naproxen included ν O–H or N–H (3440, 3437 cm-1), νas C-H (2923 cm−1), ν C-H (2850 cm−1), ν C=O (1646 cm−1), ν C=C (1543 cm−1), and aromatic ν C–O (1211, 1208 cm−1) [31, 35, 46,47,48]. According to FTIR analysis before and after the adsorption process, no new characteristic peaks associated with naproxen molecules were observed in the FTIR spectra after the adsorption of naproxen on the WSBs. This suggests that the adsorption process was based on physical interactions.

Fig. 1
figure 1

a FTIR spectra of 700 + 700-WSB before and after naproxen adsorption; b TG curve of 700 + 700-WSB; c XRD patterns of 700 + 700-WSB; d Nitrogen adsorption isotherms of 700 + 700-WSB before and after naproxen adsorption

The TGA curve of 700 + 700-WSB is given in Fig. 1b. The initial phase of weight reduction was observed within the temperature range of the ambient temperature to 130 °C, which was primarily attributed to the process of moisture evaporation. The weight loss in the temperature range of 140–650 °C was due to the thermal decomposition of hemicellulose (225–350 °C), cellulose (325–375 °C), and lignin (250–500 °C) structures [49,50,51]. The total mass loss of the 700 + 700-WSB was calculated to be 12%.

The XRD technique was applied to determine the amorphous structure of the 700 + 700-WSB, as shown in Fig. 1c. The diffraction peak at approximately 23° (002) represents the layer spacing and thickness of the aromatic microcrystalline structure, while the diffraction peak at 43° (100) represents the size of the aromatic layer [50, 52, 53]. Furthermore, the additional peaks that were observed could potentially pertain to the diverse inorganic constituents present in the input material, such as feasible quart, and calcite minerals [30]. The measured diffraction peaks correspond to the standard diffraction pattern of JCPDS card file number 01–089-1304 [54].

The 700 + 700-WSB and 700 + 700-WSB@Naproxen N2 adsorption–desorption isotherms are shown in Fig. 1d, and the pore size distribution is shown in Fig. S3. As can be seen from Fig. 1d, the 700 + 700-WSB adsorbent exhibited an IV-type isotherm and a mesoporous hysteresis loop type H4. The adsorption behavior within the mesopores and micropores is influenced by the interactions between the adsorbent and adsorbate as well as the interactions among molecules in the condensed phase [55, 56]. According to Table 1, the micropore volume (Vmicro) comprises a greater proportion of the total pore volume than the mesopore volume (Vmeso). The surface areas of 700 + 700-WSB before and after adsorption were calculated as 649.9 and 469.5 m2/g, respectively. The decrease in the surface area and pore volumes of 700 + 700-WSB before and after adsorption suggests that naproxen adsorption occurs both on the surface and in the form of pore filling.

Table 1 Textural information of the 700 + 700-WSB and 700 + 700-WSB@Naproxen

The macropores and mesopores shown in Fig. 2 facilitate the diffusion of numerous naproxen molecules into the pore structure. The results presented in Fig. 2 show that naproxen adsorption leads to alterations in the surface morphology, causing disruption of the cavities and pores. The surface porosity of 700 + 700-WSB became less visible, indicating that naproxen molecules were adsorbed onto the surface through functional groups until these groups became saturated. After saturation, naproxen molecules penetrate deeply into the porous structure of the WSB and are adsorbed onto the inner surfaces of the pores.

Fig. 2
figure 2

SEM images of the 700 + 700-WSB surface before (1000x, 3000x) and after (1000x, 5000x) Naproxen adsorption at two different magnifications

EDX analysis indicated that the 700 + 700-WSB adsorbent has a high carbon content, aligning well with the findings from XRD analysis. The elemental analysis presented in Fig. S4 reveals that the 700 + 700-WSB sample consists of approximately 85.64% carbon and 11.81% oxygen prior to naproxen adsorption. Fig. S5 displays the EDX spectrum and data of the 700 + 700-WSB sample after adsorption. The rise in oxygen percentage to 12.94% in the 700 + 700-WSB sample suggests successful naproxen adsorption onto the sample.

Factors affecting naproxen adsorption

The impact of 700 + 700-WSB on the adsorption capacity of naproxen was examined at different pH levels, and the findings from the experiment are shown in Fig. S6. In the studies carried out in the range of pH 5.0–8.0, the highest naproxen adsorption removal of 700 + 700-WSB was obtained at pH 6.84 (% 92). In Sect. “Characterization of walnut shell biochar”, it is stated that the pKa value of naproxen is approximately 4.19 and, in this case, naproxen is found in anionic form when the solution pH is higher than its pKa. In this case, the process of adsorption takes place between the anions of naproxen present in the solution and the positively charged surface of biochar, primarily because of mutual electrostatic attraction. At pH 6.84, where the highest removal occurs, naproxen is in the anionic form, and the surface charge of 700 + 700-WSB is positive at this pH value. A decrease in naproxen removal was observed when the pH was 8.0, because the surface charge of the 700 + 700-WSB was negative. For this reason, pH 6.84 was chosen as the optimum pH value for naproxen adsorption on 700 + 700-WSB.

The effect of the amount of adsorbent on the percentage removal of naproxen molecules is shown in Fig. S7. As shown in Fig. S7, the percentage of naproxen removal increased simultaneously with an increase in the adsorbent amount. This is due to the increased surface area and active sites resulting from the increase in adsorbent amount. In addition, because the highest removal percentage was obtained at 2 g/L (92%), this was determined to be the optimum adsorbent amount in naproxen adsorption studies.

The time dependence of naproxen adsorption on WSB was investigated using an initial naproxen concentration of 10 mg/L (Fig. S8). The data in Fig. S8 show that there is an increase in removal up to approximately 240 min, but no significant increase in the removal percentage was observed after 240 min, and the equilibrium state was reached. When the results were evaluated, 240 min was determined to be the optimum time for naproxen adsorption on WSB.

To investigate the temperature dependence of naproxen adsorption on WSB, adsorption studies were conducted at three different temperatures (25, 40, and 55 °C). As shown in Fig. S9, the highest removal efficiency was achieved at room temperature (25 °C, 92%).

Adsorption kinetics

Adsorption kinetics is an important parameter in explaining the adsorption properties of an adsorbent. Kinetic experiments were conducted at room temperature and the natural pH of the solution (pH 6.84) using a 10 mg/L concentration of naproxen and 2 g/L of 700 + 700-WSB over a range of 0–300 min. In this study, the adsorption kinetics were explained by PFO, PSO, Elovich, and intraparticle diffusion models. The kinetic curves of naproxen adsorption by the WSBs at an initial concentration of 10 mg/L are shown in Fig. 3a, and the corresponding parameters of the applied models are listed in Table 2. When Table 2 is analyzed, the R2 values for the PFO, PSO, and Elovich models were 0.989, 0.998, and 0.993. Considering the R2 values, it can be seen that the most compatible model was PSO. However, the qe value (4.53 mg/g) obtained in the PFO model is closer to the value obtained with the experimental data (4.62 mg/g). Therefore, the intraparticle diffusion process should be examined to better define the adsorption mechanism.

Fig. 3
figure 3

a PFO, PSO and Elovich kinetics for naproxen adsorption onto 700 + 700-WSB, b Intra particle diffusion mechanism for naproxen adsorption onto 700 + 700-WSB. (adsorption conditions: 2 g/L 700 + 700-WSB, 10 mg/L naproxen, 25 °C, pH = 6.84, 5 h)

Table 2 Corresponding parameters for naproxen adsorption onto 700 + 700-WSB in the kinetic models

Generally, adsorption occurs in three stages: film diffusion, surface diffusion, and intraparticle diffusion. Film diffusion initially occurs as the adsorbate is transported to the surface of the adsorbent. In the second stage, the adsorbate molecules penetrated the interior of the particles through intraparticle diffusion. Finally, adsorption of the adsorbate occurs in the active regions of the internal and external surfaces, leading to a final equilibrium stage. This equilibrium stage is reached when the intraparticle diffusion process slows down owing to the very low residual adsorbate concentration and decrease in available adsorption sites [44, 57]. If the curve representing intraparticle diffusion is drawn such that it passes through the origin, intraparticle diffusion will be the only factor limiting the adsorption rate. However, Fig. 3b shows the presence of a three-step linear region; therefore, the adsorption process is controlled by a multistep mechanism. The first linear part of Fig. 4b (3.162 ≤ t0.5 ≤ 5.477) shows the liquid film diffusion step. This linear region represents the outer mass transfer from the solution to the outer surface of the 700 + 700-WSB. The second linear part (7.745 ≤ t0.5 ≤ 14.491) represents intra-particle diffusion, which means binding of adsorbate to the pores of 700 + 700-WSB active sites. The third phase signifies the attainment of the final equilibrium stage, wherein intraparticle diffusion decelerates owing to the low remaining adsorbate concentration and the reduced availability of adsorption sites on the surface of the 700 + 700-WSB. Hence, the presence of multicollinearity in the graph suggests that the adsorption of naproxen on 700 + 700-WSB involves not only intraparticle diffusion, but also external mass transfer [44, 58].

Fig. 4
figure 4

At various solution temperatures, the isotherm of naproxen adsorption onto the 700 + 700-WSB adsorbent. (adsorption conditions: 2 g/L 700 + 700-WSB, initial naproxen concentration 10–400 mg/L, pH = 6.84, 4 h)

Adsorption isotherms

Isotherm tests were conducted in 240 min at three distinct temperatures—25, 40, and 55 °C—and at the solution's natural pH of 6.84 using a ratio of 2 g/L 700 + 700-WSB and a concentration range of 10–400 mg/L naproxen. To predict the naproxen adsorption mechanisms on WSB, equilibrium data were used for the nonlinear Langmuir, Sips, Temkin and, Freundlich, isotherm models (Fig. 4). The corresponding model parameters are listed in Table 3.

Table 3 Corresponding isotherm parameters for naproxen adsorption onto 700 + 700-WSB at different temperatures

Langmuir isotherm theory [37] posits that adsorbate molecules are adsorbed onto a morphologically uniform adsorbent surface in a single layer. This surface contains a fixed number of energetically equivalent adsorption sites that do not interact laterally. In contrast to Langmuir's model, the Freundlich model [40] suggests the existence of active sites with varying energies on a heterogeneous surface and proposes that adsorption occurs in multiple layers. The Sips isotherm model [59] is a composite model that integrates Freundlich and Langmuir isotherms. It is commonly employed in heterogeneous adsorption situations, in which the adsorbed molecule exhibits multiple adsorption sites. However, the current model fails to consider the potential synergistic effects between adsorbates. During the adsorption process, the Temkin adsorption model [60] accounts for the indirect interaction between the adsorbent and adsorbate. In addition, this model accounts for the coverage of a single layer. Assuming that the adsorption heat decreases linearly, rather than logarithmically, this model concludes that the adsorbate adheres to the adsorbent and covers its surface. This model considers the interceding ion concentrations. An exothermic adsorption process is indicated by a positive value of parameter B, whereas an endothermic process is indicated by a negative value of parameter B.

From Fig. 4, it can be seen that the isotherm data for none of the three temperatures fits the Freundlich isotherm. Furthermore, the values of n < 1, as presented in Table 3, suggest that the adsorption process was unsuitable for multilayer adsorption. In addition, the highest R2 values in Table 3 correspond to the Langmuir (0.985) and Sips (0.997) models. The fact that the Sips heterogeneity constant m is close to 1 indicates that naproxen adsorption follows a Langmuir-like isotherm model, and that adsorption occurs on a homogeneous surface. It was also found that naproxen adsorption on 700 + 700-WSB was more consistent with the Langmuir isotherm when the experimental qmax value (58.307 mg/g) was compared to the calculated qmax value (58.873 mg/g). The positive B value obtained from the Temkin isotherm model for naproxen adsorption on 700 + 700-WSB indicates that adsorption is exothermic and spontaneous.

Adsorption thermodynamics

An essential stage in the investigation of adsorption processes is the accurate determination of the thermodynamic parameters. An effective method for evaluating the thermodynamic variables involved in an adsorbate/adsorbent system is based on the application of the reaction equilibrium constant. In this study, the temperature dependence of naproxen uptake by 700 + 700-WSB was investigated in the range 25–55 °C. The thermodynamic parameters, enthalpy change (ΔH°), Gibbs free energy (ΔGº), and entropy change (ΔS°), were calculated using Eq. 4:

$$\ln K_{C} = \frac{{ - \Delta H^{^\circ } }}{R} \times \frac{1}{T} + \frac{{\Delta S^{^\circ } }}{R}$$
(4)
$$K_{{\text{C}}} \approx K_{{\text{L}}} \times M_{{{\text{Naproxen}}}} \times C^{{\text{O}}} \times \left( {10^{3} } \right)$$
(5)

here KC is the dimensionless equilibrium constant, R is the universal constant for gases (8.314 J/mol K), where T is the absolute temperature in Kelvin (K). To determine the thermodynamic characteristics of the naproxen adsorption process on 700 + 700-WSB, KL (Langmuir constant) was used. KL was converted to KC using Eq. 5 [30].

The negative ΔG° and ΔH° values in Table 4 indicate that the adsorption of naproxen on the WSBs occurs spontaneously and exothermically. Furthermore, the negative ΔH° (− 29.52 kJ/mol) value indicates that the adsorption of naproxen by WSBs is weak interactions may play a role in adsorption [36]. The negative entropy value (ΔSº =  − 0.026 kJ/mol K) indicates that randomness decreases after the uptake of naproxen by 700 + 700-WSB [61].

Table 4 Thermodynamic parameters obtained from the adsorption of naproxen by the WSB adsorbent

Desorption, reusability, and potential real sample application

Desorption is a crucial factor in prospective environmental applications in terms of sustainability and economic effectiveness. According to the literature, alcohol hydroxyl groups provide them with higher solubility for organic micropollutants [36, 62].

As shown in Table 5, ethanol (68%) and methanol (59%) were the most effective desorption agents for naproxen. Other desorption agents (acetonitrile, NaOH, HCl and pH = 12 distilled water) were not as effective as ethanol and methanol in naproxen desorption. In general, however, the desorption efficiency was relatively low under the desorption agents used. This suggests a large contribution of pore filling as well as weak interaction in the adsorption mechanism.

Table 5 Desorption efficiency (%) of naproxen from the 700 + 700-WSB (Desorption conditions, Co = 10 mg/L, 4 h, 25 °C, 2 g/L)

The reusability of 700 + 700-WSB was tested using the data obtained from three adsorption–desorption cycles (Fig. S10). Ethanol, which provided the highest desorption efficiency, was used as the desorption agent. The adsorption–desorption operating conditions were as follows: room temperature, 2 g/L 700 + 700-WSB, 10 mg/L naproxen concentration, and 4 h. It was observed that 700 + 700-WSB retained more than 75% of its initial adsorption capacity after three adsorption/desorption cycles.

To validate naproxen adsorption using the 700 + 700-WSB adsorbent, a real sample study was conducted with four different water samples. In Table 6, the amount of naproxen spiked into the real water samples and the % removal are given. For naproxen, the removal percentages obtained in real water samples were lower than those in the model solutions (92%). This may be due to competitive adsorption between atomic (i.e. Na+, K+, Cl) and/or molecular species (i.e. NO2−) or uncharged species and naproxen ions, which are present at different concentrations in real water samples as binding sites in the structure of WSBs.

Table 6 The adsorption removal of naproxen onto the 700 + 700-WSB adsorbent under different water matrices

Conclusions

In this study, biochar was obtained from walnut shells (WS) using a one and two-stage pyrolysis process. The obtained biochars was used as an adsorbent for the removal of naproxen, an organic pollutant, from aquatic systems. When the naproxen removal efficiency of the synthesized biochars from aqueous systems was examined, it was determined that 700 + 700-WSB obtained by two-stage pyrolysis had the highest removal efficiency (92%). Walnut shell biochar (700 + 700-WSB) had a high surface area of 649 m2/g and pronounced porous structure according to BET and SEM analysis results. The highest amount of naproxen removed, as determined by adsorption studies, was 58.8 mg/g. While the pHPZC for 700 + 700-WSB was at pH 7.15, the greatest adsorption efficiency was observed at neutral pH (6.84), indicating the involvement of electrostatic attraction in adsorption. The adsorption of naproxen on 700 + 700-WSB was in good agreement with the Langmuir and Sips isotherm models, with removal capacities of 58.87 and 98.92 mg/g were obtained. However, while the adsorption of naproxen on WSB is adapted to the PSO kinetic model, the adsorption process is controlled by a multistep mechanism. The thermodynamic results revealed that the adsorption process was exothermic and spontaneous. In Table S3, the naproxen adsorption capacities of 700 + 700-WSB and the other adsorbents are compared. Various water samples were subjected to adsorption, and satisfactory results were obtained. In conclusion, 700 + 700-WSB is an effective adsorbent for naproxen removal.