Experimental evaluation and tomographic characterization of polymer gel conformance treatment

. Excessive water production from hydrocarbon reservoirs is considered as one of major problems, which has numerous economic and environmental consequences. Polymer-gel remediation has been widely used to reduce excessive water production during oil and gas recovery by plugging high permeability zones and improving conformance control. In this paper, we investigate the performance of a HPAM/PEI (water-soluble Hydrolyzed PolyAcrylaMide/PolyEthyleneImine) polymer-gel system for pore space blockage and permeability reduction for conformance control purpose. First, the gel optimum composition, resistance to salt and long life time are determined using bottle tests as a standard method to specify polymer-gel properties. Then the performance and stability of the optimized polymer-gel are tested experimentally using core ﬂ ood tests in sandpack core samples. The effects of different parameters such as gel concentration, initial permeability of the cores, and formation water salinity on the ﬁ nal permeability of the cores are examined. Finally, the gel ﬂ ow-induced local porosity changes are studied in both a sandpack core and a real carbonate sample using grayscale intensity data provided from 3D Computed Tomography (CT) images in pre- and post-treatment states. The results show that the gel system has a good strength at the middle formation water salinity (in the range of typical sea water salinity). In addition, despite a higher performance in high permeability cores, the gel resistance to degradation in such porous media is reduced. The CT images reveal that the initial porosity distribution has a great in ﬂ uence on the performance of the gel to block the pore space.


