Introduction

Shale oil has enormous reserves and development potential worldwide (Bao et al. 2020; Wang et al. 2023a). However, the radius of pore throat in the shale reservoir is mostly in the range from 1 to 50 nm, which leads to the significant confinement effect (Heuberger et al. 2001; Zuo et al. 2018). In the nanopores, the electrostatic interaction between molecules and between molecules and the pore walls causes the uneven distribution of fluid molecules, which alters the phase behavior (Zhang et al. 2015). So the fluid-phase change of shale oil reservoirs is much different from that of conventional reservoirs (Fomkin et al. 2020; Liu et al. 2017). The accurate depiction of the phase behavior of fluid in nanopores with different sizes is the basis to determine the law of fluid flow, which is the theoretical foundation to formulate reservoir development plan, production system, and EOR methods.

Currently, research on the phase behavior of fluid in nanopores mainly includes experimental methods, state equation modification calculations, density functional theory (DFT), and molecular simulation methods (**ng et al. 2022; Wang et al. 2023b). The phase behavior in nanopores is difficult to characterize directly. Lou et al. (2016) used differential scanning calorimetry (DSC) and the Peng–Robinson (PR) equation of state to obtain the phase diagrams of n-hexane, n-octane, and n-dodecane in pores with sizes ranging from 2.2 to37.9 nm. Liu et al. (2018) obtained the P/V isotherms of N2 and n-C4H10 binary systems in real shale core samples combined with the PVT cell. Qiu et al. (2019) developed an isochoric method using DSC to calculate the vapor pressure of single-component substances and the dew point of mixtures in the bulk phase and nanopores, respectively. Bao et al. (2020) utilized micro–nano flow control technology to determine the minimum mixing pressure of the CO2/C10H22 mixture in the nanopores.

As a supplement to the experiments, various theoretical modeling calculations were utilized to investigate the confinement effect on the phase behavior. Zhong et al. (2018) quantified the phase change of binary mixtures with a certain ratio (CH4: C2H6=1:4) using density functional theory (DFT), and four orders of magnitude sizes of connected channels were imaged. ** et al. (2018) studied the effects of pore size on the bubble/dew pressure hysteresis in nanopores through grand canonical Monte Carlo (GCMC) simulation and DFT. Sun et al. (2020) used the PR-EOS model with Yang-Laplace equation to investigate the gas–liquid equilibrium of single-component substances and mixtures in closed nanopores. Song et al. (2020) proposed an improved vapor–liquid equilibrium (VLE) calculation model based on the modified PR-EOS to calculate the phase behavior of nano-confined fluids. Yang et al. (2020) also modified the PR-EOS by considering the interaction force between molecules and pore walls. Zhao et al. (2021) applied engineering DFT to study the phase behavior of hydrocarbon mixtures in multi-scale pores during constant composition expansion (CCE) and constant volume depletion (CVD) processes. But the calculation results of the theoretical modeling are much influenced by the assumptions and the number of components.

With the improvement of molecular dynamics simulation theory and the upgrading of computer hardware in recent years, molecular simulation was widely used to study the interactions and phase behavior of fluid molecules in nanopores. ** et al. (2017) and Yang et al. (2020) used molecular dynamics (MD) simulation to investigate the effect of nanopore size distribution on the phase behavior of methane and quantify the adsorption behavior of shale oil in fractures. Didar et al. (2013) and **ng et al. (2021) used the Monte Carlo (MC) molecular simulation method to study the critical properties of single-component hydrocarbons and CO2 under confinement in the state of gas–liquid coexistence. Singh et al. (2009) and Cao et al. (2021) employed the GCMC molecular simulation to investigate the phase coexistence, critical properties, and density distribution of single-component system (CH4, C2H6, C3H8, C4H10, C8H18) and mixture system (CH4/n-C4H10) in graphite pores, respectively. In addition, Coasne et al. (2006) and Sui et al. (2020) employed MD to investigate the adsorption behavior of argon in ordered and disordered carbon porous models, and the adsorption and transport characteristics of C8H18, C5H12, and C12H26 in nanoscale calcite slit pores. Herdes et al. (2018) integrated experimental, theoretical, and molecular simulation approaches to elucidate the phase behavior of hydrocarbon mixture in shale pores. In summary, the interaction between molecules and the interaction between molecules and pore walls could be microscopically elucidated through molecular simulation. Thus, molecular simulation is an effective method to characterize the phase behavior of multi-components in nanoscale pores from microcosmic mechanisms.

