1 Introduction

Steel has found wide applications in a broad spectrum of industries to remove mill corrosion scales from metallic surfaces. The use of concentrated acid solutions (hydrochloric or sulfuric acid) at elevated temperature results in corrosion and eventually loss of metals [1,2,3]. A lot of attention has been given to the development of new and cost-effective organic compounds and studying their corrosion inhibition mechanism using several techniques [4]. The addition of organic corrosion inhibitors, which are compounds containing heteroatoms (=N–, –O-, and –S–), double and triple bonds, and aromatic rings, has been identified as one of the most practical and economical ways of corrosion control process of metals [5]. The mechanism of inhibition is generally explained by the formation of protective film on the surface of C-steel, which prevents diffusion of active corrosive anions from aggressive solution to the steel [6]. Many studies were done to evaluate the corrosion inhibition properties of different inhibitors in hydrochloric acid solutions using imidazopyridine derivatives [7,8,9].

In this work, the study focuses on new synthesized imidazopyridine derivatives, namely 6-nitroso-2-phenylimidazo[1,2-a]pyridine-3 carbaldehyde (C1) and (2-phenylimidazo[1,2-a]pyridin-3-yl)methanol (C2) as corrosion inhibitors for carbon steel in 1.0 M HCl solution. In a previous study, it was shown that imidazopyridine-type organic compounds are good corrosion inhibitors for many metals in aggressive media [10, 11] and they are also pharmacologically important and biologically active compounds which include several anxiolytic drugs [4, 12]. At the first stage of this study, the inhibitive behavior of the imidazopyridine derivatives was examined using chemical and electrochemical methods included weight loss, potentiodynamic polarization, and EIS techniques. In addition, the adsorption isotherm and quantum chemical studies were carried out to explore their adsorption type onto the metallic surface in search of new and efficient corrosion inhibitors [13]. On the other hand, the values of thermodynamic parameters were obtained from the adsorption isotherms and Arrhenius plots. The molecular structures of the studied inhibitors C1 and C2 are shown in Fig. 1.

Fig. 1
figure 1

The chemical structures of the studied inhibitors (C1) and (C2)

2 Experimental Procedure

2.1 Synthesis

The synthesis of 6-nitroso-2-phenylimidazo[1,2-a]pyridine-3 carbaldehyde (C1) and (2-phenylimidazo[1,2-a]pyridin-3-yl)methanol (C2) was performed according to the procedure presented in Fig. 2 [14]:

Fig. 2
figure 2

Synthesis of the new compounds (C1) and (C2)

2.1.1 NPIPC: 6-Nitroso-2-phenylimidazo[1,2-a]pyridine-3 carbaldehyde (C1)

Yield 60%; RMN 1H (300 MHz, CDCl3; TMS) δ (ppm): 7.5 (1H, td, H-Ar), 7.63 (3H, m, H-pyr, H-ar), 7.7 (2H, d, H-Ar, J = 7.75 Hz), 8.32 (1H, d, H-pyr, J = 8.76 Hz,), 8.83 (1H, s, H-pyr), 10.19 (1H, s, CHO).

2.1.2 PIPM: (2-Phenylimidazo[1,2-a]pyridin-3-yl)methanol (C2)

Yield 87%; RMN 1H (DMSO-d6, 60 MHZ) δ (ppm): 8.56 (1H, dd, H5, J5–6 = 7.1HZ), 7.90 (3H, m, Har), 7.55 (4H, m, Har-Hpyr), 7.06 (1H, t, Hpyr J = 7.13 Hz), 5.00 (2H, s, CH2), 3.30 (1H, s, OH).

2.2 Materials

The electrochemical experiments were performed on C-steel specimens with the following composition (in wt%): 0.21% C, 0.38% Si, 0.05% Mn, 0.05% S, 0.09% P, 0.01% Al, and balance Fe [15, 16]. Prior to each experiment, the specimens were pretreated by grinding with a series of emery papers (grades 400, 600, 800, 1000, 1200, and 1500), then washed with distilled water, degreased with acetone, and finally dried. 1.0 M HCl solution (Blank) was prepared by dilution of analytical grade HCl (37% w/w) with distilled water. The testing solutions consisted of 1.0 M HCl without and with (C1) and (C2) at the following concentrations (1.0 × 10−6, 1.0 × 10−5, 1.0 × 10−4, and 1.0 × 10−3 M). The molecular properties have been studied using density functional theory (DFT) methods at B3LYP/6-31G (d,p) level of theory set with GAUSSIAN 09W program [17].

