Introduction

Corrosion has a major economic impact on the oil industry [16], because the most hostile environments are commonly found in actual production formations. Strong acids are routinely pumped into wells to stimulate production by increasing formation permeability. For sandstone formations addition of 3% HF is necessary. For limestone, 15 and 28% hydrochloric acid is usually used. Pipelines play an extremely important role throughout the world as a means of transporting oil over long distances from their sources to the refining plants. Selection of suitable metals for oil transport should be based on extensive corrosion testing. Corrosion control is normally achieved by a combination of materials (different formulations for steels and corrosion resistant alloys), limiting exposure time to streams and proper corrosion inhibitor selection [69]. The inhibitor films can be classified as a chemisorbed film, donating a lone pair of electrons attached to a central adsorption atom in a functional group, as an electrostatic adsorption film and as a precipitation and/or a complex film, reacting with dissolved metal ion and organic inhibitor molecule. Due their characteristics, surfactants can be used as corrosion inhibitors [1012]. The purpose of this work was to investigate the relationship between molecular structure and inhibition efficiency (corrosion inhibition efficiency), i.e. the effect of the heterocyclic ring, hydrophobic chain length and influence of anions on the inhibition performance of the corrosion inhibitor. This study is concerned with the evaluation of seven synthesized cationic surfactants: MTIm, MHIm, TPy, HPy, DEBABr, DEBAL and DEBAA as corrosion inhibitors of pipeline steel grade API 5L X52 in an acidic medium (2 M HCl) at different doses.

Experimental Procedures

Synthesis of Imidazolium, Pyridinium and Dimethyl-Ethylbenzyl Ammonium Derived Compounds

The synthesized inhibitors were described briefly in a previous study [12] as having the structures shown in Scheme 1.

Scheme 1
scheme 1

Chemical structure of the compounds derived of imidazolium, pyridinium and dimethyl-ethylbenzyl ammonium

Corrosion Inhibition Measurement

The composition of the pipeline steel grade API 5L X52 specimen (wt%) was 0.08 C, 1.06 Mn, 0.26 Si, 0.019 P, 0.003 S, 0.0039 Al, 0.041 Nb, 0.018 Cs, 0.02 Cr, 0.019 Ni, 0.054 V, 0.003 Ti, 0.0002 Ca, 0.0003 B, and the remainder was Fe. The specimen was machined into a regular form electrode of 1 cm2 cross-sectional area and 1 mm thickness. The coupons were mechanically polished with different grades of emery paper, down to 1,200, degreased with acetone and dried. Solutions of 2 M HCl in the absence and presence of various inhibitor concentrations (10, 25, 50, 100, and 200 ppm) were prepared from double-distilled water [13, 14]. A three electrode cell, employing a pipeline steel grade API 5L X52 electrode (cross sectional area 1 cm2), graphite counter electrode, and Ag/AgCl reference electrode was used for measurements. Electrochemical measurements were performed using a potentiostat/galvanostat ZRA PC3 GAMRY, software packages CMS100 and CMS105 provided by GAMRY were used to obtain the polarization curves. For potentiodynamic polarization curves, the scan rate was 0.166 mV/s and the potential scan range was ±30 mV versus the open circuit potential. Besides, potentiodynamic polarization curves were carried out with the scan rate of 0.125 mV s−1 in the range of −250 to +250 mV versus the open circuit potential. The measurements were conducted at room temperature (295 ± 2 K). Impedance (EIS) measurements ranged from 100 kHz down to 10 mHz, using a 5 mV (rms) sinusoidal potential perturbation. Calculations and experimental results are reported in the next sections. The weight loss method was used to determine the amounts of Fe2+ dissolved from the test samples during the corrosion process (corrosion rate [CR]) [14, Eq. 1].

$$ {\text{CR}} = {\frac{36.5P}{JSD}} $$
(1)

where CR = corrosion rate (μm/annum), P = loss of weight (mg), J = time of exposure (days), S = external surface area of the metal specimen (cm2), and D = specific mass of the metal used (g/cm3). The control sample showed 127 μm/annum loss in the thickness over 30 days which was considered 100% corrosion.

Results and Discussion

Polarization Curves

