Introduction

In the past decades, the lack of energy reserves, severe climate changes, the increasing growth of the global population, and the surge in industrial demand have contributed to a substantial increase in global warming and greenhouse effect, posing a significant threat to plant and animal life1,2,3. A major contributor to this predicament is the emission of carbon dioxide (CO2) resulting from the burning of fossil fuels. Recent statistics reveal that in the United States and worldwide, nearly 41% and 60% of greenhouse gasses consists of CO2, respectively4. Alarming trends show that the concentration of CO2 in the atmosphere has risen from 280 ppm in 1750, marking the dawn of the Industrial Revolution, to 406 ppm in 20174. Despite international efforts to implement stringent protocols, the affordability of fossil fuels has made it challenging for developing countries to curb their usage.

On the other hand, methane (CH4), a primary component of natural gas, presents a more environmentally friendly alternative due to lower CO2 emissions5,6. Consequently, there is an immediate requirement for the development of efficient and selective storage materials for the adsorption of CO2 and CH4 gases. Various materials such as metal–organic frameworks (MOFs), micro polymers, mesoporous silica, zeolites, and carbon materials have been proposed for enhancing CO2 and CH4 adsorption because of their cost-effectiveness, lightweight nature, and controllable physiochemical properties7,8,9. Additionally, the enhancement of ultramicropores through careful precursor selection, precise activation methods, and heteroatom doping, particularly nitrogen, has proven to be effective in improving CO2 adsorption9,10,11,12,13,14. Moreover, the promotion of unconventional natural gases like Land Fill Gas and Shale Gas is necessary to achieve high-quality pipelines (> 90% CH4)15,16,17,18. To achieve high CH4 adsorption capacity and effective separation from nitrogen (N2), the development of microporous adsorbents is essential12,13,19. Ultramicroporous carbon compounds are well-suited for CH4 separation from CO2 because of the unpredictable nature of CH4 and N2 gases, as well as polarization differences between them (2.59A vs 1.74A)20. Therefore, the pursuit of straightforward, cost-effective methods and equipment is critical in the development of carbon adsorbents, with mazes bulk materials standing out as a promising option as functionalized carbon precursors.

Various carbon based materials have been investigated for their CO2 adsorption capabilities21,22,23,24. For instance, the carbon structure obtained from the crab shell activated by KOH, at a pressure of 1 bar and a temperature of 298 K, has approximately exhibited a CO2 adsorption capacity of 4.37 mmol/g and CO2/N2 selectivity of 23.125. Similarly, Algae–derived carbon, activated by KOH, showed selective CO2/N2 adsorption, with an adsorption capacity of 4.5 mmol/g and a selectivity of 10 at 298 K and 1 bar for CO2 gas26,27,28,29. In general, it can be observed that the typical CO2 adsorption capacity falls within the range of 2–5 mmol/g, with a CO2/N2 selectivity of 10–30 at 298 K and 1 bar30,31,32. However, it's worth noting that research into carbon materials derived from biomass for CH4 adsorption has been relatively limited.

Various criteria including (i) abundance of raw materials, (ii) composition with respect to target trials, (iii) operational flexibility, and (iv) precursor costs with accumulated operating costs affect the selection of raw materials for the production of carbon structures.

Due to the increased abundance of biomass and advantages such as high carbon content, the presence of other heteroatoms including N2, S, P, operational versatility and cost-effectiveness, lead to an increase in scientific research in the field of application of biomass. There are several strategies for converting biomass into carbonaceous material. For example, direct thermal decomposition of biomass in an inert atmosphere followed by activation. The activation step can be physical activation, using reactive gas flow and high temperature, whose role is to create porosity and increase the surface of the resulting material. In addition to this method, chemical activation can also be used. For the latter, the biomass is mixed with compounds such as KOH, ZnCl2, H3PO4, followed by pyrolysis in an inert atmosphere. Once the heat treatment is complete, the activator is removed, leaving a highly porous structure that is desirable in a wide range of applications. CS structure is similar to anodic aluminum oxide, therefore has controlled porosity and is used as a mold to produce carbon with controlled porosity by guest and host methods.

In this study, we employed functionalized nanoporous carbon derived from CS for the adsorption and selective separation of CO2/CH4 over a pressure range of 1–10 bar. We systematically investigated various parameters, including activation time, activation temperature, and the ratio of KOH to CS activating agent. The nanoporous carbons were synthesized by carbonization in the vicinity of N2. Finally, we amine functionalization the optimized sample based on the results obtained from adsorption selectivity tests. The outcomes of this study are particularly useful for environmental applications, addressing the need for effective CO2 capture and reduction of greenhouse gases.

