Introduction

Sour gas reservoirs are a crucial component of global natural gas resources, boasting vast reserves. During the exploration, production, transmission, and processing of sulfur-containing gas, metallic facilities are exposed to a corrosive medium with coexistence of H2S, Cl- and the HCl additives. This combination leads to severe and common corrosive degradation1,2,3,4,5. The high toxicity of H2S and flammability of alkanes not only make corrosion in metallic facilities economically detrimental but also pose a threat to human safety6. Therefore, there is an ongoing and significant need to inhibit metal corrosion in gas field.

Corrosion inhibitors are extensively employed in the protection of metals from corrosive degradation during oil and gas field development and exploitation due to their cost-effectiveness and straightforward application process3,7,8. In recent years, organic corrosion inhibitors have gained more popularity over inorganic counterparts due to their superior efficiency and environmentally safe properties9,10,11. Organic molecules containing heteroatoms like N, O, S etc., or containing aromatic moiety and heterocyclic ring like furan, isoxazole, triazole, thiazole, pyridinium, thiadiazole, oxadiazole, imidazole etc., can adsorb onto metal surfaces to form protective films owing to their unsaturated bonds or large conjugated systems which are considered effective corrosion inhibitors12,13,14,15,16,17,18,19,20,21,22.

Mannich bases obtained through the condensation reaction between ketones, aldehydes and primary/secondary amines have attracted significant attention for developing novel corrosion inhibitors due to their simple synthesis process and wide range of compounds23. Ahamad et al.24 studied four derivatives of piperidinylmethylindoline-2-one the adsorption and corrosion inhibition properties in 1M HCl solution. Jeeva et al.25 reported a new Mannich base 1-((pyridin-2-ylamino)(pyridin-4-yl)methyl)pyrrolidine-2,5-dione which show a good inhibition efficiency in 1M HCl solution. In the ongoing efforts to study Mannich base corrosion inhibitors, researchers have found that the inhibition performance can be further improve by a binary structure. Wang et al.26 synthesized three Mannich base imidazoline quaternary ammonium salt corrosion inhibitors which exhibit excellent inhibition efficiency on Q235 steel in H2SO4 solution. Through the DFT calculation, they revealed that during the adsorption process of the molecule, the N atom of the imidazole group donated electrons to form covalent bonds with Fe, while the C and O atoms of the carboxyl group received electrons to form feedback bonds with Fe. Zhang et al.27 reported the synthesis of bi-Mannich bases derived from acetophenone, formaldehyde and different aliphatic diamines, and evaluated the corrosion inhibition efficiency on mild steel in 15% HCl solution at 90 °C, and they believe the inhibition efficiency increases with concentration and the length of alkyl chain in aliphatic diamines. Our previous study28 provided a bi-Mannich base corrosion inhibitor and attempted to apply it to high temperature sour environments, demonstrating remarkable anti-corrosive properties. However, further exploration and understanding of the inhibition performance and mechanism are required from both experimental and molecular perspectives.

Moreover, in our best knowledge, although Mannich base corrosion inhibitors have been extensively studied for their application in acidic media, there is limited research on their utilization in sour and acid environments containing H2S and HCl. As well known, in the gas field development process, pickling liquid (typically HCl) is commonly injected to dissolve minerals in stratum and enhance gas production. In addition, the pickling liquid is also frequently utilized to remove scale, corrosion products, and other blockages in the gas well to ensure uninterrupted production. In sour gas fields, a corrosive mixture comprising acid and H2S permeates every stage of the natural gas system. Therefore, metal equipment will be in an environment where HCl and H2S coexist. Considering that H2S in oil and gas can also promote the degradation of carbon steel, it is imperative to investigate corrosion inhibitors suitable for H2S and HCl co-existing systems29.

