1 Introduction

Hydrocarbon reservoirs with a temperature between critical temperature and cricondentherm are known as gas condensate reservoirs. In these reservoirs, during the production of condensates and the pressure drop, a contrary behavior to gas expansion or liquid evaporation is observed based on specific thermodynamic behavior (Tarek 2018; Mohammadi et al. 2012). When the pressure is above the dew pressure, the reservoir is a single-phase gas. With the onset of production and the pressure drop around the well, a two-phase flow will result from the liquefaction of some of the gas in these areas (Arabloo et al. 2013; Kamari et al. 2016). This two-phase flow is enhanced by moving the pressure profile with the center of the production well. By lowering the pressure below the dew point, formed liquids may not be produced and the relative permeability of the gas, especially around the well, maybe reduced (Hinchman and Barree 1985; Lal 2003; Imo-Jack 2010; Najafi-Marghmaleki et al. 2016). Pressure drop due to condensate clogging in these areas can increase up to 200% of pressure drop in tubing (Rahimzadeh et al. 2016). The low absolute permeability and condensate wettability of the rock cause the liquid phase to trap and adhere to the reservoir rock in the area. In addition, the interfacial tension between the two phases occurs due to the liquid–gas density difference, which exacerbates this effect and prevents condensate production (Rocke et al. 2008). This phenomenon, known as condensate blockage, is one of the major challenges for the production from gas condensate reservoirs. Several factors such as phase fluid properties, formation flow properties, reservoir pressure and wellbore pressure are involved in the formation of condensate blockage. Arun field in North Sumatra, Indonesia, experienced a significant pressure drop after 10 years of production for this reason (Afidick et al. 1994). In addition, Cupiagua field in Colombia (Lee and Chaverra 1998), Karachaganak in Kazakhstan (Al-Shammasi and D’Ambrosio 2003) and North Field in Qatar (Miller 2010) have had the same problem. Various solutions are proposed to overcome this problem, most notably hydraulic fracturing, acidizing, solvent injection and alteration of reservoir rock wettability to moderate and strongly gas-wet by chemical treatment (Fan et al. 2005; Wang et al. 2000; Al-Anazi et al. 2003; Du et al. 2000). When the reservoir rock becomes gas-wet, the stuck and trapped off condensate is separated from the rock surface, thereby reducing the pressure drop created. Some solvents, polymers and surfactants have been synthesized and used for this purpose by researchers in a wide variety of ways and the presence of fluorine in the structure of all the chemicals is evident (Linert 1997; Tang and Firoozabadi 2000). The application of the fluorinated surfactant to the solution of the liquid blockage problem in gas condensate reservoirs was also investigated. Al-Anazi et al. (2007) used two chemical groups, including fluorosurfactants and silanes, to alter the wettability to gas-wet. They reported intermediate gas wettability of sandstone and carbonate rocks by contact angle experiments and found factors such as chemical volume, permeability and temperature to be effective. Noh and Firoozabadi (2008) investigated the gas-wetting of two different sandstone gas condensate reservoirs by a fluorochemical surfactant, namely 11-12P, and a fluoroacrylate copolymer, namely L-19062. Spontaneous imbibition and contact angle tests confirmed preferably gas-wetting conditions after treatment by these substances. Rocke et al. (2008), by fooding a solution of FC4430 nonionic fluorinated surfactant into treated sandstones, showed that the relative permeability of the oil and gas phases increases due to the alteration of the wettability to gas-wet. The chemicals used were stable at high salinity and temperatures up to 175 °C. Bang et al. (2008) used 2 wt% of a fluorinated surfactant called L19945 to treat a fractured sandstone gas condensate reservoir. They showed that the relative permeability of the gas increased due to wettability alteration to gas-wet caused by treatment with this chemical. Wu and Firoozabadi (2009), in addition to investigating the ability of fluorinated polymeric surfactants in the chemical treatment of rock to create gas-wetting, investigated the effect of salinity on it. Denney concluded that NaCl salinity increased water wettability. NaCl also reduced the gas absolute permeability. CaCl2 salinity had little effect on permeability, and finally, NaCl, KCl and CaCl2 salts had adverse effects on wettability alteration. Wu and Firoozabadi (2010) investigated the effect of salinity on the gas-wetting process by a Z8 brand fluorinated polymeric surfactant. In addition to observing intermediate gas-wetting after rock treatment by Z8 solution, a critical concentration for chemical stability with NaCl salinity was reported. Li et al. (2014) using fluorescent surfactant FC-1 reported similar applications in the gas-wetting of around the condensate well. Wang et al. (2015) used two F-surfactants called FG24 and FG90. In addition to gas-wetting by treating quartz samples in surfactant solutions, they obtained the optimum concentration for greater gas-wetting. Fahimpour and Jamiolahmady (2015) optimized the ability of a large number of fluorescent surfactants in this process. Karandish et al. (2015) used an anionic fluorinated chemical. They observed an increase in gas relative permeability due to the chemical treatment of the rock. Hoseinpour et al. (2019), by treatment of the sandstone plugs in a novel fluorocarbon-based chemical solution, altered the wettability to gasphilic. According to previous studies, a limited number of the fluorinated surfactants have been used to alter the wettability of near-wellbore zone in gas condensate reservoirs. Accordingly, identification and study of new chemicals for this purpose remain essential. In this study, a synthesized anionic fluorinated surfactant was used to treat carbonate rock and then alter its wettability to gas-wet. The synthesized surfactant was characterized by FTIR and TGA and its CMC was calculated by surface tension experiments. Contact angle tests were used to indicate wettability alteration. Chemical treatment of carbonate rocks was carried out at different temperatures and surfactant concentrations. In addition, the foam properties of the surfactant were also investigated by relevant experiments. Finally, the alteration in wettability to gas-wet was also demonstrated by the imbibition experiment in treated and untreated carbonate plugs. The novelty of this work is the chemical treatment and wettability alteration of the near-wellbore zone by a synthesized anionic fluorinated surfactant as a new application of the F-surfactant.

