Introduction

Mild steel is widely used in many industrial applications. In most industrial processes, the acidic solutions are commonly used for the pickling, industrial acid cleaning, acid descaling, oil well acidifying, etc. [16]. Corrosion prevention systems favor the use of environmental chemicals with low or zero environmental impacts.

The decreasing corrosion rate of metals provides a saving of resources and economical benefits during the industrial applications as well as increasing the lifetime of equipments and also decreasing the dissolution of toxic metals from the components into the environment. The use of organic molecules as corrosion inhibitor is one of the most practical methods for protecting metals against the corrosion and it is becoming increasingly popular. The existing data show that organic inhibitors act by the adsorption and protect the metal by film formation. Organic compounds bearing heteroatoms with high electron density, such as phosphor, sulfur, nitrogen, oxygen or those containing multiple bonds which are considered as adsorption centers, are effective as corrosion inhibitor [719].

In this work, we aimed to synthesize and characterize new heterocyclic compounds to investigate their behavior as new inhibitors for the corrosion of mild steel in 1.0 M HCl solution using chemical and electrochemical techniques. In this context, the effects of the structural changes on the ability of these compounds to act as corrosion inhibitors by theoretical calculations were investigated.

Experimental

Materials and chemicals preparation

The mild steel specimens (0.045 % P; 0.3 % Si; 0.3 % Cr; 0.3–0.65 % Mn; 0.14–0.22 % C; 0.05 % S; 0.3 % Ni; 0.3 % Cu and the remainder Fe) were ground with different emery papers (grade 400, 600, 800, 1000 and 1200) in order to abrade the surface of mild steel from impurities and becomes more smoothing for investigation, rinsed with bidistilled water, degreased with acetone before use, dried and kept in a desiccator at room temperature. All chemicals and solvents used in this study were of analytical grade supplied by Aldrich or Merck and used as received.

The test solution (1.0 M HCl) was prepared by dilution of analytical grade 37 % HCl with doubly distilled water. Stock solutions (103 µM) of inhibitors were prepared by dissolving an accurately weighed quantity of each inhibitor in (100 ml) absolute ethanol, and then the required concentrations (2.0–8.0 µM) were prepared by dilution with doubly distilled water.

Synthesis and characterization of inhibitors

The synthetic strategies adopted to obtain the target compounds are depicted in Figs. 1 and 2. The starting material, 2-[(1,5-dimethyl-3-oxo-2-phenyl-2,3-dihydro-1H-pyrazol-4-yl)-hydrazono] malononitrile (2) [20], was prepared by diazo-coupling of 4-aminoantipyrine (1) with malononitrile in ethanolic sodium acetate solution at 0–5 °C. Compound (2) reacted with piperidine in refluxing ethanol to afford the corresponding 1:1 acyclic enaminonitrile adduct 3-amino-2-((1,5-dimethyl-3-oxo-2-phenyl-2,3-dihydro-1H-pyrazol-4-yl)diazenyl)-3-(piperidin-1-yl)acrylonitrile (3) [21], respectively. The formation of enaminonitrile (3) was illustrated through the initial addition of the secondary amines to cyano function to form the imino form followed by [1, 5] H migration to form the enamine form (Fig. 1).

Fig. 1
figure 1

Synthesis of acyclic enaminonitrile derivative (3)

Fig. 2
figure 2

Synthesis of antipyrinyl derivatives 4 and 5