Experimental section

Materials

We utilized Iranian crab shell as the primary raw material for preparation of CSs. Chemical reagents including Hydrochloric acid (HCl, 37%), Potassium hydroxide (KOH), and Ethylenediamine (EDA) were purchased from the Merck Corporation (Darmstadt, Germany). High purity carbon dioxide (CO2, ≥ 99.999%) and methane (CH4, ≥ 99.999%) used in this study were obtained from Roham Gas Company (Tehran, Iran).

Synthesis of CSs

Carbon nanostructures obtained from crab shells were synthesized through the following process steps, as illustrated in Fig. 1. First, the external hard shells of the crabs were meticulously cleaned and washed, then dried at room temperature for 24 h. The dried samples were placed into a tubular furnace, where they underwent calcination under air flow at 350 ℃ for a duration of 1 h for the chitin-deproteinization process.

Figure 1
figure 1

Schematic of the synthesis of amine-functionalized CS.

The next step was Carbonization. In this phase, carbon was placed on the surface of the calcined CS using the chemical vapor deposition (CVD) method. The sample was carbonized in a furnace, with acetylene flowing at a rate of 200 ml/min and nitrogen at a rate of 50 ml/min (resulting in a total flow rate of 250 ml/min). Carbonization was carried out for different reaction times at a temperature of 500 ℃. The samples were then cooled to ambient temperature under nitrogen gas as an inert atmosphere.

In the next step, the carbonized samples were activated at different temperatures and different mixing ratios with KOH for 1 h under a nitrogen flow, with a flow rate of 150 ml/min. Then the samples were mixed with 1 M HCl and stirred for a duration of 4 h at 90 ℃ temperature. This step was conducted to eliminate any remaining unreacted KOHs and potassium compounds from the nanostructured sample. Subsequently, the mixture was filtered and rinsed with distilled water to neutralize its pH. The resulting samples were then placed in a vacuum oven for drying at 90 ℃, a process that spanned 42 h. Finally, the optimized sample based on the selectivity results was functionalized with amine. The synthesized adsorbents were designated as CS-x-y-z, where ‘x’ denotes the duration of the carbonization process (1, 2, and 5 h), ‘y’ represents the weight ratio of KOH/CS (2, 4), and ‘z’ indicates the temperature of the activation process (700 and 900 ℃) (refer to Table 1 for details).

Table 1 Synthesis conditions of carbon nanostructures derived from CS.

Synthesis of amine-functionalized CSs

Given that the CS-2-2-900 sample exhibited the highest adsorption rate among all samples, it was selected for functionalization. Initially, the CS-2-2-900 sample is oxidized with nitric acid vapor. To accomplish this, the prepared CS nanocarbon was placed in a heated reactor set at 125 ℃. Concentrated nitric acid was loaded into a round bottom flask, which was then heated to 125 ℃ and stirred for 24 h. Subsequently, the oil bath heater was turned off and the reactor heater was deactivated after 1 h to dry the activated CS-2-2-900. The oxidized CS-2-2-900 samples were then retrieved from the reactor.

In the subsequent step, Ethylenediamine (EDA) was employed for the functionalization of the oxidized CS. To carry out this process, EDA was placed in a heated reactor set at 165℃. The oxidized CS was added to the EDA, and the reaction continued for 8 h. Afterward, the oil bath heater was switched off, and 1 h later, the reactor heater was turned off to dry the functionalized CS. The amine-functionalized CS is denoted as FCS-2-2-900.

Adsorption experimental setup