To summarize, the presence of heteroatoms, aromatic groups, and heterocycles endows adsorption capacity to the mannich base molecules, while incorporating a binary structure provides dual active adsorption centers to further enhance their performance. In addition to possessing strong adsorption capacity, corrosion inhibitors typically require a hydrophobic alkyl chain for isolating corrosive media from metal surfaces. In this study, we have synthesized a novel bi-mannich base (BMT) with multi-adsorption centers including benzene and thiazole rings as well as a carboxyl group. And the binary structure and alkyl chain were achieved through the introduction of polyene polyamines. The main structure was characterized by Fourier transform infrared spectroscopy (FTIR) and nuclear magnetic resonance (NMR). Meanwhile, the corrosion inhibition properties in of BMT on Carbon steel in H2S and HCl co-existing solution was studied by weight loss and electrochemical test. The BMT shows a maximum inhibition efficiency of 96.9% from weight loss measurements and above 97% from electrochemical analysis. The density funcional theory (DFT) of quantum chemistry calculation shows that the adsorption of BMT molecules can be attributed to the high local activity of N atoms in the thiazole ring and imine groups, and the oxygen atoms on the β-carbonyl group, which can interact with the front orbitals of Fe atoms. This study is expected to provide significant theoretical and experimental basis for the development and application of high-efficiency corrosion inhibitors in H2S and HCl co-existing medium in the future.

Methods

Materials

2-Acetylthiazole (ATZ, ≥ 99%), Tetraethylenepentamine (TEPA, technical grade), Cinnamaldehyde (CAD, ≥ 95%), Sodium chloride (NaCl), Hydrochloric Acid (HCl, 37%) were purchased from Aladdin Chemistry Co., Ltd. Carbon steel coupons were obtained from Shandong Shengxin Technology Co., LTD and their chemical composition is basically as follows (%, wt): C 0.35, Si 0.5, Mn 1.00, S 0.01, P 0.02, Ni 0.5, Cu 0.5, Mo 1.0 and balance Fe. The specimens size of 3.0 × 1.5 × 0.3 cm was employed in weight loss measurements, while coupons with a cubic area of 1 cm2 were used for electrochemical measurements and surface analysis. All coupons were consistently ground with 600, 800 and 1200-grit SiC papers.

Synthesis

Bi-mannich base containing thiazole ring, namely BMT, were prepared by simple condensation reaction of ATZ, TEPA and CAD with the molar ratio of 2.2:1:2.2. 1M of HCl was added to the reaction solution till the pH value is 4~5, and the solution was maintained at 80 ° C for 6 hours. The product was concentrated and dried in a rotary evaporator, and then the obtaining crude product was collected. Finally, the crude produce was washed by absolute ethanol and dried in a vacuum oven. The synthesis pathway is illustrated in Fig. 1.

Fig. 1
figure 1

Chemical structure of the synthesized Mannich base inhibitors.

Characterization

Fourier transform infrared (FTIR, Nicolet iS50, Thermo Scientific) spectra were recorded in the range of 500–4000 cm−1 with 1.0 cm−1 resolution. Solution 1H nuclear magnetic resonance (NMR) spectra were conducted by Bruker AVANCE III Spectrometer. The surface morphology of coupons was examined via the scanning electron microscope (SEM, Phenom ProX Generation 5), and the 3D topography reconstruction software attached to the SEM is employed to construct the 3D micromorphology. The static water contact angles (WCAs) in the surface of coupons were measured by a video optical contact angle meter (OCA 20LHT, Dataphysics) with 5μL water droplets.

Weight loss measurements

Nitrogen is pumped into the distilled water for 3 hours to remove oxygen. Then, H2S was pumped into the deoxygenated water until H2S was saturated. Subsequently, concentrated HCl was added to prepare a corrosive medium of 1M HCl and H2S co-existing solution. Two parallel samples were immersed in the above solution for 24 h in the absence and presence of BMT at the temperature of 293K, 313K, 333K and 353K. At last, the coupons were weighted after cleaned by Clark’s solution (10 g hexamethylenetetramine, 100 mL hydrochloric acid and 900 mL water). The corrosion rate (CR, mm/a) and inhibition efficiency (η, %) can be calculated by follows:

$${C}_{R}\hspace{0.17em}=\hspace{0.17em}\frac{{876}{\text{00}}\times \Delta {\text{m}}}{{\text{A}}\times \rho \times {\text{t}}}$$
(1)
$$\eta \hspace{0.17em}=\hspace{0.17em}\frac{{C}_{R,0}-{C}_{R,i}}{{C}_{R,0}}\times 100$$
(2)

where Δm is the weight loss of steel samples, A, ρ and t represent the total surface area, the density of coupons and the immersion time, respectively. CR,i and CR,0 represent the corrosion rates in the presence and absence of BMT, respectively.

Electrochemical measurements

All electrochemical tests were performed using a traditional three-electrode cell at the temperature of 293K via a CS2350 electrochemical workstation (Wuhan Corrtest Instruments Corp., Ltd., China). The tests follow the experimental protocol for electrochemical measurements30. The cell setup comprised a P110S carbon steel working electrode (WE), a platinum sheet as the counter electrode, and a saturated calomel electrode (SCE) as the reference electrode. WE was encapsulated on a poly(ether-ether-ketone) support with a exposed surface area of 1.0 cm2. Electrochemical impedance spectra (EIS) were obtained in the frequency range from 105 to 10−1 Hz with an amplitude sinusoidal wave of 5 mV. Following the measurement, ZSimpWin software was used to fit the obtained EIS results. Potentiodynamic polarization (PDP) tests were followed by the EIS tests and performed in the potential bounds of − 0.25 ~ 0.25 V (SCE) over the corrosion potential with a sweeping rate of 0.5 mV/s. Before EIS and PDP tests, a steady-state open circuit potential (Eocp) was obtained by immersing electrodes in a corrosive solution consistent with the weight loss measurements for 1800 s.

DFT computations

In this study, quantum chemical calculations were accomplished using Orca program, version 5.0.431,32. Optimized geometry determination was carried out using B3LYP functional. The ground-state geometry and the triple-ξ quality basis set TZV(P) were used to the calculation. The electrostatic potential (ESP) distribution on a molecule surface was calculated by Mutiwfn software33 and visualized by Visual Molecular Dynamic software.

Results

Structure characterization

The main functional groups present in BMT are discussed using FTIR spectrum, as shown in Fig. 2. The peaks observed at 1125.95 cm−1, 1451.70 cm−1 and 2819.31 cm−1 correspond to the deformation, twisting and symmetric vibration of –CH2, respectively34. And the peak at 1492.48 cm−1 are assigned to the characteristic vibration of C=N bond in the thiazole ring35. The two peaks at 1053.98 cm−1 and 1598.2cm−1 attributed to the bending and stretching vibration of N–H, respectively36. The characteristic absorption peak at 762.49cm−1 attributed to the stretching vibration of phenyl C-H bond outside the plane35. Further, the peak at 700.61cm−1 can be attributed to the bending vibration of C-S bond37. According to the FTIR results, it can be inferred that there are tertiary amine, secondary amine, phenyl, carbonyl, thiazole ring and saturated hydrocarbon in the synthesized BMT. The 1H NMR results shown in Fig. 2b further verifies the synthesis of BMT. Signal at 1.83 ppm correspond to the -NH in secondary amine. The proton peaks associated with the methylene protons of the amine moiety appeared at 2.65 and 2.68 ppm. Signals at 8.14 and 8.21 ppm correspond to the proton peak of –CH=CH– on the thiazole ring38, while the signals appeared at 6.5 ppm and 5.42 ppm attribute to the proton peak of –CH=CH– connected to the phenyl. Various other signals between 7.23–7.31 ppm and 3.41-3.45 ppm attribute to the phenyl proton and ethyl, respectively. The molecular structure of synthesized BMT obtained from 1H NMR spectrum is consistent with that from FTIR spectrum.

Fig. 2
figure 2

(a) FTIR spectrum and (b) 1H-NMR spectrum for BMT.

Weight loss measurements