Introduction
Water produced during the production of hydrocarbons from underground formations constitutes the petroleum industry's most important waste stream on the basis of volume (Reynolds and Kiker, 2003). This problem is intensified in mature oil fields when the reservoir is subject to long water flooding. Water production creates additional costs due primarily for separation, handling and disposal (Seright et al., 2003). It may cause high levels of corrosion and scales, inevitably bring about increased load on fluid transport pipelines and facilities (Imqam and Bai, 2015), and pose environmental concerns due to the presence of toxic elements such as mercury and arsenic in the water. Ultimately, these can lead to the shorter economic life of a well (Chiappa et al., 2000).
For managing produced water, it is desirable to avoid production of water onto the surface in the first place. Among a variety of techniques, polymer-gel technology has been used for the problem of water production Bai et al., 2015b;Bailey et al., 2000;Bryant et al., 1996;El-Karsani et al., 2014;Hasankhani et al., 2019;Jia et al., 2012;Karimi et al., 2014;Lee and Lee, 2013;Nguyen et al., 2012;Reddy et al., 2003;Seright, 1992Seright, , 1995Seright and Martin, 1993;Zitha et al., 2002). In this method, the polymer-gel solution is injected into the oil/gas wells to selectively block the water's path to the wellbore, and consequently to improve the conformance while minimizing the adverse effects of reservoir heterogeneity during waterflooding operations. Polymer-gel treatment acts via two mechanisms of permeability blockage and relative permeability modification, also known as disproportionate permeability reduction (Bai et al., 2015a;Sydansk and Seright, 2006). The polymer-gel technology is based on a lowviscosity flowing mixture of a polymer and a crosslinker, known as a gelant. Both polymer and crosslinker are usually soluble in water. The gelant is usually prepared on the surface and then injected into the desired area. Gelant next reaches a three-dimensional network structure through the crosslinking reaction between a polymer and a crosslinker with time and temperature (El-Karsani et al., 2015).
PolyAcrylaMides (PAMs) are the most common polymers used for water conformance control and shut-off treatments. Polymer gels are generally divided into two groups based on the type of polymer-crosslinker reaction. The first one is based on cross-linking between carboxylate groups on the polyacrylamide hydrolyzed chain and trivalent cations (inorganic crosslinkers) (Ganguly et al., 2003;Karimi et al., 2016). The second one is based on a covalent bond between the organic crosslinker and polyacrylamidebased polymers such as PolyAcrylamide tert-Butyl Acrylate (PAtBA)/PolyEhylenImine (PEI) gel system. Some organic cross-linkers due to environmental problems are less applicable (such as formaldehyde and phenol), while PEI due to low-toxic effect has been widely utilized for water shut-off methods (Al-Muntasheri et al., 2008;Hasankhani et al., 2019;Jia et al., 2010Jia et al., , 2012Reddy et al., 2003).
The first study on polymer gels crosslinked with PEI was reported by Allison and Purkaple (1988). They stated that upon the mixing of 2.5% and 0.1% of PEI and PAM, respectively, a viscous gel was quickly formed at room temperature. Since then, several authors studied the performance and displacement of PAM/PEI and HPAM/PEI gel systems in a variety of porous media. Al-Muntasheri et al. (2008) examined the performance of the PAM/PEI system in Berea sandstone cores at 90°C and a pressure drop of about 70 bar. The system totally blocked the porous medium and remained stable for 3 weeks. El-Karsani et al. (2015) studied the PAM/PEI gel system in sandstone and carbonate samples and found a significant permeability reduction (more than 90%). Al-Muntasheri et al. (2010) studied the displacement of PAM/PEI gel system visually with Computed Tomography (CT). They used NaI brine to displace the gel due to the high atomic number of iodine, which led to a high attenuation of X-rays, and hence rendered a visual contrast in the CT images possible. A permeability reduction of more than 94% was obtained at 23°C for cores shut in at 45 and 50°C. It was also found that PAM/PEI gelants were washed out from sandstone cores by NaI brine (shut in at 21°C for 15 h). Gakhar and Lane (2012) introduced HPAM/PEI gel system as an environmental-friendly polymer-gel system for water shut off in fractured reservoirs. The HPAM/PEI gel system has several appropriate properties such as a longer gelation time and a higher gel strength at lower HPAM concentrations.
There are many factors affecting the use of polymer-gel, as a plugging agent, to selectively block water encroachment into the well, including subsurface geological features in particular. Most hydrocarbon reservoirs show complex geological heterogeneity due to the presence of rocks with a wide range of pore and grain sizes, different physical properties including permeability in particular, and the presence of natural features such as fractures. Reservoir heterogeneity, e.g., spatial variations in permeability, has been known as one of the reasons for low recovery of oil and early water production (Amir et al., 2019;Hasankhani et al., 2018;Heidari et al., 2018;Lee and Lee, 2013). As heterogeneity in permeability increases, flow paths become more complicated. Even if the average permeability of two reservoirs is the same, different permeability distributions will result in different excessive water production. As a result, heterogeneity is a key factor that contributes to the performance of the gel to block the formation permeability. In a recent paper, Gussenov et al. (2019) have conducted a complete review on permeability reduction of several inorganic and organic bulk gels including their applications in sandstone and carbonate reservoirs.
Despite a considerable body of published research on conformance improvement with polymer gels, a few studies have addressed the influence of macro-and micro-scale heterogeneity on the performance of gel treatment. Cao et al. (2019) investigated the relationship between viscosity and mobility of the profile-control oil displacement agent including the polymer solution and polymer-gel in homogeneous and heterogeneous cores. Regarding the homogeneous cores, they found that the recovery of water and chemical flooding on high permeability cores was higher than on low permeability core. For the case of heterogeneous cores, better conformance control treatment was achieved in middle-and low-permeability layer and larger pore throat. In another study, Liu et al. (2016) examined a new profile control agent (dispersed particle gel). They conducted several sandpack tests and used Scanning Electron Microscope (SEM) images to study the distribution of the gel in porous media. It was found that the gel particles blocked the high permeability layers by accumulating in large pore space or by plugging small pore throats. In-situ polymer gels were systematically studied by Zhu et al. (2019) as a plugging agent for conformance control in high-temperature reservoir. The gelation time and the gel strength were studied in varying polymer and crosslinker concentrations. The polymer-gel system showed a good mechanical shear and stability with very low syneresis. Seright (1992) investigated the effect of rock permeability on the performance of several types of polymer gels. They injected a brine that contained potassium iodide as a tracer to detect the fraction of gel-filled pores. During the coreflood experiments, the strongest gel greatly reduced the permeability of all cores (down to a few micro-darcies). Also, tracer studies showed that these gels often filled the available pores. For weaker gels, the residual resistant factor, defined as the ratio of initial permeability to permeability after gel treatment, generally reduced by an increase in rock permeability. Tracer studies for these types of gels also showed that a small fraction of available pores was filled by the gels.
The previous studies often have focused on the polymergel system types, the effects of operating conditions on the performance of polymer-gel systems, the mechanisms of gel formation and its stability in reservoir conditions, and little attention has been paid on the effects of macro-and microscale heterogeneity on the blocking performance of polymer-gel systems. In this study, we aim at investigating permeability reduction and local porosity changes caused by HPAM/PEI flooding through the porous systems by use of experimental pressure data and grayscale density data provided from 3D CT images in pre-and post-treatment states. We particularly focus on the evolution of pore space and permeability induced by polymer-gel treatment in this study. This paper is organized as follows. First, the gel optimum composition resistance to salt and long lifetime at a high temperature of 100°C are determined using bottle tests. Next, performance of the optimized polymer gel is tested experimentally using coreflood tests in sandpack core samples. The effects of different parameters such as gel concentration, initial permeability of the core, and formation water salinity on permeability reduction are investigated. Finally, the gel flow-induced local porosity changes are studied in a sandpack core and a real carbonate core using the CT method. Based on the acquired CT images, the voxel-wise evolution of pore space of the samples, and hence the spatial distribution of pore blockage is determined.

Polymer gel and formation water preparations
In this work, water-soluble Hydrolyzed PolyAcrylaMide (Sigma-Aldrich, 81128), abbreviated as HPAM, and Poly-EthyleneImine (Sigma-Aldrich, 408727), abbreviated as PEI, were used as a polymer and an environment-friendly organic crosslinker, respectively to partially block pore pathways of the core samples, leading to a limited flow of water. HPAM is a white solid powder, characterized by hydrolysis degree of 15-20 mol%, and average molecular weight of about 5-6 MDa. The colorless liquid PEI is an organic crosslinker with the purity of 99 wt.%, dynamic viscosity of 13 000-18 000 cP and density of 1.03 g/cc at ambient conditions (20°C and 1 atm). Distilled water was used as a solvent. To investigate the effect of salinity on gel performance, a synthetic formation water (brine) was used. The brine was prepared using analytical grade inorganic salts (Merck), without any further purifications, to obtain the appropriate levels of ions as determined by elemental analysis. The composition of the prepared formation water is reported in Table 1. For the PEI/ HPAM gel system, the gelation mechanism can be explained as an imine nitrogen from PEI attacking the carbonyl carbon attached to the amide group as schematically shown in Figure 1 (Jia et al., 2012).
In this research, we used the in-situ gel system to block porous media. Bulk solution that contains certain concentrations of HPAM and PEI is injected into the core samples to form gel. To prepare different gelant solutions with proper concentrations, first, a certain amount of HPAM was dissolved in distilled water. Next, the polymer solution was stirred on a magnetic stirrer device for 5 h to be homogenized. For the purpose of complete dissolution of polymer in distilled water, the prepared HPAM solution was aged at room temperature for around 48 h. Finally, a certain amount of crosslinker was added to the solution and stirred for 30 min to achieve a homogenous gelant solution.

