Introduction

The traditional approach fails to retrieve around 60–70% of the oil reserves. On the other hand, the growth in population has resulted in an increase in the need for energy resources. Therefore, Enhanced Oil Recovery (EOR) has emerged as a crucial technique to sustain oil production levels and retrieve extra oil from reservoirs. Based on the type of oil, reservoir characteristics, and other factors, various classifications have been introduced for EOR methods in the literature, including thermal, gas injection, chemical injection, microbial, electromagnetic heating, etc. For example, thermal methods are more suitable for heavy oil (Wu et al. 2018, 2016). Among the introduced EOR methods, gas injection, which can be injected under three conditions—miscible, immiscible, and near-miscible, has attracted significant attention. Therefore, many researchers have explored this technique both numerically and experimentally to expand understanding of this approach.

Kulkarni and Rao (2005) assessed the effectiveness of water alternating-gas (WAG) injection in both miscible and immiscible scenarios. According to their findings, superior results were observed in the miscible conditions. Karimaie et al. (2007) investigated the injection of secondary and tertiary gases into fractured carbonate rock. Their findings showed that carbon dioxide (CO2) is more efficient than nitrogen (N2) in improving oil recovery. Ghafoori et al. (2012) conducted a study on injecting WAG, N2, and CO2 gases into a carbonate reservoir. Their findings indicated that decreased gas injection resulted in higher oil production. Sohrabi and Fatemi (2012) investigated oil recovery during gas, water, WAG, and simultaneous gas and water (SWAG) injections. Their research indicated that WAG resulted in superior oil recovery outcomes among the various injection methods. Fatemi and Sohrabi (2013) carried out several experiments to explore how rock wettability influences oil recovery in gas injection, water injection, and WAG injection, in a separate study. Shahrokhi et al. (2018) carried out a sequence of core flood experiments to examine how injection history and miscibility influence oil recovery when employing gas injection. They showed that using water flooding in mixed-wet carbonate formations resulted in better outcomes compared to immiscible gas injection. Additionally, they noted that the residual oil saturation after immiscible WAG following gas injection was higher than after water flooding. Their research indicated that the injection order did not affect the final oil recovery. Gas injection is a promising method for EOR in unconventional reservoirs, as well as in conventional reservoirs. In addition to the studies mentioned above, numerous researchers have explored different gas injection techniques, including gas flooding and cyclic gas injection, through experimental and numerical methods, as well as field studies (Chen et al. 2014; Fathi and Akkutlu 2014; Gamadi et al. 2014; Hoffman 2012; Jin et al. 2017a, b; Jin et al. 2017; Li and Sheng 2017; Meng et al. 2017; Sanchez-Rivera et al. 2015; Sheng and Chen 2014; Sun et al. 2016; Yu et al. 2015, 2017). In the process of gas injection, our goal is to minimize the Interfacial Tension (IFT) as much as possible to enhance oil recovery (Jin 2017). In other words, the primary mechanism of gas injection is the reduction of interfacial IFT; therefore, it is essential to investigate the IFT of gas-oil. This has resulted in the conduct of various studies to examine the IFT between gas and different fluid systems in diverse conditions.

