1 Introduction

The use of organic compounds as corrosion inhibitors plays a significant role in reducing corrosion of industrial metals and alloys in an acidic environment encountered during processing of metals and alloys [1]. By considering the practical applications of acidic solutions at various industrial processes such as acid pickling of steel, scale removal in metallurgy, acid cleaning of boilers and oil-well acidizing, hydrochloric acids are most widely used for all these purposes. However, the strong corrosion of hydrochloric acid needs to be controlled by an appropriate corrosion inhibitor [2,3,4,5]. The organic compounds containing a heteroatom such as phosphorus, sulfur, nitrogen, or those containing multiple bonds, which are considered as adsorption centers, are effective inhibitors for the corrosion of metals [6,7,8,9,10,11,12,13]. The efficiency of these compounds as corrosion inhibitors can be attributed to a number of mobile electron pair present, the π orbital character of free electrons and the electron density around heteroatoms [14,15,16]. Many organic compounds containing pyridine and heteroatom have been used for the corrosion inhibition of steel in acidic media [17,18,19,20,21,22].

Theoretical chemistry, including quantum chemical calculation, has been proved to be a very powerful tool for studying the mechanism of corrosion inhibition [23]. This theoretical approach has been widely used to investigate a correlation between molecular structure and inhibition efficiency of an organic compound [24, 25]. Therefore, it is worthwhile to compute the structural parameters including the highest occupied molecular orbital energy (EHOMO), the lowest unoccupied molecular orbital (ELUMO), dipole moment (µ), etc.

In this work, corrosion inhibition of 4-(2-(2-(2-(2-(pyridine-4-yl)ethylthio)ethoxy)ethylthio)ethyl)pyridine (P4E4P) on mild steel in hydrochloric acid solution has been studied. Weight loss measurements, electrochemical methods, including potentiodynamic polarization and electrochemical impedance spectroscopy (EIS) have been employed to investigate the effect of concentration and temperature on the inhibiting behavior of this compound. Also, the quantum chemical method has been used for identification of adsorption type and modeling corrosion inhibition by means of quantum chemical indices.

2 Experimental Details

2.1 Materials

The material used in this study is mild steel with a chemical composition in (wt%) of 0.21% C, 0.38% Si, 0.05% Mn, 0.05% S, 0.09% P, 0.01% Al, and the remainder iron (Fe). The steel samples were pre-treated prior to the experiments by grinding with emery paper SiC (120, 600, 1200, and 2000); rinsed with distilled water.

2.2 Solutions

The aggressive solutions of 1.0 M HCl were prepared by dilution of analytical grade 37% HCl with distilled water. The concentration range of 4-(2-(2-(2-(2-(pyridine-4-yl)ethylthio)ethoxy)ethylthio)ethyl)pyridine (P4E4P) used was 1 × 10−6 M to 1 × 10−3 M.

2.3 Synthesis

A mixture of 4-vinylpyridine (21.02 g, 0.2 mol) and 2, 2-azo-bis-isobutyronitrile (AIBN) (0.082 g, 5×10−4 mol) in 100 mL of acetonitrile was added drop by drop during 30 min to 2-mercaptoethylether dissolved in 50 mL of acetonitrile. After, the mixture was stirred during 3 h in the presence of pure nitrogen (N2) at 70 °C in atmospheric pressure. The solvent and the excess of 2-mercaptoethylether were removed and the product was purified by chromatographic on a silica column (eluant, CH2Cl2), to give product P4E4P as a viscous dark red liquid, Yield 90%. A schematic representation of the synthesis is shown in Scheme 1. This inhibitor was synthesized according to A. Ousslim in our laboratory and characterized by IR spectroscopy (Fig. 1), 1H-NMR (Fig. 2) and 13C-NMR (Fig. 3).

Scheme 1
scheme 1

Structure and synthetic route of 4-(2-(2-(2-(2-(pyridine-4-yl)ethylthio)ethoxy)ethylthio)ethyl)pyridine (P4E4P)

Fig. 1
figure 1

IR spectrum of 4-(2-(2-(2-(2-(pyridine-4-yl)ethylthio)ethoxy)ethylthio)ethyl)pyridine (P4E4P)

Fig. 2
figure 2

1H NMR spectrum of 4-(2-(2-(2-(2-(pyridine-4-yl)ethylthio)ethoxy)ethylthio)ethyl)pyridine (P4E4P)

Fig. 3
figure 3

13C NMR spectrum of 4-(2-(2-(2-(2-(pyridine-4-yl)ethylthio)ethoxy)ethylthio)ethyl)pyridine (P4E4P)

1H-NMR (CDCl3, δ (ppm)): 2.77 (m, 6H); 3.68 (t, 2H); 7.14 (d, 2H); 8.46 (d, 2H), 13C-NMR (CDCl3, δ (ppm)): 31.9; 32.2; 38.2; 72.2; 120.75; 144.63; 150.26; IR (KBr, ν (cm−1)): 2999 (FF); 2870 (FF); 1600 (F); 1400 (F); 1200–1111 (FF); 904 (m); 600 (f).

2.4 Corrosion Tests

2.4.1 Gravimetric Measurements