Core sample characterization
In this study, several synthetic sandpack cores and a real carbonate core were used. The measured properties of the cores in dry condition prior to the polymer-gel injection experiments are shown in Table 2. The sandpack cores were made of fine quartz sands and cemented by a resin and a hardener in laboratory. The range of sand size was from 0.5 to 1.4 mm in diameter. The furan, butyl glycol and phosphoric acid were used as a resin, diluent and hardener, respectively. The sandpack cores were packed as follows: clean dry quartz sands with proper sizes were blended with a small amount of furan resin solution, then was immediately followed by the hardener solution; the cores were placed in the oven for 8-12 h at 100°C. The carbonate core was chosen from the Asmari Formation in south-west of Iran.

Experimental procedures
In this research, two types of experiments, i.e., bottle (static) and coreflood tests were carried out. Static tests were used to provide insights into the gelation time and strength of the gels in different conditions and to optimize the HPAM and PEI concentrations. The optimized concentrations were used to examine the effects of polymer gels on permeability reduction and local porosity changes.

Gelation time and strength measurements (bottle tests)
Before conducting coreflood tests, it is necessary to determine some parameters such as gelation time, gel strength and gel stability. The bottle testing method, as a standard laboratory method, provides a semi-quantitative measurement of the properties of the gel such as gel strength and gelation rate (Sydansk and Argabright, 1987). In this method, the gel is poured into the bottle at a desired temperature. The bottle is then inverted for a certain period of time, and the state of the gel, when formed due to gravity, is recorded. In this method, the strength of the gel is named A (1) to J (10) according to the observed gel state (Fig. 2). A description for each gel strength code, reproduced from Sydansk and Argabright (1987), is given in Table 3.
The gelation time is then defined as gel reaching the maximum strength code, ranging from A to J. In the present work, the bottle testing method was used to investigate the effect of some parameters including HPAM and PEI concentrations, temperature and formation water salinity on gelation time, gel strength and stability.

Gel stability measurement
The instability of a gel system is mainly due to the syneresis phenomenon and reduced viscosity of the gel. Syneresis is a process during which water is expelled from the gel network and hence caused a contraction of the gel (Jia et al., 2010). The degree of syneresis can be measured by comparing the mass of the gel to the original mass of gelant. This measure is a conservative estimate of the amount and extent of syneresis, as no correction for the density of the syneresed gel was made (Bryant et al., 1996). Sometimes dehydration will not happen to all gels while their strength decreases.
In this case, the strength code of a gel is determined on a regular basis to monitor the stability of the gel systems.
In this study, we used the continuous record of the strength codes to determine the stability of gel in static tests (bottle tests) and also examined the gel stability within the core samples after gel injection experiments.

Sandpack core flooding experiments
Several sandpack cores (Tab. 2) were used for flooding tests to evaluate the performance of the gel in porous systems. The procedure of flooding tests is as follows: first, the sandpack cores were washed, dried, and then vacuum-saturated with distilled water. The initial porosity of the samples was measured by the saturation method. In order to measure the permeability of the cores, distilled water was injected into the cores at different rates and the pressure drops across the cores were measured. The absolute permeability of the cores was calculated from the Darcy's law for a linear flow through a porous medium: where k is permeability in m 2 , Q is flow rate in m 3 /s, l is viscosity of water in Pa s, DP is pressure drop along the core in Pa, A is cross-sectional area of the core in m 2 , and L is length of the core in m. The experimental setup consisted of a low-pressure core holder, a syringe pump (NE-4000, New Era, USA) connected to a computer and a differential-pressure transducer (LD302, SMAR, Brazil) used to record the pressure drops. The gel was next injected into the cores at a specific concentration, and then the cores were placed in the oven at a temperature of 100°C for a certain time. After that, the water was reinjected into the gel-treated cores and the post-treatment permeability was calculated using the Darcy's law. Figure 3 shows a schematic figure of the experimental apparatus for the flooding tests.

Computed Tomography (CT) imaging
CT images are made from a large number of X-ray transmission measurements (radiographs) through the scanned object. Beer's law defines the relationship between the inlet X-ray intensity (I 0 ) and the intensity of the remaining X-ray after passing through the object (I) using the following relation (Wellington and Vinegar, 1987): where w is the linear attenuation coefficient of the object, and x is the thickness of the object. In a CT image, a CT number is attributed to each voxel. The CT number is defined as (Al-Muntasheri et al., 2010): where N CT is the CT number in the Hounsfield Unit (HU), w is the mean linear attenuation coefficient in a voxel and w w is the attenuation coefficient of water. The porosity of each voxel is then calculated by the following relation using the CT images of the sample in dry and water-saturated conditions (Mees et al., 2003): where N CT,wr and N CT,ar refer to the CT numbers of water-and air-saturated core sample, respectively, and N CT,w and N CT,a show the CT numbers of water and air, respectively. Table 3. Gel strength codes and the corresponding gel descriptions, reproduced from Sydansk and Argabright (1987).