In many reservoir engineering investigations, knowledge of the system's IFT is essential as it impacts fluid flow (Shariat 2014). About one-third of the oil reserves might not be recoverable because of the interfacial tension of the system (Jennings and Newman 1971). A low IFT leads to a decrease in residual oil saturation (Harbert 1983). This reduction in IFT can also impact the shape of the relative permeability curve. When the IFT approaches zero, both residual oil saturation and the relative permeability curve become linear (Shariat 2014). The assessment of the IFT in gas injection processes has sparked considerable interest as the varying strengths of viscous, gravitational, and surface forces play a crucial role in determining the ultimate reservoir recovery potential (Shariat 2014). Many researchers have studied the IFT between gas and water at different temperature and pressure levels (Akutsu et al. 2007; Bennion and Bachu 2008; Chen and Yang 2019; Chiquet et al. 2007; Chun and Wilkinson 1995; Da Rocha et al. 1999; Hebach et al. 2002; Heuer JR 1957; Hocott 1939; Hough et al. 1951; Jaeger 1998; Jennings and Newman 1971; Jho et al. 1978; Kashefi 2012; Lepski 1997; Massoudi and King Jr 1975; Mehrjoo et al. 2020; Ren et al. 2000; Rushing et al. 2008; Sachs and Meyn 1995; Shariat 2014; Sutjiadi-Sia et al. 2008; Tewes and Boury 2004; Wiegand and Franck 1994; Yang et al. 2005; Yiling et al. 1997; Zhao et al. 2002). The study conducted by Escrochi et al. (2013) investigated the IFT behavior of gas and oil when gas is injected into asphaltene-containing oil. They showed that as the pressure increased, the likelihood of achieving miscibility also increased near the point where asphaltene precipitation begins (Escrochi et al. 2013). Dalvand and Heydarian (2015) conducted a study where they measured the IFT of gas oil for two Iranian oil formations. They highlighted a significant impact of temperature on the IFT. Ghorbani and Mohammadi (2017) conducted a study on the effect of pressure, fluid composition, and temperature on the IFT of oil–gas systems. They employed the pendant drop technique for measurement and analyzed the images using the Axisymmetric Drop Shape Analysis method. Their research revealed that the influence of pressure on IFT was more significant compared to the effect of temperature. Additionally, they illustrated that the composition's impact on IFT is determined by the phase envelope of the sample. Jahabakhsh et al. (2018) examined how reducing gas-oil IFT affects three-phase relative permeability. In addition to experimental research, certain studies prediction the IFT of gas-oil and gas–water systems (Ahmadi and Mahmoudi 2016; Chen and Yang 2019; Kashefi 2012; Kashefi et al. 2016; Mehrjoo et al. 2020; Shariat 2014).

Although multiple studies have aimed to elucidate the behavior and mechanism of gas injection processes in EOR, numerous questions persist regarding this method. While most experimental and numerical analyses emphasize the prevalence of the condensing mechanism, the impact of the vaporizing mechanism on the IFT and the efficiency of gas injection remains ambiguous, necessitating additional research. Therefore, in the first step of this study, the IFT of different gas systems (nitrogen, carbon dioxide, methane) and oil during various mechanisms has been investigated. Since the IFT of systems can affect the gas injection process, the second step of the study focused on examining the effect of vaporized oil in the gas phase, injection pressure, and IFT0 on the model's output, namely the relative permeability of fluids, saturation profile of gas, and fractional flow curve.

After the introduction, the mathematical model is described in Sect. 2. Section 3 covers the validation of the developed code, results, discussion, and sensitivity analysis of the parameters considered, followed by some concluding remarks.

Method of work

Mathematical model

Figure 1 shows the flow chart of the present research. The mathematical model in this article includes four primary stages: determining the IFT of the system, adjusting the relative permeability of gas and oil, computing the saturation profile, and identifying the gas fractional flow as the model's result (Fig. 1).

Fig. 1
figure 1

The Flow chart of the numerical simulation

Calculation of IFT

IFT plays a crucial role in influencing the behavior of reservoir fluids. Lowering the IFT is a key factor in enhanced oil recovery EOR techniques like gas injection. The determination of IFT can be done either through experimental measurements or simulation approaches. Various correlations have been proposed by researchers to estimate the IFT of a system, with the Ramey correlation, derived from the Weinaug–Katz correlation, being widely recognized (Ramey Jr 1973). In this study, the Ramey correlation was employed to calculate the IFT of the gas-oil system.

$$\sigma_{go}^{1/4} = P_{o} \left( {x_{o} \frac{{\rho_{o} }}{{M_{og} }} - y_{o} \frac{{\rho_{g} }}{{M_{go} }}} \right) - P_{g} \left( {x_{g} \frac{{\rho_{o} }}{{M_{og} }} - y_{g} \frac{{\rho_{g} }}{{M_{go} }}} \right)$$
(1)

In the given equation, \({\rho }_{g}\), \({x}_{g}\), \({y}_{g}\), and \({M}_{go}\) correspond to the gas density, gas mole fraction in the oil phase, gas mole fraction in the gas phase, and gas molecular weight, respectively. Likewise, \({\rho }_{o}\), \({x}_{o}\), \({y}_{o}\), and \({M}_{og}\), represent the oil density, oil mole fraction in the oil phase, oil mole fraction in the gas phase, and oil molecular weight, respectively. Furthermore, \({\sigma }_{go}\) stands for the IFT of the oil and gas system, while \({P}_{o}\) and \({P}_{g}\) are Parachor equations for the oil and gas phases. The formulas for computing the aforementioned parameters and other relevant parameters are detailed in Eqs. (22) to (48) in the appendix.

