Introduction

In 2015, at the Paris Climate Change Conference, countries set a goal of "keeping the increase in global average temperature well below 2 °C above pre-industrial levels, and making efforts to limit the temperature increase to 1.5 °C above pre-industrial levels." To achieve this goal, the application of Carbon Capture, Utilization, and Storage (CCUS) technology has become crucial. The effective development and utilization of coalbed methane (CBM) not only has significant implications for optimizing the energy structure but also plays an essential role in the implementation of carbon utilization and sequestration1,2,3.

Coalbed methane (CBM) is an associated resource produced during coal formation, mainly stored in the pore structure in adsorbed state. Its calorific value is 2 to 5 times higher than that of standard coal and produces almost no pollution after combustion, making it a high-quality and efficient clean energy source4,5. The world's CBM reserves are abundant, with an estimated total of over 255 trillion cubic meters, and China's CBM reserves surpass 30.05 trillion cubic meters, ranking the third-largest in the world, after Russia and the United States6. In 2023, China's CBM annual production surpassed 11.7 billion cubic meters, achieving new high for five consecutive years. However, due to the complex geological conditions of coal seams and the relatively low permeability in China, the development and utilization rate of CBM is lower compared to developed countries such as the United States and Canada7,8.

In recent years, with the proposal of Enhanced Coalbed Methane (ECBM) technology, the number of projects to inject gas into coal seam to improve CBM recovery has gradually increased. Numerous scholars9,10,11 have investigated the adsorption and desorption characteristics of different gases in coal seams, with the current focus primarily on CO2 and N2 injection, leading to the development of two branches of technology, CO2-ECBM and N2-ECBM. The core principle of CO2-ECBM technology is based on the differential adsorption of CO2 and CH4, utilizing CO2 to displace adsorbed CH4 and sequestering CO2 within the coal seam12,13,14,15. This technology was first applied in the San Juan Basin in the United States, where the recovery rate of CBM was increased by 1/3 after injecting over 300,000 tons of carbon dioxide into four CBM wells16. Masaji Fujioka17 conducted multiple injections of CO2 into CBM wells in the Ishikari Basin in Japan and observed that the injections indeed significantly enhanced the production of CH4. In 2010, China United CBM Corporation injected 233.6 tons of CO2 into the SX-001 well in the Qinshui Basin, which led to 2.45 times increase in the CBM recovery rate18,19. This has validated the feasibility of CO2-ECBM in the actual production process. On this basis, Busch A et al.20 carried out gas adsorption experiments on coal samples from the Silesian Basin under isothermal and high-pressure conditions, and found that the adsorption of CO2 by the coal body was greater than that of CH4 under high-pressure conditions, while the difference in adsorption between the two was not significant at low pressure. Reznik A A et al.21 observed through experiments that the displacement of CH4 in bituminous coal increases with rising pressure after the injection of CO2. Tu Y22 concluded that the yield of CH4 increases with increasing CO2 injection within a certain range of injection volume, and when the concentration of the CO2 component in the CO2 and CH4 mixture reaches more than 25%, the yield of CH4 is not affected by the amount of CO2 injected. However, some scholars23,24,25 have found that although injecting CO2 into coal seams can increase CH4 production, CO2 displacement of CH4 produces the phenomenon of adsorption and expansion of the coal matrix leading to a decrease in the permeability of the coal body. Reucroft et al.26,27 investigated the effect of CO2 adsorption on the swelling efficiency of coal matrix and found that the coal matrix swells by 2% to 3% at an injection pressure of 1 MPa, and the swelling effect increases with decreasing carbon content in the coal. Chen et al.28 investigated the deformation and expansion behavior due to gas adsorption in coal by molecular simulation and found that the expansion effect of the coal matrix is more significant at high pressure. N2-ECBM technology effectively solves the problem of coal matrix adsorption expansion in the displacement process. Compared with CO2-ECBM technology, the adsorption expansion and permeability loss caused by N2 adsorption are smaller. In 2012, Cao et al.29 conducted a high-pressure nitrogen injection test to increase CBM production in two property gas wells in the Yuwu well field, and the results showed that the daily gas production of the two wells increased by 1.2 times and 8.9 times, respectively. Tang et al.30 found that when the N2 concentration increased above 50 percent, it resulted in a 20 percent increase in the CH4 collection rate. Talapatra A and Halder S31 suggest that 1 volume of N2 can displace 2 volumes of CH4. Zhang et al.32 discovered through experimental tests that injecting N2 into saturated coal samples can increase the methane content in the free state by 12%.

