{'fraction_non_alphanumeric': 0.02688231601491821, 'fraction_numerical': 0.01654296370148813, 'mean_word_length': 4.9273363974611515, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A 3D FIB‐SEM technique for quantitative characterization of oil shale's microstructure: A case study from the Shahejie Formation in Dongying Depression, China

Investigating the pore structure of shale rocks plays an important role in understanding the mechanism of shale oil accumulation and migration; thus, it has a notable influence on the exploration and development of shale oil resources. In the present study, the microstructure of oil shale samples extracted from the Shahejie Formation in the Dongying Depression was investigated through the joint usage of focused ion beam (FIB) and scanning electron microscopy (SEM). Herein, we selected four representative samples. The SEM images of the sample surfaces milled by FIB indicated that pores were found in both the organic and inorganic matter. Organic pores were less developed in the samples because of the low thermal maturity of the organic matter. Continuous 3D digital rock images of shale samples were generated by FIB grinding and SEM in situ imaging. Based on multithreshold segmentation, the shale rocks were separated into different parts including kerogen, inorganic matter, and pores. The pore connectivity and pore size distributions were analyzed via Avizo software and in‐house developed MATLAB scripts. The pore size and corresponding volume distributions suggested that mesoscale pores (2‐50 nm) were abundant in the samples but they contributed limitedly to the total pore volume. Macropores (>50 nm) accounted for a small proportion but they had a greater contribution to the overall pore space volume. The coordination numbers of the subject four samples were mainly 0 and 1, which means that isolated pores accounted for the vast majority of the pores. These observations are critical to conduct reliable petrophysical simulations in the oil shales and understand their intrinsic properties accurately.

replace conventional oil. The exploration and development of shale oil have received widespread attention from petroleum geologists. [4][5][6][7] The Dongying Depression is one of the oil-rich depressions in the continental basins of eastern China. Several industrial oil resources have been found in the shale of the Eocene-Oligocene Es3 and Es4 of the Shahejie Formation. 8,9 The pore structure of reservoir rock dominates the electrical properties, elastic properties, storage properties, and transmission characteristics of rock. [10][11][12][13][14][15][16][17][18] Thus, it has a significant influence on the hydrocarbon exploration and development of the area. In the process of reservoir evaluation, the characterization and quantitative analysis of pore structures is one of the core subjects of the microscopic properties of tight reservoir rocks. For both conventional and unconventional reservoirs, the pore geometry, the pore size distribution, and the matching relation of the pore and throat have important effects on the petrophysical properties of formation rock. Unlike conventional sandstone reservoirs, which mainly have micron-sized pores, most pores in shale are mainly submicron and nano-sized, and their pore structure is more complex. 19,20 Many laboratory analysis techniques have been used to qualitatively and quantitatively characterize the complex pore structure of shale. The commonly used experimental methods include mercury injection capillary pressure (MICP), nitrogen gas adsorption, scanning electron microscopy (SEM), nuclear magnetic resonance (NMR), and micro computed tomography (CT). 14,21-28 These methods have given important insights into understanding the pore structure of shale rock, but they also have some limitations. Liquid mercury cannot easily enter nano-sized pores, and high pressure may destroy the original pore structure and generate artificial cracks. The gas adsorption method can obtain the specific surface area, pore volume, and pore size of the porous media but cannot obtain the structural information of isolated pores, which has great significance for the storage of hydrocarbon. Moreover, these are indirect methods to obtain the pore structure and morphological information. SEM is widely used to describe the pore morphology and pore type, but it reflects only the two-dimensional (2D) information of pore structure and cannot characterize the three-dimensional (3D) pore space. NMR analysis can determine the pore size distribution by measuring the transverse relaxation time, but it cannot identify whether the pores are connected or not. Micro-CT is commonly used in digital rocks to generate 3D rock volumes but is insufficient to characterize the nanopore structure of shale rock. 29 Unlike the above methods, FIB-SEM is a technology that can directly analyze the pore structure of shale in two and three dimensions. Although FIB-SEM imaging is relatively expensive and time-consuming, it has become an effective method to study the pore structure of shale because of its advantages. [30][31][32] FIB is capable of precise cutting in situ, and SEM is capable of high-resolution imaging. Using a combination of FIB and SEM, it is possible to construct a 3D digital rock at the nanoscale. Many researchers have studied the pore structure of shale gas reservoirs of high thermal maturity in the application of FIB-SEM but have paid little attention to the pore structure characterization of oil shale with low thermal maturity. In this article, we qualitatively and quantitatively analyze the pore structure of oil shale samples from the Shahejie formation of the Dongying depression using FIB-SEM and digital rock technology. Two-dimensional SEM images were directly used to qualitatively analyze and classify the pore types of shale samples. The 3D digital rocks of the oil shale sample were constructed by processing and aligning the FIB-SEM images. In addition, the pore connectivity, pore size distribution, and pore volume contribution were analyzed based on the pore network model and MATLAB script from the 3D digital rocks of the four samples. These observations provide the deeper comprehension of the oil shale's nano-sized pore structure, which is essential for performing reliable reservoir simulation tasks.

| Geological setting
The Bohai Bay Basin is one of the major oil-and gas-producing areas in China. 9 The Jiyang sub-basin is in the southeastern part of the Bohai Bay Basin and consists of Dongying, Huimin, Zhanhua, and Chezhen depressions. The Dongying Depression is a typical open Mesozoic-Cenozoic graben-like depression. It is the largest second-order negative tectonic unit in the Jiyang sub-basin and covers an area of approximately 5700 km 2 . 33 The Paleogene stratum of the Dongying Depression is composed of the Kongdian, Shahejie and Dongying formations with a sedimentary layer up to 7 km. Shahejie Formation (Es) includes Es4, Es3, Es2, and Es1 members from bottom to top, among which the upper section of Es4 and the lower section of Es3 contain the primary source rock. 3,19,34 The Dongying Depression is composed of four sags: the Boxing, Niuzhuang, Lijin and Minfeng Sags. The target well of the present study, FY1, is in the middle part of the Boxing Sag ( Figure 1).

| Sample characteristics
The FY1 well is the first key unconventional oil and gas pre-exploration well deployed in the Fanjia area of Shengli Oilfield. This well is of great significance to know the petrophysical properties and oiliness of the shale reservoir in the lower section of Es3, and upper section of Es4 in the Boxing Sag. Core samples collected from the Shahejie Formation of well FY1 were used in this study. All shale samples were drilled and immediately sent to the laboratory for petrophysical and geochemical analyses. Among those samples, four samples were milled and scanned by FIB-SEM technique ( Figure 1B). The basic information of the four samples is shown in Table 1.

| FIB-SEM technique
FIB-SEM is a dual-beam device that incorporates a tilted focused ion beam and a vertical scanning electron beam in a single system where the ion beam is used for milling and the electron beam is used for imaging. The ion beam, positioned normal to the surface, removes materials from the substrate allowing the exposure of subsurface features. Currently, the most commonly used ion source in commercial systems is gallium (Ga). The diameter of the gallium ion beam emitted by the ion source can be controlled to nanoscale after being constrained by lens system and aperture strip. The milling function of the ion beam is achieved by sputtering the surface atoms of the sample through the collision between the ion beam and the surface atoms. The electron beam, at an angle, is directed toward the sample, and upon interaction, it generates signals that are used to create high magnification images of the sample. The stage is tilted at 52° but because the beam position, dwelling time, and size are well-controlled, the electron beam can be applied to remove materials locally in a highly controlled manner down to nanometer scale. A graphical description of the basic FIB-SEM device can be seen in Figure 2.

| Experimental process
A FEI Helios 650 FIB-SEM instrument located at iRock Technologies was utilized to obtain digital images used in this study. The essential specifications of Helios 650 are listed in Table 2.
Shale samples were drilled and cut into round cakes with a diameter of 25 mm and a thickness of approximately 5 mm. All cakes needed to be sanded with dry emery paper to create a relatively smooth section and then polished by a broad Ar + ion beam. As a standard procedure, the polished sample surface required some conductive coating through which the charge could be dissipated. Hence, after polishing, the samples were glued onto a sample holder using carbon paste, and  an additional layering of carbon paint was coated around the sample to provide a conductive surface layer to reduce the curtaining artifacts. 35 The distribution of shale pores is highly heterogeneous. How to remove the problems caused by heterogeneity and obtain the true information of the desired microporous area is a key problem to be solved. There has always been a contradiction between the scale of observation and the resolution of the image. If no additional information is available to help choose the location, FIB-SEM analyses are blind in selecting target regions. 36 Because the purpose of our research was to characterize the pore structure of shale rock, we mainly focused on the pore-rich regions. Therefore, a procedure proposed by Saif 37 (2017) was used to choose FIB-SEM locations for our shale rock. We first observed the BSE image in a large field of view to find the pore-rich region as the desired microporous area, and then used FIB and SEM for milling and imaging. Figure 3 shows the procedure to choose the region of interest (ROI). Through this process, the accuracy of the calculation results of the pore microstructure was ensured.
When the target location was chosen, the ion beam removed material from the prepared sample as thin as 10 nm, allowing the exposure of subsurface features. The electron beam scanned the subsurface of the sample and recorded signals that were used to form images at the nanoscale. 38 Through continuous and repeated milling and imaging, a series of SEM images was obtained at a high resolution of 2.5 nm, with an acceleration voltage of 2 kV and a working distance of 4 mm. Using the combination of FIB and SEM techniques, the shale microstructure information could be extended from 2D to 3D, and the internal microstructure of shale samples could be observed. Figure 4 shows the image sequence generated via FIB-SEM.

| Preprocessing of FIB-SEM images
When milling via FIB, the section images in the sequence generated with SEM were often mis-aligned with each other due to stage drifting. 39 We could overcome this artifact through an image registration process using a geometrical transformation between two adjacent images to minimize the spatial misalignment between them. The image registration approaches can be classified according to the transformation models based on such relationships between the target-reference images as rigid transformation and nonlinear transformation. 40 Rigid transformation represents global translation and rotation between two images, which can be used to solve the problem of image misalignment caused by stage drifting. In a two-dimensional image, the transformation of coordinate point (x, y) to point (x ′ , y ′ ) after rigid body transformation is defined as where and (Δx, Δy) are the rotation angle and the translational differences between two adjacent images, respectively. A least-square method based on image gray values was utilized to minimize the misalignment between two adjacent images based on the rigid transformation model. When the first slice of the captured images was used as a reference image and all other slices were aligned against it, the result before and after image registration was as shown in Figure 5. The cut surface was defined as the XY plane, and the slice increasing direction was defined as the Z axis, as shown in Figure 2. After image registration, the aligned image needed to be cut out of the edges without sample information.
In the process of milling and scanning, the electron beam was usually at an angle of approximately 52 degrees to the ion beam ( Figure 2). Therefore, each captured raw FIB-SEM image had a geometrical artifact compared to the real section and could not reflect the true size of the section. 31 The geometrical artifact could be corrected by multiplying a correction factor in the y direction. This correction factor depended on the angle between the electron beam and the ion beam. For instance, for a 52 degrees angle, the correction factor was 1/ sin (52).
In addition, the median filtering and background equalization functions in the open-source image processing ImageJ software were used to improve the quality of the FIB-SEM images for further study.
After image processing, The SEM image sequences of each shale sample listed in Table 1 were used to generate 3D digital rocks. A 3D volume of a shale sample with ID FY1-684 is shown in Figure 6 as an example. Figure 6A displays a 3D volume of shale reconstructed from a sequence of SEM images. With multithreshold segmentation of this volume, different components such as kerogen, pyrite, and pores were segmented out. Figure 6B-D shows the renderings of the kerogen, pore, and pyrite, respectively, after multithreshold segmentation. Further study could be performed based on the segmented images. Reconstructions were performed on all samples listed in Table 1.

| 2D scanning electron microscopy imaging
Two-dimensional SEM images at nanoscale resolution are commonly used to observe the pore geometry and pore The hydrocarbon-wet organic pores have a significant influence on the resistivity logging and affect the calculation of fluid saturations. The 2D SEM images showed that in our samples, the organic pores were rarely developed compared to other shale formations as Barnett shale in America 44 and Longmaxi shale in China. 30 This is because the degree of organic pore development is related to the thermal maturity of organic matter in shale. Organic pores easily occur in organic matter with high thermal maturity (Ro), and shale oil reservoirs are low in thermal maturity (Ro) compared to shale gas reservoirs. 26,45 The vitrinite reflectance value of shale samples in the Shahejie formation is between 0.29% and 0.93%, with an average of 0.57%, and the thermal evolution degree is at the stage of immaturity to low maturity. 46 Figure 7A shows an SEM image of a pyrite framboid from sample FY1-747.
In the pyrite framboid, organic matter that contains organic pores can be seen. Figure 7B is an SEM image from sample FY1-684, from which we can see a small number of organic pores distributed in the organic matter.
Many inorganic pores were observed in our shale samples, which included interparticle (interP) and intraparticle (intraP) pores. The interP pores mainly occurred between brittle minerals, such as quartz and feldspar ( Figure 7C,D). Nevertheless, IntraP pores were observed within quartz or feldspar particles ( Figure 7C) and also within intraplatelet pores within clay aggregates ( Figure 7D).
Microfractures, as a bridge between micropores and macrofractures, play an important role in the flow of shale oil and gas. Microfractures are the preferred channel for hydrocarbon seepage at the microscale and provide space for shale gas storage. [47][48][49] The fractures are developed in three patterns: microfractures in organic matter, microfractures in inorganic matter, and microfractures between organic matter and inorganic minerals ( Figure 7E-H). In low-porosity and low-permeability shale, if abundant microfractures are developed, mud shale can become an effective oil and gas reservoir.

| Pore space connectivity
The 3D digital model reconstructed by FIB-SEM can be used to visualize the 3D distribution of the internal microstructure of shale and provides a model for studying the petrophysical F I G U R E 6 3D reconstruction of FIB-SEM imaging data from sample FY1-684. (A) A 3D volume generated from 785 SEM images. With multithreshold segmentation of this volume, kerogen (B), pores (C), and pyrite (D) were segmented out and petrological characteristics of the shale reservoirs. The pore space connectivity was analyzed based on 3D digital models via a module called "Connected Components" in the Avizo Environment. The connected pore space was segmented by setting a minimum threshold for smallest connectivity of the pore volume. 31,39,50 The threshold used in this research for pore connectivity was set to 10 5 connected pore voxels. 39 Figure 8 shows the connected pore space of four samples. The images on the left ( Figure 8A) show the pore space segmented by multithresholding of the 3D digital rock. The corresponding images on the right ( Figure 8B) show the connected pore space analyzed using the connected F I G U R E 7 Examples of different type of pores. (A) Pyrite framboid filled with kerogen containing organic pores, (B) a small number of organic pores distributed in the organic matter, (C) InterP pores between brittle minerals and IntraP pores within quartz or feldspar particles, (D) InterP pores between brittle minerals and intraplatelet pores within clay aggregates, (E) microfractures in organic matter, (F) shrinkage fractures between organic matter and inorganic minerals, (G) microfracture network distributed in organic matter, and (H) microfracture in inorganic matter component module. The numbers of connected components with a threshold of 10 5 neighboring pore voxels for FY1-415, FY1-684, FY1-747, and FY1-1469 were 21, 17, 13, and 25, respectively. Moreover, the corresponding ratios of connected pore volume to total pore volume were respectively 75.5%, 25.8%, 28.9%, and 59.1%. In the four samples analyzed, no single connected pore network was observed to span the whole dimension of the reconstructed volume. The connected pore space in the four shale samples turned out to be sheetlike because of the linear pore structure. This phenomenon could be observed in the 2D images in Figure 7E-H.

| Pore network model
The "maximum ball" algorithm was used to extract regularized pore and throat models for 3D digital core images after binary segmentation to represent the pore space. [51][52][53] The pore structure model simplifies the pore space of the 3D digital core but retains the pore space distribution characteristics of the original core image. The "pore" and "throat" in the pore network model are determined by finding the local maximum ball and the smallest ball between the two largest balls in the ball string. The final 3D digital core pore space can be simplified into a "ball" and "tube" model. Figure 9 F I G U R E 8 Result of connected pore space analysis of four samples. (A) All pores and (B) connected pore space with a minimum threshold of 105 connected pore voxels shows the extraction result of the rock sample FY1-684 pore network model, where the balls represent the pores and the tube represents the throat.
From the extracted 3D pore network model, in-house developed MATLAB scripts were used to calculate the spatial information of the pore geometry. Through the statistical analysis of the pore size and coordination number, a quantitative characterization of the microscopic pore structure could be achieved. According to different quantitative classification schemes, based on their sizes, pores would be divided into micropores, mesopores, or macropores. 54,55 At present, the generally accepted quantitative classification scheme of pores applied to the shale reservoirs is that of the "International Union of Pure and Applied Chemistry (IUPAC)". According to the definition of IUPAC, pores are classified into three groups, namely micropores (<2 nm), mesopores (2-50 nm), and macropores (>50 nm). 56 Generally, shale is dominated by nanoscale pores, and pores of 2-50 nm are typically developed. Therefore, the IUPAC classification scheme has a good adaptability to quantitatively evaluate the pore size distribution of shale and is widely used by different researchers. 22,26,[57][58][59][60] Figure 10 shows the pore size and volume distribution obtained through statistical analysis of the pore network model. The histograms show that the pore size of each sample shows an overall positively skewed distribution. The pore size of FY1-415 was most abundant between 5 nm and 30 nm, with a peak at 10-15 nm ( Figure 10A). The pore sizes of FY1-684 and FY1-747 had a similar range, and both were mainly distributed between 5 and 40 nm, with a peak at approximately 15 and 20 nm ( Figure 10B,C). FY1-1469 had a wider range of pore size distribution, that is, 5-70 nm, with a peak value of 25-30 nm ( Figure 10D). According to the IUPAC classification scheme, the count percentage of mesopores in FY 1-415 was 69.5%, but the corresponding pore volume contribution was only 5.4% and the range of pores with largest volume contribution was 135-140 nm as shown in Figure 10A. Similarly, the count percentages of mesopores for FY1-684, FY1-747, and FY1-1469 were respectively 92.6%, 97.3%, and 78.2%, and the corresponding pore volume contributions were respectively 23.1%, 25.6%, and 21.0%. Herein, the range of pores with the largest volume contribution of the three samples was 75-80 nm, 145-150 nm, and 65-70 nm, respectively ( Figure 10B-D). The pore size and volume distributions showed that mesoscale pores with the pore size of 2-50 nm were abundant in our shale samples, but they contributed less to the total pore volume. Macropores larger than 50 nm accounted for a small proportion in number, but contributed significantly to the total pore volume, which has great significance for shale oil storage capacity.
Pore connectivity has great importance for the shale oil accumulation and migration. Pore connectivity can be expressed by coordination number, which is the number of throats connected to the pore. Figure 11 shows the distributions of coordination number for the shale samples from the Shahejie formation. Among these four core samples, FY1-684 had better connectivity than other cores. The coordination numbers of the four samples were mainly 0 and 1, which means that isolated pores accounted for a vast majority of pores, and the pore connectivity was poor. Therefore, artificial hydraulic fracturing (HF) is required for the development of the shale oil reservoir in the study area. HF connects the isolated pores or microfractures with induced fractures and is a key technology for development of most unconventional resources.
FIB-SEM methods allow visualization of the interior structure of shale in microscopic regions, which can be used for further analyzing the nanopore structures. A high-resolution reconstructed 3D model of the shale's microstructure can be used to determine the influence of the microstructure on the migration properties of hydrocarbons, and thus to evaluate the production ability of shale formations. Moreover, the 3D morphological and distribution characteristics of the shale microstructure provide the knowledge essential for understanding the impact of micro factors on petrophysical properties of shale reservoirs. In our research, two-dimensional SEM images were directly used to qualitatively analyze and classify the pore types of shale samples. The pore connectivity, pore size distribution, and pore volume contribution were analyzed based on the pore network F I G U R E 9 Visualization of (A) pore space and (B) the corresponding pore network model model, which makes full use of the collected data. In addition, our research is the first one to use the FIB-SEM method in analyzing the pore structures of oil shale with low thermal maturity, which improves the accuracies of calculating the pore structure parameters and lays a foundation for the further study of electrical and seepage characteristics based on shale digital cores.

| CONCLUSION
FIB-SEM has become a mainstream and effective instrument to characterize nanopores in shale in recent years because of its advantages. The microstructure of shale samples from the Shahejie formation of Boxing sag was analyzed by 2D imaging and 3D reconstruction simultaneously. The 2D imaging results showed that the pores occurred in both organic and inorganic matter. The pores could be divided into three categories: organic pores, inorganic pores, and microfractures. Organic pores were less developed in the shale sample of the Shahejie formation in the Dongying depression because of the low thermal maturity of the organic matter. Significant inorganic pores and microfractures were seen in the samples. 3D digital rocks were constructed from sequences of 2D SEM images of the shale samples, and the pore size distribution and corresponding volume contributions were calculated using the pore network model. According to the IUPAC classification scheme, most pores were at the mesoscale (2-50 nm) with a dominant pore size of approximately 20 nm, but they contributed less to the total pore volume. Macropores larger than 50 nm accounted for a small proportion in number, but they had a greater contribution to the pore volume, which has great significance for shale oil storage capacity. Considering the poor connectivity of the pore space in the shale oil, well stimulation technique such as hydraulic fracturing is required for economical production from these reservoirs. The authors would also suggest the joint study F I G U R E 1 0 Pore size and volume distributions of four shale samples. The green bars indicate the count percentages of the pores at a given bin size, and the red lines with black squares indicate the corresponding volume contribution to the total pore space of the sample of FIB-SEM imaging and deep learning for better characterization of the oil shale's pore space as a future extension to the present study.