**4. Methods**

The method is mainly composed of the acquisition and analysis of the three experimental measurements: the micro-CT, helium porosity, and the pulse transmission measurements. The overall method is shown in Figure 4. First, the collected carbonate samples were sawed into cylindrical plugs and scanned using micro-CT instruments. The obtained 2D images of micro-CT were filtered and enhanced to improve quality. Then, the pore space in each 2D image was acquired and the 3D pore spaces of the samples were constructed using the software AVIZO (manufactured by Visualization Sciences Group, FEI Co., Hillsboro, OR, USA) basing on the 2D pore space. After that, the pore space was divided into pores, vugs, and fractures according to the geometry and the diameter of each individual pore space. Finally, the pore structure parameters were calculated to quantify the characteristics of the pore space and analyze its effect on wave speeds. The density and porosity were measured with helium and the wave speeds were determined using the pulse transmission technique. The following two subsections provide details of pore space acquisition, helium porosity measurements, and the pulse transmission measurements.

**Figure 4.** Workflow chat for characterizing the pore space and analyzing its effect on wave speeds. After sawing the samples into cylindrical plugs, the samples are scanned using micro-CT. Then, the quality

of each acquired 2D micro-CT image is improved using image filtering and enhancement techniques. The pore spaces of the samples are constructed and divided into pores, fractures, and vugs basing on the geometric characteristics of each individual pore space. Finally, the pore-structural parameters are acquired and related to the density, porosity, and wave velocities to analyze its e ffect on wave speeds.

#### *4.1. Pore Space Construction and Division Method*

Median filtering and nonlocal means filtering were applied to the micro-CT images first to remove the speckled random noises and the Gaussian noises. Then, the micro-CT image was enhanced with the top-bottom hat transformation. Finally, the processed image was filtered again to remove the remaining noises that were also enhanced after top-bottom hat transformation.

For the division of the pore space, the total pore space was segmented into individual volumes using the watershed algorithm and then the individual volumes were classified into pores, fractures, and vugs according to its geometry and diameter. Usually, the fracture is identified from the pores and vugs using the ratio of the length and width over thickness and the vugs are separated from the pores by the diameter of the isovolumetric sphere. It should be noted that using only the ratio of length over the thickness may mistakenly classify a throat into a fracture (Figure 5). Thus, we used both the ratio of length over thickness and the ratio of width over thickness to avoid this issue. According to the standard of the studies area, the volumes having both the ratios of length over thickness and width over thickness higher than 10 were defined as fractures. The remaining volumes having an equivalent diameter longer than 2.0 mm were defined as vugs and those having an equivalent diameter shorter than 2.0 mm were defined as pores.

**Figure 5.** Illustration of the di fference between a throat and a fracture in geometry. The lengths of a throat and a fracture are both usually significantly longer than their widths and thicknesses. The di fference is that the width and the thickness of a throat are close while the width of a fracture is usually significantly longer than the thickness of it. To avoid mistakenly acquire a throat as a fracture, both the ratios of length over thickness and width over thickness should be large.

After dividing the total pore space into pores, vugs, and fractures the pore structural parameters are quantified. The porosity of the whole pore space, the pores, the vugs, and the fractures were calculated by dividing the total amount of the pixels in the whole pore space, the pores, the vugs, and the fractures over that of the whole sample, respectively. The equivalent pore diameter was calculated by averaging the diameters of the isovolumetric spheres of the pores and the vugs. The orientation of a fracture was defined by the normal vector of the fracture surface.

#### *4.2. Porosity and Wave Velocity Measurements*

The porosity of the samples was determined with the single-cell He-gas filling method to o ffer a reference for the micro-CT pore-space construction. The pore volume was determined using Boyle's Law under room temperature and a confining pressure of 3 MPa applied to the external surface of the sample jacket. The diameter and the length of the samples are both measured three times for each sample using a caliper and the averaged diameter and length were used to calculate the volume of the cylindrical samples. The porosimeter apparatus was built based on API RP40 (1998) [52] as shown in Figure 6. Before measuring the porosity of the samples, the measurement system was calibrated using a standard sample to calibrate the system dead volume. The total pore volume of the samples was determined following API RP40 (1998) and the porosity was obtained by dividing the volume of the pore space over that of the sample.

**Figure 6.** Scheme of the wave velocity measurement system. The system is mainly composed of three parts that provide confining pressure, porosity measurement, and pulse transmission measurement, respectively.

The wave velocities of the P- and S-waves of the collected carbonate samples were determined with the ultrasonic pulse transmission technique. The voltage step was periodically applied to the piezoelectric ceramic to generate a pulse. The generated pulse transmits throughout the sample and encountered the piezoelectric ceramic used to receive the pulse by converting the vibration back to an electrical voltage. The voltage was recorded into the computer by an 8-bit digitizer and a digital oscilloscope programmed using LabVIEW software. The sampling rate was 10.0 ns. The averaged receiving signal was stacked over 300 times and then collected. The transit time was picked at the first amplitude peak of the received waveform. The calibration of the transducer delay was determined from the measurements taken on a set of cylindrical aluminum plugs (6061-T6) with different lengths following Melendez-Martinez (2014) [53]. By plotting the transit time against cylinder length, the excitation delay, equaling 16.16 μs for the longitudinal-mode piezoelectric discs or 8.82 μs for the transverse mode piezoelectric plates, was obtained from the non-zero intercept of the fitting line. The measurement was taken under a confining pressure of 70 MPa (the in-situ confining pressure).
