1 Introduction

Iron and its alloys hold a prime position as construction materials, owing to their high thermal stability and excellent mechanical properties, especially high tensile strength, in addition to easy fabrication techniques and low cost. Mild steel is an iron–carbon alloy containing relatively low (0.25%) carbon content, which makes it more ductile and malleable in addition to its impact strength. In comparison with the expensive corrosion-resistant alloys, mild steels are extensively used as a major material for construction in offshore engineering, mining, chemical and petrochemical industries due to the cost-effective option [1, 2]. However, these alloys exhibit poor resistance to corrosion on exposure to acidic environments, such as chemical process plants, matrix acidizing, acid washing, pickling, etc., which involves the usage of mainly mineral acids like hydrochloric and sulphuric acids [3]. Under such conditions the presence of chlorides and other anions in the medium accelerates the rate of dissolution of mild steel and can lead to severe corrosion [4]. Although various methods are available to minimize or combat corrosion, the use of inhibitors is usually employed for protecting the metals from undergoing corrosion, particularly in a closed system.

The efficiency of a corrosion inhibitor relies on the presence of characteristic structural features such as (i) the nature of functional groups, (ii) aromatic rings, (iii) donor heteroatoms such as N, O and S, (iv) molecular planarity, (v) electron distribution and (vi) steric factors [5, 6]. Literature evidences suggest the use of many organic compounds carrying heteroatoms as effective inhibitors for the corrosion control of mild steel in an acidic environment [7, 8].

