Introduction

Corrosion is a destructive phenomenon in the field of science and technology worldwide. It causes lot of failures in various industrial and non-industrial sectors like: damage of highways, bridges and buildings to oil and gas, chemical processing failure, failure of water and waste water systems. When the metal experiences damage due to corrosion, expensive maintenance and replacements are required for the safe and reliable use of materials. In the absence of immediate corrosion prevention, the material or tool undergoes operation failure. Thus, prevention of corrosion is most important.

Mild steel corrosion in acidic media is a subject of pronounced practical significance as this alloy has massive applications widely in the manufacturing, construction and petroleum industries. Acidic solutions are most commonly used in the removal of rust/scale developed in various industrial processes and because of the aggressiveness of these acidic solutions, mild steel corrodes exceedingly [1]. Therefore, the most economical way to minimize losses due to corrosion is the use of chemical inhibitors [2]. Chemical inhibitors play an important role in the protection and mitigation strategies for retarding corrosion [3].The most effective and efficient inhibitors are the organic compounds that have π-bonds, heteroatoms (P, S, N, and O) and inorganic compounds, such as chromate, dichromate and nitrite [4,5,6,7,8,9]. Many organic compounds such as ampicillin, methionine, schiff bases and phosphonium compounds have been investigated as corrosion inhibitors of mild steel in the sulfuric acid medium [10,11,12]. These organic inhibitors are adsorbed on metallic surfaces in order to slowdown the cathodic or anodic reactions causing dissolution of the metal by forming a barrier [13].

Pyrazine is a heterocyclic aromatic organic compound containing conjugated π-electrons and two nitrogen atoms, which induces a greater extent of adsorption of the inhibitor molecule onto the metal surface as compared to one nitrogen atom-containing heterocyclic compounds. Pyrazine and its derivatives are commercially available at low prices and can be easily synthesized in laboratories. These compounds have a large number of pharmaceutical applications, as these are efficient antioxidants and an essential component of some herbs in traditional Chinese medicines [14]. Pyrazine derivatives [15] are also the main components in perfumes [16]. Alkylpyrazines contribute to the taste and aroma of various foods including coffee and wines [17]. 2,5-Dimethylpyrazine and 2,6-dimethylpyrazine are used as flavor additives and odorants in foods such as cereals and products like cigarettes. 2,5-DMP occurs naturally in asparagus, black or green tea, crisp bread, malt, raw shrimp, soya, squid, Swiss cheeses and wheat bread [18].

The present investigation was carried out to evaluate and compare the corrosion inhibition behavior of 2,5-DMP and 2,6-DMP in 0.5 M sulfuric acid solution at various temperatures and concentrations. We can see that both inhibitors have given quiet high inhibition efficiencies, acting as protective barriers toward corrosion. As discussed, other unique feature of these inhibitors includes easy availability, cheap, sweet smelling, non-toxic unlike inhibitors that contain toxic sulfur and other heterocyclic atoms in their structure. Figure 1 depicts the molecular structures of the investigated inhibitors.

Fig. 1
figure 1

Molecular structure of the investigated inhibitors: (a) 2,5-dimethylpyrazine (2,5-DMP), (b) 2,6-dimethylpyrazine (2,6-DMP)

Experimental

Inhibitor and Solutions

Tha inhibitors 2,5-dimethylpyrazine and 2,6-dimethylpyrazine (Fig. 1) were obtained commercially from Alfa-Aesar chemicals with 99% purity (A.R.). The aggressive solution of 0.5 M sulfuric acid was prepared by dilution of A.R. grade sulfuric acid (Sp. Gr. 1.84) solution with deionized water. Inhibitor solutions were prepared in the range from 10−2 to 10−5 M concentrations by diluting the stock solution with 0.5 M H2SO4.

Preparation of Mild Steel Specimens