An internal volume setup is illustrated in Fig. 2, which was employed for gas adsorption. This setup allowed us to measure the adsorption of CO2, H2, CH4, and N2 gases at 25 ℃ temperature and pressure range of 1–10 bar. The adsorption process commenced by weighing a specific quantity of adsorbent, which was then poured into the adsorption cell. A heater supplied the necessary temperature, and a vacuum pump established the required vacuum pressure. High-pressure helium (≥ 50 bar) was then introduced into the system. The unwanted molecules adsorbed by the sample were removed by the pressure–temperature swing method, conducted under vacuum pressure and at a temperature of 200 ℃. Subsequently, the vacuum pump and heater were deactivated after a 4 h period, allowing the cell to gradually cool until it reached the temperature of adsorption equilibrium. A circulator was employed to maintain the temperature of both the adsorption cell and the gas. To determine the equilibrium gas adsorption capacity on the adsorbent, the cell’s pressure was adjusted to the desired level by opening V-1/4 and V-5 while keeping V-6 closed. Upon opening V-6, the specified gas entered the adsorption cell, reducing its pressure. Once the adsorption cell reached an equilibrium state, the difference between the equilibrium and initial pressures was recorded, forming the basis for volumetric adsorption calculations. This pressure drop was attributed to gas adsorption on the sample and the dead volume of the setup. To minimize the impact of dead volume on the calculations, helium adsorption was used as a reference, assuming that helium molecules did not adsorb onto the sample.

Figure 2
figure 2

Schematic diagram of the in-house gas adsorption rig33.

Results and discussion

Nano-adsorbents characteristics

To investigate and identify the functional groups present in the activated CS samples, we utilized the FTIR spectrum within the adsorption band range of 400–400 cm−1, as depicted in Fig. 3A. In Fig. 3A, all samples show a broad peak in the region of 3421–3439 cm−1, corresponding to N–H and O–H groups of chitin. Notably, this peak is less pronounced for the CS-5 sample, potentially due to gradual increase in the activation temperature, leading to the reduction of such groups34,35. The activated CS samples displayed a distinct peak around 1710 cm−1, which is attributed to C = O stretching vibrations35,36. Peaks at 1597, 1629 cm−1 confirm the presence of acetyl groups. Additional peaks associated with calcium carbonate and the stretching vibration of CH3 of CH3NHCOCH3 are observed at approximately 1400 cm−1. Furthermore, a small broad peak at 1070 cm−1 suggests the presence of phosphate groups from calcium phosphate. Moreover, the adsorption bands in the 603–1422 cm−1 range confirm the presence of CH3, CH2 and CH groups, along with primary and secondary OH groups attached to the pyranose ring. On the other hand, within the 600–1400 cm−1 region, the peaks overlap and correspond to C-N stretching vibrations, as well as in-plane and out-plane deformation of C-H and N–H37. Notably, the intensity of these peaks diminishes with increasing activation temperature, providing further evidence of the presence of N–H and C-N species in the prepared CS samples, and suggesting their removal with higher KOH consumption and activation temperature.

Figure 3
figure 3

(A) FTIR results of (a) CS-1-2-900, (b) CS-2-2-900, (c) CS-5, (d) FCS-2-2-900; (B) XRD of (a) CS, (b) CS-2, (c) CS-2-2-900; (C) TGA curves of CS-2-2-900; (D) Raman result of CS-2-2-900.

The crystalline properties and purity of porous nanocarbons of CS-1, CS, and CS-1-2-900 were investigated by XRD analysis, with results presented in Fig. 3B. In the XRD patterns of samples CS-1 (Fig. 3B–a) and CS (Fig. 3B–b), crystal planes (012), (104), (110), (113), (202), and (018) are appeared at 2Ɵ angles of 23.0°, 29.3°, 35.9°, 39.3°, 43.1°, and 47.5°, respectively. However, in Fig. 3B–c, representing the CS-1-2-900 sample after the activation process, most of the peaks have either been eliminated or their intensities reduced. Notably, two peaks appear in the of 2θ region of 45°, confirming the crystalline or quasi-crystalline nature of carbon structure. The TGA results of CS-derived adsorbents and KOH activators are presented in Fig. 3C. The TGA curve reveals a decomposition process occurring in three distinct stages. The initial weight loss, observed in the temperature range of 50–150 ℃, is attributed to the evaporation of water attached to the surface and low-weight, volatile molecules38. The second and main stage of weight loss occurs within the temperature range of approximately 200–350 ℃. This weight loss is associated with the decomposition of hydroxyl and acetamide functional groups found in the N-acetylglucosamine chains38. Thermal decomposition of the major portion of the crab sample is completed at around 600 °C. Beyond this temperature, corresponding to the carbon structure, only gradual charring processes occur, representing the third stage of decomposition, which continues up to 900 ℃38, and any remaining residue is attributed to ash.

