1 Introduction

Over the past few decades, the combination of industrialization and rapid population growth has led to a significant rise in the production of contaminated water. Among the array of pollutants affecting water bodies, synthetic dyes stand out as one of the most prevalent forms of organic pollution. These dyes, commonly used in industries such as paint, textiles, paper, leather, and cosmetics, pose a substantial environmental concern due to their widespread presence and persistence in aquatic ecosystems [1, 2]. The procedure used for dying in textiles and the ink-producing sector extensively utilizes cationic dyes like methylene blue (MB). Because of the MB’s high toxicity and chemical stability, it cannot be biodegraded in the waste product [3]. Mental diseases, high blood pressure, nausea, and abdominal distress in the human body are the effects caused by MB whenever its concentration exceeds 7 mg per kg of the body [4]. Polluted water treatment is crucial and significant because it poses a risk to aquatic life cycles and disturbs the equilibrium of the ecosystem due to its inability to decay and its carcinogenic effects [5]. The MB from wastewater can be eliminated by photocatalytic degradation [6], separation by membrane [7], coagulation, and electrochemical [8], and these methods cannot be used effectively for the treatment of wastewater containing MB due to their high operational costs, lowered efficiency, and chemical usage. The United States Environmental Protection Agency (USEPA) has acknowledged that adsorption is an effective and successful method for treating wastewater due to its reduced operational cost, greater removal effectiveness, quick response time, design, and operational simplicity [9].

Earlier this decade, several adsorbents were developed, and their effectiveness in treating wastewater that contains MB has been investigated. For example, different forms of activated carbon [10] and biochar are produced by a variety of thermochemical processes using carbonization substances, such as plant tissue, like hydrothermal operations, pyrolysis, gasification, torrefaction, and carbonization [11, 12], fruit and trash from agriculture [13], poultry dung [14], and municipal solid waste and several generated by human sources [11]. Because it contains an abundance of carbon, porosity, and surface area, as well as an inexpensive cost, biochar has recently attracted interest in wastewater treatment processes [15, 16]. The high functionality associated with biochar surfaces increases the likelihood of toxic chemical absorption from wastewater [17]. Chemical engineering techniques have been employed to augment the adsorption capacity of biochar produced via thermochemical methods [4]. Nonetheless, chemically treated biochar comes with certain drawbacks, including cost implications and challenges associated with chemical release [4].

The worldwide increase in energy demand, population expansion, rising living standards, and industrial growth have intensified scrutiny on the use, distribution, and pricing of fuels derived from fossil sources [18]. To address these challenges, researchers worldwide have been increasingly drawn to the conversion of carbonaceous materials, especially biomass, into value-added products. These include various types of chemicals, gaseous products, biochar, and bio-oil produced through pyrolysis, aiming to alleviate the aforementioned issues [19, 20]. Furthermore, biomass pre-treatment has emerged as a crucial step in enhancing the quality of pyrolysis products. Many researchers have turned to hydrothermal carbonization (HTC) as a pre-processing technique for biomass to improve its quality before pyrolysis [21]. HTC stands out as a scientifically compelling thermal conversion method for biomass, producing solid high-carbonization products within a controlled and favorable environment [22]. Recently, researchers have explored the utilization of various biomasses, including corn stalk residue, banana pseudo-stem, pineapple peel, and orange peel waste, to produce biofuel and hydrochar through the HTC process [23,24,25,26]. After reviewing the literature from the past several years, it was observed that sunflower stalk has not been utilized as a feedstock in the HTC process. Table 1 presents a comparative study of dye removal from wastewater via adsorption, employing various biomasses as adsorbents.

Table 1 A comparative study of dye removal from wastewater through adsorption using biomass as an adsorbent

Based on the author’s knowledge and the identified research gap, no study has been conducted on the production of hydrochar using sunflower stalks as a feedstock. In this study, hydrochar was produced from sunflower stalks through the HTC process. The investigation involved adjusting the carbonization temperature within a range of 220 to 300 °C and varying the residence time between 2 and 10 h to examine the impact of process variables on hydrochar yield and physicochemical characteristics. With increasing temperature from 220 to 300 °C, the hydrochar yield decreased from 46.40 to 40% [27]. In the HTC process, subcritical water serves multiple functions, acting as a catalyst, reagent, or solvent. Its primary role is to expedite the hydrolysis and cracking of lignocellulosic biomass [28]. During HTC, there exists a conspicuous parallel network of numerous distinct reactions, encompassing aromatization, condensation polymerization, dehydration, hydrolysis, and decarboxylation [29]. The HTC process has been considered a suitable method for low energy-consuming, a by-product that is affordable also at the SME (small and medium enterprise) level because it is carried out under comparatively mild operational conditions compared to other hydrothermal processes such as hydrothermal liquefaction (HTL) and hydrothermal gasification (HTG) [30, 31].

The aim of the study was to evaluate the efficacy of raw biomass (BM) and hydrochar (HC) derived from the hydrothermal carbonization (HTC) of sunflower stalks in eliminating MB dye from synthetic wastewater. Physicochemical properties of both adsorbents were analyzed using SEM-EDX, XRD, point of zero charge (pHPZC), and proximate and ultimate studies. Throughout the adsorption process, various independent variables, including adsorption duration, adsorbent dosage, solution pH, initial MB dye concentration, and temperature, were examined. Additionally, various kinetics models, including the Lagergren, Ho and McKay, and Elovich models, were employed to determine the most suitable model for describing the kinetics of the adsorption process. Two widely used mass-transfer models, the Weber and Morris model and the Boyd model, were utilized to comprehend the mass-transfer mechanisms during adsorption. Isotherm models such as Langmuir, Freundlich, and Sips were employed to elucidate the adsorption mechanism of MB and its distribution between the liquid and solid phases at equilibrium conditions. Furthermore, thermodynamic parameters were examined to ascertain the spontaneity and feasibility of the adsorption process.

2 Materials and methodology

2.1 Material selection and preparation