On the other hand, cyclocondensation of enaminonitrile derivative (3) with 1-nitroso-2-naphthol in refluxing ethanol in the presence of a catalytic amount of TEA to yield antipyrinyl derivative 4-((5-Imino-3-(piperidin-1-yl)-5H-naphtho[2,1-b][1, 4, 5]oxadiazocin-4-yl)diazenyl)-1,5-dimethyl-2-phenyl-1H-pyrazol-3(2H)-one (4). In a similar manner, enaminonitrile derivative (3) underwent cycloaddition with salicyaldehyde in refluxing ethanol in the presence of a catalytic amount of TEA afforded antipyrinyl derivatives 4-((2-Imino-4-(piperidin-1-yl)-2H-benzo[b][1,5]oxazocin-3-yl)diazenyl)-1,5-di-methyl-2-phenyl-1H-pyrazol-3(2H)-one (5) (Fig. 2). The structure of (4) was confirmed on the basis of elemental analyses and spectral data. The IR spectra (Fig. 3a) showed the presence of (N=N) group at ν 1579 cm−1. The mass spectra showed the molecular ion peak at m/z 520 (M+, 3.7 %). The reaction proceeded initially via condensation of amino group of compound (3) with aldehyde group followed by the addition of hydroxyl group in the aldehyde derivatives to cyano function. The formation of derivative (5) is indicated by the presence of (C=N) groups in the IR spectra (Fig. 3b) at ν 1593 and 1614 cm−1, respectively, besides no bands of hydroxyl and cyano groups were observed. The mass spectra gave an additional evidence for structure formation in which the molecular ion peak appeared at m/z 387 (M+-piperidyl, 2 %).

Fig. 3
figure 3

a FTIR spectra of derivative (4). b FTIR spectra of derivative (5)

All melting points are recorded on Gallenkamp electric melting point apparatus. The FT-IR spectra υ cm−1 (KBr) were run on a Nicolet iS10 FT-IR spectrometer (Thermo, USA). The 13C-NMR and 1H-NMR spectra were run on Varian Spectrophotometer at 100 and 400 MHz, respectively, using tetramethylsilane (TMS) as an internal reference and using dimethylsulfoxide (DMSO-d 6) as solvent. The mass spectra (EI) were run at 70 eV with JEOL JMS600 equipment and/or a Varian MAT 311 A Spectrometer. Elemental analyses (C, H and N) were carried out at the Microanalytical Unit of Mansoura University, Egypt. The results were found to be in good agreement with the calculated values.

Weight loss measurements

The mild steel five specimens of (2.0 cm × 2.0 cm × 0.1 cm) dimensions were abraded with different grades of emery papers, washed with distilled water, degreased with acetone, dried at room temperature and kept in a desiccator. After weighing accurately by a digital balance with sensitivity of ±0.1 mg, the specimens were immersed in solution containing 1.0 M HCl solution with and without various concentrations of inhibitors. After 6.0 h exposure, the specimens were taken out rinsed thoroughly with distilled water, dried and weighted accurately again. The average weight loss (W) in g was calculated using the following equation:

$$ \,W = W_{1} {-}W_{2} $$
(1)

where W 1 and W 2 are the average weight of specimens before and after exposure, respectively. The corrosion rate, v (mm year−1), was calculated using the equation:

$$ v = 87{,}600 \times \left( {W/S \times d \times t} \right) $$
(2)

where W is the average weight loss (g), S is the surface area of specimens (cm2), d is the density of iron (7.87 g cm−3) and t is the exposure time (h).

Electrochemical measurements

Electrochemical experiments performed in a conventional three-electrode cell consisting of “a mild steel as working electrode (WE) with exposure surface of 1.0 cm2, a 1.5 cm × 1.5 cm platinum as counter electrode (CE) and a saturated calomel electrode (SCE) as reference electrode (RE)” were used for measurements. The electrochemical experiments were performed using a Gamry PCI4G750 Potentiostat/Galvanostat/ZRA analyzer, with a Gamry framework system based on ESA400. Gamry applications include dc 105 corrosion software for potentiodynamic polarization measurements, EIS300 software for EIS measurements and Echem Analyst 5.5 software for results plotting, graphing, data fitting and calculating. A computer was used for collecting data.

In the case of potentiodynamic polarization curves, the potential sweep rate was 0.5 mV/s, and the scan potential range was changed automatically from −300 to 300 mV versus open circuit potential (E corr).

