In-situ characterization of capillary pressure during three-phase flow in porous media

. We characterize the pore-scale fluid distributions, phase connectivity, and local capillary pressures during three-phase flow in a water-wet Berea sandstone sample. In this investigation, we use a set of x-ray micro-tomography images acquired during three-phase core-flooding experiments conducted on a miniature core sample. We use several image analysis techniques to analyze the pore-scale fluid occupancy maps and use this information to develop several insights related to pore occupancy, oil and gas cluster distribution, and interfacial curvature during the gas injection process. The results of our investigation show that the large, intermediate-, and small-sized pores are mostly occupied with gas, oil, and brine, respectively, which is consistent with the wetting order of the fluids (i.e., gas, oil, and brine are the nonwetting, intermediate wetting, and wetting phases, respectively). In addition, the connectivity analysis reveals that a significant amount of the gas phase was in the form of disconnected ganglia separated from the connected invading cluster. The presence of these trapped nonwetting phase clusters during the drainage process is presumably attributed to Roof snap-off and Haines jump events, as well as the anti-ripening phenomenon. Moreover, the average local oil-water capillary pressures are found to be greater than the gas-oil counterparts. This observation is then related to the relative location of the interfaces in the pore space and the threshold capillary pressures at which the various displacement events take place.


Introduction
Simultaneous flow of gas, oil, and aqueous phases in natural porous media are encountered in various areas of science and engineering, such as enhanced oil recovery processes and CO2 sequestration in depleted oil reservoirs.The flow behavior in these systems is more complicated than twophase flow conditions [1,2] and is controlled by numerous factors including, but not limited to, wettability, interfacial forces between each fluid pairing, and the saturation history.
Previously, many studies have been dedicated to investigating the macro-and micro-scale behavior of threephase flow systems.While the macro-scale studies in this field have mostly focused on three-phase relative permeability and oil recovery as functions of the key parameters (e.g., spreading coefficient, wettability, and saturation history) [3,4], the initial micro-scale research attempts, mostly conducted using micromodels [5,6,7,8], have been directed toward presenting detailed descriptions of the pore-scale displacement mechanisms and fluid distribution in the pore space.The information generated during these experimental works has then been used in developing pore-network models to predict fluid occupancy, relative permeability, and capillary pressure in natural rock samples and under various three-phase flow scenarios [9,10].
The insights provided by the micro-scale studies have been frequently used to enrich pore-scale physics and improve the predictive capabilities of pore-scale models.In recent years, the advent of x-ray microtomography imaging and integration of these systems with core-flooding apparatuses has opened a new window of opportunity to directly observe the multi-phase flow phenomena in natural rock samples and further advance the understanding of such flow behavior on a pore-by-pore basis.Additionally, the advancement of image-based analysis has allowed for better characterization of such phenomena on a quantitative basis [11,12,13].Several researchers have used these tools to conduct pore-scale studies for three-phase systems.For instance, Iglauer et al. [14,15] have examined the impact of secondary and tertiary gas injection processes on the residual oil and gas trapping in water-and mixed-wet sandstones.The micro-CT imaging technique has also been used to investigate the interrelationship of pore-scale fluid configuration, in-situ wettability, and displacement mechanisms in water-wet sandstone [16], oil-wet carbonates [17], and fractured porous media [18].The research studies in this field have recently been extended to other subjects, including the gas-oil miscibility [19], the dynamics of threephase flow [20], and CO2 storage in oil fields [21].
The efforts mentioned above have provided valuable insights into the micro-scale behavior of three-phase systems.Nonetheless, there have always existed some uncertainties in describing the pore-scale displacement mechanisms for threephase flow due to the limited tools available for image analysis and the complexities associated while performing the flow experiments in natural core samples.In this study, we use improved methodologies to more accurately quantify the multi-phase flow parameters and shed more light on the porescale subtleties of a secondary gas injection experiment conducted in a miniature core sample.Specifically, we investigate the gas trapping behavior during a steady-state gas injection (drainage) process and highlight the possible porescale displacement mechanisms behind this.Moreover, we characterize the interfacial curvature and the respective in-situ capillary pressure to examine the pore-scale displacement mechanisms and the conditions for the formation of oil layers.The results of this study are of high importance for future pore-scale experimental and modeling research.