Merck Chemical and S.D. Fine Chem-Ltd. India provided all chemical reagents with analytical quality and methylene blue (C16H18ClN3S) dye, which also had high purity, was employed in the experiments without any further treatment or purification Sunflower stalks were collected from the agriculture field at Banaras Hindu University, Varanasi, India. Pests and disease-free sunflower stalks were washed several times, air-dried to an optimal moisture content, and then cut into smaller pieces (3–5 mm in size). These small pieces were ground in a grinder to obtain fine powder and then sieved (300–150 microns mesh) to obtain an approximate average particle size of 225 µm. The resulting powder was then kept in a desiccator until the next use.

2.2 HTC experiment

HTC of sunflower stalk powder was carried out to fill 600 mL of powder and distilled water mixture in a 1 L stainless steel autoclave reactor with a controller shown in Fig. 1. In each batch experiment, distilled water (600 mL) and dry sunflower stalk powder (60.0 g) were put into the 1-L Parr reactor (Parr 4520, Parr Instrument Company) at 25 °C temperature. The biomass and water mixture were elevated to the desired temperature (220 to 300 °C) under autogenous pressure of 4.4 to 6.0 MPa while being stirred magnetically at a speed of 800 rpm. The rate of heating was set at around 4 °C/min. The autoclave was maintained at a pre-set temperature after the heating phase for 2 h. The solid by-products (HC) were gathered, rinsed triplicate times with distilled water, recovered using vacuum filtration, and after that dried for 24 h at 105 °C in an oven. Desiccators were used to keep the dried HC. A carbonization temperature of 220 °C was used to classify the hydrochar residence time, in keeping with the 2 h residency requirement [27]. Sunflower stalks were hydrothermally carbonized to obtain hydrochar. Equation (1) is applied to evaluate the yield of hydrochar produced from the HTC of biomass.

Fig. 1
figure 1

Schematic diagram of high temperature and pressure batch experimental setup for HTC of biomass

$$\mathrm{Yield}\left(\%\right)=\left(\frac{\mathrm{mass}\;\mathrm{of}\;\mathrm{hydrochar}\;\mathrm{produced}}{\mathrm{the}\;\mathrm{initial}\;\mathrm{mass}\;\mathrm{of}\;\mathrm{biomass}\;\mathrm{feedstock}}\right)\times100$$
(1)

2.3 Characterization of hydrochar obtained from HTC and biomass

The solid addition method was used to determine the pHPZC value of both BM and HC. It denotes a pH value at which the surface charge of the adsorbent achieves neutrality. In this method, 50 mL solution of potassium nitrate (KNO3) 0.1 M was prepared in a 100 mL conical flask to be used in the computation of the pHPZC of both adsorbents. By incorporating 0.1 N hydrochloric acid (HCL) or 0.1 N sodium hydroxide (NaOH), the initial pH (pHi) of the solution was adjusted from 2 to 12. Then, an adsorbent (0.05 g) was added to the prepared solution and stirred at 30 °C for 24 h. The pH of the solution was then recorded as the final pH (pHf). The ΔpH (pHf − pHi) was plotted against the pHi. The adsorbent pHPZC was calculated as the location where the plot intersected the x-axis [39]. Proximate analysis of the BM and HC was performed as per the ASTM guidelines (E871-82, E872-82, and E-1755–01) to determine fixed carbon (FC), volatile matter (VM), moisture content (MC), and ash contents. A CHNS (Euro EA 3000, Elemental Analyzer, Italy) analyzer was used for the ultimate analysis (C, H, N, and S) of BM and HC. However, oxygen percentage was determined using a different basis. SEM–EDX (MA15/18, Carl Zeiss Microscopy equipped with Team Pegasus Integrated EDS-EBSD with octane plus and Hikari Pro) analyses were used to evaluate the surface morphology and elemental percentage of BM and HC samples. XRD (Rigaku SmartLab 9 kW Powder) was used to analyze the amorphous structure of HC and BM. A monochromatic Cu-K radiation source (30 kV, 30 mA) with a scanning rate of 2° per minute and 10–90° 2θ range at room temperature was used to study the XRD spectra.

2.4 Batch adsorption removal of MB: experimental method

The aqueous MB solution was treated using batch mode adsorption with BM and HC as adsorbents. A solution of a specific concentration of MB (50 mL) was introduced to a conical flask (100 mL) that was kept at a constant pH by adding the desired amount of BM and HC. The flask was positioned in an incubator shaker (REMI, India) and stirred at 150 rpm and 30 °C until reaching equilibrium. Subsequently, the solution was filtered through the Whatman filter paper (No. 1), and the concentration of MB in the supernatant was determined using a spectrophotometer at the λmax of 664 nm [40]. The variation of various parameters was examined during batch adsorption. By modifying the pH of the MB solution with 0.1 N HCl, 6 N H2SO4, and 0.1 N NaOH, 6 N NaOH solution, the desired pH of the MB solution was attained. To obtain a specified concentration of MB solution from a stock solution of MB, flasks were cleaned and diluted the stock solution (1000 mg/L) with double-distilled water. Equations (2) and (3), respectively, are used to determine the % removal of MB and the adsorption capacity.

$$\mathrm{Removal }(\mathrm{\%}) =\frac{{C}_{i}-{C}_{e}}{{C}_{i}}\times 100$$
(2)
$${q}_{e}=\frac{{C}_{i}-{C}_{e}}{M}\times {V}_{s}$$
(3)

MB’s starting and equilibrium concentrations, expressed in milligram/liter, are Ci and Ce, respectively. The adsorbent’s qe has an mg/g adsorption capability. The volume of MB solution in a liter is designated as Vs. Additionally, M stands for the adsorbent amount in grams.

In this study, adsorption kinetics was investigated using three intriguing models: the Lagergren model (representing pseudo-first-order kinetics), the Ho and McKay model (representing pseudo-second-order kinetics), and the Elovich model. Mass transfer models were also explored like the Weber and Morris model and the Boyd model. Furthermore, we delved into adsorption isotherm models, fitting Langmuir, Freundlich, and Sips isotherms based on our experimental findings from both adsorbents. Additionally, we meticulously calculated the thermodynamic parameters to deepen our understanding of the adsorption process.

3 Results and discussions

3.1 Characterizations of both adsorbent hydrochar and biomass

3.1.1 Point of zero charges (pHPZC) of biomass and hydrochar

