A Novel Approach to Improve Acid Diversion in Carbonate Rocks Using Thermochemical Fluids: Experimental and Numerical Study

The distribution of acid over all layers of interest is a critical measure of matrix acidizing efficiency. Chemical and mechanical techniques have been widely adapted for enhancing acid diversion. However, it was demonstrated that these often impact the formation with damage after the acid job is completed. This study introduces, for the first time, a novel solution to improve acid diversion using thermochemical fluids. This method involves generating nitrogen gas at the downhole condition, where the generated gas will contribute in diverting the injected acids into low-permeability formations. In this work, both lab-scale numerical and field-scale analytical models were developed to evaluate the performance of the proposed technique. In addition, experimental measurements were carried out in order to demonstrate the application of thermochemical in improving the acid diversion. The results showed that a thermochemical approach has an effective performance in diverting the injected acids into low-permeability rocks. After treatment, continuous wormholes were generated in the high-permeability rocks as well as in low-permeability rocks. The lab-scale model was able to replicate the wormholing impact observed in the lab. In addition, alternating injection of thermochemical and acid fluids reduced the acid volume 3.6 times compared to the single stage of thermochemical injection. Finally, sensitivity analysis indicates that the formation porosity and permeability have major impacts on the acidizing treatment, while the formations pressures have minor effect on the diversion performance.


Introduction
Matrix acidizing in carbonates aims to both remove damage near the wellbore area and further improve its permeability by creating conductive flow pathways (wormholes) around the wellbore [1][2][3]. Acid treating fluids designs have diverse compositions and formulations directed towards the targeted formation nature [4,5]. In addition, the acid fluids must be injected below the fracturing pressure to avoid the reservoir to be fractured and prevent the stimulating fluids from being lost consequently [6]. However, the conventional acidizing treatments are less effective with high permeability contrast between zones with large thickness [7][8][9]. With high degree of heterogeneity, it is required that the injected acid treatment is effectively distributed over both the less and more damaged layers [10,11]. Hence, the industry has adapted widely both mechanical and chemical diverters depending on the effectiveness of each approach on the different lithology [12,13].
achieving effective acid diversion. However, the major concern is that gas injection may be associated with high operational costs due to gas transportation and treatment. Therefore, in situ gas generation at the reservoir condition can preserve the advantages of using gas injection for acid diversion applications. In addition, this will minimize the operational cost since the gas will be generated only in the wellbore. Similarly, in situ foam generation can result in better foam quality compared to foam injection from the surface.
This study presents an effective method to place acid uniformly in the damaged formations using in situ generated gas by thermochemical reactions. This method provides the advantage of not requiring an external source of gas for diversion. In addition, the induced pressure from the thermochemical reaction will force the generated gas to flow into the high-permeability zones, thereby improving the performance of acid diversion treatment. In this work, experimental and modeling studies were carried out in order to evaluate the efficiency of the proposed technique. The experiments work constitutes of parallel coreflooding tests using rock samples that have similar geometry and petrophysical properties but different permeability values to simulate heterogeneous formations. A new analytical model was developed to predict the performance of acid diversion using thermochemical fluids. Finally, sensitivity analysis was conducted to assess the impact of formation parameters on the treatment efficiency. The influences of formation porosity, layer permeability, and pressure difference between the two layers on the acid diversion performance were studied.

Experimental Outcomes
Acidizing experiment was conducted using two rock samples with permeability contrast to study the acid distribution when the acid is injected solely without any diverter. Two carbonate rocks were treated with 15 wt% HCl acid, and the used samples had initial permeability values of 90 and 27 mD, respectively. Parallel coreflood system was used, and the two rock samples were treated using the same experimental conditions, with a similar injection pressure and acid flow rate applied to the two rock samples. However, when acid was injected, the majority of the acid invaded into the high-permeability core (90 mD) and only small amounts flowed into the lower permeability core (27 mD). Therefore, a continuous wormhole was generated in the high-permeability rock, while limited wormhole generation was induced in the low-permeability rock. Figure 1 shows the CT-scan images of the tested rocks after acidizing treatment. It should be noted that this acidizing treatment was conducted without using any acid diverter. Therefore, the propagation of wormholes in the high-permeability core achieved breakthrough successfully while it did not in the low-permeability core. Furthermore, acidizing treatment was performed, and thermochemical fluids were injected to witness its diversion performance. Two rock samples with original permeability of 94 and 26 mD were used in this experiment. Thermochemical fluids were injected into the parallel core system prior to acid treatment. In this case, the injected acid was diverted to the lower permeability core. Therefore, the high-and low-permeability rocks were successfully stimulated. Figure 2 shows CT-scan images for the treated rocks after the treatment using HCl acid and thermochemical fluids. Continuous wormholes were observed in the high-and low-permeability rocks, indicating the effective performance of thermochemical fluids in diverting the injected acids into the low-permeability rocks.