With the development of computer science, scholars have found that the microstructural changes of complex systems can be investigated by molecular dynamics methods, and they are well adapted to large molecular aggregates such as coal33,34,35. In addition, the results of molecular simulation generally show consistent patterns for different coal molecular models, which proves the effectiveness of molecular simulation, and molecular simulation and traditional experiments can respond to consistent results36,37. Therefore, molecular simulation has become an important research tool to reveal the microscopic mechanism of adsorption and diffusion38,39,40,41. Dang Y et al.42 investigated the adsorption behavior of CO2 and CH4 in coal using density functional theory and molecular dynamics methods and found that the magnitude of adsorption capacity was related to the nitrogen- and oxygen-containing functional groups in coal. Zhang43 et al. demonstrated that the adsorption selectivity of CH4/CO2 was mainly related to the concentration of CO2 by simulating the competitive adsorption behavior of CH4/CO2 on coal molecules. Brochard et al.44 explored the relationship with coal matrix swelling in the binary system of CH4/CO2 and concluded that the magnitude of the swelling rate was mainly related to the molar ratio of CO2. Long et al.45 found that strongly adsorbing gases have the greatest influence on adsorption selectivity during competitive adsorption and that the magnitude of van der Waals forces and electrostatic potential energy are the main factors affecting adsorption. Hang et al.46 studied the adsorption-diffusion characteristics of CO2/N2/CH4 in coal, and revealed that the diffusion coefficients of the three gases existed in the relationship of CH4 > N2 > CO2. Gao et al.47 established the adsorption capacities and configurations of CH4, CO2, N2, and H2O molecules in coal, obtained the corresponding heat of adsorption and diffusion coefficients, and got the adsorption isotherms of single-component gases, moreover, the adsorption amount exists the law of H2O > CO2 > CH4 > N2. Liu et al.48 found that the diffusion coefficients were negatively correlated with the gas concentration and positively correlated with the temperature, and the diffusion activation energies of CO2, CH4 and N2 were CH4 > CO2 > N2 in the saturated adsorption state, which indicated that diffusion phenomenon was more likely to occur in the case of N2 and CO2 than in the case of CH4. However, Previous studies have focused on methane-free coal models to analyze the adsorption and diffusion properties of methane by single or multiple gases. While these studies have improved our understanding of the adsorption behavior of gases in coal seams, they have failed to adequately take into account the methane-containing adsorption coal model, which is more common under actual coal seam conditions, and more accurately reflect the true nature of coal seams.

In this paper, competitive adsorption of three gases, carbon dioxide, nitrogen and methane, in coal at different temperatures were analyzed by Grand Canonical Monte Carlo (GCMC) and Molecular Dynamics (MD) simulations, and the reasons for the adsorption variability of the three gases were discussed. A coal model containing methane adsorption was established through the adsorption data, and the role of different gas injection methods on the effect of CH4 diffusion was explored, and the changes in the pore structure of coal before and after gas injection were examined, which provides a certain theoretical basis for the development and application of the technology of injecting gas into the CBM to increase its production.

Modelling and methodology

Molecular modeling

Coal is a non-homogeneous, three-dimensionally highly cross-linked organic macromolecular aggregate with a complex and variable structure39. Therefore, if the structural properties of this macromolecular aggregate are to be understood in depth, it is necessary to understand not only the basic information it exhibits but also the kinetic features that can be expressed on the basis of this information. In molecular dynamics simulations, the choice of coal macromolecule model is related to the accuracy of the study. In the past eighty years, various types of coal macromolecule models have been continuously proposed by scholars, and the newer models are more capable of gathering the advantages of the previous ones, so the Qinggangping long-flame coal macromolecule model established by LI49 was selected as the research object for the study of the effect of CO2/N2 injection on the adsorption-diffusion effect of CH4 in this paper. The relevant parameters of the model are shown in Table 1.

Table 1 Structural parameters of the Long-flame coal plane model from Qinggangping.