In this study, molecular dynamics simulation is the main research method. The confinement effect on the phase change pressure of single-component hydrocarbon and CO2 was firstly studied through the analysis of molecular density distribution. Then, hydrocarbon–CO2 mixture system was established to depict CO2 injection process in shale oil reservoirs. On this basis, the effect of temperature, pressure and pore size on the phase behavior of hydrocarbon–CO2 mixture system was analyzed. Thereafter, the phase diagram under confinement effect could be achieved, which is very important for applying CO2-EOR techniques in shale reservoirs and designing reasonable production pressure difference during production.

Simulation system

The accuracy of molecular dynamics simulation depends on the parameter settings, such as the ensemble, force field, periodic boundary conditions, geometrical optimization, and the method of temperature and pressure control. For physical properties in different systems, it is necessary to adjust the parameters to ensure the reliability of the simulation results. The important parameters and the specific steps the model are described and explained in the following.

Molecular models

In this study, NVT and NPT ensembles were used in the molecular dynamics simulation process, and the Nosé–Hoover temperature control method was used to keep the system temperature constant. For the model system, the interaction forces between molecules and between molecules and the walls were mainly considered. COMPASS force field was used to calculate the physical properties of the fluid in the ensemble.

The research categorizes intermolecular interaction into two distinct types, which are electrostatic interactions and van der Waals interactions. The electrostatic interaction is typically characterized by the Coulomb term, while the van der Waals interaction is commonly described using the Lennard–Jones potential (Chen et al. 2021). The expression for the Lennard–Jones potential energy model is shown as follows (Brochard et al. 2012; Chen et al. 2021):

$$U(ij) = 4\varepsilon_{ij} \left[ {\left( {\frac{{\sigma_{ij} }}{{r_{ij} }}} \right)^{12} - \left( {\frac{{\sigma_{ij} }}{{r_{ij} }}} \right)^{6} } \right] + \frac{{q^{i} q^{j} }}{{r_{ij} }}$$
(1)

In the research field of using molecular simulation to study nanopores, a more regular pore structure model is often used. In this work, a simplified graphene sheet was used to represent the organic pore wall of kerogen pores in shale reservoirs, and a slit-shaped pore structure was used to approximate the nanopores in shale (Liu et al. 2017). Three layers of graphene were used as the upper and lower walls of the nanopores in the model. The distance between each layer of graphene was set to 3.35 Å, and the size was 48.38 × 42.59 Å. Adjacent layers of graphene are parallel to each other, and the distance between the innermost layers of graphene on the upper and lower walls is equal to the pore size (Yang et al. 2017). The molecular model of the pore structure is shown in Fig. 1, where (a) represents a single graphene molecule and (b) represents an organic nanopores slit model composed of six layers of graphene.

Fig. 1
figure 1

Graphene organic nanopore model

Simulation design

In order to study the phase behavior of fluids in organic nanopores after CO2 injection, this research used the following types of hydrocarbons for simulation, including single-component hydrocarbons and hydrocarbon–CO2 mixture system. The hydrocarbons selected for simulation include light hydrocarbons: n-butane (C4H10) and n-hexane (C6H14), heavy hydrocarbons: n-octane (C8H18) and n-dodecane (C12H26).

Simulation of single-component fluid

For Single-component fluid, this research selected a temperature range of 353–513 K, a pressure range of 0–30 MPa and a pore size of 5 nm for simulation. These ranges were determined through data analysis of a shale oil reservoir in Northeast China (Wang et al. 2015, 2023c). The simulation plan is presented in Table 1, with temperature values of 353 K, 393 K, 433 K, 473 K, 513 K, and 553 K and a pore size of 5 nm.

