Introduction

Water is a vital substance for all living organisms and plays an essential role in the progress of human civilization and its use in various sectors such as industry and agriculture1. Unfortunately, due to population growth and rapid industrialization, pollution of freshwater resources by multiple pollutants, such as textile dyeing agents, pesticides, heavy metals, pharmaceutical compounds, etc., has become a critical and dangerous issue2. Among these pollutants, dyes are widely used in various industries such as fabric dyeing, leather industry, food, etc3. The textile industry ranks among the highest in water consumption and releases considerable quantities of wastewater containing organic dyes into surface water bodies4. Around 800,000 tons of dyes are produced yearly, with approximately 140,000 tons lost due to inefficient fabric binding5. Cationic dyes are hazardous because they can cause various severe diseases among different groups of dyes. One of the most essential cationic dyes is crystal violet (CV)6, which contains quaternary ammonium groups. The nitrogen atom is bonded to four alkyl groups, creating a net positive charge. This property increases the solubility of CV in water and leads to health complications such as liver and kidney diseases, respiratory failure, skin irritation, genetic mutations, cancer, and coronary infarction7,8. Consequently, its removal from aqueous solutions is essential and critical.

Various methods have been proposed for removing color-forming pollutants from aqueous solutions, divided into three general categories: physical, chemical, and biological9. The adsorption technique is a type of physical method that has always attracted the attention of researchers due to its efficiency, selectivity, low operating cost10, selective process, simplicity11, flexibility, and low cost12,13. In this method, the use of low-cost adsorbents with high surface area and adsorption capacity has always attracted the attention of researchers, including activated carbon, zeolite, silica, carbon nanotubes, polymers, biochar, industrial waste, clay, and agricultural waste14,15. Using agricultural waste as an adsorbent reduces its natural accumulation and the cost of producing efficient and effective adsorbents for removing pollutants from aqueous solutions16. Biochar (BC) is produced by the thermal decomposition of biomass and agricultural and animal wastes in an oxygen-free environment. It is characterized by desirable properties such as high specific surface area, functional groups on its surface, and its porous structure17,18. Pine trees are highly valued worldwide for their wood, contributing significantly to the economy. Consequently, a substantial amount of pine cones accumulates in the environment without a specific use. Composed of hemicellulose (46.5%), cellulose (18.8%), and lignin (37.4%), pine cones present an appealing and cost-efficient raw material for the production of biochar (PCBC)19. Furthermore, pine cones are a suitable and low-cost option for biochar production due to their renewable nature, abundance, availability, and economic cost20.

Layered double hydroxides (LDHs) are materials belonging to the hydrotalcite group, which consist of two layers of divalent and trivalent metal cations (Mn, Al, Ca, Fe) and anions (hydroxides, carbonates, chlorides), which are interconnected by electrostatic interactions21,22. These materials’ essential advantages and features include good ion exchange capacity, high specific surface area, low toxicity, reversibility of the structure, and simple and cost-effective synthesis methods23,24. However, to prevent the aggregation of LDHs, they can be loaded onto a cost-effective and stable particle matrix such as BC. This approach reduces the aggregation of LDHs, increases the existence of functional groups on the surface of the BC, and provides a larger reaction area24,25. However, despite the high dye adsorption capacity of LDHs, traditional processes such as filtration and centrifugation pose a significant challenge in the separation process and limit the use of adsorbents26. Therefore, magnetic field-based separation technology can effectively separate powdered adsorbents from aqueous solutions and potentially enhance dye adsorption27. Cobalt ferrite (CoFe2O4) is a material with moderate saturation magnetism suitable for adsorption due to its strong mechanical strength and good chemical stability28,29,30.

The present study used pine cones as a suitable and available product for producing activated carbon. Then, it was modified using CoFe2O4 and Mn-Fe LDH using chemical precipitation. After the modification of BC prepared from a pine cone, the adsorption ability of BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples was investigated by removing cationic CV dye from an aqueous solution. In this study, various analyses were used to characterize the physical and chemical properties of the selected adsorbents. The impact of temperature, pH, contact time, adsorbent dosage, and initial CV dye concentration on the adsorption efficiency was examined. Additionally, kinetic, thermodynamic, and isotherm studies were conducted to explore the adsorption process. The process was further analyzed regarding its physical, chemical, and exothermic/endothermic behavior.

Materials and methods

Materials and equipment

In the present study, pine cones obtained from the campus of Tabriz University were used as raw materials for biochar production. Anhydrous ferric chloride (FeCl3, MW: 162.2 g/mol) was purchased from Pharmachemical Company, Iran, hexahydrate cobalt nitrate (Co(NO3)2.6H2O, MW: 291.04 g/mol), hexahydrate cobalt nitrate (MnCl2.4H2O, MW: 197.91 g/mol), sodium hydroxide (NaOH, MW: 40 g/mol), hydrochloric acid (HCl, Purity: 37%) were purchased and used from Merck Company.