The initial model (Fig. 1a) is first processed for geometry optimization and annealing optimization using the Forcite module, the smart algorithm is used for optimization, the optimization quality is selected as Fine, the annealing cycle is set to 10 times, the initial temperature of annealing is set to 300 K, and the temperature in the middle of the cycle is set to 500 K. The force field is selected as COMPASS, and the charge is calculated using the Forcefield assigned The charges were calculated and the electrostatic and van der Waals forces were calculated using Ewald and Atom based calculations respectively. Then the Amorphous Cell module was used to construct a cell model with seven long flame coal molecules as a basic unit and set periodic boundary conditions for it. Next, the geometrical optimization and annealing optimization were carried out for the established cell model, in which the electrostatic forces were calculated by Ewald method with an accuracy of 0.001 kcal/mol, and the van der Waals forces were calculated by Atom based method with the truncation radius set to 12.5 Å. The other parameter settings were the same as in the first round of optimization. Finally, 500 ps of NPT-based molecular dynamics simulation was carried out at 298 K to reach the equilibrium state, and the cell model of long flame coal was obtained as shown in Fig. 1b. The final cell parameters were a = b = c = 3.19 nm, α = β = γ = 90. The cell density was 1.13 g/cm3 which is smaller than that of the actual long flame coal due to the fact that the actual coal contains mineral elements such as Calcite, quartzite, kaolinite, etc., and the composition of these substances has less influence on the adsorption diffusion, and these factors can be disregarded, so it can be considered that the density of the constructed model is reasonable.

Figure 1
figure 1

Molecular modelling of coal and methane-containing coal.

Simulation parameters

Parameters for simulation of adsorption characteristics

The adsorption process of coal CH4, CO2, and N2 single-component injection as well as multi-component injection in equal proportions at different temperatures (298 K, 318 K, and 338 K) and pressures (0-10 MPa) was simulated using the Grand Canonical Monte Carlo (GCMC) method. This was performed using the Adsorption isotherm task item in the Sorption module. The adsorption module determines the adsorption behavior of the molecule by evaluating the potential energy of the global minimum point generated during the adsorption process of the system. The surface adsorption phenomenon simulated by the adsorption module essentially reflects the adsorption behavior of gas molecules in the coal pores. The number of simulation steps was set to 2 × 106 in order to bring the system to equilibrium. The first 1 × 106 steps were used to reach equilibrium and the second 1 × 106 steps were used for data acquisition. The force field and charge calculations as well as the electrostatic and van der Waals force calculations are consistent with the previous section.

In addition, the isothermal adsorption curves obtained from GCMC simulation is the number of gas molecules adsorbed within a single cell in moleculars/u.c, while the commonly used unit is mmol/g, so it needs to be converted by the following Eq. (1) 50.

$$\begin{array}{c}V={10}^{3}\times \frac{N}{{N}_{A}\times M}\end{array}$$
(1)

where, \(V\) is the adsorption volume, mmol/g; \(N\) is the number of gas molecules adsorbed in a single cell, moleculars/u.c; \({N}_{A}\) is Avogadro's constant, 6.02 × 1023; \(M\) is the unit mass of the cell, g.

Diffusion characteristics simulation parameter settings

When studying the effect of CO2/N2 on the diffusion behavior of CH4 in coal, the force field and charge settings for the molecular dynamics simulations are the same as those mentioned previously. After loading the methane molecules(Fig. 1c) into the cell model, the geometry optimization, annealing optimization, and then 500 ps of NVE system synthesis and 500 ps of NVT system synthesis dynamics optimization to make the cell relaxation, obtained a new cell structure, and the optimized model as a methane-containing coal model as shown in Fig. 1d. CO2/N2 gas was injected into the model at a temperature of 298 K and a pressure of 10 MPa as a model basis for promoting methane desorption from coal. Finally, Molecular Dynamics (MD) was used to calculate the CO2/N2 promoted CH4 diffusion model, and the data were collected using the NPT system synthesis, with a simulation time of 500 ps temperature set to 338 K and ambient pressure set to 4 MPa.

Results and discussion

Effect of CH4/CO2/N2 adsorption in coal under different temperature and pressure

Isothermal adsorption curves can visually evaluate the adsorption capacity of coal on gas molecules under different temperature and pressure conditions. Figure 2 shows the isotherms for single-component gases of CH4/CO2/N2 at pressures ranging from 0 to 10 MPa under different temperature conditions. The results show that the adsorption of the three gas molecules decreases with increasing temperature at different temperatures, Zhou et al.51 also found similar patterns in the adsorption experiments on Qinshui coalfield coal samples using CH4/CO2/N2. This is because the adsorption of gas molecules on coal molecules is mainly physical adsorption, which is provided by the intermolecular force, and the increase in temperature will reduce this adsorption force, the temperature will lead to the intensification of intermolecular thermal movement, which will make the gas molecules change from the adsorption state to the free state more easily, and the amount of gas molecules adsorbed on coal molecules will be reduced36,37.