The electrochemical impedance spectroscopy (EIS) measurements were carried out at E corr. After the determination of steady-state current at a given potential, sine wave voltages (10 mV), peak to peak, were applied at frequencies between 100 kHz and 10 mHz.

Prior to every experiment, the surface area of mild steel electrode exposed to the solution containing 1.0 M HCl solution with and without various concentrations of inhibitors was abraded, washed by distilled water, degreased with acetone and dried at room temperature as described in weight loss measurements.

Theoretical calculations

Quantum chemical calculations have been widely used to study the reaction mechanisms and to interpret the experimental results as well as to resolve chemical ambiguities. All the calculations were performed using DMol 3 program [22] in Materials Studio package [23], which is designed for the realization of large-scale density functional theory (DFT) calculations. DFT semi-core pseudopods calculations (dspp) were performed with the double numerical basis sets plus polarization functional (DNP). This computational method has been proven to yield satisfactory results. The easiest way to compare the inhibition efficiency of inhibitor is to analyze the energies of the highest occupied molecular orbital (HOMO) and the lowest unoccupied molecular orbital (LUMO). DMol 3 includes certain COSMO1 [24] controls, which allow for the treatment of solvation effects, so the quantum calculations in aqueous medium were taken.

Results and discussion

Weight loss measurements

Based on weight loss measurements, the weight loss (W), the corrosion rate (v) and the values of inhibition efficiency (P%) for various concentrations of inhibitors after 6.0 h of immersion of mild steel in 1.0 M HCl solution at 298 K are expressed in percentage and given in Table 1.

Table 1 The data obtained from weight loss measurements for mild steel in 1.0 M HCl solutions in the absence and presence of different concentrations of antipyrinyl derivatives at 25 ± 1 °C

The inhibition efficiencies (P%) and surface coverages (θ) were calculated using the following equation:

$$ P\% = \theta \times 100 = [1 - \left( {v_{2} /v_{1} } \right)] \times 100 $$
(3)

where v 1 and v 2 are corrosion rates in the absence and presence of inhibitor.

It can be seen from Table 1 that the addition of inhibitor concentrations to the aggressive solution reduces the corrosion rate of mild steel, and hence the inhibition efficiency (P%) increased, suggesting that the inhibitor molecules act by adsorption on the metal surface.

The ranking of the synthesized antipyrinyl derivatives according to their inhibition efficiencies is in the following sequence: (4) > (5).

In our work, the inhibition efficiency (P%) obtained from weight loss measurements was found to be (87.5 %). Popova et al. [25] found that the (P%) of quaternary ammonium bromides of N-containing heterocycles for mild steel corrosion in 1.0 M HCl is (88.8 %), and Solmaza et al. [26] found that the (P%) of 2-((5-mercapto-1,3,4-thiadiazol-2-ylimino) methyl)phenol for mild steel corrosion in 0.5 M HCl is (85.7 %).

Potentiodynamic polarization measurements

The potentiodynamic polarization curves of mild steel in 1.0 M HCl solution in the absence and presence of various concentrations of antipyrinyl derivatives at 25 ± 1 °C are shown in Fig. 4a, b. Our measured free corrosion potential was found to be (−437 mV) for mild steel in 1.0 M HCl. Solmaza et al. [27] found that the free corrosion potential for mild steel in 0.5 M HCl is (−460 mV), Singh et al. [28] found the free corrosion potential for mild steel in 1.0 M HCl is (−472 mV) and Mahdavian and Ashhari [29] found it to be (−479 mV) for mild steel in 1.0 M HCl. From these results, one can conclude that, the free corrosion potential depends on both the composition of the electrode and the concentration of electrolyte used.

Fig. 4
figure 4

Potentiodynamic polarization curves for the corrosion of mild steel in 1.0 M HCl in the absence and presence of various concentrations of antipyrinyl derivatives at 25 ± 1 °C

