1 Introduction

Carbon steel is largely used in the construction of storage tanks, heat exchangers, mechanical towers, pipelines, etc. because of its excellent physical and mechanical properties. The major inconvenient (setback) in the use of steel is that it corrodes very rapidly when it comes in contact with aggressive acid solutions. Acidic solutions are widely used in acid cleaning, acid descaling, oil well acidification and enhanced oil recovery techniques in petroleum and other industries which causes severe economic and safety problems due to corrosion [1, 2]. The use of inhibitors is one of the most effective, practical and economic methods for the protection of metals against corrosion, especially in acidic environment. The properties of organic inhibitors render these compounds an interesting for corrosion inhibition. Moreover, heteroatoms, π bonds, and aromatic rings are three factors which contribute to the efficiency of the adsorption of N-heterocyclic compounds onto carbon steel surfaces, and, consequently, corrosion inhibition of carbon steel [3,4,5]. A large number of synthetic organic compounds are toxic and cause health hazards [6]. Therefore, their replacement by the environmentally benign inhibitors is desirable. From the standpoint of safety, the development of non-toxic and effective inhibitors is of considerable interest. Benzodiazepines are effective in minimizing anxiety and stress, and have fewer and less severe [7, 8]. Studies have shown that such compounds are widely involved in several fields such as pharmacology [9], anticancer [10], and anxiolytic agent [11]. The structural importance of the benzodiazepine class of organic compounds and the utility of this kind of compounds as corrosion inhibitors have led to their recognition by the chemistry community as privileged structures. Although limited works have been done on their use as corrosion inhibitors compared to the large numbers of reports on the pharmacological activities, this ring system has demonstrated considerable utility in corrosion inhibition. Recently, Niouri et al. [12] have studied the corrosion inhibition of mild steel in HCl solution by two synthesized benzodiazepine derivatives (abbreviated as BZD = 2O and BZD = 2S) and pointed out that they are good inhibitors with BZD = 2S showing better protection even at higher temperatures. The same research team investigated the corrosion inhibition of mild steel in hydrochloric acid solution by three benzodiazepine derivatives and demonstrated experimentally their good inhibitive performances [13]. More recently, Laabaissi et al. [14] have studied the utility of a benzodiazepine derivative as a corrosion inhibitor for mild steel in phosphoric acid, and their results suggest that the tested compound is a mixed-type inhibitor and its adsorption obeyed the Langmuir adsorption isotherm.

The aim of the present investigation is to synthesize two new benzodiazepine compounds namely (BZD-1) and (BZD-2), and to evaluate their inhibition performance for mild steel corrosion in 1 M HCl solution. The molecular structures of the investigated organic compounds are shown in Table 1. Weight loss, potentiodynamic polarization, electrochemical impedance spectroscopic techniques were employed. Density functional theory (DFT) calculations and molecular dynamic (MD) simulations were performed on benzodiazepine derivatives in the objective to determine the relationship between the inhibition properties and their molecular structure. The findings are favorable to understand the anticorrosive mechanism and aid in the fast development of similar organic inhibitors.

Table 1 Molecular structures, names and abbreviations of the studied benzodiazepine molecules

2 Experimental Procedure

2.1 Synthesis of 1-Ethyl-4-(2-oxopropylidene)-1,2,4,5-tetrahydro-2H-1,5-benzodiazepine-2-one

To a solution of (4E)-2-oxopropylidene-1,5-benzodiazepine-2one (0.01 mol) in N,N-dimethylformamide (60 ml), we added K2CO3 (0.01 mol), ethyl bromide (0.02 mol), and tetra n-butylammonium bromide (0.001 mol). The reaction mixture was stirred at room temperature for 48 h. The solution was filtered and the solvent was removed under reduced pressure. The residue was purified on a silica-gel column to give the title compound (Scheme 1) as yellow powder.

Scheme 1
scheme 1

Synthesis of 1-ethyl-4-(2-oxopropylidene)-1,2,4,5-tetrahydro-2H-1,5-benzodiazepine-2-one

MS: m/z: 244.1H NMR (CDCl3, δppm): 3,10 (2H, S), 5,25 (1H,S), 2,10 (3H,S), mp: 110–112 °C.

2.2 Synthesis of 1-Octyl-4-(2-oxopropylidene)-1,2,4,5-tetrahydro-2H-1,5-benzodiazepine-2-one

To a solution of (4E)-2-oxopropylidene-1,5-benzodiazepine-2one (0.01 mol) in N,N-dimethylformamide (60 ml), we added K2CO3 (0.01 mol), octane bromide (0.02 mol) and tetra n-butylammonium bromide (0.001 mol). The reaction mixture was stirred at room temperature for 48 h. The solution was filtered and the solvent was removed under reduced pressure. The residue was purified on a silica-gel column to obtain the compound (Scheme 2) as orange oil.