Figure 2
figure 2

Isothermal adsorption curves of single-component CH4/CO2/N2 at different temperatures.

Under the same temperature and pressure conditions, the adsorption amounts of the three gas molecules increased with respect to pressure and showed a trend of CO2 > CH4 > N2. When the pressure is low (0-2 MPa), the adsorption amount of gas molecules increases rapidly with the rise of pressure, and the rate of increase of adsorption amount is CO2 > CH4 > N2. When the pressure rises (2-10 MPa), the adsorption amount of CO2 tends to be stabilized with the rise of pressure, while there is still a trend of increase in the adsorption amount of CH4 and N2 with the increase of pressure. This is attributed to CH4/CO2/N2 adsorption in coal as microporous filling, and the adsorption sites between the micropores are finite, as the pressure increases, the adsorption sites are gradually filled completely, finally, the adsorption and desorption form an equilibrium state, which is manifested as a stabilization in the adsorption curve. However, the interaction between CO2 and the micropores is stronger than that between CH4 and N2, resulting in CO2 being able to fill the micropores faster, showing the result that the CO2 adsorption curve firstly tends to stabilize, and the adsorption capacity of the three gases exists in the law of CO2 > CH4 > N2.

In order to investigate the effect of CO2/N2 on CH4 adsorption, the competitive adsorption of CO2 + CH4, N2 + CH4, and CO2 + N2 + CH4 systems with the same ratio of injected gases at 298K, 318K, and 338K was simulated, and the isothermal adsorption curves are shown in Fig. 3. The results show that the adsorption of gases increases with raising pressure and decreases with increasing temperature, following the same pattern as in the case of adsorption of single-component gases. Due to the different adsorption capacities of gas molecules, the molecules with strong adsorption capacity will inhibit the molecules with weak adsorption capacity during multi-component adsorption.

Figure 3
figure 3

Isothermal adsorption curves of multi-component CH4/CO2/N2 at different temperatures.

To compare more intuitively the inhibition effect on it, the adsorption of the gas at 298 K, 10 MPa (maximum adsorption) is given (Fig. 4). The amount of CH4 adsorbed in the CO2 + CH4 binary system was only 0.51 mmol/g, which was a 67.9% decrease compared to the amount during one-component adsorption, while the amount of CO2 adsorbed was 1.78 mmol/g, which was only a 30.7% decrease compared to one-component adsorption. At the same temperature and pressure conditions, the adsorption of CH4 in the N2 + CH4 system was 1.18mmol/g and that of N2 was 0.37 mmol/g, which decreased by 25.8% and 70.6%, compared to the single-component adsorption, respectively. In the CO2 + N2 + CH4 system, the adsorption amounts of CH4 and N2 were less than 0.3 mmol/g, and the adsorption amount of CO2 was 1.49 mmol/g. It can be found that although CO2 was at an absolute advantage in the competitive adsorption environment of the ternary gases, which greatly suppressed the adsorption of CH4/N2, the inhibition effect of CH4/N2 on the adsorption of CO2 was also great. The CO2 adsorption decreased by 42.0% compared with the original single-component adsorption. This is consistent with the adsorption capacity pattern obtained for single-component adsorption.

Figure 4
figure 4

Adsorption of gases at 298 K, 10 MPa.

Gas adsorption energy distribution

The amount of adsorption energy is related to the adsorption distance between molecules, thereby the wider the position occupied by the adsorption energy distribution curve, the greater the distance of adsorption interaction, the more adsorption sites exist, and the easier it is to be adsorbed. To better reveal the reasons for the degree of adsorption capacity of the three gases, the adsorption energy distribution curves of CH4/CO2/N2 under different systems are shown in Fig. 5. The occupation width of the adsorption energy distribution curves for CO2/CH4/N2 shows a law of CO2 > CH4 > N2, which is the same as that of the adsorption amount in single-component adsorption.

Figure 5
figure 5

Adsorption energy distribution curve.