The adsorbent’s pHPZC value is very useful for understanding the adsorption mechanism. It can be described in Fig. 2 as the pH level at which the adsorbent is either globally neutral or has a net charge density of zero. The point of zero charge (pHPZC) is valuable for identifying the pH range conducive to electrostatic attraction between the adsorbent and adsorbate, facilitating adsorption. At pH values lower than the pHPZC, the adsorbent’s surface tends to be predominantly positively charged due to protonation. Conversely, at pH values higher than the pHPZC, the surface becomes mostly negatively charged due to deprotonation [28]. The selection of the pH range for the adsorption process can be tailored to the nature of the adsorbate, whether it is anionic or cationic. Adsorbates carrying positive charges are likely to be adsorbed more effectively at pH values higher than the pHPZC. Conversely, adsorbates with negative charges are probably adsorbed more effectively at pH values lower than the pHPZC. This is because, in this pH range, there is enhanced electrostatic attraction between the adsorbent and adsorbate, promoting the adsorption process [1]. In addition, other factors, including surface complexation and contact, could contribute to the adsorption process. BM and HC were found to have pHPZC values of 7.5 and 6, respectively. Recently, a study showed that the pHPZC values of raw peanut hull and after activation with 0.1 M NaOH are 6.4 and 7.1, respectively [1]. Since HC was produced through the hydrothermal carbonization of biomass, which was accomplished by thermally treating the biomass during the HTC process, The lower pHPZC value in the case of HC may be attributed to a reduced number of functional groups that exhibit a stronger association with it. Therefore, HC has been considered more favorable than biomass for the removal of MB dye.

Fig. 2
figure 2

An illustration of the point of zero charges (pHPZC) of biomass and hydrochar

3.1.2 Proximate and ultimate analysis of biomass and hydrochar

The objective of the proximate analysis is to evaluate the percentage of FC, AC, MC, and VM. Moreover, the results were compared with some other reported biomass, such as dahlia flower [41] and cotton stalk [42] in Table 2. The weight percentages of MC, VM, AC, and FC of biomass were 5.9, 74.32, 9.7, and 15.98%, respectively, and for HC, 2.69, 70.26, 3.4, and 26.34%, respectively. The percentage of C, H, N, and O data was obtained from the ultimate analysis and the values were found to be 45.57, 5.54, 0.95, 38.24% and 54.14, 5.52, 0.66, 36.28%, respectively, for BM and HC (Table 2). These values were quite similar to the previously reported hydrothermal-treated sunflower stalk study [43]. The sulfur content was found to be lower than the detection limit, and the oxygen content was calculated based on the difference. Comparing the hydrochar (HC) to raw biomass (BM), the results of proximate analysis reveal a notable improvement in the fuel quality of HC, primarily attributed to a substantial reduction in volatile matter (VM) and ash content, accompanied by an increase in carbon content. During hydrothermal carbonization (HTC), the ash and moisture content of the biomass decreases, particularly at temperatures exceeding 220 °C. This reduction in ash and moisture content at higher temperatures can be attributed to the enhanced removal of soluble inorganic fractions. Since ash contributes to contamination, slagging, and corrosion issues during combustion, the decreased ash content is advantageous, highlighting the benefit of the HTC method [44]. Initially, raw biomass (BM) exhibited a high content of volatile matter (VM) of 74.32%. A significant portion of volatile matter can lead to emission problems and lower combustion efficiency, making it unsuitable for direct combustion as a fuel [45]. In the current study, the content of volatile matter (VM) decreased to 70.26% after undergoing the HTC process, mainly due to the application of high temperatures. Higher heating values (HHV) of BM and HC were found to be 17.16 and 20.24 MJ/kg from bomb calorimeter data, which were nearly confirmed by the Dulong formula. The elements obtained from the ultimate analysis validated that the values of HHV (BM and HC) were related to the reduction in oxygen and increase in carbon content. The results indicated that the carbon content of HC increased. However, the nitrogen and oxygen contents decreased.

Table 2 Physicochemical characterization of biomass and hydrochar and compared with another reported biomass

3.1.3 SEM–EDX study of hydrochar and biomass

The SEM–EDX analyses of BM are shown in Fig. 3a, b before and after adsorption, respectively, similarly, for HC shown in Fig. 3c, d before and after adsorption. The findings revealed that, at a resolution of 100 microns, both adsorbents had heterogeneous, broken surfaces with porous structures resembling a honeycomb and were found to be very similar to the previously reported study [46, 47]. Because of the significant release of volatile materials due to strong devolatilization, HC has wider pores than BM [48]. Both types of adsorbents may be simpler to employ in the adsorption process due to the pores on their surfaces. The surface of biomass contained C, O, Na, Cr, and a relatively low amount of S. In contrast, the surface of biomass after adsorption contained C, O, Na, S, and Cr, according to an EDX analysis (Fig. 3e, f) [24]. In the case of biomass, Fig. 3b depicts blocked pores, indicating the accumulation of material within the pores, which confirms the adsorption of MB on BM. Additionally, further evidence for MB adsorption is observed through the presence of sulfur (S) on the surface of BM, along with elements chromium (Cr), carbon (C), sodium (Na), and oxygen (O). Following adsorption, Fig. 3d displays the SEM-EDX of HC. Compared to BM, HC exhibits larger pores. An examination using EDX revealed that the surface of HC contained chromium (Cr), carbon (C), sodium (Na), and oxygen (O) (Fig. 3g). Upon adsorption, filled holes are visible in the case of HC. The EDX analysis of HC after adsorption demonstrates the presence of sulfur (S) (Fig. 3h), indicating the adsorption of MB. Figure 3a–d depicts the heterogeneous nature of the adsorption surface of BM and HC, respectively, showing a variety of irregularly shaped pores. Before adsorption, the sponge-like structure of the adsorbent is apparent. Similar morphology patterns have been observed in several other studies [49, 50]. Compared to BM, HC features thinner and larger pores. The smoother surface of both adsorbents (BM and HC) and the decrease in the number of pores after MB dye adsorption indicate that the MB dye was absorbed on the surface of the adsorbent.

Fig. 3
figure 3

