1 Introduction

Petroleum industries are one of the largest sectors and consume huge amounts of corrosion inhibitors. This is due to the extremely large amounts of produced products and, correspondingly, to the large amounts of aggressive media to be inhibited. Inhibition of acid corrosion in the oil industry is used to reduce the rate of corrosion processes during the petroleum extraction, storage, and transportation of watered oil, with acid treatment of wells to increase their productivity, etc. [1]. The use of inhibitors significantly improves performance and the age of the equipment, without changing the technology of the process. The use of solutions of phosphoric acid in the acid treatment of injection wells and oilfield equipment has certain advantages, because in this a passivation of iron with hardly soluble phosphates is possible in a wide range of pH [2, 3]. However, effective protection of metals and alloys in solutions of phosphoric acid can be achieved by addition of appropriate inhibitors into working solutions. The use of corrosion inhibitors reduces the corrosion of metals. Most recognized acid corrosion inhibitors are organic materials containing N, O, and S atoms [4,5,6]. Several types of organic compounds have been used as corrosion inhibitors of steel corrosion in phosphoric acid solution, such as polymers [3], N-heterocyclic compounds [7, 8], n-alkyl-quaternary ammonium salt [9], thiosemicarbazide derivatives [10], plant extract [11], and ruthenium–ligand complex [12]. Generally, the organic inhibitors work by adsorption for hindering the active sites of the metal surface through displacing water molecules and forming a compact barrier layer to decrease the corrosion of metal. Commonly, compounds containing sulfur and nitrogen in their chemical structure can act as good corrosion inhibitors [13, 14]. Many studies confirmed that tetrazoles are one of most effective anticorrosion materials. Ehsani et al. [15] investigated the inhibition performance of N-benzyl—N—(4—chlorophenyl)—1H—tetrazole—5 amine for corrosion of steel in H2SO4. It was found that the inhibitor adsorbed physically on metal surface with inhibition efficiency around 98%. Verma et al. [16] studied the corrosion inhibition efficiency of (E)-3-phenyl-2-(1H-tetrazole-5-yl)acrylonitrile (PTA), (E)-3-(4-nitrophenyl)-2-(1H-tetrazole-5-yl)acrylonitrile (NTA), and (E)-3-(4-hydroxyphenyl)-2-(1H-tetrazole-5-yl)acrylonitrile (HTA) on mild steel in hydrochloric acid. The results showed that the inhibition efficiency increases with the increasing concentration, and maximum values were obtained at a high level of inhibitor concentration. The inhibition efficiency of the inhibitors followed the order of HTA (98.69%) > NTA (96.60%) > PTA (93.99%). Zucchi et al. [17] studied the inhibiting action of some tetrazole derivatives on the metallic corrosion in aqueous solutions. Seven tetrazole derivatives were tested at different conditions. The inhibiting efficiency was ranged from 50 to 99%. Violet Dhayabaran et al. [18] investigated the inhibitive performance of tetrazole derivatives namely, 1-(91-acridinyl)-5-(4′-aminophenyl) tetrazole, 1-(9′-acridinyl)-5-(4′-hydroxy phenyl) tetrazole, and 1-(9′-acridinyl)-5-(4′-chlorophenyl) tetrazole on the corrosion of mild steel in HCl acid. The adsorption of inhibitors followed Langmuir adsorption isotherm. The maximum inhibition of efficiency of tetrazole derivatives, 1-(9′-acridinyl)-5-(4′-amoinophenyl) tetrazole, 1-(9′acridinyl)-5-(4′-hydroxyphenyl) tetrazole, and 1-(9′-acridinyl)-5-(4′-Chlorphenyl) tetrazole was found to be 60.59%, 89.00%, and 92.74, respectively. Therefore, the purpose of this work is to study the corrosion and electrochemical behavior of mild steel (grade St3) in phosphoric acid solutions and to evaluate the effect of the inhibiting properties of substituted tetrazoles on this process. Tetrazoles are a class of heterocyclic organic compounds, consisting of a 5-member ring of four nitrogen atoms and one carbon atom. Three tetrazoles were tested; 9-phenyl-5,6,7,8-tetrahydrotetrazolo[5,1-b] quinazolin (PTQ), 10-phenyltetrazolo[5,1-b]cyclohepta[d]pyrimidine (PCP), and 10-phenyltetrazolo[5,1-b]cyclohepta[d]-4,10-dihydropyrimidine (PCD). The chemical structures of these compounds were shown below:

figure a

2 Experimental Methodology

The electrochemical behavior of mild steel in 0.5 M H3PO4 was studied. Experimental runs were carried out in the absence and presence of 9-phenyl-5,6,7,8-tetrahydrotetrazolo[5,1-b] quinazolin (PTQ), 10-phenyltetrazolo[5,1-b]cyclohepta[d]pyrimidine (PCP), and 10-phenyltetrazolo[5,1-b]cyclohepta[d]-4,10-dihydropyrimidine (PCD) as corrosion inhibitors at different experimental conditions using potentiodynamic polarization and electrochemical impendence techniques. Tests were carried out using a beaker of 500 ml. The cell containing working electrode, lugging capillary probe, thermometer, counter platinum electrode, all potential values were measured in reference to a Ag/AgCl electrode. The lugging capillary prob was adjusted such that it was at a distance not more than 1 mm from the working electrode. The working electrode was low carbon steel (mild steel) type St3. The working electrode exposed 2 cm2 surface area. The chemical compositions (% wt) of working Fe:99.26%, Mn:0.441%, Cr:0.150%, Cu:0.146%, C:0.14%. The reference electrode and counter electrode were mounted directly to the working electrode. Mild steel specimens were cleaned using emery paper (grade number 220, 320, 400, and 600, respectively), then washed with running tap water followed by distilled water, then dried with a clean tissue, degreased with alcohol, dried, and finally left in desiccator over silica gel. The cathodic polarization is carried out beginning from the highest negative potential of − 1600 mV until reaching the corrosion potential, and then the anodic polarization was performed up to 2100 mV. The potential was changed in scan rate of 3 mV/s, and then the current is recorded automatically. Polarization curves were obtained using potentiostat IPC-Pro. The corrosive solution was a 0.5 M solution of phosphoric acid prepared by diluting 15.1 M phosphoric acid by distilled water. The pH of the solution was then adjusted to the desired value by adding crystalline KOH to the electrolyte. Various concentrations of inhibitors were used in the experiments, which were prepared by dissolving the weights of these substances in acetone. The concentration of inhibitors ranged from 0.01 to 0.1 M at 25 °C. Impedance spectra were taken in the frequency range 10 kHz–0.01 Hz.

3 Results and Discussion

3.1 Electrochemical Behavior of Steel in Uninhibited H3PO4

The electrochemical behavior of mild steel in a 0.5 M phosphoric acid solution was shown in Fig. 1, it is clear that the potentiodynamic polarization curve has one pronounced peak corresponding to the maximum rate of anodic dissolution of the metal in the potential range 0.35–0.4 V. The peak is followed by a sharp drop in the rate of the anode process, which is associated with complete passivation of the electrode, due to the formation of an insoluble phosphate film on the metal surface. Similar behavior observed by Gunasekaran and Chauhan [19]. At a potential of 1.7 V, current increased again, this is may be attributed to the discharge of water with the release of oxygen on the surface of the metal. The potential equal to − 0.58 V corresponds to the corrosion potential (Ecorr). In the potential range from − 0.58 to − 1.60 V, cathodic hydrogen evolution occurs on the metal surface. The dependence of steel corrosion rate on the pH of the solution was shown in Fig. 2, which illustrates the anodic polarization behavior of steel oxidation. It is clear that the rate of dissolution of steel decreases with increasing pH, and the potential corresponding to complete passivation of the electrode is shifted to the negative region. The slope of the curve corresponding to the active dissolution of the steel remains practically unchanged with an increase in pH from 2 to 5. This indicates the same mechanism of the initial stage of dissolution of the steel electrode in solutions of phosphoric acid. Figure 3 shows the polarization curves of cathodic hydrogen evolution reaction for steel in a solution of phosphoric acid. It is clear that the pH of the solution does not affect this corrosion process significantly, and consequently, the reaction mechanism.

Fig. 1
figure 1