The corrosion rate (CR) and inhibition efficiency (η) were determined by weight loss (WL) measurements at 293 K, as shown in Fig. 3a. It can be observed that the corrosion rate decreases while the inhibition efficiency increases with increasing concentrations of BMT, indicating enhanced adsorption of BMT molecules onto the steel surface to mitigate its interaction with the corrosive medium and consequently enhance inhibition. However, beyond a concentration of 3 ppm, further increase in BMT concentration does not significantly affect the corrosion rate or inhibition efficiency. As a result, even at very low concentrations (0.3 ppm), BMT exhibits remarkable protective effects on carbon steel with an inhibition efficiency of 82.9%. Meanwhile, there is a corresponding increase in inhibition efficiency from 82.9% to 96.1%, reaching a maximum value of 96.9% at a concentration of 9.0 ppm.

Fig. 3
figure 3

(a) Weight loss measurement results for the steel and (b) influence of temperature and concentration on the corrosion rate and inhibition efficiency of BMT on steel in the H2S and 1M HCl co-existing solution. (c) Langmuir isotherm plots and corresponding thermodynamic parameters for the adsorption of BMT in the H2S and HCl co-existing solution at 293 K.

To further study the effect of temperature on the corrosion inhibition performance of BMT, weight loss measurements were carried out at the temperature of 293K to 353K and at the concentration of 10 ppm to 30 ppm. As depicted in Fig. 3b and Table 1, in the absence of BMT, the corrosion rate exhibits a rapid increase with rising temperatures from 313K to 353K. When adding 10 ppm BMT to the corrosion medium, the corrosion rate of steel is inhibited at a temperature below 333K. Nevertheless, at the temperature of 353K, BMT does not show any significant corrosion inhibition effect. In the experimental group where adding 20 ppm BMT, as the temperature increases from 293K to 333K, both the corrosion rate and inhibition efficiency remained relatively constant; However, upon reaching a temperature of 353K, the corrosion inhibition efficiency decreased to approximately76.1%. The inhibition efficiency remained at 92.0% at 353K when the BMT concentration was increased to 30 ppm, and no significant decline in η was observed across the entire temperature range. In summary, it can be concluded that at lower concentrations (10 ppm and 20 ppm), the corrosion inhibition efficiency decreases with rising temperatures; however, this influence gradually weakens with higher BMT concentrations. These results indicate that BMT exhibits good temperature resistance as a corrosion inhibitor.

Table 1 Results of weight loss experiments at the temperature of 293 K to 353K and at the concentration of 10 ppm to 30 ppm.

Adsorption isotherm

The surprising corrosion inhibition demonstrated by BMT may be attributed to its adsorption on the surface of Fe. To explain the crucial adsorption characteristics of BMT, the Langmuir isotherm was used to fit the measured inhibition efficiency. The weight loss measurement results, which directly reflects the extent of sample degradation, possesses strong objectivity. Therefore, it is utilized for isotherm fitting in this study. The Langmuir isotherm as considered the most appropriate model as it has near unity values of the regression coefficients (R2), which can be described as follows39:

$$C/\theta = C + 1/K_{ads} ,$$
(3)

where C is the inhibitor concentration, Kads is the adsorption equilibrium constant and θ is the surface coverage, can be regarded as η. Additionally, the relationship between the adsorption Gibbs free energy (ΔG) and the Kads can be represented using the following expression40:

$$\Delta G = - RTln\left( {{1}000{\text{K}}_{{{\text{ads}}}} } \right),$$
(4)

where R is the universal gas constant, T is the absolute temperature and 1000 is the mass concentration of water. Langmuir isotherm plots and the corresponding thermodynamic parameters are listed in Fig. 3c. The magnitude of Kads plays a crucial role in providing insights into the strength of interaction or bonding between the corrosion inhibitor and the metal surface. Notably, an increase of Kads leads to decrease in ΔG, resulting in stronger adsorption and enhanced inhibition performance. Generally, a ΔG value ≥ −20 kJ/mol indicates electrostatic interaction (physisorption) between the metal and BMT inhibitor, while a ΔG value ≤ −40 kJ/mol suggests coordination interactions (chemisorption)41,42. The calculated ΔG value of −38.76 kJ/mol falls within this range, indicating the presence of an interaction involving both physisorption and chemisorption mixed modes. These results demonstrate favorable energy-based adsorption of BMT molecules on the metal surface, with inhibition performance attributed to both physisorption and chemisorption.