The Fig. 1 shows a set of polarization curves for the electrode of pipeline steel grade API 5L X52 measured in hydrochloric acid 2 M (polarization curves at different dosages of tested corrosion inhibitor, were similar in shape). The shift of the open-circuit potential in the presence of an inhibitor reveals which partial process is influenced by the inhibitor. The shifts of the open circuit potential in the positive direction indicate predominant interference with the anodic process; shifts in the negative direction, the cathodic process is affected; and no shift in open circuit potential, both processes are affected to the same extent [8]. It is thought there is not change in mechanism of the partial processes in the presence of the inhibitor. Therefore, mere measurements of open circuit potentials require polarizing the electrode to verify the Tafel slope constancy. The presence of surfactant in the acidic solution shifted the open circuit potential in the negative and positive directions [1315] and the Tafel Constants show similar values (see Table 1), i.e. all of these compounds belonged to mixed type inhibitors, that can effectively reduce hydrochloric acid corrosion of pipeline steel grade API 5L X52. The Wagner and Traud’s paper [16] is a milestone in the history of corrosion and form the basis of the polarization resistance. The slope [the instantaneous rate between potential (E) and current density (I)] of the polarization curve at the corrosion potential (E corr) was defined as polarization resistance (R p) (Eq. 2) [17]:

$$ R_{\text{P}} = \left( {{\frac{{{\text{d}}E}}{{{\text{d}}I}}}} \right)_{{E_{\text{corr}} }} $$
(2)
Fig. 1
figure 1

Tafel polarization curves at different dosages of DMEBABr in hydrochloric acid 2.0 M

Table 1 Electrochemical parameters of the compounds derived of imidazolium, pyridinium and dimethyl-ethylbenzyl ammonium

The Stern–Geary equation [18] relates quantitatively the slope R p of a polarization curve (Eq. 3) in the vicinity of E corr to the corrosion current density (I corr): where b a and b c are the anodic and cathodic Tafel slopes, respectively.

$$ I_{\text{corr}} = {\frac{{b_{\text{a}} b_{\text{c}} }}{{2.3R_{\text{p}} (b_{\text{a}} + b_{\text{c}} )}}} $$
(3)

The surface coverage degree (θ) and corrosion inhibition efficiency (IE), can be calculated with the resistance to polarization without inhibitor [(R p)t] and the resistance to polarization at different dosages of inhibitor [(R p)inh] (Eqs. 4, 5) [19, 20]:

$$ \theta = 1 - {\frac{{\left( {R_{\text{P}} } \right)_{\text{t}} }}{{\left( {R_{\text{P}} } \right)_{\text{inh}} }}} $$
(4)
$$ {\text{IE}} = \left( { 1- {\frac{{ (R_{\text{p}} )_{\text{t}} }}{{ (R_{\text{p}} )_{\text{inh}} }}}} \right) \times 100 $$
(5)

The presence of halogen ions increases the corrosion rate in acid solution mainly due to the well known depassivation effect in iron dissolution [2123]. The cationic surfactant molecule may slow down dissolution of steel by geometric blocking of active sites due to alkyl chains (steric effect) or by adsorption onto of active sites (see Scheme 2). All inhibitor compounds studied had at least one nitrogen atom in their molecular structure and adsorption can occur through the formation of an iron–nitrogen coordinate bond or π-electron interaction between the heterocyclic in their molecules with aromatic character and the iron substrate. Adsorption can also occur via electrostatic interaction between a negatively charged surface and the positive charge of the molecules (cationic surfactant), where the surface becomes negatively charged due to specific adsorption of anions. Furthermore, in corrosion systems, where the ionic surfactants and the solid surfaces are charged, electrostatic interactions play a governing role in the adsorption process [4]. Charge on the particle surface could be due to the preferential dissolution of the lattice ions and subsequent adsorption of the resulting complexes [8]. Role of electrostatic forces is clearly shown in Scheme 2, where the molecules of a cationic surfactant are shown to adsorb onto steel. So, higher values of θ of these cationic surfactants were reached once that spatial reorientation of molecules allowed adsorption of newer molecules from the bulk solution. Besides, there is a relationship between length of alkyl chain and structure in the ring of cationic surfactants (i.e., imidazolium and pyridium). This relationship is completely different between the imidazolium and pyridinium derivatives. Larger alkyl chain for methyl-alkyl-imidazolium compounds lowered values of θ (see Table 1). On the other hand; shorter alkyl chain for pyridinium compounds raised values of θ. It means that the compounds derived of pyridinium participate in a more parallel rather than perpendicular orientation at the surface due to the presence of a flat aromatic head group that can π-back bond with Fe2+ and the surface particularly at lower surface coverage. Thus, each adsorbed molecule would occupy a larger surface area compared with a perpendicular orientation. Furthermore, TPy has an aromatic character that enhances adsorption allowing higher packing density of the adsorbing inhibitor film, hence, showed the grater value of θ (0.92) at 100 ppm. On the other hand, the compounds derived from imidazolium have a higher rate of relaxation of the adsorbed inhibitor molecules from the metal surface [24], because neighbouring surfactant molecules are unable to hold a higher packing density due to steric hindrance of the alkyl chain (see Scheme 2). Furthermore, the cationic surfactants derived from dimethyl-ethylbenzyl ammonium have lower values of IE (see Table 1; Scheme 1) because the presence the geometrical structure of the synthesized compounds redirected the hydrophobic chains out of the plane at a right angle [9].