Experiments and data acquisition
In this study, we analyzed the micro-CT images obtained during a three-phase flow experiment in a water-wet Berea sandstone sample [16].The diameter, length, porosity, and permeability of the sample were 81 mm, 4.47 mm, 0.186, and 584.46 mD, respectively.A synthetic brine solution, decalin, and nitrogen gas were used as, respectively, the wetting, intermediate-wetting, and nonwetting phases in this rockfluid system.The three phases were brought into equilibrium at the experimental conditions (i.e., 5.52 MPa and 20 ° C) before injection into the rock sample to minimize mass exchange between the phases during the flow processes.The equilibrium spreading coefficient of the oil phase was measured to be -5.04 mN/m, which implies that the oil phase had non-spreading behavior.The experiment was conducted using a core-flooding apparatus integrated with a highresolution micro-CT scanner.As shown in Figure (1), the core sample was first fully saturated with brine and then subjected to a drainage process using the oil phase to establish a target initial water saturation.The experiment was then followed by a secondary gas injection process through simultaneous injection of all three fluid phases, and the system was allowed to reach stable conditions.At this point, the region of interest was imaged at a resolution of 1.5 µm to generate grayscale images of the fluid occupancy in the pore space.More details about the fluids and experimental apparatus and procedure can be found elsewhere [16].

Image analysis
The raw grayscale images acquired during the core-flooding experiment were processed using the Avizo software [16].The images were first filtered using the non-local means filter to improve the signal-to-noise ratio, combined with the corresponding pore map, and subsequently segmented using the interactive thresholding method to generate the pore-scale fluid occupancy maps, i.e., images with unique labels assigned to the gas, oil, aqueous, and solid phases.We then analyzed these images using specific techniques, as mentioned in later sections, to obtain pore-by-pore fluid occupancy data, investigate the volume, connectivity, and morphology of the oil and gas clusters, and characterize the in-situ capillary pressures.

Pore-by-pore fluid occupancy
Pore-scale fluid occupancy maps can be used to calculate the saturation of each phase in various ranges of pore sizes.Previously, Scanziani et al. [22] proposed a technique to superimpose spheres with specific sizes -representing the pore elements [23]-on the wet images.The dominant phase in each pore is then assigned to the corresponding sphere, and the results are aggregated to calculate the saturation of each phase in various pore-size ranges.In this study, however, we employed a different technique that uses images of the separated pores instead of the spheres extracted using the maximal ball technique.The separated pores were generated using a specific module in the Avizo software that computed the watershed lines of the pore map to identify the local dilations and constrictions in the pore space.The image of the separated pores and the pore-scale fluid occupancy map were then used as input to an in-house MATLAB code, which superimposed the two images and quantified the pore-by-pore fluid occupancy (i.e., volume/saturation of each phase in the pores).The input images were partitioned into sub-volumes, and the computations were performed on multiple CPU cores to account for the large size of the data.Finally, the results were recombined for the entire image.This methodology is assumed to be more accurate since it preserves the pore space geometry, and hence the fluids occupying pore corners and crevices are included in the pore occupancy calculations.An example of the segmented wet image and the separated pore map are shown in Figure (2).

Oil and gas cluster analysis
Each of the fluid phases in the pore space is formed of numerous connected and disconnected clusters of various sizes that can reside in the center of a single pore or span over several pore elements.The study of the connectivity and morphology of these clusters allows one to gain better insights into the multiphase phenomena within the pore space.To conduct this type of analysis, we generated separate images of the oil and gas phases and analyzed each set to identify the size of the individual clusters forming that phase.We also computed the Euler number for each phase, a measure of the connectivity, given by the formula:  =  −  +  , where  is the number of disconnected objects,  is the number of loops and  is the number of holes.Furthermore, these data sets were used to quantify the contribution of clusters with various sizes to the total volume of the respective phase and investigated the relationship between the surface area (A) and volume (V) of the oil or gas globules.In addition, we computed the Euler characteristic for the oil and gas phases, which is indicative of the fluid's connectivity [24].

In-situ capillary pressure characterization
We also characterized the in-situ capillary pressure using the interfacial curvature analysis method described by Zankoor et al. [18].To this end, we first extracted the free interfaces between each pair of fluids (i.e., oil-water, gas-oil, and gaswater) from the segmented images using the Marching cubes algorithm.The extracted meshes were then smoothed to reduce the impact of discretization on curvature analysis using an implicit fairing method [25,26].Afterward, the local curvature values were computed at each point (vertex) on each interface, and a representative average value was found to estimate the local capillary pressure between each fluid pair using the Young-Laplace equation: where  is the capillary pressure in Pa,  is the interfacial tension between phases  and  in N/m, and  is the average total curvature of the interface in m -1 (i.e., summation of the principal curvatures).To obtain an average value of the total curvature, we use arithmetic averaging of the per-vertex curvatures.An alternative approach is to use an areaweighted average, where each per-vertex curvature value is given a weight based on the area of the surrounding mesh elements, which, however, requires further investigation which is beyond the scope of the current study.It should be noted that the vertices at the peripheral rings of the fluid-fluid interfaces (i.e., in contact with the solid surfaces) were excluded from the curvature analysis since these regions introduced significant uncertainties to the measurements.Further details regarding the methodology used for the extraction and smoothing of the fluid-fluid interfaces and the sensitivity analysis on the parameters used in the analysis can be found elsewhere [18].