The widespread biological applications of hydrazides and their condensation products, including antibacterial, tuberculostatic properties, antifungal and many more, makes them a potential class of organic compounds [9, 10]. The chemistry of –C\(=\)N– group of hydrazides is becoming the backbone of condensation reaction in benzo-fused heterocycle [11] and also it constitutes an important class of compounds for developing new drugs [12]. We reported the potency of aromatic hydrazides derivatives as efficient corrosion inhibitors for mild steel [13,14,15]. In continuation of our work on developing potential corrosion inhibitors, \(N'\)-[(4-methyl-1H-imidazole-5-yl)methylidene]-2-(naphthalen-2-yloxy)acetohydrazide (IMNH) has been synthesized and its anticorrosion behaviour on mild steel evaluated by potentiodynamic polarization (PDP) and electrochemical impedance spectroscopy (EIS) techniques. Atomic force microscopy (AFM) and scanning electron microscopy (SEM) analyses were used to confirm the adsorption of studied inhibitor. In addition, theoretical approach was used to correlate the electronic environment of IMNH with its inhibition efficiency.

2 Experimental

2.1 Material and medium

The experiment was performed using mild steel material with chemical composition (wt%): C (0.15), Si (0.15), Mn (0.49), P (0.05), S (0.062), Cr (0.05) and remaining Fe. The cylindrical test coupon of mild steel sealed with cold setting resin having 0.95 \(\hbox {cm}^{2}\) open surface area was prepared and polished with different grade emery papers. Further polishing was done using a disc polisher with levigated alumina. The specimen was washed with distilled water, and dried before immersing into the corrosive medium. Hydrochloric acid of 1 M concentration was prepared by diluting a known volume of 37% AR grade hydrochloric acid and used as the medium.

2.2 Synthesis and characterization of IMNH

An equimolar mixture (0.01 mol each) of naphthalene-2-ol and ethyl chloroacetate was refluxed in a minimum quantity of acetone with 0.015 mol of potassium carbonate for 18 h. The reaction mixture was cooled, filtered and poured into ice cold water, and then extracted using diethyl ether. The organic layer was separated and dried over anhydrous sodium sulphate to obtain the ester. Later, 0.01 mol of the ester was refluxed with hydrazine hydrate (1.2 mol) for 10 h. This reaction mixture was cooled to yield the respective hydrazide, which was then filtered and dried. Equimolar mixture of hydrazide and imidazole aldehyde was allowed to condense in ethanolic media for 12 h with a catalytic amount of glacial acetic acid. The reaction mixture was poured into crushed ice; the solid product obtained was filtered and dried, and ethanol was used for recrystallization. The synthesized inhibitor compound was characterized using an FTIR spectrophotometer (Schimadzu FTIR 8400S) in the frequency range of 4000–400 \(\hbox {cm}^{-1}\) with KBr pellets and NMR spectrophotometer (Bruker 400 MHz). FTIR and \(^{1}\)H NMR spectra of IMNH are shown in figures 1 and 2, respectively. The synthesis route for the preparation of IMNH is given in scheme 1.

2.3 Electrochemical measurements

The corrosion behaviour of mild steel in the absence and presence of inhibitor was studied using an electrochemical work station (CH600 D-series, U.S. model with CH instrument beta software). The electrochemical cell used was a conventional three-electrode Pyrex glass vessel containing platinum as the counter-electrode, saturated calomel electrode (SCE) as the reference electrode and mild steel specimen as working electrode. The experiments were conducted by exposing the mild steel sample to the corrosive solution in the absence and presence of inhibitor at different temperatures (30–60\(^{\circ }\hbox {C}\) with \(\pm 0.5^{\circ }\hbox {C}\)) using a calibrated thermostat.

Fig. 1
figure 1

FTIR spectrum of IMNH.

Fig. 2
figure 2

\(^{1}\)H NMR spectrum of IMNH.

Scheme 1
scheme 1

Synthesis of IMNH.

The steady-state open circuit potential (OCP) was noted with reference to SCE at the end of 30 min. The impedance experiments were carried out in the frequency range of 100 kHz–0.01 Hz, at the OCP by applying a small amplitude ac signal of 10 mV and then PDP measurements were performed in the potential range of −250 mV to \(+\)250 mV at a scan rate of 1 mV \(\hbox {s}^{-1}\) with respect to OCP.

2.4 Quantum chemical calculation

The density functional theory (DFT) calculation was carried out using quantum espresso software of version 5.1 [16, 17]. Initially, the atoms of the molecule were assigned to a three-dimensional box of \(15\, {\AA } \times 15 \,{\AA } \times 15\,{\AA }\) size with approximate bond parameters in the x-, y- and z-axis. The optimized geometry of molecule was obtained by relax calculations using the relevant pseudopotentials of elements obtained from the quantum espresso website [18]. Then the molecular energy calculation was carried out using plane-wave self-consistent field calculations of the relaxed structure. The structure of the molecule was viewed using XCrySDen visualization programme [19]. The frontier highest occupied molecular orbital (HOMO) and lowest unoccupied molecular orbital (LUMO) calculations were carried out and the orbitals were plotted using XCrySDen visualization programme.

2.5 Surface characterization

SEM (SEM-EVO 18-5-57 model), energy-dispersive X-ray spectroscopy (EDX) analysis and AFM (AFM-1B342 Innova model) techniques were used to study the surface characterization of mild steel specimen. A specimen was immersed in 1 M HCl and in 1 M HCl containing IMNH \((1\times 10^{-3}\,\hbox {M})\) for 3 h. SEM images of mild steel samples were taken using an analytical scanning electron microscope. EDX analysis technique was employed for obtaining the results of elemental analysis. The AFM results showed the surface roughness of the uninhibited and the inhibited samples.

3 Results and discussion

3.1 Characterization of IMNH

White crystalline solid (95%); \(\hbox {C}_{17}\hbox {H}_{16}\hbox {N}_{4}\hbox {O}_{2}\); m.p.: 268–270\(^{\circ }\hbox {C}\); IR (KBr) [\(\hbox {cm}^{-1}\)]: 3400 (imidazole–NH str.), 3001 (Ar. H), 2914 (\(\hbox {CH}_{3}\) asy. str.), 2835 (\(\hbox {CH}_{3}\) sym. str.). 1776 (C\(=\)O str.), 1666 (C\(=\)N str.), 1257 (C–O–C asy. str.), 1066 (C–O–C sym.); \(^{1}\)H NMR (400 MHz, DMSO-\(\hbox {d}_{6})\) [ppm]: \(\delta \) 2.36 (s, 3H, \(\hbox {CH}_{3})\), \(\delta \) 4.83 (s, 2H, \(\hbox {OCH}_{2})\), \(\delta \) 5.24 (s, 1H, NH), \(\delta \) 7.24–7.90 (8 Ar. H), \(\delta \) 7.97 (s, 1H, CH\(=\)N), \(\delta \) 12.70 (s, 1H, NH).

Fig. 3
figure 3

Potentiodynamic current vs. potential curves for the corrosion of mild steel in 1 M HCl at 313 K, containing different concentrations of IMNH.

Table 1 Results of PDP measurements for the corrosion behaviour of mild steel in 1 M HCl in the absence and presence of IMNH at different temperatures.

3.2 PDP study

The potentiodynamic current vs. potential plot obtained for the corrosion of mild steel in 1 M HCl in the presence of varying concentrations of IMNH is shown in figure 3. The various parameters such as corrosion current density (\(i_{\mathrm{corr}})\), corrosion potential (\(E_{\mathrm{corr}})\) and corrosion rate (CR) were obtained from the PDP plot. The cathodic (–\(\beta _{\mathrm{c}})\) and anodic (\(\beta _{\mathrm{a}})\) slopes were calculated by extrapolating the linear portion of cathodic and anodic curves. The corrosion current density obtained from PDP plot was used to calculate the percentage inhibition efficiency using equation (1):

$$\begin{aligned} \hbox {IE}(\%)=\frac{i_{\mathrm{corr}} -i_{\mathrm{corr(inh)}} }{i_{\mathrm{corr}} }\times 100 \end{aligned}$$
(1)

where \(i_{\mathrm{corr}}\) and \(i_{\mathrm{corr(inh)}}\) are the corrosion current density in the absence and presence of inhibitor, respectively. The results of PDP measurements are given in table 1.

The negligible variation in the values of cathodic and anodic slope indicates that the presence of IMNH can have influence on the kinetics of the reaction but not on the mechanism of corrosion inhibition [20]. As per the literature [21], if the variation in \(E_{\mathrm{corr}}\) is more than \(\pm 85\) mV with respect to OCP, then the inhibitor could be considered as either anodic or cathodic. In case of IMNH the shift observed was within \(\pm 85\) mV, hence retarding both cathodic hydrogen evolution and anodic metal dissolution reactions. The inhibition efficiency of IMNH substantially increased with increase in its concentration and showed maximum efficiency of 94% at \(1\times 10^{-3}\) M. This may be due to the adsorption of IMNH molecules on the metal surface, thereby blocking reactive sites and hence decreasing CR [22].

Fig. 4
figure 4

Influence of temperature on the inhibition efficiency of IMNH for the corrosion of mild steel in 1 M HCl.

Fig. 5
figure 5

(a) Plot of ln(CR) vs. 1/T and (b) plot of ln(CR)/T vs. 1/T for mild steel specimen in 1 M HCl containing various concentrations of IMNH.

3.3 Influence of temperature on CR

The results of influence of temperature on CR of mild steel and inhibition efficiency of IMNH are given in table 1. The results show an increase in inhibition efficiency with increase in temperature. This is attributed to the chemisorption of the inhibitor molecules on the mild steel surface through strong chemical interactions [23]. Figure 4 shows the effect of temperature on the inhibition efficiency at varied concentrations of IMNH.

The apparent energy of activation (\(E_{\mathrm{a}})\) in the presence of different concentrations of inhibitor was obtained from Arrhenius equation (2) [24]:

$$\begin{aligned} \ln ( {\mathrm{CR}})=B-\frac{E_\mathrm{a}}{RT} \end{aligned}$$
(2)

where B is the Arrhenius constant, R is the universal gas constant and T is the absolute temperature. Energy of activation values are obtained from the slope of the plot of ln(CR) vs. 1/T (figure 5a) and the results are tabulated in table 2. It is observed from table 2 that the \(E_{\mathrm{a}}\) values for IMNH in 1 M HCl are lesser than those in its absence. The decrease in \(E_{\mathrm{a}}\) values with increase in IMNH concentration confirms its chemical adsorption onto the metal surface [24]. The transition state equation is used to calculate the enthalpy (\(\Delta H^{\# })\) and entropy (\(\Delta S^{\# })\) of activation for the metal dissolution process [25].

$$\begin{aligned} {\mathrm{CR}}=\frac{RT}{Nh}\exp \left( \frac{\Delta S^{\#}}{R}\right) \exp \left( \frac{-\Delta H^{\#}}{RT}\right) \end{aligned}$$
(3)

where h is Planck’s constant and N is Avogadro’s number. A plot of ln(CR/T) vs. 1/T gave a straight line (figure 5b) with slope \(= -\Delta H^{\# }/T\) and intercept \(=\) ln(R/Nh\(+ (-\Delta S^{\# }/R)\). The negative values of \(\Delta S^{\# }\) indicate an increase in the orderliness on moving from the reactants to the metal-inhibitor-activated complex [26].

Table 2 Activation parameters for the corrosion of mild steel in 1 M HCl containing different concentrations of IMNH.
Fig. 6
figure 6

(a) Nyquist plots and (b) the equivalent circuit used to fit the experimental EIS data for the corrosion inhibition of mild steel in 1 M HCl containing \(5 \times 10^{-3}\) IMNH at 313 K.

Table 3 Results of EIS measurements for the corrosion of mild steel in 1 M HCl in the absence and presence of IMNH at different temperatures.

3.4 EIS study

The Nyquist plots obtained for mild steel in 1 M HCl in the absence and presence of IMNH at 313 K are shown in figure 6a. Depressed semicircle plots are obtained both in the absence and presence of inhibitor, which may be due to roughness, heterogeneities, impurities, grain boundaries and distribution of the surface active sites [27]. The shape of the Nyquist plots remains the same in the absence and presence of IMNH, at all studied temperatures. This suggests that the mechanism of corrosion inhibition is not altered even with increase in temperature. The diameter of the semicircle significantly increased with increase in inhibitor concentration. This indicates the increase in the impedance behaviour of mild steel towards corrosion and the charge transfer process mainly controls the corrosion rate [28]. The results of EIS measurements for the corrosion of mild steel in 1 M HCl in the absence and presence of IMNH at different temperatures are tabulated in table 3.

Impedance data were analysed by fitting the Nyquist plots to the suitable equivalent circuit using ZSimpWin software of version 3.21. The equivalent circuit used in the absence and presence of IMNH is shown in figure 6b. It includes the solution resistance (\(R_{\mathrm{s}})\), charge transfer resistance (\(R_{\mathrm{ct}})\) and time constant phase element (CPE). The CPE is introduced in the circuit instead of a pure double-layer capacitance to account for the depressed capacitive nature of Nyquist plot and the real capacitance can be deduced using equation (4) [29]:

$$\begin{aligned} C_{\mathrm{dl}} =Q(\omega _\mathrm{max } )^{n-1} \end{aligned}$$
(4)

where Q is the CPE, \(\omega _{\mathrm{max}}\) is the frequency at maximum impedance (imaginary part –\(Z''\)) and n is the CPE exponent. If the value of n is 1, then CPE behaves like a capacitor. The small variation in the capacitance from its real value was calculated using equation (5) [30]:

$$\begin{aligned} C_{\mathrm{dl}} =\frac{1}{2\pi f_{\mathrm{max}} R_{\mathrm{ct}} } \end{aligned}$$
(5)
Fig. 7
figure 7

(a) Bode phase plots and (b) Bode magnitude plots for the corrosion of mild steel in 1 M HCl at 313 K containing different concentrations of IMNH.

where \(f_{\mathrm{max}}\) is the frequency at which the imaginary component of impedance is maximum.

Fig. 8
figure 8

Langmuir’s adsorption isotherm for the adsorption of IMNH on mild steel in 1 M HCl at various temperatures.

Table 4 Thermodynamic parameters for the adsorption of IMNH on mild steel surface in 1 M HCl at different temperatures.

It is observed from table 3 that the measured \(C_{\mathrm{dl}}\) values decrease with increase in IMNH concentration in 1 M HCl solution at all studied temperatures. This indicates the decrease in the extent of metal dissolution, which may be due to the replacement of initially adsorbed water molecules by the inhibitor molecules [31]. The charge transfer resistance \(R_{\mathrm{ct}}\) increased with increase in IMNH concentration. This suggests the formation of a barrier film of the inhibitor on the metal surface, thereby reducing the corrosion rate [32]. The \(R_\mathrm{{ct}}\) values were used to calculate the percentage inhibition efficiency using equation (6) [33]:

$$\begin{aligned} \% \mathrm{IE}=\frac{R_{\mathrm{ct(inh)}} -R_{\mathrm{ct}} }{R_{\mathrm{ct(inh)}} }\times 100 \end{aligned}$$
(6)

Figure 7a and b shows the Bode phase and Bode magnitude plots for the corrosion behaviour of mild steel in the absence and presence of IMNH of various concentrations at 313 K, respectively. The difference between the HF limit and LF limit, corresponding to \(R_{\mathrm{ct}}\) value for the inhibited system in the Bode plot, increases with increase in the concentration of IMNH. Phase angle increases with the increase in the concentrations of IMNH in HCl medium. This might be attributed to the decrease in the capacitive behaviour on the metal surface due to decrease in the dissolution rate of the metal [34].

3.5 Adsorption isotherm

The adsorption isotherm is useful in explaining the corrosion inhibition mechanism. Different adsorption isotherms are applied to correlate the experimental results of PDP technique and isotherm models. In the present case, the best correlation is obtained using Langmuir’s adsorption isotherm shown in figure 8 and is given by equation (7) [35]:

$$\begin{aligned} \frac{C_{\mathrm{inh}} }{\theta }=\frac{1}{K}+C_{\mathrm{inh}} \end{aligned}$$
(7)

where K is the adsorption equilibrium constant, \(C_\mathrm{{inh}}\) is the concentration of the inhibitor in the solution and \(\theta \) is the surface coverage.

The linear correlation coefficient (\(R^{2})\) values and the slopes of straight lines obtained from the plot \(C_{\mathrm{inh}}/{\theta }\) vs. \(C_{\mathrm{inh}}\) are close to unity, confirming Langmuir’s adsorption isotherm [36]. The standard free energy of adsorption (\(\Delta G^{{\circ }}_{\mathrm{ads}})\) is related to \(K_{\mathrm{ads}}\) by equation (8) [37]:

$$\begin{aligned} K=\frac{1}{55.5}\exp \left( {\frac{-\Delta G^{\circ }_{\mathrm{ads}} }{RT}} \right) \end{aligned}$$
(8)

where R is equal to 8.314 (Rydberg constant), T is temperature and 55.5 is the concentration of water in solution in mol \(\hbox {dm}^{-3}\). The standard enthalpy of adsorption (\(\Delta H^{\circ }_{\mathrm{ads}})\) and the standard entropy of adsorption (\(\Delta S^{\circ }_{\mathrm{ads}})\) values were computed from the following thermodynamic equations (9 and 10), respectively:

$$\begin{aligned} \Delta H^{\circ }_{\mathrm{ads}}= & {} \frac{\mathrm{d}\left( {{\Delta G^{\circ }_{\mathrm{ads}} }/{T}} \right) }{\mathrm{d}\left( {{1}/{T}} \right) } \end{aligned}$$
(9)
$$\begin{aligned} -\Delta S^{\circ }_{\mathrm{ads}}= & {} \frac{\mathrm{d}(\Delta G^{\circ }_{\mathrm{ads}} )}{\mathrm{d}T} \end{aligned}$$
(10)

Generally, if the magnitude of \(\Delta G^{\circ }_{\mathrm{ads}}\) is around −20 kJ \(\hbox {mol}^{-1}\) or less negative, then it indicates the physical adsorption of inhibitor molecules, while those around −40 kJ \(\hbox {mol}^{-1}\) or more negative indicate the chemical adsorption of the inhibitor molecules onto the metal surface [38]. In the present case, \(\Delta G^{\circ }_{\mathrm{ads}}\) values for IMNH are found to be less negative than −40 kJ \(\hbox {mol}^{-1}\) at lower temperatures, which indicates the possibility of mixed adsorption (table 4). At higher temperatures, the obtained \(\Delta G^{\circ }_{\mathrm{ads}}\) values are more negative than −40 kJ \(\hbox {mol}^{-1}\). Since the \(\Delta G^{\circ }_{\mathrm{ads}}\) values are very close to the threshold value (−40 kJ \(\hbox {mol}^{-1})\), the adsorption may be predominantly through chemisorption. This is further supported by the positive \(\Delta H^{\circ }_{\mathrm{ads}}\) value, favouring chemisorption of IMNH [39]. The positive values of \(\Delta S^{\circ }_{\mathrm{ads}}\) indicate that the randomness caused by desorption of water molecules from the surface of metal overweighs the decrease in entropy due to the orderly arrangement of inhibitor molecules on the metals surface [40].

Fig. 9
figure 9

Schematic representation for adsorption of IMNH molecules on mild steel surface (a) through electron transfer and (b) through electrostatic interaction.

3.6 Corrosion inhibition mechanism

Generally, the redox reactions on the metal surface get enhanced in the presence of strong acid solutions like HCl or \(\hbox {H}_{2}\hbox {SO}_{4}\). This leads to the dissolution of metal in the anodic region and evolution of hydrogen in the cathodic region [41].

Metal dissolution in the anodic region:

$$\begin{aligned}&\hbox {Fe} + \hbox {Cl}^{-} \leftrightarrow (\hbox {FeCl}^{-})_{\mathrm{ads}} \end{aligned}$$
(11)
$$\begin{aligned}&\hbox {(FeCl}^{-}\hbox {)}_{\mathrm{ads}} \leftrightarrow \hbox {(FeCl)}_{\mathrm{ads}} + \hbox {e}^{- } \end{aligned}$$
(12)
$$\begin{aligned}&\hbox {(FeCl)}_{\mathrm{ads}} \rightarrow (\hbox {FeCl}^{+}) +\hbox {e}^{- }\end{aligned}$$
(13)
$$\begin{aligned}&\hbox {(FeCl}^{+}) \leftrightarrow \hbox {Fe}^{2+} + \hbox {Cl}^- \end{aligned}$$
(14)

Hydrogen evolution takes place at the cathode:

$$\begin{aligned}&\hbox {Fe} + \hbox {H}^{+} \leftrightarrow (\hbox {FeH}^{+})_{\mathrm{ads}} \end{aligned}$$
(15)
$$\begin{aligned}&(\hbox {FeH}^{+})_{ \mathrm{ads} }+ \hbox {e}^{-} \rightarrow (\hbox {FeH})_{ \mathrm{ads}} \end{aligned}$$
(16)
$$\begin{aligned}&(\hbox {FeH})_{ \mathrm{ads} }+ \hbox {H}^{+ }+ \hbox {e}^{-} \rightarrow \hbox {Fe} + \mathrm{H}_{2} \end{aligned}$$
(17)

Corrosion inhibition of mild steel in hydrochloric acid medium in the presence of inhibitor molecules can be explained based on molecular adsorption. The adsorption of inhibitor molecules onto the metal surface may be due to the electrostatic force of attraction of either unshared electron pairs in the molecule or the \(\uppi \)-electrons with the metal or due to a combination of these [42]. As explained earlier, based on thermodynamic parameters the inhibition process can take place via mixed adsorption predominantly through chemisorption. The inhibitive effect of IMNH is mainly due to the presence of fused benzene ring, one imidazole ring, electron donating methyl group, carbonyl group, imine group and the heteroatoms in the moiety. Electron-rich heteroatoms such as oxygen and nitrogen can easily transfer their lone pair of electrons to the empty 3d orbital of metal atom to form a coordinate bond [43]. As a result of this, the inhibitor molecules exhibit an umbrella effect by forming a protective film, which acts as a barrier between the metal surface and the exposed medium. At 303 and 313 K the \(\Delta G^{\circ }_{\mathrm{ads}}\) values are found to be less negative than −40 kJ \(\hbox {mol}^{-1}\), which suggests the possibility of physical adsorption [42]. The IMNH molecules can be easily protonated in hydrochloric acid solution. In the anodic region these protonated inhibitor molecules interact with (\(\hbox {FeCl}^{-})_{\mathrm{ads}}\) and result in \((\hbox {FeIMNH}^{+})_{\mathrm{ads}}\) complex, which can be adsorbed on the metal surface as follows:

$$\begin{aligned}&\hbox {Fe} + \hbox {Cl}^{-} \longleftrightarrow (\hbox {FeCl}^{-})_{\mathrm{ads}}+ \hbox {IMNH}^{+} \nonumber \\&\qquad \longleftrightarrow (\hbox {FeCl}^{-}\hbox {IMNH}^{+})_{\mathrm{ads}} \longleftrightarrow (\hbox {Fe} \hbox {IMNH}^{+})+\hbox {Cl}^{-}\nonumber \\ \end{aligned}$$
(18)

Further, these protonated cations (\(\hbox {IMNH}^{+}\)) compete with \(\hbox {H}^{+}\) ions to occupy active sites of cathodic region, leading to the formation of (\(\hbox {Fe}^{-} \hbox {IMNH}^{+})_{\mathrm{ads}}\). Due to the larger size of \(\hbox {IMNH}^{+}\) molecules compared with the \(\hbox {H}^{+}\) ions, they can cover the maximum area of the metal surface and hence reduce the rate of corrosion. A schematic representation of physical and chemical adsorption of IMNH molecule is shown in figure 9.

Table 5 Comparison between the inhibition efficiency of IMNH and other reported compounds at their optimum concentration.
Fig. 10
figure 10

Optimized molecular structure of (a) IMNH and (b) MQH.

3.7 Comparison of inhibition efficiency of IMNH with reported hydrazide derivatives

Since the present work is to emphasize the importance of newly synthesized hydrazide derivative as corrosion inhibitor for mild steel in hydrochloric acid medium, its inhibition efficiency is compared to those of some other reported hydrazide derivatives (table 5). From the table, it is observed that most of the hydrazide compounds showed lesser inhibition efficiency when compared with IMNH. The literature also revealed that the inhibition efficiency of these compounds decreased with increase in temperature [44,45,46,47,48] whereas, in case of IMNH, %IE increased with increase in temperature and showed maximum inhibition efficiency of 94% at 333 K. Further, the %IE of IMNH is compared to that of our earlier reported inhibitor, namely 2-[(2-methylquinolin-8-yl)oxy]acetohydrazide (MQH), for mild steel in 1 M HCl medium [49]. IMNH showed higher inhibition efficiency at all the studied temperatures, compared with MQH. This may be due to the increase in the extent of adsorption at higher temperatures, leading to stronger chemical adsorption of IMNH. The presence of six heteroatoms, one five-membered heterocyclic ring in addition to the fused aromatic ring, is mainly responsible for greater inhibition efficiency of IMNH compared with MQH molecule. Further higher inhibition efficiency of IMNH compared with MQH is also explained based on quantum chemical analysis.

3.8 Quantum chemical calculation

Quantum chemical calculations were carried out in order to explore the structures and molecular properties of the studied inhibitors using DFT. The complete geometry optimizations of the molecules were done using ‘quantum espresso’ software (version 5.1), which is an integrated suite of open-source computer codes for electronic-structure calculations. The optimized structures for the studied inhibitor molecules are given in figure 10. The different parameters obtained from quantum chemical calculations such as HOMO \({(}E _{\mathrm {HOMO}})\) and the LUMO (\(E_{\mathrm{LUMO}})\), the energy difference (\(\Delta E)\) between \(E_{\mathrm{HOMO}}\) and \(E_{\mathrm{LUMO}}\), dipole moment (\(\mu \)), electronegativity (\(\chi \)), electron affinity (A), chemical hardness (\(\eta \)), chemical softness (\(\sigma \)), ionization potential (I) and the fraction of electrons transferred (\(\Delta N)\) for IMNH and MQH are tabulated in table 6.

Fig. 11
figure 11

The frontier molecular orbital (HOMO–LUMO) density distributions of (a) IMNH and (b) MQH molecule.

Table 6 Quantum chemical parameters of IMNH and MQH molecule.

The interaction between metal surface and inhibitor is a function of the HOMO and LUMO levels. The optimized geometry, HOMO and LUMO (density distribution) of IMNH and MQH are given in figure 11a and b, respectively.

The concept of electron donor–acceptor interaction can take an important role in the adsorption of the inhibitor molecules on the metal surface. In case of mild steel, the adsorption of the inhibitor molecules may be due to the transfer of lone pair of electrons on the heteroatom or the \(\uppi \)-electrons of the aromatic ring to the vacant 3d-orbital of the Fe atoms [39]. The higher \(E_{\mathrm{HOMO}}\) values of IMNH when compared with MQH indicate that IMNH molecules can easily supply electrons to the metal surface. This enhances the adsorption of the IMNH molecules on metal surface and results in higher inhibition efficiency [50]. Similarly, the low values of \(E_{\mathrm{LUMO}}\) for IMNH indicate greater ability of the molecule to accept electrons, which can facilitate the adsorption and therefore improve the inhibition efficiency [51].

It is reported [52] that the formation of transition state is due to the interaction between HOMO and LUMO of the reacting species, which is explained by frontier molecular orbital theory of chemical reactivity. Large value of the energy gap (\(\Delta \)E) indicates low reactivity of a chemical species, and smaller energy gap between the HOMO and LUMO indicates stronger adsorption of the inhibitor molecule on the metal surface [53]. In the present study, the low \(\Delta \)E value for IMNH confirms its high inhibition efficiency. The greater dipole moment (\(\mu \)) value of IMNH compared with MQH shows its higher polar nature. Generally, more polar compounds facilitate electrostatic interaction with the metal surface and hence exhibit higher inhibition efficiency [54].

Ionization potential is another important fundamental parameter that describes the chemical reactivity of atoms and molecules. It is defined as the amount of energy required to remove an electron from a molecule. Lower the ionization potential value, easier the removal of an electron from a molecule, whereas higher ionization potential value indicates high stability and chemical inertness of the molecule [55]. Since the ionization energy of IMNH is lesser than that of MQH, it exhibits higher inhibition efficiency.

Table 7 EDX results for corrosion of mild steel in absence and presence of IMNH.
Fig. 12
figure 12

SEM images of the mild steel specimen exposed to (a) 1 M HCl and (b) 1 M HCl containing \(1\times 10^{-3}\) M of IMNH.

Fig. 13
figure 13

EDX spectrum of mild steel specimen immersed in (a) 1 M HCl and (b) 1 M HCl containing \(1\times 10^{-3}\) M IMNH.

Chemical hardness and softness parameters are related to the description of the hard and soft acid/base as per the acid–base theory. A hard molecule has the least tendency to react while a soft molecule has high tendency to react and hence soft molecules are expected to have the highest inhibition efficiency [56]. In the present case, the order of softness is IMNH > MQH, which is in good agreement with the experimental results (table 7).

The tendency of the inhibitor molecule to donate the electrons to the metal surface is described based on the fraction of electron transferred (\(\Delta N)\). The higher the value of \(\Delta N\) the greater the tendency of a molecule to donate electrons to the electron-deficient species. The same principle is applied in case of corrosion inhibitors [57]. The higher \(\Delta N\) value for IMNH (\(\Delta N = 0.4837\)) indicates its greater affinity to interact with the metal surface by transferring more number of electrons compared with MQH (\(\Delta N = 0.444\)).

3.9 Surface morphology study

3.9.1 SEM and EDX analysis

The SEM images of mild steel specimen after its immersion (3 h) in uninhibited and inhibited solution are shown in figure 12a and b, respectively. The SEM image obtained in the absence of inhibitor showed the rough surface with cracks and small pits due to corrosive nature of acidic solution. The SEM images corresponding to inhibited sample showed a smoother surface with less number of pits. This confirms the formation of protective film on the surface of mild steel material.

Figure 13a and b depicts the EDX spectrum of mild steel surface after its immersion in 1 M HCl in the absence and presence of IMNH, respectively. The atomic percentage (at%) and weight percentage (wt%) of the elements found in the EDS profile for the corroded and inhibited sample surface are given in table 7. The EDS results obtained for uninhibited sample indicate the formation of ferric oxide film and the adsorption of chloride ions from the acid solution onto the metal surface. Similarly, elemental composition obtained in the presence of IMNH evidences the formation of protective layer by it. The appearance of nitrogen peak and increase in the % of carbon confirm the adsorption of inhibitor molecules on the metal surface.

Fig. 14
figure 14

Atomic force micrographs of mild steel surface immersed in (a) 1 M HCl and (b) 1 M HCl containing \(1\times 10^{-3}\) M IMNH.

3.9.2 AFM study

The three-dimensional (3D) AFM images of mild steel surface after its immersion (3 h) in 1 M HCl in the absence and presence of IMNH are shown in figure 14a and b, respectively. The image obtained in the presence of inhibitor showed a smooth surface when compared with uninhibited solution. This confirms the decrease in surface roughness due to the adsorption of IMNH molecules. The average surface roughness (\(R_{\mathrm{a}})\) and root-mean-square roughness (\(R_{\mathrm{q}})\) values obtained in the absence and presence of IMNH are 71.8, 88.9 and 38.8, 63.0 nm, respectively. The decrease in surface roughness values for the inhibited specimen clearly indicates the formation of protective film onto the metal surface.

4 Conclusions

Based on the results of investigation, the following conclusions are drawn:

  • Newly synthesized IMNH molecule showed a good anticorrosion activity compared with other reported hydrazide derivatives in 1 M HCl medium.

  • The molecules of IMNH inhibit the corrosion of mild steel specimen in 1 M HCl medium by adsorbing onto the surface and forming a protective barrier predominantly through chemisorption.

  • EIS studies revealed the adsorption of inhibitor, which is confirmed by increase in \(R_{\mathrm{ct}}\) and decrease in \(C_{\mathrm{dl}}\) values.

  • PDP studies confirm IMNH acts as a mixed type, obeying Langmuir’s adsorption isotherm.

  • SEM micrograph firmly demonstrates that the inhibited mild steel sample exhibits clear surface with minimal surface damage. AFM analysis also showed a smooth surface with decreased surface roughness value in the case of inhibited sample compared with uninhibited one.

  • The experimental inhibition efficiency of IMNH correlates well with the electronic properties of the inhibitor derived from the quantum chemical calculations based on DFT study.