Mild steel specimens of size 4.0 cm × 1.0 cm × 1.0 cm were soldered from one end with an insulated commercial copper wire and gradually sealed with epoxy resin to give a flat two-dimensional active surface having dimensions 1.0 cm2 each. This was then exposed to test solutions during all the electrochemical experimentation. The at.% composition of the investigated mild steel specimen obtained from EDAX studies was C = 0.15%, Si = 0.08%, S = 0.02%, Mn = 1.02% and remainder Fe. The mild steel coupons were polished successively using different grades of emery papers, i.e., 100, 150, 320, 400, 600, 1000 and 2000. They were then degreased with acetone, rinsed with double distilled water and finally dried before each experiment.

Gravimetric Technique

Mild steel specimens of the dimension 1 cm  × 1 cm × 1 cm were prepared and were abraded with various grades of silicon carbide papers (100, 220, 400, 600 and 1000). The specimens were degreased with AR grade acetone and finally dried. After weighing, the specimens were immersed in 25 mL acid solution, in the highest concentration of the inhibitor and in the lowest concentration solution of the inhibitor, respectively. Weight loss for metal specimens was noted after 24 h.

Electrochemical Technique

A three-electrode assembly (250 mL) along with a platinum electrode as the counter electrode and a saturated calomel electrode (SCE) as the reference electrode was used in all electrochemical procedures. The SCE was attached into a bent luggin capillary tube which was filled with the test solution in order to prevent any contamination, since the components of saturated calomel electrode are filled in the compartment containing saturated KCl solution. Due to contact junctions of the half cells, there might occur leakage of certain ions like chloride into the external test solution and can affect the measurement. Thus, Luggin capillary filled with testing electrolyte is used to avoid any contamination by such ions. All potentials were reported in reference to the SCE. Prior to experimentation, the working electrodes with a 1 cm2 exposed area were mechanically abraded with different grades of emery paper ranging from 100 to 2000 and subsequently degreased with acetone after washing with double distilled water and finally cleaned in an ultrasonic cleaner. All the measurements were carried out in aerated non-stirred 0.5 M sulfuric acid solutions in the presence and absence of various concentrations of 2,5-DMP and 2,6-DMP at different temperatures (298, 308, 318 and 328 K). Each run was carried out in aerated static solution at the required temperature (± 1 °C), which was maintained using a water thermostat (Julabo-F34).

An electrochemical analyzer CHI 760C (CH Instruments, Inc., USA) was used to measure the potential and current of redox reactions. In potentiodynamic polarization studies, the potential of the working electrode versus SCE was measured. To achieve steady-state potentials, the three electrodes cell assembly was kept for 2 h in the water thermostat. The Tafel curves were obtained using this technique at a scan rate of 1.0 mV s−1. Resistance polarization (RP) values were also determined along with potentiodynamic polarization studies. All the impedance measurements were performed at an open-circuit potential (steady-state potential). Impedance measurements were carried out by using AC signals of amplitude 5 mV at the steady-state potential in the frequency range 100 kHz to 10 MHz. The Nyquist and the Bode’s plots were obtained from these measurements.

Morphological Studies

Mild steel (MS) coupons having dimensions 1 cm × 1 cm × 2 mm were used for surface characterization (EDAX) studies. Polished and pit-free metal specimens were dipped in 0.5 M H2SO4 and in the presence of 10−2 and 10−5 M concentration of 2,5-DMP and 2,6-DMP, respectively, to observe the extent of corrosion inhibition for 24 h. The test samples were then removed without touching the surface and dried under vacuum.

Elemental surface analysis of the specific area of the specimens was performed with an EDAX instrument (Jeol Japan, Model No. JSM-6610LV).

Theoretical Studies

A quantum chemical calculation is used to correlate the inhibition efficiency of the organic inhibitors and their molecular structures. The geometry of the inhibitor molecules was optimized by semiempirical AM1 (Austin model 1) method using hyper 8.0.6 quantum chemical package and various molecular parameters were correlated with corrosion parameters obtained from non-electrochemical and electrochemical techniques.