Compared with the single-component adsorption energy distribution curves (Fig. 5a), the peaks of the adsorption energy distribution curves of each gas were shifted to different degrees after being in the mixed system. In the CO2 + CH4 system (Fig. 5b), the most concentrated range of CO2 adsorption energy shifted from − 7.35 to − 6.55 kcal/mol, while the most concentrated range for CH4 adsorption energy changed from − 4.65 to − 5.35 kcal/mol. That's because when CH4/CO2 competes for adsorption, a transient dipole moment is generated due to molecular motion, causing neighboring molecules to undergo transient polarization, which in turn enhances the transient dipole moment, and this coupling produces an electrostatic attraction so that CO2 and CH4 molecules are attracted to each other. However, CH4/CO2 has a difference in the location where they gather at adsorption equilibrium in coal, resulting in CO2 moving away from coal molecules and CH4 moving closer to coal molecules, thus changing the magnitude of the adsorption energy of the gas molecules on the coal. In the N2 + CH4 system (Fig. 5c), the most concentrated range of N2 adsorption energy shifted from − 3.95 to − 3.85 kcal/mol, while the adsorption energy range for CH4 shifted from − 4.65 to − 5.15 kcal/mol. This phenomenon can be attributed to the unique properties of Van der Waals forces, which are a type of weak but crucial intermolecular force. These forces exhibit characteristics that are dependent on the distance between molecules: they act as an attractive force when the molecules are relatively far apart, drawing them closer together; and as a repulsive force when the molecules are very close to each other, preventing them from getting too close. In essence, Van der Waals forces are characterized by "long-range attraction and short-range repulsion" 41. And the adsorption position of CH4 and N2 in the coal molecule is similar, so when the two compete for adsorption, the phenomenon that CH4 is close to the coal molecule but N2 is far away from the coal molecule will occur because of the repulsion between the molecules. When the system is CO2 + N2 + CH4 (Fig. 5d), the most concentrated range of adsorption energies of CO2, N2, and CH4 become − 6.85 kcal/mol, − 5.05 kcal/mol, and − 4.05 kcal/mol, respectively. This indicates that CO2 is positioned farther from the coal molecules, while CH4 and N2 are closer to the coal molecules. The reason for this distribution is that the intermolecular attractive forces between CO2 and N2 are greater than the repulsive forces between CH4 and N2 (as shown in Fig. 6). This also explains the reduction in the adsorption amount of CO2 during competitive adsorption. Specifically, the adsorption energy of CO2 decreases after competitive adsorption, making it more likely for CO2 to transition from an adsorbed state to a free state. In contrast, the adsorption amounts of CH4 and N2 are primarily influenced by the availability of adsorption sites within the coal matrix.

Figure 6
figure 6

Effect of molecular forces.

Effect of CO2/N2 injection on the diffusion effect of CH4

Diffusion of coal molecules in gas refers to the distribution of gas molecules in space due to thermal motion, which is a Brownian motion that occurs spontaneously without an external driving effect48. Mean square displacement (MSD) is an important physical quantity in the study of gas diffusion, representing the degree of deviation of the position of particles in the target system from its reference position after moving with time. It is defined in statistical mechanics as the system-mean at time t, with the expression (2):

$$\begin{array}{c}MSD=\underset{t\to \infty }{\mathit{lim}}\left\{\frac{1}{{N}_{t}}\sum_{i=1}^{N}{\left[{r}_{i}\left(t\right)-{r}_{i}\left(0\right)\right]}^{2}\right\}\end{array}$$
(2)

where: \({r}_{i}(t)\) and \({r}_{i}(0)\) denote the position vectors of the \(i\) particle at the moment and the initial moment, respectively, dimensionless; \({N}_{t}\) denotes the number of molecular dynamics steps; \(N\) denotes the number of adsorbate molecules; \(t\) denotes the simulation time, ps; \({t}_{0}\) denotes the initial moment.

The diffusion coefficient can be obtained from the mean square displacement curve of the gas and Einstein's method, where the Einstein's method is given by (3)52:

$$ D = \frac{1}{{6N}}lim\frac{d}{{dt}}\left\{ {\sum\limits_{{i = 1}}^{N} {\left[ {r_{i} \left( t \right) - r_{i} \left( 0 \right)} \right]} } \right\}^{2}$$
(3)

where \(D\) is the diffusion coefficient, Å2/ps.

A linear fit of the MSD curve gives the slope k. The diffusion coefficient formula can be simplified as (4):

$$\begin{array}{c}D=\frac{k}{6}\end{array}$$
(4)

