1 Introduction

The carbon steel is commonly used in a number of industries due to its low cost and good mechanical properties [1,2,3,4]. On the other hand, the acidic medium especially hydrochloric acid is widely used in industrial processes such as acid cleaning, acid descaling, and acid pickling. In order to reduce the corrosive attack of acid on steel surface, certain chemical compounds are added to the acid solution. This practice of introducing the corrosion inhibitors to the aggressive acidic medium is one of the most commonly used methods to counter the corrosion of carbon steel. Organic corrosion inhibitors act by adsorption, which is facilitated by the presence of heteroatoms such as nitrogen, oxygen, sulfur, presence of double bonds, and aromatic rings [5,6,7,8,9,10,11]. Many N-heterocyclic compounds such as the derivatives of imidazole [12, 13], pyrazole [14], pyrimidine [15], and imidazolopyridine [16, 17] have been reported as effective corrosion inhibitors for carbon steel in acidic solution.

The use of ionic liquids for a wide range of applications is gaining significance particularly in the field of fundamental chemistry and chemical engineering [18]. Currently, ionic liquids have application in many fields such as solvents or catalysts for chemical synthesis [19], media for electrodeposition of metals [20], supercapacitors [21], electrolyte for electrochemical devices such as battery [22] and corrosion inhibitors [23, 24]. The use of this type of molecules leads to a large reduction in reaction times with several advantages of the eco-friendly approach and is therefore considered as green technology [25, 26]. The fascinating properties of ionic liquids such as high polarity, low melting points, low vapor pressure, low toxicity, high thermal and chemical stability, less hazardous influence on environment and living beings make them as a promising candidate for replacing the conventionally used highly volatile and toxic corrosion inhibitors [18].

In the light of above, in the present work, two newly synthesized pyridazine derivatives “1-decylpyridazin-1-ium iodide” (DPI) and “1-tetradecylpyridazin-1-ium iodide” (TPI) were examined as corrosion inhibitors of carbon steel in 1.0 M HCl. These compounds have not been reported previously as corrosion inhibitors. In addition, the synthesis procedure only requires a single-step reaction. Furthermore, the derivatives afford excellent solubility in hydrochloric acid solution and the presence of pyridazine ring along with the hydrocarbon tail is expected to facilitate their adsorption and corrosion inhibition behavior. We have chosen the ionic liquids having different carbon chain lengths to see their comparative influence on the inhibition performance. The inhibition activity of these organic compounds was evaluated by electrochemical impedance spectroscopy (EIS). The different thermodynamic and kinetic adsorption parameters for corrosion inhibition process are evaluated. Furthermore, the adsorption of pyridazinium derivatives on the metal/electrolyte interface of the metal was studied at longer immersion times in order to understand the interactions between pyridazinium derivatives and steel surface. Quantum chemical calculations using the Density functional theory (DFT) method was also used to study the mechanism of steel corrosion inhibition of the synthesized ionic liquids in acidic medium.

2 Experimental

2.1 Specimens and Solution Preparation

The steel sample used in this study is a carbon steel (CS) having chemical composition (in wt%) of 99.21% Fe, 0.38% Si, 0.21% C, 0.05% Mn, 0.05% S, 0.09% P, and 0.01% Al. The aggressive solution of 1.0 M HCl was prepared by dilution of analytical grade 37% HCl with distilled water. The concentration range of the studied compounds was 10−6–10−3 M.

2.2 General Procedure for Synthesis of Inhibitors DPI and TPI

DPI: Pyridazine (1eq) and 1-iododecane (1eq) were placed in a Pyrex glass beaker and exposed to irradiation for 5 h at room temperature using an ultrasonic bath. Completion of the reaction was marked by the precipitation of a solid from the initially obtained clear and homogenous mixture in toluene. The pyridazinium salt was isolated by filtration and washed three times with ethyl acetate to remove any unreacted starting materials and solvent. Finally, the salt DPI was dried at reduced pressure to remove all volatile organic compounds (Figs. 1, 2).