Model Match
The abovementioned experimental conditions were used as input in the model to replicate the impact of permeability contrast on acid treatment. The cross-sectional area of the core was modeled to be square (1.33 in edge length), which has a similar area to the 1.5 in diameter core. The model assumes that the two core samples were placed on top of each other with a thin low-permeability layer in the middle acting as a flow barrier. This is to account for the actual separation between the cores in the experimental setup. The porosity and permeability were randomly populated in the domain using Gaussian distribution. Both cores were subjected to the same 15 wt% HCl acid which was injected at 1 cc/min. Figure 3 shows the permeability distribution where the high-permeability core sample was placed on the top. The mean permeability of the top domain was 90 mD, while it was 27 mD for the bottom domain; this was to replicate the behavior in Figure 1. The porosity distribution of both samples is shown in Figure 4 where the mean porosity is 0.2. Porosity lab measurements of the high-and low-permeability rock samples were similar; hence, the same distribution was assigned during simulations. Some statistical parameters, such as the correlation length (Ix, Iy), were assumed to be similar for both porosity and permeability. The standard deviation determines how far the distribution is from the mean. The standard deviation for permeability    CT-scan images for the rock samples after diverting the injected acid using a thermochemical approach.

Model Match
The abovementioned experimental conditions were used as input in the model to replicate the impact of permeability contrast on acid treatment. The cross-sectional area of the core was modeled to be square (1.33 in edge length), which has a similar area to the 1.5 in diameter core. The model assumes that the two core samples were placed on top of each other with a thin low-permeability layer in the middle acting as a flow barrier. This is to account for the actual separation between the cores in the experimental setup. The porosity and permeability were randomly populated in the domain using Gaussian distribution. Both cores were subjected to the same 15 wt% HCl acid which was injected at 1 cc/min. Figure 3 shows the permeability distribution where the high-permeability core sample was placed on the top. The mean permeability of the top domain was 90 mD, while it was 27 mD for the bottom domain; this was to replicate the behavior in Figure 1. The porosity distribution of both samples is shown in Figure 4 where the mean porosity is 0.2. Porosity lab measurements of the high-and low-permeability rock samples were similar; hence, the same distribution was assigned during simulations. Some statistical parameters, such as the correlation length (Ix, Iy), were assumed to be similar for both porosity and permeability. The standard deviation determines how far the distribution is from the mean. The standard deviation for permeability

Model Match
The abovementioned experimental conditions were used as input in the model to replicate the impact of permeability contrast on acid treatment. The cross-sectional area of the core was modeled to be square (1.33 in edge length), which has a similar area to the 1.5 in diameter core. The model assumes that the two core samples were placed on top of each other with a thin low-permeability layer in the middle acting as a flow barrier. This is to account for the actual separation between the cores in the experimental setup. The porosity and permeability were randomly populated in the domain using Gaussian distribution. Both cores were subjected to the same 15 wt% HCl acid which was injected at 1 cc/min. Figure 3 shows the permeability distribution where the high-permeability core sample was placed on the top. The mean permeability of the top domain was 90 mD, while it was 27 mD for the bottom domain; this was to replicate the behavior in Figure 1. The porosity distribution of both samples is shown in Figure 4 where the mean porosity is 0.2. Porosity lab measurements of the highand low-permeability rock samples were similar; hence, the same distribution was assigned during simulations. Some statistical parameters, such as the correlation length (I x , I y ), were assumed to be Molecules 2020, 25, 2976 5 of 22 similar for both porosity and permeability. The standard deviation determines how far the distribution is from the mean. The standard deviation for permeability distribution in the domain, σ k , was 3, while for porosity, σ ϕ was 0.04, as illustrated in the figure captions.
Molecules 2020, 25 Figure 5 shows the final concentration profile after wormhole breakthrough assuming HCl acid was injected with no diversion. It is noted that wormhole propagated fully in the high-permeability core (the top domain of Figure 5) while only limited propagation was observed in the lowpermeability core. Various simulations of different permeability contrast were conducted, and all showed that acid preferentially invaded the high-permeability core. This replicated the experimental outcomes obtained in Figure 1 which also built confidence in the fine-scale modeling approach.
Once the thermochemical fluids react, they generate a tremendous amount of nitrogen that invades the high-permeability zone, diverting acid to the low-permeability one. Modeling the diversion impacts of thermochemical fluids requires a two-phase flow model which is out of the current research scope. Nevertheless, the simulations in Figure 6 show that the wormhole propagated equally only when the permeability of the two cores to the HCl acid was within the same range. This     Figure 5 shows the final concentration profile after wormhole breakthrough assuming HCl acid was injected with no diversion. It is noted that wormhole propagated fully in the high-permeability core (the top domain of Figure 5) while only limited propagation was observed in the lowpermeability core. Various simulations of different permeability contrast were conducted, and all showed that acid preferentially invaded the high-permeability core. This replicated the experimental outcomes obtained in Figure 1 which also built confidence in the fine-scale modeling approach.
Once the thermochemical fluids react, they generate a tremendous amount of nitrogen that invades the high-permeability zone, diverting acid to the low-permeability one. Modeling the diversion impacts of thermochemical fluids requires a two-phase flow model which is out of the current research scope. Nevertheless, the simulations in Figure 6 show that the wormhole propagated equally only when the permeability of the two cores to the HCl acid was within the same range. This  Figure 5 shows the final concentration profile after wormhole breakthrough assuming HCl acid was injected with no diversion. It is noted that wormhole propagated fully in the high-permeability core (the top domain of Figure 5) while only limited propagation was observed in the low-permeability core. Various simulations of different permeability contrast were conducted, and all showed that acid preferentially invaded the high-permeability core. This replicated the experimental outcomes obtained in Figure 1 which also built confidence in the fine-scale modeling approach. indicates that the equal acid stimulation in Figure 2 was generated due to the thermochemical fluids' ability to equate the relative permeability of the two cores.