Electrochemical measurements

Open circuit potential (OCP)

Preferentially, Carbon steel surface reach steady state prior to all electrochemical analyses. Eocp variations for BMT inhibited systems were monitored with time as shown in Fig. 4a. Obviously, all Eocp values reaches the steady state condition after about 1800 s exposure time, validating the dynamic equilibrium of Carbon steel surface in BMT. Meanwhile, it becomes apparent that the Eocp vs time curves for Carbon steel exhibit a shift towards a more positive direction as the concentrations of BMT increase. The change in Eocp suggests that a protective film is forming on the surface of the carbon steel electrode.

Fig. 4
figure 4

(a) Open circuit potential curves, (b) Potentiodynamic polarization curves, (c) Nyquist plots and (d) Bode plots for Carbon steel in H2S and 1M HCl co-existing solution without and with different concentrations of BMT at 293K.

Potentiodynamic polarization (PDP)

The corrosion inhibition ability and corresponding inhibition mechanisms of BMT were further investigate by potentiodynamic polarization and EIS measurements. Figure 4b shows the potentiodynamic polarization curves for carbon steel in H2S and HCl co-existing solution without and with different concentrations of BMT. The Tafel extrapolation method was carried out to extract relevant electrochemical parameters from potentiodynamic polarization curves, including corrosion potential (Ecorr), corrosion current density (icorr), anodic Tafel slope (βa), cathodic Tafel slope (βc), and inhibition efficiency (η), as shown in Table 2. The η can be calculated as follow:

$$\eta \hspace{0.17em}=\hspace{0.17em}\frac{{i}_{corr,0}-{i}_{corr,i}}{{i}_{corr,0}}\times 100$$
(5)

where icorr,0 and icorr,i are corrosion current densities in the presence and absence of the inhibitor, respectively.

Table 2 Fitted electrochemical parameters deduced from PDP tests for for Carbon steel in H2S and 1M HCl co-existing solution without and with different concentrations of BMT at 293K.

When a corrosion inhibitor's displacement in Ecorr is greater than 85 mV compared to the blank solution, it can be defined as a cathode or anode corrosion inhibitor43,44. In the presence of BMT, the shifts of Ecorr are all ≤ 41 mV. Meanwhile, addition of the BMT both affect the βa and βc, and it can also be seen from Fig. 4b that both cathode and anode polarization curves are shifted, which reveal both the anodic and cathodic reactions are affected. These results indicated the mixed inhibition behavior of the BMT. In the terms of icorr, the presence of BMT promotes a lower icorr than blank solution, implying a lower corrosion rate of carbon steel. Furthermore, the icorr decreases with increasing BMT concentration, which reveals more BMT is adsorbed on the steel surface to form a stronger barrier layer. The η calculated by the icorr is 83.8% ~ 97.6% at the concentration of 0.3 ppm ~ 9 ppm BMT, which is close to that of weight loss measurements.

Electrochemical impedance spectroscopy (EIS)

The EIS measurements were conducted in close proximity to the obtained Eocp values, which are summarized in Table 3. Figure 4c presents the Nyquist plots for carbon steel in corrosion medium containing different concentration BMT. Typically, the capacitive loop is ascribed to charge transfer resistance and double layer capacitance. In blank control, a capacitive loop can be observed, indicating that charge transfer mainly controls the corrosion process. Upon the addition of BMT, the diameter of the capacitive loop significantly increases with increasing BMT concentration, suggesting a progressive inhibition of interfacial charge transfer by the adsorbed BMT film. The Nyquist curve deviates from the perfect semi-circle due to the frequency dispersion of the impedance due to the inhomogeneity of the electrode surface or the roughness caused by the adsorption of the inhibitor45,46. The impact of dispersion coefficients is mitigated by current maldistribution, leading to a flattening effect on the capacitive loop. The concentration-dependent protection effect with increasing BMT dosages is also evidenced by Bode plots in the Fig. 4d. It can be observed that the increasing absolute impedance value at low frequency region and the phase angle maxima increase with the increase of the BMT concentration (Table 3), suggesting that the inhibition efficiency increases accordingly. Meanwhile, asymmetric phase-angle peaks are observed in blank control phase angle, revealing two time constants associated with the formation of corrosion production and the interfacial charge transfer. After adding BMT, the single peaks are observed at intermediate frequencies signifying the sole time constant related to double layer capacitance formation at the solid/liquid interface. At high concentrations of BMT (3 ~ 9 ppm), wider signal range is depicted in the Bode phase angle plots as two time constants overlap each other, which suggests denser and less porous inhibitory film.