Fig. 1
figure 1

1H NMR spectrum of 1-decylpyridazin-1-ium iodide (DPI)

Fig. 2
figure 2

13C NMR spectrum of 1-decylpyridazin-1-ium iodide (DPI)

DPI: Yellow crystals, MP 83–84 °C, 1H NMR (DMSO, 400 MHz,): δ = 0.85 (t, 3H, CH3), 1.24–1.30 (m, 14H, CH2), 1.99 (quint, 2H, CH2), 4.82 (t, 2H, NCH2), 8.63 (t, 1H, CH), 8.76 (t, 1H, CH), 9.65 (d, 1H, CH), 9.97 (d, 1H, CH); 13C NMR (DMSO, 100 MHz,): δ = 14.4 (CH3), 22.7 (CH2), 28.8 (CH2), 29.2 (CH2), 29.3 (CH2), 29.4 (CH2), 29.5 (CH2), 29.9 (CH2), 31.7 (CH2), 65.0 (CH2), 136.5 (CH), 137.0 (CH), 150.3 (CH), 154.9 (CH); IR (νmax cm−1) 3129 (C–H, sp2), 1559–1469 (C=C), 1163 (C–N), 1080 (C–O); LCMS (M–I) 221.2 found for C14H25N2+.

TPI: Pyridazine (1eq) and 1-iodotetradecane (1eq) were placed in a glass beaker and exposed to ultrasonic irradiation for 5 h at room temperature as mentioned above for DPI. Completion of the reaction was marked by the precipitation of a solid from the initially obtained clear and homogenous mixture in toluene. The pyridazinium salt was isolated by filtration and washed three times with ethyl acetate to remove any unreacted starting materials and solvent. Finally, the salt TPI was dried at a reduced pressure to remove all volatile organic compounds (Figs. 3, 4).

Fig. 3
figure 3

1H NMR spectrum of 1-tetradecylpyridazin-1-ium iodide (TPI)

Fig. 4
figure 4

13C NMR spectrum of 41-tetradecylpyridazin-1-ium iodide (TPI)

TPI: white crystals, MP 117–119 °C, 1H NMR (DMSO, 400 MHz,): δ = 0.84 (t, 3H, CH3), 1.21–1.33 (m, 18H, CH2), 1.37 (m, 4H, CH2), 2.10 (quint, 2H, CH2), 5.05 (t, 2H, CH2), 8.80 (t, 1H, CH), 9.00 (t, 1H, CH), 9.52 (d, 1H, CH), 10.95 (d, 1H, CH); 13C NMR (DMSO, 100 MHz,): δ = 19.2 (CH3), 27.3 (CH2), 30.6 (CH2), 33.6 (CH2), 33.8 (CH2), 33.9 (CH2), 34.6 (CH2), 36.4 (CH2), 69.8 (CH2), 141.2 (CH), 141.8 (CH), 155.1 (CH), 159.8 (CH); IR (νmax cm−1) 3132 (C–H, sp2), 1561–1472 (C=C), 1165 (C–N), 1083(C–O); LCMS (M–I) 277.2 found for C18H33N2+. Scheme 1 represent the structures of ionic liquids (DPI) and (TPI).

Scheme 1
scheme 1

Schematic representation of the structures of ionic liquids (DPI) and (TPI)

2.3 Electrochemical Measurements

Electrochemical experiments were performed using a Radiometer analytical (VoltaLab-PGZ 100), coupled to a computer equipped with a software Voltamaster 4. The experiments were performed in a three-electrode cell where the working electrode was a carbon steel with a surface area of 1 cm2. Before each experiment, the electrode was polished with emery paper until 1500 grade and cleaned with distilled water. The counter electrode used was a platinum plate and a saturated calomel electrode (SCE) was used as the reference electrode. The measurements of electrochemical impedance spectroscopy (EIS) were performed using AC signals of amplitude 10 mV peak to peak at different conditions in the frequency range of 100 kHz–10 mHz.