Alternating Injection of Thermochemical and Acid Fluids
The thermochemical approach showed good performance in diverting the injected acids and then enhancing the efficiency of acidizing treatment. However, the treatment efficiency can be further improved by alternately injecting thermochemical and acid fluids. The alternating injection can lead to a reduced amount of injected fluids and it can also result in deeper acid penetration compared to the single-stage injection. Therefore, in this work, the technique of alternating injection of thermochemical and HCl fluids into the rock samples of different permeability (11 and 102 mD) was examined. A total of six injection cycles were applied: three thermochemical fluid and three HCl injection cycles. Figures 7 and 8 show the pressure profiles for the low-and high-permeability rocks, Once the thermochemical fluids react, they generate a tremendous amount of nitrogen that invades the high-permeability zone, diverting acid to the low-permeability one. Modeling the diversion impacts of thermochemical fluids requires a two-phase flow model which is out of the current research scope. Nevertheless, the simulations in Figure 6 show that the wormhole propagated equally only when the permeability of the two cores to the HCl acid was within the same range. This indicates that the equal acid stimulation in Figure 2 was generated due to the thermochemical fluids' ability to equate the relative permeability of the two cores.
Molecules 2020, 25, 2976 6 of 22 Molecules 2020, 24, x; doi: www.mdpi.com/journal/molecules indicates that the equal acid stimulation in Figure 2 was generated due to the thermochemical fluids' ability to equate the relative permeability of the two cores.

Alternating Injection of Thermochemical and Acid Fluids
The thermochemical approach showed good performance in diverting the injected acids and then enhancing the efficiency of acidizing treatment. However, the treatment efficiency can be further improved by alternately injecting thermochemical and acid fluids. The alternating injection can lead to a reduced amount of injected fluids and it can also result in deeper acid penetration compared to the single-stage injection. Therefore, in this work, the technique of alternating injection of thermochemical and HCl fluids into the rock samples of different permeability (11 and 102 mD) was examined. A total of six injection cycles were applied: three thermochemical fluid and three HCl injection cycles. Figures 7 and 8 show the pressure profiles for the low-and high-permeability rocks,

Alternating Injection of Thermochemical and Acid Fluids
The thermochemical approach showed good performance in diverting the injected acids and then enhancing the efficiency of acidizing treatment. However, the treatment efficiency can be further improved by alternately injecting thermochemical and acid fluids. The alternating injection can lead to a reduced amount of injected fluids and it can also result in deeper acid penetration compared to the single-stage injection. Therefore, in this work, the technique of alternating injection of thermochemical and HCl fluids into the rock samples of different permeability (11 and 102 mD) was examined. A total of six injection cycles were applied: three thermochemical fluid and three HCl injection cycles. of each cycle was determined based on the stability of the pore pressure along the treated rock. During the thermochemical cycles, the pressures at the cores' inlet and outlet are almost flat for all samples. However, during the HCl injection, the pressures fluctuate due to the reaction between the injected fluid and the carbonate matrix. At the final stage of acid injection, the pressure fluctuation is very high, which can indicate significant solid migration. Injecting HCl into carbonate rock can dissolve part of the carbonate matrix and induce solid migration [26]. Moreover, Figure 9 compares the pressure-drop profiles for the low-and high-permeability rocks during the alternating injection of thermochemical and HCl fluids. The pressure-drop profiles indicate that wormholes were generated in both rocks, since the final pressure-drop is almost zero. The wormhole was created in the high-permeability rock during the second cycle, while it was generated during the fourth injection cycles in the low-permeability rock. Ultimately, continuous wormholes, from the core inlet to the outlet, were achieved in both samples after the thermochemical/HCl treatment. Figures 10 and 11 show images for the cores' inlet and outlet after the alternating injection of thermochemical and HCl fluids. Molecules 2020, 24, x; doi: www.mdpi.com/journal/molecules respectively. The duration of each cycle was determined based on the stability of the pore pressure along the treated rock. During the thermochemical cycles, the pressures at the cores' inlet and outlet are almost flat for all samples. However, during the HCl injection, the pressures fluctuate due to the reaction between the injected fluid and the carbonate matrix. At the final stage of acid injection, the pressure fluctuation is very high, which can indicate significant solid migration. Injecting HCl into carbonate rock can dissolve part of the carbonate matrix and induce solid migration [26]. Moreover, Figure 9 compares the pressure-drop profiles for the low-and high-permeability rocks during the alternating injection of thermochemical and HCl fluids. The pressure-drop profiles indicate that wormholes were generated in both rocks, since the final pressure-drop is almost zero. The wormhole was created in the high-permeability rock during the second cycle, while it was generated during the fourth injection cycles in the low-permeability rock. Ultimately, continuous wormholes, from the core inlet to the outlet, were achieved in both samples after the thermochemical/HCl treatment. Figures  10 and 11 show images for the cores' inlet and outlet after the alternating injection of thermochemical and HCl fluids.     . Images for the core inlet (left) and outlet (right) for the highpermeability sample after thermochemical/HCl treatment.