2.3 Electrochemical Measurements

Electrochemical potentiodynamic polarization (EPP) and impedance spectroscopy (EIS) experiments were performed in a conventional three-electrode cell using a potentiostat PGZ 100 driven by Volta Master software [12]. The working electrode (WE) consisted of Carbon steel specimen, Ag/AgCl used as a reference electrode, and platinum wire as the counter (auxiliary) electrode. The temperature of the solution was thermostatically controlled in a water bath. Prior to the electrochemical experiment, a stabilization period of 30 min was allowed, and this was proved to be sufficient to reach a steady-state open circuit potential. The polarization curves were recorded from − 900 to − 100 mV with scan rate of 1 mV s−1. All experiments were repeated three times at the desired temperature (± 1 °C). In order to evaluate the corrosion kinetic parameters, a fitting by Stern–Geary equation was used. To do so [18, 19], the overall current density values, i, were considered as the sum of two contributions, anodic and cathodic current ia and ic, respectively. This was derived from the following equation:

$$i={i_{\text{a}}}+{i_{\text{c}}}={i_{{\text{corr}}}}\left\{ {\exp \left[ {{b_{\text{a}}} \times \left( {E - {E_{{\text{corr}}}}} \right)} \right] - \exp \left[ {{b_{\text{c}}} \times \left( {E - {E_{{\text{corr}}}}} \right)} \right]} \right\},$$
(1)

where icorr is the corrosion current density (A cm−2); ba and bc are the Tafel constants of anodic and cathodic reactions (V−1), respectively.

These constants are linked to the Tafel slopes (V dec−1) in logarithmic scale given by the following equation:

$$\beta =\left( {\ln 10/b} \right)=(2.303/b),$$
(2)

where \(\beta\) is a constant, and b is the Tafel slope.

The percentage inhibition efficiency (ηPP%) obtained from potentiodynamic polarization measurements was calculated using the following equation [20,21,22,23]:

$${\eta _{{\text{PP}}}}\% =\frac{{{I_{{\text{corr}}}}~ - ~{{I^{\prime}}_{{\text{corr}}}}}}{{{I_{{\text{corr}}}}}} \times 100,$$
(3)

where \({\eta _{{\text{PP}}}}{\text{\% }}\) is the percentage inhibition efficiency obtained from the potentiodynamic polarization experiments, and Icorr and I′corr represent the values of uninhibited and inhibited corrosion current densities, respectively.

The electrochemical impedance spectroscopy (EIS) spectra were recorded by applying an alternating current (AC) signal with a 10 mV amplitude and the applied frequency ranged from 100 KHz to 10 mHz at open circuit potential, with 10 points per decade. The inhibition efficiency\(~{\eta _{{\text{imp}}}}{\text{\% }}\) of the tested inhibitors C1 and C2 was calculated from the charge-transfer resistance values (Rct) using the following equation [24, 25]:

$${\eta _{{\text{imp}}}}\% =\frac{{{R_{{\text{ct}}}} - {{R^{\prime}}_{{\text{ct}}}}}}{{{R_{{\text{ct}}}}}} \times 100,$$
(4)

where \({\eta _{{\text{imp}}}}\%\) is the percentage inhibition obtained from electrochemical impedance spectroscopy experiments, and Rct and Rct are the charge-transfer resistance in the absence and presence of inhibitor, respectively.

2.4 Scanning Electron Microscopy (SEM)

The surface morphology of the carbon steel specimen was analyzed in the presence and absence of inhibitor at an optimum concentration using scanning electron microscope (SEM) (FEI quanta 200). SEM was used to characterize in greater details the surface morphology of steel at low magnifications (50×). The specimens were immersed in 1.0 M HCl for 6 h in the absence and presence of C1 and C2 inhibitors. After immersion, each specimen was rinsed with distilled water, and dried.

2.5 Computational Study