Scheme 2
scheme 2

Adsorption mechanism of compounds derived of imidazolium, pyridinium and dimethyl-ethylbenzyl ammonium

Adsorption Isotherm

At low surfactant concentrations, the adsorption is due to electrostatic interaction between individual isolated charged monomeric species and the oppositely charged solid surface [10]. Also surfactant species begin to form surface aggregates, solloids (surface colloids), including hemi-micelles, admicelles, and etc.; due to lateral interactions between hydrocarbon chains (see Scheme 2). Due to this additional driving force resulting from the lateral association with the electrostatic interaction still active, the adsorption exhibits a sharp increase with higher dosages of corrosion inhibitor. Besides, the corrosion inhibition process is based on the adsorption of the cationic surfactants molecules onto the steel surface, thus, it is critical to know the mode of adsorption and the adsorption isotherm that fits the experimental results. The most frequently used adsorption isotherms are Langmuir, Temkin, Frumkin and Volmer. Adsorption isotherms formulas involve a relationship between the adsorption equilibrium constant (K ads), θ, the concentration (C) and the molecular interaction constant (f). It is necessary to determine which adsorption isotherm best fits the surface coverage data. Some of the models considered are (Eqs. 69) [2531]:

Langmuir

$$ K_{\text{ads}} C = {\frac{\theta }{1 - \theta }} $$
(6)

Temkin

$$ K_{\text{ads}} C = {\text{e}}^{f\theta } $$
(7)

Frumkin isotherm

$$ K_{\text{ads}} C = \left( {{\frac{\theta }{1 - \theta }}} \right){\text{e}}^{f\theta } $$
(8)

Volmer

$$ K_{\text{ads}} C = \left( {{\frac{\theta }{1 - \theta }}} \right){\text{e}}^{{\left( {{\frac{\theta }{1 - \theta }}} \right)}} $$
(9)

The presence of structural defects such as vacancies, clusters, kinks, dislocations and stacking faults make it highly unlikely that the Langmuir adsorption isotherm works well with any set of experimental data. However, experimental data follow Langmurian behaviour forming a monolayer onto steel surface (see Fig. 2). The adsorption free energy (∆G 0ads ) can be obtained using the values of the K ads, the temperature (T) and the Universal Gas Constant (R = 8.314 J/K mol) (see Table 2; Eq. 10):

$$ \Updelta G_{\text{ads}}^{0} = - RT 1 {\text{n}}\left( {K_{\text{ads}} } \right) $$
(10)
Fig. 2
figure 2

Langmuir adsorption isotherms of compounds derived of imidazolium, pyridinium and dimethyl-ethylbenzyl ammonium

Table 2 Summary of fundamental adsorption constants of the compounds derived of imidazolium, pyridinium and dimethyl-ethylbenzyl ammonium

It should be pointed out that all tests show that the cationic surfactants tested have a positively charged head group (Nitrogen), an aromatic ring that provide π-electrons to enhance bonding with Fe, and hydrophobic chains. Furthermore, their surface and energetic parameters revealed their tendency to adsorb at the interfaces. As a result, these characteristics qualify them as efficient corrosion inhibitors. The Table 2 lists the K ads and ∆G 0ads of each inhibitor. Those values mean that the initial stage of adsorption is a dynamic process involving physisorption of surfactants onto the steel surface. Adsorption can be considered as a partitioning of the adsorbate species between the interface and the bulk, and can occur if the interface is energetically favoured by the surfactant in comparison to the bulk solution. Several factors influenced the efficiency of these inhibitors in the geometrical structure of the surfactant molecules; however, the highest value of the adsorption free energy (∆G 0ads ) corresponded to the TPy compound which also showed the greater values of IE.

Electrochemical Impedance Spectroscopy (EIS)