SEM images of a biomass before, b biomass after adsorption, c hydrochar before, and d hydrochar after adsorption. EDX images of e biomass before, f biomass after adsorption, g hydrochar before, and h hydrochar after adsorption

3.1.4 XRD study of hydrochar and biomass

BM and HC powder XRD studies were conducted, and Fig. 4 presents the findings. It was discovered that both adsorbents have large peaks at 2θ and values at 22.26° and 22.68°, respectively, corresponding to C (002), and it was found to be very similar to the previously reported XRD pattern of sunflower stalk [47]. The parallel and azimuthal alignment of aromatic lamellae that have partially carbonized was thought to be the cause of the C (002) plane [51, 52]. For the C (002) plane, broad and flat peaks indicate a lower degree of orientation [51]. Additionally, it was found that a broad peak between 2θ of 20° and 25° correlates to the aromatic layer’s staking structure and that a tiny crystal with a dimension perpendicular to the aromatic layer causes the peak’s broadening. In the instance of biomass at 2θ approximately 22.26°, the tiny, abrupt summits. In the case of HC, peaks at 2θ about 15.94°, 22.68°, and 34.60° were found to be sharper and more intense than those of BM. The reported literature shows similar findings [51, 52].

Fig. 4
figure 4

A typical illustration of XRD spectra of biomass and hydrochar

3.2 Study of batch adsorption of MB onto hydrochar and biomass

3.2.1 Impact of contact time for adsorption

The adsorption capacity and % removal of MB using both BM and HC were influenced by the contact time for adsorption. Figure 5a, b illustrates the variation of adsorption capacity and % removal of MB with contact time. Initially, adsorption duration varied till 240 min and other parameter values were fixed (adsorbent amount 1 g/L, initial MB concentration 50 mg/L, pH 7, at room temperature) to obtain the variation of time on MB adsorption. The adsorption capacity of both BM and HC was enhanced significantly up to the first 210 min and then gradually stabilized until it tended to equilibrium values of 11.91 mg/g and 24.05 mg/g after 240 min. MB removal using both reached 95.28% and 96.20% after 240 min for BM and HC. The initial sharp rise in adsorption capacity can be attributed to the rapid diffusion of MB dye molecules to the external surface of the adsorbent from the liquid solution. Subsequently, the gradual and steady increase in adsorption capacity occurs due to the longer diffusion path to reach the interior pores of the adsorbent and the saturation of active sites available for further adsorption [30, 53]. Therefore, all the batch adsorption experiments were performed for 240 min duration.

Fig. 5
figure 5

Impact of adsorption time for biomass and hydrochar with a adsorption capacity and b % removal of MB dye

3.2.2 Impact of initial concentration of MB

The behavior of the adsorption capacity and the % removal of MB using both adsorbents with an initial concentration of MB are shown in Fig. 6a, b. Initial MB concentration ranges from 10 to 100 mg/L, and other parameters fixed values of 1 g/L adsorbent amount and 7 pH of the MB solution for 240 min at room temperature were used to investigate the adsorption nature against the concentration of MB dye. As the concentration of MB increased, the % removal of MB decreased. It was observed that % removal of MB was achieved at 94.93% and 97.11% for BM and HC at 50 mg/L of MB initial concentration, respectively. After 50 mg/L initial concentration, the % removal of MB significantly decreased. The adsorption capacity increased as dye concentrations increased (for BM and HC: 20.34 and 43.39 mg/g at 100 mg/L), the possibility of an effective collision between the adsorbent and the MB molecule [54]. Additionally, HC has a greater capability for adsorption than BM. Larger concentrations of Cr, S, and Na on the surface of HC may be caused by increased pore size, active sites, surface area, and surface complexation. At higher initial dye concentrations, there is an excess of MB molecules vying for the available active sites on the adsorbent surface. As these sites gradually become saturated, the overall removal efficiency decreases due to the limited availability of unoccupied sites. However, the increase in adsorption capacity is a result of a larger quantity of dye being adsorbed per unit mass of the adsorbent, indicating heightened adsorption potential at higher initial concentrations. Therefore, a concentration of 50 mg/L was determined to be the optimal initial concentration of MB for adsorption on both adsorbents.

Fig. 6
figure 6

Impact of initial concentration of MB dye for the adsorption on biomass and hydrochar with a the adsorption capacity and b the % removal of MB dye

3.2.3 Impact of the pH of the solution

The charge density, functional group dissociation of the adsorbent’s associated functional groups, and the structure of MB were all highly affected by the pH of the working solution, making pH a crucial parameter [55]. The effects of the solution’s pH, which ranged from pH 2 to pH 12, were investigated using 1 g/L amount of adsorbent, 50 mg/L MB solution, at room temperature for 240 min of adsorption time for HC and BM. The outcomes are shown in Fig. 7a, b. It can be demonstrated that for the adsorption of MB using HC and BM at a certain amount of adsorbent, the % removal maximized up to pH 7 and pH 9, and the values were 97.98% and 96.70%, respectively, and then slightly decreased [30, 53]. The steric barrier between the -OH ions, however, may be the cause of the lower percentage of MB removal at higher pH greater than 7 and 9 for HC and BM, respectively. Based on the solution’s pH and the pHPZC for both (HC and BM), the significance of pH can be examined. MB is recognized as a positively charged cationic dye. HC and BM were found to have pHPZC values of 6 and 7.5, respectively. This suggests that the adsorbent’s surface will have a negative charge density for pH values above pHPZC and a positive charge density for pH values below pHPZC. Therefore, at higher pH levels (> 6 for HC and > 7.5 for BM), there will be a larger electrostatic interaction between the adsorbents and MB molecules. Therefore, the maximum MB dye removal must be at the pH value above the pHPZC value of the adsorbents. The outcomes of this study were verified by the pHPZC values and were preferred for further analysis of the study at the optimum pH of 7 and 9 for HC and BM, respectively.

Fig. 7
figure 7

Impact of the pH of solution for the removal of MB on a biomass and b hydrochar

3.2.4 Impact of the adsorbent amount

