Efficient adsorption on Cr(VI) and electrochemical application of N, P co-doped carbon spheres

A nitrogen and phosphorus co-doped carbon sphere was synthesized and prepared by a two-step hydrothermal activation pyrolysis method using agricultural materials, in which forestry waste walnut shells, urea, and phosphoric acid were used as carbon, nitrogen, and phosphorus sources, respectively, for the efficient treatment of heavy metals Cr(VI) in wastewater. On this basis, a supercapacitor with high capacitive performance was investigated. The adsorption capacity of the N, P co-doped carbon sphere (N2PC) was optimal for Cr(VI), and the abundant functional groups on the surface of the carbon spheres significantly promoted the adsorption and reduction of Cr(VI). The adsorption capacity of the carbon material was up to 100.55 mg/g at 318 K, and the pseudo-second-order kinetic model and the Langmuir adsorption isotherm model were used to describe the adsorption process. Before and after adsorption, the material was applied to the electrode material of the supercapacitor, and the capacitive performance of the adsorbed material was satisfactory as well as with excellent cycling stability which 93% capacity retention even after 5000 cycles.


INTRODUCTION
The pollution of water bodies by heavy metal ions has become a concern worldwide in the context of industrial development and the continuous improvement of human quality of life [1,2].Chromium (Cr) has a strong redox activity and is one of the typical heavy metal pollutants that is found in large quantities in wastewater discharges from metallurgical [3], electroplating [4], and textile industries [5].If not treated properly, the wastewater will not only have a deleterious effect on water resources but also seriously damage the ecosystem, posing an extremely serious threat to human life [6].Chromium is available in a variety of oxidation states, with hexavalent chromium [Cr(VI)] receiving the most attention: it is a thousand times more toxic than Cr(III) and is capable of causing mutations, teratogenicity, and carcinogenicity [7].Therefore, it has become an objective of current research to propose reasonable solutions for the effective removal of chromium ions from wastewater before discharge into the environment.
Solvent extraction [8], ion exchange [9], membrane filtration [10], adsorption [11], as well as electrochemical [7] treatment techniques are the traditional techniques for removing heavy metals from water, with adsorption being the most popular due to its high efficiency, low cost, and simplicity of operation.And compared to other methods, adsorption technology mainly uses adsorbent materials to remove pollutants from wastewater.The adsorbent can also be recycled and reused without causing secondary pollution [12] and has great potential for environmental restoration.Therefore, the choice of adsorbent becomes key in wastewater treatment technology.According to previous research, biochar material obtained from biomass in an anaerobic environment through a heat treatment process has a highly efficient adsorption capacity for heavy metals and is a meaningful adsorption material [2,13,14].However, conventional biochar' s high cost and poor reusability are not conducive to its widespread application.Therefore, a high adsorption efficiency, environmentally friendly, low-cost, and reusable biochar adsorbent is a topic worthy of further study.
The advantages of abundant biomass sources, low cost, and renewable sources have become an ideal substitute for petroleumbased materials.Using agricultural waste to prepare biochar reduces the waste of resources and environmental pollution from waste biomass and facilitates environmental management and resourceful reuse [15].In general, the selection of biomass affects some important physicochemical properties, such as the surface active functional groups of the biochar [16].Studies have shown that walnut shells have high strength and excellent chemical stability [17], and as typical agricultural waste are often used to prepare biochar by pyrolysis.Therefore, the application of the abundant, low-cost, and easy-to-use agricultural waste walnut shells for the removal of pollutants in the field of adsorption has a high ecological benefit.
To obtain adsorbent materials for efficient removal of pollutants, heteroatom doping, and chemical activation are the main methods to improve the performance of biochar [1,2].Chemical activation (KOH, ZnCl 2 , H 3 PO 4 ) can increase the specific surface area and pore size distribution of biochar [18].The number of adsorption sites on the biochar surface can be increased by heteroatom doping (nitrogen, phosphorus, sulfur, etc.), improving surface activity and enhancing the adsorption and reduction of Cr(VI) in water [19].Among these, nitrogen and phosphorus have received much attention.Studies have shown that nitrogen-doped biochar has abundant nitrogen-containing functional groups to adsorb heavy metal ions and a large number of -electron enrichment sites to form p- bonds with heavy metals [20].Phosphoric acid, as a low-corrosive acid, is used to activate the biomass to facilitate the formation of pores and increase porosity.It is meaningful that N and P co-doping can further improve the physicochemical activity of the biochar material due to the synergistic effect [21] compared to the doping of single heteroatoms, achieving a more excellent adsorption effect.
In addition, in the field of renewable energy storage, supercapacitors have received much attention due to their long life cycle and fast charging and discharging characteristics compared to conventional batteries [22].The development of electrode materials is essential to improving energy storage performance and increasing the potential for practical applications.Activated carbon' s high specific surface area, rich porous structure and functional groups, and high intrinsic electrical conductivity can be used as electrode materials for supercapacitors [23][24][25].Surface modification, heteroatom doping, and metal hybridization of activated carbon are beneficial for improving capacitive performance.In recent years, there has been much research on chromium and its compounds as electrode materials for supercapacitors [26], and chromium oxides and mixed oxides provide higher specific capacitance for supercapacitors [27].
Along with the high efficiency and cost-effectiveness of adsorption technology, there is the problem of waste reprocessing of the adsorbent after use.Therefore, in this work, we investigated the preparation of N and P co-doped carbon spheres using agricultural waste walnut shells as carbon feedstock, urea as nitrogen source, phosphoric acid as phosphorus source and activator, using a twostep thermal treatment technique of hydrothermal followed by pyrolysis, and conducted a series of experiments to explore the adsorption of Cr(VI) on walnut shell-based carbon sphere.In addition, we attempted to combine adsorption technology and supercapacitors by applying carbon sphere before and after adsorption to electrode materials for supercapacitors to obtain a more sustainable and green approach that can effectively deal with heavy metal pollution and be used for energy storage technology applications.