To investigate the structural properties, FTIR, SEM, BET, XRD, and EDX-Map techniques were used, and the specifications of the devices have been fully presented in previous reviews31. A UV-vis instrument, Specord 250, manufactured by Analytik Jena, was used to examine the concentration of the residual CV dye in the aqueous solution. Also, to explore the magnetic properties of the samples, a VSM instrument, LBKFB, manufactured by Kashan Desert Magnetis Company, was used.

Adsorbents’ synthesis

This study used pine cones from the University of Tabriz campus fruit of pine trees to prepare biochar. Initially, the collected cones were washed with water several times to remove impurities. After washing, the cones were placed at 70 °C for 24 h to dry completely. After drying, the cones were placed in a tube furnace under a nitrogen atmosphere at 500 °C for 3 h to carbonize completely. The carbonized cones were ground into powder using a mill to synthesize the desired composites. To surface modify pine cone carbon with magnetic cobalt ferrite nanoparticles CoFe2O4 by chemical precipitation method, 1.35 g of iron (III) chloride and 0.6 g of cobalt (II) nitrate (molar ratio of iron to cobalt 2:1) in 50 mL of water were stirred in a flask for 10 min at room temperature by magnetic stirring (500 rpm) until completely dissolved. In the next step, 0.5 g of pine cone carbon was added and stirred for 20 min with magnetic stirring (500 rpm). The mixture was stirred in an oil bath at 80–90 °C. In another beaker, 3 g of sodium hydroxide was added dropwise to 50 mL of distilled water and stirred for 10 min to homogenize. After that, 3 M sodium hydroxide solution was added to the flask as an oxidant and stirred for 3 h at the same temperature and 500 rpm to complete the reaction. Following the reaction, a magnet was used to separate the synthesized magnetic nanocomposite from the water, which was then washed multiple times with distilled water to neutralize the pH (6–7). Once neutralized, the nanocomposite was placed in an oven at 100 °C for 24 h to achieve thorough drying. A pine cone carbon surface modified with magnetic cobalt ferrite nanoparticles (BC/CoFe2O4) was used at this stage.

In the next step, to synthesize the BC/CoFe2O4@Mn-Fe LDH magnetic nanocomposite via the chemical precipitation method, 0.811 g of ferric chloride and 0.989 g of manganese chloride (molar ratio of iron to manganese 1:1)31 were dissolved in 50 mL of water and stirred with 500 rpm for 10 min at room temperature using a magnetic stirrer until a homogeneous solution was achieved. Then, 0.7 g of BC/CoFe2O4 was added to the mixture, and stirring continued at 500 rpm for another 30 min. In a separate container, 0.7 g of NaOH and 0.75 g of sodium carbonate were dissolved in 50 mL of distilled water and stirred for 10 min until thoroughly mixed. Finally, 50 mL of the above solution was added to the flask and stirred for 4 h at 65 °C to complete the reaction. After the reaction, it was washed with distilled water using a centrifuge (2500 rpm and 5 min) to neutralize it completely. Finally, it was dried in an oven at 100 °C for 24 h. It is worth noting that in the structure of the BC/CoFe2O4@Mn-Fe LDH sample, the ratio of Biochar: Mn-Fe LDH: CoFe2O4 is 1:0.5:0.5.

Study of the dye adsorption process

A 1,000 mg/L stock solution of CV dye was prepared by dissolving 1 g of CV dye in 1 L of distilled water. This stock solution was then diluted with distilled water to produce samples of different concentrations for the adsorption experiments. The adsorption process of CV dye was conducted in a batch system using BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples. The effects of temperature (25–50 °C), contact time (5–100 min), pH (2–9), pollutant concentration (10–50 ppm), and adsorbent dose (0.5–4 g/L) on the adsorption process were evaluated. An aqueous solution of CV dye was initially prepared to examine the impact of pH on dye removal. The pH was subsequently adjusted using 0.1 M NaOH and HCl solutions. A specific amount of adsorbent was added and stirred for a set duration using a magnetic stirrer. Finally, the adsorbents were separated from the solution by centrifugation. The adsorption efficiency and capacity were determined using Eqs. 1 and 2, respectively:

$${{\text{q}}_{\text{e}}} = \left( {{{\text{C}}_{\text{i}}} - {C_e}} \right) \times \frac{{\text{V}}}{{\text{m}}}$$
(1)
$$R(\% ) = \frac{{\left( {{{\text{C}}_{\text{i}}} - {{\text{C}}_{\text{e}}}} \right)}}{{{{\text{C}}_{\text{i}}}}} \times 100$$
(2)

In these equations, Ci and Ce (mg/g) represent the CV dye’s initial and equilibrium concentrations in the solution, respectively. W (g) is the weight of the adsorbent used, and V (L) is the volume of the aqueous solution. After optimizing the mentioned parameters, further studies were carried out to examine the kinetic, thermodynamic, and equilibrium behaviors of the CV dye adsorption process and the effect of counter ions.

Results and discussion

Adsorbent properties