Gel strength code
Gel description A No detectable gel formed: The gel appears to have the same viscosity as the original polymer solution. B Highly flowing gel: The gel appears to be only slightly more viscous than the initial polymer solution.  In this work, the CT method was used to study the effects of polymer-gel treatment on one of the sandpack core (sample S3 in Tab. 2) and the carbonate core (sample R1 in Tab. 2). Figure 4 shows the photos of samples S3 and R1. Images of the samples in dry and brine-saturated conditions, before and after the polymer-gel injection tests were taken using medical CT scanners. To improve the contrast of images, the samples were saturated by potassium iodide solution which lead to a high X-ray attenuation due to the high atomic number of iodine. We have used two different medical CT scanners to roughly check and compare the quality of the acquired images. Table 4 shows the parameters of the image acquisition. Tomograms of sample S3 were taken with GE CT-Scanner and sample R1 was imaged using the CBCT scanner.
The polymer-gel flow-through experiments, including CT scan were undertaken via the following sequence of steps: 1) image dry core on CT facility; 2) saturate under vacuum with 10 wt% potassium iodide aqueous solution; 3) image brine-saturated core on CT facility; 4) inject the polymer-gel solution at desired concentration into the core; 5) place and dry the core samples in an oven at 100°C; 6) image dry gel-treated core on CT facility; 7) saturate under vacuum with 10 wt% potassium iodide aqueous solution; 8) image brine-saturated gel-treated core on CT facility.

Workflow
The process to prepare, test, and use a polymer-gel solution to reduce the permeability of porous media has been studied by numerous researchers for various purposes, including remediation of CO 2 leakage from storage reservoirs (Syed et al., 2014) and water shut-off (Bai et al., 2015a) in particular. The workflow in Figure 5 illustrates the approach adopted in this study to broadly investigate the effects of various parameters on gel properties and the performance of the polymer-gel system to block pore space of a range of porous media with varying porosity and permeability. In particular, we employed the CT imaging technique to analyze the performance of polymer-gel treatment to locally change porosity and examine spatial distribution of pore blockage regions.
4 Results and discussion 4.1 Bottle test results

Effects of polymer and crosslinker concentrations
Each gel system requires a minimum concentration of polymer, called the Critical Overlap Concentration (COC), to form the gel structure. To determine the minimum concentration of polymer, three solutions with 4000, 5000, and 7000 ppm polymer (HPAM) and a constant crosslinker (PEI) concentration of 4000 ppm were prepared. All tests were set at a temperature of 100°C. The results are shown in Table 5. It is evident from Table 5 that at concentration of 4000 ppm of polyacrylamide polymer, no gel has been formed and its maximum strength code was found to be B. But for 5000 ppm concentration of this polymer, gel reached code D. So the minimum concentration of polymer needed to form the gel is 5000 ppm.
To examine the effects of polymer and crosslinker concentrations, gelant solutions with different concentrations (5000, 7000, and 10 000 ppm) of HPAM and different concentrations (3000, 4000, and 6000 ppm) of crosslinking agent (PEI) were prepared using distilled water. The temperature was kept constant at 100°C for all tests. The results of gelation time and gel strength for different polymer and crosslinker concentrations are reported in   Table 6 and Table 7, respectively. Our limited data in Table 6 indicate that 1) the gelation time decreases with increasing the concentration of the polymer or the crosslinker and 2) the polymer concentration has considerably larger effects on the gelation time. It can be argued that as the concentration of the polymer increases, the number of polymer sites for crosslinking increases, and hence the rate of gel formation increases. In addition, the higher concentrations of the polymer lead to increase in the reaction rate even at low concentrations of the crosslinker. Note that the reaction between the polymer and the crosslinker occurs quickly. Regarding the ranges of the polymer and the crosslinker concentrations that were tested in the present investigation, the results reported in Table 7 indicate    Three gelant solutions with HPAM concentrations of 15 000, 10 000, and 7000 ppm and PEI concentrations of 8000, 6000, and 4000 ppm, respectively were prepared. Synthetic formation water with the concentration of 172 105 ppm was diluted to concentrations of 170 000, 100 000, 50 000, 20 000, and 5000 ppm. In the tube tests, the tubes were filled with a specific concentration of gelant solutions and 30% by volume of formation water was then added and mixed with the gelant solution. The resultant fluid samples were then placed into an oven at a temperature of 100°C. Figure 6  examined the effect of NaCl on the HPAM/PEI system performance. They observed that as the salinity increases, the gelation time increases, which is in agreement with the results obtained in this study. It can be argued that the presence of carboxylate groups with negative charges in the hydrolyzed polyacrylamide structure causes gelation time to increase. In fact, the carboxylate groups stretch the HPAM network, and hence the hydrodynamic volume of the polymer increases. Monovalent and divalent cations with positive charges shield the negative charges on carboxylate groups and contract the polymer and so decrease the length of polymer chains. As a result, cross-linking sites accessible to PEI decreases (Al-Muntasheri et al., 2008Jia et al., 2012).