Potentiodynamic polarization curve of a mild steel in a 0.5 M H3PO4 (pH 2.0)

Fig. 2
figure 2

Anodic polarization curves of a steel in H3PO4 at different pH values

Fig. 3
figure 3

Polarization curves for cathodic hydrogen evolution for steel in a solution of phosphoric acid at different pH values

3.2 Electrochemical Behavior of Steel in Inhibited H3PO4

Figure 4 shows the anodic polarization curves of mild steel in 0.5 M phosphoric acid (pH 4) in the presence of inhibitors (PTQ, PCP, and PCD at 0.01 M). In all three cases, the presence of an inhibitor into the corrosive solution leads to a decrease in the rate of anodic dissolution of the steel electrode. As shown in Fig. 5, when the concentration of PTQ increases, the slope of the anodic polarization curve remains unchanged, this indicates an unchanged mechanism of anodic dissolution of the steel. Similar behavior was observed for other inhibitors (i.e., PCP and PCD). At the same time, it can be seen from the collected data that as the concentration of inhibitors increases, the corrosion potential (Ecorr) is shifted to the positive direction (Table 1). It is also noted that the inhibitors do not affect the cathode process speed. This also allows to be classified these materials as anode-type inhibitors. The displacement of the corrosion potential in the positive region indicates that positively charged inhibitor molecules adsorb on the surface of the electrode. Therefore, the inhibitors of PTQ, PCP, and PCD can be protonated in a solution of phosphoric acid that lead to an increase in the overvoltage of electrode reactions as a result of a shift in the value of corrosion potential to the positive region. The corrosion behavior of mild steel in 0.5 M H3PO4 solution in absence and presence of different concentrations of the investigated inhibitors was also studied by the electrochemical impedance spectroscopy (EIS) method at 25 °C. EIS is a modern and powerful tool in corrosion and solid-state electrochemistry. The usefulness of EIS represented by its ability to distinguish the dielectric and electric properties of individual contributions of components under study [20]. As shown in Fig. 6 for PCP and PCD, slightly depressed capacitive semicircles, which probably correspond to the charge-transfer process of the steel corrosion process [21], the same behavior was observed with PTQ. The centers of these depressed loops were displaced below the real axis. This phenomenon may be related to the frequency dispersion of the interfacial impedance and the inhomogeneous steel surface because of the microscopic roughness and inhibitor adsorption [22]. The addition of PCP and PCD increased the size of the impedance curves, suggesting that the organic inhibitors formed a protective film on the mild steel. The capacitive loop was larger in presence of PCD, indicating a higher protection of this inhibitor than the other. Figure 7 shows the impedance diagrams (Nyquist plots) for the mild steel in 0.5 M H3PO4 solution with presence of 0.1 M PCD inhibitor at different immersion times. Increasing exposure time of inhibitor containing solution, the impedance of the electrochemical process increases. Similar behavior was observed for PTQ and PCP. To interpret the impedance spectra obtained, the equivalent scheme for the corrosion of a steel electrode in a solution of phosphoric acid in the presence of test inhibitors is proposed and shown in Fig. 8. The circuit represents resistance of electrolyte (Rs) within the solution, charge transfer resistance (Rct), capacity of a double electric layer (Сdl), and Ca and Ra are the capacitance and resistance describing the contribution of the adsorbed inhibitor. This equivalent circuit was suggested and selected by software package of potentiostat IPC-Pro. The software compares the EIS experimental results with many equivalent circuits and selects the best one. Table 2 shows the calculated values of the elements of the equivalent circuit. The increase in the exposure time of a steel electrode in a solution of phosphoric acid with additives of the investigated inhibitors, an increase in the resistance of charge transfer (Rch), and a decrease in the capacity of the double layer (Cdl) occur, which is associated with an increase in the adsorption of inhibitors on the electrode surface. From the values of Rch, surface coverage (θ) and the inhibition efficiencies (%IE) can be defined and evaluated by the following equations:

Fig. 4
figure 4

Anodic polarization curves of mild steel in a 0.5 M H3PO4 (pH 4) absence and presence of 0.1 M inhibitors

Fig. 5
figure 5

Polarization curves of mild steel in 0.5 M solution of phosphoric acid (pH 4) in absence and presence of different concentration of PTQ