Figure 1a shows the FTIR analysis to determine the functional groups for BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples. In the structure of the prototype BC sample, the absorption peaks at wavenumbers of 3,433 and 1,073 cm− 1 are related to O-H stretching32. Also, other absorption peaks in the 2,861–2,959 cm− 1 range are related to the -CH2 group33. The single absorption peak at 1,728 cm− 1 is also assigned to the C = O stretching vibration associated with the ester group in hemicellulose34. Meanwhile, the absorption peaks at 1,460 and 1,383 cm− 1 are linked to the C-C35 and aromatic C = C stretching vibrations36. Moreover, the peak at 1278 cm− 1 is attributed to the C = O stretching in ethers, alcohols, and/or phenols36. After modification of BC using CoFe2O4 nanoparticles, the peak observed at 1,382 cm− 1 represents the Co-O-Fe vibrations, and the wavenumber of 802 cm− 1 represents the Fe-O vibrations. Furthermore, the absorption peak at 589 cm− 1 is attributed to the stretching vibrations of the metal-oxygen bonds in the tetrahedral and octahedral sites of the spinel lattice in ferrite compounds37. The FTIR spectrum of the BC/CoFe2O4 sample displays characteristic absorption peaks of CoFe2O4 nanoparticles, confirming their presence on the biochar surface. In the BC/CoFe2O4@Mn-Fe LDH sample, the absorption peaks in the 500–1,000 cm− 1 range correspond to vibrational modes associated with metal-oxygen (M-O) or metal-hydroxyl (M-OH) group vibrations, likely representing Fe-OH, Mn-OH, Fe-O, and Mn-O bonds38,39. In addition, the sharp absorption peak at 1,439 cm− 1 could indicate the vibrational absorption of CO32− within the interlayers40. The results in Fig. 1b showed that following the CV dye adsorption process, the intensity and position of the absorption peaks changed somewhat, indicating their interaction with the dye molecules, confirming the adsorption of CV dye to the adsorbent surface via van der Waals forces41. It is worth noting that the magnitude of the changes was not significant. However, in the BC/CoFe2O4@Mn-Fe LDH-dye sample, a new absorption peak appeared at 1,117 cm− 1, possibly due to the C-H stretching vibrations in the aromatic ring42. It is important to note that the precise identification of the functional groups related to each of the adsorbent components is impossible using FTIR analysis due to the overlap of some peaks. Therefore, other techniques and analyses were used for precise identification.

Figure 1c shows the XRD spectra to investigate the amorphous and crystalline structures and also to determine the structural properties of BC, Mn-Fe LDH, BC/CoFe2O4, BC/Mn-Fe LDH, and BC/CoFe2O4@Mn-Fe LDH samples. In the BC sample, broad peaks in the 10–30° range are observed, corresponding to the (002) crystalline phase and showing the amorphous nature of the BC sample44. The absence of sharp peaks suggests that this sample exhibits an amorphous structure. Additionally, in the Mn-Fe LDH structure, peaks of varying intensities are observed in the range of 24.36, 31.44, 37.56, 41.56, and 51.72°, which are attributed to the (012), (104), (110), (113), (202) and (018) crystalline phases, respectively41. In addition, two peaks in the 31.4 and 51.6° range have appeared in the Mn-Fe LDH sample structure, which is assigned to the (020) and (251) crystalline phases in the Mn(OH)O and FeOOH structures, respectively, based on PDF#74–1049 and PDF#75–159445. In the BC/CoFe2O4 sample, two crystalline and amorphous parts are observed. The amorphous part can be related to BC. The peaks observed in the crystalline part in the ranges of 30.14, 35.38, 43.22, 57.12, and 62.6° can be attributed to the crystalline phases (220), (311), (400), (511) and (440), respectively, which indicate the primary material of the CoFe2O4 spinel structure (JCPDS no 22–1086)46. On the other hand, in the BC/Mn-Fe LDH sample, peaks in the range of 31.28 and 51.5° are observed, which indicates the proper placement of Mn-Fe LDH in the BC structure. The variation in the range and intensity of the peaks may be attributed to the arrangement of different components. After synthesizing the BC/CoFe2O4@Mn-Fe LDH nanocomposite, the peaks corresponding to each element are seen together, indicating the successful synthesis of the desired sample.

Fig. 1
figure 1

FTIR analysis for BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe, LDH samples (a) before and (b) after CV dye adsorption process and (c) XRD spectra for BC, Mn-Fe LDH, BC/CoFe2O4, BC/Mn-Fe LDH, and BC/CoFe2O4@Mn-Fe LDH adsorbent.