Single-Stage Injection
The developed model was used to assess the acidizing treatment in a heterogenous reservoir with two layers of different permeability values (20 and 100 mD). The injected acid will be diverted into the low-permeability layer utilizing the in situ gas generation technique. The description of wellbore and reservoir formations during this process are provided in Sections 3.1 and 3.2. The properties of the reservoir, well, and fluid are listed in Table 1. The top layer is characterized by considerably high permeability compared to the bottom layer. Table 2 summarizes the properties of Figure 11. Images for the core inlet (left) and outlet (right) for the high-permeability sample after thermochemical/HCl treatment.

Single-Stage Injection
The developed model was used to assess the acidizing treatment in a heterogenous reservoir with two layers of different permeability values (20 and 100 mD). The injected acid will be diverted into the low-permeability layer utilizing the in situ gas generation technique. The description of wellbore and reservoir formations during this process are provided in Sections 3.1 and 3.2. The properties of the reservoir, well, and fluid are listed in Table 1. The top layer is characterized by considerably high permeability compared to the bottom layer. Table 2 summarizes the properties of top formation (layers 1) and bottom formation (layer 2). The permeability of layer 1 is five times higher than the permeability of layer 2. Therefore, during the thermochemical injection, most of the generated gas will invade into layer 1. In this work, the performance of thermochemical fluids in diverting the injected acids was quantified by determining the flow rates into the top (Q1) and bottom (Q2) layers. Then, the ratio Q1/Q2 was used as an indicator of diversion efficiency. If the Q1/Q2 ratio equals one, this indicates that the injected fluids are equally distributed into the two layers. Meanwhile, if the flow rate ratio is less than one, this reveals that the injected acid was successfully diverted into the low-permeability layer [8], and the acid flow rate into the low-permeability layer (Q2) is higher than into the high-permeability layer (Q1). Table 1. Reservoir, well, and fluid properties for liquid formation.

Layer 1 Layer 2
Permeability, k (mD) 100 20 Thickness, h (ft) 20 20 Damaged radius, r d (in) 12 12 Skin, S 0 12.5 12.5 Figure 12 shows the profiles of Q1/Q2 ratio as a function of the injected acid volume, with thermochemical reaction and N 2 injection used as acid diverter. The flow rate ratio (Q1/Q2) is decreasing, with acid injection indicating that the injected acid is invading into the low-permeability layer and this will result in reducing the skin factor in the low-permeability layer. Figure 13 shows the formation skin for the top and bottom layers against the acid volume. This figure indicates that thermochemical reaction has a better diversion performance than nitrogen injection since the thermochemical reaction showed lower skin values compared to the N 2 injection. Thermochemical approach can reduce the acid volume by around 23% compared to the N 2 injection, and the required acid volume was reduced from around 22 to less than 18 ft 3 /ft. This can be attributed to the injection of thermochemical fluids providing more pressure difference and viscous contrast compared to the N 2 injection. Ultimately, the thermochemical approach showed effective acid diversion as indicated by the reduction in the Q1/Q2 ratio to less than one, revealing that more acid is invaded into the low-permeability layer.   20 20 Damaged radius, rd (in) 12 12 Skin, S0 12.5 12.5 Figure 12. The injection rate ratio between top (Q1) and bottom (Q2) layer using thermochemical reaction and N2 injection.     20 20 Damaged radius, rd (in) 12 12 Skin, S0 12.5 12.5 Figure 12. The injection rate ratio between top (Q1) and bottom (Q2) layer using thermochemical reaction and N2 injection.

Alternating Thermochemical and Acid Injection
Alternating thermochemical and acid fluids injection can be used to improve the efficiency of acid diversion and minimize the amount of injected acids. The developed model was used to predict the performance of alternating thermochemical and acid injection. Figure 14 shows the reduction in skin factors in high-and low-permeability layers during the alternating thermochemical and acid injection. The alternating injection approach showed better performance compared to the single stage of thermochemical injection, with the treatment volume reduced from 20 to around 5.6 ft 3 /ft. Alternating the thermochemical fluids will advance the treatment by the advantages of increasing the pressure and temperature in every cycle and then reduce the acid volume by around 3.6 times compared to single-stage injection.
Molecules 2020, 24, x; doi: www.mdpi.com/journal/molecules Alternating thermochemical and acid fluids injection can be used to improve the efficiency of acid diversion and minimize the amount of injected acids. The developed model was used to predict the performance of alternating thermochemical and acid injection. Figure 14 shows the reduction in skin factors in high-and low-permeability layers during the alternating thermochemical and acid injection. The alternating injection approach showed better performance compared to the single stage of thermochemical injection, with the treatment volume reduced from 20 to around 5.6 ft 3 /ft. Alternating the thermochemical fluids will advance the treatment by the advantages of increasing the pressure and temperature in every cycle and then reduce the acid volume by around 3.6 times compared to single-stage injection. Figure 14. Skin reduction during alternating thermochemical and acid injection into high-(zone 1) and low-permeability layers (zone 2).

