Optimization and Performance Evaluation of Foam Acid Systems for Plugging Removal in Low Pressure Oil and Gas Reservoirs

: Foam acidization has unique advantages such as low damage, low ﬁltration, low friction, high efﬁciency, excellent retardation, and fast liquid discharge rate, which is suitable for stimulation and reconstruction of low-pressure oil and gas reservoirs that have been developed over many years. It is obtained that the main chemical components of downhole plugging materials include vegetable oil, fatty acids and their esters, silicone oil, amide polymers, and additional organic components, as well as non-organic components, elemental sulfur, ferrous sulﬁde, iron disulﬁde, silicon dioxide, mineral salts, etc. The performance of foam acid was investigated by experiments, including the effective range of action of active acids, reducing ﬁltration, increasing temperature resistance and high-temperature stability of foam acid deep wells. The new foam acid system is developed and optimized to suitable for low-pressure deep well acidiﬁcation operations. Experimental evaluation optimized the acid foaming agent and foam stabilizer and developed a new foam acid formulation with foam stability, ﬁlter loss reduction, temperature resistance, and easy backﬂow performance. The experimental condition is that the temperature is 90 ◦ C, the foam quality can reach more than 70% when mixed for more than 30 s, the average half-life is 38.75 min, and the liquid separation rate is 19.90 s/mL. Its suspension is better than that of conventional hydrochloric acid, its corrosion rate is 1.872 g/m 2 · h, and the ﬂowback rate of foam acid residue reaches 97%. Experimental evaluation has shown that the developed foam acid features high surface activity, stable foam, strong temperature resistance, signiﬁcant speed and corrosion suppression, and excellent drainage assist performance. Dynamical simulation evaluation of reservoir core foam acidiﬁcation demonstrated that the foam features long-life, strong suspension capacity, excellent rheology, low ﬁltration, and signiﬁcant acidization and plug removal effects, and can be used in stimulating the medium-deep, high-temperature, and low-pressure oil and gas reservoirs.