Table 1 Single-component simulation value

Molecules of components (C4H10/C6H14/C8H18/C12H26/CO2) balance after the configuration stability of the molecular configuration is shown in Fig. 2. Forcite module in Materials Studio was performed to molecular dynamics simulation. Firstly, NVT is selected, and the time step is set to 1 fs, until the volume of the model system reached equilibrium. If the temperature of the system gradually reached stability and the density no longer changed dramatically, the system was considered to have reached an equilibrium state. If the balance was not reached, the simulation step size was increased. Then, the Nose–Hoover hot bath method was used to adjust the system temperature. The Ewald and atom-based methods were used to calculate the electrostatic force and van der Waals force, respectively. In order to study the difference of phase behavior between different components, the control variable method was used, and other simulation parameters were kept consistent.

Fig. 2
figure 2

Molecular configuration diagram

Simulation multi-component fluids

For multi-component fluids, methane (CH4), n-butane (C4H10), n-hexane (C6H14), n-octane (C8H18), and n-dodecane (C12H26) were selected as the shale oil components. The proportions of each component are detailed in Table 2. The ratio of CO2 to shale oil components is 3:7. For the simulation, the temperature range was set to 353–513 K, the pressure range was set to 0–30 MPa, and the pore size was set to 5 nm. The specific simulation values are shown in Table 3, where the temperature values are 35 K, 393 K, 433 K, 473 K, 513 K, and 553 K. The equilibrium configuration of hydrocarbon–CO2 mixture system molecule simulation is shown in Fig. 3, where CH4 is represented by cyan molecules, C4H10 by yellow molecules, C6H14 by green molecules, C8H18 by blue molecules, C12H26 by purple molecules, and CO2 by red molecules (Sun et al. 2020, 2022, 2023).

Table 2 Composition and proportion of shale oil
Table 3 Hydrocarbon–CO2 mixture system simulation value
Fig. 3
figure 3

Molecular equilibrium composition of hydrocarbon–CO2 mixture system (cyan molecules—CH4, yellow molecules—C4H10, green molecules—C6H14, blue molecules—C8H18, purple molecules—C12H26, red molecules—CO2)

Results and discussion

The phase behavior of single component in organic nanopores

The phase behavior of hydrocarbons

The phase change is related to the molecular density change. So the change of molecules density distribution in the organic pore of 5 nm is used to investigate the phase change pressure of different components under confinement. Molecular equilibrium composition of different hydrocarbons are shown in Fig. 4. The density distribution of each hydrocarbon obtained through molecular dynamics simulation is shown in Figs. 4 and 5. For C4H10, the density of first adsorption layer near the pore wall is 1.50 g/cm3 at the pressure of 0.1 MPa, which is three times that of the bulk phase density. The solid-like layer is formed, and there are no free molecules appearing in the center of the pore (Figs. 4a and 5a). In the microscopic scale, when the density of the second adsorption layer is higher than half size of the first adsorption layer, the second adsorption layer can be defined as a liquid film (Cao et al. 2021). The density value at this time can be used as the density when the fluid in the nanopore changes into the liquid phase.

Fig. 4
figure 4

Molecular equilibrium composition of different hydrocarbons (T = 353 K, P = 0.1 Mpa)

Fig. 5
figure 5

Density distribution of hydrocarbons under different pressures in the 5-nm pore (T = 353 K)

When the pressure increases to 2 MPa, the second adsorption layer of C4H10 attains a density of 0.51 g/cm3 and the density of first adsorption layer is measured to be 1.02 g/cm3. The density of the second adsorption layer reaches half the size of the first adsorption layer, which is also 0.01 g/cm3 higher than the density of liquid phase under atmosphere condition. The phenomenon manifests the formation of a liquid film in the second adsorption layer. When the pressure increases to 3 MPa, the C4H10 density in the pore center reaches 0.52 g/cm3, indicating that the fluid in the pore center attains a stable liquid phase. Thereafter, when the pressure increases from 3 to 15 MPa, the molecular density at the pore center no longer changes drastically and remains between 0.52–0.54 g/cm3. This is because when the distance between the molecules and the wall is greater than the cut-off radius, the solid wall cannot exert an interaction force on the molecules in the pore center. The properties of the molecules at the center of the pore are close to the fluid in the bulk phase, and the density tends to be stable. Therefore, the phase change pressure of C4H10 in a 5-nm pore at 353 K is determined to be 2 MPa.