Scheme 2
scheme 2

Synthesis of 1-octyl-4-(2-oxopropylidene)-1,2,4,5-tetrahydro-2H-1,5-benzodiazepine-2-one

The compound was characterized by 1H NMR (CDCl3, δppm): 5, 34 (1H, s), 4,39 (2H, t), 1,41 (2H, c), 4,0 (1H, s), 1,97 (3H, s), 5,34 (3H, s).

2.3 Materials and Sample Preparation

The steel samples used in this study are the carbon steel (Euro norm: C35E carbon steel and US specification: SAE 1035) with a chemical composition (in wt%) of 0.370% C, 0.230% Si, 0.680% Mn, 0.016% S, 0.077% Cr, 0.011% Ti, 0.059% Ni, 0.009% Co, 0.160% Cu and the remainder iron (Fe). Prior to each experiment, a freshly prepared solution was used, and the surface of CS was abraded and polished mechanically with 600, 800, 1000, and 1200 grade of emery paper, washed with double distilled water followed by acetone and finally dried in room temperature.

The aggressive solutions, 1 M HCl, were prepared by dilution of analytical grade 37% HCl with distilled water. The concentration range of inhibitors employed was 10−6–10−3 M in 1 M HCl and the solution without inhibitor was prepared for comparison. All solutions were prepared using distilled water.

2.4 Weight Loss Measurements

Gravimetric measurements were carried out for different concentrations (10−3 to 10−6 M) of inhibitors at 303K using an analytical balance (precision ± 0.1 mg). The pre-weighed metal samples were immersed in blank solution of 1 M HCl as well as those containing different concentrations of tested inhibitors. The weight loss measurements are carried out in a double-walled glass cell equipped with a thermostated cooling condenser. The solution volume is 100 cm3. After 6 h of immersion, the steel specimens were withdrawn, carefully rinsed with bi-distilled water, cleaned with acetone, dried at room temperature and then weighed. The difference in weight of the specimen before and after immersion was taken as the mass loss. The experiments were conducted in triplicate and the average mass loss was recorded.

2.5 Electrochemical Studies of Corrosion Inhibition

In order to investigate the effect of the present benzodiazepine derivatives, EIS and PDP were performed in the concentration range of 10−6 M to 10−3 M at 303 K. The electrochemical experiment consisted of a three-electrode configuration i.e., an electrochemical cell comprised by a saturated calomel reference electrode (SCE), platinum as counter electrode and a carbon steel as working electrode. Electrochemical measurements were carried out using Volta lab poteniostat (Tacussel-Radiometer PGZ100). Before each experiment, the working electrode was immersed in the test solution for 30 min at open circuit potential (OCP) to reach the steady state condition. To apply the electrochemical Tafel extrapolation, a polarization study was carried out in the range of the corrosion potential from − 600 to − 200 mV/SCE. The scan rate was 1 mV s−1 as this value allowed the quasi-stationary state measurements. Electrochemical parameters such as corrosion current density (icorr), corrosion potential (Ecorr), and cathodic (βc) and anodic (βa) Tafel slopes were derived by the extrapolation. The EIS experiment was carried out in the frequency range of 10 mHz to 100 kHz with amplitude of the voltage perturbation of 10 mV AC peak-to-peak at OCP. Nyquist plots were made from these experiments. The impedance data were analyzed with the simulation ZView 2.80, software. Charge transfer resistance (Rct), double-layer capacitances (Cdl), and other parameters were calculated by the fitting Nyquist plots.

2.6 DFT Calculations

DFT calculations were considered a very useful technique to probe the inhibitor/surface interaction as well as to analyze the experimental data due to its high accuracy within a short span of time. The molecules of BDZ-1 and BDZ-2 were modeled by the quantum chemical calculations with the aid of Gaussian03 software [15]. Full geometry optimizations were carried out by B3LYP combination functional at the 3–21 G basis set. All quantum chemical parameters were derived based on the electronic parameters of the most stable conformer of the molecules. The frontier molecular orbital (FMO) energies, that is, the highest occupied molecular orbital energy (EHOMO) and the lowest unoccupied molecular energy (ELUMO) were calculated. In the current literature, Koopmans’ theorem [16] was employed as an approximate approach to predict the ionization potential (IP) and electron affinity (EA) of molecules. In the light of above mentioned theory, IP and EA correspond to the negative values of HOMO and LUMO orbital energies, respectively, i.e., HOMO energy is related to the ionization potential (IP), whereas the LUMO energy is linked to the electron affinity (EA), as follows:

$${\text{IP}}= - {E_{{\text{HOMO}}}}$$
(1)
$${\text{EA}}= - {E_{{\text{LUMO}}}}.$$
(2)

