2.2.1. Test Conditions

The typical operating temperature and acidizing operation system of an oil and gas field in western China were selected to evaluate the performance of corrosion inhibitors. The test period was selected based on normal operation time and possible long operation time in the oil field. Table 1 shows the specific test conditions.


**Table 1.** The specific corrosion inhibitor test conditions of 2205 duplex stainless steel in ultra-hightemperature acidizing.

The high-temperature and high-pressure test was carried out in TFCZ5 25/450 autoclave, which the test temperature ≤ 450 ◦C and pressure ≤ 25 MPa.

The uniform corrosion rate was calculated by the weight-loss method according to the following equation:

$$V = \frac{10^6 \Delta m}{A \cdot \Delta t} \tag{1}$$

where *<sup>V</sup>* is uniform corrosion rate; g·m−<sup>2</sup> .h−<sup>1</sup> ; ∆*t* is reaction time, h; ∆*m* is weight loss, g; and *A* is surface area of test sample, mm<sup>2</sup> .

#### 2.2.2. Microstructure Analysis

The depth of local corrosion was measured and counted by the Smart Zoom5 (Smart Zoom 5, Zeiss, Oberkochen, Germany), with a magnification of 10–500×. The phase composition of 2205 duplex stainless steel was analyzed by an X-ray diffractometer (SmartLab, Rigaku, Tokyo, Japan). The step length was 0.02◦ , the time of each step was 5 s, and the angular spacing was between 30◦ and 90◦ . Scanning electron microscope (SEM, JSM-IT500LA, JEOL Ltd., Japan) and energy spectrum analysis (EDS, JEOL Ltd., Japan) were used to test the corrosion morphology, inhibitor film thickness, and the composition of the film after high-temperature and high-pressure tests. The magnification was 5–300,000×, the secondary electron was 3.0 nm (30 kV), and the backscattered electron was 4.0 mm (30 kV). When measuring the thickness of the film, the sample was embedded in the epoxy resin, and a 50 mm × 3 mm section was observed. Before observing the inner film of the corrosion inhibitor, soak the sample in N, N-dimethylformamide for 10 s to remove the outer film, and then wash it with clean water, dehydrate it with anhydrous ethanol, and dry it with cold air.

#### *2.3. Molecular Dynamics Simulation*

The molecular dynamics simulation software Accelrys MS Modeling 7.2 (Accelrys, San Diego, CA, USA) was used to build the model of the water-Fe corrosion inhibitor system, and the diffusion behavior of the corrosion medium particles H2O, H3O<sup>+</sup> , and Cl− in the corrosion inhibitor film was established and calculated.

#### 2.3.1. Construction of Water-Fe-Corrosion Inhibitor System Model

Firstly, construct a cell of metal Fe, cut the cell along the (001) plane into a surface with a thickness of 17.198 Å, and construct it into (11 × 11) Two-dimensional supercell, and then build it as 31.53 Å × 31.53 Å × 15.76 Å three-dimensional supercell, and 31.53 Å × 31.53 Å × 24.06 Å of liquid water three-dimensional amorphous unit is constructed by the Amorphous Cell module. The constructed inhibitor molecules were immersed into the amorphous unit. The molecular positions of water and corrosion inhibitor are determined randomly. Finally, a three-layer supercell structure was constructed by the "vacuum layer-corrosion inhibitor solution layer-metal Fe supercell" in top-down order. In order to study the interaction between the inhibitor molecule and the Fe surface, the inhibitor molecule was manually moved to the appropriate position near the Fe surface, and the position was appropriate to not form a short-range interaction. The simulation process adopts a group-based truncation method (that is, group-based truncation), with a

truncation radius of 9.5 Å, to ensure the calculation accuracy and minimize the calculation time. Then the Fe layer of the final structure is fixed. The smart method is used to minimize the energy of the built three-layer supercell structure by 5000 steps to remove the local high potential energy points for dynamic balance and data acquisition.

The NVT ensemble is used for dynamic balance and data acquisition. The Andersen temperature control method was used to conduct dynamic balance of 160 ps at first and then conduct data acquisition of 80 ps. One track file was output every 800 fs, and a total of 100 track files were output. The time step in the simulation process was 0.8 fs. COMPASS force field was used in the simulation process.

#### 2.3.2. Establishment and Calculation of Diffusion Behavior Model of Corrosion Medium Particles H2O and H3O<sup>+</sup> in Corrosion Inhibitor Film