Effect of temperature on gelation time in the presence of formation water
Temperature is a key factor in conformance control and water shut off treatments due to its effect on gelation time. We consider a HPAM/PEI gel system with 15 000 ppm HPAM and 8000 ppm PEI, which had the best yield in high salinity in bottle tests, in different salinities including 0, 50 000, and 100 000 ppm salinities and at temperatures of 70°C and 100°C. The results are shown in Figure 9. We also compared the results of this study with those published by Al-Muntasheri et al. (2008) and Jia et al. (2012). It was found that the increase in temperature led to decrease in gelation time. By increasing the temperature, the rate of hydrolysis of polymer increases, and so the crosslinking reaction is enhanced. As a matter of fact, higher temperatures indicate higher average molecular motions. With a higher temperature, and thus higher molecular speed, the gelation process is faster (Al-Muntasheri et al. 2007, 2008Zhu et al., 2017). It can also be observed that the results of this work at 100°C with those published at 120°C by Al-Muntasheri et al. (2008) are almost the same. We can argue that the HPAM used in this work at 100°C had an initial degree of hydrolysis of 15-20 mol% while PAM with zero degree of hydrolysis was used in 120°C by Al-Muntasheri et al. (2008). In fact, the crosslinking reaction rate increases with increasing the degree of hydrolysis based on the bonding between an amine unit and a carboxylate group. As a result, despite the difference in temperature at which the experiments were conducted, due to a higher degree of hydrolysis of HPAM in our experiment compare to the PAM used in Al-Muntasheri et al. (2008), the results (the lines with circle and square markers in Fig. 9) are almost the same.

Sandpack flooding test results
We have conducted flooding experiments in several sandpack core samples whose properties are shown in Table 2. For each sample, the pressure drop during injection of water, injection of the gel solution, and water injection after the gel treatment were recorded. The absolute permeability was then calculated using the Darcy's law. The results are shown in terms of k/k 0 and k f /k 0 , where k is the instantaneous permeability, and k 0 and k f are the initial and final permeability, i.e., permeabilities of the core sample before and after the gel treatment process, respectively.

Temporal evolution of permeability during
the polymer-gel flow experiments Figure 10 illustrates the measured permeability responses of four sandpack cores (samples S1, S2, S3, and S4) in terms of the ratio of the instant permeability to the initial permeability as a function of the total Pore Volumes (PVs) of polymer-gel solution injected. Since the PVs of the core samples changed throughout the polymer-gel treatment experiments, initial PVs were used when calculating the total PVs injected. It can be seen from Figure 10 that after injection begins, the permeability decreases over a time period corresponding approximately to 1 PV for samples S1 and S2 and 0.5 PVs for samples S3 and S4. After that, the permeability of the samples reaches constant values until the end of the experiments. It is reasonable to assume that the early decrease in permeability results from propagation of gel, which temporarily plugged the porous media. For sample S2, since the sample has a lower permeability, the injection of a small amount of gel has considerably dropped permeability, because the gel filled a large portion of the inlet pore space and caused a sharp decrease in permeability.

Effect of gel concentration
To examine the effect of concentration of the polymer-gel solution on permeability reduction performance, we consider two core samples (samples S1 and S2), whose porosities and permeability are close to each other (refer to Tab. 2). The initial permeability of the cores was measured by injecting distilled water at different rates. For both samples, 2 PVs of the gelant solutions with 7000/4000 and 15 000/8000 ppm concentrations of HPAM/PEI were injected into the cores at a flow rate of 0.5 cc/min. The samples were then placed in oven at a temperature of 100°C for 15 h. Next, distilled water was injected into the cores with different rates and the pressure drop across the cores was recorded and permeability was calculated for each rate. Figure 11 illustrates the measured pressure drops along the length of the post-treated core samples for a water injection rate of 0.6 cc/min. During the injection of water into the post-treatment core samples, the pressure drop increases until it reaches a critical value after which, it slightly decreases and remains constant. Zitha et al. (2002), have argued a three-step mechanism for describing gel behavior during water injection into the post-treatment sample: 1) elastic deformation of the gel that produces the initial pressure build up; 2) microscopic flow that is a limiting factor for the pressure buildup; and 3) when the microscopic flows are low, the pressure increases to a critical value. At the critical pressure drop, water displaces the gel and opens new paths through the gel. As a result, pressure drop reduces and finally becomes constant. Figure 12 illustrates the measured gel-treated permeability responses of the core samples in terms of the ratio of the post-treatment permeability to the initial permeability as a function of the injection flow rate for two different HPAM/PEI concentrations. From bottle test results, it was found that the polymer-gel system with higher concentrations of polymer and/or crosslinker had better gel strength as compared to low polymer and/ or crosslinker concentrations. With regard to this, we expected a better performance for the gel in sample S2. However, as evident from Figure 12, the permeability reduction in sample S1 was more than that in sample S2. It can be argued that the gel solution with lower concentrations had lower viscosity, which could lead to more penetration into the core and hence could block more pore space.