Gas injection affects the effect of methane diffusion in coal, and the MSD curves of the effect of different injected gases on methane diffusion are shown in Fig. 7. The slopes of the MSD curves of methane after injection of different gases indicate that the presence of both N2 and CO2 promotes the diffusion of methane, but with different efficiencies, with a specific order of efficiency of N2 + CO2 > CO2 > N2 > Coal. Figure 8 presents the diffusion coefficients of methane after the injection of different gases. The diffusion coefficient of methane after injection of N2 for displacement is only 5.5% higher than that of the initial state without gas injection, whereas the diffusion coefficient of methane increases by 32.9% after injection of CO2, and the diffusion coefficient of methane grows the most when both gas mixtures are injected at the same time, reaching 53.4%. This is related to the nature of N2 and CO2 displacement, injection of N2 for diffusion mechanism is mainly injected into the N2 will reduce the partial pressure of methane in the coal seam microporous, thus promoting the desorption of methane, this process is a physical reaction, the desorption of methane is relatively low. The mechanism of CO2 injection is that CO2 and methane have different adsorption capacities in the coal seam, the adsorption capacity of CO2 in coal is much larger than that of methane, and after CO2 injection, it will compete with the methane in the coal seam to adsorb thus displacing the methane in the coal seam, and the methane will change from adsorption to the free state, the process involves the transfer of electric charge and the formation of hydrogen bonding, and the desorbed methane is relatively large in amount. Mixing and injecting the two gases can combine the advantages of both, which means that CO2 can desorb a large amount of methane, while N2, not reacting with the coal seam and characterized by low viscosity with low friction coefficient, can carry and diffuse the desorbed methane out of the pore space of the coal seam, resulting in the maximum diffusion coefficient of the mixed gases.

Figure 7
figure 7

Mean square displacement curve for methane.

Figure 8
figure 8

Mean square displacement curve for methane.

Relative concentration and velocity distribution

The relative concentration distribution is expressed as the ratio of the density of the target particle to its total particle density in the whole system for a particular direction, and analyzing the relative concentration distribution of the particles can obtain the specific transport of methane when it diffuses in the coal.

Curves of relative concentration distribution of different injected gases on methane diffusion are shown in Fig. 9. When the value of relative concentration distribution is greater than 1, it can be considered that there is a methane aggregation phenomenon within this distance. It can be seen from the figure that when there is no gas injection, the average value of concentration distribution at the CH4 aggregation is 1.156, while after the injection of N2, CO2 and N2 + CO2, the average value of concentration distribution of methane lifting out of the concentration distribution have different degrees of increase, which are 1.215, 1.236 and 1.263 respectively, indicating that after the injection of the gas, there is more methane diffused out of the adsorption state of coal matrix to enter into the pore space and the general relationship is N2 + CO2 > CO2 > N2 > Coal.

Figure 9
figure 9

Methane relative concentration profile.

The relative velocity distribution curve for methane is shown in Fig. 10, and the magnitude of the velocities is both positive and negative, indicating that the diffusion of methane occurs in all directions. The velocity magnitude relationship is consistent with the relative concentration distribution, N2 + CO2 > CO2 > N2 > Coal. N2 transported at a high speed in the front part of the coal seam pores, and it easily desorbed CH4, but as desorption proceeded, N2 could not be easily adsorbed in the coal matrix, and the number of molecules in the pores gradually increased, which produced a clogging phenomenon and led to a decrease in the rate of transport (Fig. 11a), so the average value of the methane velocity after injection of N2 increased slightly to only 0.081 Å/ps. The injected CO2 will be constantly displacement with adsorbed CH4, so the number of molecules in the pore space will form a process of change in which the amount of CO2 decreases and the amount of CH4 increases, the number of molecules is kept at a relatively low degree to ensure that the transportation process flows freely, but the rate of CO2 transport in the pore space does not appear to be very fast (Fig. 11b), and the average value of the methane velocity only grows to 0.086 Å/ps. Whereas the mean methane transport velocity increased significantly after injection of N2 + CO2, the synergistic effect of N2 and CO2, combining the advantages highlighted by N2 and CO2 in transport, the lower number of molecules in the pore space and the presence of high-speed flushing of N2, increased the transport of CH4 to a high-speed level (Fig. 11c). This also explains the size relationship of the relative concentration distributions, with faster methane transport indicating that the molecule is more prone to diffusion.

Figure 10
figure 10

Methane relative concentration profile.

Figure 11
figure 11

Transportation of gases through coal.

Changes in the pore size distribution of the coal body

The technology for enhancing coalbed methane production through gas injection consists of two key components. The first component involves injecting gases with different properties to convert adsorbed methane into a free state. The second component focuses on the interaction between the injected gas and the coal pore structure, leading to changes in the pores, which in turn affects the extraction process of methane in its free state. The previous section discussed the first component, and this section will delve into how the injected gas influences changes in the coal pore structure.