The values of related electrochemical parameters, i.e., corrosion potential (E corr), corrosion current density (i corr), cathodic Tafel slope (β c), anodic Tafel slope (β a), corrosion rate v (mm year−1) and inhibition efficiency (P%) were calculated from the related polarization curves and are given in Table 2. The inhibition efficiency (P%) and (θ) was calculated from polarization measurements according to the equation given below:

$$ P\% = \theta \times 100 = \left[ {1{-}\left( {i_{\text{corr}} / \, i_{\text{corr}}^{*} } \right)} \right] \times 100 $$
(4)

where \( i_{\text{corr}}^{*} \) and i corr are the uninhibited and the inhibited corrosion current densities, respectively.

Table 2 Electrochemical parameters obtained from potentiodynamic polarization measurements for mild steel in 1.0 M of HCl in the absence and presence of different concentrations of antipyrinyl derivatives at 25 ± 1 °C

Corrosion current densities were obtained by the extrapolation of the current–potential lines to the corresponding corrosion potentials. Here in, the corrosion rates were calculated assuming that the whole surface of mild steel is attacked by corrosion and no local corrosion is observed. The corrosion rates v (mm year−1) from polarization were calculated using the following Eq. [30]:

$$ v = 10 \times \left( {i_{\text{corr}} \times M \times t/F \times S \times d} \right) $$
(5)

where M is the molar mass of iron (g mol−1), and F is Faraday constant.

As results obtained from Fig. 3a, b, the addition of inhibitors to the corrosive solution both reduces anodic dissolution of mild steel and also retards cathodic hydrogen evolution reactions as would be expected. The corrosion current density as well as corrosion rate of mild steel is considerably reduced in the presence of the inhibitors. These results are indicative of the adsorption of inhibitors molecules on the mild steel surface.

The inhibition of both anodic and cathodic reactions is more and more pronounced with the increasing inhibitors concentration while the corrosion potential nearly remained the same in comparison with corrosion potential observed in blank solution. These results suggest that inhibitors can be classified as the mixed-type corrosion inhibitors, but it is more polarized to anodic site when an external current was applied [31]. The data in Table 2 indicate that the i corr decreases and the inhibition efficiency (P%) increases as the concentration of the inhibitor increases. In fact the slopes of the cathodic (β c) and anodic (β a) Tafel lines (Table 2) are slightly changed upon addition of the inhibitors indicating that inhibitors act by simply blocking the available surface area [32].

The ranking of antipyrinyl derivatives remains unchanged; it is as follows: (4) > (5). This is also in agreement with the observed order of corrosion inhibition obtained from weight loss measurements.

Electrochemical impedance spectroscopy measurements

Impedance spectra for mild steel in 1.0 M HCl in the absence and presence of different concentrations of antipyrinyl derivatives at 25 ± 1 °C are shown in the Nyquist plots (Fig. 5a, b). Clearly, the Nyquist plots indicate that the impedance behavior of mild steel is significantly changed after addition of inhibitor. Nyquist plots consist of a semicircle with one capacitive loop; and the semicircle has a center under the real axis. Such behavior is characteristic for solid electrodes and is often referred to as frequency dispersion. It is attributed to roughness and other in homogeneities of solid surface [3335]. The diameters of the capacitive loop obtained increase in the presence of inhibitor and are indicative of the degree of inhibition of the corrosion process. The impedance spectra for Nyquist plots were analyzed by fitting to the equivalent circuit model [32, 36], which was used to describe an iron/acid interface given in Fig. 6. The charge transfer resistance (R ct) values are calculated from the difference in impedance at lower and higher frequencies. To obtain the double-layer capacitance (C dl), the frequency at which the imaginary component of the impedance is maximal (−Z max) is found using the following equation:

$$ C_{\text{dl}} = \left( {1/2\pi f_{ \hbox{max} } R_{\text{ct}} } \right) $$
(6)