Calculation of relative permeability of the oil–gas system

In the second step of the algorithm developed in this study, the relative permeability was adjusted to account for both immiscible and miscible conditions. Various models have been proposed by researchers to modify the relative permeability, aiming to interpolate between these two conditions. One well-known model utilized in this study is the one put forth by Coats (1980). The parameter introduced to interpolate between immiscible and miscible conditions is the relative permeability interpolation parameter, \({F}_{k}\), which is linked to IFT and the IFT at minimum miscibility pressure (MMP), IFT0. The formulation for \({F}_{k}\) is presented in the following equation:

$$F_{K} = {\text{min}}\left[ {1.\left( {\frac{\sigma }{{\sigma_{0} }}} \right)^{N} } \right]$$
(2)
$$N = 1/n_{l}$$

The relative permeability of gas and oil was adjusted using a formula proposed by Coats to interpolate between miscible and immiscible conditions.

$$K_{RG} = F_{K} *K_{rg}^{imm} + \left( {1 - F_{K} } \right)*K_{rg}^{mis}$$
(3)
$$K_{RO} = F_{K} *K_{ro}^{imm} + \left( {1 - F_{K} } \right)*K_{ro}^{mis}$$
(4)

In the equations mentioned above, \({\sigma }_{0}\) signifies the IFT at MMP, and \(\sigma\) represents the IFT at corresponding pressure. The exponent is indicated as \({n}_{l}\). \({K}_{RG}\), \({K}_{rg}^{mis}\), and \({K}_{rg}^{imm}\) stand for the gas's modified, miscible, and immiscible relative permeability, respectively. Similarly, the oil's modified, miscible, and immiscible relative permeability are represented by \({K}_{RO}\), \({K}_{ro}^{mis}\), and \({K}_{ro}^{imm}\), respectively.

The residual oil saturation and irreducible gas saturation need to be adjusted:

$$S_{gi} = F_{K} *S_{gi}^{imm}$$
(5)
$$S_{or} = F_{K} *S_{or}^{imm}$$
(6)
$$S_{gn} = \frac{{S_{g} - S_{gi} }}{{1 - S_{gi} - S_{or} }}$$
(7)

In this study, the Corey–Brooks (1965) correlation was employed to determine the relative permeability of oil and gas in the immiscible situations:

$$K_{rg}^{imm} = K_{rg} *S_{gn}^{ng}$$
(8)
$$K_{ro}^{imm} = K_{ro} *\left( {1 - S_{gn} } \right)^{{n_{o} }}$$
(9)
$$K_{rg}^{mis} = S_{gn}^{{n_{m} }}$$
(10)
$$K_{ro}^{mis} = \left( {1 - S_{gn} } \right)^{{n_{m} }}$$
(11)

In the above equations, the modified irreducible gas saturation and residual oil saturation are denoted by \({S}_{gi}\) and \({S}_{or}\), respectively. The residual oil saturation at immiscible conditions is represented as \({S}_{or}^{imm}\) and \({S}_{gi}^{imm}\) signifies the irreducible gas saturation in immiscible conditions. The relative permeability of the gas phase at residual oil saturation and the relative permeability of oil at irreducible gas saturation are indicated by \({K}_{rg}\) and \({K}_{ro}\), respectively. In Eqs. (8)–(11) three relative permeability indexes, \({n}_{m}\), \({n}_{g}\), and \({n}_{o}\) are introduced. The immiscible relative permeability curve was utilized to determine \({n}_{g}\) and \({n}_{o}\), with a value of 1.1 chosen for \({n}_{m}\) in this study.

Calculation of viscosity of gas and oil

Viscosity is a crucial parameter in the gas injection. To accurately simulate gas injection, adjusting the viscosity of both the reservoir and injection fluids is essential. The Todd and Longstaff (1972) model determine the effective viscosity of oil and gas:

$$\mu_{geff} = \mu_{g}^{1 - \omega } *\mu_{m}^{\omega }$$
(12)
$$\mu_{oeff} = \mu_{o}^{1 - \omega } *\mu_{m}^{\omega }$$
(13)
$$\left( {\frac{1}{{\mu_{m} }}} \right)^{\frac{1}{4}} = \frac{{S_{g}^{\prime} }}{{S_{n}^{\prime} }}\left( {\frac{1}{{\mu_{g} }}} \right)^{\frac{1}{4}} + \frac{{S_{o}^{\prime} }}{{S_{n}^{\prime} }}\left( {\frac{1}{{\mu_{o} }}} \right)^{\frac{1}{4}}$$
(14)
$$S_{g}^{\prime} = S_{g} - S_{gi}$$
(15)
$$S_{o}^{\prime} = S_{o} - S_{or}$$
(16)
$$S_{n}^{\prime} = S_{o}^{\prime} - S_{g}^{\prime}$$
(17)

The viscosity mixing factor, represented by \(\omega\), has a value of 1/3 for simulation in the current study.

Calculation gas saturation and fractional flow of gas phase

The Buckly–Leverett method is a technique commonly employed to determine the saturation profile and fractional flow in porous media.

$$f_{g} = \frac{{S_{g}^{2} }}{{S_{g}^{2} + \left( {1 - S_{g} } \right)^{2} V}}$$
(18)
$$\frac{{df_{g} }}{{dS_{g} }} = \frac{{2V\left( {S_{g} - 1} \right)S_{g} }}{{\left( {V\left( {S_{g} - 1} \right)^{2} + S_{g}^{2} } \right)^{2} }}$$
(19)
$$PVI = \frac{{q_{t} t}}{L\phi Area}$$
(20)
$$x_{{S_{g} }} = PVI*L\left( {\frac{{df_{g} }}{{dS_{g} }}} \right)_{{S_{g} }}$$
(21)

The study employed various parameters including \({f}_{g}\) (fractional flow for the gas phase), \(\frac{{df}_{g}}{{dS}_{g}}\) (derivative of fractional flow of the gas phase with respect to gas saturation), \(A\) rea, \(t\) (time), \(L\) (length), \(V\) (volume), \(\phi\) (porosity), \(PVI\) (dimensionless pore volume), \({q}_{t}\) (total injection rate), and \({x}_{{S}_{g}}\) (distance traveled by a specific \({S}_{g}\) contour) (Dandekar 2013).

Results and discussion

In this section, after presenting the validation of the developed code, the effect of vaporized oil in the gas phase on the IFT of three investigated gas-oil systems (N2, CO2, and methane (CH4)) has been explored. Following that, the impacts of injection pressure, initial IFT0, and vaporized oil in the gas phase on the gas injection process have been studied. A sensitivity analysis was conducted to investigate how these parameters affect IFT, relative permeability curve, fractional flow, and saturation profile. It is important to note that this paper examines two types of oil: movable and residual. The results for movable oil are presented in subsequent sections, while those for residual oil are available in the supplementary file.

Numerical simulation

Table 1 illustrates the values for every input parameter:

Table 1 Parameters for simulation of IFT and gas injection

To assess the developed model, experimental data was used for validation. The oil density, solution gas-oil ratio, and oil formation volume factor are the key parameters needed to calculate the IFT of the system. The validation of these parameters was carried out for the developed model. As depicted in Fig. 2, the model can precisely predict these parameters with minimal error. Moreover, the relative permeability of oil and gas under immiscible conditions is another vital parameter in the developed model. Figure 2 presents a comparison between the predictions of the relative permeability-based developed model and the experimental data, demonstrating satisfactory accuracy in relative permeability prediction.

Fig. 2
figure 2

Comparison of the experimental data and predicted data for solution gas oil ratio, oil formation volume factor, oil density, and oil and gas relative permeability

The last stages of assessing the developed model involves forecasting the fractional flow curve. By leveraging the simulation findings from Mu et al. (2019), the model's accuracy in predicting the fractional flow curve has been evaluated. Based on Fig. 3, developed model in the present study produces satisfactory results, aligning well with the fractional flow predictions from Mu et al. (2019).

Fig. 3
figure 3

Comparison predicted fractional flow of Mu et al. (2019) and present paper with at gas viscosity of 0.035 mPa.s and injection pressure of 30 MPa

Effect of vaporized oil in the gas phase for live oil