Coal matrices adsorb different gases causing different degrees of contraction or expansion, the degree of which affects the CH4 displacement effect. The proportional change in the distribution of each pore size of the coal body after the different injected gases were driven is shown in Fig. 12. Probe molecules with a gradient of 0.02 nm were used to measure the coal molecular pores, and the maximum pore measurement radius was 0.4 nm. The molecular dynamics radii of N2, CO2, and CH4 are 0.182, 0.165, and 0.19 nm, respectively, and pores smaller than this radius are inaccessible to the corresponding gas molecules and are called inaccessible pores. When the pore radius is larger than the molecular radius, the relevant molecules can enter the pore, which is called accessible pore. The results of CH4 displacement by different injected gases were studied in this paper, so the molecular radius of CH4, 0.19 nm, was chosen as the dividing line between accessible and inaccessible pores.

Figure 12
figure 12

Pore size distribution curve.

Figure 13a represents the methane fugacity within the coal seam pores under the condition of no gas injection, and when N2 was injected to drive the displacement, the proportion of accessible pores increased compared to the initial CH4-containing adsorption model, while in the inaccessible pores, the peak pore radius decreased from 0.074 to 0.073 nm, and the peak percentage increased from 4.933 to 5.106%, suggesting that a few new inaccessible pores were created. The reason for this is that the process of CH4 displacement by N2 mainly relies on partial pressure, meaning that CH4 originally adsorbed in accessible pores will diffuse out of the pores due to the pressure difference, making the original CH4 adsorption location vacant, which leads to smaller pores under matrix pressure, and at the same time generates a redistribution of the coal matrix, making new ultra-tiny pores appear in the places of low density, around the pores that have become smaller (Fig. 13b), these ultra-tiny pores are inaccessible pores, resulting in a shift of the peak curve to the left and an increase in the peak value. The peak radius decreases from 0.074 to 0.071 nm after CO2 injection, which compared to the N2 injection for displacement became more obvious, whereas the peak occupancy increases from 4.933 to 5.043%, smaller than the increase in the amount when N2 injected. Because the adsorption capacity of CO2 in coal is much larger than that of CH4, it will compete with CH4 for adsorption during the process of displacement, and more CO2 will enter into the larger pores where CH4 was originally adsorbed, so that the pressure within the pores is different from that between the matrix, and the pore-expanding effect exists, causing the expansion of the coal matrix at the same time, and similarly after the expansion of the coal matrix occurs, the low-density places around the expansion will produce ultra-tiny After the expansion of the coal matrix, the ultra-micro pores will be generated in the low density around the expansion (Fig. 13c), but the expansion of the coal matrix is an overall effect, so the density is higher compared to the injection of N2, so the number and radius of the ultra-micro pores generated are smaller than that of the results of the injection of N2 alone. When N2 + CO2 was injected simultaneously, the peak radius increased to 0.079 nm and the peak occupancy increased to 5.096%. The reason for this phenomenon is that the simultaneous injection of N2 and CO2 will combine the replacement mechanism of the two, and the N2 transport rate is fast, which will take away the CH4 displaced by the CO2, so that the pressure difference between the pore space and the transport channel increased, which promotes the process of CO2 entering the CH4 pore space, so that two pore change processes are generated in the coal (Fig. 13d). One is the pore expansion effect of the pores after adsorbing more CO2, which leads to the ultra-small pores produced by the expansion of the coal matrix, and the other is the shrinkage effect in the pores of the unabsorbed gas caused by the pressure difference, which produces the accessible pores to become inaccessible pores, especially the inaccessible pores with large pore sizes, which results in the ratio of inaccessible pores and pore diameters exceeding those of the inaccessible pores of the non-driven coal seams, and the ratio of accessible pores is slightly smaller than that of the coal seams of the undriven coal seams. This results in an increase in the proportion and diameter of inaccessible pores after displacement compared to the inaccessible pores before displacement. Meanwhile, the proportion of accessible pores becomes slightly smaller than that of the coal layer prior to displacement.

Figure 13
figure 13

Mechanisms of coal pore size changes.

In the process of gas injection and displacement of coal seams, due to the different physicochemical properties of the gas molecules, the deformation of the coal body containing gas is generated, which has a certain effect on the pore space and volume, which is the volume of the pores in the coal matrix is affected by the deformation of the coal body, and the deformation of the coal body leads to the contraction or expansion of the coal pores resulting in a change in the porosity53. The porosity is expressed as (5):