Sensitivity Analysis
Sensitivity analysis was conducted to assess the impact of formation parameters on the treatment efficiency. The influences of formation porosity, layer permeability, and pressure difference between the two layers on acid diversion performance were studied. Table 3 lists the model parameters of the different cases used in the sensitivity analysis work. Figure 15 shows the impact on the pressure difference on the acid diversion performance. The pressure difference between the two layers (low-and high-permeability layers) varied from 600 to 3100 psi, and the diversion performance was evaluated based on the Q1/Q2 ratio. Recalling that, a lower Q1/Q2 value indicates that the injected acids are invading into the low-permeability layers and better acid diversion is then obtained. The pressure difference showed a minor effect on the diversion performance. Similar profiles of Q1/Q2 were observed using different pressure values in the treated formations. This is caused by the major difference of viscosity between the reservoir liquid and injected gas. Thus, it has substantially overcome the effect of pressure difference between the reservoir and bottomhole ones. Although pressure difference is a major contributor to the injected fluids to encroach further to the wellbore adjacent layers, the model honors the viscosity contrast and adequately illustrates almost equal flowrates to both layers.  Figure 14. Skin reduction during alternating thermochemical and acid injection into high-(zone 1) and low-permeability layers (zone 2).

Sensitivity Analysis
Sensitivity analysis was conducted to assess the impact of formation parameters on the treatment efficiency. The influences of formation porosity, layer permeability, and pressure difference between the two layers on acid diversion performance were studied. Table 3 lists the model parameters of the different cases used in the sensitivity analysis work. Figure 15 shows the impact on the pressure difference on the acid diversion performance. The pressure difference between the two layers (low-and high-permeability layers) varied from 600 to 3100 psi, and the diversion performance was evaluated based on the Q1/Q2 ratio. Recalling that, a lower Q1/Q2 value indicates that the injected acids are invading into the low-permeability layers and better acid diversion is then obtained. The pressure difference showed a minor effect on the diversion performance. Similar profiles of Q1/Q2 were observed using different pressure values in the treated formations. This is caused by the major difference of viscosity between the reservoir liquid and injected gas. Thus, it has substantially overcome the effect of pressure difference between the reservoir and bottomhole ones. Although pressure difference is a major contributor to the injected fluids to encroach further to the wellbore adjacent layers, the model honors the viscosity contrast and adequately illustrates almost equal flowrates to both layers.  Figure 15. Effect of pressure difference (between layers 1 and 2) on the acid diversion performance.
Additionally, Figure 16 examines the response of diversion performance with different porosity values. The highest porosity values exhibited the best diversion performance compared to the other two cases. The bigger porosity value with gas invading the top layer pores assisted in providing an additional drive for the acid to be diverted to the lower layer. By contrast, the smaller porosity value allowed for small volumes that acid can saturate and, consequently, the diversion effect was slightly less. Moreover, the effect of layer permeability on the acid diversion performance is shown in Figure  17, where permeability ratios of 5 and 50 were used. As the results convey, the model manifested permeability as the major driving parameter for acid flow between the two layers. As the permeability of the top layer increases, it accumulates most of the injected acid correspondingly. This has also resulted in delaying the treatment of the bottom layer massively in comparison to the case with less permeability value of the top layer. Finally, while the bottom layer permeability was decreasing down to the tight levels, and the diversion effect responded with weaker performance. Additionally, the small permeability draws slight volumes of acid resulting in the top layer drawing most of this. As an ultimate response, the top layer gets a significant lead to be treated ahead of the bottom layer. Additionally, Figure 16 examines the response of diversion performance with different porosity values. The highest porosity values exhibited the best diversion performance compared to the other two cases. The bigger porosity value with gas invading the top layer pores assisted in providing an additional drive for the acid to be diverted to the lower layer. By contrast, the smaller porosity value allowed for small volumes that acid can saturate and, consequently, the diversion effect was slightly less. Moreover, the effect of layer permeability on the acid diversion performance is shown in Figure 17, where permeability ratios of 5 and 50 were used. As the results convey, the model manifested permeability as the major driving parameter for acid flow between the two layers. As the permeability of the top layer increases, it accumulates most of the injected acid correspondingly. This has also resulted in delaying the treatment of the bottom layer massively in comparison to the case with less permeability value of the top layer. Finally, while the bottom layer permeability was decreasing down to the tight levels, and the diversion effect responded with weaker performance. Additionally, the small permeability draws slight volumes of acid resulting in the top layer drawing most of this. As an ultimate response, the top layer gets a significant lead to be treated ahead of the bottom layer.