Actually there is an extensive use of EIS to understand the mechanisms of charge transfer processes at corroding interfaces. However, the ultimate goal of EIS is to derive kinetic parameters for a valid mechanism [32]. However, the validation of the experimental data is a great problem in impedance spectroscopy. For instance, it is not uncommon to observe inductive behavior (inductive loop) when the experimental impedance data are plotted in the complex plane. Also, the impedance loci frequently take the form of depressed semicircles, and also may exhibit several loops [8]. Of greater concern is whether or not the experimental data are valid, because invalid impedance data may well yield apparently acceptable kinetic parameters. The Kramers–Kronig transforms have been used extensively in the analysis of electrical circuits, but not often in the case of electrochemical systems; because, despite the fact that Kramers–Kronig transforms merge in the field of Linear Systems Theory (LST), the Kramers–Kronig transforms are purely a mathematical tool, and do not reflect any physical property or condition of the system [3236]. In these analyses are often involved the angular frequency of the applied signal (ω), the impedance [Z(ω)]: the real part (Re [Z(ω)] or Z′) and the imaginary part (Im [Z(ω)] or Z″). In order to realize Kramers–Kronig transforms equations (Eqs. 11, 12), systems must fulfil four somewhat general conditions: (1) Causality, (2) Linearity, (3) Stability and (4) The impedance values must be finite. Experimental data are interpreted in terms of models coming from EIS technique during analysis of data. Producing in the end representations of physical models and accounting for the mechanism of the processes going on at the interface in terms of electrochemical suitable notions.

$$ \text{Re} \left[ {Z\left( \omega \right)} \right] = \text{Re} \left[ {Z\left( \infty \right)} \right] + {\frac{2}{\pi }}\int\limits_{0}^{\infty } {{\frac{{x\text{Im} \left[ {Z\left( x \right)} \right] - \omega \text{Im} \left[ {Z\left( \omega \right)} \right]}}{{x^{2} - \omega^{2} }}}} {\text{d}}x$$
(11)
$$ \text{Im} \left[ {Z\left( \omega \right)} \right] = {\frac{2\omega }{\pi }}\int\limits_{0}^{\infty } {{\frac{{\text{Re} \left[ {Z\left( x \right)} \right] - \text{Re} \left[ {Z\left( \omega \right)} \right]}}{{x^{2} - \omega^{2} }}}{\text{d}}x} $$
(12)

This analysis has been done with Measurement Models [35] using Electrical Equivalent Circuits (EEC): the Voigt model. Because the fitting of an impedance spectrum to the Voigt model ensures that the data conform to the Kramers–Kronig equations [34, 37, 38]. This impedance of the Voigt model involves resistances (R k) and capacitors (C k) in the circuit (see Fig. 3, Eq. 13):

$$ Z\left( \omega \right) = R_{0} + \sum\limits_{k = 1}^{n} {{\frac{{R_{k} }}{{\left( {1 + j\omega R_{k} C_{k} } \right)}}}} $$
(13)
Fig. 3
figure 3

Voigt electrical circuit

The EEC used was a variation of the Voigt model (see Fig. 4), this circuit has two time constants, and required the use of two Constant Phase Elements (CPE) instead of capacitors [28, 31]. The corrosion of a bare steel surface without inhibitor is a single charge transfer process and the Voigt model uses only one CPE (see Table 3). The CPE has been used to cause EEC to fit the experimental data and account for depressed semicircles (these are impedance loci in which the center of the semi-circle in the Nyquist plane is placed below the real axis). A typical Nyquist plot with the shape of a depressed semicircle is shown in Fig. 5 for MTIm, the Nyquist plots of the remainder compounds were similar in shape and are available in the Supplementary Material. Impedance values of CPE (Z CPE) are calculated using a proportional factor (Y 0 ), an exponent (n) that accounts for deviation of ideal capacitor behavior, and the frequency (ω) multiplied by the complex number j (Eq. 14).

$$ Z_{\text{CPE}} = {\frac{{Y_{0}^{ - 1} }}{{\left( {j\omega } \right)^{n} }}} $$
(14)
Fig. 4
figure 4

Electrical equivalent circuit used to fit experimental data

Table 3 Parameters of the electrical equivalent circuit of the compounds derived of imidazolium, pyridinium and dimethyl-ethylbenzyl ammonium
Fig. 5
figure 5

Nyquist plot at different dosages of MTIm in hydrochloric acid 2.0 M