The charge transfer resistance \({R_{{\text{ct}}}}\) was obtained from the diameter of the semicircle in the Nyquist representation. Thus, the inhibition efficiency was calculated using the following equation:

$$E\% =\frac{{{R_{{\text{ct}}}} - {R_{{\text{ct}}({\text{inh}})}}}}{{{R_{{\text{ct}}}}}} \times 100,$$

where \({R_{{\text{ct}}}}\) and \({R_{{\text{ct}}({\text{inh}})}}\) are the charge transfer resistances in the absence and in presence of inhibitor, respectively.

2.4 Quantum Study

Quantum chemical computations were carried out by density function theory (DFT) using 6-31G (d, p) basis set for all atoms. All the calculations were carried out with Gaussian 09W package. The following quantum chemical parameters were acquired: EHOMO, ELUMO, the energy gap (∆E), electronegativity (χ), global hardness (η), global softness (σ), fraction of electrons transferred (∆N), and the dipole moment (µ).

The absolute electronegativity (χ) is a measure of the power of an atom or a group of atoms to attract electrons to itself and can be approximated as follows:

$$\chi =\frac{1}{2}({E_{{\text{HOMO}}}}+{E_{{\text{LUMO}}}}).$$

The hardness (η) and softness (σ) are global chemical descriptors measuring the molecular stability and reactivity and are given in the following equations:

$$\eta =\frac{1}{2}({E_{{\text{HOMO}}}} - {E_{{\text{LUMO}}}});\,\,\sigma ={\text{1}}/\eta.$$

The dipole moment (µ) is another index that is often used for the prediction of a corrosion inhibition process. It is a measure of polarity in a certain bond and it is related to the distribution of electrons in a certain molecule [27]. The fraction of electrons transferred from the molecule to the surface of metal (ΔN) was estimated according to Pearson theory [28] by using the following equation:

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

where a theoretical value for the electronegativity of bulk iron was used, χFe = 7 eV, and a global hardness of ηFe = 0 was used.

3 Results and Discussion

3.1 Effect of Inhibitor Concentration

Figure 5 illustrates the representative Nyquist plots of carbon steel in 1.0 M HCl solution in the absence and presence of various concentrations of DPI and TPI after immersion for 30 min at 303 K.

Fig. 5
figure 5

Nyquist plots and simulation curves of carbon steel in 1.0 M HCl with different concentrations of DPI (R1) and TPI (R2) at 303 K

As shown in Fig. 5, it can be observed that the diameter of the capacitive loop in the presence of the inhibitors is greater than in the uninhibited solution and increases with increase in the concentration of inhibitors. It is obvious that these capacitive loops are not perfect semicircles which can be attributed to the frequency dispersion effect as a result of the roughness and inhomogeneity of the steel surface [29,30,31].

The equivalent circuit models used to fit the experimentally obtained Nyquist data are shown in Fig. 6. Generally the frequency dispersion is frequently modeled by using constant phase element (\(Q\)), the circuit used for compound DPI (a) has a CPE constant Qr which is in parallel with charge transfer resistance \({R_{{\text{ct}}}}\) and together they are in series with the solution resistance \({R_{\text{s}}}\). The circuit obtained for TPI (b) has an additional resistance component (\({R_{\text{f}}}\)) and a second CPE (Qdl) which are not observed for circuit (a).

Fig. 6
figure 6

Equivalent electrical circuit model used to fit impedance spectra of DPI (a) and TPI (b)

The equation which relates the double-layer capacitance (Cdl) to the transfer charge resistance Rct and the CPE constant (Q) is described as follows [32]:

$${C_{{\text{dl}}}}={\left( {Q \times {R_{{\text{ct}}}}^{{{\text{1}} - {\text{n}}}}} \right)^{{\text{1}}/{\text{n}}}},$$

where Q is the proportional factor and n is the CPE exponent which is related to the surface inhomogeneity. The electrochemical parameters such as charge transfer resistance Rct, double-layer capacitance Cdl, and corrosion inhibition efficiency (IE) are given in Table 1.