Quantum chemical computations were carried out using Gaussian 09 [26, 27] software package, at density functional theory (DFT) with the Beck’s 3-parameter hybrid exchange functional (B3) combined together with Lee–Yang–Parr (B3LYP) and 6-31G (d,p) basis set [28] in gas and aqueous phase. DFT used in this study has become very popular, in terms of applicability and as an accurate method to investigate the electronic structure of molecules [29]. The most relevant descriptors of the molecule potential as corrosion inhibitors include HOMO and LUMO energy values, energy band gap (∆E), molecular dipole moment (µ), electron affinity (A), ionization potential (I), electronegativity (χ), global hardness (η), softness (σ), the fraction of electron transferred (ΔN), electrophilicity index (ω), and Fukui functions. All these parameters were calculated using the DFT method and have been used to understand the properties and activity of the two studied inhibitors and to explain the experimental data obtained for the corrosion process.

3 Results and Discussion

3.1 Potentiodynamic Polarization Measurements

The polarization curves of C-steel in 1.0 M HCl solution with and without the presence of various concentrations of (C1) and (C2) inhibitors are shown in Fig. 3. Electrochemical corrosion kinetic parameters, such as corrosion potential (Ecorr), corrosion current density (Icorr), and cathodic Tafel slopes (bc) are presented in Table 1.

Fig. 3
figure 3

Tafel polarization curves for the C-steel in 1.0 M HCl containing various concentrations of a C1 and b C2 inhibitors

Table 1 Tafel polarization parameters for C-steel in 1.0 M HCl solution with and without the addition of various concentrations of C1 and C2 inhibitors

As it can be seen from these polarization results, the icorr values decreased considerably with the increase of the inhibitor concentration [30]. For the uninhibited solution, the icorr was 983 µA cm−2, but in the presence of 1.0 × 10−3 M of C1 and C2, icorr values decrease to 42 and 78 µA cm−2, respectively, which indicates that the corrosion current markedly decreased in the presence of both inhibitors. This could be due to the adsorption process of the inhibitor by the most preferable sites onto surface of steel in acid solution [31].

Since the effect of the inhibitors on the cathodic Tafel slopes is negligible, this indicates that the adsorption of both inhibitors does not modify the mechanism of cathodic reaction [32]. Figure 3 shows the noticeable effect of C1 and C2 on the slope of anodic branches forming a protective film on the anodic sites. In addition, the potential shift towards more positive values corresponds to the dominant anodic inhibition mechanism of the tested compounds in acidic environment.

If the change in Ecorr values in the presence of inhibitor is greater than 85 mV as compared to the Ecorr value of blank, these compounds can be categorized as anodic or cathodic type [33]. However, if the change in Ecorr values is less than 85 mV, then they act as mixed type inhibitors [34]. In our case, the maximum change for C1 is greater than 85 mV indicating that this compound acts as anodic inhibitor, while C2 act as mixed type with anodic predominance.

3.2 Electrochemical Impedance Spectroscopy Measurements

The Nyquist plots (Fig. 4) contain depressed semi-circles non-ideal with their center located under the real axis, and their size increases with the increase of the inhibitor concentration, indicating that the corrosion of metal is mainly related to the charge-transfer process [35, 36]. As seen from Fig. 5, the single peak obtained in Bode plots refers to the existence of one time constant. It can also be seen from Bode plots that the absolute impedance at low frequency increases with the increase of C1 and C2 concentrations forming a protective film on the steel surface [37]. Moreover, the more negative values of phase angle obtained from increasing the concentration of the inhibitors indicate a good inhibition effect on the corrosion of steel in 1.0 M HCl solution. This behavior could be due to the adsorption of more molecules on metal surface at higher concentration [38].

Fig. 4
figure 4

Nyquist plots of C-steel in 1.0 M HCl solution containing various concentrations of a C1 and b C2 inhibitors at 298 K

Fig. 5
figure 5

Bode plots for C-steel in 1.0 M HCl solution containing various concentrations of a C1 and b C2 inhibitors, and c the blank

The obtained impedance data were fitted with the simulation EC-Lab V10.02 to the electrical equivalent circuit diagram shown in Fig. 6 [39]. A fitting circuit (Fig. 6) represented the charge-transfer resistance (Rct) connected in parallel to the constant phase element (CPE), and both in a series connection with the solution resistance (Rs) [40]. CPE is used to replace the pure capacitance element in order to modeling the frequency dispersion generally related to different physical phenomena such as surface heterogeneity [41].

Fig. 6
figure 6

Electrical equivalent circuit used for the modeling the steel/electrolyte system