According to the same analysis principle, the phase change pressure of C6H14 in organic nanopores is determined to be 1 MPa (Fig. 5b). Although the pore center is not entirely filled with C6H14 molecule at this pressure. The density of the second adsorption layer is higher than the liquid-phase density under bulk condition (0.6 g/cm3), which indicates the completion of phase change. When the pressure reaches 3 MPa, the fluid in the center of the pore with the density of 0.64 g/cm3 is entirely in a liquid-phase state. After the pressure exceeds 3 MPa, the density tends to be stable. Similarly, the phase change pressure of C8H18 in the nanopores occurs at 0.2 MPa (Fig. 5c). And as shown in Fig. 4d and Fig. 5d, the C12H26 molecules almost fills the entire pore at low pressure. So there is no obvious phase change for C12H26, which always maintains liquid phase in the nanopore under 353 K.

In order to facilitate a more intuitive analysis of the phase change pressure of each hydrocarbon in the nanopore of 5 nm, the average density of each hydrocarbon under different pressures is shown in Fig. 6. And the comparison of the phase change pressures under the confinement and bulk phase is shown in Table 4. The inflection point of density change in Fig. 6 represents the phase change pressure. The density of C4H10 has an inflection point at 2 MPa, which is twice as much as that under bulk conditions (Table 4). In addition, phase change pressure of C6H14 is seven times higher than that under bulk phase, and the phase change pressure of C8H18 is 8.6 times higher than that under bulk phase. Obviously, the longer the molecular chain, the greater the effect of nanopore confinement.

Fig. 6
figure 6

The average density of each hydrocarbon in the pore of 5 nm under different pressures (T = 353 K)

Table 4 Phase change pressure of components under bulk phase and 5-nm organic pore

Then the simulations are conducted under the temperature changing from 353 to 553 K, and the pore size is also fixed at 5 nm (Fig. 7). The phase change pressures of each hydrocarbon under different temperatures could be obtained based on the analysis of density changing with pressure. Then, the P–T phase diagrams of each hydrocarbon could be constructed (Fig. 8).

Fig. 7
figure 7

The average density of each hydrocarbon in the nanopore of 5 nm under different temperatures

Fig. 8
figure 8

The P–T diagram of C4H10, C6H14, C8H18, and C12H26 in the nanopore of 5 nm and bulk phase

With the increase of temperature, the random motion of molecules is more intense. So the pressure interval to complete the gas–liquid-phase change becomes larger, and the gas–liquid-phase change pressure is higher (Fig. 7). When the temperature changes from 353 to 553 K, the phase change pressure of C4H10, C6H14 and C8H18 increases from 2 MPa, 1 MPa, and 0.2 MPa to 20 MPa, 20 MPa, and 5 MPa, respectively. Particularly, C12H26 starts to undergo gas–liquid-phase change process, and the phase change pressure is determined to be 0.8 MPa. Then the P–T diagram of C4H10, C6H14, C8H18, and C12H26 in the nanopore of 5 nm and bulk phase are presented in Fig. 8. The gas–liquid-phase change lines of the hydrocarbons under confinement effect are all shifted to the upper compared to the bulk phase. The upward shift is greater for hydrocarbons with longer chain.

The phase behavior of CO2

