Design of highly microporous activated carbons based on walnut shell biomass for H 2 and CO 2 storage

Low-cost walnut shell-based carbons with high microporosity were prepared by simple one-step carbonization with chemical activation using KOH, exhibiting the promising potential to be a very good CO 2 and H 2 adsorbent


Introduction
Progressing climate changes, resulting in extreme weather phenomena, are mainly caused by the emission of greenhouse gases such as methane and carbon dioxide. The latter is the main measure of emissions from industry and the use of fossil fuels [1]. Nowadays, the investigation follows to the need to minimize foreign oil imports, carbon dioxide (CO 2 ) emissions and climate change, the desire for low-or zero-emission automobiles, and the necessity to store renewable energy sources, and the implementation H 2 as the fuel of the future [2]. Hydrogen energy consumption is not a unique concept, with interest in its practical applications extending back over 200 years [3]. What has changed since the middle of the 1990s is the convergence of variables that makes an economy based on hydrogen energy more alluring. To reduce CO 2 emissions to increasingly encouraged. Activated carbons can be prepared in two ways. The first is the carbonization of the precursor material, which can be the carbonization/pyrolysis of the biomass a, followed by the activation process, which can be chemical or physical [9]. The carbonization or pyrolysis process is responsible for the thermal degradation of the source material, eliminating non-carbonaceous species, in this procedure a rough structure is formed, with little developed pores, which may be clogged by tar, the activation process is intended to improve the quality of these pores, increasing the diameter and consequently the surface area [10]. The activation step can comprise physical and chemical activation. The physical activation process can be performed in two consecutive steps: carbonization of the precursor material at high temperatures (above 300 • C) in an inert atmosphere and thermal activation, at the same temperature or at temperatures higher than carbonization, in the presence of a gas oxidant such as water vapor, carbon dioxide or both [11][12][13]. These gases promote the oxidation of the carbonaceous material inside the particles, promoting the unclogging of existing pores, and consequently, developing their porous structure [14]. On the other hand, for chemical activation, the material to be activated must be impregnated with chemical substances such as phosphoric acid, potassium hydroxide, sodium hydroxide, zinc chloride, among others, before or after carbonization [15,16]. The chemical activation process can change the structure of the precursor material, resulting in a change in the formation of micropores, mesopores and macropores, where the adsorbents, such as gas molecules, will be allocated. After impregnation by the activating substance, the chemical agent and its decomposition products are removed by washing with water or an acid/base solution, leaving the formed pores free [17].
As many researchers report, in the processes of adsorption of gases such as CO 2 and H 2 , the most important role is high microporosity and their surface area [18]. Numerous scientific works have been published regarding the study and improvement of processes and materials used to CO 2 and/or H 2 storage. For example, microporous carbon materials based on biomass corncob [19], pitch mesophase [20], chitosan [21], and potato starch [22], black locust [23], spend dregs [24], peanut shells [25] can present excellent hydrogen and carbon dioxide adsorption capacity.
In this work we present a simple and method of preparation of activated carbons based on biomass from walnut shells. Highly efficient carbon adsorbents were evaluated in terms of texture parameters and CO 2 and H 2 storage performance. The adsorption of a binary mixture of CO 2 and N 2 with composition 15% of CO 2 which can be considered representative of post-combustion capture conditions was assessed at 25 • C and 40 • C. The mechanism of pores formation as a result of chemical activation was explained. The effect of porosity, and in particular microporosity, on gas CO 2 and H 2 adsorption was investigated and their mechanism of adsorption.

Synthesis of activated carbon from biomass
The walnut shells were grounded, then dried at 105 • C temperature, and prepared as a starting material for obtaining carbon. A saturated KOH solution was used as the chemical activating agent. First, the powder of walnut shells was treated with an activator at ambient temperature for 3 h. The mass ratio of KOH: precursor was 1: 1. Then materials were carbonized under continuous N 2 gas at 18L STP/min. The 500-900 • C carbonization temperature was reached at a 10 • C/min heating rate and was maintained for 1 h. After activation, to prevent oxidation, the sample was cooled inside a furnace under N 2 gas flow. After cooling, the resulting product was washed with distilled water, then with 1 mol/dm 3 hydrochloric acid and again with distilled water until the pH was neutral. The resulting material was finally dried in an oven at 200 • C overnight. The schematic preparation of walnut shell activated carbon is shown in Fig. S1.