Introduction
With the development of oil and gas fields around the world entering the middle and late stages, the long-term high-speed production oil and gas reservoirs are facing the shortage of underground oil and gas resources and the reduction of reservoir pressure, leading to the gradual increase of low-pressure oil and gas wells, which makes it more difficult to stabilize the production of existing oil and gas producing blocks. Most lowpressure oil and gas wells are old ones that have been in development for years. Such oil and gas wells have undergone drilling, completion, acid fracturing, workover, well kill, and additional operations [1][2][3][4][5][6][7][8]. The formation energy was low and the reservoir near the well was severely damaged. Damage to such wells comes not only from non-equilibrium scale, sludge, bacteria, precipitation, particle migration, and the additional damage to the formation of gas, water, and minerals over many years caused by the production system of the well itself, but also from more prominent external operational measures. Therefore, the most prominent issue for such gas wells is to reduce formation damage. Acidification operations are a major effort to reduce or eliminate formation damage and connect oil and gas conduits near wells. Due to the significant damage to the reservoir in the vicinity of low-pressure gas wells, technicians believe that foam acid systems with limited fluid volume, strong suspension capacity, and easy flowback should be used as often as possible for repeated acidification of low-pressure oil and gas wells.
Some oil and gas reservoirs with different porosity, permeability, and rock types have been developed in damaged formations, and the extent of damage may vary after certain developments and production. In matrix acidification, it is necessary to treat all damaged formations, especially the most severely damaged ones (Zhong et al., 2020;Fang et al., 2022) [9,10]. However, fluid flows naturally into the most permeable and least damaged strata and may leave less permeable and more damaged strata untreated. To solve this problem, one of the chemical methods developed was the use of foam as a moderator, and investigations of foam acid date back to 1969 (Smith et al., 1969) [11]. Since then, numerous experimental and numerical simulation studies have been performed to investigate the influence of initial permeability, permeability contrast, foam mass, saturation conditions, injection rate, and foam rheological behavior on foam divergence. ( [12][13][14][15][16][17][18][19][20][21][22]. Foam is used to partially block high-permeability and undamaged formations, diverting acid into low-permeability formations. According to the results of previous studies, foam acidization has the following main advantages. In the first one, the foam fluid has a selective effect on the formation permeability. Due to the Jamin effect, the foam has a strong plugging effect on the high permeability layer and a weak plugging effect on the low permeability reservoir. As a result, reservoirs with low permeability can be excited, enhancing the effect of acidification treatment. Second, the foaming fluid also has a selective effect on the oil and water reservoirs, that is, the acid prefers to excite the oil reservoir. In the third, the energy provided by the expansion of the gas in the foam favors the return of the residual acid flow, thus reducing the residual damage. In the last one, foam acid is a retardant acid that reduces the acid-rock reaction rate and enables deep acidification. In spite of its numerous advantages, foaming acid has some fatal defects, such as its poor resistance to temperature, its complicated formula, and its near ineffectiveness at high permeability contrasts, which severely limit its further application (Li et al., 2008) [23].
Many researchers agree that foam does not increase the viscosity of water or acid, nor does it alter the relation between the relative permeability of water and its saturation in a steady foam flow (Bernard et al., 1965;Huh et al., 1989;Sanchez and Schechter, 1989;de Vries and Wit, 1990;Friedmann et al., 1986Friedmann et al., , 1991 [24][25][26][27][28][29]. Foam directly reduces gas mobility in the rock, and the less mobile gas in turn drives down water saturation, thereby reducing the relative permeability and mobility of water. Foam partially reduces gas mobility by trapping a significant fraction of the gas in place; up to 80-99% of the gas is trapped, even if the foam flows at a high-pressure gradient (Rossen, 1990) [30]. On the other hand, the presence of foam can increase the effective viscosity of the flowing gas and thus reduce the gas mobility (Radke et al., 1990;Gdanski et al., 1993;Hill et al., 1994;Rossen, 1996) [31][32][33][34]. Both effects are related to each other. The apparent yield stress of the foam increases at high capillary pressure and a large number of bubbles in the foam are trapped in place. The presence of foam in an extremely permeable or undamaged layer can reduce the liquid saturation and relative liquid permeability, thereby reducing acid flow into the foam saturated layer. Acid can then be diverted into these layers without zonal isolation. The use of a surfactant pre-flush can improve acid diversion by helping to place Processes 2023, 11, 649 3 of 17 additional foams in high-permeability or undamaged layers. Therefore, it is possible to preferentially block the high permeability zone during acid injection.
For oil and gas wells with low formation pressure, it is difficult for conventional acid systems to backflow residual acid after acidification due to its high density, which requires a low-density acid system with strong backflow capacity for acidification conversion. For water-sensitive formations, conventional acid systems have high filtration rates, which make the formation water sensitive and lead to reservoir pollution. The above reasons restrict the application of conventional acidization techniques in the development of oil and gas reservoirs. In order to resolve the above contradiction, the technique of acidizing formation with foam acid has been proposed. Foam acid is a foam acidizing fluid system that meets the requirements of acidizing operations with a stable performance and a good compatibility with formation using conventional acid fluids and their additives as a base fluid, salt-resistant, acid-resistant, high-temperature resistant foaming agent and foam stabilizer. Foamic acid combines the properties of a foam and an acid liquid system, allowing the prepared fluid to have both the properties of a foam and the acidizing power. Foamic acid has the following advantages over conventional acids: (1) Low density (average density is generally lower than 0.5-0.8 g/cm 3 , with a minimum density of 0.03-0.04 g/cm 3 ), low friction, suitable for low pressure oil and gas reservoirs with low energy; (2) The lower filtration rate has less damage to the formation, so it is suitable for water sensitive formation; (3) Strong flowback and rock carrying capacity; (4) The system has high viscosity and shear dilution characteristics, which can play the role of profile control and temporary plugging; (5) It has a good retarding effect and is a retarding acid. The above characteristics enable foam acid to be used for acidizing construction of special formations (low pressure, low permeability, water sensitive formations, multi-layer complex heterogeneous reservoirs) that cannot be involved in conventional acidizing.
Because the theoretical and experimental research work of repeated acidification of foam acid lags far behind the field requirements, the repeated acidification of foam acid lacks necessary scientific and systematic research guidance, leading to a large number of repeated acidification operations of low-pressure gas wells fail to achieve ideal results, which are mainly manifested in low construction success rate, poor stimulation effect, short stimulation validity period, and even ineffective repeated acidification of some lowpressure gas wells. Problems with foam stimulation manipulation techniques are mainly manifested by the lack of research on foam systems and application techniques. Therefore, research has been carried out on the performance of foam acid in improving the effective action distance of active acid, reducing filtration, increasing the temperature resistance and high temperature stability of foam acid deep wells, and the foam acid system suitable for acidizing operations in low-pressure deep wells has been developed and optimized.

Composition Analysis of Downhole Plug
The complexity of formation, additives, and interaction of various substances determines the complexity of plugging material composition. Different analysis methods are used for different substances in the plug: when analyzing the components of the plug, the organic substances and high molecular weight polymers in the plug are first separated and extracted step by step with different polar solvents, and the extract is analyzed by infrared spectrum and compared with the international standard infrared spectrum for structural confirmation. For the analysis of complex organic compounds, column chromatography or thin layer chromatography shall be adopted for further separation and purification before identification. For liquid samples with volatile odor, use gas chromatography to conduct comparative analysis and identification of components with known reagents. For the inorganic substances in the blockings, after the organic substances are separated and removed, the structure or category of the inorganic main components are first judged by infrared spectroscopy, and then the inorganic compound elements and valence states are analyzed by photoelectron spectroscopy for identification. Finally, the composition and content of the main elements are quantitatively analyzed by plasma emission spectrometer and known standard solutions. Various means are combined to confirm the composition and content of the blockage. The specific experimental results are shown in Table 1. The infrared spectrogram ( Figure 1) of the well scale was obtained with NICOLEt 6700 infrared spectrometer. It can be seen that the scale contains mineral oil (the characteristic peaks are at 2923.6 and 1457.9 cm −1 ), butylene adipate (the characteristic peaks are at 1731.8, 1174.5, and 1139.7 cm −1 ), or fatty acid esters. raphy to conduct comparative analysis and identification of components with kn agents. For the inorganic substances in the blockings, after the organic substances arated and removed, the structure or category of the inorganic main components judged by infrared spectroscopy, and then the inorganic compound elements and states are analyzed by photoelectron spectroscopy for identification. Finally, the sition and content of the main elements are quantitatively analyzed by plasma e spectrometer and known standard solutions. Various means are combined to con composition and content of the blockage. The specific experimental results are sh Table 1. The infrared spectrogram ( Figure 1) of the well scale was obtained with N 6700 infrared spectrometer. It can be seen that the scale contains mineral oil (the teristic peaks are at 2923.6 and 1457.9 cm −1 ), butylene adipate (the characteristic p at 1731.8, 1174.5, and 1139.7 cm −1 ), or fatty acid esters. By XRD diffraction analysis, we can see the existence of SiO2, FeS, ferrous d simple sulfur of rhombic crystal form, and other crystal materials by comparing w standard card. Combined with the above crystal forms, the microscopic morpho the plug was analyzed by scanning electron microscope to verify the binding state component of the plug. First, observe the overall morphology of the dirt on the p lower magnification. It is found that the size of the dirt is different, the inclusion and it is dispersed in the black colloid, as shown in Figure 2a). The microscopic m ogy of inclusion and colloid was observed by magnification. The former is similar tal cluster structure, as shown in Figure 2b), and the latter is a sub distributed in and colloid morphology, in which well-defined crystal structure was also found, a in Figure 2c). By XRD diffraction analysis, we can see the existence of SiO 2 , FeS, ferrous disulfide, simple sulfur of rhombic crystal form, and other crystal materials by comparing with the standard card. Combined with the above crystal forms, the microscopic morphology of the plug was analyzed by scanning electron microscope to verify the binding state of each component of the plug. First, observe the overall morphology of the dirt on the plug at a lower magnification. It is found that the size of the dirt is different, the inclusion is thick, and it is dispersed in the black colloid, as shown in Figure 2a. The microscopic morphology of inclusion and colloid was observed by magnification. The former is similar to crystal cluster structure, as shown in Figure 2b, and the latter is a sub distributed inclusion and colloid morphology, in which well-defined crystal structure was also found, as shown in Figure 2c.
In summary, through infrared spectroscopy, gas chromatography, photoelectron spectroscopy, and other analysis methods, it is obtained that the main chemical components of downhole plugging materials include vegetable oil, fatty acids and their esters, silicone oil, amide polymers, and additional organic components, as well as non-organic components, elemental sulfur, ferrous sulfide, iron disulfide, silicon dioxide, mineral salts, etc. In summary, through infrared spectroscopy, gas chromatography, photoelectron spectroscopy, and other analysis methods, it is obtained that the main chemical components of downhole plugging materials include vegetable oil, fatty acids and their esters, silicone oil, amide polymers, and additional organic components, as well as non-organic components, elemental sulfur, ferrous sulfide, iron disulfide, silicon dioxide, mineral salts, etc.