The distribution of CO2 molecules in the organic nanopore of 5 nm at the temperature of 353 K is shown in Fig. 9. When the pressure is 0.1 MPa, CO2 molecules are absorbed on the organic pore walls, forming an adsorption layer. There are no free CO2 molecules in the center of the pore (Fig. 9a). When the pressure increases to 1 MPa, free gas-phase CO2 molecules appear in the pore, and the adsorption layer reaches saturation (Fig. 9b). As the pressure continues increasing to 3 MPa, the CO2 molecules in the center of the pore begin to aggregate, and the density increases significantly (Fig. 9c). The CO2 gradually changes from gas phase to liquid phase. As shown in Fig. 10, the density change of CO2 molecules in the nanopore of 5 nm is compared with that in the bulk phase. At the temperature of 353 K, the phase change pressure of CO2 in nanopores is lower than that in the bulk phase.

Fig. 9
figure 9

CO2 dynamic simulation equilibrium diagram (T = 353 K, R = 5 nm)

Fig. 10
figure 10

The average density of CO2 in the nanopore of 5 nm with different pressures (353 K)

Moreover, at the pressure of 5.71 MPa which is the phase change pressure in the bulk phase, the density of CO2 in the bulk phase is 0.77 g/cm3, while that in the nanopores is 0.82 g/cm3. The liquid-phase density of CO2 in the nanopores is 6.49% higher than that in the bulk phase. When the pressure increases to 20 MPa, the liquid-phase density of CO2 in the nanopores is 1.07% higher than that in the bulk phase. The difference of CO2 molecule density under confinement and bulk phase gets smaller as the pressure increases. It indicates that the confinement effect weakens as the pressure increases.

Comparative analysis of the phase behavior between hydrocarbons and CO2

The confinement effect of organic nanopores increases the phase change pressure of each hydrocarbon, while that decreases the phase change pressure of CO2. The reason for this phenomenon is that when molecules are confined in nanopores, the interaction between molecules is greatly affected by the distance between molecules and between molecules and pore walls. So the molecules cannot move freely, and the interaction between molecules in the nanopores is different from that in the bulk phase.

Molecular interactions are mainly composed of electrostatic forces and van der Waals forces. For hydrocarbon molecules, which are non-polar molecules, the interaction between molecules is mainly composed of van der Waals forces (dispersion forces), which are attractive forces between molecules that arise from temporary imbalances of electric charge. Due to the even distribution of the electron cloud, the effect of intermolecular dispersion force of hydrocarbon molecules is relatively weak. On the other hand, the confinement effect restricts the free movement of the molecules and the distance between molecules is relatively close. The even distribution of the electron cloud of the hydrocarbon molecules produces a repulsive force. On the whole, in nanopores, the interaction between hydrocarbon molecules is mainly repulsive. Therefore, the phase change pressure of hydrocarbons would increase under confinement effect.

For CO2 molecules, the chemical bond angle of CO2 molecules is 180°. The electron cloud distribution of the molecule is uneven, which would result in instantaneous dipole moment. In nanopores, the confinement restricts the movement of CO2 molecules, which increases the probability of CO2 molecules attracted by adjacent molecules through instantaneous dipole moment. Then, the interaction between CO2 molecules mainly manifests as mutual attraction under confinement, which decreases the phase change pressure of CO2. Therefore, at the same pressure, CO2 molecules are more likely to change into liquid in the nanopores.

The phase behavior of multi-component fluid during CO2 injection

The behavior of hydrocarbons–CO2 system in organic nanopores

The reservoir energy of the shale oil often decreases fast during the development process. CO2 injection would be an effective method to replenish the reservoir energy. Besides the confinement effect, the injected CO2 can further influence the phase behavior of fluid in the shale reservoirs. Thus, the hydrocarbons–CO2 mixture molecules simulation system is constructed. The density distribution of each component in the organic nanopore is shown in Fig. 11. The pressure of the mixture system is increased by the injection of CO2. In the initial injection stage, the CO2 is preferentially adsorbed on the pore walls compared to other hydrocarbon molecules, resulting in more heavy hydrocarbons in the center of the pore. As the injection pressure increases, the adsorption capacity of heavy hydrocarbons is enhanced. Heavy hydrocarbons are easier to be adsorbed on the pore wall than light hydrocarbons, and the density of heavy hydrocarbons in the pore center would decrease (Fig. 12).