BET analysis is a common analytical technique used to investigate the active surface area, distribution, and size of pores in the structure of solid material, for which nitrogen adsorption-desorption isotherms were performed for BC, Mn-Fe LDH, BC/CoFe2O4 and BC/CoFe2O4@Mn-Fe LDH samples (Fig. 2). The results show that BC, Mn-Fe LDH, BC/CoFe2O4 and BC/CoFe2O4@Mn-Fe LDH samples exhibit a type IV isotherm according to the IUPAC standard, which indicates the presence of mesopores and nanometer-sized pores in their structure43. In addition, the specific active surface area for BC, Mn-Fe LDH, BC/CoFe2O4 and BC/CoFe2O4@Mn-Fe LDH samples was determined to be 43.41, 95.81, 150.77, and 98.85 m2/g, respectively, which indicates that the active sites on the surface of BC sample were increased by modifying it with CoFe2O4 and Mn-Fe LDH. On the other hand, the average pore volume for BC, Mn-Fe LDH, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples was determined to be 0.037, 0.22, 0.24, and 0.19 cm3/g, respectively. As can be seen, the average pore volume in the nanocomposite sample has decreased compared to BC/CoFe2O4, which may indicate the presence of Mn-Fe LDH particles in the structure of the sample. It is important to note that the average pore volume in the BC/CoFe2O4@Mn-Fe LDH sample is higher than that of BC, which could positively affect adsorption. In addition, the pore size in all samples is between 2 and 50 nm, which emphasizes that the pores are mesoporous.

Fig. 2
figure 2

BET analysis for BC, BC/CoFe2O4, Mn-Fe LDH, and BC/CoFe2O4@Mn-Fe LDH samples.

Magnetic properties play an essential role in the adsorbents’ effectiveness in adsorption, as they increase their economic efficiency and facilitate their separation from water and wastewater. Therefore, VSM analysis was conducted to assess the magnetic properties of the CoFe2O4, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples, and the results are shown in Fig. 3, which show that the samples have magnetic behavior similar to ferromagnetic materials44. The magnetic saturation values (Ms) for CoFe2O4 as well as BC/CoFe2O4 and BC/CoFe2O4@Mn-Fe LDH nanocomposites were determined to be 119.6, 46.45, and 32.34 emu/g, respectively. It is worth mentioning that the decrease in the Ms parameter value in BC/CoFe2O4 and BC/CoFe2O4@Mn-Fe LDH samples can be attributed to several factors, including the distribution of different cations within the spinel structure, the increase in surface-to-volume ratio, random spin canting on the surface45, and the presence of non-magnetic components in BC and Mn-Fe LDH46. However, due to the suitable magnetic properties of the samples, a magnet can be used to separate the samples from the aqueous solution.

Fig. 3
figure 3

VSM analysis for CoFe2O4, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples.

SEM and mapping-EDX analysis were used to investigate the morphology and surface changes of BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples. The results are presented in Fig. 4. As can be seen in the presented results, the BC sample has a heterogeneous surface with smooth parts, which can be due to the pyrolysis process (Fig. 4A). In addition, mapping-EDX analysis showed that the BC sample consists of carbon (77.14 wt%) and oxygen (22.86 wt%). These elements are uniformly distributed on the sample’s surface (Fig. 4B, C). After modifying the BC sample with CoFe2O4 magnetic nanoparticles, changes were observed on its surface, with small particles forming, likely due to the deposition of magnetic nanoparticles on the BC surface (Fig. 4D). To verify this, mapping-EDX analysis was performed. The results confirmed the presence of Fe and Co elements on the BC surface (Fig. 4E, F). Following the modification of the BC/CoFe2O4 magnetic nanocomposite with Mn-Fe LDH, the density of spherical particles on the surface increased, which can be attributed to the incorporation of Mn-Fe LDH (Fig. 4G). Also, mapping-EDX analysis confirmed the presence of Mn, Fe, and Co ions, indicating that Mn-Fe LDH was successfully placed in the sample’s structure (Fig. 4H, I). Therefore, the presented results showed that the BC/CoFe2O4@Mn-Fe LDH magnetic nanocomposite was successfully synthesized using the chemical deposition method and has an irregular and heterogeneous surface.

Fig. 4
figure 4

SEM-EDX-Map analysis for (AC) BC, (DF) BC/CoFe2O4, and (GI) BC/CoFe2O4@Mn-Fe LDH samples.

Investigation the adsorption parameters

Effect of pH and adsorbent dosage

The solution’s initial pH is a key factor influencing the adsorption process, as it alters the adsorbent’s surface charge and impacts the adsorption efficiency. In this study, the effect of pH changes in the range of 2–9 was examined under laboratory conditions of 25 °C, a contact time of 70 min, a dye concentration of 10 mg/L, and an adsorbent dose of 1 g/L for BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples, with the results shown in Fig. 5a. The findings indicate that the adsorption efficiency increased as the pH rose from 2 to 9. At lower pH, the low adsorption rate of CV dye can be attributed to the presence of H+ ions, which compete with the dye molecules for active sites on the adsorbent, preventing the dye from binding effectively47. Conversely, as pH increases, the concentration of OH in the solution rises, making the adsorbent surface more negative. This enhances the electrostatic attraction between the CV dye molecules and the adsorbent, thereby improving adsorption48.