The gravimetric measurements were carried out at a definite time interval of 6 h at room temperature using an analytical balance (precision ± 0.1 mg). The mild steel specimens used rectangular form (length = 1.3 cm, width = 1.3 cm, thickness = 0.13 cm). Gravimetric experiments were carried out in a double glass cell equipped with a thermostated cooling condenser containing 50 mL of non-de-aerated test solution. After the immersion period, the steel specimens were withdrawn, carefully rinsed with bidistilled water, ultrasonic cleaning in acetone, dried at room temperature and then weighted. The corrosion rate (ν) in mg cm−2 h−1 was calculated from the following equation [26]:

$$\nu =\frac{W}{{St}}$$
(1)
$${\eta _{{\text{WL}}}}(\% )=\frac{{{\nu _0} - \nu }}{{{\nu _0}}} \times 100$$
(2)

where W is the three-experiment average weight loss of the mild steel; S is the total surface area of the specimen; t is the immersion time, and ν0 and ν are the values of the corrosion rate without and with the addition of the inhibitor, respectively.

The fractional surface coverage θ can be easily determined from weight loss measurements by the ratio ηWL(%)/100 if one assumes that the values of ηWL(%) do not differ substantially from θ.

2.4.2 Electrochemical Measurements

The electrochemical measurements were carried out using Volta lab (Tacussel-Radiometer PGZ 100) potentiostat and controlled by Tacussel corrosion analysis software model (Voltamaster 4) at under static condition. The corrosion cell used had three electrodes. The reference electrode was a saturated calomel electrode (SCE). A platinum electrode was used as an auxiliary electrode of the surface area of 1 cm2. The working electrode was mild steel. All potentials given in this study were referred to this reference electrode. The working electrode was immersed in the test solution for 60 min to a establish steady state open circuit potential (Eocp). After measuring the Eocp, the electrochemical measurements were performed. All electrochemical tests have been performed in aerated solutions at 308 K. The EIS experiments were conducted in the frequency range with a high limit of 100 kHz and different low limit 0.01 Hz at open circuit potential, with 10 points per decade, at the rest potential, after 60 min of acid immersion, by applying 10 mV ac voltage peak-to-peak. Nyquist plots were made from these experiments. The impedance data were analyzed and fitted with the simulation ZView 2.80, equivalent circuit software.

After the AC impedance test, the potentiodynamic polarization measurements of mild steel substrate in inhibited and uninhibited solution were scanned from cathodic to the anodic direction between − 800 mV and − 200 mV, with a scan rate of 1 mV s−1. The potentiodynamic data were analyzed using the polarization VoltaMaster 4 software. The linear Tafel segments of anodic and cathodic curves were extrapolated to corrosion potential to obtain corrosion current densities (icorr). From the polarization curves obtained, the corrosion current (icorr) was calculated by curve fitting using the equation:

$$i={i_{{\text{corr}}}}\left[ {\exp \left( {\frac{{2.3\Delta E}}{{{\beta _{\text{a}}}}}} \right) - \exp \left( {\frac{{2.3\Delta E}}{{{\beta _{\text{c}}}}}} \right)} \right]$$
(3)

β a and βc are the anodic and cathodic Tafel slopes and ∆E is E − Ecorr.

The inhibition efficiency was evaluated from the measured icorr values using the following relationship:

$${h_{{\text{Tafel}}}}(\% )\,=\,\frac{{{i_{{\text{corr}}}} - {i_{{\text{corr}}({\text{i}})}}}}{{{i_{{\text{corr}}}}}}\, \times \,100$$
(4)

where icorr and icorr(i) are the corrosion current densities for the steel electrode in the uninhibited and inhibited solutions, respectively.

2.5 Computational Procedures

Density functional theory (DFT) has been recently used [27,28,29,30], to describe the interaction between the inhibitor molecule and the surface as well as the properties of these inhibitors concerning their reactivity. The molecular band gap was computed as the first vertical electronic excitation energy from the ground state using the time-dependent density functional theory (TD-DFT) approach as implemented in Gaussian 03 [31]. For these seek, some molecular descriptors, such as HOMO and LUMO energy values, frontier orbital energy gap, molecular dipole moment, electronegativity (χ), global hardness (η), softness (σ), were calculated using the DFT method and have been used to understand the properties and activity of the newly prepared compounds and to help in the explanation of the experimental data obtained for the corrosion process.

According to Koopman’s theorem [32], the ionization potential (IE) and electron affinity (EA) of the inhibitors are calculated using the following equations:

$${\text{IE}}={\text{ }} - {{\text{E}}_{{\text{HOMO}}}}$$
(5)
$${\text{EA}}={\text{ }} - {{\text{E}}_{{\text{LUMO}}}}$$
(6)

Thus, the values of the electronegativity (χ) and the chemical hardness (η) according to Pearson, operational and approximate definitions can be evaluated using the following relations [33]:

$$\chi =\frac{{{\text{IE}}+{\text{EA}}}}{2}$$
(7)
$$\eta =\frac{{{\text{IE}} - {\text{EA}}}}{2}$$
(8)

Global chemical softness (σ), which describes the capacity of an atom or group of atoms to receive electrons [28], was estimated by using the equation:

$$\sigma =\frac{1}{\eta }= - \frac{2}{{{E_{{\text{HOMO}}}} - {E_{{\text{LUMO}}}}}}$$
(9)

3 Results and Discussions

3.1 Potentiodynamic Polarization

Tafel plots generated from potentiodynamic polarization curves for mild steel in 1.0 M HCl with various concentrations (from 10−6 to 10−3 M) of P4E4P as an inhibitor at 308 K are shown in Fig. 4. A prominent decrease in the corrosion rate occurred because of the addition of P4E4P in HCl medium. The corrosion parameters, including corrosion potential (Ecorr), corrosion current density (icorr), Tafel slope values (βa and βc) and inhibition efficiency (ηTafel), obtained from the curves in Fig. 1 are summarized in Table 1.

Fig. 4
figure 4

Potentiodynamic polarization curves for mild steel in 1.0 M HCl without and with different concentrations of P4E4P

Table 1 Polarization parameters and the corresponding inhibition efficiency of mild steel corrosion in 1.0 M HCl containing different concentrations of P4E4P at 308 K

The results also indicate that the inhibition efficiencies increased with the concentration of inhibitor. Such behavior can be interpreted on the basis that the inhibitor acts by adsorbing onto the metal surface. In acidic solutions, the anodic reaction of corrosion is the passage of metal ions from the metal surface into the solution, and the cathodic reaction is the discharge of hydrogen ions to produce hydrogen gas or to reduce oxygen. The inhibitor may affect either the anodic or the cathodic reaction, or both [34]. Because the anodic Tafel slope (βa) and cathodic Tafel slope (βc) of P4E4P were found to change with inhibitor concentration, the inhibitor had thus affected both of these reactions [35]. P4E4P can thus be classified as an anodic- or cathodic-type inhibitor when the change in the Ecorr value is greater than 85 mV [36]. Because the largest displacement exhibited by P4E4P was 44 mV at 308 K (Table 1), it may be concluded that this molecule should be considered a mixed-type inhibitor, meaning that the addition of P4E4P to a 1.0 M HCl solution both reduces the anodic dissolution of mild steel and retards the cathodic hydrogen evolution reaction. The presence of increasing amounts of P4E4P led to a decrease in both the cathodic and anodic current densities. Adsorption is the mechanism that is generally accepted to explain the inhibitory action of organic corrosion inhibitors. The adsorption of inhibitors can affect the corrosion rate in two ways: (i) by decreasing the available reaction area, i.e., the so-called geometric blocking effect, and (ii) by modifying the activation energy of the cathodic and/or anodic reactions occurring in the inhibitor-free metal in the course of the inhibited corrosion process. It is a difficult task to determine which aspects of the inhibiting effect are connected to the geometric blocking action and which are connected to the energy effect. Theoretically, no shifts in Ecorr should be observed after the addition of the corrosion inhibitor if the geometric blocking effect is stronger than the energy effect [34]. Compared with the earlier studied pyridine derivative corrosion inhibitors in Table 2, P4E4P exhibited better corrosion inhibition behavior. This phenomenon is related to the molecular size and the number of heteroatoms in the structure.

Table 2 Comparison of the inhibition efficiency of P4E4P with the literature data as corrosion inhibitors for mild steel in HCl solution

3.2 Electrochemical Impedance Spectroscopy Measurements (EIS)

In order to confirm the results extracted from potentiodynamic polarization and to obtain more information about corrosion mechanisms, EIS measurements were carried out at the open circuit potential EOCP. The Nyquist plots obtained for mild steel in 1.0 M HCl in the absence and presence of various concentrations of the inhibitor are shown in Fig. 5a. It can be seen that the impedance diagrams show for all concentration a depressed capacitive loop in the high-frequency (HF) range and inductive loop (except for 5 × 10−5 M and 1 × 10−4 M) in the lower frequency (LF) range. The (HF) capacitive loops can be attributed to the charge transfer process predominantly influences the corrosion inhibition of mild steel. The diameter of capacitive loops significantly increases, suggesting that the inhibition rate increases with the addition of P4E4P. The presence of the (LF) inductive loops may be attributed to the relaxation process obtained by adsorption species like \({\text{Cl}}_{{{\text{ads}}}}^{ - }\), \({\text{H}}_{{{\text{ads}}}}^{+}\) on the electrode surface [41,42,43,44,45,46]. It may also be attributed to the adsorption of the inhibitor on the electrode surface [43, 46, 47] or to the re-dissolution of the passivity surface at low frequencies [48]. In other words, the inductive behavior at low frequencies is probably due to the adsorption of the products of the corrosion on the electrode surface (for example FeOHads and FeHads) [49].

Fig. 5
figure 5

a EIS Nyquist and b Bode diagrams for carbon steel/1.0 M HCl + different concentrations of inhibitor at 308 K