Results and Discussion

Gravimetric Measurements

The effect of pyrazine derivatives on corrosion rate was measured using the gravimetric technique. The corrosion rate reduces after addition of the investigated pyrazine derivatives and decreases with the inhibitor concentration due to an increase in adsorption coverage, which shields the mild steel surface efficiently from the aggressive medium. In the absence of inhibitor, the corrosion rate was 0.043 g cm−2 h−1. While in the presence of 10−2 M inhibitor, the corrosion rate values were reduced to 0.002 and 0.009 g cm−2 h−1 for 2,5-DMP and 2,6-DMP, respectively, as determined by Eq 1.

$${\text{C}}.{\text{R}}. \, \left( {{\text{acid}}\;{\text{or}}\;{\text{Inh}}.} \right)\, = \,\left( {W_{\text{final}}\, {-} \, W_{\text{initial}} } \right)/\left( {S\, \times \,t} \right)\, = \,W_{\text{loss}} /\left( {S\, \times \,t} \right)$$
(1)

where Winitial = initial weight of the coupon, Wfinal = final weight of the coupon, S = surface area of coupon = 1 cm2 and t = exposure time.

The percentage of inhibition efficiency (η) was calculated from following equation [19]:

$$\eta \, \% \, = \, \left[ {\left( {W_{\text{O}} {-} \, W} \right)/W_{\text{O}} } \right]\, \times \,100$$
(2)

where WO = weight loss of coupon in the presence of acid in grams, W = weight loss of coupon in the presence of inhibitor.

At any given inhibitor concentration, the corrosion rate follows the order: C.R. (2,5-DMP) < C.R. (2,6-DMP), which indicates that 2,5-DMP exhibits better inhibition efficiency as compared to 2,6-DMP. This could be due to the asymmetry in the 2,6-DMP molecule as compared to 2,5-DMP wherein methyl groups are symmetrically substituted with respect to nitrogen donor atoms [20]. Table 1 depicts the various gravimetric parameters obtained.

Table 1 Weight-loss measurements for 2,5-dimethylpyrazine (2,5-DMP) and 2,6-dimethylpyrazine (2,6-DMP) at 298 K

Electrochemical Measurements

Potentiodynamic Polarization and Linear Polarization Resistance Measurements

Polarization curves for the corrosion of mild steel in 0.5 M H2SO4 and in the presence of various concentrations of 2,5-dimethylpyrazine (2,5-DMP) and 2,6-dimethypyrazine (2,6-DMP) are shown in Figs. 2 and 3, respectively. The corrosion parameters obtained from Tafel extrapolation method at various temperatures are tabulated in Tables 2 and 3. The inhibition efficiencies were calculated using the following equation:

$${\text{Inhibition}}\;{\text{Efficiency}}\;\left( {\eta \% } \right)\, = \,\left[ {\left( {I_{\text{Acid}} - \, I_{\text{Inh}} } \right)/I_{\text{Acid}} } \right]\, \times \,100$$
(3)

where IAcid is corrosion current density in 0.5 M H2SO4 solution and IInh is the corrosion current density in the presence of 2,5-DMP or 2,6-DMP.

$$I_{\text{LPR}} \left( \% \right)\, = \,\left[ {\left( {R_{p} {-} \, R^{\prime }_{p} } \right)/R_{p} } \right]\, \times \,100$$
(4)

where RP and RP are the values of resistance polarization in the presence and absence of 2,5-DMP and 2,6-DMP.

Fig. 2
figure 2

Potentiodynamic polarization curve for MS in 0.5 M H2SO4 solution with various concentrations of 2,5-DMP at (a) 298 K (b) 308 K (c) 318 K and (d) 328 K

Fig. 3
figure 3

Potentiodynamic polarization curve for MS in 0.5 M H2SO4 solution with various concentrations of 2,6-DMP at (a) 298 K (b) 308 K (c) 318 K and (d) 328 K