A key aspect in finding the adsorption potential of both BM and HC is the adsorbent dosage. Figure 8a, b shows the outcomes for BM and HC when the adsorbent amount was changed from 0.2 to 6.0 g/L and kept other parameters fixed at values of 50 mg/L initial MB concentration, pH 9 for BM and 7 for HC for 240 min at room temperature to assess the influence of the adsorbent dose. It was observed that the proportion of MB removed by both adsorbents initially increased and then decreased as the adsorbent dose increased. The MB removal increased from 86.00 to 96.48% for the BM dose increased from 0.2 to 4 g/L and 89.76 to 97.94% for the HC dose increased from 0.2 to 2 g/L. After that, the % removal of MB decreased for both adsorbents. With an increment in adsorbent amount, this might be attributable to a larger surface area and more active sites of HC than BM. Therefore, HC achieved maximum removal at a lower adsorbent dose than BM. Initially, at lower adsorbent doses, there is an abundance of available binding sites on the adsorbent surface, leading to efficient adsorption, an increase in dye removal, and a rise in adsorption capacity (for BM: 10.75–12.06 and for HC: 22.44–24.48 mg/g). However, as the adsorbent dose continues to rise, the available surface area becomes saturated, and excess adsorbent particles may agglomerate, hindering effective contact between the adsorbent and dye molecules. This can be the result of a decrease in removal efficiency and adsorption capacity (for BM: 12.06–11.80 and for HC: 24.48–23.28 mg/g) after a specific adsorbent dose [54, 56]. Therefore, the optimum value of adsorbents was demonstrated as 4 g/L and 2 g/L for BM and HC, respectively, and used for further study.

Fig. 8
figure 8

Impact of the adsorbent amount on a adsorption capacity and b the % removal of MB dye on biomass and hydrochar

3.2.5 Impact of temperature

It is well established that the adsorption process is temperature-dependent. In this study, the effect of temperature (ranging from 20 to 40 °C) on the percentage removal of MB using HC and BM was investigated at an initial concentration of 50 mg/L of MB, with an adsorbent dose of 2 g/L and 4 g/L at pH 7 and 9, respectively. The experiments were conducted over 240 min, and the results are depicted in Fig. 9. It was found that at the given condition, with an increase in temperature, the % removal of MB increased (98.96% and 96.95% for HC and BM at 40 °C). The observed phenomenon could be attributed to several factors. Firstly, at higher temperatures, there is increased ion mobility, which may enhance the adsorption process. Additionally, higher temperatures can facilitate a larger degree of MB molecule diffusion to both the internal pores of the adsorbent and the exterior surface, thereby contributing to higher adsorption efficiency [57]. Indeed, elevated temperatures provide additional energy to the system, facilitating greater mobility of dye molecules. This increased energy enables the molecules to overcome energy barriers for effective adsorption onto the adsorbent surface. Such a phenomenon is commonly associated with an endothermic adsorption process, where the heat supplied aids in breaking bonds and promotes stronger interactions between the adsorbent and MB molecules. Consequently, the removal of MB is favored at higher temperatures [58].

Fig. 9
figure 9

An illustration of the variation of temperature in the adsorption of MB dye on biomass and hydrochar

3.3 Kinetics and mass transfer

The adsorption kinetics analysis was utilized to ascertain the rate of MB adsorption onto BM and HC. This analysis also elucidated the mass transfer mechanism and the rate-controlling step associated with the movement of MB molecules. Various adsorption kinetics models, including the Weber-Morris and Boyd models, were employed to investigate the rate of MB dye molecule adsorption onto BM and HC.

3.3.1 Kinetics of adsorption

Lagergren model/pseudo-first-order kinetics

In 1898, Lagergren published a pseudo-first-order kinetic model for solid–liquid systems, and the following Eq. (4) can be used to define it:

$${\text{ln}}\left({q}_{e}-{q}_{t}\right)=-{k}_{1}{\text{t}}+{\text{ln}}{q}_{e}$$
(4)

where qt and qe denote the adsorption capacity of the adsorbent at time t and equilibrium, respectively, and k1 (min−1) is the rate constant. The slope of the plot between ln(qe − qt) vs. t can be used to calculate k1.

Based on adsorption capacity, the Lagergren model was applied to determine the rate of adsorption of MB dye molecules on the adsorbent surface. According to the Lagergren pseudo-first-order model, MB molecules were initially absent from the surface of the adsorbent at the beginning of the adsorption process, but they gradually gathered there until the process reached equilibrium. Equation (4) was applied to compute the rate constant parameters and theoretical adsorption capacity at various concentrations. The findings are given in Fig. 10b for hydrochar and Fig. 10a for biomass. At MB dye concentrations of 50 mg/L, the theoretical adsorption capacities (qe, cal.), first-order rate constants (k1), and correlation coefficients (R2) are provided for both in Table 3. BM has an adsorption capacity (qe) of 4.755 mg/g, while HC has an adsorption capacity (qe) of 8.126 mg/L. For BM and HC, the values of k1 are 0.014 min−1 and 0.012 min−1, and R2 for BM is 0.87885, while it is 0.94308 for HC.

Fig. 10
figure 10

Pseudo-first-order kinetic model’s linearized form of a biomass and b hydrochar

Table 3 Data of pseudo-first-order kinetic model of hydrochar and biomass

Ho and McKay model/pseudo-second-order kinetics

The advantage of the pseudo-second-order kinetic model is that it enables analysis of adsorption kinetics for low-concentrated solutions. In 1995, Ho derived a pseudo-second-order kinetic model. It is assumed that the rate-limiting phase of a pseudo-second-order process is chemisorption. The adsorbent’s active sites have a crucial impact in calculating adsorption capacity. The pseudo-second-order model’s differential equation is denoted by Eq. (5):

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

Here, qe and qt denote the adsorption capacity at equilibrium and depending upon time t. k2 (g·min/mg) represents the pseudo-second-order rate constant. This is practiced to calculate the k2 by plotting a graph between t/qt vs. t. The graph’s slope will determine the value of k2. Pseudo-second-order kinetics is used to analyze the rate of adsorption of pollutants from wastewater.