Determination of Foam Quality
Acidification of foam has the unique advantages of low damage, low filtration, low friction, high efficiency, excellent retarding effect, quick liquid discharge, etc. Foam acidizing can not only effectively remove the pollution and plugging near the well, but also has a better acidizing effect for reservoirs with lower formation pressure. The indoor evaluation method of foam acid should be based on its performance characteristics. Wang et al. (2021) investigated the effects of foaming properties of ASP flooding produced liquid through a set of experiments, and the factors affecting foaming capacity and foam stabilization, including temperature, pressure and the concentrations of chemical agents, were discussed [35]. They also focused on the decay kinetic characteristics of alkaline-surfactant-polymer-strengthened foams under the ultrasonic standing wave. The performance of the diverse foams was characterized. A decay kinetic model incorporating the energy correlation was developed and validated [36].
The first evaluation condition to be determined when conducting foam acid research is foam quality г and foam half-life t1/2. Foam quality г indicates the foaming ability of the foaming agent, and the half-life t1/2 of foam indicates the stability of forming foam. Therefore, г and t1/2 are the two essential characteristic parameters of the foam acid system and the essential performance index that must be determined before the optimization of foam acid formula.
Under certain pressure and temperature, the quality of foam г is related to the inflated gas volume Vg, base liquid volume V1 and foam liquid volume Vf: г = Vg/Vf = Vg/(Vg + V1). Blauer and Holcomb pointed out that the quality of the foam depends on the structure of the foam and its mobility. When the mass of the foam is 0 to 52%, the gas in the foam is spherical and dispersive and does not touch each other. In this range, the foam is a Newtonian liquid. When the mass of the foam is between 52% and 74%, the static foam is spherical or filled with diamond. The plastic viscosity and yield point of the foam shall be increased properly. When the mass of the foam is in the range of 72% to 95%, the static foam is spherical with slight contact. When flowing, the bubble deforms and the plastic viscosity and yield point increase rapidly. When the foam mass exceeds 96%, the foam becomes a useless mist. At the pressure and temperature near the bottom of the well, г 60-90% can be taken. In the construction of foam acid in the United States, most foam acid liquids with a foam quality of approximately 70% are used. This acid liquid has a minute fluid consumption, moderate viscosity, and minor damage to the formation. Therefore, in