Other parameters such as the energy gap (ΔE), chemical hardness (η), electronegativity (χ), global softness (σ), and the fraction of electrons transfer (ΔN) from the inhibitors to the metal atom were computed respectively according to the equations:

$$\Delta E={E_{\rm LUMO}} - {E_{\rm HOMO}}$$
(3)
$$\eta =\frac{{\rm IP - EA}}{2}$$
(4)
$$\chi =\frac{{\rm IP+EA}}{2}$$
(5)
$$\Delta N=\frac{{\phi - {\chi _{{\text{inh}}}}}}{{2({\eta _{{\text{Fe}}}}+{\eta _{{\text{inh}}}})}},$$
(6)

where \((\phi )\) and \({\chi _{{\text{inh}}}}\) denote the work function and absolute electronegativity of iron and inhibitor molecule, respectively, \({\eta _{{\text{Fe}}}}\) and \({\eta _{{\text{inh}}}}\) denote the absolute hardness of iron and the inhibitor molecule, respectively. The \({\eta _{{\text{Fe}}}}\) value was taken as 0 eV/mol for bulk Fe atom in accordance with the Pearson’s electronegativity scale [17]. The \((\phi )\) values obtained from DFT calculation are 3.91, 4.82, and 3.88 eV for the Fe (100), Fe (110), and Fe (111), respectively. In this study, we have chosen Fe (110) surface due to its high stabilization energy and packed structure [18].

2.7 Molecular Dynamics Simulations Study

The molecular dynamics (MD) simulations were adopted to reasonably predict the most favorable configuration of the studied inhibitors (BDZ-1 and BDZ-2) on a clean iron surface. (i.e., when adsorption process has reached equilibration). In this present investigation, MD simulations of the tested benzodiazepine derivatives were carried out in a simulation box with periodic boundary conditions using Materials Studio7.0 software (Accelrys, Inc.) [19]. As the three kinds of Fe surfaces (110, 100, 111), Fe (111) and Fe (100) surfaces have relatively open structures while Fe (110) is a density packed surface and has the most stabilization, so we choose Fe (110) surface to simulate the adsorption process [18]. The first step in this computational study is the preparation of a model of molecules which will adsorb on the surface with optimized geometry. The clean Fe (110) plane was cleaved from Fe crystal, the surface was then optimized to the energy minimum. The Fe (110) surface was enlarged to a (12 × 12) supercell to provide a large surface for the interaction of the inhibitors. After that, a vacuum slab with zero thickness was built above the Fe (110) plane. A supercell with a size of a = b = 24.82 Å c = 25.14 Å contains 491 H2O, 9Cl, 9H3O+ and a molecule of tested benzodiazepine derivatives was created. The MD simulation is performed under canonical ensemble (NVT) at a temperature of 298 K, a time step of 1.0 1 fs and simulation time of 100 ps. All simulations were carried out using the condensed-phase optimized molecular potentials for atomistic simulation studies (COMPASS) force field [20]. In simulation system, the interaction energy between the Fe surface and the inhibitor was calculated according to the following Eq. (7):

$${E_{{\text{interaction}}}}={E_{{\text{total}}}} - ({E_{{\text{surface}}+{\text{solution}}}}+{E_{{\text{inhibitor}}}}),$$
(7)

where \({E_{{\text{total}}}}\) is the total energy of the simulation system; \({E_{{\text{surface}}+{\text{solution}}}}\) is the energy of iron surface and solution without the inhibitor, and \({E_{{\text{inhibitor}}}}\) is the energy of the free inhibitor molecule.

3 Results and Discussion

3.1 Weight Loss Technique

Weight loss technique being the easiest method is considered as the “gold standard” corrosion testing. But, since mass can be measured only to about 0.1 mg, the sensitivity of weight loss measurements is limited. This method consists in immersing carbon steel samples in 1 M HCl solutions without and with different concentrations of inhibitors tested at 303 K. The efficiency is determined after 6 h of immersion in a thermostated bath. The corrosion rate and efficiency values obtained from the weight loss method in the absence and presence of various concentrations of BZD-1 and BZD-2 are given in Table 2. The following equations were used to calculate the inhibition efficiency \({\eta _{{\text{WL}}}}(\% )\) and the surface coverage (θ) [21]:

Table 2 Corrosion rate and inhibitory efficiencies data in the absence and presence of the inhibitors tested at different concentrations in 1 M HCl at 303 K
$${\eta _{WL}}\;(\% )=\left[ {\frac{{{W^0} - W}}{{{W^0}}}} \right] \times 100$$
(8)
$$\theta =\left[ {\frac{{{W^0} - W}}{{{W^0}}}} \right],$$
(9)