Raman spectroscopy analysis was employed to further investigate the structural characteristics of the CS-2-2-900 sample, as illustrated in Fig. 3D. The Raman data reveals two distinct peaks. The first peak, denoted as D band, represents the irregular carbon structures and is observed at 1323 cm−1 ref10,12,39. The second peak, identified as G bands, is associated with the sp2 carbon structure of graphite layers and appears at 1582 cm−1 ref12,39. Additionally, a peak indicative of pseudo-graphene structure (2D band) appeared in the region around 2900 cm−1, showing the presence of a graphene structure with a substantial number of layers.

Figures 4A–C depict the morphology of CSs. SEM images reveals that the surface of the fractured particles exhibits pronounced porosity, irregularity, a bumpy texture, and a honeycomb-like structure. This features can be attributed to the chemical nature of the activating agent, KOH37. Furthermore, the particles do not exhibit a uniform size distribution. In Fig. 4D, the particle size distribution (PSD) of the CS-1-2-900 sample is presented, obtained from SEM images. Approximately 50 individual particles within the image were measured for this analysis. Notably, particles with a size falling within the range of 31–40 nm display the highest frequency.

Figure 4
figure 4

FESEM images of (A) CS, (B) CS-2, (C) CS-1-2-900, (D) PSD curves of CS-1-2-900.

The texture properties of the CS, CS-2, CS-1-2-900, and CS-2-2-900 samples were investigated by nitrogen adsorption/desorption analysis. Initially, CS and CS-2 were examined. The results of nitrogen adsorption/desorption isotherms revealed that they are type III isotherm (Fig. 5A, B). In this type of isotherm, adsorption at low pressures is minimal and it contains a mesoporous structure. This occurs when the interaction between the adsorbent and adsorbent is weak. In addition, their residual loops exhibit a H3 type ring, typically created by plate-like particles and slit-like pores.

Figure 5
figure 5

N2 Adsorption/ desorption isotherm and BJH-plot of the (A) CS (B) CS-2, (C) CS-1-2-900, (D) CS-2-2-900, (E) FCS-2-2-900.

In contrast, CS-1-2-900, CS-2-2-900, and FCS-2-2-900 samples exhibit type I isotherms with hysteresis loop of H1, which indicates a significant increase in adsorption at very low pressures (Fig. 5C, D and E). Table 2 shows the textural properties of the CS, CS-2, CS-1-2-900, CS-2-2-900, and FCS-2-2-900 samples. It is evident that activation with KOH and an increase in reaction temperature result in an enhanced surface area (914.85 m2/g) and pore volume (1.1 cm3/g) of the CS-2-2-900 sample. However, the pore diameter (4.82 nm) is reduced, classifying it as a mesopore (based on the standard IUPAC definition, which categorized pore sizes into microspore (< 2 nm), mesopore (2–50 nm), and macrospore(> 50)40,41,42,43,44,45). It was also observed that the surface area decreased after functionalization. Another ciritcal factor pertaining to the porosity of prepared adsorbents is the Barrett–Joyner–Halenda (BJH) plot, as shown in Table 2 and the internal curves of Fig. 5A–E.

Table 2 Porous structure parameters of CS samples.

As can be observed, the BJH value for the CS, CS-2, CS-1-2-900, CS-2-2-900 and FCS-2-2-900 samples is 0.163, 0.145, 0.197, 0.849, and 0.440, respectively. The BJH value is a parameter used to characterize the pore size distribution in a material. It is calculated based on the desorption branch of a nitrogen adsorption isotherm, using the Kelvin equation and the thickness of the adsorbed nitrogen film. The BJH value is directly related to the pore size distribution in a material. A higher BJH value indicates the presence of larger pores, while a lower BJH value indicates smaller pores. Therefore, the BJH value provides information about the size and distribution of pores in a material, which is important for understanding its porous structure. In general, materials with a higher BJH value have a more open and interconnected pore structure, allowing for greater access to the internal surface area. On the other hand, materials with a lower BJH value have a more closed and restricted pore structure, which may limit the diffusion of molecules and affect their performance in various applications. Overall, the BJH value plays a crucial role in characterizing the porous structure of materials and can provide valuable insights into their physical properties and performance.

The XPS technique provided quantitative information regarding the functional groups and surface elements of samples, as displayed in Fig. 6. The XPS survey spectra (Fig. 6), revealed five prominent peaks at 284, 398, 532, 134, and 104 eV corresponding to C 1s, N 1s, O 1s, P 2p, and Si 2p, respectively. Moreover, Table 3 lists the C 1s, N 1s, O 1s, P 2p, and Si 2p content of the CS-2-2-900 sample.