Table 3 Fitted electrochemical parameters deduced from EIS tests for Carbon steel in H2S and 1M HCl co-existing solution without and with different concentrations of BMT at 293K.

Based on the above results, the impedance results in the absence and presence of the inhibitor is fitted via the equivalent circuit model shown in Fig. 5a and b, respectively. In this model, Rs is the solution resistance, Rct is charge transfer resistance, CPEdl represents the constant phase element standing for the double-layer capacitance and the CPE is the constant phase element, Rf and the CPEf represents the resistance and the constant phase element of the film formed on the carbon steel surface.The impedance function of CPE can be expressed as follows:

$${Z}_{CPE}={Y}_{0}^{-1}{(j\upomega )}^{-n}$$
(6)

where Y0 is the CPE constant, j is the imaginary value (j2= −1) and ω is the angular frequency (ω= 2πƒ), respectively. The n is a deviation parameter (−1≤n≤1). For n= 0, CPE represents a pure resistance; n= 1, CPE represents a pure capacitance; n= −1, CPE represents an pure inductance; n= 0.5, CPE represents a Warburg impedance. The polarization resistances (Rp) are employed as indicators of the corrosion resistance of carbon steel to calculate the inhibition efficiency (η). The η are calculated as the following equation:

Fig. 5
figure 5

The equivalent circuit models used for fitting the EIS data: (a) in the absence of BMT, (b) in the presence of BMT.

$$\eta \hspace{0.17em}=\hspace{0.17em}\frac{{R}_{p,i}-{R}_{p,0}}{{R}_{p,i}}\times 100$$
(7)

Where \({R}_{p,i}\) (\({R}_{p,i}\)=Rct + Rf) and \({R}_{p,0}\) (\({R}_{p,0}\)=Rct) are the polarization resistance of working electrode (WE) in uninhibited and inhibited media respectively47,48,49. The results obtained from the fitting EIS data are shown in Table 3. The Rp value increases with an increasing BMT concentration, which is attributed to the increase in the thickness of the capacitor due to the adsorption of BMT on the WE surface. Thus, the η increases with the increase of BMT concentration. The EIS results further confirm the excellent corrosion inhibition ability of BMT on carbon steel.

Comparison of corrosion inhibition efficiency

Table 4 summarizes the inhibition performance of organic inhibitors studied in acidic media in the well-cited literature over the past three years. Among them, BMT exhibits outstanding inhibition performance at low concentrations. Although the results reported in this work are not record-breaking, they offers valuable insights into effectively inhibiting metal corrosion in H2S and HCl co-existing environments.

Table 4 The inhibition performance of organic inhibitors studied in acidic media in the well-cited literature over the past 3 years.

Surface characteristic analysis

The surface morphology of Carbon steel samples after 24 h of exposure to the HCl and H2S co-existing solution at 293 K in absence and presence of BMT is analyzed using SEM. As shown in Fig. 6a, it can be observed that the sample in absence of BMT exhibits a loose and porous structure, indicating severe corrosion. However, with the addition of BMT, the sample surface characterized by fairly smooth features, suggesting the corrosion is inhibited significantly (Fig. 6b). Additionally, the 3D topography reconstruction software attached to the SEM is employed to construct the 3D micromorphology for both two sample surfaces mentioned above. The associated 3D reconstruction image and approximate value of surface arithmetic mean height (Sa) are shown in the illustrations of Fig. 6a and b, respectively. It can be observed that the Sa decreased from 3.54 μm to 0.15 μm after adding BMT, indicating a strong corrosion inhibition effect.