Effect of initial core permeability on gel performance
We consider samples S2 and S4 with quite different permeability values (refer to Tab. 2) to investigate the effect of initial core permeability on gel performance. Gel with the same concentrations (15 000/4000 of PAM/PEI) was injected into the cores. Figure 13 shows the post-treatment permeability vs. the injection flow rate for two cores with different initial permeability. It is evident from Figure 13 that the gel blockage performance was higher for the core with higher permeability, demonstrating that the gel solution penetrated the cores preferentially via the larger pore space and passages. Since the maximum pressure drop is inversely proportional to permeability of a porous medium, an appropriate pressure drop is required for the gel to properly block the low-permeability porous media.

Gel stability in porous media
As mentioned earlier, the gel with a lower concentration exhibited better penetration and thus showed better performance in the core samples. We also examined the stability of the gel solution in two concentrations of 7000/4000 and 15 000/8000 ppm of HPAM/PEI in the sandpack cores. For this purpose, the samples were placed in water at 100°C for one week, and then the water permeability was measured again. The Percent Permeability Reduction (PPR) was defined as follows: The temporal changes of the core PPR are given in Table 8. Our limited data indicate that, the permeability reduction in sample S1 containing the gel with the concentration of 7000/4000 ppm HPAM/PEI rapidly reduced with time; however, the permeability reduction in sample S3 containing the gel with the concentration of 15000/8000 ppm HPAM/PEI almost remained constant. We continued the experiment for sample S3 for up 30 days and observed a reduction of 0.13% in 30-day PPR value with respect to 7-day PPR value representing an excellent stability for the gel within the sample S3.

Computed tomography results
Two samples, i.e., a sandpack core (sample S3), and a carbonate core (sample R1) were considered to investigate the Permeability ratio,  Fig. 12. Gel-treated permeability of the samples S1 and S2 (with similar initial porosity and permeability) vs. water injection rate.
influence of polymer-gel treatment on the evolution of pore space using the CT imaging. Images of each sample in dry and brine-saturated conditions were acquired before and after the polymer-gel treatment using medical CT scanners (Tab. 4). Figure 5 summarizes the sequence of tasks followed in the present study, including CT-related experiments, CT imaging and the related image analyses. We used potassium iodide solution to enhance the contrast of the acquired images. All image analysis steps were performed using MATLAB R2016a. Key to the success of the analysis of digital data step is the integration of the CT images acquired prior to and after the polymer-gel injection using image registration, allowing accurate comparison of the evolution of pore space of the rock. Since the resolution of CT images is normally low, a great attention should be paid to carefully register the pre-and post-treatment images.

Image registration
A tomographic image of a core sample normally does not contain only the sample data but also some blank regions.
In the first place, the blank regions of the images in all directions should be cut-off (masked) to remove any voxel outside the region of interest. Since CT dry and wet scans are usually taken at different geometrical position and orientation (in micron/millimetre precision), the pre-and post-treatment images need image registration before any comparison between the two successive images can be made. Without 3D image registration, it is difficult to find the identical matched slices in dry and wet conditions (Wan and Xu, 2014). Due to being low resolution, it was not possible to use the MATLAB image registration tool. Alternatively, a simple rotation/translation was employed for the purpose of image alignments. Fortunately, there were some specific features in a few slices which helped us for registration. Figures 14 and 15 show pre-and post-treatment CT slices of samples S3 and R1, respectively, in dry and saturated states, from which the whole 3D images of the samples were registered. Figure 16 illustrates examples of 2D slice through the 3D CT images of pre-and post-treatment sample S3. Due to being low resolution, it is difficult to observe individual pores, since image voxels may contain both pore and solid phases. In fact, the CT number of a voxel is an average of CT values of the constituent phases within that voxel (partial volume effect). This in turn causes blurring of phase boundaries. In spite of this, comparison of pre-and posttreatment images reveals that the gel solution was spread across most part of the sample. Figure 17 shows the intensity histograms of raw CT images of pre-and post-treatment sample S3. The difference of CT number between the dry and wet images can be clearly observed for the pre-treatment sample, while there was not a significant difference of CT number for the post-treatment sample. It is noted that the CT number difference is applied to porosity characterization. Figure 18 shows examples of 2D slice through the 3D CT images of pre-and post-treatment sample R1. In this case, the CT images reveal more details in comparison with CT data of sample S3. It was observed that some large pores became smaller after the polymer-gel treatment process. Figure 19 shows the intensity histograms of raw CT images of pre-and post-treatment sample R1. The difference of CT number between the dry and wet images can be clearly observed for both the pre-treatment and posttreatment sample. Comparison of dry and wet CT numbers in Figure 19 shows that the polymer-gel treatment has reduced CT numbers in the whole region of the images.