As previously mentioned, the black oil model generally assumes that \({r}_{v}=0\) resulting in \({y}_{o}=1\), and \({y}_{g}=0\). A sensitivity analysis was conducted on the \({y}_{o}\) and \({y}_{g}\) values in this section. Three distinct scenarios were investigated: \({y}_{o}=1\) and \({y}_{g}=0\), \({y}_{o}=0.7\) and \({y}_{g}=0.3\), and \({y}_{o}=0.5\) and \({y}_{g}=0.5\). Figure 4 shows the influence of \({y}_{o}\) and \({y}_{g}\) on the IFT for each gas.

Fig. 4
figure 4

Effect of mole fraction of oil in the gas phase on the IFT for CO2, CH4, and N2 and live oil system

As shown in Fig. 4, the variation in \({y}_{o}\) had an impact on both the IFT curve and the near-miscible pressure value. In this study, the near-miscible pressure was defined as the pressure at which the IFT reached a value of 1 mN/m. For CO2, the near-miscible pressure values were 505, 548, 602 psi at \({y}_{o}=1\), \({y}_{o}=0.7\), and \({y}_{o}=0.5\), respectively (Subplot (a) of Fig. 4). In Fig. 4, Subplot (b) illustrates that the near-miscible pressure of CH4 at \({y}_{o}=1\), \({y}_{o}=0.7\), \({y}_{o}=0.5\) were 2500, 2700, and 3050 psi, respectively. The near-miscible pressure values for N2 at \({y}_{o}=1\), \({y}_{o}=0.7\), and \({y}_{o}=0.5\) were 934 psi, 994 psi, and 1072 psi, respectively (Subplot (c) of Fig. 4). Reducing \({y}_{o}\) led to an increase in near-miscible pressure, while increasing \({y}_{o}\) resulted in a decrease in the IFT of the system (Fig. 4). In other words, the condensing mechanism produced lower IFT and near-miscible pressure, whereas shifting to condensing-vaporizing mechanism increased both. These trends were consistent across all three gases. Notably, the impact of the mechanism on the CH4-live oil system was more significant compared to the other gases, indicating a stronger effect on the hydrocarbon gas than on N2 and CO2.

Effect of vaporized oil in the gas phase on live oil–gas system

In this section, the impact of vaporized oil in the gas phase on a live oil–gas system was examined. Figure 5 shows the relative permeability curve, saturation profile, and fractional flow curve for the CO2-live oil system at IFT0 of 0.05 mN/m, under two different injection pressure: 500 (Subplots (a)–(c)) and 850 psi (Subplots (d)–(f)).

Fig. 5
figure 5

Effect of mole fraction of oil in the gas phase on the relative permeability, saturation profile, fractional flow curves at an injection pressure of 500 psi and 850 psi for CO2-live oil system and IFT0 = 0.05 mN/m

Based on Subplots (a)–(c) of Fig. 5, at a low injection pressure of 500 psi, the effect of \({y}_{o}\) is minimal. However, increasing the injection pressure to 850 psi revealed its impact on \({y}_{o}\). Changing in \({y}_{o}\) led to alterations in the relative permeability, saturation profile, and fractional flow, as observed in Subplots (d)–(f) of Fig. 5. The saturation profile presented in this paper is theoretically correct but unattainable in practice. While adjustments have been proposed in the literature, we maintained the original saturation profile in our study. Shifting from condensing to condensing-vaporizing at higher pressure resulted in a decrease in fluids' relative permeability. This shift is evident in the gas saturation profile (Subplots (e) and (f) of Fig. 5), showing faster gas movement in the domain and higher gas fractional flow when the condensing mechanism dominates.

As the IFT0 = 0.05, at a higher injection pressure, the impact of \({y}_{o}\) was observed for IFT0 = 0.5, as shown in Fig. 6.

Fig. 6
figure 6

Effect of mole fraction of oil in the gas phase on the relative permeability, saturation profile, and fractional flow curves at an injection pressure of 500 and 850 psi for CO2-live oil system and IFT0 = 0.5 mN/m

Similar to the previous results, the condensing mechanism led to higher gas relative permeability, faster gas movement, and a higher fg.

When IFT0 = 5, the \({y}_{o}\) factor influences the model output at both injection pressures, as shown in Fig. 7, unlike the cases where IFT0 was 0.05 and 0.5.

Fig. 7
figure 7