Another factor influencing the adsorption process is the adsorbent dose. Therefore, the effect of varying the adsorbent dose in the range of 0.5–4 g/L was investigated under laboratory conditions of 25 °C, a contact time of 70 min, a dye concentration of 10 mg/L, and pH = 9 for BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples, with the results shown in Fig. 5b. The experimental results revealed that as the adsorbent dose increased within the ranges of 0.5-2, 0.5–1.5, and 0.5–1 g/L for the respective adsorbents, the adsorption efficiency improved from 48.26 to 95.62%, 54.72 to 96.63%, and 62.78 to 98.54%. The increase in CV dye adsorption efficiency with higher adsorbent doses can be attributed to the increased availability of active sites and a larger surface area on the adsorbent49,50. It is important to note that after the mentioned values ​​for each adsorbent, the changes in CV dye adsorption efficiency were insignificant, so these values ​​were chosen as the optimal values ​​for the adsorption process.

Fig. 5
figure 5

(a) Impact of pH on the adsorption efficiency (temperature: 25 °C, contact time: 70 min, initial dye concentration: 10 mg/L, adsorbent dose: 1 g/L), (b) Influence of adsorbent dose on the adsorption efficiency (pH = 9, temperature: 25 °C, contact time: 70 min, initial dye concentration: 10 mg/L).

Effect of dye concentration CV and isotherm studies

To assess the impact of pollutant concentration on the adsorption process efficiency, CV dye concentrations ranging from 10 to 50 mg/L were chosen under constant laboratory conditions of 25 °C temperature, 70 min contact time, pH = 9, and adsorbent dosages of 2 g/L for BC, 1.5 g/L for BC/CoFe2O4, and 1 g/L for BC/CoFe2O4@Mn-Fe LDH. The results indicated that as dye concentration increased, the adsorption efficiency of these samples decreased (Fig. 6a). Specifically, the adsorption efficiency for BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples decreased from 95.62, 96.63, and 98.54% to 53.63, 61.19, and 79.38%, respectively, within the concentration range of 10–50 mg/L. The higher adsorption efficiency at lower concentrations may be attributed to the greater availability of active sites on the adsorbent relative to the number of dye molecules. In contrast, the reduced adsorption efficiency at higher dye concentrations could be due to decreased available active sites for adsorption.

In the current study, the adsorption isotherms of CV dye from aqueous solutions using BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe, LDH samples were investigated by applying the Langmuir, Freundlich, and Temkin isotherm models. The corresponding linear equations for these models are presented in Eqs. (35), respectively:

$$\:\frac{{\text{C}}_{\text{e}}}{{\text{q}}_{\text{e}}}=\frac{{\text{C}}_{\text{e}}}{{\text{q}}_{\text{m}}}+\frac{1}{{\text{K}}_{\text{L}}{\text{q}}_{\text{m}}}\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:{\text{R}}_{\text{L}}=\frac{1}{1+\:{\text{K}}_{\text{L}}{\text{C}}_{0}}\:$$
(3)
$$\:\text{L}\text{n}\:{\text{q}}_{\text{e}}=\text{L}\text{n}\:{\text{K}}_{\text{F}}+\:\frac{1}{\text{n}}\text{L}\text{n}\:{\text{C}}_{\text{e}}$$
(4)
$$\:{\text{q}}_{\text{e}}=\text{B}\text{L}\text{n}\:{\text{A}}_{\text{T}}+\text{B}\:\text{L}\text{n}\:{\text{C}}_{\text{e}}\:\:\:\:\:\:\:\:\:\:\text{B}=\frac{\text{R}\text{T}}{{\text{b}}_{\text{T}}}$$
(5)

Here, Ce represents the equilibrium concentration of CV dye in the aqueous solution (mg/L), qm is the maximum Langmuir adsorption capacity (mg/g), KL is the Langmuir adsorption constant, RL is the separation factor, KF is the Freundlich constant, n is the adsorption intensity, bT is the Temkin isotherm constant (L/g), R is the universal gas constant (kJ/mol), AT and bT are the Temkin isotherm constants (kJ/mol) associated with the energy parameter, and T represents the absolute temperature (K).

The linear regression of Langmuir, Freundlich, and Temkin models are shown in Fig. 6b-d, respectively, and their related parameters are presented in Table 1. Based on the experimental data, the correlation coefficient Langmuir model (R2) for the CV dye adsorption process using BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples was determined to be 0.9987, 0.9987, and 0.9993, respectively, which is higher than that of the Freundlich model. Therefore, it can be noted that the Langmuir model has a more remarkable ability to describe the equilibrium behavior of the adsorption process, and the mechanism of the CV dye adsorption process is monolayer, and there is no intermolecular interaction51. The values ​​of KL and KF for CV dye adsorption using BC/CoFe2O4@Mn-Fe LDH magnetic nanocomposite were determined to be 2.025 L/mg and 23.516 mg/g (L.mg)1/n, respectively, which are higher than those of BC and BC/CoFe2O4 samples, confirming the ability and high affinity of BC/CoFe2O4@Mn-Fe LDH magnetic nanocomposite in CV dye adsorption52. It is also important to note that the RL and n values for CV dye adsorption using the specified samples were between 0 < RL<1 and greater than 1, respectively, indicating that the adsorption process is favorable and physical53,54. Also, the value of n > 1 suggests that the active sites in the desired adsorbents’ interact with more than one CV dye molecule during the adsorption process55. Additionally, the bT parameter for adsorption of CV dye using BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples was found to be 1.383, 0.848, and 0.367 kJ/mol, respectively. These values are below 8 kJ/mol, confirming that the adsorption process and the interaction between the adsorbent surface and CV dye are physical56. Also, the adsorption capacity of CV dye was determined using BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples as 13.477, 20.533, and 41.152 mg/g, respectively. In addition, the adsorption capacity of the aforementioned samples was compared with other adsorbents used in the previous study, and the results are presented in Table 2. The results showed that the adsorbents in question have the ability and appropriate adsorption capacity to remove CV dye from an aqueous solution.