The impedance of CPE is given by the following equation:

$${Z_{{\text{CPE}}}}={[Q{\left( {j\omega } \right)^n}]^{ - 1}},$$
(5)

where Q is the frequency independent real constant, j is the imaginary number, ω = 2πf is the angular frequency (rad s−1), f is the frequency of the applied signal, and n is the CPE exponent for whole number of n = 1, 0, − 1. The calculated values of the double-layer capacitance (Cdl) derived from the CPE parameters were calculated according to the following equation [42]:

$${C_{{\text{dl}}}}={(Q \times R_{{{\text{ct}}}}^{{1 - n}})^{1/n}}.$$
(6)

Excellent fit was obtained with this model of electrical circuit for all experimental data. The impedance parameters were calculated from the non-linear least square fit of the equivalent circuit and are given in Table 2.

Table 2 Impedance parameters for C-steel in 1.0 M HCl solution in the absence and presence of different concentrations of C1 and C2 at 298 K

As it can be seen from Table 2, the Rct values increased and the Cdl values decreased with the increase of the inhibitor concentration. This variation can be interpreted by an increase of the double-layer thickness. The result can be attributed to the gradual replacement of water molecules with adsorbed inhibitors on the metal surface [43, 44]. The percent inhibition (ƞimp %) was calculated according to the following equation:

$$\eta _{{{\text{imp}}}} \% = \frac{{R^{\prime}_{{{\text{CT}}}} - ~R_{{{\text{CT}}}} }}{{R^{\prime}_{{{\text{CT}}}} }}~ \times 100,$$
(7)

where \({R_{{\text{CT}}}}\) and \({R^{\prime}_{{\text{CT}}}}\) are the charge-transfer resistance without and with inhibitor, respectively.

The percent inhibition of the C-steel in the presence of high concentration of C1 and C2 reached 95% and 92%, respectively. The better adsorption of C1 could be related to the strong reactivity of aldehyde (CHO) and nitroso (–N=O) functional at the groups metal/solution interfaces.

3.3 Adsorption Isotherm and Thermodynamic Parameters

To obtain information on the adsorption mode of C1 and C2 on the C-Steel surface, different adsorption isotherms were tested. The value of linear regression coefficient (R2) was used as a guage in selecting the isotherm that best described the adsorption process [45]. The EIS data were tested using three adsorption isotherms, which included Temkin, Frumkin, and Langmuir models. The Langmuir adsorption isotherm model has best fitted the data for C1 and C2 and is described by the following equation [46]:

$$\frac{{{C_{{\text{inh}}}}}}{\theta }={C_{{\text{inh}}}}+\frac{1}{K},$$
(8)

where θ is the degree of surface coverage, Cinh is the inhibitor concentration, and K is the equilibrium constant of the adsorption/desorption process.

The choice of Langmuir isotherm over the other isotherms was based on the correlation coefficient (R2) values where it was found to be closer to unity with the Langmuir isotherm. The plot of the linear fit of Cinh/θ vs. Cinh (Fig. 7) showed straight lines with an average regression coefficient and slope close to unity [46].

Fig. 7
figure 7

Langmuir adsorption isotherm plots of C-steel in 1.0 M HCl solution containing C1 and C2

In order to attribute the adsorption process to either physisorption or chemisorption, the free energy of adsorption (∆Gads) was calculated for the Langmuir isotherm using Eq. 9 and illustrated in Table 3:

Table 3 Langmuir parameters representing the adsorption mechanism on C-steel surface obtained from EIS parameters at 298 K
$$\Delta {G_{{\text{ads}}}}= - RT\ln \,(55.5\,{\text{K}}),$$
(9)

where ∆Gads is the standard free energy of adsorption, R is the gas constant, and T is the absolute temperature. The value of 55.5 is the concentration of water in solution in M.

Generally, if the absolute value of ΔGads is lower than 20 kJ mol−1, the adsorption can occur through electrostatic forces involving weaker interactions between the inhibitor charged molecules and the charge of metal [47]. If the value of ΔGads becomes − 40 kJ mol−1 or more negative, then chemisorption would dominate [47]. The value of ΔGads at 298 K is found to be − 46.48 kJ mol−1 for C1 and − 44.12 kJ mol−1 for C2 (Table 3). It can be inferred from this result that both compounds show an active chemisorption towards the metal surface to form a coordinate chemical bond. However, chemisorption was the major contributor, while physical adsorption only slightly contributed to the adsorption mechanism judged from the decrease of Rct with the increase in temperature [39].