Fig. 11
figure 11

Distribution of component density of hydrocarbon–CO2 mixture system

Fig. 12
figure 12

Multi-component alkane–CO2 balance simulation configuration at 5 nm (cyan molecules—CH4, yellow molecules—C4H10, green molecules—C6H14, blue molecules—C8H18, purple molecules—C12H26, red molecules—CO2)

The average density of shale oil and CO2 molecules at the center of the pore of 5 nm is shown in Fig. 13. When the pressure is less than 20 MPa, the density of CO2 increases steadily with the continuous injection of CO2, as presented in Fig. 12. On the other hand, the shale oil is in the form of gas–liquid two phases. As the pressure increasing, more hydrocarbons are converted from gas phase to liquid phase, and the liquid-phase hydrocarbons are more likely to be adsorbed on the pore wall. Though part of the injected CO2 would occupy the pore wall and displace some of the hydrocarbons. As a whole, the adsorption of the hydrocarbons increases with the pressure increasing. So the density of the free shale oil in nanopores decreases (Fig. 12). When the pressure is higher than 20 MPa, the mixture system is in the form of liquid phase and the shale oil density increases slowly with the pressure increasing. Meanwhile, the density of CO2 also increases with increasing pressure, but the increasing trend slows obviously. It indicates that more injected CO2 molecules are absorbed on the pore walls and occupied the adsorption sites originally belonging to hydrocarbons. Full mixing and kee** in liquid phase of CO2 and hydrocarbons can reduce the adsorption of hydrocarbons on organic pore wall. Therefore, CO2 miscible flooding is an effective EOR–CCUS technique for enhancing oil recovery of shale oil.

Fig. 13
figure 13

The density of free shale oil and CO2 in the nanopore of 5 nm during CO2 injection process (353 K)

In the reservoir development process, the pressure at which the first bubble begins to separate from the liquid phase is called the bubble point pressure (Han et al. 1998; Xue et al. 2014). In this study, CH4, as the lightest component, will separate first from the liquid phase, so we can consider the pressure at which CH4 separates from the system as the bubble point pressure of the system. Similarly, at a certain temperature in the mixture system, as the pressure increases, C12H26 will first condense into the liquid phase, so the phase change pressure of C12H26 can be considered as the dew point pressure of the system. Figure 14 shows the density of each hydrocarbon changing with pressure under different temperatures.

Fig. 14
figure 14

The average density of shale oil components in the nanopore of 5 nm under different temperatures

According to Fig. 14, the density of CH4, C4H10 and C6H14 increases with the pressure increasing. When the pressure is higher than a certain pressure, the growth trend slows down. The certain pressure can be considered as the phase change pressure of each component in the mixture system. Under the temperature of 353 K, the density of CH4 increases with pressure in the gas phase at pressures from 0 to 20 MPa, while it remains steady in the liquid phase as pressure increases above 20 MPa. CH4 as the lightest component in the mixture system, the bubble point pressure of the mixture system is determined to be 20 MPa.

However, the density of C8H18 and C12H26 increases and reaches a peak rapidly. Then the density decreases, and the rate of decline gradually slows down. Under the temperature of 353 K (Fig. 14a), the density of C12H26 exhibits a rapid decrease from 0.28 to 0.08 g/cm3 as the pressure increases from 0.1 to 1 MPa, and then the density change becomes gentle. At 0.1 MPa, C12H26 is in a liquid-phase state in the pore. With the pressure increasing, the liquid-phase C12H26 are easier to be absorbed and trapped on the organic pore wall, causing a decrease in the number of fluid molecules in the pore center. Under the temperature of 393 K, the density of C12H26 increases rapidly from 0.1 to 1 MPa, indicating that the C12H26 changes from gas phase to liquid phase. The dew point pressure of the mixture system is considered to be 1 MPa under the temperature of 393 K. In addition, when the pressure is greater than the phase change pressure, the density of C8H18 and C12H26 shows a rapid decrease followed by a stable trend. As the temperature increases, the degree of density reduction becomes smaller. This is because the free movement of molecules is much more intense with the temperature increasing. The attraction force between molecules and pore walls gradually decreases. More C8H18 and C12H26 molecules could move to the center of the organic nanopores under higher temperature.