The dynamics of the adsorption of MB were explained using a pseudo-second-order model. On the surface of the adsorbent, the accessible active site is directly proportional to the adsorption capacity, and this model was predicated on the notion that the phase which determines the rate is chemisorption. Equation (5) was employed to compute the rate constant (k2) and theoretical adsorption capacity (qe) at various concentrations. The findings are given in Fig. 11b for hydrochar and Fig. 11a for biomass. Table 4 displays the pseudo-second-order rate constant (k2), theoretical adsorption capacity (qe, cal.), and correlation coefficient (R2) at a concentration of MB 50 mg/L for both adsorbents. BM has an adsorption capacity (qe) of 12.216 mg/g, whereas HC has a capacity (qe) of 24.857 mg/g. For BM, k2 was equal to 0.0069 (g/(mg·min)), but for HC, it was 0.0036 (g/(mg·min)). R2 for BM was 0.9976, while it was 0.9981 for HC. The initial rate constant (Vo = k2qe2), also known as the adsorption affinity, denotes the rate of adsorption. Vo has a value of 1.028 mg/g min for BM and 2.223 mg/g·min for HC.

Fig. 11
figure 11

The linearized form of the pseudo-second-order kinetic model of a biomass and b hydrochar

Table 4 Data of pseudo-second-order kinetic model of biomass and hydrochar

Elovich model

The Elovich model, developed by Zeldowitsch, was utilized to understand the chemisorption aspect of adsorption. This model is used to predict the activation and deactivation energies, as well as mass and surface diffusion of a system. The model has been meaningfully redeemed for its use in wastewater operations even though it was initially employed in gaseous systems. According to the model, the solute adsorption rate decreases exponentially with increasing deposit solute amounts (Eq. (6)).

$${q}_{t}=\frac{1}{\beta }{\text{ln}}(t)+\frac{1}{\beta }\mathrm{ ln}[\alpha \beta ]$$
(6)

where β is the desorption constant and α is the initial adsorption rate (mg/g·min). The graphical representation of the relationship between qt and ln(t) aids in discerning the mode of adsorption on the heterogeneous surface of the adsorbent, distinguishing between chemisorption and other mechanisms.

Whether adsorption is physisorption or chemisorption was tested using the Elovich model. Figure 12b for hydrochar and Fig. 12a for biomass, respectively, show the results of the calculation of the kinetic parameters using Eq. (6) in Table 5 for hydrochar and biomass. HC has an α value of 35.55 (mg/g·min), and BM has α value of 495.57 (mg/g·min). For the value of β, HC has a value of 0.076, whereas BM has a value of 1.004. While R2 is 0.9443 for HC, the correlation coefficient (R2) for BM is 0.9466.

Fig. 12
figure 12

Linearized form of the Elovich model of a biomass and b hydrochar

Table 5 Data of Elovich model of biomass and hydrochar

The three models Lagergren, Ho and McKay, and Elovich analyzed for the adsorption kinetics of MB on BM and HC, and it was found that Ho and McKay (pseudo-second-order kinetics) has the highest R2 values among the three models. Therefore, it was concluded that MB adsorption on BM and HC followed pseudo-second-order kinetics.

3.3.2 Mass transfer models

Weber and Morris model

In the model, the medium will be assumed to exhibit a uniform concentration of sites, onto which solute molecules adsorb to form a monolayer. The adsorption process is postulated to be diffusion-controlled, with adsorption occurring at a significantly faster rate compared to diffusion. The differential equation for the Weber and Morris model is represented as Eq. (7):

$${q}_{t} = {k}_{p}{\mathrm{t }}^{0.5}+ {C}_{wm}$$
(7)

where kp denotes the intra-particle diffusion rate constant (mg/g·min1/2) and Cwm represents the constant for any experiment associated with the boundary layer thickness (mg/g), where a larger impact on the limiting boundary layer is associated with a higher value of Cwm. This is practiced to calculate the kp by making a graph between qt vs. t0.5. The value of kp will be determined by the graph’s slope. The only factor controlling adsorption is intra-particle diffusion if a plot of qt vs. t0.5 is linear and crosses the origin. In contrast, the adsorption process is controlled by a multistep mechanism if the intra-particle diffusion plot shows numerous linear zones.

Weber and Morris’ model was employed to ascertain whether intra-particle diffusion or film diffusion was the rate-governing step during adsorption [59]. At concentrations of MB solution of 50 mg/L for HC and BM, respectively, Fig. 13b, a reveals the intra-particle diffusion model. Table 6 contains the value of the correlation coefficient and kp evaluated from the graph. For HC, the correlation coefficient is 0.99463, while for BM, it is 0.99531. The kp value for HC (0.447) was higher than BM (0.228), indicating that HC had a faster rate of adsorption than BM. Furthermore, it was observed that the adsorption process for both adsorbents occurred in three distinct phases. Initially, adsorption on the external surface governed the initial adsorption in the first stage. Subsequently, during the second stage of progressive adsorption, intra-particle diffusion served as the rate-controlling mechanism. The transition to the final equilibrium stage, characterized by a deceleration in intra-particle diffusion due to a decreased concentration of MB, was associated with the third stage of adsorption [60]. Additionally, none of the lines for each concentration passes through the origin, confirming that the mechanism controlling the adsorption process was not limited to internal diffusion. Ion exchange or exterior diffusion may also play a role in the adsorption process.

Fig. 13
figure 13

Weber and Morris model of a biomass and b hydrochar

Table 6 Data of mass transfer models of biomass and hydrochar

Boyd model

Based on film diffusion mass transfer and Langmuir equilibrium, an effective adsorption kinetic equation was formulated. In a plot similar to the Boyd plot, the model generates a line intersecting the origin of the coordinate system, with the slope of the line being associated with the film mass transfer coefficient. This approach can be utilized to ascertain whether film diffusion governs an adsorption process and, if so, to determine the film mass transfer coefficient (as described in Eq. (8)).

$${\text{ln}}(1-F)=k_{fd}t,\mathrm{ and }F= {q}_{t}/{q}_{e}$$
(8)

which in the Boyd plot of ln(1 − F) versus t.