Figure 6
figure 6

XPS survey, C 1s, N 1s, O 1s, P 2p, and Si 2p spectra of CS-2-2-900 sample.

Table 3 The elemental concentration of surface functional groups of the CS-2-2-900, determined by XPS method.

CO2 and CH4 adsorption by CSs

The adsorption isotherms of CO2 and CH4 at 25 ℃ and 10 bar were investigated, with the results depicted in Fig. 7. As can be seen from the Fig. 7, the gas adsorption behavior of CSs exhibits distinct variations at low-pressure and high-pressure regimes. As the pressure increases, the CO2 and CH4 adsorption capacity of all CSs are increased. This increase can be attributed to the filling mechanism of gas adsorption within the pores of CSs. The FCS-2-2-900 sample demonstrate the highest adsorption rate for both gases.

Figure 7
figure 7

Equilibrium (A) CO2 and (B) CH4 adsorption capacity of different CS sorbents at 25 C and pressures ranging from 1 to 10 bar.

Contrary to the claims of articles that gas adsorption is primarily facilitated by micropores with diameters below 1 nm at low pressures46,47,48, the present study reveals no direct correlation between adsorption quantity and micropore size. This discrepancy arises because the FCS-2-2-900 sample possesses a mesoporous structure. Further study shows that the adsorption capacity is influenced not only by the tissue properties of the adsorbent but also by the functional groups of the adsorbent surface. Those functional groups play a significant role in enhancing the adsorption of polar gas molecules, such as CO2 and CH449,50,51,52.

It is plausible that a substantial amount of surface impurities on the carbon structure has facilitated strong interactions between gas molecules (CO2 and CH4) and the walls of the carbon nanoadsorbent, particularly at low pressures. Moreover, functionalization with amines has led to a reduction in pore size, thereby intensifying the interaction forces between the pores and CO2 molecules, resulting in a notable enhancement in CO2 adsorption capacity. In summary, crab shell waste proves to be a valuable and sustainable resource for the production of nanoporous adsorbents on an industrial scale. It offers an effective solution to address the challenges associated with natural gas purification.

CO2/CH4 selectivity by ideal adsorbed solution theory (IAST)

In this study, in addition to examining the equilibrium gas adsorption capacity, gas adsorption selectivity was investigated (refer to Fig. 8). The Ideal Adsorbed Solution Theory (IAST) method, proposed by Myers and Praunitz, was employed to investigate the CO2 selectivity of CS samples at various mole fractions for the separation of CO2/CH4 gases. This theory operates under three key assumptions: (1) the binary mixture of gases is considered as an ideal solution at operating pressure and temperature, (2) thermodynamically, the adsorbent has no influence, and (3) the adsorbed phases and gases share similar chemical potential53. Eq 1 is used to express the selectivity of one gas over another gas in a binary mixture53.

$$S = \frac{{\frac{{x_{1} }}{{x_{2} }}}}{{\frac{{y_{1} }}{{y_{2} }}}}$$
(1)

where the parameters S represents selectivity, and x and y denote the mole fraction in the solid and gas phases, respectively.

Figure 8
figure 8

Curves of the CO2/CH4 selectivity at 1–10 bar pressure range for the (A) CO2 (10%):CH4 (90%) and (B) CO2 (15%):CH4 (85%).

In order to investigate the interaction of CO2 and CH4 gas molecules with the prepared CSs, Langmuir (Eq. 2), Langmuir–Freundlich (LF or Sips) (Eq. 3), and dual-site Langmuir–Freundlich (DS LF) (Eq. 4) isotherms were employed, with the experimental data fitted using Matlab’s Toolbox.

$$\text{q}={\text{q}}_{{\text{m}}_{1}}\frac{{\text{B}}_{1}\text{P}}{1+{\text{B}}_{1}\text{P}}$$
(2)
$$q = q_{{m_{1} }} \frac{{B_{1} P^{{{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 {n_{1} }}}\right.\kern-0pt} \!\lower0.7ex\hbox{${n_{1} }$}}}} }}{{1 + B_{1} P^{{{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 {n_{1} }}}\right.\kern-0pt} \!\lower0.7ex\hbox{${n_{1} }$}}}} }},$$
(3)
$$q = q_{{m_{1} }} \frac{{B_{1} P^{{{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 {n_{1} }}}\right.\kern-0pt} \!\lower0.7ex\hbox{${n_{1} }$}}}} }}{{1 + B_{1} P^{{{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 {n_{1} }}}\right.\kern-0pt} \!\lower0.7ex\hbox{${n_{1} }$}}}} }} + q_{{m_{2} }} \frac{{B_{2} P^{{{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 {n_{2} }}}\right.\kern-0pt} \!\lower0.7ex\hbox{${n_{2} }$}}}} }}{{1 + B_{2} P^{{{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 {n_{2} }}}\right.\kern-0pt} \!\lower0.7ex\hbox{${n_{2} }$}}}} }}$$
(4)