Effect of mole fraction of oil in the gas phase on the relative permeability, saturation profile, and fractional flow curves at an injection pressure of 500 and 850 psi for CO2-live oil system and IFT0 = 5 mN/m

Methane is another gas used as an injection fluid. Figures 8, 9, 10 show the results of injecting methane into live oil. As indicated by them, the impact of \({y}_{o}\) on the model output is significantly stronger at high injection pressure than at low pressure.

Fig. 8
figure 8

Effect of mole fraction of oil in the gas phase on the relative permeability curve, saturation profile, and fractional flow curve at an injection pressure of 3000 psi and 4000 psi for CH4-live oil system and IFT0 = 0.05 mN/m

Fig. 9
figure 9

Effect of mole fraction of oil in the gas phase on the relative permeability curve, saturation profile, and fractional flow curve at an injection pressure of 3000 psi and 4000 psi for CH4-live oil system and IFT0 = 0.5 mN/m

Fig. 10
figure 10

Effect of mole fraction of oil in the gas phase on the relative permeability curve, saturation profile, and fractional flow curve at an injection pressure of 3000 psi and 4000 psi for CH4-live oil system and IFT0 = 5 mN/m

At all pressures and IFT0 values, with the exception of 3000 psi when IFT0 is 0.05, the effect of the condensation mechanism results in decreased the fluids' relative permeability, accelerated gas displacement within the domain, and higher fg (Figs. 8, 9, 10).

In the last scenario, nitrogen was introduced into live oil under two injection pressures of 1000 psi and 2000 psi. Figures 11, 12 and 13 display the impact of \({y}_{o}\) during nitrogen injection.

Fig. 11
figure 11

Effect of mole fraction of oil in the gas phase on the relative permeability curve, saturation profile, and fractional flow curve at an injection pressure of 1000 psi and 2000 psi for N2-live oil system and IFT0 = 0.05 mN/m

Fig. 12
figure 12

Effect of mole fraction of oil in the gas phase on the relative permeability curve, saturation profile, and fractional flow curve at an injection pressure of 1000 psi and 2000 psi for N2-live oil system and IFT0 = 0.5 mN/m

Fig. 13
figure 13

Effect of mole fraction of oil in the gas phase on the relative permeability curve, saturation profile, and fractional flow curve at an injection pressure of 1000 psi and 2000 psi for N2-live oil system and IFT0 = 5 mN/m

As depicted in Subplots (a)–(f) of Figs. 11, 12 and 13, the impact of \({y}_{o}\) is minor at low injection pressures of 1000 psi. However, as the injection pressure rises, the significance of \({y}_{o}\) increases. This implies that utilization of nitrogen as an injection gas has a greater effect on the model's output.

Effect of injection pressure on the output of the model for live oil

Injection pressure plays a crucial role in influencing the relative permeability curve, saturation profile, and fractional flow curve. The impact of injection pressure on the performance of individual gases was assessed, assuming an IFT0 of 0.5 and dominance of the condensing mechanism in the system. In Figs. 14, 15 and 16, it is evident that as the injection pressure rises, the relative permeability of fluids increases. Moreover, higher injection pressure accelerates gas movement within the domain, resulting in an elevated gas fractional flow rate.

Fig. 14
figure 14

Effect of injection pressure for CO2 injection on the a relative permeability, b saturation profile, c fractional flow curve of live oil at IFT0 = 0.5 and yo = 1

Fig. 15
figure 15

Effect of injection pressure for CH4 injection on the a relative permeability, b saturation profile, c fractional flow curve of live oil at IFT0 = 0.5 and yo = 1

Fig. 16
figure 16

Effect of injection pressure for N2 injection on the a relative permeability, b saturation profile, c fractional flow curve of live oil at IFT0 = 0.5 and yo = 1

Effect of IFT0 on the output of the model for live oil

The impact of IFT0 on the model's output was examined as the final sensitivity analysis in this study. Higher injection and condensing mechanisms were found to have a greater impact on the model's output. Thus, the sensitivity analysis of IFT0 was carried out with an emphasis on the condensing mechanism and higher injection pressure for each gas. The influence of IFT0 on the output was found to be comparable to that of injection pressure on the model's output (Figs. 17, 18 and 19). With an increase in IFT0, the relative permeability of fluids was observed to increase (Subplot (a) of Figs. 17, 18 and 19). Moreover, an increase in IFT0 led to faster gas movement within the domain (Subplot (b) of Figs. 17, 18 and 19). The impact of IFT0 on the fractional flow curve is highlighted in Subplot (c) of Figs. 17, 18 and 19, showcasing a noticeable effect.