Determination of Foam Quality
Acidification of foam has the unique advantages of low damage, low filtration, low friction, high efficiency, excellent retarding effect, quick liquid discharge, etc. Foam acidizing can not only effectively remove the pollution and plugging near the well, but also has a better acidizing effect for reservoirs with lower formation pressure. The indoor evaluation method of foam acid should be based on its performance characteristics. Wang et al. (2021) investigated the effects of foaming properties of ASP flooding produced liquid through a set of experiments, and the factors affecting foaming capacity and foam stabilization, including temperature, pressure and the concentrations of chemical agents, were discussed [35]. They also focused on the decay kinetic characteristics of alkaline-surfactantpolymer-strengthened foams under the ultrasonic standing wave. The performance of the diverse foams was characterized. A decay kinetic model incorporating the energy correlation was developed and validated [36].
The first evaluation condition to be determined when conducting foam acid research is foam quality г and foam half-life t 1/2 . Foam quality г indicates the foaming ability of the foaming agent, and the half-life t 1/2 of foam indicates the stability of forming foam. Therefore, г and t 1/2 are the two essential characteristic parameters of the foam acid system and the essential performance index that must be determined before the optimization of foam acid formula.
Under certain pressure and temperature, the quality of foam г is related to the inflated gas volume Vg, base liquid volume V 1 and foam liquid volume V f : г = V g /V f = Vg/(V g + V 1 ). Blauer and Holcomb pointed out that the quality of the foam depends on the structure of the foam and its mobility. When the mass of the foam is 0 to 52%, the gas in the foam is spherical and dispersive and does not touch each other. In this range, the foam is a Newtonian liquid. When the mass of the foam is between 52% and 74%, the static foam is spherical or filled with diamond. The plastic viscosity and yield point of the foam shall be increased properly. When the mass of the foam is in the range of 72% to 95%, the static foam is spherical with slight contact. When flowing, the bubble deforms and the plastic viscosity and yield point increase rapidly. When the foam mass exceeds 96%, the foam becomes a useless mist. At the pressure and temperature near the bottom of the well, г 60-90% can be taken. In the construction of foam acid in the United States, most foam acid liquids with a foam quality of approximately 70% are used. This acid liquid has a minute fluid consumption, moderate viscosity, and minor damage to the formation. Therefore, in this experiment, г = 70% is taken as the reference benchmark index for foam acid solution formula debugging.

Determination of the Foam Half-Life t 1/2
The half-life of the foam, t 1/2 , is generally determined from the construction scale and the pumping displacement. This experiment is based on a construction time of 40 to 60 min when a 100 m 3 foam fluid is used for acidization operation under 1.5 to 3.0 m 3 /min displacement. A foaming fluid does not usually produce water, or tiny amounts of water, during its flow. t 1/2 = 20 min or so in static conditions with an indoor foam acid fluid formulation, which can meet the construction requirements of a production well within 3000 m. The half-life t 1/2 of the acid foam should reach the reference standard of t 1/2 = 30 min under indoor static testing. At the same time, given that an overly long half-life of the foam is detrimental to the control of reaction time and will increase the cost of liquid formulation, the half-life t 1/2 of the developed foam acid should be in the range of 20 min to 40 min.