In these equations, P (bar), q (mmol/g), and qm (mmol/g) represent the total gas pressure, adsorption capacity, and maximum adsorption capacity, respectively. Parameters B1 (1/bar) and B2 (1/bar) are affinity coefficients, while n1 and n2 show the deviation from the ideal homogeneous surface. The results of isotherms for CO2 and CH4 gases are reported in Table 4. According to the results of Table 4, the Langmuir–Freundlich model, with the highest R2 value, demonstrate a very good consistency with the experimental, outperforming the other two models. The model superior accuracy can be attributed to its ability to consider binary adsorption sites47. Therefore, it can be concluded that multilayer adsorption mechanisms primarily control gas adsorption in CSs, indicating that mesopores are the primary contributors to CO2 and CH4 gas adsorption by CSs, while micropores have a lesser impact54. Moreover, the selectivity of CO2 for the functionalized sample is higher than the selectivity of CH4 in both investigated concentrations. As the pressure increases, driven by CO2-CO2 joint interactions, the selectivity of CO2 by the FCS-2-2-900 sample is further increased. This higher selectivity of CO2 over CH4 points to the possible use of FCS-2-2-900 in practical CO2 capture and separation systems.

Table 4 The extended Langmuir and Sips parameters for CO2 and CH4 at 25 C and 1–10 bar pressure range.

Comparison of the CO2/CH4 selectivity nano-adsorbents of this work with other adsorbents

In this research, highly cost-effective and rapidly synthesized nano-adsorbents were employed to assess the CO2/CH4 selectivity. The results demonstrated a substantial level of selectivity compared to other adsorbents reported in the literature, as detailed in Table 5.

Table 5 Comparison of the CO2/CH4 selectivity of the proposed nano-adsorbents with other adsorbents in the literature.

DFT calculations

In this section, we delve into the electronic structure aspects that influence the CO2 selectivity in the CO2/CH4 binary system. We utilized density functional theory (DFT) for geometry optimizations and electronic structure calculations, a method known for accurately capturing interactions between CO2 or CH4 and this type of adsorbent4,58. Specifically, we employed the Dmol3 code59 with the Perdew-Burke-Ernzerhof (PBE) GGA functional and augmented it with Grimme's PBE-D approach60 to account for long-range van der Waals effects. Our calculations were conducted using a numerically tabulated basis set of double-ζ plus polarization (DNP) quality, and DFT semi-core pseudopotentials (DSSP) to effectively model the electron–ion interaction through a single effective potential. The adsorption energy of the molecules on adsorbent systems was determined using a following equation:

$$Eads_{(CO2 \, or \, CH4)} = E_{CO2 \, or \, CH4 \, + G} - E_{G} - E_{CO2 \, or \, CH4}$$
(5)

where EG, E CO2 or CH4 and E G+ CO2 or CH4 represent the total energies of the clean adsorbent system, the free CO2 or CH4 molecule, and CO2 or CH4 adsorbed on the adsorbent, respectively. The energy band gap (Eg) was calculated as the barrier between HOMO (the highest occupied molecular orbital) and LUMO (the lowest unoccupied molecular orbital), and the results are reported in Table 6. Additionally, the chemical potential (μ) was obtained using the following equations:

$$\mu \, = \, 0.5 \, \left( {E_{HOMO} + E_{LUMO} } \right)$$
(6)
Table 6 Adsorption energies (Ead), HOMO–LUMO energy gap (Egap) and chemical potential (µ) of the complexes including CO2 or CH4.

In our research, an adsorbent has been designed based on the experimental data. Figure 9 and Table 6 illustrate that the most relevant atoms (N, O, Si, P, and H) in the optimized structure of the carbonic adsorbent carry positive or negative charges. These atoms, in addition to the morphological optimization, tuned the interaction mechanism to improve the selectivity for the CO2/CH4 separation process. Figure 10 and Fig. 11 depict the interaction mechanism of these two gases over different active sites on the adsorbent’s surface, respectively. It’s evident from these figures and the adsorption energies that non-covalent forces play a key role in the adsorption of these gases.