Table 1 Value of the corrosion potential (Ecorr) of a steel electrode in a 0.5 M solution of phosphoric acid (pH 4) at different concentrations of test inhibitors
Fig. 6
figure 6

Nyquist plots of the impedances of a steel electrode corroding in a 0.5 M solution of phosphoric acid (pH 4) at a steady-state potential in the absence and presence of inhibitors (holding time 20 min)

Fig. 7
figure 7

Nyquist plots of the impedances of a steel electrode corroding in a 0.5 M solution of phosphoric acid (pH 4) at a steady-state potential in absence and presence of 0.1 M PCD inhibitor at different electrode holding times

Fig. 8
figure 8

Equivalent electrical scheme of the corrosion of a steel electrode in a 0.5 M solution of phosphoric acid (pH 4) in the presence of inhibitors: Rs—resistance of electrolyte, Rct is the charge transfer resistance, Сdl—capacity of a double electric layer, Ca and Ra are the capacitance and resistance describing the contribution of the adsorbed inhibitor

Table 2 Calculated values of the equivalent circuit elements for the steel corrosion process in a 0.5 M solution of phosphoric acid in the presence of 0.1 M PCD and PCP
$$\theta =\frac{{\% {\text{IE}}}}{{100}}$$
(1)
$$\% {\text{IE}}=\frac{{{R_{{\text{ct,in}}}} - {R_{{\text{ct,un}}}}}}{{{R_{{\text{ct,in}}}}}} \times 100$$
(2)

where Rct,in and Rct,un is the charge transfer resistance for anodic reaction in the inhibited and uninhibited acid solution respectively. Table 3 shows the dependence of inhibitors efficiencies of PCP and PCD on the exposure time of the steel electrode corroding in 0.5 M solution of phosphoric acid. Protective effect of inhibitors depends significantly on the exposure time. Absences of inhibitors show a single semicircle in Nyquist plot revealing the charge transfer process. The presence of inhibitors increased the Rct values, and this effect was enhanced as the exposure time was increased. This phenomenon implied that an inhibitor-adsorption film was formed on the mild steel surface, thereby retarding the charge transfer. Moreover, Cdl decreased in the presence of inhibitors at each time presumably because of the gradual replacement of water molecules by the adsorption process of the inhibitor molecules on the steel/solution interface [23]. Cdl can be explained by the Helmholtz model as follows [24]:

Table 3 Quantum chemical parameters
$${C_{{\text{dl}}}}=\frac{{{\varepsilon ^0}\varepsilon }}{d}S$$
(3)

where ε0 is the permittivity of the air, ε is the local dielectric constant of the film, d is the thickness of the electric double-layer, and S is the geometrical surface area of the electrode exposed to a corrosive solution. As the exposure time increased, more inhibitor molecules adsorbed onto the surface of the mild steel, leading to a reduced exposed electrode area, a thicker electric double-layer, and lower local dielectric constant. These factors together yield a decrease in Cdl [25].

3.3 Quantum Chemical and Theoretical Calculations