2 Experimental section

2.1 Materials

Phenol with a purity of 99.00%, perfluorononane with a purity of 97.00%, sulfur trioxide with a purity of 99.00%, sodium sulfate with a purity of 99.99%, 1, 2-dichloroethane with a purity of 99.80%, sodium hydroxide with a purity of 99.90%, sodium sulfate with a purity of 99.00% and petroleum ether with a purity of 90.00% were purchased from Merck Company (Germany). Carbonate rock samples used contain 61% dolomite and 39% calcite. XRD and SEM analyses of the carbonate rock are presented in Fig. 1. Characteristic peaks of 23.3°, 29.7°, 36.2°, 39.7°, 43.4°, 47.8°, 48.8°, 56.9°, 57.7°, 61.6°, 64.9° and 70.6° were obtained for calcite, and 24.2°, 31.0°, 33.6°, 35.4°, 37.5°, 41.2°, 45.1°, 49.3°, 50.5°, 51.1°, 59.0°, 59.9°, 63.4°, 65.9°, 67.4°, 73.1° and 76.7° were obtained for dolomite. The used gas condensate was extracted from the South Pars reservoir with an API gravity of 60.1° and acidity of 0.1 mg KOH/g. The components of the used gas condensate are reported in Table 1. Hydrocarbon gas with composition reported in Table 2 and nitrogen gas with a purity higher than 0.99 mole fraction were used as gas phases.

Fig. 1
figure 1

XRD (left) and SEM (right) analyses of the carbonate rock samples

Table 1 Gas condensate components
Table 2 Hydrocarbon gas components

2.2 Experimental procedure

Experimental procedure in accordance with the flowchart in Fig. 2 included surfactant synthesis and characterization, surface tension tests for CMC calculation, contact angle tests, foamability, adsorption in porous media and finally gas–liquid imbibition tests, which are explained in detail below.