Fig. 6
figure 6

(a) Effect of initial dye concentration (pH = 9, temperature 25 °C, contact time 70 min, and adsorbent dosages of 2, 1.5, and 1 g/L for BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples, respectively), (bd) Linear correlations of the Langmuir, Freundlich, and Temkin isotherm models for the CV dye adsorption process.

Table 1 Isotherm parameters obtained from the isotherm models for the CV dye adsorption process using the desired adsorbents.
Table 2 Comparison of the adsorption capacity of the desired adsorbents with other adsorbents used to remove CV dye from aqueous solution.

Temperature effect and thermodynamic studies

Temperature plays a crucial role in the adsorption process as it influences the mobility and solubility of dye molecules in water, as well as the surface properties of the adsorbent66. Consequently, the effect of temperature in the range of 25–50 °C was examined under laboratory conditions, with a pH of 9, an initial dye concentration of 10 mg/L, a contact time of 70 min, and adsorbent dosages of 2, 1.5, and 1 g/L for BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples, respectively. The results presented in Fig. 7a showed that increasing the temperature in BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples led to a decrease in the efficiency of CV dye adsorption process from 95.62, 96.63, and 98.54% to 83.54, 87.93, and 90.76%, respectively. This reduction in efficiency suggests the exothermic nature of the adsorption process. It can be attributed to the increased likelihood of the adsorbed CV dye detaching from the solid surface and re-entering the liquid phase. It also reflects the weakening of physical bonds between the dye molecules and the active sites on the adsorbent, as well as a decrease in the availability of active sites at elevated temperatures41,67.

To conduct thermodynamic studies on the CV dye adsorption process, three parameters, enthalpy (∆H°), entropy (∆S°), and Gibbs free energy (∆G°), were examined to assess spontaneity, determine whether the process is endothermic or exothermic, and evaluate feasibility within the temperature range of 25–50 °C, using Eqs. (67), respectively:

$$\:\varDelta\:\text{G}^\circ\:=\:-\text{R}\text{T}\text{ln}{\text{K}}_{\text{D}}$$
(6)
$$\:\text{ln}{\text{K}}_{\text{D}}=\:\frac{\varDelta\:\text{S}^\circ\:}{\text{R}}-\frac{\varDelta\:\text{H}^\circ\:}{\text{R}\text{T}}$$
(7)

In this context, R represents the universal gas constant, T denotes the absolute temperature (K), and kD is the equilibrium constant for the adsorption process, calculated as the ratio of CA, the quantity of dye adsorbed on the adsorbent surface (mg/g), to Ce, the amount of dye remaining in the aqueous solution (mg/g).

The linear regression of ln KD versus 1/T for the CV dye adsorption process using the desired adsorbents is shown in Fig. 7b, and the constants and variables determined using it are presented in Table 3. As can be seen, the value of the ∆G° parameter changes in the temperature range of 25–50 °C was negative, indicating that the adsorption process is spontaneous and that low temperatures are more favorable for the adsorption process. It is important to note that the ∆G° parameter has been reported to vary between 0 and − 20 kJ/mol, confirming the physical nature of the CV dye adsorption process using the specified adsorbents under the given experimental conditions68. Additionally, the ∆H° values for the CV dye adsorption process with BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH were found to be − 48.131, − 48.138, and − 64.724 kJ/mol, respectively, indicating that the process is exothermic and that the adsorption efficiency decreases as temperature increases69. Also, the ∆S° parameter value for the CV dye adsorption using the desired adsorbents was determined to be negative, which indicates that random interactions decreased during the adsorption process, and the positioning of CV dye molecules on the surface of the adsorbents was driven by ion exchange interactions occurring throughout the adsorption process70.

Fig. 7
figure 7

(a) Effect of reaction temperature (pH = 9, initial dye concentration of 10 mg/L, contact time of 70 min, and adsorbent dosages of 2, 1.5, and 1 g/L for BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples, respectively), (b) Linear relationship of ln kD versus 1/T for determining thermodynamic parameters.

Table 3 Thermodynamic variables determined for CV dye adsorption using the desired adsorbents.

Effect of equilibration time and kinetic studies