Table 1 Impedance parameters of carbon steel in 1.0 M HCl containing different concentrations of the studied compounds

It can be observed from the impedance data (Table 1) that the value of \({R_{{\text{ct}}}}\) increases with increase in the concentration of inhibitors which also indicates an increase in the corrosion inhibition efficiency which attains a maximum value of 86.7% for DPI and 88.6% for TPI at a concentration of 10−3 M. It can also be observed that the double-layer capacitance \({C_{{\text{dl}}}}\) decreased with increase in the inhibition efficiency which can be explained with the adsorption of the inhibitor onto the carbon steel surface after the displacement of water molecules and other ions which are already adsorbed onto the steel surface. The decrease in the double-layer capacitance Cdl can be explained using Helmholtz model [33]:

$${C_{{\text{dl}}}}=\frac{{\varepsilon {\varepsilon _0}}}{d}S,$$

where \(\varepsilon\) is the dielectric constant of the medium, \({\varepsilon _0}\) is the permittivity of the free space, S is the effective surface area of the working electrode, and d is the thickness of the electrical double layer formed by the adsorbed inhibitors. Considering the second inhibitor (TPI), the data also illustrate an increase in the diameter of the capacitive loop. These results suggest that a protective film of inhibitor molecules was formed on the electrode surface [34, 35].

As an example, the fitted Bode diagrams for inhibited solution at the optimum concentration are presented in Fig. 7 (DPI) and Fig. 8 (TPI).

Fig. 7
figure 7

Bode diagrams for carbon steel/1.0 M HCl + 10−3 M of DPI

Fig. 8
figure 8

Bode diagrams for carbon steel/1.0 M HCl + 10−3 M of TPI

From the results it can be observed that the Bode and phase angle plots for DPI show a one-time constant process while those for TPI show a two-time constant process [36, 37] The relaxation time of a surface state is the time required for the return of the charge distribution to the equilibrium point after an electrical disturbance, it can be defined as [38]

$$\tau ={C_{{\text{dl}}}}{R_{{\text{ct}}}}.$$

The adsorption of an inhibitor molecule requires some time to attain equilibrium. If this time is very small, only the time constant for double-layer charging would be expressed as observed in case of DPI. The appearance of a second time constant in case of TPI can be attributed to the requirement of more time by the system to reach the adsorption equilibrium. In this case, a process having an additional time constant is added to the double-layer charging process. It is obvious that in such case the description cannot be made using the simple model of Fig. 1a and therefore to accurately model the process, another circuit is used which is given in Fig. 1b [37].

3.2 Adsorption Isotherm

In order to understand the interaction between carbon steel surface and the inhibitors, the adsorption isotherms are used. The adsorption process depends on several parameters such as the nature and charge of the corroding metal surface, the inhibitor’s chemical structure, and the charge distribution in the inhibitor molecules. In the present work, several adsorption isotherms were tested and the best fit was provided by the Langmuir isotherm where a straight line was obtained from the plot of \({C_{{\text{inh}}}}/\theta\) versus \({C_{{\text{inh}}}}\) with a slope around unity (Fig. 9). The Langmuir isotherm can be expressed as

Fig. 9
figure 9

Langmuir adsorption isotherm of DPI (R1) and TPI (R2) in 1.0 M HCl at 303 K

$$\frac{{{C_{{\text{inh}}}}}}{\theta }=\frac{1}{K}+{C_{{\text{inh}}}},$$
$${K_{{\text{ads}}}}=\frac{1}{{55.5}}\exp \left( { - \frac{{\Delta G_{{{\text{ads}}}}^{0}}}{{RT}}} \right),$$

where \({K_{{\text{ads}}}}\) is the adsorption–desorption equilibrium constant and \(\Delta G_{{ads}}^{0}\) is the standard free energy of adsorption, 55.5 is the value of the molar concentration of water in the solution [39].