Fig. 2
figure 2

Flowchart of the experimental procedure

2.2.1 Surfactant synthesis

Chen et al.’s method (2011) was used for the preparation of anionic fluorinated surfactant (F-surfactant). This method follows the schematic process in Fig. 3. The procedure involves two steps of preparing p-perfluorononenyl phenyl ether and then preparing sodium p-perfluorononenyloxy benzene sulfonate fluorinated surfactant. In the first step, phenol and perfluorononene were thoroughly mixed and stirred in a 1:1.3 molar ratio. Sulfolane was then added to the mixture and stirred for 5 min. Triethylamine with a 0.5:1 molar ratio with perfluorononene was slowly added to the mixture for 45 min, and the mixture temperature was brought to 348 K. The reaction was completed after 3.5 h of triethylamine addition to the mixture. The resulting mixture was purified by distillation. Thereafter, the oily product was washed with a 5% NaOH solution and distilled water. The final product of the first stage, which was liquid, was dried with Na2SO4. In the second step, namely the synthesis of sodium p-perfluorononenyloxy benzene sulfonate through the sulfonation of p-perfluorononenyl phenyl ether obtained from the first step, 1,2-dichloroethane was added to a three-necked flask and stirred for 5 min. Sulfur trioxide was then gently added to the mixture at 298 K for 20 min with a molar ratio of 1.20:1 with p-perfluorononenyl phenyl ether. After 1 h, the mixture was purified by distillation. The mixture was then recrystallized with petroleum ether and neutralized with NaOH solution. Finally, by vacuum distillation, sodium p-perfluorononenyloxy benzene sulfonate white viscose liquid was obtained as the final product.

Fig. 3
figure 3

Reactions of synthesizing the anionic F-surfactant based on Chen et al.’s method (2011)

2.2.2 FTIR and TGA analyses

FTIR and TGA analyses were used to characterize the surfactant and temperature stability. To identify functional groups by FTIR analysis, a very small amount of surfactant sample in combination with KBr was used. IR spectra were recorded on a Tensor 27 FTIR Bruker spectrometer. This spectroscopy has a spectrum of 370–7500 cm−1 and is equipped with a MIRacle attenuated total reflectance (ATR) accessory that helps to analyze liquid and solid samples. Thermogravimetric calculations were performed for 15 mg of the surfactant sample in a Netzsch TG209 F1 analyzer in a pure nitrogen atmosphere. The sample was heated at a rate of 10 °C/min, from 298 to 573 K, and a flow rate of 30 cm3/min.

2.2.3 Surface tension and contact angle

Surface tension tests at different concentrations of surfactant solutions were performed by the pendant drop method at 298 K, and the CMC was determined. The IFT400 was used to measure surface tension. Its components include two hand-operated syringe pistons, a hollow cell with two glass windows on each side with a thermal jacket, a needle connected to the syringe piston by a steel line, a light source, a lens and a camera for drop photography as well as a personal computer and image processing software. The camera takes a moment-by-moment snapshot of the drop, and the software analyzes it and calculates the surface tension using Eq. 1 and outputs it. The camera and light source are also customizable to deliver quality photos.

$$\gamma = \frac{{\Delta \rho gD^{{{\prime }2}} }}{H}$$
(1)

where \(\Delta \rho\) is the density difference of droplet and bulk in g/cm3; g is the gravity acceleration in cm/s2; \(D^{\prime}\) is the large droplet diameter in cm; and H is a function of S= d/D, where d represents the smaller diameter at a distance D from the top of the droplet.