Quantum chemical investigations have been successfully applied to correlate the corrosion protection efficiency of inhibitor molecules with their calculated molecular orbital (MO) energy levels. Furthermore, the results of quantum chemical calculations could be obtained without laboratory tests, thus saving time and tools [26]. Using quantum chemical calculations method, the structural parameters, such as, HOMO (highest occupied molecular orbital), LUMO (lowest unoccupied molecular orbital), dipole moment (µ), energy gap (ΔE), and fraction of transferred electrons (ΔN) were calculated. The structure of inhibitor was optimized by ArgusLab 4.0.1 package. The quantum chemical parameters were estimated by Austin Model 1 (AM1) method. AM1 method is based on the Neglect of Diatomic Differential Overlap (NDDO) approximate Hamiltonian. This method has been very successful in treating a wide array of organic systems for structures, properties, heats of formation, and describing reactions. Commonly, this method has the smallest overall errors with regard to experiment [27]. The optimized minimum energy geometrical configurations of test compounds are given in Fig. 9a–c, while the numerical values are shown in Table 3 for three inhibitors. Figure 9a–c show the optimized structures and the frontier molecular orbital density distributions. In these figures; both the HOMO and LUMO distributions of inhibitors were concentrated approximately over the nitrogen parts of molecules. The HOMO of all inhibitors is mostly distributed over nitrogen atoms ring. The benzene ring portion of inhibitors approximately does not contribute to the HOMO. This suggests that the nitrogen atoms ring plays a main role in providing πelectrons as well as N nonbonding electrons to the vacant d orbital of iron. The LUMO electron densities are almost distributed over the complete molecular area (especially for PCD). This suggests that in the donor–acceptor interaction, the inhibitors have the capacity to accept electrons from the respective occupied orbitals of the Fe atom. The energy of the EHOMO signifies the ability of the molecule to give a lone pair of electrons and the higher the EHOMO value, the greater the tendency of the molecule to donate electrons to an electrophilic reagent [28] and the lower the ELUMO, the greater the tendency of the molecule to accept electrons from metal atoms. Thus, an energy gap indicates the chemical stability of an inhibitor, and a lower ΔE value typically leads to greater adsorption on the steel surface, leading to higher inhibition efficiencies [24]. The calculated ΔE values of the compounds were approximately constant, indicating that all studied inhibitors protect steel surface to same degree of inhibition, and this may be attributed to the little differences in the chemical structures of three compounds. The number of transferred electrons (ΔN) was also calculated [29].

Fig. 9
figure 9figure 9figure 9

a Structure of PCD. a Optimized structure, b Charge density distribution, c HOMO, d LUMO. b Structure of PCP. a Optimized structure, b Charge density distribution, c HOMO, d LUMO. c Structure of PTQ. a Optimized structure, b Charge density distribution, c HOMO, d LUMO

$$\Delta N=\frac{{{X_{{\text{Fe}}}} - {X_{{\text{inh}}}}}}{{2({\eta _{{\text{Fe}}}}+{\eta _{{\text{inh}}}})}}$$
(4)

where XFe and Xinh denote the absolute electronegativity of iron and the inhibitor, respectively; ηFe and ηinh denote the absolute hardness of iron and the inhibitor molecule, respectively. These quantities are related to electron affinity (A) and ionization potential (I) as shown below

$$\begin{gathered} X=\frac{{I+A}}{2} \hfill \\ \eta =\frac{{I - A}}{2} \hfill \\ \end{gathered}$$
(5)

I and A are related in turn to EHOMO and ELUMO

$$\begin{gathered} I= - {E_{HOMO}} \hfill \\ A= - {E_{LUMO}} \hfill \\ \end{gathered}$$

Values of X and η were calculated by using the values of I and A obtained from quantum chemical calculation. The theoretical value of XFe is 7 and ηFe 0 eV/mol, respectively [29]. The fraction of electrons transferred from inhibitor to the metal surface (ΔN) was calculated and listed in Table 3. According to previous studies [30], value of ΔN showed inhibition effect resulted from electrons donation. If ΔN < 3.6, the inhibition efficiency increased with increasing electron donating ability at the metal surface [31]. In this study, PCP, PCD, and PTQ were the donor of electrons, and the metal surface was the acceptor. This result supports the assertion that the adsorption of inhibitor on the steel surface can happen on the bases of donor–acceptor interactions between the Л electrons of the inhibitors and the vacant d-orbitals of the steel surface [32]. Dipole moment is the measure of polarity of a polar covalent bond. It is defined as the product of charge on the atoms and the distance between the two bonded atoms. The total dipole moment, however, mirrors only the global polarity of a molecule. For a complete molecule, the total molecular dipole moment may be approximated as the vector sum of individual bond dipole moments [33]. The dipole moment is another parameter to obtain data on the electronic distribution in a molecule and is one of the properties used traditionally to discuss and rationalize the structure and reactivity of many chemical systems. It is proved that, generally, lower dipole moment is associated with high inhibition efficiency [34]. In present work, the dipole moment of PCP, PCD, and PTQ were approximately in same order.

3.4 Corrosion of Steel in Acidic Solution and Inhibition Mechanism

The corrosion of steel in acid solutions, in its simplest form, happens with hydrogen evolution reaction. The spontaneous dissolution of iron can be described by anodic dissolution reaction:

$${\text{Fe}} \to {\text{F}}{{\text{e}}^{++}}+2e$$
(6)

The anodic reaction accompanied by the corresponding cathodic reaction:

$$2{{\text{H}}^+}+2e \to {{\text{H}}_2}$$
(7)

Cathodic reaction can be accelerated in presence of oxygen:

$${{\text{O}}_2}+4{{\text{H}}^+}+4e \to 2{{\text{H}}_2}{\text{O}}$$
(8)

In these conditions, the corrosion of steel is controlled by the use of inhibitors. Phosphoric acid represents the source of hydrogen ions. In aqueous solution, phosphoric acid behaves as a triprotic acid, having three hydrogen atoms to lose. The hydrogen ions are lost sequentially:

$${{\text{H}}_3}{\text{P}}{{\text{O}}_{4({\text{aq}})}} \leftrightarrow {{\text{H}}^{\text{+}}}_{{({\text{aq}})}}+{{\text{H}}_{\text{2}}}{\text{P}}{{\text{O}}^ - }_{{4({\text{aq}})}}$$
(9)
$${{\text{H}}_2}{\text{P}}{{\text{O}}^ - }_{{4({\text{aq}})}} \leftrightarrow {{\text{H}}^+}_{{({\text{aq}})}}+{\text{HP}}{{\text{O}}^{2 - }}_{{4({\text{aq}})}}$$
(10)
$${\text{HP}}{{\text{O}}^{2 - }}_{{4({\text{aq}})}} \leftrightarrow {{\text{H}}^+}_{{({\text{aq}})}}+{\text{P}}{{\text{O}}^{3 - }}_{{4({\text{aq}})}}$$
(11)

The adsorption of an organic inhibitor on a steel surface is considered as a substitutional adsorption process between the organic molecule in the aqueous solution (Org(sol)), and water molecules adsorbed on the metallic surface (H2O(ads)):

$${\text{Or}}{{\text{g}}_{({\text{sol}})}}+x{{\text{H}}_2}{{\text{O}}_{({\text{ads}})}} \leftrightarrow {\text{Or}}{{\text{g}}_{({\text{ads}})}}+x{{\text{H}}_2}{{\text{O}}_{({\text{sol}})}}$$
(12)

where x is the size ratio representing the number of water molecules replaced by one molecule of organic inhibitor. The adsorption of organic inhibitors can be described by two main types of mechanisms: physical adsorption and chemical adsorption. In general, the physical adsorption requires the presence of both electrically charged surface of the metal and charged species in the bulk of the solution, while chemical adsorption includes charge sharing or charge-transfer from the inhibitor molecules to the metal surface. This is possible in case of a positive as well as a negative charge of the surface. Figure 10 shows the proposed mechanisms for corrosion and corrosion inhibition of mild steel in phosphoric acid in absence and presence of inhibitors. In Fig. 10a, reaction of Eq. 6 occurs at the anodic area of metal surface, while reactions 7 or 8, or both of them can occurs on cathodic sites on metal surface. The source of hydrogen ions is from dissociation of phosphoric acid (Eqs. 9, 10, and 11). Addition of inhibitor can reduce corrosion rate of steel via adsorption on metal surface. Inhibitors molecules displace water molecules from metal surface according to reaction 12.

Fig. 10
figure 10

proposed mechanisms for corrosion and corrosion inhibition of mild steel in phosphoric acid: a in absence of inhibitor. b in presence of inhibitor

4 Conclusions

The electrochemical behavior of St3 steel in a 0.5 M solution of phosphoric acid at different pH values was studied. It is shown that the rate of anodic dissolution of steel decreases with increasing pH and inhibitors concentrations. All studied inhibitors were classified as anodic inhibitors without affecting the cathodic process. On the basis of impedance measurements, an equivalent electrical scheme for the corrosion of steel grade St3 in a solution of phosphoric acid in the presence of test inhibitors has been proposed, which made it possible to calculate certain parameters of the corrosion process. It is shown that with an increase in the exposure time of the electrode in a solution of phosphoric acid in the presence of an inhibitor, the resistance of charge transfer increases and the capacity of the double layer decreases. All studied inhibitors represent moderate anticorrosion materials.