Description of the Proposed Approach
Thermochemical fluids are used to improve acid diversion, utilizing the in situ gas generation mechanism. Figure 18 shows a schematic of the acid diversion using thermochemical fluids, where two layers of different permeability are shown (K1 and K2). Initially, the two layers are saturated with oil. Then, thermochemical fluids are injected to react downhole and generate nitrogen gas. Due to the flow resistance, most of the generated gas will flow into the high-permeability layer while a small amount will flow into the low-permeability zone. The chemical reaction can be triggered by the reservoir temperature and acid can also be injected to reduce the solution pH and accelerate the thermochemical reaction [27,28]. Thereafter, acid is injected to stimulate the reservoir layers and reduce the formation skin. During the acidizing treatment, the generated nitrogen will block the highpermeability zones and divert the injected acids into the low-permeability zones. Consequently, both the high-permeability and low-permeability zones will be stimulated.

Description of the Proposed Approach
Thermochemical fluids are used to improve acid diversion, utilizing the in situ gas generation mechanism. Figure 18 shows a schematic of the acid diversion using thermochemical fluids, where two layers of different permeability are shown (K 1 and K 2 ). Initially, the two layers are saturated with oil. Then, thermochemical fluids are injected to react downhole and generate nitrogen gas. Due to the flow resistance, most of the generated gas will flow into the high-permeability layer while a small amount will flow into the low-permeability zone. The chemical reaction can be triggered by the reservoir temperature and acid can also be injected to reduce the solution pH and accelerate the thermochemical reaction [27,28]. Thereafter, acid is injected to stimulate the reservoir layers and reduce the formation skin. During the acidizing treatment, the generated nitrogen will block the high-permeability zones and divert the injected acids into the low-permeability zones. Consequently, both the high-permeability and low-permeability zones will be stimulated.
The thermochemical fluids reaction can be represented by Equation (1) [27,28]: Nitrogen gas (N 2 ) will be generated in a form of chemically induced pulse that ought to significantly increase the pressure of the invaded zones, and the generated pressure can reach up to 5000 psi [29]. The induced pressure in the wellbore will force the generated gas to flow into the reservoir formations. Due to the flow resistance, most of the generated gas will flow into the high-permeability zones while small volume of N 2 gas will invade into the low-permeability zones. Hence, the generated gas will promote the acid to be diverted toward the low-permeability layers for which treatment is desired. Additionally, the thermochemical reaction will increase the temperature substantially, and could reach up to 600 • F [29], which will reduce the viscosity of the formation fluids. This will also promote the viscous contrast diversion to distribute the acid efficiently over the formation zones. However, the thermochemical treatment should be precisely designed in order to optimize the amounts of generated gas and to ultimately attain successful treatment. The volumes and concentrations of thermochemical fluids should be accurately selected to ensure that the generated pressure and temperature will be within the specifications of downhole completions. The thermochemical fluids reaction can be represented by Equation 1 [27,28]: Nitrogen gas (N2) will be generated in a form of chemically induced pulse that ought to significantly increase the pressure of the invaded zones, and the generated pressure can reach up to 5000 psi [29]. The induced pressure in the wellbore will force the generated gas to flow into the reservoir formations. Due to the flow resistance, most of the generated gas will flow into the highpermeability zones while small volume of N2 gas will invade into the low-permeability zones. Hence, the generated gas will promote the acid to be diverted toward the low-permeability layers for which treatment is desired. Additionally, the thermochemical reaction will increase the temperature substantially, and could reach up to 600 °F [29], which will reduce the viscosity of the formation fluids. This will also promote the viscous contrast diversion to distribute the acid efficiently over the formation zones. However, the thermochemical treatment should be precisely designed in order to optimize the amounts of generated gas and to ultimately attain successful treatment. The volumes and concentrations of thermochemical fluids should be accurately selected to ensure that the generated pressure and temperature will be within the specifications of downhole completions.

Numerical Fine-Scale Model
A finite volume based average continuum, also known as the two-scale model, was developed in this research to observe the impact of permeability contrast on acid distribution [30]. It is assumed that at any point in the domain, both fluids and solids exist in a proportion defined by the porosity. The elements in the domain are large enough to contain both solids and liquids but small enough to have homogenous properties within the element. A correlated random Gaussian distribution of porosity and permeability was implemented to ensure a heterogonous system within the full domain.
First, the continuity equation is implemented which conserve mass in the liquid phase, expressed as where is the fluid density, is the velocity vector, is the porosity, and is time. The superficial velocity defined by Darcy's law is written as Figure 18. Acid diversion using thermochemical approach.

Numerical Fine-Scale Model
A finite volume based average continuum, also known as the two-scale model, was developed in this research to observe the impact of permeability contrast on acid distribution [30]. It is assumed that at any point in the domain, both fluids and solids exist in a proportion defined by the porosity. The elements in the domain are large enough to contain both solids and liquids but small enough to have homogenous properties within the element. A correlated random Gaussian distribution of porosity and permeability was implemented to ensure a heterogonous system within the full domain.
First, the continuity equation is implemented which conserve mass in the liquid phase, expressed as where ρ f is the fluid density, u is the velocity vector, φ is the porosity, and t is time. The superficial velocity defined by Darcy's law is written as where k is the permeability tensor, µ f is the fluid viscosity, and p is the pressure. The fluid superficial velocity is obtained from solving the system of equations above. Then, the convective, diffusive, and reactive transport equation of acid in porous media is solved: where C A is the HCl acid concentration represented in mass fraction, D e is the effective acid diffusion, k r is the reaction rate constant, k c is the mass transfer coefficient, and a v is the carbonate mineral-specific area. The first term in the equation above represents acid accumulation, the second term represents acid convection, the third term represents acid diffusion, and the last term represents acid/rock reaction. The acid/rock reaction causes the porosity of the rock to increase according to the following: where β 100 is the dissolving power of the full strength HCl acid, and ρ r is the rock density.