where W and W0 are the corrosion rates of carbon steel in the absence and the presence of benzodiazepine derivatives at different concentrations, respectively, and θ is the degree of surface coverage of the inhibitors.

From the data (Table 2), we note that for all the inhibitors, the corrosion rate of the carbon steel decreases with the rise of the concentration, and consequently, the protection efficiency increases. This can be attributed to the adsorption of the inhibitors on the carbon steel surface, involving the displacement of water molecules from the metal surface, and the lone sp2 electron pairs present on the heteroatoms (N and O) and π-orbitals in aromatic groups, blocking the active sites in the carbon steel surface and hence decreasing the corrosion rate of carbon steel [22]. Generally, the variation of inhibition efficiency depends mainly on the type and nature of the substitution in the inhibitory molecule. It is apparent that the adsorption of these compounds on the metal surface can occur directly on the basis of donor acceptor interaction between the lone pairs of the heteroatom and extensively delocalized π-electrons of the benzodiazepine derivatives and the vacant d-orbital of iron surface atoms [23]. The ability of a molecule to adsorb on the surface of carbon steel depends on the presence of the long carbon chain in BZD-2, which results the improvement in inhibition efficiency compared to BZD-1 [24]. The inhibitors tested can be classified according to their inhibition efficiencies in the following decreasing order: BZD-2 > BZD-1.

3.2 Electrochemical Impedance Spectroscopic (EIS) Studies

The electrochemical impedance spectroscopy (EIS) method is one of the simplest and reliable techniques which provide very valuable mechanistic and kinetic information about reaction occurring on electrode surface. The study of carbon steel in 1 M HCl solution in the absence and presence of various concentrations of both benzodiazepines using EIS method was made at open circuit potential at a temperature of 303 K. Nyquist plots of carbon steel in uninhibited and inhibited acidic solutions (1 M HCl) containing various concentrations of the prepared inhibitors were given in Fig. 1.

Fig. 1
figure 1

Nyquist plot for carbon steel corrosion in 1 M HCl in the absence and presence of different concentrations of benzodiazepine derivates for 0.5 h immersion time at 303 K

When analyzing the Nyquist diagrams, it is observed that Nyquist diagrams are in the form of a single capacitive loop, indicating the formation of electrical double layer at the surface-solution interface and that the corrosion of the carbon steel is controlled mainly by the charge transfer process [25, 26]. It is also noted that the diameter of the capacitive loop in the inhibited solutions is greater than that in the uninhibited solution, indicating that the corrosion of the carbon steel in 1 M HCl is delayed by the presence of the inhibitors. Thus, the diameter of the loop increases with increasing inhibitor concentration. This is attributed to the increase in the surface coverage of the molecules of inhibitors on the carbon steel surface with the concentration of the inhibitors. To get the results from Nyquist plots, the impedance spectra were analyzed by fitting the experimental data to equivalent circuit model which is shown in Fig. 2. It consists of solution resistance (Rs), a charge transfer resistance (Rct), and a constant phase element (CPE). This circuit gives an exact fit to all experimental impedance data for our inhibitors. Charge transfer resistance (Rct), double-layer capacitances (Cdl), and other parameters were calculated by fitting the Nyquist plots and given in Table 3.

Fig. 2
figure 2

Equivalent circuit model used to fit the EIS data

Table 3 EIS data for carbon steel corrosion in 1 M HCl without and with inhibitors for 0.5-h immersion time

The double-layer capacitance (Cdl) and inhibition efficiency are calculated as the following formula:

$${C_{{\text{dl}}}}=\sqrt[n]{{Q \times R_{{{\text{ct}}}}^{{1 - n}}}},$$
(10)

where Q is the constant phase element (CPE) and n is the CPE exponent which gives details about the degree of surface inhomogeneity.

$${\eta _{{\text{EIS}}}}(\% )=\left[ {\frac{{{R_{{\text{ct}}({\text{inh}})}} - {R_{{\text{ct}}}}}}{{{R_{{\text{ct}}({\text{inh}})}}}}} \right],$$
(11)

where \({R_{{\text{ct(inh)}}}}\) and \({R_{{\text{ct}}}}\) are the charge transfer resistance values with and without inhibitor, respectively.