In the Bode plot of Phase Angle (ϕ) versus ω for MTIm, it can be seen that there are two-time constants (see Fig. 6, the Bode plots of Phase Angle (ϕ) versus ω of the remainder compounds were similar in shape and are available in the Supplementary Material). One time constant emerges at a frequency about 10 Hz. This can be attributed to the double layer capacitance and charge transfer resistance. Another at about 1,000 Hz can correspond to the relaxation process of an adsorbed inhibitor film as a surface dielectric film normally has a small time constant and so has a phase angle shift in the high frequency range. This inhibitor film changes the electrode interfacial structure and results in an additional time constant.

Fig. 6
figure 6

Phase angle versus frequency of MTIm in hydrochloric acid 2.0 M

The electrical elements in the Voigt model (see Fig. 4) account for the solution resistance (R 1), the influence of positive charged head of surfactant molecule comprising a complex impedance (R 2 and CPE1), and another impedance in series due to the alkyl chain (R 3 and CPE2). The capacitances associated with the CPE (C CPE) are reported in Table 3 (Eq. 15) [8]:

$$ C_{\text{CPE}} = Y_{0} \left( {R_{2} Y_{0} } \right)^{{{\frac{1 - n}{n}}}} $$
(15)

Higher values of C CPE with grater inhibitor dosage reported in Table 3 can be linked to higher values of the dielectric constant of the material ε (which comprise ε0, which is the dielectric constant of vacuum = 8.85 × 10−12 F/m and εr, which is the relative permittivity of the dielectric media), a reduction in the thickness of the electrical double layer (δ) and higher values of θ (Eq. 16). Because θ grows with increments in dosage, higher values of C CPE involve greater surface coverage by the surfactant molecules (see Table 3).

$$ C_{\text{CPE}} = {\frac{{\varepsilon_{0} \varepsilon_{r} }}{\delta }}\theta $$
(16)

Adsorption is improved by the interhydrophobic chain interaction (see Scheme 2). Such interaction facilitates the formation of a compact layer of surfactant molecules at the steel surface.

Weight Loss Essays

The immersion tests confirm results of electrochemical tests (see Table 4). It is very enlightening to run weight loss essays because electrochemical tests give only information of the initial behaviour (described in previous sections) of inhibition of corrosion, but integration of results with time came from weight loss essays (see Table 4). When the solid surface is electrically neutralized by the adsorbed surfactant ions, the electrostatic attraction is no longer operative and adsorption takes place due to lateral attraction alone. The adsorption is mainly through lateral hydrophobic interaction between the hydrocarbon chains [7] (see Scheme 2). Once that well arranged monolayer is formed the higher values of IE with time are linked to the arrangement of consecutive parallel layers of surfactant molecules; thus, the multilayer arrangement on the metal surface is produced by chemisorption and amphipathic character of compounds tested [4].

Table 4 Corrosion inhibition efficiency of the compounds derived of imidazolium, pyridinium and dimethyl-ethylbenzyl ammonium

Conclusions

  1. 1.

    The corrosion inhibition efficiency of surfactants increase with rising concentration.

  2. 2.

    The electrochemical parameters indicate that surfactants are mixed type inhibitors.

  3. 3.

    The adsorption process form a monolayer of cationic surfactants which initial arrangement follows the Langmuir isotherm.

  4. 4.

    Voigt’s Electrical Equivalent Circuit with two time constants describes accurately the experimental findings. The EIS spectra showed that the mechanism of corrosion inhibition involves the charged head of cationic surfactants, and remaining surfactant structure.

  5. 5.

    There are complex relationships between the chemical structure of the cationic surfactants and their capability of adsorption onto steel surface in acidic media. The presence of heteroatoms such as N and of π-electrons in the surfactant molecule play an essential role in the adsorption of them onto the metal surface; therefore the adsorption of these compounds showed that the value of θ is improved by π-bonds rather than the presence of nitrogen atoms. Increment or reduction of θ is related to the presence of longer or shorter alkyl chain; the influence of a longer alkyl chain for imidazolium derived compounds enhances adsorption, but the longer alkyl chain in the pyridinium derived compounds avoids higher density packing of surfactant molecules, and hence produced lower values of θ. Despite the fact that the adsorption of surfactant ions during monolayer formation is strongly correlated to the heteroatoms and π-electrons in the chemical structure of the molecule, further adsorption of surfactant molecules onto monolayer to form a multilayer lays on the energetically favoured lateral attraction of alkyl chains. On the other hand, the dimethyl-ethylbenzyl ammonium derived compounds due their molecular structure—more branched than those of the imidazolium and pyridinium derived compounds—reduced the adsorption of these compounds onto steel surface by steric hindrance, and hence there were lower values of θ for dimethyl-ethylbenzyl ammonium derived compounds.