Constitutive Equations
The algorithm used in this model is sequential, which starts by solving Equations (2) and (3) for the velocity profile, Equation (4) for the acid concentration, and Equation (5) for acid/rock dissolution. To solve the system above, some properties should be updated at each time step, such as k c , D e , a v , and k. The effective acid diffusion in porous media can be related the molecular diffusion, D m , through the following: The mass transfer coefficient can be obtained through relating Schmidt number, Sc, Reynold number of flow in pores, Re p , and Sherwood number, Sh. The following are the definitions of these numbers: Re p = 2ρ f r p |u| where r p is the pore radius, Sh ∞ is the asymptotic Sherwood number, and b is a constant. The mass transfer coefficient can be obtained by solving the equation below once Sherwood number is determined from Equation (7).
The equations below are used to update the pore radius, permeability, and specific surface area based on the change in porosity [31]: where ε, γ, and η are empirical parameters that could be used to tune the model with experiment outcomes.

Initial and Boundary Conditions
To solve Equations (2) and (4), initial and boundary conditions should be implemented. The following conditions were implemented for Equation (2): p(x, y, z, t = 0) = p i Initially (14) ∂p ∂x (x=0,y,z,t) = − qBµ f k x A c at the inlet p(x = L, y, z, t) = p out at the outlet n.∇p = 0 at the other boundaries where p i is the initial pressure, p out is the outlet pressure, q is the injection rate, B is the formation volume factor, A c is the grid cross-sectional area, L is the core length, and n is the normal vector to the surface. The conditions for Equation (4) are as follows: C A (x = 0, y, z, t) = C ini at the inlet n.∇C A = 0 at the other boundaries where C ini is the initial acid concentration.

Skin Revolution Model
An analytical model was developed to evaluate the performance of using thermochemical fluids to improve the acidizing treatment in heterogenous reservoirs. MATLAB program was developed to estimate the skin factor for the permeable and tight zones around the wellbore. The skin factor for each zone will be determined as a function of the injected acids, assuming incompressible and immiscible fluids. In addition, due to the substantial mobility ratio of the generated gas with comparison to the injected acid, the flow of acid is assumed to be acting with piston-like displacement. Moreover, it is assumed that nitrogen gas is encroaching the permeable layer in significant amounts, while negligible amounts of the nitrogen gas will invade into the low-permeability layer. Finally, the layer skin is used as an indicator of the acidizing performance, with the layer skin being reduced with higher volumes of acid invading into the treated layer. The equations used to develop the acid diversion model are described below.
The pressure difference due to formation skin can defined as follows [32]: where ∆p s is the pressure drop due to skin, ∆p real is the real or actual pressure drop, and ∆p ideal is the ideal pressure drop where no damage was induced. The pressure drop can be determined assuming steady state flow as follows: where q is the flow rate, µ is the fluid viscosity, k is the formation permeability, h is the formation thickness, r e is the drainage radius, and r w is the wellbore radius. Figure 19 shows the different regions around the wellbore during acidizing treatment.
Considering the regions around the wellbore that are saturated with spacer and acids fluids, the pressure drop for real and ideal cases can be expressed as: where r s is the distance to which spacer penetrated, r a is the acid-saturated zone, µ s is the viscosity of spacer fluid, and µ a is the acid viscosity. Substituting Equations (16) and (17) in Equation (18), the pressure drop due to formation skin can be given by  Considering the regions around the wellbore that are saturated with spacer and acids fluids, the pressure drop for real and ideal cases can be expressed as: where rs is the distance to which spacer penetrated, ra is the acid-saturated zone, is the viscosity of spacer fluid, and is the acid viscosity. Substituting Equations 16 and 17 in Equation 18, the pressure drop due to formation skin can be given by Since the treated zones have similar thickness and flow rate, the pressure drop can be expressed as Then, the skin factor ( ) can be defined as = ln + ln − ln (22) and the pressure drop due to formation skin will be given as Moreover, in this work, the diversion effect was quantified as a viscous skin factor Svis for gas with viscosity µg that is being displaced by an acid with viscosity µacid as the following [32]: The radius of acid penetration racid towards the formation targeted zone can be calculated as Since the treated zones have similar thickness and flow rate, the pressure drop can be expressed as Then, the skin factor (S vis ) can be defined as S vis = µ s µ ln r s r a + µ a µ ln r a r w − ln r s r w (22) and the pressure drop due to formation skin will be given as Moreover, in this work, the diversion effect was quantified as a viscous skin factor S vis for gas with viscosity µ g that is being displaced by an acid with viscosity µ acid as the following [32]: The radius of acid penetration r acid towards the formation targeted zone can be calculated as where V acid is the volume of injected acid, φ is the formation porosity, and h is the formation thickness. Then, the radius of acid penetration (r acid ) can be determined by rearranging Equation (25).
where V j is volume per unit thickness (V/h) of acid invaded into a particular zone (j). Equation (26) can be substituted in Equation (24) to get Equation (27) indicates that the viscous skin factor (S vis ) is changing with the volume of the injected acid (V j ). Assuming steady state flow, the acid flow rate into a particular layer (q i ) can be determined as follows [8]: Then, for a certain zone, the cumulative volume of injected acid can be estimated utilizing the acid flow rate (q i ) as follows: Acid-injected volumes, in turn, will be increasing until the removal of all damage, at which point the formation skin (S) can be deduced depending on the acid volume (V c ) [8]: where S 0 is the original skin, C is the rate of skin decrease, and V c is the cumulative injected acid at a particular time.
Ultimately, the developed model can estimate the formation skin in each layer utilizing the radius of the acid and spacer zones around the wellbore as presented in Equation (22). In addition, the developed model can estimate the formation skin as a function of the injected acid and the original formation skin (before treatment) as presented in Equation (30). Therefore, MATLAB program was developed to estimate the skin factor using Equations (22) and (30).