Carbonate thin sections were cut for contact angle experiments. The sections were then polished and cleaned using high-pressure nitrogen gas. Subsequently, the sections were embedded in toluene to remove fatty acids from hand contact for 1 day. The washed and dried sections were aged for 1 month in the tested gas condensate at 373 K to obtain oil-wetting. Each cross section was then treated in surfactant solutions at different concentrations and each at a specified temperature. All three parameters of surfactant concentration, temperature and treatment time were evaluated in these experiments. For this purpose, surfactant concentrations of 500, 1500, 2500, 3500, 4500, 5500 and 6500 ppm and test temperatures of 313, 343 and 373 K and treatment times of 30, 60, 120 and 240 min were considered. With this interpretation, 84 contact angle tests were performed. The IFT400 device was also used for contact angle tests. The cross section is located at the bottom of the cell in hydrocarbon gas ambient and the needle releases a drop of liquid from above. The device software is able to draw tangent lines on both sides of the drop with placing a user-defined baseline and marking the boundary between the rock surface and the drop and display the size of the contact angles on both sides of the drop and average angle.

2.2.4 Foamability

For foamability experiments, nitrogen foam was prepared by blowing nitrogen in a surfactant solution at CMC and at 373 K in a Ross–Miles foam generator with an adjustable foam chamber temperature. Figure 4 shows a schematic of the foam preparation system. The device consists of a glass column graded as a foam chamber with a 2 cm diameter and a 100 cm hight and the bottom of which is a reticulated metal for better flow of gas and connected to the nitrogen source and above the foam outlet valve. A flow-meter controls the flow of nitrogen from the source to the foam chamber. The temperature of the foam chamber is supplied by a water bath with the flow of hot water into the shell of the foam chamber which acts as a heat exchanger. To prepare nitrogen foam, 40 cm3 of the surfactant solution at CMC was poured into the foam chamber and the nitrogen gas was blown at a flow rate of 25 cm3/s. Nitrogen foam properties including foam height and stability were investigated.

Fig. 4
figure 4

Schematic of a Ross–Miles foam generator with adjustable foam chamber temperature by hot water flow

2.2.5 Surfactant adsorption in carbonate porous media

First, the conductivity of surfactant solutions at different concentrations was measured with a Jenway, UK, model 3540 apparatus. The amount of surfactant adsorption in porous media was measured by flooding into carbonate plugs with the specifications in Table 3, where each plug was subjected to the temperature. The plugs were dried for 1 day after washing at 333 K. The surfactant solutions at CMC were then injected into the plugs. Surfactant injection at 0.5 mL/min was performed at 313, 343 and 373 K. Surfactant concentration in the outlet fluid was read from its surfactant conductivity/concentration diagram. The decrease in surfactant concentration in the output fluid per injection PV (pore volume) was considered as the amount of adsorption. The core flooding device in accordance with the schematic in Fig. 5 was used. The hydraulic fluid is pumped automatically by a pump to the back of the pistons in three cylinders each containing a special fluid. The selective fluid inside the cylinder is inserted into the plug holder and injected into the plug at the rate or pressure selected by the user. The plug-holder itself consists of two fluid flow distributors closed at inlet and outlet and special rubber to block around the plug that is squeezed around the plug by a hydraulic oil that is manually pumped and prevents the flow around the plug.

Table 3 Characteristics of carbonate plugs used in surfactant adsorption in porous media measurements
Fig. 5
figure 5

Schematic of core flooding device

2.2.6 Imbibition tests

Gas–liquid imbibition tests in carbonate plugs were performed to show the gas-wetting properties of the plug treated by the chemical solution. The plug connects to a force gauge and floats in the gas condensate. Then, the weight changes caused by the gas condensate imbibition are recorded. At this stage, the carbonate plug was saturated from the gas condensate and aged for a month in the gas condensate at 373 K to obtain oil-wetting. Then, the desired plug was treated in the selected chemical solution from the previous stage and the imbibition test was performed. The optimum fluid of choice was fluid in terms of surfactant concentration and duration of treatment based on contact angle tests. However, the chemical treatment temperature was considered to be the highest test temperature of 373 K. The schematic of the liquid–gas imbibition device is shown in Fig. 6. The basis of this system is to float a gas-saturated plug in a liquid container. The plug is connected to the hook of a force gauge with rope, which is held by an adjustable stand, and the force gauge indicates the weight of the floating plug with an uncertainty of ± 0.001 kgf, instantaneously. It is necessary to achieve a completely stagnant state and balance of floating plug during the experiment.