Preparation of Carbon Sphere
The walnut shell powder was dispersed in distilled water by supergeneration, urea was added according to the mass ratio of 1 : 0.5, 1 : 1, 1 : 2, and 1 : 3, stirred magnetically for 10 min, then put into a 50 mL PTFE-lined autoclave and reacted hydrothermally at 200 o C for 12 h.Then, it was washed with anhydrous ethanol and deionized and dried to obtain N-doped hydrothermal carbon.Carbon and phosphoric acid were blended in a solid-liquid ratio of 1 : 1 (m(g)/v(mL)), while 30 mL of deionized water was added and macerated for 12 h.The suspension was then dried in an oven at 105 o C for 12 h.The resulting mixture was placed in a tube furnace for direct pyrolysis (400 o C, holding for 1 h, heating rate of 10 o C/min, N 2 atmosphere flow rate of 0.5 L/min).The product was soaked in 10% hydrochloric acid solution for 2 h to remove excess impurities and ash.The product was then washed repeatedly with distilled water until the pH of the filtrate=7.After drying, the N and P co-doped carbon sphere was obtained, noted as NxPBC1-400 (x represents the mass ratio of walnut shell powder to urea).

Characterization of Carbon Sphere
Scanning electron microscopy (SEM) (Gemini 500, Carl Zeiss, Germany) and energy dispersive spectroscopy (EDS) (Aztec Ulti-mMax100, Oxford), as well as field emission transmission electron microscopy (TEM, JEM2100FLASH, JEOL, Japan) were used to analyze information on the surface morphology as well as the composition of the carbon sphere before and after adsorption.Characteristic parameters such as specific surface area and pore structure of the carbon sphere were measured by nitrogen adsorption and desorption isothermal experiments (77k) (TriStar II 3020, USA).Fourier infrared spectroscopy (FT-IR) (Thermo Nicolet 67 spectrometer, USA) was used to determine the functional groups on the surface of the carbon sphere.The elemental composition, content, and valence of the sample surface were analyzed and tested using X-ray photoelectron spectroscopy (XPS) (ESCALAB 250Xi Thermo, USA).The structure of the material was analyzed using a micro confocal laser Raman spectrometer (Raman) with an excitation wavelength of 532 nm and a spectral range of 800-2,000 cm 1 argon ion laser (LabR AM HR Evolution, HORIBA JOBIN YVON, France).The conductivity of the sample was measured by the Tianjin Noray Sindal RTS-9 four-probe resistivity tester.

Adsorption Experiments
Intermittent adsorption experiments were carried out in 100 mL conical flasks under different conditions to investigate the adsorption performance of the carbon sphere on Cr(VI).First, 2.8287 g of K 2 Cr 2 O 7 was dissolved in 1,000 mL of distilled water to prepare a reserve solution of Cr(VI) at a concentration of 1,000 mg/L and sealed for use, and all adsorption solutions were obtained by dilution of the reserve solution during the experiments.Through the series NxPC carbon sphere adsorption of Cr(VI) under the same conditions, the results showed that N2PC adsorption of Cr(VI) has the best effect, and N2PC as the object of study systematically investigated the Cr(VI) solution initial PH (2)(3)(4)(5)(6)(7)(8), the amount of carbon sphere input, concentration (20-400 mg/L), adsorption temperature (298 K, 308 K, 318 K) and other influencing factors on the adsorption process.The mixture was shaken in a constant temperature oil bath at 120 r/min.The adsorbed suspension was filtered through a 0.22 m microporous filter and the concentration of the filtrate was measured by UV-Vis spectroscopy at 257 nm to calculate the adsorption of Cr(VI) ions by NxPC.All experiments were repeated three times.The equations for the adsorption quantity q and removal T. Luo et al.