The Bode-phase diagrams (Fig. 5b) consist of a single wave crest and a portion of curve under the zero phase degree, the increase of absolute impedance at low frequencies in Bode plots confirms the higher protection with increasing the concentration of inhibitor, which is related to the adsorption of P4E4P molecules on the mild steel surface in 1.0 M HCl [50, 51]. However, it is also clear that the shapes of the impedance plots for the inhibited electrodes are not essentially different from those of the uninhibited electrode. According to the appearance of phase angle plots, increasing the concentration of inhibitor in 1.0 M HCl solutions results in more negative values of phase angle indicating superior inhibitive behavior due to P4E4P molecules adsorbed on a metal surface at higher concentrations.

Electrical equivalent circuits are generally used to model the electrochemical behavior and to calculate the impedance parameters [52]. The simple equivalent circuit for data fitting and the measured and fitted curves are shown in Fig. 6. According to the proposed equivalent circuit, the fitted curves are compared well with those from the experiment. In these circuits, Rs represents the solution resistance; Rct is the charge transfer resistance; Ra is the resistance of the adsorbed inhibitor; L is the inductance; RL is the inductance resistance; CPEd is the constant phase element of the high-frequency semicircle that can be attributed to the charge transfer process; CPEa is the constant phase element of the inhibitor film due to the adsorbed molecules of inhibitor.

Fig. 6
figure 6

Electrical equivalent circuits used to obtain the impedance parameters and comparison of experimental EIS data measured for mild steel in the absence and presence of various concentrations of inhibitor in 1.0 M HCl and the fitted data

The constant phase element CPE is introduced in the circuit instead of a pure double-layer capacitor to give a more accurate fit [24, 53]. The impedance of the CPE is expressed by the following expression:

$${Z_{{\text{CPE}}}}=\frac{1}{{A{{(iw)}^n}}}$$
(10)

where A−1 sn cm−2) is the magnitude of the CPE; w (rad s−1) is the sine wave modulation angular frequency; i2 = − 1 is the imaginary number and n is an empirical exponent which measures the deviation from the ideal capacitive behavior [54, 55]. Depending on the values of n, CPE can represent resistance (n = 0), capacitance (n = 1), inductance (n = − 1), and Warburg impedance (n = 0.5) [43, 56,57,58,59]. The values of double-layer capacitance Cdl derived from the CPEd and the values of adsorption capacitance Ca derived from the CPEa can be calculated using Eqs. (11) and (12), respectively [19].

$${C_{{\text{dl}}}}=\sqrt[{{n_{\text{d}}}}]{{{A_{\text{d}}}{{({R_{{\text{ct}}}})}^{1 - {n_{\text{d}}}}}}}$$
(11)
$${C_{\text{a}}}=\sqrt[{{n_{\text{a}}}}]{{{A_{\text{a}}}{{({R_{\text{a}}})}^{1 - {n_{\text{a}}}}}}}$$
(12)

The relaxation time constant (τd) of charge-transfer process and the time constant (τa) of the adsorption process can be calculated by Eqs. (13) and (14), respectively [19].

$${\tau _{\text{d}}}={C_{{\text{dl}}}}{R_{{\text{ct}}}}$$
(13)
$${\tau _{\text{a}}}={C_{\text{a}}}{R_{\text{a}}}$$
(14)

The related inhibition efficiency, ηZ (%), is calculated from Rp = (Rct + RL + Ra) using the following Eq. (15):

$${\eta _{\text{Z}}}(\% )=\left( {\frac{{{R_{\text{P}}} - R_{{\text{P}}}^{^\circ }}}{{R_{{\text{P}}}^{^\circ }}}} \right) \times 100$$
(15)

where \(R_{{\text{p}}}^{^\circ }\) and \({R_{\text{P}}}\) are the ac polarization resistance of mild steel electrode in the uninhibited and inhibited solutions, respectively.

The impedance parameters and the inhibition efficiency are calculated and listed in Table 3. Inspection of data in this table clearly shows that in the whole concentration range, the charge transfer resistance Rct increases with P4E4P concentration; hence the better inhibition power is achieved. This effect is connected with simultaneous decrease of double-layer capacitance (Cdl) often observed when adsorption of organic molecules on the electrode surface takes place [60]. In addition, the value of the proportional factor Ad of CPEd varies in a regular manner with inhibitor concentration. The increase of nd values with concentration can be attributed to a certain decrease in the initial surface in homogeneity resulting from the adsorption of P4E4P molecules on the most active adsorption centers at the mild steel surface [61]. Indeed the values of nd are close to unity which shows that the interface behaves nearly capacitive [62]. The time constants τd are almost dependent for the concentration of inhibitor, while show a marked tendency to increase with concentration and its values are much higher than in the uninhibited acidic solutions which means slow adsorption process [59, 63].

Table 3 Impedance parameters and inhibition efficiency values for mild steel in 1.0 M HCl containing different concentrations of P4E4P at 308 K

It can be seen that the LF inductive loop disappears for the concentration 0.05 and 0.1 mM of inhibitor, for the others concentration of inhibitor we can observe an increase in the diameter of LF inductive loop with a concentration of P4E4P. Indeed the values of RL increase and the values of inductance L are almost independent of the concentration.