Longitudinal distribution of local porosity
The porosity of each voxel was calculated using equation 4 for both pre-and post-treatment images. Table 9 shows the experimentally and image-based measured properties of the samples prior to and after the gel treatment experiments as well as the injection rates and the total number of pore volumes injected. The subscripts "0" and "f" refer to the properties before and after the polymer-gel injection, respectively. Measurements of the initial and final porosity and permeability indicated that the gel injection in the sandpack core (S3) resulted in a considerable large decrease in porosity (about 25-porosity-unit decrease) and permeability (about 100 times decrease), while the gel injection in the carbonate core sample R1 led to about two-porosity-unit decrease and 4.5 times decrease in permeability.  Image-based measurement of the total porosity of the pre-treatment sample S3 gives the value of 33.35%, which is in reasonable agreement with the value measured experimentally (Tab. 9). For the post-treatment sample S3, the images give a total porosity of 6.27%, which is in good agreement with the laboratory-measured final porosity. Figure 20 illustrates the variation of overall porosity per slice along the length of the sample S3 computed from the pre-and post-treatment registered images. Each slice used for porosity calculation represents a sample volume of  1052 mm 3 . The plot of the variation of initial porosity of the sample exhibits considerable variability on the local pore scale. The slice porosity of the sample ranges between 27.0% and 44.5%. As can be seen from Figure 20, the polymer-gel treatment remarkably reduced the local porosity throughout the sample.
Since sample S3 has relatively high porosity and permeability, it was expected that the gel solution flowed easily into all pore space and hence reduced extraordinarily the porosity and permeability of the sample (Tab. 9). The slice porosity of the post-treatment sample ranges between 0.6% and 17.7%. As a result, the gel solution almost totally blocked some section of the cores, which is consistent with the fact that the experimentally measured permeability of the sample was reduced by about 99% after the polymergel treatment (Tab. 9). It is noted that some local peaks corresponding to local large pores in pre-treatment porosity curves have collapsed after the gel injection, indicating a higher gel-induced blockage in larger pore space.
Measurement of the total porosity of pre-treatment sample R1 from CT images gives 13.29%, which is in reasonable agreement with the value measured experimentally (Tab. 9). The total image-based porosity of the post-treatment sample is 10.16%, which is in good agreement with the experimental final porosity. Figure 21 shows the variation of overall image-based porosity per slice along the length of the sample R1. Each slice used for porosity calculation represents a sample volume of 50.7 mm 3 . As evident from Figure 21, the pre-treatment porosity of the sample shows considerable variability on the local pore scale. The slice porosity of the pre-treatment sample ranges between 8.9 to 17.2%, while the post-treatment sample slices show porosity from 7.3% to 12.8%. Figure 21 illustrates that the polymer-gel treatment non-uniformly decreased the local porosity of the sample. In some slices, the porosity was reduced sharply (by about 40%) whereas there was no significant porosity decrease in some other slices. The polymer-gel treatment led to lose more than 75% of the overall permeability of the sample for only about twoporosity-unit decrease. Compared to the sandpack sample, the carbonate sample is considerably more heterogeneous and hence the gel flow paths were quite complex resulting a very variable porosity changes within the sample.
From longitudinal porosity profiles of sample S3 (Figs. 20 and 21), one can observe a slightly negative trend for the pre-treatment porosity curve and the same trend can be observed for the post-treatment porosity curve. In contrast, the porosity profiles of sample R1 indicate positive trends. For both samples, these trends are intensified in post-treatment state. The variability in gel-induced porosity changes along the core sample can be better mimicked by plotting the slice-averaged porosity difference along the core (Fig. 22). The porosity changes along the sample S3 extracted from the CT images indicate that the gel treatment did not block the pore space along the flow axis uniformly at the pore scale. Table 10 shows the Average Porosity Difference (APD) and the longitudinal variability of the gel-induced porosity difference in terms of Standard Deviation (SD) and Coefficient Of Variation (COV). Data from Figure 22 and Table 10 for sample S3 indicate that, despite non-uniform local porosity changes, the changes in porosity at the sample scale are close to uniform such that the APD between post-and pre-treatment along the core is about 27%, which is in agreement with the overall core porosity change (Tab. 9). In contrast, the gel treatment induced non-homogeneous porosity changes along the core sample R1 as indicated in Figure 22. In addition, Table 10 indicates more variability for porosity difference along the core R1 (the COV for R1 is 5 times greater than that for S3). It is worth mentioning that the slice volume of sample R1 was considerably smaller than that of sample S3 (refer to the acquisition parameters in Table 4, including slice thickness in particular). This in turn may cause additional variability in slice-porosity and slice-porosity-difference profiles for sample R1 (Figs. 21 and 22).