where f max is the frequency at the maximum in the Nyquist plot, R ct is the charge transfer resistance value, and C dl is the double-layer capacitance.

Fig. 5
figure 5

Nyquist plots for mild steel electrode immersion in 1.0 M HCl solutions without and with various concentrations of antipyrinyl derivatives at 25 ± 1 °C

Fig. 6
figure 6

Equivalent circuit model used to fit the impedance spectra (R s = solution resistance, R ct = charge transfer resistance, and C dl = double-layer capacitance)

The inhibition efficiency (P%) and (θ) obtained from the charge transfer resistance was calculated by the following equation:

$$ P\% = \theta \times 100 = \left[ {1{-} \, \left( {R_{\text{ct}} /R^{*}_{\text{ct}} } \right)} \right] \times 100 $$
(7)

where \( R_{\text{ct}}^{*} \) and R ct are the charge transfer resistance values with and without inhibitor, respectively. The data are collected in Table 3. The results demonstrated that the charge transfer (R ct) values increased and the double-layer capacitance (C dl) values decreased with an increase in inhibitor concentration. The increase in the (R ct) values with inhibitor concentration indicates an increase in the surface coverage by the inhibitor molecules, resulting in an increase in inhibitor efficiency [37]. The decrease in (C dl) values, which can result from a decrease in the local dielectric constant and/or an increase in the thickness of the electrical double layer, suggests that the inhibitors act by adsorption at the metal solution/interface [38]. The EIS results confirm the results obtained from weight loss and potentiodynamic polarization measurements that the inhibition efficiency (P%) of the synthesized antipyrinyl derivatives is in the same sequence as follows: (4) > (5).

Table 3 Electrochemical parameters obtained from EIS measurements for mild steel in 1.0 M HCl in the absence and presence of different concentrations of antipyrinyl derivatives at 25 ± 1 °C

Effect of temperature and activation energy

The effect of temperature on the inhibited acid–metal reaction is highly complex because many changes occur on the metal surface such as rapid etching and inhibitor, desorption and decomposition and/or rearrangement [39]. To evaluate the adsorption of inhibitors and activation parameters of the corrosion processes of mild steel surface in acidic media, the weight loss parameters were investigated in the absence and presence of inhibitors at temperature range of 298–328 K. The relationship between the corrosion rate of mild steel in acidic media and temperature is often expressed by the Arrhenius equation:

$$ v_{\text{corr}} = A\;\exp \left( { - E_{\text{a}}^{*} /{\text{RT}}} \right) $$
(8)

where v corr is corrosion rate, A is the constant, \( E_{\text{a}}^{*} \) is the activation energy of the metal dissolution reaction, R is the gas constant and T is the absolute temperature. The \( E_{\text{a}}^{*} \) values can be determined from the slop of Arrhenius plots (log v corr versus 1/T) as shown in Fig. 7. Calculated \( E_{\text{a}}^{*} \) values, corrosion rate and inhibition efficiencies are listed in Table 4. As seen in Table 4, \( E_{\text{a}}^{*} \) in the inhibited solution is higher than that obtained for the free acid solution indicating that the corrosion reaction of mild steel is inhibited by inhibitors and hence supports the phenomenon of physical adsorption [40, 41]. Higher values of \( E_{\text{a}}^{*} \) in the presence of inhibitor can be correlated with increasing thickness of the double layer which enhances the \( E_{\text{a}}^{*} \) of the corrosion process [42]. It is also an indication of a strong inhibitive action of inhibitors by increasing energy barrier for the corrosion process, emphasizing the electrostatic character of the inhibitor’s adsorption on the mild steel surface (physisorption) [43].

Table 4 Corrosion rate, inhibition efficiency and activation energy values of the dissolution of mild steel in 1.0 M HCl in the absence and presence of 8.0 µM of antipyrinyl derivatives at different temperatures
Fig. 7
figure 7

Log corrosion rate (mm year−1) versus 1/T curves for mild steel dissolution in 1.0 M HCl in the absence and presence of 8.0 µM of antipyrinyl derivatives