Fig. 6
figure 6

Schematic of the liquid–gas imbibition system

3 Results and discussion

3.1 FTIR and TGA analyses results

Figure 7 shows the FTIR spectrum of the synthesized surfactant. Peak (a) at 746.30 cm−1 shows the flexural vibration stretching of C–F. Peaks (c) at 1015.83 cm−1 and (d) at 1056.41 cm−1 are stretching peaks of S–O. Peaks (b) at 983.70 cm−1, (e) at 1202.61 cm−1, (f) at 1193.19 cm−1 and (g) at 1251.08 cm−1 represent the stretching of C–F bonds. Peak (h) at 1512.07 cm−1 represents the stretching bond C=C in the benzene ring. Peak (i) at 1602.39 cm−1 is related to the stretching of the C=C bond in perfluorononene. Figure 8 shows the TGA curve of the surfactant. F-surfactants normally have high-temperature stability. As shown in Fig. 8, the total weight loss at 300 °C reaches only 28% of the initial weight. A temperature peak starts at 25 °C and continues up to about 150 °C, with the weight loss of this temperature peak reaching about 8%. Weight loss at this stage is justified by the evaporation of the sample moisture. According to these interpretations, the surfactant is suitable for use at temperatures of gas condensate reservoirs in terms of temperature stability.

Fig. 7
figure 7

FTIR spectrum of the F-surfactant

Fig. 8
figure 8

TGA curve of the F-surfactant

3.2 Surface tension and contact angle results

The results of surface tension experiments are plotted in Fig. 9. The steep slope decreases with increasing surfactant concentration in the surface tension graph up to a concentration of 3500 ppm. The curve is then almost horizontal, and the surface tension variations are negligible. This is a common trend in surface tension versus concentration curves. Surfactant molecules tend to be arranged on the liquid surface due to the hydrophilic–hydrophobic double structure so that the hydrophilic part dissolves in the aqueous solution and the hydrophobic part avoids it. As the surfactant concentration increases and the molecules occupy the interface, aggregates of surfactant molecules form due to the adsorption of identical parts of each other, referred to as micelles. The formation of micelles due to the restriction of the release of surfactant molecules in solution weakens its function (Schramm 2000; Nowrouzi et al. 2020a). By this interpretation, the CMC of the desired surfactant is 3500 ppm and the surface tension at the CMC equal to 21.363 mN/m was obtained. By adsorbing surfactant molecules on the water–gas interface, a thin film is formed that reduces the surface tension of the former. Increasing the surfactant concentration before micelle formation leads to the adsorption of more molecules on the interface and to the enhancement of the thin film and the decrease in surface tension. After the saturation of the interface, the extra molecules are used to enlarge the micelles and do not contribute to the enhancement of the thin film.

Fig. 9
figure 9

Surface tension curve of surfactant solutions at ambient pressure and temperature