To assess whether internal diffusion or an external film controlled the adsorption of MB onto the adsorbent, the Boyd model was also investigated. Figure 14b, a shows the Boyd plots for HC and BM, respectively. At a concentration of 50 mg/L, the kfd was calculated using the plots between ln (1 − F) vs. t. For HC, the correlation coefficient is 0.94308, while for BM, it is 0.87885 (Table 6). The Boyd plots for both (BM and HC) were non-linear at various concentrations and did not pass through the origin, demonstrating that other factors besides intra-particle diffusion also affect the rate of MB adsorption onto adsorbents. The adsorption process may be the result of a combination of chemical processes, intra-particle diffusion, and external surface diffusion.

Fig. 14
figure 14

Boyd model of a biomass and b hydrochar

3.4 Adsorption isotherm models

The mechanism of MB adsorption and its distribution in liquid and solid phases for both biomass and hydrochar under equilibrium conditions were elucidated by fitting adsorption isotherms to experimental data. In this study, experimental findings from both adsorbents were utilized to fit Langmuir, Freundlich, and Sips isotherms.

3.4.1 Langmuir adsorption isotherm

This is predicated on the idea that an adsorbate monolayer forms uniformly on the adsorbent. The Langmuir adsorption isotherm model predicts that there will not be any lateral interaction or conflict between the adsorbed molecules on the surface due to steric hindrance and that the adsorbent being utilized will have a finite number of identical accessible active sites that can interact with the adsorbate. The adsorbate is uniformly dispersed over the adsorbent’s surface with constant adsorption activation energy and enthalpy. Once the adsorbate molecule or ion has occupied all available active surface sites, there will not be any additional adsorption onto the adsorbent (BM and HC) [61]. The following Eqs. (9, 10, and 11) are used to calculate the amount of adsorbate absorbed and the equilibrium parameter.

$${q}_{e}=\frac{{q}_{m}\times {k}_{L}\times {C}_{e}}{1+({k}_{L}\times {C}_{e})}$$
(9)

qe = amount of adsorbate (mg) adsorbed per unit of adsorbent (g).

qm = maximum adsorption capacity.

kL = Langmuir isotherm constant.

Ce = MB at equilibrium (mg/L).

$$\frac{{C}_{e}}{{q}_{e}}=\frac{{C}_{e}}{{q}_{m}} +\frac{1}{{q}_{m}\times {k}_{L}}$$
(10)

The equilibrium parameter RL is a dimensionless constant that can be used to explain the fundamental properties of the Langmuir isotherm [37]:

$${R}_{L} = \frac{1}{1 + {k}_{L}{C}_{o}}$$
(11)

Co denotes the initial solute with the highest concentration. Reversible isotherms (RL = 0), linear isotherms (RL = 1), favorable isotherms (0 < RL < 1), and unfavorable isotherms (RL > 1) are all indicated by the value of RL.

This model represents the single-layer adsorption on a homogeneous surface of the adsorbent [59]. The molecules that have been adsorbed will not interact with the adsorbent surface [57]. At a particular MB solution concentration of 50 mg/L and adsorbent amount of 4 g/L and 2 g/L, it was discovered and shown in Table 7 that biomass and hydrochar had maximal absorption capacities (qe) of 21.863 mg/g and 45.475 mg/g, respectively, at temperatures of 303 K. BM and HC have correlation coefficients (R2) for the Langmuir model of 0.98565 and 0.98159, respectively (Fig. 15). For the BM and HC, the values of RL are 0.043 and 0.028, respectively.

Table 7 Data of adsorption isotherms of biomass and hydrochar
Fig. 15
figure 15

Linearized form of Langmuir adsorption isotherm model of biomass and hydrochar

3.4.2 Freundlich adsorption isotherm

In heterogeneous adsorption systems, the Freundlich isotherm is a commonly applied model where the adsorbent has various active surface sites with non-uniform energy distributions. This isotherm follows a multilayer adsorption pattern rather than being limited to the formation of an adsorbate monolayer on the absorbent. The Freundlich adsorption isotherm is expressed mathematically as follows (Eq. (12)):

$${\text{ln}}{q}_{e}={\text{ln}}{k}_{f}+\frac{{\text{ln}}{C}_{e}}{n}$$
(12)

Using intercept and slope, determine the adsorption capacity and intensity, plotting the Freundlich adsorption graph between qe and Ce. Although a low n > 1 number suggests that the adsorbent’s adsorption capabilities may also be used with low-concentration solutions, a larger n < 1 value indicates that the adsorbent works well with high-concentration solutions. Layered or hybrid materials typically follow the Freundlich adsorption isotherm because they do not produce an equal monolayer of adsorbate onto the surface due to a distinct infrastructure model.

For heterogeneous surfaces, this isotherm illustrates multi-layered adsorption [62]. For HC, the value of the correlation coefficient (R2) was 0.88524, while the value for BM was 0.89094 (Fig. 16). The Freundlich model’s kf value for BM was 6.183. The kf value for HC in the Freundlich model was 15.742. For BM, the value of n was 2.178, while for HC, the value of n was 2.244 (Table 7).

Fig. 16
figure 16

Linearized form of Freundlich adsorption isotherm model of biomass and hydrochar

3.4.3 Sips adsorption isotherm

The Sips isotherm model, which combines the Freundlich and Langmuir isotherm-type models, is anticipated to characterize heterogeneous surfaces more precisely. The Sips isotherm approaches the Freundlich isotherm at low adsorbate concentrations, but at high concentrations, it approaches the Langmuir isotherm [39]. The model can be written as Eq. (13):

$${q}_{e}=\frac{{q}_{m}{k}_{s} {C}_{e}\frac{1}{{\text{m}}}}{\begin{array}{c}1 + {k}_{s} {C}_{e}\frac{1}{m}\\ \end{array}}$$
(13)

where qm represents the maximum amount of MB adsorbed per unit mass adsorbent (mg/g), parameter m may be interpreted as the parameter delineating the heterogeneity of the system, and ks represents the Sips constant related to the energy of adsorption (L/mg)1/m.