Voxel-based evolution analysis
Despite permeability is macroscopically affected by porosity, there are no general rules that relates porosity to permeability. This issue is more pronounced when evolutions in porosity and permeability take place. A small porosity changes may lead to a large variation in permeability. In fact, from a microscopic point of view, the evolution of permeability is mainly controlled by the changes in pore-throat shape, size, tortuosity, and connectivity. Therefore, accurate description of the evolution of permeability requires a careful analysis of the evolution of micro-scale properties. In this study, we characterize the evolution of CT numbers of each image voxel in successive images of the same sample. Due to being higher resolution, sample R1 is considered for this analysis. Qajar and Arns (2016) developed a method that incorporates all voxel-level changes in multiple successive micro-CT images of the same specimen. In this method, 2D histogram of segmented image intensity is used to voxelwise track the evolution of structure from pre-to postalteration states. In this work, we adopt a simple version of this method for binarized pre-and post-treatment images. First, the registered dry and wet images in preand post-treatment states were used to obtain segmented pre-and post-treatment images using a simple thresholding method. The registered segmented images were then used to construct the corresponding 2D histogram. The segmented pre-and post-treatment images of the sample R1 simply contained two types of voxels, namely the pore space and the solid phase. Therefore, the image difference (or superimposition) between successive pre-and post-treatment images contains four distinct voxel-type evolution regions, namely unaltered pore space, gel-induced pore blockage, pore expansion, and unaltered solid phase regions. Table 11 illustrates descriptions of the evolution regions as well as the calculated volume fractions of the voxel evolution regions for the performed polymer-gel injection test. The fraction of each evolution scenario is given per unit of sample volume. Data from Table 11 shows that~6 % and~4% of the volume of the samples corresponds to "gel-induced pore blockage" and "pore space occupation by a moving particle (solid deposition or pore expansion)", respectively, after the polymer-gel treatment. Table 11 also illustrates that~90% of the volume of the sample remained unchanged after the polymer-gel treatment test. The unchanged regions include unaltered pore space and unaltered solid phase. The volume fraction data in Table 11 is in agreement with the small porosity changes occurred within the sample as indicated in Table 9. The spatial distribution of the voxel evolution regions for the middle slice of the corresponding evolution dataset is shown in Figure 23.
Aside from the overall description of the voxel-wise evolution regions, the longitudinal variations of the fractions of the voxel-wise evolution scenarios were also obtained as shown in Figure 24. It is evident that the distribution of the pore blockage region is very similar to porosity difference profile (Fig. 22) but with more details. From the evolution dataset, it is possible to track the evolution of   pore expansion, unaltered solid and unaltered pore regions (Fig. 24), which cannot normally be measured experimentally. The local trend of the changes in pore expansion region is reverse with respect to the pore blockage region. The right graph in Figure 24 indicates a uniform distribution in unaltered solid region, but the distribution of unaltered pore region is variable at the pore scale along the length of the core.

Conclusion
In this paper, we investigated the performance of HPAM/ PEI gel system to partially block the pore space and reduce the permeability of sandpack core samples and a real carbonate sample. We first analyzed the effects of polymer/ gel concentrations, salinity, and temperature on the gel properties outside of porous media, and then studied the behavior of the gel system within a number of sandpack core samples at different conditions (concentrations, salinity,...). In the next stage, we utilized the CT method to examine the effects of the polymer-gel solutions to block the pore space of the samples and hence reduce the Fig. 23. The middle slice of the evolution dataset comprising 4 phases: (white) unaltered solid region, (black) unaltered pore space, (pink) gel-induced pore blockage region, and (green) solid deposition or pore expansion region (For interpretation of the references to color in this figure legend, the reader is referred to the electronic version of this article). Table 11. Description of the voxel evolution scenarios and their volume fraction (%) computed based on the whole CT images in the course of the polymer-gel treatment within the sample R1.
Evolution of voxel-type Evolution scenario description Physical interpretation of the evolution scenario Volume fraction (%) Pore-to-pore Voxels that belong to the pore space from the beginning to the end Unaltered pore space 0.4646 Pore-to-solid Voxels which are initially in the pore space but will finally be in the solid phase.
Gel-induced pore blockage 0.0605 Solid-to-pore Voxels which are initially in the solid phase but will finally be in the pore space Pore expansion (solid deposition) 0.0423 Solid-to-solid Voxels that belong to the solid phase from the beginning to the end Unaltered solid phase 0.4326 Fig. 24. Variations of the fractions of (left) gel-induced pore blockage and pore expansion, and (right) unaltered regions with distance from the sample inlet.
permeability. The main conclusions of this paper are the following: 1. As the formation water salinity increases, the gelation time increases and the final strength of the gels decreases. However, the gel final strength and stability in formation water with the salinity range of 40 000-50 000 ppm are better than those in formation water with the salinity of out of this range. So, at high salinities of water formation (i.e., more than 100 000 ppm), high concentrations of the gel (i.e., more than 20 000 ppm of polymer) are required for increasing the gel strength and stability. 2. With increasing the concentrations of the polymer and/or the crosslinker, the gelation time decreases. The effect of the crosslinker concentration on gelation time is less than that of the polymer. The concentration of the polymer has also the most effect on the final strength of the gel. The high crosslinker concentration leads to the gel syneresis due to the excessive cross-linking characteristic. 3. As the water salinity increases, the gelation time increases and the final strength of the gels decreases but in middle salinities, the gel performance is better than that in the higher and lower salinities. 4. The gel solution shows a higher performance in highpermeability media. However, the resistance of the gel in such media is lower. A gel under stress can be washed-out and displaced, and as a consequence, new pathways to flow will be created. 5. With increasing the injection rate (pressure gradient), the ratio of final permeability to initial permeability increases and the gel performance decreases. This is primarily due to the fact that with increasing the pressure gradient, some of the gel is washed out of some pores and hence the permeability increases. Secondly, at high pressures, the gel may lose water and shrink and, as a result, the permeability increases. 6. The results of the CT images show that the gel preferentially penetrates into the larger pores and hence considerably reduces the permeability of the medium regardless of the amount of porosity decreases. 7. Analysis of the CT images shows that heterogeneity has a significant effect on the performance of gel for permeability reduction. The longitudinal evolution of porosity extracted from the CT images indicates that the gel treatment does not block the pore space along the flow axis uniformly at the pore scale. In the case of sandpack core, the changes in porosity at the sample scale are close to uniform. Regarding the carbonate core, the gel treatment induces not uniform changes in porosity at both the pore and core scales. In this case, a small change in porosity produces a large change in permeability. Voxel-based evaluation of the CT images of this core shows that about 90% of the volume of the core remains unchanged after the gel treatment.