Table 4 shows the values obtained from the contact angle experiments. Parameters of temperature, treatment time and surfactant concentration were considered in these experiments. Figures 10, 11 and 12 show the data in this table as graphs at 313, 343 and 373 K, respectively. Based on the results, there is a clear relationship between the parameters and the contact angle. Thus, the contact angle decreases with increasing temperature and increases with increasing surfactant concentration and treatment time. That is to say, strongly gas-wetting was achieved by increasing surfactant concentration and treatment time and by decreasing temperature. However, the change in contact angle after CMC and the specific duration for each concentration is less. The contact angle experiments in this study are dynamic and time-dependent. In fact, time is considered as a parameter affecting the contact angle. The time intervals were selected for different surfactant concentrations to compare well. As shown in the contact angle graphs, the curves have become almost horizontal in the final time intervals, but minor variations are still visible. Surfactants are usually injected at the CMC, so the basis for selecting the final time of 240 min for all concentrations was the contact angle equilibrium time at the CMC and the maximum temperature. In fact, the contact angle at the CMC and the maximum temperature after 240 min did not change significantly and this time was considered as the final time for all concentrations. The mechanism of rock wettability alteration is explained by the film formed on the rock surface. Surfactant molecules form a thin film on the rock surface that can form an opposite wettability to the previous state due to its stability and the orientation of the molecules on the surface (Salathiel 1973; Nowrouzi et al. 2020b; Najimi et al. 2019). The properties of this film depend on the adsorption of surfactants and the formation of hemi-micelles. Hemi-micelles are agglomerates of the surfactant molecules that form at a specific concentration on the solid surface. The arrangement of the molecules in the film consisting of hemi-micelles is arranged in such a way that the heads of the surfactant molecules are placed on a solid surface and their tails are upward. The orientation of the molecules is also determined by intrinsic properties such as surfactant type and surface charge of the rock. The dominance of these two mechanisms is controlled by various parameters such as concentration and temperature (Tadros 2013). As mentioned earlier, F-surfactants have a hydrophilic head and a gasphilic tail. The surfactant molecules are adsorbed on the carbonate rock with a hydrophilic head in such a way that their gasphilic tails are positioned in the other direction. In fact, a thin film of molecules is formed on the surface, the upper layer of which tends to become wet with gas. As the temperature increases, the rate of absorption decreases due to the increased mobility and release of the molecules. In addition, it can justify the reduction in the contact angle, i.e., the reduction in the gas-wetting seen in the contact angle results.

Table 4 Liquid droplet contact angle values on treated carbonate sections in surfactant solutions with different concentrations at 313, 343 and 373 K
Fig. 10
figure 10

Diagram of contact angle values of liquid droplets on treated cross sections in surfactant solutions at different concentrations at 333 K

Fig. 11
figure 11

Diagram of contact angle values of liquid droplets on treated cross sections in surfactant solutions at different concentrations at 343 K

Fig. 12
figure 12

Diagram of contact angle values of liquid droplets on treated cross sections in surfactant solutions at different concentrations at 373 K

In the statistical evaluation, Table 4 and Fig. 10 show that at 313 K, the final values of contact angle, i.e., 240 min after treatment, for concentrations of 500, 1500, 2500, 3500, 4500, 5500 and 6500 ppm, were equivalent to 94.08°, 105.56°, 112.70°, 121.97°, 122.17°, 124.61° and 124.72°, respectively. Given the constant concentration at CMC, contact angles at treatment times of 30, 60, 120 and 240 min were obtained as 101.83°, 108.04°, 114.86° and 121.97°, respectively. Similarly, according to the data in Table 4 and Fig. 11 at 343 K, the final values of contact angle, for concentrations of 500, 1500, 2500, 3500, 4500, 5500 and 6500 ppm, were 88.22°, 100.79°, 108.71°, 111.72°, 113.85°, 115.77° and 116.79°, respectively. At CMC, the contact angles at treatment times of 30, 60, 120 and 240 min were 91.70°, 100.39°, 106.80° and 111.72°, respectively. Also, according to Table 4 and Fig. 12 at 373 K, the final contact angle values for concentrations of 500, 1500, 2500, 3500, 4500, 5500 and 6500 ppm were 77.08°, 94.58°, 100.11°, 106.03°, 112.72°, 114.91° and 115.48°, respectively. At the constant concentration of CMC, the contact angles at treatment times of 30, 60, 120 and 240 min were 87.94°, 93.50°, 99.79° and 106.03°, respectively. With these interpretations, the obtained angles are in the range of intermediate to almost strong gas-wetting proportional to the variables investigated and the said dependencies. For a better understanding of the subject, images of the contact angle of the final treatment time of 240 min at different surfactant concentrations and temperatures are given in Fig. 13. As mentioned earlier, wettability alteration to the gas-wetting in the near-wellbore zone is a solution to remove condensate formed in the area. To illustrate the relationship between gas wettability and condensate removal in this area, it should be noted that condensates in this area can be eliminated by increasing the drawdown pressure (viscous forces) or lowering capillary pressure (Esmaeilzadeh et al. 2018). The capillary pressure (Pc) is proportional to contact angle (θ), gas–liquid surface tension (\(\sigma\)) and reversely proportional to pore size (r), according to Young–Laplace equation (Eq. 2):