3.4 Effect of Immersion Time

In order to investigate the inhibitors adsorption kinetics and to determine the time needed for C1 and C2 to reach their maximum inhibition efficiencies, electrochemical impedance spectroscopic measurements in 1.0 M HCl solution were performed in the absence and presence of 1.0 × 10−3 M tested compounds for different immersion times. The results are shown in Fig. 8 and Table 4.

Fig. 8
figure 8

Nyquist diagrams of C-steel in 1.0 M HCl with and without 1.0 × 10−3 M C1 and C2 at 25 °C for different immersion times

Table 4 Electrochemical impedance parameters of the C-steel in 1.0 M HCl solution with and without 1.0 × 10−3 M C1 and C2 at 25 °C for different immersion times

Table 4 shows that ƞimp % increases with the increase of immersion time reaching maximum values after 4-h immersion for both inhibitors (96% for C1 and 93% for C1). However, for prolonged immersion times (more than 4 h), the ƞimp % slightly decreases and reaching about 94% for C1 and 91% for C2 after 12-h immersion time. Both tested molecules formed a compact film within an immersion time of 1 h and after 4 h this film started to detach from the electrode surface leading to a decrease in the inhibition efficiency. This is the result of the permeation of the electrolyte through the protective layer formed on the metal surface.

3.5 Effect of Temperature and Thermodynamic Parameters

The temperature can modify the interaction between the C-steel and the inhibitors in acidic medium [46]. In order to study the effect of temperature on the inhibition efficiencies of the imidazopyridine compounds, polarization and impedance experiments were conducted in the range of 298–328 K, in the absence and presence of 1.0 × 10−3 M of C1 and C2. The results showed that an increase in the temperature decreased very slightly the corrosion rate in the presence of the both inhibitors compared to the blank solution (Fig. 9) (Table 5). This indicates that the dissolution of metal is mainly controlled by chemical adsorption of C1 and C2 which involves strong interactions between the studied inhibitors and metal surface.

Fig. 9
figure 9

Nyquist plots of C-steel in 1.0 M hydrochloric acid, in the absence and presence of 1.0 × 10−3 M of C1 and C2 at different temperatures

Table 5 The electrochemical impedance parameters of C-steel in 1.0 M hydrochloric acid solution in the absence and presence of 1.0 × 10−3 M of C1 and C2 at different temperatures

In order to estimate the activation energy (Ea), the enthalpy of activation \((\Delta {H^*})\), and the entropy of activation \((\Delta {S^*})~\) for the corrosion reaction of C-steel in the absence and presence of C1 and C2, the Arrhenius equation was used:

$$\ln {I_{{\text{corr}}}}= - \frac{{{E_{\text{a}}}}}{{RT}},$$
(10)

where Ea is the apparent effective activation energy, T is the absolute temperature, and R is the gas constant.

The values of apparent activation energy are listed in Table 6. An alternative formulation of the Arrhenius equation is the thermodynamic formulation of the transition state theory:

Table 6 Activation parameters, Ea, \(\Delta {H^*}\), and \(\Delta {S^*}\)of the dissolution of C-steel in 1.0 M HCl solution in the absence and presence of 1.0 × 10−3 M C1 and C2
$$\ln \frac{{{I_{{\text{corr}}}}}}{T}=\left( {\frac{{RT}}{{N \times h}}} \right)\exp \left( {\frac{{\Delta {S^*}}}{R}} \right)\exp \left( {\frac{{ - \Delta {H^*}}}{{RT}}} \right),$$
(11)

where N is the Avogadro’s number, h is the Plank’s constant, ∆H* is the enthalpy of activation, and ∆S* is the entropy of activation.

The activation parameters of for C-steel in 1.0 M HCl acid solution in the absence and presence of C1 and C2 were obtained from linear square fits of ln Icorr vs. 1000/T (Fig. 10). The values of ΔH* and ΔS* were obtained from linear square fits of ln Icorr/T vs. 1000/T (Fig. 11).

Fig. 10
figure 10

Arrhenius plots (ln Icorr vs. 1000/T) of C-steel in 1.0 M HCl solution with and without 1.0 × 10−3 M of C1 and C2