Experimental Measurements
Coreflooding experiments were conducted in order to determine the performance of the developed approach of using thermochemical fluids in diverting the injected acids. A parallel coreflood setup was used, and carbonate rock samples of different permeability values were used. The acidizing experiments were conducted under high pressure and high temperature conditions. An overburden pressure of 1000 psi and backpressure of 400 psi were applied. In addition, HCl of 15wt% concentration was used, the injection rate was maintained at 1 cm 3 /min, and the system temperature was 80 • C. Moreover, the rock samples were prepared by measuring the rock permeability and porosity. Then, the treatment was implemented using alternating injection of HCl acid and thermochemical fluids. The pressure drop across the high-and low-permeability rock samples were monitored using pressure transducers at the core's inlet and outlet. The properties of the used rock samples are listed in Table 4, and Figure 20 shows the experimental setup used in this work.

Conclusions
This study presents a novel solution to improve acid diversion utilizing in situ nitrogen generation. This method involves injecting thermochemical fluids during the acidizing treatment. In this work, numerical and analytical models were developed, and experimental measurements were carried out in order to evaluate the performance of the proposed technique. Based on this study, the following conclusions were drawn: • Injecting thermochemical fluids before acidizing treatment showed an effective performance in diverting the injected acids into the low-permeability rocks and then enhancing the efficiency of acidizing treatment. • After the treatment, CT-scan images showed that continuous wormholes were generated in the high-permeability rocks as well as in low-permeability rocks. • The two-scale continuum model was able to reproduce the experimental outcomes of wormhole propagation. • Alternating injection of thermochemical and acid fluids showed better acidizing performance compared to the single stage of thermochemical injection. • Alternating the thermochemical fluids will advance the treatment through the advantages of increasing the pressure and temperature in every cycle and then reduce the acid volume by around 3.6 times compared to single-stage injection. • The thermochemical approach showed better diversion performance compared to nitrogen injection, and lower values of formation skin were obtained using the thermochemical fluids. • Injecting thermochemical fluids can provide greater pressure difference and viscous contrast compared to the N2 injection. Hence, a thermochemical approach can reduce the required acid volume by around 23% compared to N2 injection. • Sensitivity analysis indicates that the formation porosity and permeability have great impact on the acidizing treatment, while the pressure difference between the different layers has a minor effect on diversion performance.

Conclusions
This study presents a novel solution to improve acid diversion utilizing in situ nitrogen generation. This method involves injecting thermochemical fluids during the acidizing treatment. In this work, numerical and analytical models were developed, and experimental measurements were carried out in order to evaluate the performance of the proposed technique. Based on this study, the following conclusions were drawn:

•
Injecting thermochemical fluids before acidizing treatment showed an effective performance in diverting the injected acids into the low-permeability rocks and then enhancing the efficiency of acidizing treatment.

•
After the treatment, CT-scan images showed that continuous wormholes were generated in the high-permeability rocks as well as in low-permeability rocks.

•
The two-scale continuum model was able to reproduce the experimental outcomes of wormhole propagation.

•
Alternating injection of thermochemical and acid fluids showed better acidizing performance compared to the single stage of thermochemical injection.

•
Alternating the thermochemical fluids will advance the treatment through the advantages of increasing the pressure and temperature in every cycle and then reduce the acid volume by around 3.6 times compared to single-stage injection.

•
The thermochemical approach showed better diversion performance compared to nitrogen injection, and lower values of formation skin were obtained using the thermochemical fluids.

•
Injecting thermochemical fluids can provide greater pressure difference and viscous contrast compared to the N 2 injection. Hence, a thermochemical approach can reduce the required acid volume by around 23% compared to N 2 injection. • Sensitivity analysis indicates that the formation porosity and permeability have great impact on the acidizing treatment, while the pressure difference between the different layers has a minor effect on diversion performance. Funding: This research received no external funding.

Acknowledgments:
The college of Petroleum and Geoscience at King Fahd University of Petroleum & Minerals is acknowledged for the support and permission to publish this work.

Conflicts of Interest:
The authors declare no conflicts of interest.