Formula Optimization of Foam Acid System
Currently, the widely used formulation of foaming acid is: 20% HCl + foaming agent + foaming stabilizer + additive + N 2 , where the additive is the CT1-3 acid corrosion inhibitor and the CT1-7 iron ion stabilizer in the CT series acid formulation, with a normal dosage of 1.0%. Thus, the key to optimizing foam acid formulations is the screening of foaming agents and foam stabilizers and the evaluation of formula compatibility.

Foaming Agent and Its Concentration Selection
In the formulation optimization of foaming acid solutions, foaming agents are selected based on strong foaming ability. Chemically indistinguishable from the liquid components used, when the pressure is released, the formed foam is prone to rupture low dosage. After entering the stratum, the permeability does not decrease. At present, there are numerous surfactants with different properties, but no specific acid foaming agent. It is necessary to experimentally determine the appropriate type and amount of foaming agent.

Test of Foaming Ability of Foaming Agent in Acid Solution
Different foaming agents are mixed into conventional acid, mixed and foamed under the same experimental conditions, and foam quality and half-life are measured. The test conditions are room temperature 20 • C and the concentration of acid solution is 5.0%. Table 2 shows that the foam stability of CT5-2 and CT5-1 in acid solution is relatively excellent. The CMC is used to characterize the surface activity of surfactants. The CBVP-V3 surface tension meter is used to test a series of products at 25 • C. Figure 3 shows the surface tension as a function of the logarithmic concentration of surfactants for several aqueous solutions of surfactants. Under the same conditions, the critical micelle concentrations of different surfactants vary considerably, and their significance varies as well. Of these, the CMCs of CT5-1 are the most pronounced, suggesting that different surfactants have different surface activities. From the curves, the CMC values γ read from the mutation points of the values are 0.0030%, 0.0008%, and 0.0004% respectively.
surface tension as a function of the logarithmic concentration of surfactants for several aqueous solutions of surfactants. Under the same conditions, the critical micelle concentrations of different surfactants vary considerably, and their significance varies as well. Of these, the CMCs of CT5-1 are the most pronounced, suggesting that different surfactants have different surface activities. From the curves, the CMC values γ read from the mutation points of the values are 0.0030%, 0.0008%, and 0.0004% respectively.

Determination of Foaming Agent Concentration
The relationship between foaming agent concentration and foam parameters is shown in Table 3. The amount of foaming agent should be as small as possible, provided that the added foaming agent is guaranteed to produce a sufficiently stable foaming solution in the regular acid. As can be seen from Table 3, the CT5-1 foams have the longest half-lives at the same foaming agent concentrations. With the exception of F-1, additional foaming agents have a foaming mass of approximately 80% and a foaming agent concentration of 1.0% at room temperature. At the same time, considering the relatively low price of the foaming agent CT5-1 and its better cost-to-performance ratio than other foaming agents, CT5-1 was identified as the foaming agent for the foaming acid formulation with a concentration of 1.0 to 5.0%.

Selection of Foam Stabilizer and Its Concentration
Experiments have shown that foams composed solely of foaming agents are less stable. When the temperature rises to 90 °C, the half-life of foam that characterizes the stability of foam solution is extremely short. It is difficult to improve stability by increasing the concentration of the foaming agent. To improve the stability of the foam solution, strong molecular compounds are frequently added as foam stabilizers.

Determination of Foaming Agent Concentration
The relationship between foaming agent concentration and foam parameters is shown in Table 3. The amount of foaming agent should be as small as possible, provided that the added foaming agent is guaranteed to produce a sufficiently stable foaming solution in the regular acid. As can be seen from Table 3, the CT5-1 foams have the longest half-lives at the same foaming agent concentrations. With the exception of F-1, additional foaming agents have a foaming mass of approximately 80% and a foaming agent concentration of 1.0% at room temperature. At the same time, considering the relatively low price of the foaming agent CT5-1 and its better cost-to-performance ratio than other foaming agents, CT5-1 was identified as the foaming agent for the foaming acid formulation with a concentration of 1.0 to 5.0%.

Selection of Foam Stabilizer and Its Concentration
Experiments have shown that foams composed solely of foaming agents are less stable. When the temperature rises to 90 • C, the half-life of foam that characterizes the stability of foam solution is extremely short. It is difficult to improve stability by increasing the concentration of the foaming agent. To improve the stability of the foam solution, strong molecular compounds are frequently added as foam stabilizers. Table 4 shows the foam stabilization effect for various polymer compounds. The stability of all foam solutions containing macromolecular compounds has been improved, but the foam stability of different macromolecular compounds varies considerably. Foam parameters were tested by adding 1.0% of various foam stabilizers to the base liquid under the same conditions, with CT5-1 as the foaming agent. CT5-14 was chosen as the foam stabilizer because it had the best foam stability.