Analysis of the results of Table 3 reveals that the Rct values increase significantly while the Cdl values decrease with the increase in inhibitors concentration. It is also noted that the highest Rct values obtained are associated to a slower corrosion system due to adsorption of inhibitors on metal surface which isolate the metal from electrolyte and protect it from corrosion [27, 28]. This indicates that these compounds inhibit in an efficient way the corrosion reaction and they are largely higher than that of blank solution and reached a value of 778.6 Ω cm2 at 10−3 M in the case of BZD-2. On the other hand, as shown in Table 3, the decrease of Cdl values with the increasing of inhibitor concentration could demonstrate that the thickness of electric double layer increases or the dielectric constant reduces or by combination of both [27, 28]. In addition, according to Table 3, the decreased values of n could result from adsorption of the inhibitors and no uniform film formation on the metal surface [29, 30] which hindered the diffusion of corrosion media onto the metal surface and consequently protected the metal. Also, it is clear from these data (Table 3) that the value of inhibition efficiency obtained from EIS measurements for the tested inhibitors increases by increasing benzodiazepine derivatives concentrations and increases by the order: BZD-2 > BZD-1. Therefore, these results suggest that BZD-2 could serve as an effective corrosion inhibitor for carbon steel in 1 M HCl medium compared with BZD-1.

3.3 Potentiodynamic Polarization Technique

Polarization method is an important tool of electrochemical corrosion studies which describes the relationship between electrode potential and electric current in the process of polarization. The polarization measurements were carried out in order to study both the kinetics of anodic and cathodic reactions. The polarization curves of the carbon steel in the 1 M HCl solution in the absence and in the presence of the various concentrations of the benzodiazepine derivatives are illustrated in Fig. 3. The values of corrosion potential (Ecorr), corrosion current density (icorr), and anodic and cathodic Tafel slopes (βa and βc) were evaluated from anodic and cathodic regions of Tafel plots and presented in Table 4. The inhibition efficiency \({\eta _{{\text{PDP}}}}(\% )\) was evaluated from the measured icorr values using the following equation [31]:

Fig. 3
figure 3

Polarization curves for carbon steel corrosion in 1 M HCl in the absence and presence of different concentrations of benzodiazepine derivates for 0.5-h immersion time at 303 K

Table 4 Polarization data for carbon steel corrosion in 1 M HCl without and with different concentrations of benzodiazepine derivates for 0.5-h immersion time at 303 K
$${\eta _{{\text{PDP}}}}(\% )=\left[ {1 - \frac{{{i_{{\text{corr}}}}}}{{i_{{{\text{corr}}}}^{0}}}} \right] \times 100$$
(12)

where \({i_{{\text{corr}}}}\) and \(i_{{{\text{corr}}}}^{0}\) are the corrosion current density in inhibited and uninhibited acid, respectively.

It can be seen from the results (Table 4; Fig. 3) that addition of benzodiazepine derivatives to the acid media affected both the anodic and cathodic parts of the Tafel slopes and the potentiodynamic polarization curves are parallel and similar in the absence and presence of different concentrations of the studied inhibitors. This finding indicates that inhibitors undertaken in the present study successfully inhibited both anodic oxidative dissolution of carbon steel and cathodic reductive evolution of hydrogen [32]. This suppression of corrosion process can be attributed to adsorption on the metal surface through free electron pair from nitrogen and oxygen as well as π-electrons of each inhibitor and hence blocking the active sites of metal surface [33]. An inhibitor can be classified as anodic and cathodic type if the shift value in Ecorr in the presence of inhibitor is > 85 mV with respect to Ecorr of blank [34, 35] in either side and if the Ecorr shift is < 85 mV, it can be regarded as mixed type. In the present case, we note a slight displacement of the corrosion potential with respect to that of the uninhibited solution, after the addition of an increasing concentration of the benzodiazepine derivatives. This shift of Ecorr does not exceed 41 mV for all concentrations of BZD-1 and BZD-2, suggesting that they act as mixed-type inhibitors with a better cathodic inhibition performance. Also, it is evident from the plots that the presence of inhibitors lowers the corrosion current density. The maximum decrease in current density from 507 to 19 µA cm−2 was observed for BZD-2 indicating that BZD-2 is the best inhibitor. The decreased values of icorr in the presence of inhibitors are attributed due to blocking of the active centers present on the metallic surface [36]. Inspection of Table 4 revealed that the \({\eta _{{\text{PDP}}}}(\% )\) increased sharply with the increase in the concentration of BZD-1 and BZD-2, while BZD-2 performed better inhibition function (96.63%) compared with BZD-1 (93.26%) at 10−3 M. The result was in keeping with the previous study of weight loss and electrochemical impedance spectroscopy measurements.

3.4 Adsorption Studies

It is generally accepted that the efficiency of the benzodiazepines mainly depends on the adsorption ability of these compounds on the steel surface. Therefore, adsorption isotherms can provide important and reliable information on the interaction of inhibitors and corresponding active sites on the metal surface. So, it is essential to know the mode of adsorption and the adsorption isotherm which gives this information about the interaction between the molecules and metal surface. For it, the experimental data obtained from potentiodynamic polarization measurements were applied to different adsorption isotherm equations such as the Langmuir, Freundlich, Temkin, and Frumkin. The Langmuir adsorption isotherm gave the best description of adsorption behavior of investigated compounds in the present study. A plot of Cinh/θ versus Cinh gives a straight line represented in Fig. 4 for which the correlation coefficient R2 value was found to be close to 1, showing that the adsorption of benzodiazepines obeys Langmuir isotherm model. According to this model, the degree of surface coverage (θ) is related to the inhibitor concentration (C) by the following relation [37]:

Fig. 4
figure 4

Langmuir adsorption isotherm for the adsorption of inhibitors tested on carbon steel in 1 M HCl for 0.5-h immersion time at 303 K

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

where θ is the surface coverage of benzodiazepine derivatives on carbon steel, which can be calculated by the ratio of \(\frac{{{\eta _{{\text{PDP}}}}}}{{100}}\) for different inhibitor concentrations; Cinh is the concentration of studied inhibitors, and Kads is the equilibrium constant of the adsorption process which can be calculated from the intercept of the plot of Cinh/θ versus Cinh (Fig. 5). The Kads related to the standard free energy of adsorption (\(\Delta G_{{{\text{ads}}}}^{{\text{0}}}\)) by the following relation [38]:

Fig. 5
figure 5

Optimized molecular structures at B3LYP/6-21G of studied inhibitors, BZD-1 and BZD-2

$$\Delta G_{{{\text{ads}}}}^{{\text{0}}}= - RT\ln ({K_{{\text{ads}}}} \times 55.5)$$
(14)

The numerical value 55.5 represents the molar concentration of water in acid solution. R is the gas constant and T is absolute temperature. The calculated values of Kads and \(\Delta G_{{{\text{ads}}}}^{{\text{0}}}\) are given in Table 5.

Table 5 Thermodynamic parameters for the adsorption of benzodiazepine derivatives on the carbon steel in 1 M HCl at 308 K

Upon inspection of the values in Table 5, the slopes of the straight lines are slight deviations, (1.07) and (1.03) at 303 K, which attributed to the interactions between adsorbed species of benzodiazepine derivatives on the surface and/or changes in the adsorption energies as the surface coverage increases [39, 40]. The high values of Kads for the studied inhibitors indicated strong adsorption on steel surface in the hydrochloric acid corrosive solution [41]. In addition, the negative values of the adsorption free energy \(\Delta G_{{{\text{ads}}}}^{{\text{0}}}\) suggest that the benzodiazepine molecules adsorb spontaneously on carbon steel surface. Previous studies show that the value of \(\Delta G_{{{\text{ads}}}}^{{\text{0}}}\) around − 40 kJ mol−1 or more negative is consisted with charge sharing between metal and inhibitor molecule (chemisorption) [42, 43]. While the value of \(\Delta G_{{{\text{ads}}}}^{{\text{0}}}\) around − 20 kJ mol−1 or less negative is consisted with electrostatic interaction between charged inhibitor molecule and metallic surface (physisorption) [42, 43]. The calculated values of \(\Delta G_{{{\text{ads}}}}^{{\text{0}}}\) for BZD-1 and BZD-2 are − 44.40 kJ mol−1 and 45.19 KJ mol−1, respectively, which may indicate that the adsorption mechanism of these compounds tested on carbon steel involves a predominance of chemical interactions by the virtue of a coordinate bond formed between the investigated inhibitor molecules and the surrounding d-orbital of the surface of carbon steel through lone pair of electron of N, and O atoms.

3.5 Quantum Chemical Calculations