Results and discussion
4.1.Pore-by-pore fluid occupancy We used the method discussed in section (3.1) to generate the following pore occupancy data from the segmented wet images of the gas injection process: (i) Size distribution of pore elements that are mostly saturated with gas, oil, or water phases (see Figure 3.a).To this end, we first categorize the pores into three groups based on the dominant occupying fluid (i.e., gas-, oil-, or water-filled) and then generate the pore size distribution for each of these groups.(ii) Fluid saturation in pores with different sizes (see Figure 3.

b). (iii)
The ratio of cumulative fluid volume to the total volume (i.e., cumulative saturation) for each phase as a function of pore size (see Figure 3.c).
Figure 3.a illustrates that each of the three phases occupied a wide range of pore sizes.Nevertheless, it is observed that most of the water-filled elements are of the smallest pores (smaller than 4.0 E+05 µm 3 ), while the distribution of the oil-and gas-filled pores shift toward more intermediate-and large-size pores, respectively.This pore occupancy preference agrees with the wettability order of this rock-fluid system, with water, oil, and gas being the most wetting, intermediate wetting, and nonwetting phases, respectively [27].
Likewise, Figure 3.b shows that water saturation is steadily higher than the oil and gas saturation in the smallest pore elements.This behavior occurred because the threshold capillary pressures for gas-to-water or oil-to-water displacement were the highest in the smallest pores, and hence the oil and gas phases had a smaller chance to invade those pore elements.In the intermediate-size ranges, however, a significant portion of the pore space is occupied by each of the three phases while declining trends for water and oil saturations are observed as the pore size increases.This observation is expected since it was more favorable for the gas (the most nonwetting) phase to invade the large pores.It is worth mentioning that the rise in water saturation in some of the intermediate-size pores (i.e., the range of 8.0 E+06 -1.2 E+07 µm 3 ) might be attributed to that the invading phases (oil and gas) did not have access to the entrance of all pore elements in this range, especially at areas with high clay content.As a result, some of the pores stayed water-filled during the drainage processes and contributed to the observed water saturation.
The observed saturation trend versus pore size is also reflected in Figure 3.c.This figure indicates that the water saturation built up earlier than the other phases (i.e., in smaller pores), whereas the gas saturation was increased significantly only when the contribution from the largest pores was added to the cumulative saturation.As seen, the final water, oil, and gas saturations in the FOV reached 0.32, 0.26, and 0.40, respectively.

Oil and gas cluster analysis
As mentioned previously, the oil and gas clusters after the gas injection process were extracted, and their size and distributions were investigated.Figure 4 shows the overall distribution of these clusters for each of the fluid phases.This figure demonstrates that the water phase was well connected (the connected blue cluster) over the FOV, whereas for the oil and gas phases, a significant number of globules with considerable sizes were disconnected and could be potentially trapped in the pore space.The connectivity of these clusters was further studied by quantifying the contribution of gas/oil clusters with various sizes to the total volume of gas/oil in the FOV.As shown in Figure 5, the disconnected gas and oil globules formed approximately 40% and 34% of the total gas and oil saturations, respectively.It should be noted that some of these clusters might be incorrectly considered disconnected.For instance, some of these clusters were truncated at the borders of the FOV and might be connected outside of it.Further analysis of the images revealed that the Euler numbers for the gas and oil phases were 3747 and 2442, respectively.For the oil phase, it is expected to see disconnected oil clusters since the oil phase in this study was non-spreading in the presence of gas and water phases, and hence it may form lenses enclosed by the other phases if certain local capillary pressure conditions are established in the system [28].For the gas phase, however, these observations are particularly interesting since (i) the continuous flow of gas was maintained during this process, and hence, one would expect to observe a well-connected network of gas clusters from the inlet to the outlet of the FOV, and (ii) the gas injection was a drainage event during which the trapping of the invading phase was less favorable compared to an imbibition process.Trapping of the most nonwetting phase during the secondary gas injection process can be explained based on some porescale displacement events such as Haines jump [29,30,20,11] and Roof snap-off [31,32].During a drainage process, the pressure of the invading phase gradually builds up at the pore restrictions.Once the capillary pressure exceeds the threshold capillary pressure of a neighboring pore element, the nonwetting phase invades into that pore with an abrupt movement (jump) of the fluid interface and a transient pressure response.The pore-filling event causes the fluid to be withdrawn from high-pressure locations to supply the invasion front in the low-pressure regions.As a result, and especially in three-phase systems, some clusters may be disconnected from the bulk of the invading phase and be hydraulically trapped in the pore space.Moreover, when the gas phase moves from a pore restriction (i.e., throat) to a pore body, the local capillary pressure can fluctuate significantly.This process may lead to swelling of the wetting phase layer and trigger local Roof snap-off events at the restriction that can trap the gas phase.In addition to Haines jump and Roof snap-off, it is also hypothesized that double or multiple displacement chains (e.g., gas-to-oil-to-gas) [6,9], and the ripening/anti-ripening phenomena [33] [34] could also contribute to the configuration of the gas phase in the porous medium.During the anti-ripening phenomenon, the gas phase occupying natural porous media may diffuse from large clusters into smaller ones, unlike in bulk mediums, since the former can be at higher local capillary pressures due to the confinements of the pore space.
We have also investigated the morphology of the gas ganglia by quantifying the relationship between the volume and surface area of these objects.These parameters can be related through a power-law correlation of    [35].The correlation exponent  is equal to 0.66 for a perfect sphere and increases as the morphologies of the ganglia become more tortuous or elongated.The result of such a comparison for the gas clusters in this study is shown in Figure 5.The power-law exponent for the gas phase was found -using the least-squares method -to be 0.79, which was consistent with the values reported in literature studies [15].