For the concentration superior to 5 × 10−5 M, a two time constant can be used to describe the electrochemical impedance spectra in the presence of inhibitor. From the data in Table 3, it can be seen that the values of Ra increase with the concentration of inhibitor, but these values are lower than Rct, so the polarization resistance Rp is dominated by Rct. The values of na are lower that of nd, indicating greater energy dissipation in the adsorption layer [64]. The values of Aa, Ca, and τa are almost independent of the concentration of the inhibitor.

The related inhibition efficiency, ηZ (%), is calculated using Eq. (15) and listed in Table 3. It is clear that the increase in inhibitor concentration enhances Rp, and consequently increase the inhibition efficiency to reach their maximum value at 1 × 10−3 M (Rp = 338.94 Ω cm2, ηZ (%) = 96.5) The inhibition efficiency calculated by EIS show the same trend as those obtained from the potentiodynamic polarization methods.

3.3 Gravimetric Measurements

3.3.1 Effect of Inhibitor Concentration

The values of the corrosion rate in the absence and presence of various concentrations of P4E4P at 308 K are given in Table 4. The fractional surface coverage θ can be easily determined from the weight loss measurements by the ratio ηWL(%)/100, where ηWL(%) is inhibition efficiency and calculated using relation 2. The data obtained suggest that the P4E4P get adsorbed on the mild steel surface at studied concentrations and corrosion rates decrease with increased concentration of inhibitor. This behavior could be attributed to the increase in adsorption of P4E4P at the metal/solution interface on increasing its concentration. Indeed, the adsorption of the P4E4P could occur due to the formation of links between the d-orbital of iron atoms, involving the displacement of water molecules from the metal surface, and the lone sp2 electron pairs present on the N, S and/or O atoms [65]. The order of the inhibition efficiency from the weight loss measurements are in good agreement with those obtained from the EIS and potentiodynamic polarization methods.

Table 4 Effect of P4E4P concentration on corrosion data of steel in 1.0 M HCl

3.3.2 Effect of Temperature

In order to study the effect of temperature on the inhibition efficiency of inhibitor, Gravimetric measurements were carried out in the temperature range 308–353 K in the absence and presence of 5 × 10−5, 1 × 10−4, 5 × 10−4, and 1 × 10−3 M of inhibitor after 2 h of immersion time. The results obtained are summarized in Table 5. In hydrochloric acid media, dissolution of metal is generally accompanied with the evolution of hydrogen gas and the rise of temperature usually accelerates the corrosion reactions, resulting in a higher dissolution rate of the metal [66]. The data obtained in Table 5 show that the corrosion rate increased with increasing temperature in an uninhibited and inhibited solution, the increase in corrosion rate can be attributed to an appreciable decrease in the adsorption of the inhibitor in the mild steel surface with an increase in temperature. As adsorption decreases more desorption of inhibitor molecules occurs because these two opposite processes are in equilibrium. Due to more desorption of inhibitor molecules at higher temperatures the greater surface area of mild steel comes in contact with the acid environment, resulting in increased corrosion rates with an increase in temperature [67]. It was observed that the inhibition efficiency is almost constant and was decreased from 97.3 to 87.5% in the presence of 5 × 10−5, 1 × 10−4, 5 × 10−4, and 1 × 10−3 M of inhibitor in the temperature range studied. This behavior led to the conclusion that a protective film of this compound formed on the mild steel surface is thermally stable in the temperature range studied [68].

Table 5 Effect of temperature on the corrosion rate of mild steel in 1.0 M HCl at different concentrations in the temperature range 308–353 K at 2 h

3.3.3 Activation Parameters

Temperature can affect mild steel corrosion in acidic media in the presence and absence of inhibitor. To determine the activation energy of the corrosion process, weight loss measurements were taken at various temperatures (308–353 K) in the presence and absence of P4E4P. The corresponding results are also given in Table 5.

Figure 7 shows Arrhenius plots for the mild steel in 1.0 M HCl solutions in the absence and presence of P4E4P. The activation energies (Ea) can be expressed by the Arrhenius equation:

Fig. 7
figure 7

Arrhenius plots of Ln (ν) versus 1/T for steel in 1.0 M HCl in the absence and the presence of P4E4P at different concentrations

$$\nu =A\exp \left( { - \frac{{{E_{\text{a}}}}}{{RT}}} \right)$$
(16)

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

The plots of Ln (ν) against 1/T for mild steel in 1.0 M HCl in the absence and presence of different concentrations of P4E4P are shown in Fig. 7. From the Arrhenius equation and plots, values of activation energy can be obtained using the slopes and intercepts of the regression lines.

The process of adsorption between the metal surface and the inhibitor can sometimes be an exothermic process where the heat is given off, although in some cases, the endothermic process is encountered. The higher activation energy values indicate physical adsorption mechanism while the lower ones attribute for chemical adsorption mechanism [69]. The calculated activation energies, Ea, at different concentrations of the inhibitor are collected in Table 6. However, in our study, Ea increases with increasing the P4E4P concentration, and all values of Ea were higher than that in the absence of P4E4P. This type of inhibitor retards corrosion at ordinary temperatures but inhibition is diminished at elevated temperature. Arrhenius law predicts that corrosion rate increases with the temperature and Ea may vary with temperature (Eq. 16).