Figure 9
figure 9

The most stable configuration of the modeled adsorbent. Mullikan charges on target atoms of active sites are reported in |e| unite by + /− signs.

Figure 10
figure 10

The optimized complex of CO2 with active site of (A) N-pyrrolic, (B) N-pyridinic, (C) N-Si, (D) N-Si–O, (E) P-O and (F) COOH. The minimum equilibrium distances are reported.

Figure 11
figure 11

The optimized complex of CH4 on active site of (A) N-pyrrolic, (B) N-pyridinic, (C) N-Si, (D) N-Si–O, (E) P-O and (F) COOH. The minimum equilibrium distances are reported.

The general results from the Table 6 and Table 3 indicates that pyrrolic sites, which are the most abundant N species in the structure of the adsorbent, play the most important role in the adsorption and separation process of the CO2 and CH4. Specifically, pyrrolic sites exhibits a higher adsorption energy for CO2 (−12.43 kJ/mol) compared to CH4 (−9.55 kJ/mol), indicating the formation of a more stable complex with CO2 at this active site.

The energy band gap for the adsorbents is approximately 0.158 eV, and the complexes fall within a range of 0.154–0.158 eV. Notably, these values are minimized in their corresponding system when both CO2 and CH4 are introduced over pyrrolic sites on the adsorbent. Additionally, the chemical potential (μ) as the quantum chemical descriptor61 was calculated. Given the data from Table 6, the values of chemical potential for the pyrrolic complexes (−0.165 for CO2 and −0.158 for the CH4 adsorption) highlight that this active site is the most reactive region for adsorbing these gases. The data also reveal that CO2 adsorption results in a more negative chemical potential than that of CH4, indicating a more stable complex formation with CO2 on this site, aligning with the experimental results. The findings emphasize that the selectivity observed experimentally is primarily attributed to the pyrrolic sites, known for their high reactivity in N-doped structures62.

The data also reveal that CO2 adsorption results in a more negative chemical potential than that of CH4, indicating a more stable complex formation with CO2, aligning with the experimental results. The findings underscore that the selectivity observed experimentally is primarily attributed to the pyrrolic sites, known for their high reactivity in N-doped structures.

Furthermore, the carboxylic (COOH) functional group also exhibits potential for enhancing the selectivity of CO2 over CH4. The adsorption energy values for CO2 are more negative than those for CH4 on the COOH functional group, making it a critical factor in the separation of CO2 in binary samples.

In summary, computational modeling suggests that both pyrrolic and carboxylic groups are the most important active sites for enhancing the selectivity of CO2 over CH4 in binary samples. The electronic structure of the adsorbent plays a crucial role in this process, and optimizing it through adjustments in pore volume and diameter can lead to improved efficiency. This study underscores the accuracy of DFT-GGA in representing the interaction between CO2 or CH4 and the studied adsorbents.

Conclusion

In conclusion, this study investigated the selective adsorption of CO2/CH4 using porous nanocarbons derived from crab shells through a chemical activation method. Various activation parameters, including activation time, activation temperature, and the ratio of KOH to the crab shell activating agent were explored. Among the tested conditions, the CS-2-2-900 sample, characterized by an activation time of 1 h, an activation temperature of 900 ℃, and a ratio of 2:1 exhibited the highest gas adsorption capacity. This sample not only demonstrated exceptional surface area of 914.85 m2/g but also showcased favorable pore characteristics with a volume of 1.1 cm3/g and a mean diameter of 4.82 nm. Furthermore, the introduction of ammonia as a functionalizing agent significantly enhanced the selectivity. Calculations using the Myers and Praunitz theory revealed that among all samples, the FCS-2-2-900 sample displayed the highest selectivity rate 18.99 under room temperature and pressures up to 10 bar.

Utilizing DFT calculations, this research was able to pinpoint the key active sites involved in the adsorption process. Pyrrolic nitrogen and carboxylic groups were identified as playing crucial roles in improving the separation of CO2 from CO2/CH4 mixtures. These findings underscore the potential of crab shell-derived porous nanocarbons as a promising and cost-effective adsorbent for selectively capturing CO2. Their nitrogen content, high porosity, stability, and economic efficiency make them a valuable resource for addressing CO2 capture challenges.