Materials characterization
To evaluate the textural properties of the prepared samples were analyzed using N 2 adsorption-desorption at − 196 • C and CO 2 at 0 • C. Gas adsorption measurements were carried out on a QUADRASORB evo ™ volumetric apparatus. Before adsorption measurements were taken, the samples were degassed durning 16h under vacuum at 250 • C. To determine specific surface area (S BET ) the Brunauer-Emmett-Teller (BET) equation was used in the relative pressure range of 0.05-0.25. The total pore volume (TPV N2 ) was calculated from N 2 adsorption isotherms at the highest relative pressure (P/P 0 = 0.99). Non-local density functional theory (NLDFT) model was used to determine the porosity of a samplepore size and pore size distribution. The NLDFT method use a classical fluid density functional theory to construct the adsorption isotherms in ideal pore geometries (e.g., N 2 adsorption in the slit-pore model at 77 K). This model used to estamitaed pore size distributions from N 2 (MPV N2 ) and CO 2 (MPV CO2 ) adsorption isotherms. The X-ray diffraction (XRD) analysis of the prepared ACs were recorded by an Xray diffractometer (PANalytical Empyrean) using Cu Kα radiation (λ = 1.54056 Å), as the radiation source in the 2θ range of 20-80 • . Determination of the activated carbon spectra was carried out using a Fourier transform infrared spectrometer from The Digilab Division of Bio-Rad (Cambridge, MA, USA), model FTS-175 C. The research was carried out using the transmission method, using the technique of pressing samples with potassium bromide. The carbon samples were mixed with KBr at a constant activated carbon weight to KBr weight ratio of 0.25% and pelleted at a pressure of 5 bar. The advantage of using KBr pellets is that there are no KBr bands in the spectrum in the measuring range 4000-500 cm − 1 . The Raman spectra was used to determine the quality of the obtained activated carbon. The analysis was performed using a Renishaw InVia Raman Microscope spectrometer with excitation laser with a beam length of 785 nm. Morphologies of the ACs were examined using scanning electron microscopy (SEM) with cold emission (UHR FE-SEM Hitachi SU8020). For elemental analysis in activated carbons was carried out with elemental analyzers (LECO Corporation). For potassium quantity analyze XRF (The X-ray fluorescence energy dispersion spectrophotometer (EDXRF) of the Epsilon 3 type from PANalytical B. The CO 2 adsorption equilibrium of all carbon adsorbents were obtained on a Quantachrome Instruments QUADRASORB evo™ gas volumetric analyzer. The adsorption process was carried out at two temperatures 0 • C (ice-water bath), 25 • C and 40 • C (circulating water bath) at pressure up to 1 bar using pure CO 2 . Before the adsorption analysis, each sample was pretreated at 200 • C for 16 h under vacuum to desorb any moisture and then cooled down to the required temperature, followed by ultrahigh purity CO 2 into the system. H 2 adsorption at a pressure higher than 1 bar was tested by the volumetric method, using the Hiden Isochema IMI apparatus. H 2 adsorption measurements were made for the temperature of 25 • C and the pressure up to 40 bars. An appropriate mass of the sample was poured into the reaction tank, with a volume of about 2 cm 3 . To reduce the unused volume, the remaining space of the reaction vessel was filled with glass wool. After closing, the entire system was flushed with helium to check system for leaks. The next step was to degases the sample at 250 • C. After the degassing was completed, the adsorption isotherms were measured.

Modeling of adsorption isotherms
To identify the resulting adsorption complex on the adsorbent surface when the adsorption process reaches an equilibrium state, it is significantly crucial to determine the appropriate mechanisms that take place during the process. Therefore, the subsequent interpretation of the data obtained from the isotherm models is necessary to predict the nature of the adsorption and the effective design of the adsorption system [26]. In view of that, five selected equilibrium models were used to analyze the experimental CO 2 adsorption data on activated carbon, which are two-parameter (Langmuir, Freundlich, Temkin) and three-parameter (Toth, Sips) isotherm models. The non-linear form of isotherm equations, their theoretical assumptions, and description of parameter are presented in detail in Table 1. In the scoping of these studies, other isothermal models could potentially be implemented and considered that include: Radke-Prausnitz, Hill-Deboer, or Fowler-Guggenheim models.
To determine the model that most accurately reflects the interaction between the adsorbent and the adsorbate, all five isotherms models were fitted to empirical data using nonlinear regression using the Solver Addin in Excel and additionally verified by Origin's NLfit tool. Linear regression was rejected in the analysis due to the potential inherent bias resulting from the transformation of the original equation (non-linear), which could lead to inaccuracies in the isothermal parameter estimate as well as to distortion of fits [33]. On the contrary, nonlinear regression gives a theoretically precise method, where it offers an exact fit of the predicted value of the isotherm model to the experimental data, mainly based on minimization of the error distribution between them [34].
The best fitting between the selected theoretical model and the experimental isotherm data was evaluated using the sum of the squares errors (ERRSQ/SSE), which is the most frequently used error function in modeling of adsorption isotherms. ERRSQ is calculated by the difference in squares between the experimental and model data. Moreover, it is also worth noting that this error should be applied for lower pressures or concentrations of the adsorbate. The ERRSQ error is defined by the following equation [35]:

Results and discussions
3.1. Studies of textural properties by the adsorption of N 2 at temperature of − 196 • C and CO 2 temperature of 0 • C N 2 adsorption isotherms at − 196 • C on activated carbons obtained in the temperature range of 500-900 • C are shown in Fig. 1. The isotherms show high N 2 adsorption at low relative pressure, which is characteristic of microporous materials. High N 2 adsorption at low relative pressure (less than 0.1 P/P 0 ) indicates the availability in the carbons of a large volume of micropores with a narrow pore size distribution. It was noticed that the nitrogen adsorption capacity in − 196 • C clearly increased for the carbon samples with the increase of the thermal treatment temperature during their preparation, reaching the highest value for the sample obtained at 800 • C. From the point of view of the IUPAC [30]classification, the nitrogen sorption isotherms in the initial range of relative pressure P/P 0 corresponded to type Ib, and in the range of medium and higher pressures to type IV. The Ib isotherm type is characteristic for materials with narrow micropores, where the filling of micropores is the dominant mechanism at low P/P 0 [30] On the other hand, a characteristic feature of type IV isotherms is the occurrence of a clearly formed hysteresis loop related to the phenomenon of capillary condensation in the area of mesopores. The presented isotherms contain a hysteresis loop of H4 type around the pressure P/P 0 of about 0.45, resulting from capillary condensation of nitrogen in mesopores [31]. This indicates that these carbons, apart from relatively well-developed microporosity, also have a developed mesoporosity. The obtained activated carbons were characterized by the specific surface area ranging from 406 to 1868 cm 2 /g ( Table 2). q m -maximum adsorption capacity (mmol/g) P-relative pressure of the adsorbate (bar) K L -Langmuir isotherm constant (bar − 1 ) Monolayer adsorption on a homogeneous surface [27,28,29] Freundlich qe = KF⋅P 1 nF K F -Freundlich isotherm constant (bar − 1 ) P -relative pressure of the adsorbate (bar) 1/n F -heterogeneity factor n F -Freundlich exponent Monolayer or multilayer adsorption on a heterogeneous surface.
[27, 28,30] Temkin qe = R⋅T bT ⋅ln(KT ⋅P) b T -Temkin isotherm constant related to the heat of adsorption (J/mol) R-universal gas constant (J/mol⋅K) T-temperature (K) K T -Temkin isotherm equilibrium binding constant (bar − 1 ) P-relative pressure of the adsorbate (bar) Adsorption on a heterogeneous surface accounts for indirect interaction between the sorption complex at a wide pressure range. [27,28] Toth qe = qm⋅KT⋅P 1 nT q m -maximum adsorption capacity (mmol/g) P-relative pressure of the adsorbate (bar) K T -Toth isotherm constant (bar − 1 ) n T -heterogeneity factor Adsorption on heterogeneous surface at both low and high pressure. Based on the analysis of the pore volume distribution, information on the structure of the tested adsorptive materials was obtained. In order to investigate the relationship between the pore size of the carbons and the temperature of the preparation process, an analysis of the pore size distribution of the obtained activated carbons was performed. It was found that for the tested carbons a similar pore distribution was observed. All carbons, apart from micropores, also contained mesopores with sizes from 2 to 3 nm. Fig. 2a shows the pore size distribution determined by the DFT method from N 2 adsorption measurements at − 196 • C. The highest proportion of micropores in the range from 1.4 to 2 nm was found in carbon AC-800, which was also characterized by the highest proportion of mesopores up to 4 nm. No mesopores with diameters greater than 5 nm were observed. Fig. 2b shows the distribution of pores with a diameter of 0.3-1.4 nm determined by the DFT method based on CO 2 adsorption at the temperature of 0 • C for the tested carbons. Several intense peaks were found with diameters of approx. 0.4-0.5 nm, 0.5-0.7 nm and 0.8-0.9 nm. These peaks occurred in all materials, regardless of the temperature of their preparation. It was found that pores with a diameter of 0.5-0.7 nm were dominant in the AC-700 and AC-800 carbons. On the other hand, pores with a diameter of 0.8-0.9 nm predominated in the AC-800 carbon. The numerical values are summarized in Table 2.
Results of the porosity presented in Table 2 is attributed to the efficient chemical activation by KOH. As proven mechanism of activation using KOH as activated agent begin by transformation of KOH at 300 • C [32]: As the carbonization temperature increases, K 2 CO 3 decomposes: Thus, during the activation process, a number of changes occur in the material, such as: chemical etching via redox reactions, gasification of carbon, intercalation of potassium products resulting in lattice expansion which upon hydrochloric acid washing gives a highly porous carbon framework [36].
The pore formation mechanism begins with the surface of the material, where the KOH reacts with C. As a result, in the first phase, the formation of mostly small pores, characterized by a relatively small diameter, are micropores and mesopores ( Fig. 3-I). When the temperature rises around 500 • C, transverse pores are formed ( Fig. 3-II). With the subsequent increase in temperature up to 750-800 • C the reactions rate with carbon and the diffusion rate of the reagents increased. There is a significant pattern in the formation of transverse pores and their branching ( Fig. 3-III). At 800C-900 • C, the surface area is reduced, pores continue to form micropores, but the process of increased mesopore formation also begins ( Fig. 3-IV). Increasing the carbonization temperature above 900 • C would result in the destruction of the microporous structure and the formation of wide macropore pores ( Fig. 3-V) [37]. Understanding and defining the mechanism of pore formation is an important turning point in the preparation of activated carbons with the desired properties.
The yield of activated carbon is usually defined as the final weight of activated carbon produced after activation, washing, and, divided by the initial weight of raw material, both on a dry drying basis according to equation (4) [38]: Where: m and m 0 are the dry weight of final activated carbon (g) and dry weight of precursor (g), respectively.

XRD method
XRD pattern of 500-900 • C carbons are shown in Fig. 4. XRD profile shows that all materials are low crystalline. The diffraction patterns show only two-digit broad diffraction peaks located at approx. 24 • and 44 • , which correspond to (0 0 2) and (1 0 0) plane in non-graphitic disordered carbon structure, respectively [42][43][44]. The low intensity of the peak corresponding to the plane (1 0 0) at approx. 44 • for activated carbons shows the disordered graphite structure that was formed for the activated carbons [42]. Similar diffractograms of poorly available carbon materials can be achieved in the works [44,45], in which the authors attribute them to amorphous carbons.

FT-IR spectroscopy
The FT-IR spectra of the carbons are presented in Fig. 5. The FT-IR analysis showed that the characteristic peaks for all samples are basically the same and showed vibrations mainly in the area of 3400-3500, 2900-3000, 1650-1700, 1375-1400, 1000-1100 and 600-800 cm − 1 . A strong diffraction peak at 3420 cm − 1 corresponds to the tensile vibration of O-H bond, which may be caused by dehydration of the precursor in the activated carbon preparation process [46,47]. The band at 2930 cm − 1 corresponds to C-H asymmetric stretching vibration, while the vibration peaks appearing around 1627 and 1700 cm − 1 can be attributed to the stretching vibrations of the C--C bond [48]. The 1390 cm − 1 band represents in plan C-H bending [42]. The bands at 1000 and 1100 cm − 1 corresponds to C-O stretching vibration. The vibration peak appearing near 800-600 cm − 1 belong to the peak of bending out of the plane C-H [48]. The infrared spectrum of the tested activated carbons has a shape similar to the spectra recorded for lignocellulosic materials [42,48].

Raman spectroscopy
Raman scattering spectra exhibit two broad Raman bands: the first peak detected in the range of 1315 cm − 1 can be assigned to the defect or disordered phase (D-band), and the second peak at 1601 cm − 1 can be attributed to the graphitic phase (G-band) of carbon (Fig. 6). The D-band represents the vibrations of carbon atoms having a dangling bond in the terminations of the disordered graphite structure, whereas the G-band represents the stretching vibration mode of the sp 2 hybridized carbon atoms in the graphite layer [49,50]. The ratio of the intensities of D-band and G-band (I G /I D ) measures disorder in carbon materials with the graphitic structure (number of sp 2 clusters). The I G /I D increases with the decrease in crystallinity indicating that the chemical activation process led to more defects appearing in the samples. The carbon samples exhibited I G /I D ratios in the range of 0.59-0.69. Careful observations reveal that the I G /I D ratio decreases from 0.69 to 0.59 upon the increase in the temperature of carbonization indicating more and more defects in the carbon framework and demonstrating an increase in the graphitic carbon.

SEM method
The surface morphology of activated carbons was examined using the scanning electron microscopy technique. Walnut shell carbons showed a uniform structure with a predominance of macropores, which had an average diameter of 12 μm [51]. The carbon-KOH interaction creates a huge number of micropores, which considerably increases the surface area and volume of the pores, according to an examination of the microstructure of activated carbon [52]. As seen in Fig. 7., the activated carbon created in this study may take on a variety of shapes with different pore sizes, wall thicknesses, and shapes. A significant amount of organic material was removed, and pores were created because of the activation process. The SEM pictures of the AC-500, AC-600, AC-700, AC-800, and AC-900 are displayed in Fig. 7. The micrographs show that each sample had hollow tunnels throughout, which is indicative of the gasification of volatiles after activation. All the AC samples were made up of agglomerated high-quality particles. Additionally, it was possible to see that all sample's carbon particles were disordered, which was consistent with the findings of the XRD study [53].

The elemental analysis
The elemental analysis results of the activated carbons obtained at various activation temperatures are shown in Table 3. It was observed that with increasing temperature of carbonization all carbon samples characterized of higher contents of C and lower contents of H and O. This means that chemical activation involving potassium hydroxide led to accelerate the removal of H and O and this resulted in an increased C. With an increase in the activation temperatures from 500 to 900 • C, the carbon content of the activated carbon samples was increased from 70.46 to 96.35 wt%. Moreover, the hydrogen content decreased from 2.78 to 0.74 wt%, And similar trend was observed for the oxygen content, decreasing from 25.21 to 2.16 wt%. Changes of the elementary content result from the release of volatiles during carbonization that resulted in the elimination of non-carbonaceous parts and enrichment of carbon element [54]. The obtained results of the elemental analysis for activated carbons from walnut shells are similar to other activated carbons obtained from the research biomass [55][56][57]. Potassium content was also determined using the XRF method. All activated carbons had trace amounts of potassium not exceeding 0.06% wt. The obtained results showed that by washing with water and 1 M HCl, potassium compounds and metallic potassium, which intercalated in the carbon structure, were practically removed from the activated carbons, and a small residue is most likely related to its incorporation into the activated carbon matrix along with the carbonization process.

Studies on CO 2 and H 2 adsorption
Walnut shell-based activated carbons were tested for their ability to adsorb CO 2 at three temperatures 0 • C, 25 • C and 40 • C at a pressure of 1 bar. As can be seen in Fig. 8., the system of isotherms for all activated carbons shows that at low adsorbate concentrations, when most of the adsorbent sites are not bound to the adsorbate molecules, adsorption is very easy and some of the molecules are adsorbed. As the adsorbent surface is covered with adsorbate particles, the number of adsorption centers not associated with the adsorbate decreases. The AC-800 sample had the highest adsorption capacity, amounting to 10, 5, 4.5 for 0 • C, 25 • C and 40 • C, respectively. The obtained CO 2 adsorption values for AC-800 are among the highest when compared to other activated carbons obtained by other researchers, summarized in Table 4.
To understand the mechanism of CO 2 adsorption (Fig. 9a), we determined the dependence of CO 2 adsorption on the total specific surface area (Fig. S2a), the total volume of pores (Fig. S2b), the volume of micropores determined by the N 2 isotherm (Fig. S2c) and the volume of micropores determined by the CO 2 isotherm (Fig. S2d). When comparing the R 2 correlation coefficients, the highest values were obtained for the relationship between CO 2 adsorption and the volume of micropores determined using CO 2 , it was R 2 = 0.75 for 0 • C, R 2 = 0.87 for 25 • C and R 2 = 0.90 for 40 • C. The process of adsorption at low pressure uptake mainly depends on the volume of narrow micropores instead of the specific surface area and total pore volume. The adsorbent-adsorbate interaction energy, which comes from short-range attractive and repulsive forces, is notably reinforced when the adsorption occurs in extraordinarily small pores due to the overlapping of potential fields from neighboring walls. The enhanced adsorption potential, therefore, results in the complete filling of small micropores at low relative pressure (<0.01). For that reason, the adsorption mechanism consists of volume-filling rather than surface cover typical of meso/macroporous materials and the adsorbates occupying these small micropores are in a liquid-like state [75,76]. Therefore, the interaction between adsorbents and CO 2 molecules becomes stronger when the pore size decreases. Thus, it can be concluded that narrow micropores are ideal sites for CO 2 sorption to occur.
The essential is that H 2 storage capacity is governed by the factors that influence the adsorbateadsorbent interactions. In porous materials such as activated carbon the most important factors in determining adsorptive H 2 uptake are surface area and micropore volume [89,90]. Generally, the mechanism for H 2 storage (Fig. 9b) by means of physisorption is the van der Waals attraction between the surface of the ACs and the H 2 molecules [91]. Nevertheless, the van der Waals interaction between the H 2 molecules is weak; therefore, to expect a few layers of hydrogen packing onto an adsorbent surface is impractical [92]. As with CO 2 adsorption, presence of an adequate volume of small pores is key factor that attributes to H 2 uptake. In order to increase the interaction energy between H 2 molecules and the carbon adsorbent, narrowing the pore size due to overlap of the potential fields from both sides of the pore wall to a degree determined by the pore width [93]. In the case of smaller pores, the overlap of van der Waals potentials due to the atoms of the adjacent walls favors stronger physisorption. Finally, the total interaction between the adsorbate molecule and a solid is greater if the molecule can interact with a larger number of surface atoms, as what happens in small pores [94]. For that reason, smaller pores are more efficient in H 2 storage due to stronger interaction with H 2 molecules, as confirmed by the analysis of H 2 uptake dependence as a function of (a) BET surface area (Fig. S3a), (b) total pore volume (Fig. S3b), (c) VmN 2 (Fig. S3c) and (d) VmCO 2 (Fig. S3d) [95]. The best correlation coefficient R 2 was achieved for micropores up to 1.4 nm and it was R 2 = 0.89. Fig. 10 present the H 2 adsorption isotherms on activated carbon samples at temperature of 25 • C. The best result was obtained for the sample AC-800 equal 3.15 mmol/g at 40 bars. The walnut shells based activated carbon obtained in this study and its ability to store hydrogen may constitute a concretion for other available carbon materials used in this process, as presented in Table 5.

Isosteric heat of adsorption
The isosteric heat of adsorption (Qiso) value is important to characterize the interaction between the adsorbent and the adsorbate. Provides information on the strength of adsorption. A higher value of the isosteric heat of adsorption indicates a stronger interaction between the adsorbate and the adsorbent. The high isosteric heat of adsorption causes a high cost of regeneration. The isosteric heat of adsorption is expressed by the Clausius-Clapeyron equation: where: Q iso -is the isosteric heat of adsorption at a constant surface coverage θ [kJ/mol] Runiversal gas constant [J/mol⋅K] θ -a surface coverage degree The isosteric heat adsorption values for activated carbons changed from 28 to 32 kJ/mol for surface coverage in the range of 0.1-0.35 (Fig. 11). In the case of adsorption type determination, when the isosteric heat of adsorption value is lower than 80 kJ/mol, there is talk of physisorption, while for chemisorption it is in the range of 80-200 kJ/ mol [96]. The obtained values clearly confirm the physical nature of CO 2 sorption on activated carbons. The isosteric heat of adsorption decreased with the coverage of the surface. The greater the surface coverage, the weaker the interaction between carbon dioxide and activated carbon. Carbon dioxide is bound to the surface of the activated carbons by van der Waals forces and can be easily desorbed. Recent studies show that if the gas contains only CO 2 , the most advantageous are sorbents with an isosteric heat of CO 2 adsorption within the range of 22-28 kJ/mol. On the other hand, sorbents for CO 2 adsorption from flue gases should be characterized by the heat of CO 2 adsorption from 26 to 31 kJ/mol [97]. As seen in this case, the values of isosteric heat of CO 2 adsorption obtained in this study for all walnut shell activated carbons met these requirements. It is noteworthy that such values are highly desirable because of the low regeneration costs.

Adsorption isotherms
The experimental equilibrium data on CO 2 uptake by activated carbon (AC) with best-fit isotherm model curves for temperatures ranging from 0 • C to 40 • C are presented in Fig. 8. It has been observed that the tested AC samples possess an adsorption capacity between 3.55 and 9.59, 2.19-5.18, and 1.43-4.34 mmol/g for three adsorption temperatures. The AC sample synthesized at an activation temperature of 800 • C exhibits the highest CO 2 uptake with excellent gas adsorption properties (9.59 at 0 • C and 1 bar) in the region of low pressure. In the case of H 2 , adsorption equilibrium test was carried out for 25 • C. The AC-800 sample also stands out for the highest adsorption capacity, reaching 3.15 mmol/g at 25 • C and 1 bar. The fact suggests that AC-800 has the most highly developed micro-and mesoporous structure than any other sample. On the contrary, AC-500, AC-600, AC-700, and AC-900 have H 2 uptake of 1.22, 1.39, 2.06 and 0.92 mmol/g under the same conditions, respectively. In a similar vein to CO 2 , Fig. 9 depicts the variation of H 2  adsorption experimental data with the equilibrium pressure and the best correlating isothermal model curve.
The shape of all CO 2 and H 2 adsorption isotherms on activated carbon is monotonically concave, and, as a result, they can be classified as type I according to the IUPAC classification (description of microporous adsorbents) [98]. Empirical point analysis indicates that the amount of adsorbed CO 2 in the equilibrium state decreases with increasing temperature, analogous to the exothermic nature of adsorption, indicating that the process is carried out more favorably at lower temperatures. It may suggest the physical adsorption phenomenon, which involves van der Waals forces that compared to the kinetic forces of CO 2 molecule collisions, become negligible as the temperature increases (the strength of the binding forces between CO 2 and a surface od adsorbent is weakening). Moreover, as expected, the rise in the partial pressure as a driving force (pressure gradient) for adsorption causes an intensification of the adsorption capacity of CO 2 at all temperatures, as a consequence    Fig. 11. Isosteric heat of adsorption plots of CO 2 adsorption. of exothermicity. For H 2 , such broad and in-depth observations cannot be made due to the single-temperature adsorption study, however, the increase in pressure also intensifies the uptake and the process can be considered exothermic.

Fitting results of isotherm models
The calculated sum of squares error (ERRSQ) values from fitting the following isotherm models, such as Langmuir, Freundlich, Temkin, Toth, and Sips, which were discussed earlier are included in Table S1 and Table S2. To contrast the accuracy of different models, each models ability has been examined to effectively minimize an objective error function. Statistical investigation and selection of the smallest ERRSQ values allowed the choice of the model with the minimum distribution of discrepancies between the experimental and model data of CO 2 and H 2 adsorption on AC. According to this error function, the Langmuir, Freundlich, and Temkin models are not as suitable as other models to characterize CO 2 and H 2 adsorption on any of the AC samples that were tested. The Toth and Sips models seem to be the most feasible choice for predicting the findings by non-linear regression, which are consistent with the adsorption isotherms that were experimentally determined. However, the Toth model, which is an empirical modified form of the Langmuir equation involving an asymmetric quasi-Gaussian distribution of adsorption sites [99], has a greater degree of congruence with the experimental data in the entire range of adsorption temperatures. Its ERRSQ values for CO 2 are in the range: 0.0250 to 0.2222, 0.0009 to 0.0053, 0.0004 to 0.0041, correspondingly for the increasing temperature of adsorption. At the same time, for H 2 these values oscillate between 0.000099 and 0.0008. Therefore, collated to the Sips models, the non-linear Toth equation is better able to accurately characterize the CO 2 and H 2 adsorption isotherms over the AC and was the only one used to demonstrate the quality fit. To contrast the fitting of other isothermal model curves to the Toth, their runs are demonstrated for CO 2 and H 2 adsorption on AC-800 at 0 and 25 • C (Fig. 12, Fig. 13). As it can be seen from, the modeling isotherm with Toth and Sips nonlinear equation yields competitive prediction to the experimental isotherms than the Langmuir, Freundlich, and Temkin fittings, where their curve ran along the experimental points in the whole range of pressures. The obtained results of modeling non-linearized isothermal equations allowed the following model classification (from the left the best-fit model), for CO 2 : while for H 2 at 25 • C: The parameters of all isotherm models are presented in Table S3 and  Table S4. Interpreting the ones for the best-fitted model is a particularly important stage, which allows correct recognition of the nature and mechanism of adsorption on the surface of AC. The parameter of maximum CO 2 adsorption capacity (qm), according to the Toth model, decreases with the growth of the adsorption temperature growth, which confirms that the phenomenon of CO 2 adsorption in activated carbon is an exothermic process, as noted earlier. To explore more thoroughly the presence of diverse chemical and structural qualities on the AC surface, the main assumptions of the Toth model are crucially needed. The Toth model is especially helpful for characterizing adsorption on the heterogeneity surface of porous adsorbents in the gas phase [100] that satisfies both the low and the high boundary of the adsorbate concentration. When the n T parameter measuring surface heterogeneity is equal to 1, the Toth model equation is reduced to the Langmuir isotherm [27]. On the other hand, if it deviates away from the unity state, then the adsorption system is considered heterogeneous [101]. Considering the theory of the above model and analyzing its, each AC sample at three CO 2 adsorption temperatures indicates that the surface of the adsorbent is heterogeneous. The values of n T for the H 2 isotherm at 25 • C also indicate adsorption on an energetically heterogeneous surface.

Sum of normalized errors method (SNE)
To further study whether the sum of squares error (ERRSQ) is the optimal tool that best describes the interaction between the adsorbate and the surface of the AC for the best fitted model, other error functions have been employed (R 2 , ARE, χ 2 , HYBRID, MPSD, and EABS). The final error analysis based on the sum of normalized error (SNE) allowed for the verification of the previous conclusions with a more in-depth understanding of isotherm modeling in the sense of choosing the appropriate error evaluation function to minimize the error distribution between the experimental equilibrium data and theoretical isotherms.
The error functions with connected the lowest SNE values are presented in Table 6 and Table 7.
In terms of minimizing the error distribution between the Toth isotherm model and the experimental equilibrium data of CO 2 , the findings demonstrate that the determination coefficient (R 2 ) is superior to all the others investigated. The R 2 showed the lowest SNE value at each adsorption temperature than other error functions. Meanwhile, the results of the error analysis of the fitting to the H 2 experimental data indicated that the HYBRID and χ 2 error functions produced an optimum parameter set for the Toth isotherm due to their small SNE values. For the isothermal modeling of CO 2 and H 2 , MPSD had the worst goodness of fit of the Toth model, due to the very large SNE (5.193-6.993).
Finally, it was found that, the use of ERRSQ error is not sufficient and the outputs of R 2 , HYBRID and χ 2 may be used to forecast the optimal isotherm based on the three parameter Toth isotherm model. The  findings shows that the magnitude of the single error function is not a determining factor in selecting the optimal isotherm parameters and the SNE method gives much better accuracy.

Studies of the CO 2 over N 2 selectivity
To test the gas CO 2 /N 2 selectivity of the as-prepared carbons, their N 2 and CO 2 adsorption isotherms were acquired at 25 • C and 40 • C at 1 bar (Table 8, Fig. S5). The IAST theory developed by Myers and Prausnitz [102] along with pure component isotherms were applied to determine CO 2 /N 2 selectivity. In this work, IAST was used to predict selectivity of CO 2 over N 2 using single adsorption isotherms of these gasses for equimolar CO 2 and N 2 binary mixture (S) according to the following equation: where: q represents the mole fractions of the components in adsorbed phase while p is used for bulk phase.
Selectivity for flue gas composition 15% CO 2 and 85% N 2 (S IAST ) was calculated also on the basis of IAST method using the below equation [64]: where: qi@jbar is the adsorption capacity [mmol/g] of CO2 and N2 at the partial pressure of 0.15 and 0.85 respectively. Table 8 shows the selectivity of the obtained activated carbons. The highest selectivity value was observed in AC-800, attributed to the effect of the potassium hydroxide activator and the facile accessibility of ultramicropores to CO 2 (diameter = 0.33 nm) but not to N 2 adsorption (0.36 nm) [103]. Moreover, a larger quadrupole moment of 4.30 × 10 − 26 esu*cm 2 of CO 2 compared to N 2 (1.52 × 10 − 26 esu*cm 2 ) [104] lead to stronger interactions between CO 2 molecules and adsorbent surfaces, resulting in highly selective CO 2 adsorption and separation. The value of the selectivity coefficient reaching the value of 43.6 and 48.7 for a pressure of 1 bar, respectively at 0 • C and 25 • C. It is worth noting that the obtained SIAST value is one of the highest so far described in the literature. A similar tendency in the CO 2 /N 2 selectivity ratio was noted by Serafin et al. [64].

Stability tests of CO 2 and H 2 capture
One of the important criteria of a good activated carbon as an adsorbent is its regenerative capacity, which determines the life of the adsorbent, its reuse and the overall cost of capture. To determine the possibility of easy regeneration and reuse of the material, the reversibility of CO 2 adsorption was tested in 1,5,10,15,20 cycles and H 2 in 1,5,10 cycles for the best material AC-800 (Fig. 14). On this basis, it is possible to assess the possibility of regenerating activated carbons, and secondly, to verify the fact that CO 2 and H 2 do not bind to the sorbent material by chemisorption. Moreover, it enables parameters to be established that can serve as a benchmark when attempting to regenerate under real industrial scale conditions. Both in the case of CO 2 adsorption and H 2 adsorption, no changes were found after many cycles. The highest standard deviation for CO 2 cycles at 25 • C was 0.06 and at 40 • C was 0.08. For H 2 cycles, the standard deviation was 0.05. This is confirmed by the fact that it can be easily regenerated under mild conditions and the material retained its capacity. The obtained AC-800 activated carbon meets the criterion of a good sorbent in terms of its ability to regenerate.

Conclusions
This article discussed the key role of surface morphology as well as surface functionality on the substantial CO 2 and H 2 uptake capacity of walnut shells activated carbons. It can be concluded that the CO 2 and H 2 adsorption capacity on biomass-derived AC depends mainly on surface microporosity. The activation temperature had an effect on the pore structure, surface area and the adsorption properties of the activated carbons. As the activation temperature increased till 800 • C, the CO 2 and H 2 value increased first then decreased, and the yield declined continuously. The activation temperature 800 • C was the best stages of the activation process. The highest specific surface area, the total pore volume and micropore volume from CO 2 were 1868 m 2 /g, 1.06 cm 3 /g and 0.55 cm 3 /g. CO 2 adsorption for the best activated carbon was 9.54, 5.17, 4.33 mmol/g for OC, 25 • C and 40 • C, respectively. However, in the case of high-pressure hydrogen adsorption, the highest value was 3.15 mmol/g. In addition, it is worth paying attention to the high selectivity of activated carbon at 25 • C = 163 and 40 • C = 102.3, as well as high stability after many adsorption cycles -both in the case of CO 2 Table 7 The lowest sum of normalized error (SNE) values and the corresponding error function for Toth isotherm model.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.