Quantum chemical study using DFT method was performed to investigate the effect of molecular structure on the inhibition mechanism. This type of study has also used to correlate experimental data for inhibitors obtained from different techniques (viz., electrochemical and weight loss) and their structural and electronic properties. The geometrically optimized structures are depicted in Fig. 5. The highest occupied frontier molecular orbital (HOMO), the lowest unoccupied frontier molecular orbital (LUMO) and molecular electrostatic potential (MEP) obtained from the optimized molecular structure of the benzodiazepines are represented in Fig. 6 in order to define the reactivity of an inhibitor. The analysis of frontier molecular orbital (HOMO and LUMO) is useful to predict the adsorption centers of BZD molecules responsible for the interaction with metal surface [44]. The calculated quantum chemical parameters such as the highest occupied molecular orbital energy (EHOMO), lowest unoccupied molecular orbital energy (ELUMO), the energy gap (\(\Delta {E_{{\text{gap}}}}={E_{{\text{LUMO}}}} - {E_{{\text{HOMO}}}}\)), dipole moments (µ), chemical hardness (η), global softness (σ = 1/η), and number of transferred electrons (ΔN) are important and useful tools to compare difference in inhibition efficiency of benzodiazepines molecules and also to validate the experimental findings. EHOMO is a quantum chemical parameter which represents the electron donating ability of the molecule. So, it was reported that chemical species with high values of EHOMO have the tendency to donate electrons to other chemical species with a low empty molecular orbital energy. On the contrary, the ELUMO shows the ability of the molecule to accept electrons. The lower the value of ELUMO, the higher its ability to accept electrons [45]. Figure 5 shows that the HOMO and LUMO electrons are distributed over the entire molecules, meaning the fine capability of the evaluated inhibitors to interact with the metal surface through donor–acceptor reactions due to the presence of nitrogen and oxygen atoms and several π-electrons on the entire molecules creating the platform for adsorption by active centers. From the frontier molecular electron distribution, it can be seen that as compared to BZD-1, the involvement of the long carbon chain in BZD-2 helps in a greater electron transfer and therefore could adsorb more effectively on steel. The calculated quantum chemical parameters are listed in Table 6. The value of EHOMO of the studied compounds follows the order: BZD-2 > BZD-1, which is in accordance with the order of inhibition efficiency obtained experimentally. On the other hand, the energy gap ΔE (ELUMO − EHOMO) is another very important parameter which can be used to predict the reactivity of molecules. Generally, a molecule with low value of ΔE associated with high chemical reactivity and therefore high inhibition efficiency [38]. The bond gap energy ΔE obtained in the present study for investigated inhibitors decreased in the order of BZD-1 > BZD-2, demonstrating that the stability of the formed complex on the metal surface follows the order of BZD-2 > BZD-1 which lucidly explore the high inhibition efficiency observed in the case of BZD-2 as compared to that of BZD-1. This is confirmed also by calculating global hardness and softness which are important properties to measure the molecular stability and reactivity. Global hardness signifies the resistance towards polarization of electron cloud under small perturbation of chemical reaction. Normally inhibitors with smallest value of global hardness and highest value of global softness are highly reactive and hence effective in inhibition action [46]. For BZD-1 and BZD-2, the hardness values are 2.291 and 2.184 and softness values are 0.479 and 0.436, respectively. When comparing these two inhibitors, the least value for hardness and highest value for softness are obtained for BZD-2 system and it adsorbs on carbon steel surface to give maximum protection. On the other side, the dipole moments of the two molecules are also listed in Table 6. According to some authors [47, 48], a low value of dipole moment favors the accumulation of inhibitor molecules on the surface thus increasing the inhibition effectiveness, yet others proposed the opposite correlation, that is, high dipole moment exerts significant effect on the dielectric properties of the electric double layer and enhances the adsorption on the metal surface, which in turn contributes to higher inhibition effectiveness. As presented in Table 6, the ranking order of inhibitors tested based on the values of dipole moment is BZD-2 > BZD-1, which conforms to the first former viewpoint, i.e., the lower dipole moment (µ) of BZD-2 compared to BZD-1 might support accumulation of inhibitor molecule on the surface layer of the steel, thereby promoted adsorption on the steel surface and enhanced inhibition efficiency. The number of electrons transferred from inhibitor to metal (ΔN) was also calculated using the quantum chemical method and listed in Table 6. ΔN values are not accurately the number of electrons leaving the donor (inhibitor) to the acceptor molecule. Therefore, the term “electron donating ability” (abbreviated as EDA) is may be more appropriate than “number of transferred electrons” [49]. In our investigation, BZD-2 has the highest ΔN value while BZD-1 has the least ΔN value; this implies that BZD-2 has higher inhibition efficiency than BZD-1. Additionally, the positive values of ΔN suggest that the high capability of studied inhibitors donates electrons to the metal surface as we have cited in the experimental part. (The tested inhibitors get adsorbed on the metal surface by chemical interactions).

Fig. 6
figure 6

The HOMOs, LUMOs, and molecular electrostatic potential (MEP) structures of BZDs inhibitors

Table 6 Quantum chemical parameters of inhibitors molecules using B3LYP/6-21G

The reactive sites of inhibitors were further confirmed by the molecular electrostatic potential (MEP). MEP is made the electron density visible and it is a useful tool to understanding sites of electrophilic and nucleophilic attack [50]. In MEP, the red (negative) regions are subjected to nucleophilic attack, while blue (positive) regions are related to the electrophilic reactivity. In Fig. 6, red and blue regions of MEPs are corresponding to the HOMO and LUMO orbital distribution of inhibitor molecules, respectively. The findings of theoretical calculation are very well compatible with those obtained through the experimental results.

3.6 Molecular Dynamics (MD) Simulation