Table 6 The values of activation parameters for steel in 1.0 M HCl in the absence and the presence of different concentrations of P4E4P

The enthalpy of activation, ∆Ha, and entropy of activation ΔSa were obtained from the Eyring transition state equation:

$$\nu =\frac{{RT}}{{Nh}}\exp \left( {\frac{{\Delta S_{\text{a}}^{{}}}}{R}} \right)\exp \left( { - \frac{{\Delta H_{\text{a}}^{{}}}}{{RT}}} \right)$$
(17)

where ν is the corrosion rate; h is the Planck’s constant (6.626176 × 10−34 Js); N is the Avogadro’s number (6.02252 × 1023 mol−1); R is the universal gas constant; T is the absolute temperature; ∆Ha is the enthalpy of activation, and ∆Sa is the entropy of activation. Figure 8 shows a plot of Ln(ν/T) against 1/T. Straight lines were obtained with a slope is equal to (∆Ha/R) and the intercept is equal to (Ln (R/Nh + ∆Sa/R)), from which the values of ∆Ha and ∆Sa were calculated and listed in Table 6.

Fig. 8
figure 8

Arrhenius plots of Ln (ν/T) versus 1/T for steel in 1.0 M HCl in the absence and the presence of P4E4P at different concentrations

Examination of these data reveals that the values of ∆Ha and ∆Sa in the presence of the additives increase over that of the uninhibited solution. This implies that the energy barrier of the corrosion reaction in the presence of P4E4P increases which is expected. In the presence of the inhibitor, the value of ∆Sa increases and is generally interpreted as an increase in disorder as the reactants are converted to the activated complexes [70]. The positive sign of the enthalpy (∆Ha) reflects the endothermic nature of the mild steel dissolution process (Table 6). This result permits to verify the known thermodynamic relation between Ea and ∆Ha as shown [71] also in Table 6:

$${E_{\text{a}}} - \Delta {H_{\text{a}}}=RT$$
(18)

The calculated values are too close to RT is 2.73 kJ/mol. This result shows the inhibitor acted equally on Ea and ∆Ha.

3.3.4 Adsorption Parameters

The values of surface coverage θ corresponding to different concentrations of P4E4P in the temperature range from 308 to 353 K have been used to explain the best isotherm to determine the adsorption process. The fractional surface coverage θ can be easily determined from weight loss measurements by the ratio ηWL(%)/100 (Table 5), if one assumes that the values of ηWL(%) do not differ substantially from surface coverage (θ). As it is known that the adsorption of an organic adsorbate onto metal-solution interface can be presented as a substitutional adsorption process between the organic molecules in the aqueous solution Org(sol) and the water molecules on the metallic surface H2O(ads):

$${{\text{Org}}_{({\text{sol}})}}+n{{\text{H}}_{\text{2}}}{{\text{O}}_{({\text{ads}})}}\ll {{\text{Org}}_{({\text{ads}})}}+n{{\text{H}}_{\text{2}}}{{\text{O}}_{({\text{sol}})}}$$
(19)

where Org(sol) and Org(ads) are the organic molecules in the aqueous solution and adsorbed on the metallic surface, respectively; H2O(ads) is the water molecules on the metallic surface; n is the size ratio representing the number of water molecules replaced by one molecule of organic adsorbate. When the equilibrium of the process described in this equation is reached, it is possible to obtain different expressions of the adsorption isotherm plots, and thus the surface coverage degree (θ) can be plotted as a function of the concentration of the inhibitor under test [72]. The Langmuir adsorption isotherm was found to give the best description of the adsorption behavior of P4E4P. In this case, the surface coverage (θ) of the inhibitor on the steel surface is related to the concentration of inhibitor in the solution according to the following equation:

$$\frac{\theta }{{1 - \theta }}={K_{\text{ads}}}{C_{\text{inh}}}$$
(20)

Rearranging this equation gives

$$\frac{{{C_{\text{inh}}}}}{\theta }=\frac{1}{{{K_{\text{ads}}}}}+{C_{\text{inh}}}$$
(21)

where θ is the surface coverage degree; Cinh is the inhibitor concentration in the electrolyte, and Kads is the equilibrium constant of the adsorption process. The Kads values may be taken as a measure of the strength of the adsorption forces between the inhibitor molecules and the metal surface [73]. To calculate the adsorption parameters, the straight lines were drawn using the least squares method. The experimental (points) and calculated isotherms (lines) are plotted in Fig. 9. The results are presented in Table 7. A very good fit is observed with a regression coefficient (R2) up to 0.9999 and the obtained lines have slopes very close to unity, which suggests that the experimental data are well described by Langmuir isotherm and exhibit single-layer adsorption characteristic [74]. This kind of isotherm involves the assumption of no interaction between the adsorbed species and the electrode surface. From the intercepts of the straight lines Cinh/θ—axis, the Kads values were calculated and given in Table 7.

Fig. 9
figure 9

Langmuir’s isotherm adsorption model of P4E4P on the mild steel surface in 1.0 M HCl at different temperatures

Table 7 Thermodynamic parameters of adsorption of P4E4P on the mild steel surface at different temperatures