The effect of reaction time, ranging from 5 to 100 min, on the adsorption efficiency of CV dye was studied in vitro at pH = 9, an initial dye concentration of 10 mg/L, a temperature of 25 °C, and adsorbent dosages of 2, 1.5, and 1 g/L for BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples, respectively (Fig. 8a). The studies showed that with increasing time from 5 min to 80 min for BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples, the adsorption efficiency of CV dye increased from 28.56, 41.53 and 48.63% to 97.14, 98.42 and 99.28%, respectively, which could be attributed to the increased availability of active sites on the adsorbent71. After the mentioned time, with the gradual filling of the adsorption sites, there was no significant change in the process, which could be due to the saturation of the adsorbent surfaces with CV dye molecules3. Since there were no significant changes in the surface adsorption process for the BC and BC/CoFe2O4 samples after 80 min and for the BC/CoFe2O4@Mn-Fe LDH magnetic nanocomposite after 60 min, these values ​​were chosen as the optimal reaction time.

After examining the effect of contact time, the results were used to analyze the kinetics of the CV dye adsorption process with the selected adsorbents. In this study, the pseudo-first-order (PFO), pseudo-second-order (PSO), and intra-particle diffusion kinetic models were applied to investigate the kinetic behavior of the CV dye adsorption process, and their linear relationships are given in Eqs. (810), respectively:

$$\:\text{L}\text{n}\:\left({\text{q}}_{\text{e}}-{\text{q}}_{\text{t}}\right)=\text{L}\text{n}\:{\text{q}}_{\text{e}.\text{c}\text{a}\text{l}}-\:{\text{k}}_{1}\text{t}$$
(8)
$$\:\frac{\text{t}}{{\text{q}}_{\text{t}}}=\frac{1}{{\text{k}}_{2}{\text{q}}_{\text{e}.\text{c}\text{a}\text{l}}^{2}}+\:\frac{\text{t}}{{\text{q}}_{\text{e}}}$$
(9)
$$\:{\text{q}}_{\text{t}}=\:{\text{k}}_{\text{i}\text{n}\text{t}}\sqrt{\text{t}}+\text{C}$$
(10)

The linear regression of the mentioned kinetic models is shown in Fig. 8b-d, respectively, and the parameters obtained from the kinetic models for the CV dye adsorption process are presented in Table 4. Based on the experimental results, the R2 value obtained from the PSO kinetic model for CV dye adsorption was higher than that from the PFO kinetic model, suggesting that the PSO model is more effective for describing the CV dye adsorption kinetic behavior. This implies that the rate-limiting step in the CV dye adsorption process may involve valence forces, such as electron sharing or exchange, between the adsorbent and the dye molecules72. Additionally, the k2 value for CV dye adsorption using the BC/CoFe2O4@Mn-Fe LDH magnetic nanocomposite was higher than that for the other adsorbents, indicating that this magnetic nanocomposite has a stronger affinity for CV dye adsorption compared to the different materials73. The results suggest that the intra-particle diffusion model plot is nonlinear within the studied time range, implying that the CV dye adsorption process using the selected adsorbents is influenced by multiple factors. It likely involves the mass transfer of CV dye molecules to both the external and internal surfaces of the adsorbents74. Therefore, the fundamental mechanisms governing the adsorption process of CV dye with these adsorbents may involve film and pore diffusion, highlighting the complex nature of the adsorption mechanism75.

Fig. 8
figure 8

(a) Effect of reaction time (pH = 9, temperature 25 °C, and adsorbent dosages of 2, 1.5, and 1 g/L for BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples, respectively), and the linear relationships for (b) PFO, (c) PSO, and (d) intra-particle diffusion kinetic models for CV dye adsorption using the selected adsorbents.

Table 4 Kinetic variables determined for CV dye adsorption using the desired adsorbents.

Effect of counter ions and ad(de)sorption

In real conditions, aqueous solutions and wastewater obtained from different industries can contain other components in dissolved or suspended form, such as metal ions, organic materials, and microorganisms76; therefore, In this study, KCl and CaCl2 solutions with concentrations ranging from 0.05 to 0.5 mg/L were used as electrolyte solutions under optimal laboratory conditions, including a pH of 9, an initial dye concentration of 10 mg/L, a temperature of 25 °C, a contact time of 80 min, and adsorbent dosages of 2, 1.5, and 1 g/L for BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples, respectively (Fig. 9a-b). The results show that increasing concentrations of Ca2+ and K+ ions decreases the efficiency of the adsorption process in BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples. The reduction in efficiency may be attributed to the occupation of the adsorbent’s active sites by counter ions, which prevents the formation of bonds between the dye molecules and the adsorbent77. On the other hand, cations inhibit the adsorption reaction due to their larger hydration radius and electron shielding effect78. In addition to this decrease, the efficiency of CV dye adsorption in the presence of Ca2+ is higher than that of K+, which may be attributed to the smaller ionic radius of Ca2+. Cations with larger ionic radii tend to have less impact on adsorption79.