Fig. 6
figure 6

SEM micrographs of Carbon steel surfaces after 24 h immersion in H2S and 1 M HCl co-existing solution at 293 K (a) without and (b) with BMT, respectively. (Illustration are the corresponding 3D micro-morphology reconstruction).

The static contact angle (CA) of water droplets on a metal surface can also provide insights into the corrosive impact. In general, a contact angle greater than 90° indicates hydrophobicity of the substrate surface. The recorded CA of carbon steel samples after 24 h of exposure to the HCl and H2S co-existing solution at 293 K in absence and presence of BMT have been presented in Fig. 7. In Fig. 7a, the CA of the steel sample immersed in a corrosive medium without BMT is shown as 56.0°, while Fig. 7b illustrates a CA of 120.9° for the steel sample immersed in a corrosive medium with BMT. The high contact angle is primarily attributed to a combination of rough surface morphology and low surface energy61. On the one hand, adsorption of BMT onto the steel surface reduces its surface energy and enhances its water repellency. On the other hand, as corrosion progresses, it leads to formation of a rough structure that further improves water repellency. The hydrophobic nature exhibited by steel samples aids in inhibiting transport of corrosive ions, thereby weakening corrosion.

Fig. 7
figure 7

The static contact angle (CA) of water droplets in the Carbon steel surfaces after 24 h immersion in H2S and 1 M HCl co-existing solution at 293 K (a) without and (b) with BMT, respectively.

Computational methods

The relationship between molecular structure and electron density distribution of BMT was studied by quantum chemical calculation. The optimized geometrical structure of BMT and related atomic numbers were shown in Fig. 8a, and all calculations were carried out under this structure.

Fig. 8
figure 8

(a) The obtained optimized structure. (b) HOMO, LUMO and Energy diagram for BMT.

The corrosion inhibition performance of inhibitors is closely related to the transition of electrons, which can be discussed by the distribution of frontier molecular orbitals (HOMO and LUMO). According to frontier molecular orbitals theory, a higher EHOMO (the energy of HOMO) eigenvalue indicates that the molecule has a higher electron-donating ability, while a lower ELUMO (the energy of LUMO) implies a higher electron-accepting ability62. The electron density isosurfaces of frontier molecular orbitals and energy gap (ΔE) of BMT are depicted in Fig. 8b, and the detailed quantum chemical characteristics19, including ΔE, absolute electronegativity (χ), global hardness (γ), dipole moment (μ) and fractions of electron transfer (ΔN), are computed and listed in Table 5. As shown in Fig. 8b, the HOMO for BMT are located on N atoms in secondary amine groups and the associated methylene groups which are the active sites for electrophilic attack by metallic cations. Besides, the LUMO for BMT is located on one side of the thiazole ring and the associated β-carbonyl group which probable to accept electron from metal.

Table 5 Quantum chemical parameters for BMT.

The excellent corrosion inhibition of BMT molecules can be further determined by the low ΔE, low γ, and high ΔN. The χ and γ can be defined as follows:

$$\chi \hspace{0.17em}=\hspace{0.17em}\frac{I+A}{2}$$
(8)
$$\gamma \hspace{0.17em}=\hspace{0.17em}\frac{I-A}{2}$$
(9)

While I is the ionization potential defined as I= -EHOMO, A is the electron affinity defined as A= - ELUMO. Meanwhile, fractions of electron transfer from inhibitor molecule to Fe surface, ΔN, can be given as follows:

$$\Delta N\hspace{0.17em}=\hspace{0.17em}\frac{{\chi }_{Fe}-{\chi }_{inh}}{2({\gamma }_{Fe}+{\gamma }_{inh})}$$
(10)

While the \({\upchi }_{Fe}\)(7 eV/mol)and \({\upgamma }_{Fe}\) (0 eV/mol) are the electronegativity and global hardness of bulk iron, respectively. Typically, narrow ΔE value indicates high reactivity, and the positive ΔN implies electron transport accomplished between BMT molecules and metallic surface atom. The results confirmed the strong adsorption behavior between BMT and Fe atoms.