Fig. 17
figure 17

Effect of IFT0 for CO2 injection on the a relative permeability, b saturation profile, c fractional flow curve of live oil at 850 psi and yo = 1

Fig. 18
figure 18

Effect of IFT0 for CH4 injection on the a relative permeability, b saturation profile, c fractional flow curve of live oil at 4000 psi and yo = 1

Fig. 19
figure 19

Effect of IFT0 for N2 injection on the a relative permeability, b saturation profile, c fractional flow curve of live oil at 2000 psi and yo = 1

In summary, when the condensing mechanism is the dominant mechanism in the gas injection process, a lower IFT and near-miscible pressure are achieved (Fig. 4). In other words, the condensing mechanism leads to a lower IFT and the earlier generation of the miscibility condition, which can result in better efficiency for the gas injection process. This is reflected in the model's output, where governing the condensing mechanism in the IFT measurement results in a more rapid flow of gas through the medium and an increase in the relative permeability curve of fluids (Figs. 5, 6, 7, 8, 9, 10, 11, 12 and 13). Furthermore, in the condensing mechanism and IFT0 = 0.5, a higher injection pressure resulted in a faster movement of fluid and an increase in the relative permeability of fluids (Figs. 14, 15, and 16). This behavior has been observed in the sensitivity analysis of IFT0, where a higher IFT0 resulted in an increase in the relative permeability of fluids and a faster movement of gas in the medium (Figs. 17, 18 and 19). It is worth mentioning that, similar to the effect of vaporized oil in the gas phase, there is no specific trend for the fractional flow curve with changes in injection pressure and IFT0. Therefore, three factors, including the condensing mechanism, higher injection pressure, and higher IFT0, result in better efficiency during the gas injection process as follows:

  1. 1.

    When the condensing mechanism is dominant in the medium, the injection fluid displaces the medium's fluid in a piston-like manner. This behavior is clearly evident in the relative permeability curve, where fluids have greater relative permeability during this mechanism.

  2. 2.

    Higher injection pressure during gas injection, while the condensing mechanism is dominant, results in more forces to push reservoir fluid. The higher relative permeability of the fluid and faster movement of gas are indications of the effect of injection pressure.

  3. 3.

    By increasing the IFT0, the miscibility condition occurs sooner, resulting in increased efficiency of the gas injection process.

It is noteworthy that all above-mentioned behaviors also holds true for a dead oil–gas system.

In the current study, the impact of gas injection is being explored. The developed code allows for the analysis of gas injection effectiveness in different conditions, including immiscible, miscible, and near-miscible states by adjusting fluid permeability and viscosity. This developed code enables a comprehensive evaluation of injection gas performance before implementing EOR techniques in the reservoir. By assessing different injection gases under varied conditions, investigating the effects of various mechanisms, injection pressure, and IFT0, informed decisions can be made when selecting an EOR method. It is crucial to thoroughly review and analyze variations in injection and reservoir fluid compositions to accurately simulate gas injection processes. Nevertheless, it should be noted that the developed code does not support investigating or determining the gas injection mechanism.

Conclusions

  1. 1.

    For both live and dead oil, the condensing mechanism resulted in decreased interfacial tension (IFT) and near-miscible pressure, while switching to a condensing-vaporizing mechanism led to an increase in both.

  2. 2.

    The impact of the mechanism on the methane-oil system was more significant compared to the other gases, indicating a stronger effect on the hydrocarbon gas than on nitrogen and carbon dioxide.

  3. 3.

    Control over the condensing mechanism during the IFT measurement leads to enhanced gas flow rate within the medium, along with an elevation in fluids' relative permeability curve.

  4. 4.

    In the condensing mechanism and interfacial tension at the minimum miscible pressure (IFT0) equal to 0.5, a higher injection pressure led to a faster fluid movement and an improved relative permeability of fluids.

  5. 5.

    Higher IFT0 led to an increase in the relative permeability of fluids and a faster gas movement in the medium.

  6. 6.

    The impact of IFT0 on the dead oil–gas system was higher than on the live oil–gas system.