December, 2023
rate D are given in Eqs. ( 1) and (2), respectively: (1) (2) where C t and C 0 (mg•L 1 ) are the concentration of Cr(VI) at time t and initial, respectively; V(L) is the volume of the absorbent solution; m (g) is the mass; q t (mg•g 1 ) is the adsorption capacity at time t; and D is adsorption rate.
To study the kinetic properties of Cr(VI) adsorption by N2PBC1-400, 0.1 g of N2PC was put into a conical flask of 50 mL Cr(VI) solution (20-400 mg/L, pH=2) and shaken at 25 o C, 200 rpm for 24 h, and the concentration of Cr(VI) in the adsorption solution was measured at different times (1-1,440 min).In this study, the kinetic data obtained were analyzed using four kinetic models: the proposed primary adsorption kinetic model in Eq. ( 3), the proposed secondary adsorption kinetic model in Eq. ( 4), the Elovich model in Eq. ( 5), and the intraparticle diffusion model in Eq. ( 6).
(3) ( where k 1 (min 1 ) and k 2 [g(mg•min) 1 ] are the proposed primary and the proposed secondary adsorption kinetic model rate constant, respectively; q e (mg•g 1 ) is the adsorption capacity at balanced; A and B (g•mg 1 ) are the Elovich constant; the k id (mg•g 1 • min 1/2 ) and C are the Intraparticle diffusion constant.
The sorption isothermal data were described by two isothermal adsorption equation models, Langmuir and Freundlich, which are defined in Eqs. ( 7) and ( 8), respectively.The basic properties of the Langmuir isotherm were represented by the dimensionless separation factor R L , in Eq. ( 9): In the above equations, C e is the Cr(VI) equilibrium concentration.The q max (mg/g) is the maximal adsorption capacity, and k L (L/mg) is a Langmuir constant.The k F (mg (1n) •L n •g 1 ) and n are the Freundlich constants related to the relative adsorption capacity of the adsorbent and the energetic heterogeneity.
The thermodynamic parameters were calculated from the following equations: (10) (11) (12) where G 0 (kJ•mol 1 ) is the Gibbs free energy, S 0 and H 0 are the enthalpy and entropy, respectively; R (8.314 J•K 1 •mol 1 ) is the gas constant, T (K) is the temperature; K 0 is the dimensionless thermodynamic equilibrium constant, k g is the constant of the best isotherm model fitted, C 0 (1 mol•L 1 ) is the standard concentration,  (dimensionless) is the coefficient of activity.

Electrochemical Performance Testing
The electrochemical activity of the carbon sphere was tested using the CHI660E electrochemical workstation from Shanghai Chenhua, using a Hg/Hg 2 O electrode, a Pt foil, and a glassy carbon electrode modified with carbon sphere as the reference electrode, counter electrode, and working electrode for the three-cell system.All measurements were carried out in a 6 M KOH solution.Carbon sphere, acetylene black, and polyvinylidene fluoride (PVDF) were mixed in a mass ratio of 8 : 1 : 1, adequately ground with the addition of an appropriate amount of N-methyl pyrrolidone and then uniformly distributed on nickel foam, dried at 80 o C for 2 h, then pressed by a hydraulic press at 10 MPa to form a specific shape of the sheet for the working electrode, where the active substance loading was 2 mg/cm 2 .The specific capacitance of the electrodes was calculated from the discharge curves at different current densities in Eq. ( 13).(13) where C (F/g) is the specific capacitance, I (A) is the charge/discharge current, t (s) is the discharge time, V (V) is the voltage change during discharge (excluding IR drop) and m (g) is the mass of active material on a single electrode.

Morphological Characterization of Carbon Sphere
The morphology of NxPC was characterized by SEM to investigate the surface structure of the sample.As shown in Fig. 1(a-e), the prepared NxPC samples show distinct clusters of microspheres, with predominantly spherical particles and smooth surfaces.From the figure, it can be seen that the samples with or without urea doping and different nitrogen doping ratios do not cause many effects on the morphology, and the surface structures of the samples obtained at the end are microspherical, indicating that the N element did not change the surface structure of the samples.At higher magnification (150 W magnification), the spherical morphological structure of the carbon sphere can be found in the low magnification FE-TEM image in Fig. 1(f), which was still spherical in shape similar to SEM.And a large number of disordered layered porous pore structures could be observed in the HRTEM images in the form of amorphous carbon without graphite crystals, which may facilitate the adsorption of Cr(VI).Fig. 1(h-i) depicts the elemental distribution of N2PC.It can be seen that the appearance of the N and P atoms is almost identical to that of the C atoms, indicating that the N and P atoms were successfully doped into the carbon material and are evenly distributed on the surface of the carbon skeleton, and the atom ratios of C, O, N, and P were -------------------- -----------------K ----------------------------------------------- 85.2%, 10.5%, 2.2%, and 2.1%, respectively.The uniform distribution of the doped N and P atoms was beneficial to increase the active groups on the surface of the carbon skeleton.SEM-EDS Fig.  S1-Fig.S4 show that the morphology after adsorption of Cr(VI) was the same as before adsorption, indicating that NxPC is a very stable carbon material and can adsorb Cr(VI) uniformly.
T. Luo et al.

December, 2023 2. Structural Composition of Carbon Sphere
The pore structure can also affect the properties of carbon materials, so N 2 adsorption and desorption experiments were carried out on the obtained carbon spheres to explore information such as specific surface area and pore size.For nitrogen adsorption-desorption isotherms, Fig. 2(a) shows that all carbon sphere samples conform to a Type IV curve, indicating a mesoporous structure, with the hysteresis loop of N0PC being more pronounced, indicating the possession of more mesopores; the rapid increase in N2 adsorption at relatively low pressures indicates the presence of micropores in the samples.This is consistent with the pore size distribution, Fig. 2(b), where all samples have a micro-mesoporous structure (1-5 nm), while N0PC has a more abundant mesoporous structure (4-5 nm).The specific surface area of the sample N0PC after hydrothermal carbonization and pyrolysis under the same conditions without the addition of urea was only 1,151 m 2 •g 1 .The decomposition of urea during carbonization promoted the generation of gases causing defects in the carbon sphere, resulting in an increase in the average pore size and an increase in the specific surface area, which reached 1,295 m 2 •g 1 for N2PC.The larger specific surface area increased the van der Waals forces [28] and exposed more active sites, which is more conducive to the adsorption of Cr(VI).However, some amino functional groups and oxygen-containing active functional groups were further condensed on the surface of the carbon sphere as the nitrogen source was increased, and a synergistic effect was formed, resulting in some microfine pore channels being blocked [29]; while the contact area between carbon material and phosphoric acid was reduced, an obstructive effect was produced, and the reaction could not be carried out, and the pores were not fully developed.Meanwhile, due to the increase of urea amount, the surface of N3PC had a residue of urea molecules [25,30], so that the pores virtually filled, which led to the smaller specific surface area, microporous pore capacity and pore diameter of N3PC than N2PC, and the excess N had a negative effect on the atomic doping.
To analyze the effect of heteroatom doping on the chemical structure of the carbon sphere, all carbon sphere samples were characterized by Raman spectroscopy.All samples had two characteristic peaks at 1,340 and 1,580 cm 1 : the D peak (disorder peak) and the G peak (graphite peak), respectively, and the intensity ratio of the two peaks was usually used as a measure of the degree of the defect and graphitization of the carbon sphere.As shown in Fig. 2(d), the degree of defects of the N-doped samples were all higher than that of the non-N-doped samples, indicating that the N element modified the carbon sphere and that the N doping led to the destruction of the crystalline of the carbon structure and produced more defect sites; the degree of defects of the samples was related to the active groups on the surface of the carbon skeleton, and the I D /I G values of N2PC was the largest, which indicated that the carbon sphere had the highest degree of disorder, the lowest degree of graphitization and the most active groups at the N-doping ratio of the degree of amorphous carbon in NxPC, respectively.As the Ndoping rate increased, the degree of graphene layer edge defects first increased and then decreased, while the degree of amorphous carbon first decreased and then increased.The high I D /I G values could be attributed to the condensation process of the carbon sphere samples, where small molecules are converted to conjugated aromatic rings while forming numerous defective edges at the boundaries.N2PC had the highest I D1 /I G value (1.12) and the lowest I D3 /I G value (0.64), indicating that a large number of amorphous carbon structures were converted to edge-defective graphitic carbon structures.
To investigate in more depth the differences in the functional groups of the carbon sphere due to the different area ratios and to analyze the possible reactions of the materials, Fourier infrared spectroscopy (FTIR) was used to characterize each carbon sphere material.As shown in Fig. 3(a), the absorption peaks around 3,430 cm 1 were attributed to the stretching vibration of the O-H bonds in the alcohol, carboxyl, and phenol groups [31], that around 2,900 cm 1 the stretching vibration of C-H x , the broad band around 1,720 cm 1 was associated with the stretching vibration of the C=O bond, and the absorption peak around 1,620 cm 1 was due to the stretching vibration of C=C [32].The bands near 1,660 cm 1 and 1,110 cm 1 were caused by C=N and C-N stretching vibration, respectively [33], indicating that nitrogen was successfully doped into the carbon material by mixing urea with walnut shell powder and successfully modifying the surface of the material to obtain nitrogen-doped porous carbon, and the intensity of the absorption peaks increased with the increase of N doping.1,170 cm 1 and 980 cm 1 were due to P-O-C aromatic stretching vibration and 1,030 cm 1 due to P-O stretching vibration [34], indicating the successful doping of elemental P into the carbon skeleton, in agreement with the morphological analysis of the carbon sphere described above.After the adsorption of Cr(VI), the C=N peak level of 1,660 cm 1 shifted to 1,600 cm 1 , the C-N, P-O-C aromatic, and P-O absorption peaks weakened and the C=O bond vibration increased, indicating that functional groups containing nitrogen, oxygen, and phosphorus in N2PC were involved in the adsorption and chemical reactions took place.
To investigate the differences in the chemical structure of the carbon materials caused by different N-doping rates, XPS was used to analyze the elemental composition and atomic chemical states of the different samples before and after adsorption.From Fig. 3(b), the full spectrum of NxPC has four distinct peaks at 133.21, 284.84, 398.93, and 531.71 eV, representing P 2p, C 1s, N 1s, and O 1s, respectively.The N 1s peak of N0PC is small, and with the increase of doping, the N 1s peak becomes more and more obvious, indicating that N was successfully introduced.After adsorption, the significant signal intensity of elemental Cr in the full XPS spectrum demonstrates the successful adsorption of Cr(VI) onto the surface of the NxPC carbon material, in agreement with the previous conclusions.Fig. 3(c) shows the surface chemical composition of the NxPC material, the main component of the NxPC material is elemental carbon with significant amounts of elemental oxygen (13.5-16.2at.%), nitrogen (1.3-4.4 at.%) and phosphorus (2-2.8 at.%) on the surface, this result is in agreement with the SEM results above.Urea undergoes condensation reactions during hydrothermal processes, producing organic nitrogen, and nitrogen doping could provide the carbon sphere with more electron sites to form p- bonds with heavy metal ions, which has a positive effect on adsorption.The chemical state of N in NxPC was further analyzed using high-resolution XPS.The inverse fold product of the peak fitted N 1s region is shown in Fig. 3(d), with four peaks at binding energies of 398.74-398.86 eV, 400.12-400.39eV, 401.27-401.38 eV and 402.53-402.88eV [33], corresponding to pyridinic nitrogen, pyrrolic nitrogen, graphitic nitrogen, N and oxidized nitrogen, respectively.The relative content of pyrrole nitrogen increased from 23.6% to 39.3% and then decreased to 35.4% with increasing N sources, and the relative content of pyridine nitrogen shows the same trend, while graphite nitrogen and nitrogen oxide show the opposite trend.Pyridine nitrogen and pyrrole nitrogen were the main components of an N-doped carbon sphere with high reactivity, which is beneficial for enhancing the redox properties of carbon materials for close applications in energy storage, adsorption, and catalysis [35][36][37].The P 2p high-resolution spectra of the N and P co-doped carbon sphere were fitted to the split peaks to obtain three peaks, P-C (132.6±0.2 eV), P-N (133.5±0.2 eV) and P-O (134.4±0.2 eV) [38], respectively.The P-N group was a newly generated group after the addition of urea, and its content increased and then decreased with the increase of the nitrogen source, with N2PC reaching a maximum value of 37.19%.

3-1. Adsorption of Cr(VI) by Different Materials
The adsorption performance of NxPC was evaluated by Cr(VI) adsorption experiments.Fig. 3(f) shows the experimental results of the adsorption of Cr(VI) in an aqueous solution by NxPC under the same conditions.All materials show a good adsorption effect on Cr(VI), and it can be seen that the adsorption effect of NxPC is much higher than that of N0PC after the carbon materials are codoped with N and P.This indicates that the different N content had a significant effect on the Cr(VI) adsorption performance of the carbon materials.The equilibrium adsorption capacity of N2PC was the highest, with equilibrium adsorption capacities of 44.0 mg/g (removal 88.1%), 77.5 mg/g (removal 77.5%), 85.2 mg/g (removal 56.8%) and 90.0 mg/g (removal 45%) for Cr(VI) adsorption solutions with initial concentrations of 100 mg/L, 200 mg/L, 300 mg/L, and 400 mg/L, respectively.The adsorption performance of the carbon material in Fig. 4 was compared with the specific surface area of the carbon sphere in Table S1.It was found that the adsorption performance of the carbon material had a positive correlation with the change in specific surface area, which indicated that specific surface area was one of the important factors influencing adsorbing performance.Note that the specific surface area of N2PC (1,295 m 2 /g) was 1.01 times that of N1PC (1,271 m 2 /g) and 1.1 times that of N3PC (1,198 m 2 /g), but for the adsorption effect, N1PC was very different from N2PC, but N3PC was closer.This implies that the specific surface area was not the only influencing factor and that the chemical structure of the carbon material may have an important influence on the adsorption.

3-2. Factors Affecting the Adsorption of Cr(VI) 3-2-1. Effect of Initial Solution pH on Cr(VI) Adsorption
Solution pH affected the Cr(VI) adsorption process.The effect of pH on Cr(VI) removal efficiency was investigated by adjusting T. Luo et al.

December, 2023
the initial pH from 2.0 to 8.0.As shown in Fig. 4(a), the adsorption of Cr(VI) maintained a relatively high removal rate at pH=2.At pH>2, the removal rate of Cr(VI) gradually decreased with the increase of the initial pH of the solution.Solution pH not only affects the surface functional groups of carbon materials but also changes the state of Cr(VI) in the solution.In an acidic environment, the presence of large amounts of H + in aqueous solutions could protonate the nitrogen and phosphorus-containing functional groups on the surface of the carbon sphere, making the surface functional groups more positively charged, thus enhancing the electrostatic gravitational force between N2PC and HCrO 4 .As the pH increased, Cr(VI) existed as Cr 2 O 7 2 and CrO 4 2 , the hydrogen ions in the aqueous solution were decreased, as well as the surface protonation of the carbon material, the trapping of Cr(VI) at the adsorption sites on the surface of the carbon sphere was limited, and the adsorption performance of N2PC on Cr(VI) was affected greatly.The pH of the solution after adsorption remained constant at the lower initial value and decreased instead after the initial value increased, indicating that there was a redox reaction taking place during the adsorption process and that Cr(VI) consumed hydrogen ions for the reduction reaction.It is clear that the initial pH of the solution is an important variable affecting the adsorption of Cr(VI); the pH of the solution was chosen to be 2 in the subsequent experiments.The results show that the Cr(VI) removal rate increased gradually with the increase of the carbon sphere input, but the corresponding adsorption amount decreased from 86 mg/g to 29 mg/g.This was because the increase of the carbon sphere input brought more adsorption sites and the removal rate increased, but then led to a blockage of the active sites on the carbon surface, resulting in a decrease in the amount of adsorption per unit mass of adsorbent.All factors into consideration were taken, and the input dose of N2PC was 50 mg in the subsequent experiments.

3-2-3. Effect of Initial Concentration on Cr(VI) Sorption
The adsorption capacity of the carbon sphere for Cr(VI) was investigated at different initial concentrations (20-400 mg/L).As shown in Fig. 4(c), the removal of Cr(VI) by N2PC gradually decreased from 100% to 45% as C 0 increased from 20 mg/L to 400 mg/L.As the number of Cr(VI) ions increased with the initial concentration, the active sites provided by the carbon sphere were not sufficient for the adsorption process, resulting in a decrease in the removal rate.The adsorption value of N2PC for Cr(VI) increased gradually from 10 mg/g to 90 mg/g with the initial concentration of the adsorbent.This was because the higher the C 0 value, the larger the gradient of Cr(VI) ion concentration on the surface of the liquid and the carbon material, increasing the large driving force, the increased mass transfer rate and the frequent contact between Cr(VI) and the active sites of the carbon material, resulting in more adsorbate transfer to the surface of the carbon material.However, the adsorption sites were limited, and as the concentration gradually increased, the adsorption sites were occupied, and when the adsorption reached saturation, the adsorption capacity was limited and the adsorption value increased slowly.

3-3. Adsorption Kinetic Studies
As shown in Fig. 5, the relationship between the contact time between the carbon sphere and the Cr(VI) solution and the adsorption value is shown.At a C 0 of 100 mg/L for the Cr(VI) solution, the adsorption value increased rapidly from 0 to 120 min and reached 40 mg/g at 120 min, with a removal rate of 80%.The active sites on the surface of the carbon material were progressively occupied as the adsorption process progressed and the collisional contact between the solid and liquid decreased, which led to a slow increase in the adsorption capacity of the Cr(VI) adsorbent until the adsorption reached equilibrium.The initial concentration of the Cr(VI) solution determined the time required to reach equilibrium, which was related to the difference in concentration of Cr(VI) ions between the solid and liquid surfaces.
In this study, the adsorption data of N2PC at different adsorption concentrations were fitted using proposed primary, proposed secondary, Elovich, and Intraparticle diffusion kinetic models.The kinetic models were ranked according to the correlation coefficients in Table S3: the pseudo-second-order kinetic model>Elovich> the pseudo-first-order kinetic model>Intraparticle diffusion model.The lowest correlation coefficient (R 2 =0.69) compared to the other kinetics implies that the rate-limiting step was not intraparticle diffusion.The correlation coefficient R 2 for the proposed secondary kinetics was greater than 0.93 for all concentrations, and the equilibrium sorption value of 72.65 mg/g at an initial concentration of 200 mg/L was calculated theoretically by this equation, which was close to the equilibrium sorption value of 77.5 mg/g obtained from the actual experiments.This implies that the proposed secondary kinetic equation could well describe the adsorption process' s mechanism, further verifying chemisorption' s dominance in the adsorption process.In the adsorption process, chemical reaction and surface adsorption take place simultaneously, as well as external diffusion and internal diffusion of the particles.

3-4. Adsorption Isotherm Studies
The Langmuir and Freundlich models were used to investigate the relationship between the adsorption capacity and the initial concentration of the adsorbent when the adsorption process reaches the adsorption equilibrium state and to describe the adsorption characteristics of N2PC for Cr(VI).As shown in Fig. 6(a) and Fig. 6(b), the adsorption isotherms followed the Langmuir and Freundlich models.The parameters of the two models are given in Table S4, with the Langmuir model showing a better correlation coefficient (R 2 0.98) than the Freundlich model.The adsorption of Cr(VI) by N2PC was more in line with the Langmuir model, tending towards monolayer adsorption where the active site in the adsorption process was on the surface of the carbon material.The adsorption capacity of N2PC for Cr(VI) increased with increasing temperature.The theoretical maximum adsorption values obtained according to the Langmuir model at 298 K, 308 K, and 318 K were 95.5 mg/g, 103.5 mg/g, and 105.7 mg/g, respectively, consistent with the actual maximum adsorption values obtained experimentally of 90 mg/g, 98 mg/g and 100.5 mg/g.These results indicate that the adsorption process of Cr(VI) was endothermic and that high temperature was conducive to the reaction.It was the increased move- Also, all Langmuir model parameters R L were below 0.5, indicating that adsorption occurred readily between the Cr(VI) solution and the carbon material.

3-5. Thermodynamic Studies
The Cr(VI) adsorption process on N2PC was studied using adsorption thermodynamics, and the corresponding adsorption thermodynamic parameters are shown in Table S5.G 0 were all less than 0, indicating that the adsorption process was spontaneous.The absolute value of G 0 increased with increasing temperature, indicating that the higher the temperature, the more the interaction between Cr(VI) and N2PC increased and the higher the driving force and the higher temperature was beneficial for the adsorption.The value of H 0 was 22.07 KJ/mol, which implied that the adsorption of Cr(VI) on N2PC was a chemisorption process involving a complexation reaction [39] and was heat absorbing [40], which was consistent with the above study.In addition, the value of S 0 was greater than 0, indicating an increase in stoichiometry at the solid-liquid interface between the carbon sphere and Cr(VI) during the adsorption process [41].

Adsorption Mechanism
It is clear from the previous discussion that there was both electrostatic gravity and chemisorption during the adsorption of Cr(VI) by N2PC.XPS could provide relevant information on the chemical state of the element, and the N2PBC1-400 before and after adsorption was characterized by XPS.Fig. 7(a) shows a high-resolution XPS map of C 1s divided into four peaks: C=C, C-O, C=O, and O=C-OH [42].It can be learned from Table S6 that the content of functional groups on the surface of N2PC changed after the adsorption of Cr(VI), and the relative content of C=C and C-O decreased from 50.35% and 23.85% to 43.29% and 19.09%, respectively, but the content of C=O functional group increased from 14.18% to 24.57%.This indicated that C=C, C-O as an electron donor was oxidized to C=O.This is consistent with the highresolution XPS results of O 1s in Fig. 7 Comparing high-resolution XPS maps of N 1s adsorbed by N2PC, pyridine nitrogen, and pyrrole nitrogen decreased relative content after adsorption, while graphite nitrogen increased.Pyridine N was referred to as N atoms on the planar edges of graphene, each N atom hybridized with two carbon atoms sp 2 and provided a p electron to the aromatic  system, and pyrrole N in a fivemembered ring with sp 3 hybridization provided two p electrons to the  system [43].Pyridine N and pyrrole N were extremely chemically active, causing many edge defects in the graphitic carbon structure and exhibiting excellent adsorption of Cr(VI).The N groups were involved in redox reactions with Cr(VI), and the Cr(VI) oxygen anion exhibits strong oxidation and instability in the presence of a large number of electron-giving systems [44].N2PC acted as a strong electron donor, inducing the reduction of Cr(VI) to Cr(III), as shown in Eqs. ( 14) and ( 15).The electron transfer reduction reaction required the consumption of a large number of hydrogen ions, which lead to an increase in the ambient pH of the adsorbed solution, which could not provide more protons, the reaction could not proceed and the adsorption reached equilibrium.The fitted P 2p spectrum Fig. 7(d) shows that the P-N bond was reduced from 37% before adsorption to 27% after adsorption, indicating that the P-N group also had a facilitating effect on the adsorption of Cr(VI).Two significant peaks corresponding to Cr 2p 3/2 and Cr 2p 1/2 can be observed in the Cr 2p spectrum of N2PC-Cr, being deconvoluted into four regions of Cr(VI) 2p 3/2 , Cr(III) 2p 3/2 as well as Cr(VI) 2p 1/2 and Cr(III) 2p 1/2 [45].The corresponding relative con-tents in Table S6 show that the content of Cr(III) is higher than that of Cr(VI), indicating that N2PC successfully reduced Cr(VI) to Cr(III).
The results show that the Cr(VI) adsorption mechanism by N2PC was mainly dominated by electrostatic attraction and redox processes.As the adsorption proceeded, some of the Cr(VI) was reduced to Cr(III) through a redox reaction in close proximity to the electron donor, and this process was also the core process of adsorption.

Electrochemical Properties
The high specific surface area of N2PC and the chemically rich surface of the carbon material were tested for performance in terms of electrochemical energy storage before and after the adsorption of the carbon sphere to explore its reusability and practical perfor-  [46], which could produce better ion diffusion in the electrode material, reflecting the characteristics of a bilayer capacitive behavior with better capacitive properties.As the sweep rate increases, the CV curve deviates from the rectangular shape and takes on a shuttle shape, which is attributed to the limitation of the heteroatom transfer at high sweep rates, while the heteroatom generated a pseudo-capacitance during the charging and discharging process.To investigate the practical applicability of the samples to energy storage, the capacitive performance of the electrodes was analyzed by constant current charge/discharge tests (GCD) at different current densities from 1 to 20 A/g, as shown in Fig. 8(c)-(d), and all GCD curves show good linearity and symmetry.The significantly longer discharge times of N2PC-Cr at different current densities indicates larger capacitance values.73.4 F/g and 152.9 F/g specific capacitance were obtained for N2PC and N2PC-Cr at a current density of 1 A/g.The significant increase in capacitance of the adsorbed Cr(VI) samples was due to the chemical reaction that occurs during the adsorption process more hydrophilic groups -COOH generated, which improved the hydrophilicity of the electrode material and increased the contact area between the electrode material and the electrolyte in the electrolyte.The capacitive performance was further verified by GCD tests at different current densities; as shown in Fig. 8(e), the specific capacitance of the samples all decreased with increasing current density, and N2PBC1-400-Cr still had a good capacitive performance.To further evaluate the capacitive performance of the samples, electrochemical impedance spectroscopy (EIS) tests were carried out on the carbon sphere before and after adsorption, as shown in Fig. 8(f), and the measured Nyquist diagram consisted of a semicircle in the high-frequency region and a linearity in the low-frequency region, indicating a low intrinsic resistance and good capacitive behavior.The electrode material of N2PC-Cr had a smaller diameter of the semicircle in the high-frequency region, indicating a smaller impedance value, with better electrical conductivity.As the conductivity values of N2PC and N2PC-Cr by resistivity test were 26.5 S/m and 49.3 S/m, respectively.The cycling stability is one of the main indicators of the electrode material.When the current density was 10 A/g and the initial capacitance could still be maintained at 93% of the initial capacitance after 5000 cycles, the material indicated excellent cycling stability.

SUMMARY
We prepared N and P co-doped carbon spheres by hydrothermal pretreatment with urea as the nitrogen source and walnut shell as the raw material, as well as phosphoric acid activation and pyrolysis.The morphology and structure of the carbon spheres were analyzed by different characterization techniques such as SEM, BET, Raman, FTIR, and XPS.With a mass ratio of urea addition to the walnut shell of 2 : 1 in the hydrothermal process, the prepared N2PC had a higher specific surface area (1,295 m 2 /g), more nitrogen and phosphorus functional groups, and showed good Cr(VI) adsorption performance with a maximum adsorption capacity of 100.5 mg/g.In the experiments of Cr(VI) adsorption by N2PC, the effects of pH, initial input of carbon sphere, and initial concentration on the adsorption performance were systematically investigated.Chemisorption dominated the adsorption process as shown by the adsorption kinetics and adsorption isotherms, and the conversion of toxic Cr(VI) to non-toxic Cr(III) by the active groups on the surface of the carbon sphere through redox with heteroatomic functional groups on the carbon surface was the main mechanism of the adsorption process.The electrochemical test analysis proved that the carbon spheres before and after adsorption were excellent materials for supercapacitors, and after adsorption, more hydrophilic groups were generated, resulting in enhanced electrochemical properties and better energy storage performance.This study provides high-performance carbon sphere adsorption materials for water treatment and transforms them into highly efficient energy storage materials, providing new ideas for solving heavy metal pollution and the energy crisis.

Fig. 2 .
Fig. 2. (a) N 2 adsorption and desorption isotherms; (b) BJH pore size distributions; (c) Raman patterns and (d) histogram of I D /I G , I D1 /I G , I D3 / I G and I D4 /I G values of NxPC.

1 : 2 .
The D peak can be subdivided into D1, D3, and D4 peaks to probe the structure of carbon sphere disorder.The values of I D1 /I G and I D3 /I G indicated the degree of graphene layer edge defects and Korean J. Chem.Eng.(Vol.40, No. 12) 3-2-2.Effect of Carbon Sphere Dosage on the Adsorption of Cr(VI) Fig. 4(b) investigated the effect of the N2PC dose on the ad-sorption effect of Cr(VI) at an initial concentration of 100 mg/L of Cr(VI).
(b).It can also be observed that a new moiety Cr-O[1] appears at 531.45 eV after the adsorption of Cr(VI), indicating that Cr(VI) was attached to the surface of N2PC-Cr as an oxygen-containing ion.