Gas
Oil Water Fig. 4. Three-dimensional visualization of the (from left to right) gas, oil, and water clusters after the gas injection process.The blue clusters are connected from the bottom to the top of FOV, whereas the other colors represent disconnected clusters.
Fig. 5.The cumulative contribution of gas/oil ganglia with various sizes to the total gas/oil volume.
Fig. 6.The surface area versus volume of the gas clusters during the secondary gas injection experiment.

In-situ capillary pressure
To quantify the in-situ capillary pressure using the methodology described in section 3.3, we partitioned the segmented image into 18 sub-volumes with equal sizes of 620×620×850 voxels.For each sub-volume, the interfacial curvature of the gas-oil and oil-water interfaces were estimated, and the representative average values were used to calculate the respective capillary pressures [11].The results are presented in Figure 7.The computed capillary pressures for each pair of fluids show some degrees of variation across the FOV.This variation is more significant for the gas-oil capillary pressures which is probably attributed to the fact that a significant portion of the gas phase existed in the form of disconnected globules, as discussed in section 4.2., which may have possessed different local capillary pressures [36].
The average oil-water capillary pressures were always greater than the gas-oil values, even though this is not the case for the average oil-water interfacial curvatures.This is attributed to the locations of the interfaces, as shown in Figure 8, which demonstrate that the oil-to-water displacements mostly took place at narrower capillary elements compared to the gas-to-oil events.Furthermore, the oil-water IFT is significantly higher than the gas-oil IFT ( = 45.16 mN/m >  = 26.61mN/m), while the receding contact angle is lower in the case of gas-oil interfaces [16] (which raises their curvatures).The combined effect of these three factors is that the threshold capillary pressures of the oil-to-water events would have presumably been higher than the gas-to-oil events.In other words, the gasto-oil displacement would take place at lower capillary pressures (i.e., Pg-Po) and in larger pores compared to the water-to-oil displacements.

. Conclusions
We characterize the pore-scale flow behavior during a steadystate gas injection process, where the three phases were injected simultaneously into a miniature Berea sandstone core sample.We used specific techniques to obtain pore-by-pore fluid occupancy data, analyze oil and gas clusters, and characterize the in-situ capillary pressure.In agreement with the wettability order of the system, the gas, oil, and water phases mostly occupied the largest, intermediate, and smallest pore elements of the system, respectively.Interestingly, we observed a significant amount of the invading gas phase trapped in the form of disconnected globules during this drainage process.The presence of these disconnected clusters was attributed to special displacement events such as the Haines jump and Roof snap-off.Moreover, the gas diffusion due to the anti-ripening phenomenon was also believed to contribute to the trapping of the gas phase.Finally, the oil-water local capillary pressures were found to  be higher than the gas-oil ones.This observation was attributed to the fact that the oil-to-water displacement took place in smaller pore elements in which higher threshold capillary pressures need to be overcome.

Fig. 2 .
Fig.2.Two dimensional cross-sectional views of (top) the segmented wet image during the gas injection process, and (bottom) the separated pore map with different labels assigned to the individual pore elements.

Fig. 3 .
Fig. 3. Pore-scale fluid occupancy data during the secondary gas injection process: (a) the size distribution of pores mostly occupied by each phase; (b) fluid saturation in various pore-size ranges; and (c) the cumulative saturation of each phase as a function of the pore size.

Fig. 7 .
Fig. 7.The average interfacial curvature and the respective capillary pressures in the twenty-four sub-volumes.

Fig. 8 .
Fig. 8. Examples of three-phase interfaces during the secondary gas injection process (rock, water, oil, and gas are shown in grey, blue, red, and yellow respectively).