From a theoretical point of view, it is necessary to remember that in DFT, the molecular behavior of the molecules has only been considered. But, in real situation how the molecule behaves it cannot be predicted. So, from previous DFT study, it is seen that the heterocyclic moieties along with the substituent group C═O and benzene ring of the inhibitor molecules are actively participating in the adsorption process, but CH2–CH3 and (–CH2)7–CH3 cannot participate in the type of concerned interaction. Thus, to get better insight fullness in the actual adsorption configuration of inhibitors molecules at the metal solution interface, MD simulation has been carried out. Additionally, MD simulation has also the ability to determine inhibition ability of the inhibitor molecules by the interaction energy and binding energy values. Table 7 lists the values of both interaction energy and binding energy (Ebinding = − Einteract) in aqueous solution. Figure 7 presents side and top views of the initial and final adsorption configuration on Fe (110) surface of tested inhibitors derived from MD simulations. Carefully inspecting this figure, it could be observed that the investigated compounds were adsorbed on the Fe surface by the flat orientation. It is not difficult to understand that the parallel adsorption mode can ensure that the iron surface be maximally covered by adsorbates. Therefore, each inhibitor molecules as a whole will be responsible for the adsorption and provides higher surface area of coverage towards the blocking of metallic dissolution. Among two inhibitors of this present study, BZD-2 has additional (CH2)5–CH3 group, which covers higher surface area in comparison to the BZD-1 and thereby shows higher inhibition efficiency. It can be seen from the data in Table 7 that the BZD-2 has a better adsorption capability as compared to BZD-1 compound, which explains its good inhibitive properties. It is widely assumed that the inhibition of metal corrosion by organic compounds is largely attributed to the adsorption of inhibitor molecule on metallic surface. Additionally, the large negative values of interaction energy are attributed to the strong adsorption between the compounds and the iron surface [51]. The results in Table 7 revealed the order of the magnitudes of adsorption energy as: BZD-2 > BZD-1. These results are in good accordance with the experimentally obtained inhibition efficiency as well as the results obtained from DFT calculations.

Table 7 Interaction and binding energies obtained from MD simulations for adsorption of inhibitors on Fe (110) surface
Fig. 7
figure 7

Side and top views of the final adsorption of the benzodiazepines derivatives on the Fe (110) surface obtained from MD simulations

3.7 Surface Morphology

In order to confirm the high inhibition efficacy of the inhibitor BZD-2, the surface of mild steel sample obtained in both uninhibited and inhibited solution was examined using Scanning electron microscope (SEM). Figure 8a, b shows the SEM images of mild steel after 6-h immersion in 1 M HCl in the absence and presence of 5 × 10−3 mol L−1 of BZD-2. It is clearly observed from Fig. 8a that the mild steel surface was drastically damaged in the absence of BZD-2 and a number of pits distributed over the metal surface due to rapid corrosion attack in acidic solutions. In contrast, in the presence of BZD-2 (Fig. 8b), the damage of the steel surfaces is significantly reduced, and the observed surface is relatively clean and smooth. Thus, these results demonstrate that BZD-2 forms protective film by better adsorption on the mild steel surface and, as a result, reduces the corrosion.

Fig. 8
figure 8

SEM images of mild steel surface: a blank 1.0 M HCl and b in 1.0 M HCl + 5 × 10−3 M of BZD-2 after 6 h of immersion time

4 Conclusion

In the present study, the two novel synthesized benzodiazepine derivatives BZD-1 and BZD-2 had been studied as corrosion inhibitors for carbon steel in 1.0 M HCl solution at 303 K. The main conclusions were as follows:

  1. 1.

    The synthesized benzodiazepine derivatives acted as efficient corrosion inhibitor, and their inhibition performances increase with increase in concentration with BZD-2 displaying 96.63% efficiency.

  2. 2.

    Tafel polarization study revealed that the benzodiazepine acts as mixed-type inhibitors.

  3. 3.

    The adsorption types of BZD-1 and BZD-2 on the carbon steel surface obeyed the Langmuir adsorption isotherm. The corresponding value of \(\Delta G_{{{\text{ads}}}}^{{\text{0}}}\) revealed that the adsorption mechanism of the benzodiazepine derivatives is mainly due to chemisorption. Moreover, the negative values of \(\Delta G_{{{\text{ads}}}}^{{\text{0}}}\) revealed the spontaneity of the adsorption process

  4. 4.

    Quantum chemical calculations clarified the relation between structural parameters of the studied compounds and their inhibition efficiencies for the corrosion process. This study shows that BZD-2 has the least energy gap suggesting the reason for its highest inhibitive performance.

  5. 5.

    MD studies also revealed that BZD-2 has the highest interaction energy with Fe (110) surface.

  6. 6.

    Computational calculations using quantum chemical calculations and MD simulations give a better overview on the reactivity of tested benzodiazepine towards carbon steel and are in good correlation with the experimental results obtained by weight loss and electrochemical studies.