Determination of Foam Stabilizer Concentration
The quality and stability of the foam must be considered at the same time in the commissioning of the foam acid solution formula. The concentration of the foam stabilizer has a large influence on the foam parameters. Table 5 shows the relation between CT5-14 concentration and foam parameters. It can be seen that when the concentration of CT5-14 is extremely low, the foam stabilizes poorly. When too strong, the foam stabilizes well, but the quality of the foam is extremely low. Therefore, the optimal amount of foam stabilizer has to be determined experimentally. The effect of temperature and foaming agent on the foam parameters is shown in Table 6. Under the same experimental conditions, each foaming agent can produce foam. Foam concentrate is a thermodynamic unstable system, its stability decreases with the increase of temperature, and the stability of foam concentrate varies little at 90 • C.

Investigation on Compatibility of Foam Acid Solution
The preparation of foaming acid requires that the foaming agent should have excellent chemical compatibility and acid resistance with the acid solution, so that it can be added to the base acid to form a transparent and homogeneous base solution, and to form a stable foaming acid after foaming. The performance of CT5-1 in acid solutions at different concentrations is shown in Table 6.
As can be seen from Table 7, CT5-1 foaming agents are closely compatible with acid solutions in the range of 10-28%.

Foam Acid Formula
Based on the above experimental evaluation results, assuming a foam mass of about 70% and a half-life of about 30 min, based on the characteristics of gas-liquid two-phase foams, combined with the foaming capacity of each foaming agent, the foaming stability of the foaming agent, the base fluid properties, and the cost properties, the recommended evaluation formula for foaming acid solutions was determined as follows: 20-25%HCl + 1.0%CT1-3 + 1.0%CT1-7 + 1.0-5.0%CT5-1 + 1.5-5.0%CT5-14 CT1-3 is acid corrosion inhibitor. CT1-7 is iron ion stabilizer. CT5-1 is acid foaming agent. CT5-14 is the acid liquid foam stabilizer.
In order to facilitate the performance test of the acid solution system, the typical formula for foam acid performance evaluation is: 20%HCl + 1.0%CT1-3 + 1.0%CT1-7 + 5.0%CT5-1 + 2.0%CT5-14 Based on the existing foaming acid systems, the type and addition ratios of foaming agents and foaming stabilizers are optimized for the formulation of optimized foaming acid systems. According to previous research results, the half-life of foam is 2435 s, and mass fraction of foam is 60% (Li et al., 2013;Wang et al., 2018) [37,38]. The formulation of this system uses different types of foaming agents and foam stabilizers, and increases their dosage, so that stable foam liquid can be produced in a short time, and the same grade of foam half-life can produce higher foam quality (more than 70%), thus having foam stability, reducing filtration, temperature resistance, and easy backflow performance.

Experimental Evaluation of Foam Acid Performance
Since there is no unified evaluation standard method for foam acid, the laboratory test evaluation method for foam acid performance has been established by referring to API RP42 "Recommended Testing Principles of Surfactants for Enhanced Oil Recovery".

Bubbling Speed
The performance parameters of CT5-1 foams produced at different foaming speeds are shown in Table 8. If the foaming speed is too low, a sufficient stable froth cannot be produced, and if the foaming speed is too extreme, there is no great benefit.  Table 9 shows the mixing time versus the foam parameters. At a sufficient mixing rate, stable foam concentrates can be produced by mixing for more than 30 s. It can be seen from Tables 7 and 8 that the mixing speed has a certain impact on the stability of foam acid, but the mixing time has little impact. Therefore, the mixing speed selected in the following test is medium (12,000 rpm), and the mixing time is 60 s.

Foam Parameters of Foam Acid Formula
The foam volume, foam mass, and foam half-life were measured after foaming a substrate solution consisting of typical formulations. Table 10 is shown as the experiment results.

Foam Stability Test
The stability of a frothy acid solution is the rate at which a certain amount of the frothy solution will burst on its own. When used for stimulation treatment of oil and gas wells, foam acid fluid requires no or small water loss during injection, so its stability is particularly critical. Holding the prepared foam solution still, observe and record the time it takes to separate the different liquid volumes. It can be seen from Table 11 that it takes 995 s to separate half of the base solution, that is, t 1/2 ≈ 440 min, and the liquid separation rate is 19.90 s/mL. This indicates excellent stability of the frothy acid solution.