From literature, the adsorption of an inhibitor is described as chemisorption if the \(\Delta G_{{ads}}^{0}\) values are in order of (− 40 kJ mol−1) or higher and physisorption if \(\Delta G_{{{\text{ads}}}}^{0}\) values at around − 20 kJ mol−1 [40, 41] or lower. As can be observed from Table 2, the calculated \(\Delta G_{{{\text{ads}}}}^{0}\) value around − 40 kJ mol−1 signifies that the adsorption mechanism of both the inhibitors tested on carbon steel surface in 1.0 M HCl solution is distinctively a chemisorption [42,43,44].

Table 2 Thermodynamic parameters for the adsorption of DPI and TPI in 1.0 M HCl at 303 K

3.3 Effect of Temperature

The temperature is one of the parameters which can change the interaction between the carbon steel surface and the acidic solution without and with inhibitor. The Nyquist plots of carbon steel in 1.0 M HCl with and without different concentrations of inhibitors in the temperature range from 303 to 333 K are shown in Fig. 10.

Fig. 10
figure 10

Nyquist plots for carbon steel in 1.0 M HCl without and with optimal concentration of TPI (R2) at different temperatures

The Nyquist diagrams obtained for DPI at different temperatures obey to the circuit given in Fig. 1a. On the other hand, the Nyquist plots of inhibitor (TPI) at different temperatures follow the second circuit, as it was observed for the study of the effect of concentration. The various electrochemical parameters were calculated and are summarized in Table 3.

Table 3 Impedance parameters of carbon steel in 1.0 M HCl at different temperatures without and with different concentrations of TPI

It can be observed from Table 3 that the \({R_{{\text{ct}}}}\) increased with increase in temperature in inhibited solutions. Consequently, the values of inhibition efficiency increased to attain 95.7% at 10−3 M concentration at 333 K. This may be attributed to the formation of a protective film of TPI on the electrode surface [45,46,47].

On the other hand, the values of surface coverage θ for different inhibitor concentrations were tested by fitting to various isotherms but the finest one obtained is Langmuir isotherm because it had a slope around unity. The parameters of adsorption are shown in Table 4.

Table 4 Thermodynamic parameters for the adsorption of TPI in 1.0 M HCl at different temperatures

The values of \(\Delta G_{{{\text{ads}}}}^{0}\) for the studied inhibitors is greater than − 40 kJ/mol which indicates that TPI molecules may get adsorbed with a chemisorption interaction type as reported in literature. In other words, this inhibitor may get adsorbed onto the metal surface by making strong bonds [48,49,50] (Fig. 11).

Fig. 11
figure 11

Langmuir adsorption isotherm of TPI in 1.0 M HCl at different temperatures

3.4 Effect of Immersion Time

The electrochemical impedance spectroscopy is a useful technique for testing the corrosion inhibition process at long immersion time. These experiments were carried out in order to follow the evolution of phenomena occurring at the metal–solution interface at different immersion times from 1/2 to 12 h. Figure 12 shows the evolution of the impedance spectra at different immersion times in 1.0 M HCl solution containing optimal concentrations of the tested inhibitor TPI.

Fig. 12
figure 12

Impedance spectra obtained after different immersion times in 1.0 M HCl solution with optimal concentration of TPI

The electrochemical impedance parameters given in Table 5 show the variation of the Rct as a function of the immersion time. The Rct increases with increase in immersion time to achieve a value of 1077 Ω cm2 after 6 h and then decreases slightly afterwards to attain 1030 Ω cm2 after 12 h of immersion time. This behavior indicates that the protective film formed was getting strong until 6 h. In other words, the protective properties of the film formed on the surface of C-steel are reinforced until 6 h of immersion time. Further, this film is liable to dissolve at higher immersion time [51,52,53].

Table 5 Electrochemical impedance parameters for C-steel in 1.0 M HCl solution with and without optimum concentration of inhibitor at different immersion times

3.5 DFT Study