The obtained values of Kads are related to the standard free energy of adsorption (\(\Delta G_{{{\text{ads}}}}^{^\circ }\)) according to the expression in Eq. 22 [75]:

$${K_{{\text{ads}}}}=\frac{1}{{55.5}}\exp \left[ {\frac{{ - \Delta G_{{{\text{ads}}}}^{^\circ }}}{{RT}}} \right]$$
(22)

Equation 22 can also rearrange to

$$\Delta G_{{{\text{ads}}}}^{^\circ }= - RTLn\left( {55.5{K_{{\text{ads}}}}} \right)$$
(23)

A thermodynamic model is very useful to explain the adsorption phenomenon of inhibitor molecule. The adsorption heat could be calculated according to the Van’t Hoff equation [72, 76]:

$${\text{Ln}}\left( {{K_{{\text{ads}}}}} \right)= - \frac{{\Delta H_{{{\text{ads}}}}^{^\circ }}}{{RT}}+{\text{constant}}$$
(24)

where \(\Delta G_{{{\text{ads}}}}^{^\circ }\)and Kads are the adsorption heat and adsorptive equilibrium constant, respectively.

To obtain the adsorption heat, the regression between(Kads) and 1/T was dealt with. Figure 10 is the straight line Ln(Kads) versus 1/T. The adsorption heat (\(\Delta {\kern 1pt} {\kern 1pt} H_{{}}^{{}}\)) can be approximately regarded as the standard adsorption heat (\(\Delta H_{{{\text{ads}}}}^{^\circ }\)) under the experimental conditions [75, 77].

Fig. 10
figure 10

The relationship between Ln (Kads) and 1/T for mild steel in 1.0 M HCl solution containing different concentrations of P4E4P

The negative value of \(\Delta G_{{{\text{ads}}}}^{^\circ }\) (Table 7) means that the adsorption of P4E4P on mild steel surface is a spontaneous process, and furthermore the negative values of \(\Delta G_{{{\text{ads}}}}^{^\circ }\) also show the strong interaction of the inhibitor molecule onto the mild steel surface [78, 79].

Generally, values of \(\Delta G_{{{\text{ads}}}}^{^\circ }\) around − 20 kJ mol−1 or lower are consistent with the electrostatic interaction between the charged molecules and the charged metal (physisorption). Those more negative than − 40 kJ mol−1 involve charge sharing or transfer from the inhibitor molecules to the metal surface to form a coordinate type of bond (chemisorption) [80, 81]. The obtained \(\Delta G_{{\text{ads}}}^{o}\) values in the studied temperature domain are in the range of − 48.23 to − 42.90 kJ mol−1, indicating, therefore that the adsorption mechanism of the P4E4P onto mild steel in1.0 M HCl solution is mainly due to chemisorption (Table 7). On the other hand, the obtained values of \(\Delta G_{{\text{ads}}}^{^\circ }\) generally show a regular dependence on temperature, indicating a good correlation among thermodynamic parameters. The negative value of \(\Delta H_{{\text{ads}}}^{^\circ }\) also shows that the adsorption of inhibitor is an exothermic process [82]. Generally, an exothermic process signifies either physical or chemisorption while the endothermic process is attributable unequivocally to chemisorption [83]. In an exothermic process, physisorption is distinguished from chemisorption by considering the absolute value of a physisorption process is lower than 40 kJ mol−1 while the adsorption heat of a chemisorption process approaches 100 kJ mol−1 [84]. In the present case, the standard adsorption heat − 4.817 kJ mol−1 shows that a comprehensive adsorption (physical adsorption) might occur [72]. \(\Delta H_{{\text{ads}}}^{^\circ }= - \,{\text{4.817 kJ mol}}^{ - {\text{1}}}\) found by the Van’t Hoff equation may be also evaluated by the Gibbs-Helmholtz equation, which is defined as follows:

$${\left[ {\frac{{\partial (\Delta G_{{\text{ads}}}^{^\circ }/{\kern 1pt} {\kern 1pt} T)}}{{\partial T{\text{ }}}}} \right]_{{\kern 1pt} {\kern 1pt} P}}={\kern 1pt} - {\kern 1pt} {\kern 1pt} \frac{{\Delta H_{{\text{ads}}}^{^\circ }}}{{\mathop T\nolimits^{{{\kern 1pt} 2}} {\text{ }}}}$$
(25)

which can be arranged to give the following equation:

$$\frac{{\Delta {\kern 1pt} {\kern 1pt} G_{{\text{ads}}}^{^\circ }}}{{{\kern 1pt} \,T{\text{ }}}}{\kern 1pt} {\text{ }}=\,\,\,\frac{{\Delta {\kern 1pt} {\kern 1pt} H_{{\text{ads}}}^{^\circ }}}{{{\kern 1pt} T{\text{ }}}}{\kern 1pt} {\kern 1pt} +{\kern 1pt} {\kern 1pt} A\,\,$$
(26)

The standard adsorption entropy \(\Delta S_{{{\text{ads}}}}^{^\circ }\) may be deduced using the thermodynamic basic equation:

$$\Delta G_{{ads}}^{^\circ }=\Delta H_{{ads}}^{^\circ } - T\Delta S_{{ads}}^{^\circ }$$
(27)