In general, the electrophilic and nucleophilic reaction sites can be predicted by calculating the electrostatic potential (ESP) distribution on the Van der Waals surface. The negative ESP is the nucleophilic reaction region, and the more negative ESP, the greater corresponding nucleophilic reaction activity63. Hence, in practical application, the reaction activity is discussed by the region of negative ESP in common molecules. As can be seen from the ESP distribution of BMT in Fig. 9, the negative ESP regions in BMT are mainly distributed around N, S, O atoms and the conjugated π-bond in the benzene ring, while the positive electrostatic potential regions are mainly distributed around the hydrogen bond in the alkyl and benzene ring. The orange and cyan spheres indicate the maxima and minima (Vmin) of the ESP points, respectively, and corresponding values are listed in Table 6. The ESP minimum point (− 61.77 kcal/mol) appear near the O atom in the β-carbonyl and the N atom in the thiazole ring. The negative ESP regions are more inclined to be sites of nucleophilic reactions for BMT with Fe atoms.

Fig. 9
figure 9

Electrostatic potential (ESP) for BMT.

Table 6 Electrostatic potential minimum points for BMT.

Mechanism of corrosion inhibition

Experiments show that adding BMT can effectively protect Carbon steel from attack by the aggressive medium, mainly due to the adsorption of BMT on the steel surface to form a barrier. A representative mechanistic adsorption process for BMT on the steel surface has been shown in Fig. 10. The number of adsorption sites and adsorption type jointly determine the effect of corrosion inhibitor. Typically, the adsorption of organic corrosion inhibitors currently explored includes the two behaviors of physisorption and chemisorption. Theoretical calculation shows the reactive nature of BMT in terms of energy. In the molecule structure of BMT, it can be seen that there are copious lone pair electrons, π-electrons and π-conjugated, which can be considered as adsorption sites. In chemisorption process, the heteroatoms like N, O and S donate lone pair electrons towards the vacant d-orbital of Fe atoms forming coordination bonding. Synchronously, the Fe atoms also donate electrons from valance bond to the BMT molecules, which tends to form back bonding. Furthermore, the simultaneous chemisorption of O atom in the β-carbonyl and the N atom in the thiazole ring with Fe atoms tends to form approximate heterocyclic, which is conducive to improving the adsorption stability. In addition, the N atoms in the thiazole ring can be ionized in acid solutions to form protonated quaternary amine salts, resulting in electrostatic interaction (physisorption) with chloride ions adsorbed by the Fe residual force field. In conclusion, the molecular structure of BMT with multiple adsorption sites promotes its interaction with Fe atoms, which play a crucial role in the formation of protective film on the steel surface and reducing the reaction rate.

Fig. 10
figure 10

Schematic for probable adsorption modes of BMT inhibitor on the steel surface.

Conclusion

In this paper, a new mannich base BMT was synthesized and studied as a corrosion inhibitor for Carbon steel in HCl and H2S co-existing solution. And the inhibition mechanism has been proposed accordingly.Based on this investigation, the following key findings have been listed:

  1. 1.

    The weight lose measurement, potentiodynamics polarization and electrochemical impedance spectroscopy exhibited corrosion inhibition efficiency of > 96% for BMT above the concentration of 3.0 ppm.

  2. 2.

    The adsorption behaviour of BMT on the Carbon steel surface obeys Langmuir adsorption isotherm. The ΔG value obtained from fitted Kads shows that the adsorption of BMT molecules on the steel surface is favorable in terms of energy, and the inhibition performance of BMT can be attributed to both physisorption and chemisorption.

  3. 3.

    The surface analysis results demonstrate that inhibition mechanism of BMT is based on the formation of a hydrophobic protective film on the metal surface, which is in good agreement with the electrochemical results.

  4. 4.

    Quantum chemical calculations revealed the electron density distribution, primary adsorption sites, adsorption behavior, and adsorption energy of BMT, providing molecular-level insights into the interaction of BMT and Carbon steel.