Three corrosion particles, H2O, H3O<sup>+</sup> , and Cl−, were selected. The simulation system consists of one corrosion medium particle and 100 corrosion inhibitor molecules. Firstly, the Amorphous Cell module was used to build an amorphous structure containing 100 corrosion inhibitor molecules with periodic boundary conditions, and then the NPT ensemble was chosen to simulate the system with molecular dynamics at 298 K at one atmospheric pressure. The time step was 1 fs, and the total simulation time was 300 ps. After balancing, the average density of the system was calculated. Then the Particle number, Volume, Temperature(NVT) ensemble was selected to simulate the dynamics of the system. The temperature was 298 K, the time step was 1fs, and the total simulation time was 200 ps. One frame was output every 2 ps, a total of 100 frames. The COMPASS force field was used to optimize the system in all dynamic simulations, which were completed through the Fortite module. The charge group method was used for the interaction between van der Waals and Coulomb, and the truncation radius was 9.5 nm. The charge of each anion and cation was assigned by using the current method, and the universal force field was applied to define the potential energy [33].

## **3. Experimental Results and Analysis**

## *3.1. Microstructure*

According to ASTM A923-2014, the polished sample of 2205 was etched in 40 g reagent grade NaOH plus 100 g water solution weight at 2 V DC for 20 s to obtain the structure in Figure 1. It can be seen that the microstructure of 2205 duplex stainless steel consists of an elongated austenite phase (γ, light color) inlaid on a ferrite matrix (α, Dark), the two phases are evenly distributed, and the contents of ferrite and austenite phases are 49.13% and 50.87% respectively.

**Figure 1.** Metallographic morphology of 2205 duplex stainless steel for test.

#### *3.2. Optimization Calculation and Design of Corrosion Inhibitor*