Table 2 Potentiodynamic and linear polarization resistance parameters for mild steel in 0.5 M H2SO4 in the presence and absence of different concentrations of 2,5-DMP at different temperatures
Table 3 Potentiodynamic and linear polarization resistance parameters for mild steel in 0.5 M H2SO4 in the presence and absence of different concentrations of 2,6-DMP at different temperatures

Generally, if the value of Ecorr is greater than 85 mV, an inhibitor is characterized as anodic or cathodic in nature [21,22,23]. Since, here the maximum displacements in the corrosion potential values are 55 and 35 mV for 2,5-DMP and 2,6-DMP, respectively, a mixed-type behavior of inhibitor is indicated, affecting both anodic and cathodic reactions. The cathodic Tafel slopes remain almost constant for all the concentrations and temperatures indicating that 2,5-DMP and 2,6-DMP inhibit the corrosion of mild steel by blocking the active sites and not by altering the mechanism of cathodic reactions. Change in the values of the anodic Tafel slopes with the addition of the investigated inhibitors suggests that the inhibitor moiety was adsorbed onto the metal surface and impeded corrosion by merely blocking the reaction sites of the metal surface without affecting the anodic reaction mechanism. This also indicates that the absorption on the active sites of the MS surface is not only due to delocalized π-electrons of 2,5-DMP and 2,6-DMP but also due to the formation of (Fe–In–OH)ads or (Fe–In)ads types of complexes on the metal surface [24]. Both the inhibitors have high π-electron density which is the key reason behind the protection of the mild steel surface from corrosion reactions. Corrosion current density (Icorr) decreased with the increase in the concentration of the additive. The inhibition efficiency obtained for 2,5-DMP was higher as compared to 2,6-DMP due to the presence of two electron-donating methyl groups enhancing the electron density over the aromatic ring far apart from each other [25]. In the case of 2,6-DMP, the inhibition efficiency is lowered as compared to 2,5-DMP due to the steric hindrance caused between two methyl groups and a lone pair of electrons on nitrogen atoms [26].

Tables 2 and 3 also show the polarization resistance (Rp) parameter. On increasing the temperature, the value of inhibition efficiency calculated from Rp values for adsorbed inhibitor molecule decreases, as desorption process takes place [12]. Also, on increasing the concentration of organic inhibitors and decreasing the temperature of the system, the value of Rp increases as compared to the blank solution, causing higher resistance to the flow of current.

Electrochemical Impedance Spectroscopy (EIS)

EIS studies were carried out for mild steel specimens at 298 K in the presence and absence of the studied inhibitors in 0.5 M sulfuric acid. Various electrochemical impedance spectroscopic parameters were obtained from Nyquist and Bode’s plots for various concentrations of the investigated inhibitors at room temperature. These parameters were used to analyze the corrosion inhibition mechanism and the effect of concentration of the inhibitor on it.

The inhibition efficiency (ΘEIS) was calculated from the charge transfer resistance (Rct) values using the following equation [27]:

$${\text{I}} . {\text{E}}_{\text{EIS}} \% \, = \,\left[ {\left( {\frac{{R_{\text{ct}} - R_{\text{ct}}^{'} }}{{R_{\text{ct}} }}} \right)} \right]\, \times \,100$$
(5)

where Rct and Rct are the charge transfer resistances of the working electrode with and without inhibitors, respectively.

A semicircle in the complex plane, or Nyquist plots, shown in Fig. 4 for 2,5-DMP and 2,6-DMP, respectively, was obtained, indicating a charge transfer process occurring with charge transfer resistance (Rct) in parallel with the interfacial capacitance. A large semicircle loop of charge transfer resistance is associated with a slowly corroding system [28]. The various parameters are listed in Table 4 depicting the values of charge transfer resistance, Rct, capacitance values, Cdl and frequency maximum fmax. It can be clearly seen from Table 4 that the values of Rct decrease and Cdl (Eq 6) increase with increase in the concentration of both inhibitors.

Fig. 4
figure 4

Nyquist plots at 298 K for MS in 0.5 M H2SO4 solution with and without various concentrations of (a) 2,5-DMP and (b) 2,6-DMP

Table 4 Electrochemical parameters from EIS studies done on mild steel in 0.5 M H2SO4 in the presence and absence of 2,5-DMP and 2,6-DMP at room temperature
$$\left( {{\text{Double-Layer}}\;{\text{Capacitance}}} \right)\;C_{\text{dl}} = \frac{1}{{2\pi f_{ \hbox{max} } R_{\text{ct}} }}$$
(6)

The Helmholtz model equation [29] used to describe the capacitance behavior is given by:

$$C_{\text{dl}} = \frac{\varepsilon \varepsilon^\circ A}{{\delta_{\text{org}} }}$$
(7)

where \(\varepsilon\) is the dielectric constant of the medium, \(\varepsilon^\circ\) is the vacuum permittivity, A is the electrode surface area and \(\delta_{\text{org}}\) is the thickness of the protective layer.

From the Helmholtz model equation, it can be stated that the decrease in the double-layer capacitance decreases the local dielectric constant and increases the thickness of the double layer, suggesting that the inhibitor molecules inhibit corrosion by adsorption at the metal/solution interface [30].

Figure 5 illustrates the Bode’s plots at 298 K for various concentrations of 2,5-DMP and 2,6-DMP, respectively. Increase in absolute impedance, Zmod, at low frequencies in the Bode’s plot with an increase in 2,5-DMP and 2,6-DMP concentration indicates better adsorption and protection at higher inhibitor concentration [31]. The variation of phase angle with frequency for the mild steel in the presence and absence of 2,5-DMP and 2,6-DMP concentrations in 0.5 M H2SO4 solution indicates that with increasing concentration of both inhibitors in the test solution, the phase angle approaches 90° and electrochemical behavior becomes more capacitive, resulting in better inhibition due to the adsorption at the metal surface by more inhibitor molecules at higher concentrations [32].

Fig. 5
figure 5

Bode’s plots at 298 K for MS in 0.5 M H2SO4 solution with and without various concentrations of (a) 2,5-DMP and (b) 2,6-DMP

The inhibition efficiency calculated from EIS measurement indicates that: η%(2,5-DMP) > η%(2,6-DMP). This could be due to steric hindrance caused between two methyl groups and a lone pair of electrons on nitrogen atoms in 2,6-DMP [26].

Temperature Kinetics and Activation Parameters

In order to understand the interaction of 2,5-DMP and 2,6-DMP with MS surface, it is important to know the mode of adsorption and the type of adsorption isotherm being followed. There are six different adsorption isotherms (Langmuir, Temkin, Freundlich, Frumkin, El-Awady and Flory–Huggins) [33, 34] which were tested for their fit to the experimental data for the current investigation. The best-fit isotherm for adsorption of both inhibitors on mild steel surface was the Langmuir isotherm (with R2 ≈ 1) and is expressed mathematically as:

$$\frac{C}{\theta } = \frac{1}{{K_{\text{ads}} }} + C$$
(8)

where θ is the surface coverage degree, C is the concentration of inhibitor and Kads is the adsorptive equilibrium constant. All the parameters obtained are listed in Table 5.

Table 5 Thermodynamic parameters obtained for the adsorption of 2,5-DMP and 2,6-DMP on mild steel surface at varied temperatures

The value of Kads indicates that the inhibitor is strongly adsorbed on the metal surface leading to high adsorption ability of the inhibitor [35]. The negative values of ΔG°ads (Eq 9) indicate spontaneous adsorption of both inhibitors on the mild steel surface [36]. Generally, the ΔG°ads values of − 40 kJ/mol or more negative are related to the chemisorption, resulting from coordinate covalent bonds formed as result of charge sharing or transfer between the inhibitor molecules and the metal [37]. In the present investigation, ΔG°ads values are close to − 40 kJ/mol which indicated that the adsorption of both molecules on the mild steel surface is of comprehensive type, i.e., chemical and physical adsorptions both occurring with a predominance of chemisorption [38].

$$\Delta G_{\text{ads}} = - RT\ln \left( {K_{\text{ads}} \, \times \,55.5} \right)$$
(9)

In Eq 9, the value 55.5 is the concentration of water in solution in mol L−1.

The log Kads versus 1/T plots shown in Figs. 6 and 7 were used to obtain the change in entropy (∆S°ads) and the change in enthalpy (∆H°ads) involved in the adsorption process. The negative value of the heat of adsorption (Eq 10) indicates that the adsorption process is exothermic in nature [34]. Also, the value of entropy (Eq 10) is positive, i.e., 14.91 J K−1 mol−1 for 2,5-DMP. This is attributed to the substitution mechanism through replacement of water molecules at the surface by organic inhibitor increasing the solvent entropy and more positive water desorption entropy [39]. The negative sign of ΔS°ads for 2,6-DMP is attributed to decrease in entropy or randomness during the adsorption process, indicating an association of inhibitor molecule over the mild steel surface [40].

Fig. 6
figure 6

(a) Langmuir adsorption isotherm for MS in 0.5 M H2SO4 solution containing different concentrations of 2,5-DMP at various temperatures, (b) free energy (Log Kads vs. T−1) plot for adsorption of 2,5-DMP on MS surface and (c) Log(Icorr/T) against T−1 for MS in 0.5 M H2SO4 solution containing different concentrations of 2,5-DMP

Fig. 7
figure 7

(a) Langmuir adsorption isotherm for MS in 0.5 M H2SO4 solution containing different concentrations of 2,6-DMP at various temperatures, (b) free energy (Log Kads vs. T−1) plot for adsorption of 2,6-DMP on MS surface and (c) Log(Icorr/T) against T−1 for MS in 0.5 M H2SO4 solution containing different concentrations of 2,6-DMP

$$\log K_{\text{ads}} = \frac{{\Delta S_{\text{ads}}^{^\circ } }}{2.303R} - \frac{{\Delta H_{\text{ads}}^{^\circ } }}{2.303RT}$$
(10)

At higher concentrations, there are better chances of adsorption with more inhibitor molecules available, and at elevated temperatures the adsorption–desorption equilibria shifts to desorption side according to the Le-Chatlier principle [41].

The activation parameters for the corrosion process were calculated from Arrhenius plots. The plots for 2,5-DMP and 2,6-DMP are given in Figs. 6 and 7, respectively. Values of apparent activation energy of corrosion (Ea, Eq 11) for mild steel in 0.5 M H2SO4 in the absence and presence of various concentrations of both inhibitors were determined from the slope of log(Icorr) versus T−1 plots as shown in Table 6. The higher values of activation energy in the presence of the tested inhibitors imply that the molecules are behaving as an inhibitor for MS. Lower values of activation energy at lower concentrations are ascribed to chemisorption process, and higher values at higher concentrations are attributed to the physisorption process [42].

Table 6 Thermodynamic activation parameters for mild steel in 0.5 M H2SO4 with and without various concentrations of 2,5-DMP and 2,6-DMP
$$\log I_{\text{corr}} = \log A - \frac{{E_{\text{a}} }}{2.303RT}$$
(11)

where Ea is the apparent activation corrosion energy, R is the universal gas constant, A is the pre-exponential factor and T is the absolute temperature.

Also, it can be seen from Table 6 that Ea (inhibited solution) > Ea (uninhibited solution), indicating retardation in the corrosion rate as the activation barrier, increases with the introduction of 2,5-DMP and 2,6-DMP as inhibitors.

Morphological Studies

Energy-Dispersive X-ray Spectroscopy (EDAX)

EDAX images were recorded for polished mild steel surface (Fig. 8a), MS dipped in sulfuric acid (Fig. 8b) and in the presence of different concentrations (10−2 and 10−5 M) of 2,5-DMP (Fig. 9a and b) and 2,6-DMP (Fig. 10a and b).

Fig. 8
figure 8

EDAX spectra of (a) plain and polished mild steel surface and (b) mild steel surface immersed for 24 h in 0.5 M H2SO4 at 298 K

Fig. 9
figure 9

EDAX spectra of (a) mild steel surface in 10−2 M 2,5-DMP and (b) mild steel surface in 10−5 M 2,5-DMP for 24 h at 298 K

Fig. 10
figure 10

EDAX spectra of (a) mild steel surface in 10−2 M 2,6-DMP and (b) mild steel surface in 10−5 M 2,6-DMP for 24 h at 298 K

EDAX spectra (Figs. 9a, b and 10a, b) of an inhibited MS surface show more intensity of nitrogen because of the presence of nitrogen in both inhibitors. The thin layer formed on the mild steel surface contains carbon as well which accounts for the high value of its composition. The overall compositions of plain mild steel, mild steel treated with 0.5 M H2SO4 and MS samples dipped in different concentrations (10−2 and 10−5 M) of 2,5-DMP and 2,6-DMP are given in Table 7. It can be seen from Table 7 the atomic percentage of iron is least as compared to other studied pyrazine derivative. This could be due to the better formation of a barrier film over the surface of mild steel by the inhibitor molecule resulting in lowering of iron concentration on the surface and thus minimizing the rate of corrosion [43].

Table 7 Elemental composition (EDAX analysis) of plain mild steel surface and in 0.5 M H2SO4 with and without different concentrations of 2,5-DMP and 2,6-DMP

Quantum Chemical Calculations

Quantum chemical calculations for the investigated corrosion inhibitors were carried out using AM1 semiempirical molecular orbital method using HyperChem 8.0.6 professional software. The geometry of the studied molecules was optimized, and the calculations for molecular energies and various quantum parameters were conducted. The calculated properties via quantum chemical approach provide information about the reactivity of the molecules. The parameters obtained from the software are depicted in Table 8. It consists of the frontier orbital energies (EHOMO and ELUMO), the binding energy of the system, net atomic charges (calculated from the atomic orbital coefficients), dipole moment and atomic orbital electron populations.

Table 8 Quantum chemical parameters for the investigated inhibitors

According to Koopman’s theorem, the first ionization potential (I) and electron affinity (A) is related to the frontier orbital energies in the following manner [44]:

$$I\, = \, - \,E_{\text{HOMO}}$$
(12)
$$A\, = \, - \,E_{\text{LUMO}}$$
(13)

The higher the energy of HOMO of an inhibitor, the greater is the tendency of offering electrons to unoccupied d-orbital of the metal, and the higher the corrosion inhibition efficiency for iron in sulfuric acid solutions; in addition, the lower the LUMO energy, the higher is the affinity for accepting electrons from the metal surface. The energy gap (ΔE) for the studied inhibitors molecules is very small making the donation of electrons from the inhibitor molecule to the atoms on the surface of the metal very probable (i.e., soft–soft interaction) and thus increases the inhibition efficiency of the inhibitor increases through enhanced adsorption [45]. As it is evident from Table 8, the binding energy of the investigated pyrazine derivatives is negative which indicates that they are less prone to be split or broken apart [12]. Thus, the order of inhibition potential of studied inhibitors considering ΔE is 2,5-DMP > 2,6-DMP.

According to Pearson, the values of absolute electronegativity (χ) and the global hardness (η) of a chemical system are given by [46]:

$$\chi \, = \, \left( {I \, + \, A} \right)/2$$
(14)
$$\eta = \, \left( {I \, - A} \right)/2$$
(15)

Global softness (σ) is defined as the inverse of global hardness and is given by [47]:

$$\sigma \, = \, 1/ \, \eta$$
(16)

Global hardness and softness are related to the energy gap (ΔE) of a molecule because a hard molecule has a large energy gap while a soft molecule has a small energy gap implying that a soft molecule is more reactive than a hard molecule [45]. Both of these quantum parameters are related to inhibition efficiency. The inhibitor with the least value of global hardness (or the highest value of global softness) is expected to have the highest inhibition efficiency [48]. Thus, the order of inhibition ability according to hardness and softness values is 2,5-DMP > 2,6-DMP.

Electronic flow occurs from the atom of the lower χ value to the atom of the higher χm on contact between metal and inhibitor. This flow of electrons takes place until the chemical potentials become equal. The fraction of charge transferred (ΔN) is defined as:

$$\Delta N = \frac{{\chi {\text{M}} - \chi {\text{I}}}}{{2* \left( {\eta {\text{M}} + \eta {\text{I}}} \right)}}$$
(17)

where M and I represent the metal and inhibitor, respectively [49].

By using the values of I and A obtained from the quantum chemical calculations, the values of χ and η for the inhibitor were calculated. According to Pearsons electronegativity scale, χM is 7 eV/mol [50] and a global hardness ηM value is 0 eV/mol for Fe. By assuming that for a metallic bulk I = A, the fraction of electrons transferred (ΔN) from an inhibitor to the mild steel surface was calculated [51]. Since ΔN < 3.6, it can be inferred that the inhibition efficiency of these inhibitors would increase with increasing electron-donating ability at the metal surface [52].

Optimized structures shown in Figs. 11a and 12a signify that both the inhibitors have planar structure; and therefore, the adsorption of these pyrazine derivatives on mild steel surface is uniform [53]. The more negative the atomic charges of the active center, the more easily the atom donates its electrons to the metal’s unoccupied orbital showing a high degree of adsorption [51]. Figures 11b and 12b clearly depict that the negative charge is concentrated on the N atom and benzene ring, suggesting these to be the active sites for adsorption on the metal surface. Thus, the ionic reactivity can be estimated from the atomic charges in a molecule as electrophiles attack molecules at sites bearing negative charge [54,55,56,57,58,59]. The LUMO and the HOMO surfaces for the pyrazine derivatives are shown in Figs. 11c, 12c and 11d, 12d. HOMO and LUMO locations in the inhibitors are mostly distributed in the vicinity of the N atoms and in the aromatic carbons, indicating that the interaction between the metal surface and the inhibitor takes place over N atoms and the conjugated π electrons.

Fig. 11
figure 11

(a) Optimized structure of 2,5-dimethylpyrazine (2,5-DMP), (b) 3D iso-surface of total charge density on 2,5-DMP, (c) LUMO of 2,5-DMP and (d) HOMO of 2,5-DMP

Fig. 12
figure 12

(a) Optimized structure of 2,6-dimethylpyrazine (2,6-DMP), (b) 3D iso-surface of total charge density on 2,6-DMP, (c) LUMO of 2,6-DMP and (d) HOMO of 2,6-DMP

Conclusion

Both investigated organic compounds act as an efficient inhibitor for mild steel corrosion; they act as a mixed-type inhibitor with a slight cathodic character. The adsorption of 2,5-DMP and 2,6-DMP on MS is a spontaneous process and follows Langmuir’s isotherm for monolayer adsorption. The inhibition efficiency increases with the increase in the concentration of both the inhibitors. The inhibition efficiency for 2,5-DMP is higher than 2,6-DMP at all concentrations and temperatures. The inhibition mechanism involves synergistic adsorption of tested pyrazine molecules on the mild steel surface. The improvement in the morphology of the metal samples can be easily distinguished in SEM and AFM micrographs.