The experimental results provide evidence of the inhibition efficiency of the molecules tested in this study, which may act through a chemical adsorption mechanism. From the experimental results, it was observed that the TPI showed a higher corrosion inhibition efficiency compared to DPI. Therefore, to obtain a thorough understanding of the electronic interaction between the inhibitor molecules and the metallic surface, several theoretical parameters such as the molecular orbital energies (EHOMO, ELUMO) were determined and are listed in Table 6.

Table 6 Quantum chemical parameters of the studied inhibitors

The frontier molecular orbital surfaces provide information about the highest occupied molecular orbital (HOMO) of the inhibitor that may be responsible for donation of electrons to the vacant d-orbital of the metal and the lowest unoccupied molecular orbital (LUMO) of the inhibitor that may be liable to accept a pair of electrons from an electron-rich metal surface during back-bonding. Thus, smaller values of the ∆E correspond to higher inhibition efficiencies of the compound [54,55,56,57] which explains the high stability of the compound in the complex formed with the mild steel surface. The HOMO and LUMO density distributions of the optimized structures are shown in Fig. 13. It can be observed that the HOMO of DPI and TPI are essentially localized on the carbon chain. In contrast, The LUMO surfaces of these inhibitors are mostly distributed on the Pyridazinium ring. This may be due to the presence of highly electronegative nitrogen atoms in the Pyridazinium ring, which can make the ring to be relatively electron-deficient and the fact that it is a cationic moiety. Therefore, only the cations interact with the metal surface by the pyridazine ring which can be explained by the transfer of the electron from d-orbital of Fe to vacant orbital of pyridazine ring in purpose to form feedback coordinate bond [57]; this can be further confirmed by the negative value of ∆N as shown in Table 6.

Fig. 13
figure 13

Frontier molecule orbitals density distributions of DPI and TPI at B3LYP/6-31G (d, p) level of theory

The data provided in Table 6 show that TPI has a higher value of EHOMO which shows a higher tendency to donate electrons to the metal surface and could be the reason behind the higher obtained inhibition efficiency of TPI compared to DPI. Moreover, the results in Table 6 show that TPI has a lower energy gap (ΔE) than DPI. This means higher reactivity with mild steel, which is again in agreement with its higher inhibition efficiency obtained experimentally. Further, a lower value of global hardness and consequently a higher value of global softness suggest better reactivity of TPI compared to DPI. The fraction of electrons transferred (∆N) describes the inhibition achieved from electron donation. If ∆N < 3.6, the inhibition efficiency increases with increasing electron-donation ability to the metal surface [58,59,60] which explains the higher reactivity of inhibitor TPI than DPI. Also, as shown in Table 6, the µ for ATP cation is higher than that for DPI which owing to the dipole–dipole interaction between inhibitor molecules and metal surface, the higher value of µ in case of TPI may lead to stronger inhibition.

4 Conclusions

The inhibition effects of pyridazine derivatives against corrosion of carbon steel were tested using different concentrations and at various temperatures in 1.0 M HCl by electrochemical impedance spectroscopy (EIS). Both ionic liquids inhibit corrosion with inhibition efficiency higher than 86% at 10−3 M and which increased to 95.7% at 10−3 M at 333 K for TPI. The charge transfer resistance showed an increase with a decrease in the double-layer capacitance which indicated the adsorption of the inhibitors on the metal/ solution interface. The adsorption became more remarkable with increase in temperature as observed by EIS data. The adsorption of inhibitors tested on to the steel surface in the studied acidic solution obeyed the Langmuir isotherm and the values of \(\Delta G_{{ads}}^{0}\) indicate that both the inhibitors undergo chemical adsorption over the metal surface leading to the formation of a strong protective film. This adsorption is more pronounced at longer immersion time because this inhibitor achieves good inhibition efficiency although after an immersion period of 12 h. Quantum chemical calculations were used to provide a molecular level understanding of the mechanism of the interaction of the inhibitor molecules with steel surface and the computational data showed a good agreement with the experimentally obtained results.