The quantum chemical method was used to calculate the geometric optimization of the corrosion inhibitor, and the corresponding frontier orbital charge distribution was obtained. The results are shown in Figure 2. The electronic density of the nucleophilic frontier orbital (HOMO) of the organic matter in the corrosion inhibitor is mainly distributed on the O and N atoms in the molecule (Figure 2a), and the electronic density of the electrophilic frontier orbital (LUMO) is respectively distributed on the benzene ring (Figure 2b, providing electrons or receiving electrons on the 4 s orbital of the Fe atom respectively.

**Figure 2.** Charge distribution of organic matter frontier orbital in corrosion inhibitor ((**a**)-nucleophilic frontier orbital HOMO, (**b**)-electrophilic frontier orbital LUMO).

The adsorption behavior of the corrosion inhibitor and Fe surface in an aqueous solution was simulated by molecular dynamics, and the kinetic equilibrium configuration of the corresponding system at different temperatures was obtained (Figure 3). Figure 4 shows the adsorption mechanism of organic corrosion inhibitors on the iron surface. The combination of chemical adsorption and physical adsorption could form a protective film to reduce the corrosion of acid solution on the metal surface. When the corrosion inhibitor interacts with the iron surface, the O and N atoms in the benzene ring and molecule are close to the iron surface and tend to adsorb on the iron surface in parallel to form an adsorption layer. The alkyl chain deviates from the iron surface at a certain angle to form a thicker hydrophobic layer (Figures 3 and 4). With the increase in temperature, the planarity of adsorption between the benzene ring and the iron surface becomes weaker, indicating that the adsorption capacity of the molecule and iron surface would decrease with the increase in temperature (Figure 3c).

**Figure 3.** Adsorption behavior of corrosion inhibitor and Fe surface in different temperature systems. ((**a**) 140 ◦C, (**b**) 160 ◦C, (**c**) 180 ◦C).

The interaction energy between the inhibitor molecule and the iron surface at different temperatures was calculated according to the track file collected during the dynamic simulation [37].

$$
\Delta E = E\_{\text{inhibitor} + Fe} - E\_{Fe} - E\_{\text{inhibitor}} \tag{2}
$$

where ∆*E* is the interaction energy of the corrosion inhibitor and iron surface, *Einhibitor+Fe* is the total energy of the corrosion inhibitor and iron surface, *EFe* is the energy of the iron surface, and *Einhibitor* is the energy of the inhibitor molecule. The binding energy is defined as the negative value of the interaction energy, i.e., *Ebinding* = −∆*E*.

**Figure 4.** Adsorption mechanism of organic corrosion inhibitor on iron surface.

Table 2 depicts the calculated binding energy of the corrosion inhibitor and iron surface in an aqueous solution at different temperatures. The binding energy of the corrosion inhibitor and iron surface decreases gradually with the increase in temperature. The temperature has a great impact on the adsorption performance of corrosion inhibitors. Desorption is easy to occur with the increase in temperature, thus reducing its adsorption performance.

**Table 2.** Binding energy of corrosion inhibitor and iron surface in aqueous solution at different temperatures.


Corrosion inhibitor molecules could adsorb on the metal surface to form a protective film exhibiting corrosion inhibition performance, which slows down the anode reaction and the diffusion of metal ions, thus preventing the corrosion of the corrosive medium particles on the metal. The most important criterion of corrosion inhibition performance is whether corrosion inhibitors can adsorb on the metal surface to form a stable, protective film and maintain a high coverage for a long period of time, and can effectively prevent the migration of corrosive medium particles to the metal surface so as to block the reaction path of corrosion, which could be judged by the diffusion of the corrosion medium particles in the corrosion inhibitor film: "the stronger the diffusion ability, the worse the barrier performance of the film and the corrosion inhibitor molecules, on the contrary, the corrosion inhibition is stronger [38].

The diffusion behavior of corrosion medium particles H2O, H3O<sup>+</sup> , and Cl− in corrosion inhibitor film was studied by molecular dynamics simulation. The diffusion coefficient of corrosion medium particles in the inhibitor film and the interaction energy between the inhibitor film and two kinds of corrosion medium particles were calculated. The diffusion coefficient is the most direct measure of the diffusion and migration ability of particles in the system. The larger the diffusion coefficient, the stronger the diffusion and migration ability of particles in the system, and the weaker the diffusion and migration ability of particles in the system.

According to Einstein's relation [39], the diffusion coefficient can be expressed as Equations (3) and (4):

$$\mathbf{D} = \frac{1}{6} \lim\_{t \to \infty} \frac{d}{dt} \sum\_{i}^{n} \langle |R\_i(t) - R\_i(0)| \rangle^2 \tag{3}$$

$$\mathbf{D} = \frac{1}{6} \lim\_{t \to \infty} \frac{dMSD}{dt} \tag{4}$$

By applying the finite difference approximation, the diffusion coefficient can be expressed as Equation (5):

$$\mathbf{D} = m/\mathbf{6} \tag{5}$$

where *m* is the slope of the MSD curve, and its value can be directly calculated by the software.

Table 3 shows the diffusion coefficients of H2O and corrosive medium particles in the inhibitor film. It shows that the diffusion coefficient is significantly reduced compared with that in the water system. The corrosion inhibitor film has a good blocking effect on the diffusion of corrosive medium particles, which could avoid its migration to the metal interface as much as possible and effectively inhibit the corrosion of metals.

**Table 3.** Diffusion coefficient of two corrosion media particles in the inhibitor film, the self-diffusion coefficient of water is 2.34 <sup>×</sup> <sup>10</sup>−<sup>9</sup> <sup>m</sup>2/s.


Table 4 shows the diffusion coefficients of Cl− in inhibitor film at different temperatures. The diffusion coefficient of Cl− is relatively large in an aqueous solution, and it is easy to diffuse and migrate, resulting in corrosion pits. After the addition of the corrosion inhibitor, the diffusion coefficient decreases sharply, indicating that the diffusion and migration of Cl− were effectively prevented and pitting is mitigated. The diffusion coefficient increases with the increase in temperature and the pitting corrosion is accelerated.

**Table 4.** Diffusion coefficients of Cl− in corrosion inhibitor films at different temperatures.


The interaction will have a greater impact on the diffusion and migration behavior of particles in it. If the interaction energy is positive, the medium has a repulsive effect on the particle, which can accelerate the diffusion of the particle. On the contrary, which means the medium is attractive to hinder the diffusion of particles. The interaction energy between corrosion medium particles and corrosion inhibitor film can be expressed by the following Equation:

$$E = E\_{\text{film}+\text{particle}} - E\_{\text{film}} - E\_{\text{particle}} \tag{6}$$

where *E* represents the interaction energy of particle and film, *E*film+particle is the total energy of particle and film, *E*film is the energy of the corrosion inhibitor film, and *E*particle is the energy of the corrosion medium particles.

Table 5 shows the interaction energy between corrosion medium particles and corrosion inhibitor film. It can be seen that the interaction energy of water molecules and the inhibitor film is much smaller than that of the interaction energy of H3O<sup>+</sup> and the inhibitor film, indicating that there may be a stronger interaction between H3O<sup>+</sup> and the inhibitor film, which has excellent corrosion inhibition effect.

**Table 5.** Interaction energy of corrosion medium particles and corrosion inhibitor film.


Considering the serious desorption of organic corrosion inhibitors at high temperatures, the formulation is to combine organic matter and inorganic salts that can form complexes so as to achieve rapid and stable film formation at high temperatures.