$$\begin{array}{c}\varphi =\frac{{V}_{P}}{{V}_{b}}=1-\frac{{V}_{s0}+{\Delta V}_{s}}{{V}_{b0}+{\Delta V}_{b}}\end{array}$$
(5)

where \({V}_{b}\) is the total coal volume; \({V}_{p}\) is the pore volume of coal; \({V}_{s0}\) is the initial coal matrix volume; \({\Delta V}_{s}\) is the coal matrix volume change; \({V}_{b0}\) is the initial coal volume; \({\Delta V}_{b}\) is the coal volume change, All above units are Å3.

Figure 14 shows the pore distribution of accessible pores with a radius greater than 0.19 nm in the coal matrix pores. For ease of analysis, pores with a radius of 0.19–0.39 nm are defined as small pores, pores with a radius of 0.39–0.69 nm are defined as medium pores, and pores with a radius greater than 0.69 nm are defined as large pores in this section. The porosity of the coal matrix after displacement by various gas injection methods is shown in Table 2. When N2 is used for displacement, the porosity of the coal matrix increases compared to the initial system, from 4.48 to 4.88%. Looking at the pore size distribution, the proportion of small pores in the coal decreases from 85.40 to 83.89%, while the proportion of medium and large pores increases. The medium pores increase from the initial system's 8.76% to 10.06%, and the large pores increase from 5.84 to 6.03%. The injection of N2 improved the distribution of coal matrix pore size, increased the proportion of medium and large pores, promoted gas transportation efficiency in coal, and increased the permeability of the coal matrix. The porosity of the coal matrix decreased to 3.55% after CO2 was added for displacement, and the proportion of small pores increased to 87.09%, the proportion of mesopores increased to 9.03%, and the proportion of macropores decreased to 3.87%; when N2 + CO2 gas mixture was added for displacement, the porosity decreased to 4.16%, and the proportions of small and macropores of the coal matrix increased to 88.37% and 6.20%, respectively, and the proportion of mesopores decreased to 5.42%. Proportion decreased to 5.42%.

Figure 14
figure 14

Accessible pore distribution curve.

Table 2 Porosity distribution after gas injection and replacement.

From the change of porosity and the pore size percentage, it was found that the effect of N2 replacement on pore size was mainly pore development, which was the process of promoting the development of small holes to mesopores and mesopores to large holes, and the effect of CO2 replacement on pore size was mainly pore degradation, which was the process of degradation from large holes to mesopores and from mesopores to small holes; after the injection of gas mixtures, the N2 suppressed the process of degradation of large holes into mesopores by CO2, and the CO2 suppressed the N2 to make small holes development to mesopores, resulting in a decrease in the percentage of mesopores and an increase in the percentage of small macropores.

Conclusion

  1. (1)

    The adsorption of CH4, CO2 and N2 in coal increased with pressure and decreased with temperature. The inhibitory effect of CO2 on CH4 adsorption was significantly stronger than that of N2 in the adsorption process, and the inhibitory effect of CO2 on CH4 and N2 adsorption was absolutely dominant in the simultaneous injection of CO2 and N2.

  2. (2)

    The distribution of adsorption energy was CO2 > CH4 > N2. In two-component adsorption, the mutual attraction between CO2 and CH4 led to a decrease in CO2 adsorption energy and an increase in CH4 adsorption energy, while the mutual repulsion between N2 and CH4 led to an increase in CH4 adsorption energy and a decrease in N2 adsorption energy. In three-component adsorption, the attraction between CO2 and N2 was greater than the repulsion between CH4 and N2, resulting in a decrease in the adsorption energy of CO2 and an increase in the adsorption energy of both CH4 and N2.

  3. (3)

    The injection of N2, CO2 and mixed injection of N2 + CO2 can promote the diffusion of methane in coal seams, in which the mixed injection of N2 + CO2 has the most significant effect on the promotion of methane diffusion, showing the relationship of N2 + CO2 > CO2 > N2 > Coal.

  4. (4)

    Compared with the non-injected gas, the injection of N2, CO2, and N2 + CO2 was able to increase the concentration of methane at the aggregates in the coal and the transportation speed in the coal, meaning that the methane molecules were more likely to diffuse from the adsorbed state into the pores of the coal.

  5. (5)

    Injecting CO2 for displacement will decrease the porosity of the coal matrix, and injecting N2 will increase the porosity of the coal matrix. When the two gases are injected in mixture, N2 can alleviate the effect of decreasing porosity caused by injecting CO2. The effect of CO2 on the porosity is mainly the degradation of porosity, while the effect of N2 on the porosity is mainly the development of pore space.