Ability of Suspended Solid Particles of Foam Acid
The migration and deposition of acid insoluble substances (such as mineral particles and clay) released during acidizing operation may form secondary plugging and cause formation damage. In order to prevent the damage caused by the migration and deposition of acid insoluble particles, it is usually required that the acidizing residual fluid should have a certain suspension capacity to suspend the acid insoluble particles released from the formation in the residual acid, and foam acid has a significant ability to suspend solid particles.
The suspension properties of the foam acid were determined by reference to API RP42, and the test results are shown in Figure 4. formation damage. In order to prevent the damage caused by the migration and deposi-tion of acid insoluble particles, it is usually required that the acidizing residual fluid should have a certain suspension capacity to suspend the acid insoluble particles released from the formation in the residual acid, and foam acid has a significant ability to suspend solid particles.
The suspension properties of the foam acid were determined by reference to API RP42, and the test results are shown in Figure 4.

Corrosion Rate Test of Foam Acid
The corrosion rate of foam acid was tested with N80-E steel sheet under the condition of 15 MPa, 120 °C, and 4 h by using professional evaluation method (static weight-loss method). The results are shown in Table 11. Table 12 shows that the corrosion rate of conventional acid and foam acid is considerably inferior to the control standard (≤10 g/m 2 ·h), and it can be seen that the corrosion rate of foam acid is significantly lower than that of conventional acid.

Drainage Performance of Foam Acid
The key performance of foam acid is its drainage assistance. The laboratory simulation evaluation method of foam acid was established. The evaluation results are shown in Table 13, which shows that foam acid has a significant drainage effect compared with conventional acid or gelled acid residual acid.

Corrosion Rate Test of Foam Acid
The corrosion rate of foam acid was tested with N80-E steel sheet under the condition of 15 MPa, 120 • C, and 4 h by using professional evaluation method (static weight-loss method). The results are shown in Table 11. Table 12 shows that the corrosion rate of conventional acid and foam acid is considerably inferior to the control standard (≤10 g/m 2 ·h), and it can be seen that the corrosion rate of foam acid is significantly lower than that of conventional acid.

Drainage Performance of Foam Acid
The key performance of foam acid is its drainage assistance. The laboratory simulation evaluation method of foam acid was established. The evaluation results are shown in Table 13, which shows that foam acid has a significant drainage effect compared with conventional acid or gelled acid residual acid.

Experimental Simulation of Foam Acid Dynamic Acidizing Plugging Removal
Based on the acidization and plug removal properties of the foam, we performed dynamic simulation experiments to evaluate the acidization and plug removal properties of the foam on the reservoir core. The tested properties mainly include the rheological properties of the foam acid, acid rock reaction rates, retardation properties, and acid fluid filtration properties.

Core Analysis of Low Pressure Gas Well Reservoir
The cores of carboniferous reservoir in eastern Sichuan Basin were selected for the experiment, and the core physical property parameters are shown in Table 14. New foam acid developed in the experiment is shown in Figure 5, and the experimental device is shown in Figure 6. properties of the foam acid, acid rock reaction rates, retardation properties, and acid fluid filtration properties.

Core Analysis of Low Pressure Gas Well Reservoir
The cores of carboniferous reservoir in eastern Sichuan Basin were selected for the experiment, and the core physical property parameters are shown in Table 14. New foam acid developed in the experiment is shown in Figure 5, and the experimental device is shown in Figure 6.

Experimental Evaluation of Acid Rock Reaction Rate Retardation Performance of Foam Acid
The rate of reaction of acid with limestone and dolomite depends on the physical and chemical properties of the rock. When hydrochloric acid reacts with rock, the concentration of reaction products increases considerably. Due to the same ionic effects, the reaction rate of some residual acids will be slowed down and the reaction time of acid rocks will be prolonged. For foam acid, the delayed reaction properties of hydrochloric acid to limestone and dolomite in the presence of foam and nitrogen also affect the equilibrium of acid solution to rock reaction due to the presence of nitrogen. This leads to a delayed reaction mechanism.
4HCl + CaMg (CO 3 ) 2 = CaCl 2 + MgCl 2 + 2H 2 O + 2CO 2 Assuming that this reaction equilibrium relation is dominated by pressure, the reaction rate or delayed reaction degree is a function of nitrogen, acid concentration, and reservoir pressure and temperature prior to acidification. It is believed that foams with high gas fraction have low relative filtration, and that the more unreacted acid remains in the percolation channel, the longer the acid reaction time, that is, the longer the delayed action time. Figure 7 shows a test plot of the acid rock reaction rates for conventional and frothy acids at rest. As can be seen from the figure, the reaction rate of the frothy acid is considerably lower than that of the conventional acid, and the retardation effect in the stationary state is evident. Table 15 shows the test conditions for the dynamic reaction between the foam acid and the core. Table 16 shows the test data for the dynamic response of the foam core. Figure 8 shows the reaction rate versus reaction time curves for the foam acid and the Well A trap core under dynamic conditions. As can be seen from the curves, the reaction rate of the foam acid is extremely low and the retardation performance is excellent. gas fraction have low relative filtration, and that the more unreacted acid remains in the percolation channel, the longer the acid reaction time, that is, the longer the delayed action time. Figure 7 shows a test plot of the acid rock reaction rates for conventional and frothy acids at rest. As can be seen from the figure, the reaction rate of the frothy acid is considerably lower than that of the conventional acid, and the retardation effect in the stationary state is evident. Table 15 shows the test conditions for the dynamic reaction between the foam acid and the core. Table 16 shows the test data for the dynamic response of the foam core. Figure 8 shows the reaction rate versus reaction time curves for the foam acid and the Well A trap core under dynamic conditions. As can be seen from the curves, the reaction rate of the foam acid is extremely low and the retardation performance is excellent.