Adsorption isotherm and thermodynamic parameters

The action of an inhibitor in aggressive acid media is assumed to be due to its adsorption at the metal/solution interface. The adsorption process depends on the electronic characteristics of the inhibitor, the nature of metal surface, temperature, steric effects and the varying degrees of surface-site activity [44]. In fact, the solvent H2O molecules could also be adsorbed at the metal/solution interface. Therefore, the adsorption of organic inhibitor molecules from the aqueous solution can be considered as a quasi-substitution process between the organic compounds in the aqueous phase Org(sol) and water molecules at the electrode surface H2O(ads) [45]:

$$ {\text{Org}}_{{({\text{sol}})}} + x\;{\text{H}}_{2} {\text{O}}_{{({\text{ads}})}} \leftrightarrow {\text{Org}}_{{({\text{adsl}})}} + x\;{\text{H}}_{2} {\text{O}}_{{ ( {\text{sol)}}}} $$
(9)

where x is the size ratio, that is, the number of water molecules replaced by one organic inhibitor. The type of the adsorption isotherm can provide additional information about the properties of the tested compounds. To obtain the adsorption isotherm, the degree of surface coverage [θ = (P/100)] of the inhibitor must be calculated. In this study, the degree of surface coverage values (θ) for various concentrations of the inhibitors in acidic media has been evaluated from the potentiodynamic polarization measurements. Attempts were made to fit the (θ) values to various isotherms, including Langmuir, Temkin, Frumkin and Flory–Huggins. By far, the best fit is obtained with the Langmuir isotherm. Langmuir adsorption isotherm is described by the following equations:

$$ C_{\text{inh}} /\theta = 1/K_{\text{ads}} + C_{\text{inh}} $$
(10)

where C inh is the inhibitor concentration, K ads is the adsorption equilibrium constant and θ is the surface coverage. Figure 8 shows the plots of C inh versus C inh and the expected linear relationship is obtained for inhibitors. The strong correlations (R 2 = 0.999) confirm the validity of this approach. The slop of the straight lines equal the unity, suggesting that the adsorbed inhibitor molecules form monolayer on the mild steel surface and there is no interaction among the adsorbed inhibitor molecules [46]. On the other hand, the intercept of straight lines equal to the reciprocal of equilibrium constant (1/K ads), the relatively high values of 1/K ads (Table 5), reflects the high adsorption ability of inhibitors on mild steel surface [47, 48]. The standard free energy of adsorption (\( \Delta G_{\text{ads}}^{o} \)) can be given as the following equation:

$$ K_{\text{ads}} = \left( {1/55.5} \right)\exp \left( { - \Delta G_{\text{ads}}^{o} /{\text{RT}}} \right) $$
(11)

where the value 55.5 is the concentration of water in solution expressed in Molar [49]. The \( \Delta G_{\text{ads}}^{o} \) values are calculated and listed in Table 5.

Table 5 Thermodynamic parameters for the adsorption of antipyrinyl derivatives on the mild steel in 1.0 M HCl
Fig. 8
figure 8

Adsorption isotherm curves for the adsorption of antipyrinyl derivatives on mild steel in 1.0 M HCl at 25 ± 1 °C

The negative values of \( \Delta G_{\text{ads}}^{o} \) indicated that the adsorption of inhibitor molecule is a spontaneous process. Generally, it is well known that values of \( \Delta G_{\text{ads}}^{o} \) are of the order of −20 kJ mol−1 or lower indicating the electrostatic interaction between the charged molecules and the charged metal (physical adsorption); those of order of −40 kJ mol−1 or higher involve sharing or transfer of electrons from the inhibitor molecules to the metal surface to form a co-ordinate type of bond (chemisorption) [50]. In our experiment, the value of \( \Delta G_{\text{ads}}^{o} \) is −46.7 kJ mol−1, indicating that the adsorption mechanism of the inhibitors on mild steel in 1.0 M HCl solution is neither typical physisorption nor typical chemisorption but it is complex mixed type and electrostatic interaction (physisorption) is predominant [5153].