Fig. 11
figure 11

Arrhenius plots (ln Icorr/T vs. 1000/T) of C-steel in 1.0 M HCl solution with and without 1.0 × 10−3 M of C1 and C2

Figure 10 shows the Arrhenius plots in the absence and presence of 1.0 × 10−3 M of imidazopyridine inhibitors. The corresponding values of Ea are given in Table 6 and indicate that values of Ea obtained in solutions containing C1 and C2 are higher than those in the blank. The higher values of the apparent activation energy obtained in the presence of these compounds suggest that of C1 and C2 could be physisorbed on the C-steel surface [48]. The \(\Delta {H^*}\) values for dissolution reaction of C-steel in 1.0 M HCl solution in the presence of C1 and C2 are higher than that in their absence. However, the positive signs of \(\Delta {H^*}\) values reveal the endothermic nature of the C-steel dissolution process suggesting that is difficult with inhibitors. The negative values of entropy \(\Delta {S^*}\)show that the formation of activated complex at the rate-controlled step represents an association step being more ordered [49].

3.6 Scanning Electron Microscopy (SEM)

The surface morphology of C-steel before and after immersion in 1.0 M hydrochloric acid in the absence and presence of 1.0 × 10−3 M of C1 and C2 was determined by SEM and is shown in Fig. 12. The electron micrographs reveal a smooth surface in absence of any treatment Fig. 12a; however, after an immersion in 1.0 M HCl solution for 6 h, the surface was strongly damaged owing to corrosion in the absence of the inhibitors (Fig. 12b), but in the presence of the inhibitors (Fig. 12c, d) there was less damage on the surface. The surface morphology of steel in the presence of C1 and C2 showed large smooth area, free of corrosion products, and revealed the formation of a protective layer on the C-steel surface [16].

Fig. 12
figure 12

SEM of carbon steel (×50 magnifications): a polished, b immersed for 6 h in 1.0 M HCl; c immersed for 6 h in 1.0 M HCl + 1.0 × 10−3 M C1, d immersed for 6 h in 1.0 M HCl + 1.0 × 10−3 M C2

3.7 Quantum Chemical Calculations

Quantum chemistry has been largely applied to understand the complex mechanism of corrosion inhibition between organic molecules and metal surface [50]. Quantum descriptor calculations were performed using Density Functional Theory (DFT), B3LYP with 6-31G(d,p). The optimized geometries of the studied inhibitors and their frontier molecular orbitals (HOMO and LUMO) are presented in Fig. 13. The Fukui functions have also been modeled using a Mulliken populations analysis in order to establish the most active and reactive sites of the tested molecules. It can be seen that C1 and C2 have a similar HOMO distribution which are all mainly distributed almost of the whole molecule. The LUMO electronic density is saturated around imidazopyridine rings and nitroso group in C1 and distributed on the entire molecule in C2 (Fig. 13). Electrostatic potential surfaces (ESP) maps give an indication of the net electrostatic effect of molecule produced at that point by the total charge distribution [51]. The different values of the electrostatic potential are shown with different colors, red color represents the regions of the most negative electrostatic potential, and the most positive electrostatic potential is indicated by a blue color, while the green color represents the region of zero potential [51]. The electrophilic active regions are localized around the oxygen and nitrogen atoms (especially O16, O19, and N7 atoms). As for the ESP contours presented in Fig. 14, the red lines are mainly concentrated around the same atoms and are possible sites for electrophilic attack.

Fig. 13
figure 13