The confinement effect on the phase diagram

Based on the simulation results mentioned above, the bubble and dew points at different temperatures in the 5-nm and 10-nm pore can be obtained, and the specific values are shown in Table 5. Then, the P–T phase diagram of the mixture system under confinement effect of 5 nm and 10 nm are obtained, as presented in Fig. 15. The bubble point pressure of the system in the organic nanopores is lower than that in bulk phase, while the dew point pressure of the mixture system in the organic nanopores of 5 nm is higher than that in the bulk phase. Compared with the bulk phase (critical temperature 540 K, critical pressure 32.89 MPa), the critical temperature of the mixture system in the organic nanopores of 5 nm decreases by 7.13%, and the critical pressure decreases by 75.98%. The phase envelop is shrunken inward, and the area of the phase envelope is reduced under the confinement effect. The smaller the pore size is, the lower the bubble point pressure is, and the more obvious the envelope deviation is. The phase envelope of fluid in nanopores changes greatly compared with that in bulk phase, which results in great differences in the phase behavior of fluid in fractures and matrix pores at different development stages of shale oil reservoirs.

Table 5 Bubble point pressure and dew point pressure of the hydrocarbon–CO2 mixture system in 5-nm pore
Fig. 15
figure 15

Phase envelope diagram of hydrocarbon–CO2 mixture system

As shown in Fig. 15, the initial pressure of the target reservoir was 35 MPa, and the oil in the reservoir was in the phase of liquid. With the development processing, the reservoir pressure decreased to 30 MPa. According to the phase envelope diagram, the oil in the fractures and large pores changed into gas–liquid phase, while the oil in the nanopores less than 10 nm was still in liquid phase. It is very important to elucidate the fluid-phase characteristics in nanopores for the formulation of reasonable production pressure difference during development of shale reservoirs. If the fluid in the nanopores is in a two-phase state, the light component in gas phase is more likely to escape, while the liquid phase would stay in the nanopores. The oil recovery of the matrix would be influenced. On the other hand, due to the confinement effect, CO2 is much easier to be miscible with shale oil in nanopores. So the CO2 injection is effective method in enhance oil recovery in the matrix of shale oil reservoirs.

Conclusions

In this study, the confinement effect on the density distribution and phase behavior of single-component hydrocarbons and CO2 in nanopores was microscopically studied with molecular dynamics simulation. Then, hydrocarbon–CO2 mixture system was established to depict CO2 injection process in shale oil reservoirs. The following conclusions are drawn:

  1. (1)

    The molecular simulation can describe the phase behavior of the fluid in confined spaces more mechanistically, which takes full account of the interaction between molecules and the interaction between molecules and pore walls. As the length of carbon chains increases, the confinement effect on hydrocarbons becomes stronger. When the temperature increases, the confinement effect on the fluid becomes weaker due to the more kinetic energy.

  2. (2)

    The confinement effect on the phase change pressure is influenced by the distribution of the electron cloud of molecules. The even electron cloud distribution of the hydrocarbons increases the phase change pressure, while the uneven electron cloud distribution of CO2 decreases the phase change pressure due to the instantaneous dipole moment.

  3. (3)

    For the hydrocarbons–CO2 mixture systems changing from bulk phase to nano-confinement phase, the phase envelop is shrunken inward, and the area of the gas–liquid-phase change envelope is reduced. The smaller the pore size is, the lower the bubble point pressure is, and the more obvious the phase envelope deviation is.

  4. (4)

    CO2 is much easier to be miscible with shale oil in nanopores. Moreover, full mixing and kee** in liquid phase of CO2 and hydrocarbons can reduce the adsorption of hydrocarbons on organic pore wall. Therefore, CO2 miscible flooding could be an effective EOR–CCUS technique for enhancing oil recovery of shale oil.