Another form of Langmuir equation is written as below:

$$ \theta /1 - \theta = AC \, \exp \left( { - \Delta H_{\text{ads}}^{o} /{\text{RT}}} \right) $$
(12)

where A is the independent constant, C is the inhibitor concentration, \( \Delta H_{\text{ads}}^{o} \) is the standard heat of adsorption, and θ is the surface coverage by the inhibitor molecules. The log [θ/(1 − θ)] versus 1/T at the optimum concentration of inhibitors is plotted (Fig. 9). The slopes of the linear part of the plot are equal to \( {{ - \Delta H_{\text{ads}}^{o} } \mathord{\left/ {\vphantom {{ - \Delta H_{\text{ads}}^{o} } R}} \right. \kern-0pt} R} \), from which the heat of adsorption (\( \Delta H_{\text{ads}}^{o} \)) values was calculated and listed in Table 5. The negative value of (\( \Delta H_{\text{ads}}^{o} \)) indicates that the adsorption of inhibitors is an exothermic process, which suggests that inhibition efficiency decreases with the increase in temperature [54]. Such behavior can also be interpreted on the basis that the increase in temperature resulted in desorption of some adsorbed inhibitor molecules from the steel surface. Standard adsorption entropy (\( \Delta S_{\text{ads}}^{o} \)) is calculated from the below equation:

$$ \Delta G_{\text{ads}}^{o} = \Delta H_{\text{ads}}^{o} - T\Delta S_{\text{ads}}^{o} $$
(13)
Fig. 9
figure 9

Log [θ/(1 − θ)] versus 1/T at the optimum concentration (8.0 µM) of inhibitors for corrosion of mild steel in 1.0 M HCl solution

From the Eq. (13), the value of \( \Delta S_{\text{ads}}^{o} \) was calculated and listed in Table 5. The value of \( \Delta S_{\text{ads}}^{o} \) is negative, which implies that a decrease in disordering takes place on going from reactants to the metal adsorbed species reaction complex [55].

Prediction of theoretical parameters

According to the DFT, the reactive ability of the inhibitor is related with the frontier molecular orbitals (MO) that are the HOMO and the LUMO [56]. Higher HOMO energy (E HOMO) of the adsorbent leads to higher electron donating ability [57]. Low LUMO energy (E LUMO) indicates that the acceptor accepts electrons easily.

The energy of the highest occupied molecular orbital (E HOMO), energy of the lowest unoccupied molecular orbital (E LUMO) and energy gap (∆E L–H) between LUMO and HOMO were determined by optimization. The optimized molecular structures, the HOMO and LUMO electronic density distributions of these inhibitors are shown in Fig. 10. For the HOMO of the studied compounds, it can be observed that the benzene rings, –C, N– and O–, have a large electron density.

Fig. 10
figure 10

Optimized molecular structures, highest occupied molecular orbital (HOMO) and lowest occupied molecular orbital (LUMO) for antipyrinyl derivatives

The calculated quantum chemical parameters are given in Table 6. The HOMO and LUMO energies are correlated with percent inhibition efficiencies (P%). The percent inhibition efficiencies (P%) increase if the molecules have higher HOMO energies and lower LUMO energies [58]. The percent inhibition efficiency (P%) increased with decrease in energy gap (∆E L–H). The values for E HOMO, E LUMO and ∆E L–H (Table 6) show that inhibitor (4) has a somewhat more ability to act as corrosion inhibitor than inhibitor (5). The data presented in Table 6 show that the calculated dipole moment (µ) for inhibitor (4) has the highest dipolar moment than (5) and, consequently, the reactivity of the molecule on the surface is hugely facilitated [59].

Table 6 Theoretical parameters calculated at DFT level for antipyrinyl derivatives