Optimized structures, HOMO, LUMO for the studied compounds in neutral and protonated forms (B3LYP/6-31G (d,p)

Fig. 14
figure 14

Electrostatic potential surface ESP maps and contours of investigated inhibitors (C1 and C2) with B3LYP/6-31G (d,p) basis

The quantum parameters obtained from this study, such as EHOMO, ELUMO, energy gap (∆Egap), the dipole moment (µ), total energy (TE), absolute hardness (η), absolute electronegativity, (χ), and softness (σ), were calculated and are shown in Table 7. The frontier orbitals such as the highest occupied molecular orbital energy (EHOMO) and the lowest unoccupied molecular orbital energy (ELUMO) are very important quantum chemical parameters to describe the chemical reactivity and ability of molecules to adsorb on the metal surface. The HOMO is the highest energy orbital containing electrons and act as an electron donor [52]. The LUMO is the innermost (lowest energy) orbital that could act as the electron acceptor [52]. The higher value of the HOMO energy indicates the tendency of a molecule (inhibitor) to donate electrons to appropriate acceptors such as 3d orbital of Fe atom; on the other hand, the value of LUMO energy indicates the capability of the molecule to accept electrons [53]. The smaller value of ∆Egap of the inhibitors facilitates the adsorption of the molecule and thus will cause higher inhibition efficiency, because the energy to remove an electron from the last occupied orbital will be low [54]. A hard (High η) molecule has a large ∆Egap and a soft molecule (High σ) is associated with a small ∆Egap [55]. Therefore, higher σ is related to the high reactivity of molecules [56]. The softness (σ) is the inverse of the hardness = 1/η.

Table 7 Calculated quantum chemical parameters for non-protonated and protonated molecules of C1 and C2 obtained with the DFT at B3LYP/6–31 (d,p) level in gas and aqueous phases

A high value for the fraction of electron transferred is related to the high inhibition efficiency. The expression (∆N) is explained by the simple movement of electrons from donor to the acceptor molecule [56]. According to Lukovits’s study [57], if ∆N < 3.6, the inhibition efficiency enhances with increasing electron donating ability at the metal surface. To calculate ∆N, the theoretical values of \({\chi _{{\text{Fe}}}}\) = 7 eV and \({\eta _{{\text{Fe}}}}\) = 0 eV are used in the following equation:

$$\Delta N=\frac{{{\chi _{{\text{Fe}}}} - {\chi _{{\text{inh}}}}}}{{2({\chi _{{\text{Fe}}}}+{\chi _{{\text{inh}}}})}},$$
(12)

where \({\chi _{{\text{Fe}}}}\) and \({\chi _{{\text{inh}}}}\) are the absolute electronegativity of metal and inhibitor molecules, respectively. \({\chi _{{\text{Fe}}}}\) and \({\chi _{{\text{inh}}}}\) are the absolute hardness of metal and the inhibitor molecule, respectively.

The electrophilicity (ω), nucleophilicity (ε), and total energy are chemical reactivity descriptors that provide the capacity of the molecule to receive and release electrons. In this case, C1 is the strongest electrophile, while C2 is the strongest nucleophile. 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 [58]. A molecule with high value of dipole moment (µ) is explained by its higher polarizability and good effective surface area and therefore it would be a better corrosion inhibitor [59]. The highest value of the dipole moment (≈ 3 D) was shown for C1, which has the highest reactivity towards tested steel surface [60]. The calculated quantum chemical parameters in the presence of water as well as in the gas phase are gathered in Table 7. It was shown that the calculated quantum chemical parameters for non-protonated forms of imidazopyridine derivatives in the presence of a solvent (water) as well as in the gas phase do not exhibit important differences (Table 7). From the computed results in gas and aqueous phases, a high increase is shown for dipole moment (µ) in solution, which is probably a result of the polarization of the inhibitor molecules by the solvent, leading to an increase in the charge separation in the molecules [61].

The presence of nitrogen heteroatoms in the molecules of imidazopyridine derivatives suggests high tendency towards protonation in acidic solution (in our case 1.0 M HCl) [52]. Therefore, it is important to investigate the protonated forms of the imidazopyridine inhibitors. It is clear from the optimized structures of the investigated molecules in neutral forms that there are multiple possible sites for protonation. All the possible active sites for the protonation of optimization of structures were studied and it was found that the most probable one for C1 and C2 with lowest energy is the nitrogen atom (N7) with the highest negative charge.

The extent of protonation is provided by the proton affinity (PA) of the inhibitor which is estimated using the equation [60]:

$$PA={E_{{\text{prot}}}}+{E_{{{\text{H}}_2}{\text{O}}}} - \left( {{E_{{\text{non-prot}}}}+{E_{{{\text{H}}^{\text{+}}}}}} \right),$$
(13)

where \({E_{{\text{non-prot}}}}\) and \({E_{{\text{prot}}}}\) are the energies of the non-protonated and protonated inhibitors, respectively. \({E_{{{\text{H}}^{\text{+}}}}}\) is the energy of \({{\text{H}}^+}\) ion and was calculated as follows:

$${E_{{{\text{H}}^{\text{+}}}}}=E\left( {{{\text{H}}_3}{{\text{O}}^+}} \right) - E({{\text{H}}_2}{\text{O}}).$$
(14)

In order to select the most favorable one, optimization of all possible structures with different active centers for protonation was carried out and it was found that the most probable one with lowest energy upon protonation was the N atom with the highest negative charge [62]. A high value of PA indicates that the molecule has a high tendency to be protonated [63]. The calculated PA values (kcal mol−1) for C1 is 56.268 and 38.511 for C2, which indicates that C1 has the highest tendency for protonation in acidic media.

The quantum chemical calculation parameters such as EHOMO, ELUMO, ∆E, χ, σ, η, and ∆N derived for protonated form of C1 and C2 using 6-31G basic set are listed in Table 7. Similar to neutral form of the inhibitors, the lower value of ∆E for C1 compared to C2 indicates that C1 is more reactive and better corrosion inhibitor than C2. The values of global softness (σ) and hardness (η) also imply that C1 is a superior corrosion inhibitor compared to C2. This result validated our experimental finding that C1 is a superior corrosion inhibitor compared to C2 inhibitor. It was shown from the calculations that the highest coefficient in the HOMO level could be represented as a localization of charge density on N atom and delocalization of the π-charge on the ring moiety (N–C = N)→ \({\text{N}}_{ \cdots }^{ - }{\text{C}}_{ - }^{ \cdots }{\text{N}}\) which assists to greater extent in giving up its π electron density to the metal [64]. EHOMO for the non-protonated forms was higher than for the protonated forms, which indicate that the protonation process decreases the electron donating ability of the tested inhibitors (Table 7). The solvent effect produced small changes in the calculated quantum chemical parameters of the tested compounds. However, a slight increase is shown for dipole moment values, due to molecular polarization generated by the effect of solvent molecules interaction [65].

The Fukui indices for some atoms of studied molecules which present the most active sites have been calculated in gaseous and aqueous phases (Table 8). Fukui functions are a measurement of local reactivity as well as indicative of local nucleophilic or electrophilic feature in the molecules [66]. It can be seen from Table 8 that the calculated values of \(f_{{\text{k}}}^{+}\) for C1 are mostly localized on O16, N17, O19, and C1. On the other hand, O16, N17, C4, O19, and N7 are the most susceptible sites for the electrophilic attacks as they present the highest values of \(f_{{\text{k}}}^{ - }\). For C2 the largest values of \(f_{{\text{k}}}^{+}\) are located on the C9, N7, C4, C5, and C1 atoms, which further suggest that these atoms are responsible for forming a back bond by the acceptance of electron from the C-steel surface. However, the value of \(f_{{\text{k}}}^{ - }\) is highest on C4, C3, N7, C15, and C5. The results also show that O16, O19, and N7 atoms are suitable sites to undergo both nucleophilic and electrophilic attacks for C1 which are more responsible for donor–acceptor interactions and thus facilitate the adsorption of the inhibitor on the metal surface.

Table 8 Pertinent natural populations and Fukui functions of M1, M2, and M2 calculated at B3LYP/6-31G in gaseous (G) and aqueous phases (A)

4 Conclusion

Both studied compounds acted as good corrosion inhibitors for C-steel in 1.0 M hydrochloric acid solution and the inhibition efficiency (%) increased with increasing the inhibitor concentration to reach a maximum value of 96% for C1 and 92% for C2 at 1.0 × 10−3 M. The adsorption of the both organic molecules on the metal surface follows Langmuir adsorption isotherm. Potentiodynamic polarization study revealed that C1 and C2 acted as mixed type inhibitors with predominantly cathodic. EIS results showed that the imidazopyridine molecules inhibit carbon steel corrosion by their adsorption at the metal/acid interface due to an increase in thickness of the electrical double layer. SEM analyses further confirmed the protecting ability of the inhibitors molecules. The inhibitors adsorption on the metal surface is mixed type mechanism: physical adsorption resulting from the intermolecular force between the charged centers of molecules and the metal surface, which is relevant to the dipole of the inhibitors, and chemical adsorption resulting from the donation of π electron of imidazopyridine moiety and electron pairs of heteroatoms to the metal. The theoretical study using DFT calculations gave a good overview on the reactivity of the tested inhibitors towards C-steel and was in good agreement with the experimental results.