The variation of \(\Delta G_{{{\text{ads}}}}^{^\circ }/T\) with 1/T gives a straight line with a slope that equals \(\Delta H_{{{\text{ads}}}}^{^\circ }~={\text{ }} - {\text{4.819 KJ mol}}^{ - {\text{1}}}\) (Fig. 11). It can be seen from the figure that \(\Delta G_{{{\text{ads}}}}^{^\circ }~/T\) decreases with 1/T. The value of the enthalpy of adsorption found by the two methods such as Van’t Hoff and Gibbs–Helmholtz relations is in good agreement.

Fig. 11
figure 11

Relationship between \(\Delta G_{{{\text{ads}}}}^{^\circ }~/T\) and the reverse of absolute temperature

The values of \(\Delta S_{{\text{ads}}}^{^\circ }\) are positive in the adsorption process indicating an increase in solvent entropy [85]. The positive values of \(\Delta S_{{\text{ads}}}^{^\circ }\) suggest that the adsorption is coupled with an increase in the system disorder due to the adsorption of the inhibitor on the mild steel surface [86].

3.4 Computational Procedures

Quantum chemical calculations were done in order to discuss the adsorption mode through light on the inhibitor molecular structure. It is well known that the N-heterocyclic compound could be protonated in the acid solution. According to some quantum chemical studies about protonated N-heterocyclic inhibitor in HCl solution [87], the proton affinity is clearly favored toward the hetero N atom of N-heterocyclic ring. The calculated value of protonated affiliation energy (PA) confirms that P4E4P is easily protonated by H+.

Figure 12 shows the optimized molecular structures of neutral and protonated P4E4P. It is well known that organic inhibitor can form coordination bonds between the unshared electron pairs of O, N, or S atom and the empty p-orbitals of Fe atom. The larger negative charge of the atom, the better is the action as an electronic donor. Mulliken charges of the atoms are listed in Table 8. By careful examination of the values of Mulliken charges, the larger negative atoms are found in N1, N19, and O42, which are active adsorptive centers. For protonated P4E4P, the Mulliken charge of O42 becomes more negative than N1 and N19. This result implies that if the inhibitor is protonated, O42 exhibits more active than N1 and N19. But the difference between the two protonated and non-protonated forms is more superior in the case of N19, this result is confirmed by the calculation of PA, and hence the preferred site for protonation is the N19 atom.

Fig. 12
figure 12

Optimized molecular structures of the neutral and protonated P4E4P: a P4E4P; b p-P4E4P

Table 8 Quantum chemical parameters of Mulliken charge, for neutral and protonated P4E4P molecules

The optimized geometries of the P4E4P and p-P4E4P including their HOMO and LUMO distribution density were in Fig. 13. The distribution HOMO is mainly localized on a (ethylthio) ethyl, but the LUMO distribution is mainly located on a pyridine ring.

Fig. 13
figure 13

The HOMO and LUMO orbitals of optimized P4E4P (a) and p-P4E4P (b) molecules

In Table 9, the calculated EHOMO, ELUMO, ∆E, χ, η, and µ were given. The results obtained from different quantum chemical calculation methods showed the same trend.

Table 9 The calculated quantum chemical parameters for the neutral and protonated species of P4E4P

The theory of frontier molecular orbital theory suggests that the formation of a transition state is due to an interaction between HOMO and LUMO orbitals of reacting species [88]. The EHOMO energy is associated with electron donating ability of the molecule. The high EHOMO proves that the molecule has a trend to donate electrons to an acceptor molecule’s LUMO orbital [89,90,91]. In Table 9, all EHOMO values were negative. Arslan et al. [92] suggested that the negative EHOMO values were evidence of physical adsorption. The low ELUMO value indicates that the electron accepting ability of the molecule is very high [23, 93]. The p-P4E4P has lower ELUMO than P4E4P (Table 9). The ∆E values suggest that the neutral species is also more reactive than the protonated species. It is, therefore, reasonable to infer that the protonated species of metronidazole are less likely to interact with the metal surface as compared to the neutral species. The higher µ for p-P4E4P in comparison to P4E4P showed that the dipole–dipole interaction of p-P4E4P and metal surface higher.

4 Conclusions

The inhibition of 4-(2-(2-(2-(2-(pyridine-4-yl)ethylthio)ethoxy)ethylthio)ethyl)pyridine (P4E4P) for the corrosion of mild steel in 1.0 M HCl solution was evaluated by experimental measurements and theoretical calculations. P4E4P exhibits good inhibition property and its efficacy increases with the increasing inhibitor concentrations. However, the increase in temperature obviously decreases the protection efficiency of the additive. Potentiodynamic polarization tests indicate that P4E4P acts as a mixed-type inhibitor. The adsorption process accords with the Langmuir adsorption model. EIS curves imply that inhibitor increases the charge transfer resistances and leads to a decrease in the double-layer value, suggesting that inhibitor acts through the adsorption on the steel surface. Data obtained from quantum chemical calculations using DFT at the B3LYP/6-31G level of theory were correlated to the inhibitive effect of P4E4P. Both experimental and theoretical calculations are in agreement.