Mechanism of inhibition

The first stage in the mechanism of inhibition in acid media is adsorption on the metal surface [60]. In most inhibition studies, the formation of a donor acceptor surface complex between π-electrons of the inhibitor and the vacant d-orbitals of the metal is postulated [6163]. Inhibitor has many N-, O-atoms and aromatic rings. In aqueous acidic solutions, the inhibitor is either neutral or in the form of cations (i.e., protonated species). In general, two modes of adsorption may be considered. The neutral form of the inhibitor may adsorb on the metal surface via the chemisorption mechanism involving the displacement of water molecules from the metal surface and the sharing electrons between N- and O-atoms and Fe and/or between π-electrons of the aromatic ring and the vacant d-orbitals of Fe. On the other hand, it is well known that the mild steel surface is positively charged in the acidic media [64]. Therefore, it is difficult for a protonated inhibitor to adsorb on the positively charged steel surface due to electrostatic repulsion. Since chloride ions (Cl) have a smaller degree of hydration, being specifically adsorbed, they create an excess negative charge toward the solution and favor more adsorption of the protonated inhibitor. In other words, there may be a synergism between Cl and the inhibitor, which improves the inhibitive capability of the inhibitor. When the protonated inhibitor is adsorbed on the metal surface, the following may be happened: (1) formation of a coordinate bond due to the partial transfer of electron from N- and O-atoms to the metal surface and (2) the protonated inhibitor may combine with freshly generated Fe2+ ions on the mild steel surface to form a metal-inhibitor complex [Inhz–Fe](2+z)+ [65]. This complex may become adsorbed onto the steel surface by Van der Waals forces to form a protective film, thereby preventing corrosion. The film covers both the anodic and cathodic reactive sites on the steel surface, and inhibits both reactions at the same time.

The difference in the inhibition efficiencies (P%) between inhibitor (4) and (5) can be explained on the basis of heteroatoms with high electron density (O and N) which are considered as adsorption active sites, in addition to π-electrons of the aromatic ring. It is clear that inhibitor (4) exhibits excellent (P%) due to bearing (2O, 8 N and two aromatic benzene rings), so it is more adsorbed on the surface of metal giving more inhibition efficiency. On the contrary, inhibitor (5) comes after inhibitor (4) in (P%) because it has (2O, 7 N and one aromatic benzene ring) only.

Conclusions

The corrosion rates and inhibition efficiencies of mild steel were monitored and controlled in 1.0 M HCl solutions at different temperatures without and with various concentrations of new synthesized antipyrinyl derivatives. Chemical (weight loss) and electrochemical (potentiodynamic polarization and impedance) methods were employed in the present work. The principle conclusions are: (1) The inhibition efficiency increases with the increase in inhibitor concentration, while it decreases with temperature, suggesting the occurrence of physical adsorption. (2) Potentiodynamic polarization plots indicated that the tested synthesized antipyrinyl derivatives act as mixed-type inhibitors. (3) Langmuir adsorption isotherm exhibited the best fit to the experimental data with \( - \Delta G_{\text{ads}}^{o} \) of 46.7 and 46.6 kJ mol−1 for compounds 4 and 5, respectively, which indicate that the adsorption mechanism of the inhibitors on mild steel in 1.0 M HCl solution is neither typical physisorption nor typical chemisorption but it is complex mixed type and electrostatic interaction (physisorption) is predominant. (4) The high value of K ads suggested that antipyrinyl derivatives molecules strongly adsorb on the mild steel surface. (5) Apparent activation energies (\( E_{\text{a}}^{*} \)) in the presence of these inhibitors are higher than those in HCl solution. (6) Through DFT quantum chemical calculations, a correlation between parameters related to the electronic structure of antipyrinyl derivatives and their ability to inhibit the corrosion process could be established. The calculated energy gaps show reasonably good correlation with the efficiency of corrosion inhibition.