The fundamental principles underlying the limiting behaviors of the Freundlich and Langmuir isotherms provide the basis for the derivation of the Sips isotherm, which is formulated as a composite model [63, 64]. At a specific MB solution concentration of 50 mg/L and adsorbent amount of 4 g/L and 2 g/L, respectively, it was discovered that BM and HC had maximal absorption capacities (qm) of 24.243 mg/g and 49.372 mg/g, respectively, at temperatures of 303 K (Table 7). When comparing BM and HC, the correlation coefficient (R2) for the Sips model was 0.9571 and 0.9470, respectively (Fig. 17). The Sips model’s ks value for BM was 0.433 and for HC was 0.636. As a result, it was discovered that the Sips isotherm was followed during the adsorption of MB on BM and HC based on the correlation coefficient (R2). In the study of BM and HC adsorbents utilized for MB adsorption, comparable results were also obtained, and it was found that Rawat et al. (2020) used Mentha plant waste as biomass to produce adsorbent and obtained 35.83 and 15.32 mg/g maximum adsorption capabilities with Langmuir and Freundlich isotherm fit [33]. Suwunwong et al. (2020) used corncob as biomass to produce adsorbent and followed Langmuir isotherm to obtain a 15.80 mg/g maximum adsorption capacity [33, 36]. Therefore, HC produced from sunflower stalks obtained a higher maximum adsorption capacity than the biomass used in the study mentioned above.

Fig. 17
figure 17

Sips adsorption isotherm model of biomass and hydrochar

3.5 Thermodynamic parameters

Predicting adsorption mechanisms (such as physical and chemical ones) requires thermodynamic analyses in every case. In a recent study, the main differences between physical and chemical adsorption were outlined in depth [65]. The following Eqs. (14, 15, and 16) can be used to calculate the thermodynamic parameters following the laws of thermodynamics:

$${\Delta G}^{o} = -RT\mathrm{ ln }{K}_{c}$$
(14)

The relationship between ΔGo and ΔH and ΔSo is described as follows:

$${\Delta G}^{o} = {\Delta H}^{o} -T{\Delta S}^{o}$$
(15)

The Van’t Hoff equation, a renowned expression, is derived by substituting Eq. (14) into Eq. (15).

$${\text{ln}}{K}_{c} = -\frac{{\Delta H}^{o} }{R}\times \frac{1}{T} +\frac{{\Delta S}^{o}}{R}$$
(16)

where R represents the universal gas constant (0.008314 kJ/(mol K)) and T represents the absolute temperature in Kelvin. The change in entropy (ΔS°) and change in enthalpy (ΔH°) are evaluated using the intercept and slope of a plot of ln Kc vs. 1/T (Eq. (16)), whereas Eq. (15) is directly used to evaluate the change in Gibbs energy (ΔG°). The equilibrium constant Kc in Eq. (16) must be dimensionless because J/mol, J/(mol K), and K are the standard units for ΔG°, the gas constant, and temperature, respectively.

The thermodynamic parameters for the equilibrium MB adsorption onto BM and HC were computed over a range of temperatures from 20 to 40 °C while maintaining the other constants. Equations (14), (15), and (16) [32] were used to derive Gibbs free energy (ΔG°), enthalpy (ΔH°), and entropy (ΔS°), which are listed in Tables 8 and 9. The Van’t Hoff plot between ln Kc and (1/T) yields the values of ΔS° and ΔH° from its slope and intercept.

Table 8 Data of Van’t Hoff equation of biomass and hydrochar
Table 9 Data of thermodynamic parameters of biomass and hydrochar

Figure 18b, a for HC and BM, respectively, shows the results. In Table 8, the values for ΔS° and ΔH° for each adsorbent are presented, and it was found that HC has a higher ΔH° value of 122.946 than BM (71.909) and also a higher ΔS° value of 0.48 than BM (0.247). According to the values of ΔH° and ΔS° for BM and HC, it appears that the HTC process leads to an increase in energy content and disorderliness compared to the BM. ΔH° values indicate that there is heat absorbed or released during the conversion process, which could potentially mean improved fuel properties or increased energy density in the hydrochar product. Additionally, ΔS° values suggest a level of randomness or disorder within the system, indicating that the HTC process results in a more disordered state compared to the initial structure of the biomass. The values less than zero of Gibbs free energy for BM and HC at various temperatures (Table 9) show that the adsorption process is spontaneous and feasible [30]. Additionally, a drop in temperature showed that a higher temperature helps with adsorption. Adsorption is an endothermic process, as seen by the positive enthalpy at various temperatures. The increase in randomness during the adsorption process at the solid/liquid interface was suggested by the positive value of entropy at various temperatures [66]. Additionally, a lower ΔG° for HC value compared to BM suggests that it is a suitable adsorbent for the elimination of aqueous MB.

Fig. 18
figure 18

a A plot of ln Kc vs. 1/T for biomass. b A plot of ln Kc vs. 1/T for hydrochar

4 Conclusions

The effectiveness of hydrochar produced from the first-ever HTC of sunflower stalk in the treatment of synthetic wastewater containing methylene blue dye was investigated through comparative research. Both hydrochar and biomass were characterized and demonstrated to be empty pores, honeycomb-like structures, higher pore volume, surface area, and maximum surface complexation of HC compared to BM. Therefore, at optimum conditions, HC had a maximum MB dye removal of 98.96% to BM of 96.95% and the optimum adsorption capacity of HC (49.37 mg/g) was demonstrated to be higher than BM (24.24 mg/g). The Sips isotherm model fits the experimental findings for both types of adsorbents. This revealed that at lower MB concentrations, the Langmuir model was followed, while at higher MB dye concentrations, the Freundlich model was followed. The kinetic study revealed that the best kinetic model to explain the adsorption process was the pseudo-second-order, revealing that intra-particle diffusion could potentially serve as the rate-determining step during MB adsorption as well as diffusion through liquid film and adsorption at the surface. Additionally, mass transfer tests showed that the rate-determining step involved both intra-particle diffusion and film diffusion. The thermodynamic analysis demonstrated that the MB adsorption onto BM and HC was spontaneous and exothermic. It was also discovered that interactions between the adsorbent and MB dye, including hydrogen bond and electrostatic attraction, ion exchange, and complexation on the surface of the adsorbent, were the primary driving forces behind the adsorption process. Hydrochar shows potential as an adsorbent for water treatment and deserves further consideration.