Fig. 13
figure 13

Liquid droplet images on the treated sections in surfactant solutions at different concentrations and at different temperatures of 313, 343 and 373 K and treatment time equal to 240 min

$$P_{\text{c}} = \frac{2\sigma \cos \theta }{r}$$
(2)

Capillary pressure can be decreased by either reducing the gas–liquid surface tension or increasing the contact angle through wettability alteration. By these interpretations, and by keeping the gas–liquid surface tension constant, the wettability alteration to the gas-wetting reduces capillary pressure and eliminates condensate in the area (Esmaeilzadeh et al. 2018).

3.3 Surfactant adsorption in carbonate porous media

Figure 14 shows the conductivity values of surfactant solutions at different concentrations and temperatures of 313, 343 and 373 K. This graph was used as the calibration graph to estimate the unknown concentration in the adsorption experiments. According to the figure, the conductivity of surfactant solutions is directly related to concentration and temperature. Breakpoint in the chart shows the CMC value. The trend lines for the points before and after the breakpoint follow two distinct equations. The sudden change in the slope due to micelle binding and the formation of agglomerates and less micelle mobility compared to the surfactant monomers is justified (Williams et al. 1955). As temperatures increase, the molecules move faster and have more freedom, so micelles are expected to become more difficult to form at lower temperatures, resulting in an increase in CMC. Figure 15 shows the adsorption values in the porous media during the flooding of the surfactant solution at CMC and temperatures of 313, 343 and 373 K. There is a clear trend for absorption values with the increasing amount of injection fluid. It can be said that the cumulative adsorption increases with increasing injection fluid, but the adsorption is lower in each step than before. In other words, as the flooding continues, the surface of the rock is rapidly occupied by the adsorption of surfactant molecules onto the surface, thereby increasing the ratio of the occupied surface to the unoccupied surface and eventually achieving the saturation. As the unoccupied surface decreases, the adsorption-to-injection volume ratio decreases, resulting in a lower slope at the ends of the graph. The layer formed by adsorption of the surfactant on the rock surface creates a coating that is opposite with the initial wettability. Adsorption of surfactants depends on factors such as temperature, salinity, pH, type of surfactant and type of rock (Schramm 2000; Manshad et al. 2017). It is widely accepted that the adsorption of ionic surfactants on the rock surface is controlled by electrostatic attraction (Bera et al. 2013; Saxena et al. 2019).

Fig. 14
figure 14

Conductivity diagram of surfactant solutions at different concentrations

Fig. 15
figure 15

Decrease in surfactant concentration at CMC due to adsorption in porous media

3.4 Foam stability

Figure 16 shows the foam height diagram after filling the 100 cm foam column over time. The formation of stable foam by F-surfactants is due to their dual gasphilic–hydrophilic structure. A water film surrounds a gas bubble so that the gasphilic part is incorporated into the bubble and the hydrophilic part in the film, which makes the foam stable. This gas bubble separator film is known as foam lamellae (Kumar and Mandal 2017). The height of the foam column was measured since the foam column was filled (at this moment the gas flow was cut off) and based on the surfactant solution–foam joint. According to Fig. 16, the foam height decreases over time and reaches zero after 60 min. During the decay of foam height at one point, the foam height reaches half the initial height. This time is known as the half-life time of the foam, denoted by t1/2, and as shown in Fig. 16 for the surfactant at CMC, the half-life time of the foam, t1/2 is equal to 13 min. Foam decay depends on the basic structure of the foam. Foam can increase the viscosity of the injectable phase (Nguyen et al. 2014; Hirasaki and Lawson 1985) and reduce gas–fluid mobility in areas with high permeability, leading to premature injection fluid production (Farajzadeh et al. 2009; Emadi et al. 2019). In addition, the foam can deflect injection fluid in the porous media (Bertin et al. 1998; Ma et al. 2012; Ali et al. 1985; Bernard and Jacobs 1965). In the approach of this study, namely the treatment around the well, injectable fluid with these properties can be foamed. Injection fluid deflection helps the foam spread around the well and cover the damaged area. Particularly in fractured formations where the fracture permeability is much higher, foam injection prevents the linear movement of the injectable fluid into the fractures and permits penetration into the damaged matrix.