Experimental Evaluation of Acid Fluid Dynamic Filtration of Foam Acid
Foam itself is an anti-filtering fluid, and the filtration coefficient of foam acid is extremely low in low permeability layers. This extremely efficient liquid produces a larger crack area than gelled or emulsified acids in the same volume without solid filtration additive. The likelihood of fluid loss during acidification is represented by the filtration coefficient, which is the flow resistance of the acid fluid filtering into the formation and is a constant. The acid liquid with low coefficient enters the production layer from the fracture with a low amount, which can produce a longer effective action distance. Howard and Fast proposed three methods to control fluid loss: first, increase viscosity to improve relative permeability. Secondly, the filtration coefficient is reduced. Third, the wall-building effect occurs. Although the foam liquid has no wall-building effect, its filtration coefficient is two orders of magnitude lower than that of the ordinary gel liquid. The core filtration test data for the developed foam acid formulation is presented in Table 17. According to the analysis in Table 16, the filtration coefficient of 75% foam acid with foam quality is 7-10 times lower than that of ordinary acid solution. Therefore, the developed foam acid formula has high apparent viscosity and low filtration, which is very conducive to enhancing the acidizing effect.

Experimental Evaluation of Acid Fluid Dynamic Filtration of Foam Acid
Foam itself is an anti-filtering fluid, and the filtration coefficient of foam acid is extremely low in low permeability layers. This extremely efficient liquid produces a larger crack area than gelled or emulsified acids in the same volume without solid filtration additive. The likelihood of fluid loss during acidification is represented by the filtration coefficient, which is the flow resistance of the acid fluid filtering into the formation and is a constant. The acid liquid with low coefficient enters the production layer from the fracture with a low amount, which can produce a longer effective action distance. Howard and Fast proposed three methods to control fluid loss: first, increase viscosity to improve relative permeability. Secondly, the filtration coefficient is reduced. Third, the wall-building effect occurs. Although the foam liquid has no wall-building effect, its filtration coefficient is two orders of magnitude lower than that of the ordinary gel liquid. The core filtration test data for the developed foam acid formulation is presented in Table 17. According to the analysis in Table 16, the filtration coefficient of 75% foam acid with foam quality is 7-10 times lower than that of ordinary acid solution. Therefore, the developed foam acid formula has high apparent viscosity and low filtration, which is very conducive to enhancing the acidizing effect.

Conclusions
Based on the experimental evaluation of foam acid single agent, a new formula of foam acid solution was developed, the corresponding evaluation method was established, and the indoor performance evaluation and core dynamic performance evaluation were carried out. The following understandings were obtained: (1) By means of infrared spectroscopy, gas chromatography, photoelectron spectroscopy, and other analytical methods, it is obtained that the main chemical composition of the plug contains organic components, such as mineral oil, fatty acids and their esters, silicone oil, amide polymers, and additional organic components, as well as non-organic components such as carbon black, elemental sulfur, ferrous sulfide, ferrous disulfide, silicon dioxide, mineral salts, etc.
(2) The research focus of foam acidizing technology is to develop the theoretical and experimental research of foam acid, form a necessary, scientific, and systematic research system. The foam acid properties that need urgent optimization are improved foam acid stability, reduced filtration losses, enhanced temperature resistance of acid fluid in deep wells, and drainage aids.
(3) A new formula of foam acid was developed, and an experimental method for evaluating the acid energy of foam was established. The test evaluations have demonstrated that the developed foam acid features high surface activity, stable foam, strong temperature resistance, significant speed and corrosion inhibition, and excellent drainage performance.
(4) The dynamic simulation evaluation of foam acid core was completed, and the shear rheology of foam acid in casing at 80 • C was simulated and evaluated. The evaluation of the dynamic delay characteristics of acid rocks and the excellent rheological properties of acid fluids shows that it has the characteristics of long foam life, strong suspension capacity, good rheology, and low filtration, and can be used in medium depth, high temperature, and low-pressure oil wells.