Another parameter that can be effective in the adsorption process and affect the economic cost of the pollutant removal process from aqueous solution is the regeneration-reuse of the desired adsorbent. In this regard, the ability to reuse the BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples in CV dye removal up to 8 steps was studied, and the results are presented in Fig. 9c. For this purpose, first, the CV dye adsorption process was carried out using BC, BC/CoFe2O4 and BC/CoFe2O4@Mn-Fe LDH under optimal conditions. After the mentioned time, the desired adsorbents were separated from the aqueous solution and washed using deionized water. After that, the desired adsorbent was immersed in 20 mL of 0.05 M HNO3 solution for 60 min. After the mentioned time, the separated desired adsorbents were washed using deionized water and after drying at 100 oC, they were used again in the adsorption process. As the results show, with increasing number of regeneration-reuse steps, the efficiency and performance of the desired adsorbents in CV dye removal decreases. The decrease in efficiency of CV dye adsorption process using the desired adsorbents can be attributed to saturation of the adsorbent active sites, physical damage to the adsorbent80, incomplete removal of CV dye from adsorbent active sites81, destruction of the adsorbent surface structure and consequently reduction in adsorption capacity82. However, it is worth noting that the CV dye removal efficiency using BC/CoFe2O4 and BC/CoFe2O4@Mn-Fe LDH is more than 90% up to 5 steps and 7 steps, respectively. This indicates that BC/CoFe2O4 and BC/CoFe2O4@Mn-Fe LDH have excellent mechanical properties of adsorbents as well as high resistance to chemical agents83, and can be used several times in the CV dye adsorption process.

Fig. 9
figure 9

Effect of counter ions of (a) potassium, and (b) calcium in aqueous solution on the CV dye removal efficiency using BC, BC/CoFe2O4 and BC/CoFe2O4@Mn-Fe LDH adsorbent samples, (c) Effect of ad(de)sorption (pH = 9, temperature 25 °C, time 80 min, initial dye concentration of 10 mg/L, and adsorbent dosages of 2, 1.5, and 1 g/L for BC, BC/CoFe2O4, and BC/CoFe2O4@Mn-Fe LDH samples, respectively.

Adsorption mechanism

In the present study, the effective mechanism of the CV dye removal process using BC/CoFe2O4@Mn-Fe LDH sample has been thoroughly analyzed according to the results of pH, BET, FTIR, and previous studies. As we know, CV dye is a cationic dye that has higher adsorption in alkaline environments with pH results. When the pH of the aqueous solution increases, the functional groups in the adsorbent structure become surface charged, which can create an electrostatic interaction of attraction type with CV dye molecule with positive surface charge. In previous studies, electrostatic interaction has also been stated as an effective mechanism in the CV dye adsorption process16. In addition, FTIR results showed that the structure of the BC/CoFe2O4@Mn-Fe LDH sample contains Fe-OH, Mn-OH, Fe-O, C = O, -CH2, and O-H functional groups that can form hydrogen bonds with the N and H groups in the CV dye structure and cause its removal from aqueous solution, which has also been proven in a previous study17,18. Also, BET results showed that the BC/CoFe2O4@Mn-Fe LDH sample has a porous structure that can be a suitable site for the adsorption and placement of the CV dye molecule. In addition, in the structure of the BC/CoFe2O4@Mn-Fe LDH sample, there are functional groups containing oxygen that can form n-π interactions with the aromatic rings in the CV dye structure19 and cause the removal of the desired dye. Figure 10 shows the mechanisms effective in removing CV dye using the BC/CoFe2O4@Mn-Fe LDH sample.

Fig. 10
figure 10

Possible interactions between BC/CoFe2O4@Mn-Fe LDH sample with CV dye.

Conclusion

The BC/CoFe2O4@Mn-Fe LDH magnetic nanocomposite, synthesized from pine cone-derived biochar, proved an effective adsorbent for removing the cationic dye crystal violet (CV). With a specific surface area of 98.85 m2/g and magnetic saturation of 32.34 emu/g, the composite can be easily separated from the solution using an external magnet post-adsorption. The highest dye removal efficiency of 98.21% was achieved under optimal conditions (pH = 9, 25 °C, 10 mg/L CV dye concentration, 1 g/L adsorbent dose, and 70 min contact time). The Langmuir isotherm model best describes adsorption, indicating monolayer adsorption on homogeneous surfaces. The negative ∆G° values suggest the adsorption process is spontaneous and physical, while the negative ∆H° and ∆S° values highlight the exothermic nature of the process and a decrease in randomness during adsorption. The pseudo-second-order kinetic model accurately captured the adsorption kinetics, underscoring the importance of physical and chemical interactions. The study also demonstrated that the presence of K+ and Ca2+ ions negatively affected adsorption efficiency, suggesting the need for optimizing water chemistry in practical applications. Overall, the BC/CoFe2O4@Mn-Fe LDH nanocomposite shows significant potential for dye removal from aqueous solutions, with high efficiency, magnetic separation capability, and reusability advantages.