Fig. 16
figure 16

Foam height diagram over time

3.5 Imbibition tests

Figure 17 shows the diagrams of imbibition in treated and untreated plugs over time. The curve of imbibition in the untreated (7 cm length, 18.21% effective porosity and 7.3 mD permeability) shows a very steep upward slope in the early minutes. Over time, the intensity of the slope decreases so that after 480 min, approximately 91% of the effective plug space volume is saturated with the liquid, leaving a small amount of it empty. The initial wettability of water-wetting and the difference in liquid and gas densities justify this process. However, it is completely different for the treated plug with a length of 7 cm, effective porosity of 18.53% and the permeability of 7.1 mD and the initial wettability. The treated plug has almost no effective filling with liquid after 60 min of the start of the experiment. The imbibition was stopped 300 min after the start of the experiment, with only 2% of the effective plug space being saturated with liquid. Wettability alteration to gas-wetting causes the non-wetting to no longer enter the plug, and in fact, the imbibition, which is caused by liquid-wetting, cannot be carried out.

Fig. 17
figure 17

Results of gas–liquid imbibition in untreated and chemically treated plugs

4 Conclusion

An anionic F-surfactant was synthesized and characterized by FTIR and TGA analyses and surface tension experiments. Contact angle and liquid–gas imbibition experiments were performed to demonstrate the ability of the surfactant in wettability alteration of carbonate rock to gas-wetting. The adsorption of surfactant on carbonate porous media during flooding and the foam stability of the surfactant solution at CMC were calculated.

  1. (1)

    TGA confirms the temperature stability of the synthesized surfactant at the gas condensate reservoirs temperatures.

  2. (2)

    The surfactant CMC was obtained according to the results of surface tension tests equal to 3500 ppm.

  3. (3)

    The contact angle is proportional to the surfactant concentration, treatment time and temperature. As the treatment time increases, the contact angle increases and gas-wetting becomes more, but in the final times due to the system moving toward equilibrium, there are no significant changes in the contact angle. As the temperature increases, gas-wetting decreases, which may be due to the decrease in surfactant absorption with increasing temperature.

  4. (4)

    Surfactant adsorption in the porous media of the carbonate plug is proportional to the amount of solution injected and the temperature. As the amount of injected solution increases, the adsorption increases, while this increase does not have the same slope until the final stages of injection. That is, the incremental slope decreases in the late stages, which may be due to the saturation of the effective surface area of the porous medium by the molecules adsorbed in the previous steps.

  5. (5)

    Half-life time of foam decay at CMC was obtained to 13 min. This foam stability is due to the nature of the F-surfactants, i.e., the hydrophilic–gasphilic dual structure.

  6. (6)

    Imbibition tests show the wettability alteration via the chemical treatment by surfactant as such, and the liquid imbibition in the treated carbonate plug is negligible compared to the non-treated plug with the initial (wettability) state.

  7. (7)

    The values of the contact angle of the liquid drop in the presence of hydrocarbon gas on the treated sections indicate the alteration in wettability to the gas-wetting. Increasing the contact angle through wettability alteration can reduce the capillary pressure based on the Young–Laplace equation and eliminate condensate in the near-wellbore zone.