1 Introduction

It has been observed that the adsorption of corrosion inhibitors depends mainly on certain physico-chemical properties of the molecule such as functional groups, steric factors, aromaticity, electron density at the donor atoms and π orbital character of donating electrons, and also on the electronic structure of the molecules [1,2,3,4,5,6,7]. Inhibition performance dependence of the pickling acid process parameters such as (temperature) and the comparison of the obtained thermodynamic data of the corrosion process had been recently the object of large amount of investigation [8,9,10,11,12]. Accordingly, acid pickling inhibitors are expected to be chemically stable to provide high protective efficiency.

Our previous studies have shown three triazepine carboxylate compounds, which was found to exhibit good corrosion inhibition efficiencies. It is found that these compounds namely, ethyl 4,9-bis(4-chlorophenyl)-8-cyano-3-hydroxy-2,7-dioxo-1,2,5,7-tetrahydropyrido[1,2-b]triazepine-10-carboxylate (2Cl–Et), methyl 4,9-bis(4-chlorophenyl)-8-cyano-3-hydroxy-2,7-dioxo-1,2,5,7-tetrahydropyrido[1,2-b]triazepine-10-carboxylate (2Cl–Me), and ethyl 9-(4-chlorophenyl)-8-cyano-3-hydroxy-2,7-dioxo-4-(p-tolyl)-1,2,5,7-tetrahydropyrido[1,2-b]triazepine-10-carboxylate (Cl–Me–Et) act as excellent inhibitors and their inhibition efficiencies follow the order: 2Cl–Me > 2Cl–Et > Cl–Me–Et, and they depend on the type of the substituent. In addition, it is found also that the Density Function Theory (DFT) parameters confirmed those obtained by experimental studies [7]. In continuation of our research for the development of new efficient corrosion inhibitors and to understand their inhibitive mechanism, the influence of temperature as critical parameter of industrial acid pickling process on triazepine carboxylate compounds, adsorption process has been investigated by using electrochemical, molecular dynamic, Monte-Carlo simulation methods. Besides, various thermodynamic parameters for triazepine carboxylate compounds inhibitors adsorption on mild steel surface were estimated and discussed. Also, the kinetic and thermodynamic parameters were calculated and discussed. On the light of triazepine carboxylate compounds, the inhibition mechanism for mild steel in molar hydrochloric acid was elucidated.

2 Experimental Part

2.1 Materials, Sample Preparation and Aggressive Medium

The experiments were performed with mild steel rods as shown in Table 1. The used mild steel specimens have a rectangular form 2.5 cm × 2.0 cm × 0.05 cm. The specimen’s surface was polished with emery paper at different grit sizes (from 180 to 1200), rinsed with distilled water, degreased with ethanol, and dried at hot air. The examined inhibitors are ethyl 4-(4-chlorophenyl)-8-cyano-3-hydroxy-2,7-dioxo-9-(p-tolyl)-1,2,5,7-tetrahydropyrido[1,2-b] [1, 2, 4] triazepine-10-carboxylate (Cl–Me–CO2Et), 4-(4-chlorophenyl)-3-hydroxy-2,7-dioxo-9-(p-tolyl)-1,2,5,7-tetrahydropyrido[1,2-b] [1, 2, 4] triazepine-8,10-dicarbonitrile (Cl–Me–CN) and 3-hydroxy-2,7-dioxo-9-phenyl-4-(p-tolyl)-1,2,5,7-tetrahydropyrido[1,2-b] [1, 2, 4] triazepine-8,10-dicarbonitrile (Me–CN) where their molecules were synthesized according to the Serrar et al. procedure [13] and their formulas are indicated in Fig. 1.

Table 1 Chemical composition of the used mild steel
Fig. 1
figure 1

Chemical structures of investigated carboxylate molecules. a Cl–Me–CO2Et, b Cl–Me–CN and c Me–CN

The aggressive medium of 1.0 M HCl was prepared by dilution of analytical grade 37% HCl with distilled water. The employed concentration range of tested triazepine carboxylate compounds was from 10−6 to 10−3 M of studied inhibitors in various temperatures ranging 298–328 ± 2 K.

2.2 Electrochemical Methods

For electrochemical measurements, the electrolysis cell closed by a cap with five apertures. The working electrode was pressure-fitted into a polytetrafluoroethylene holder (PTFE) exposing only 1 cm2 of area to the aggressive solution. Pt and saturated calomel were used as counter and reference electrode (SCE), respectively. All potentials were measured against the last electrode.

The potentiodynamic polarization curves were recorded by changing the electrode potential automatically from negative values to positive values versus (Ecorr) using a Potentiostat/Galvanostat type PGZ 100, with a scan rate of 1 mV/s after 1 h of immersion time until reaching steady state. The test solution was thermostatically controlled at 298 ± 2 K in air atmosphere without bubbling. To evaluate corrosion kinetic parameters, a fitting by Stern–Geary equation was used [14]. The corrosion inhibition efficiency was evaluated from the corrosion current densities values using the relationship (1):

$${\eta _{{\text{PP}}}}=\frac{{i_{{{\text{corr}}}}^{{\text{0}}} - {i_{{\text{corr}}}}}}{{i_{{{\text{corr}}}}^{{\text{0}}}}} \times 100$$
(1)

where \(i_{{{\text{corr}}}}^{0}\) and \({i_{{\text{corr}}}}\) are the corrosion current densities values without and with inhibitor, respectively.

Finally, the electrochemical impedance spectroscopy measurements were carried out at Open Circuit Potential (OCP) in the frequency range of 100 KHz–10 mHz, with 10 points per decade, at the rest potential, after 30 min of acid immersion, by applying 10 mV peak to peak voltage excitation. Nyquist plots were made from these experiments. Fitting curves of the experiments was done using ZView 2 software. The inhibition efficiencies ηEIS% were calculated from Nyquist plots by Eq. (2):

$${\eta _{{\text{EIS}}}}(\% )=\left( {\frac{{{R_{{\text{ct}}}} - R_{{{\text{ct}}}}^{^\circ }}}{{{R_{{\text{ct}}}}}}} \right) \times 100,$$
(2)

where \(R_{{{\text{ct}}}}^{^\circ }\) and \({R_{{\text{ct}}}}\) are the charge transfer resistance of steel electrode in the absence and in presence of inhibitor.

In order to ensure reproducibility, all experiments were repeated three times where the evaluated inaccuracy did not exceed 10%.

2.3 Adsorption Studies

Inhibitive ability of a triazepine carboxylate compounds to a greater extent depends on its adsorption on metal surface. Various adsorption isotherm models considered were described below and tested.

$${\text{Langmuir }}\frac{\theta }{{1 - \theta }}={K_{{\text{ads}}}} \times {C_{{\text{inh}}}}$$
(3)
$${\text{Freundluich isotherm }}\theta =~{K_{{\text{ads}}}} \times {C_{{\text{inh}}}}$$
(4)
$${\text{Temkin isotherm exp }}(f \times \theta )={K_{{\text{ads}}}} \times {C_{{\text{inh}}}}$$
(5)
$${\text{Flory}} - {\text{Huggins isotherm }}\ln \left( {\frac{\theta }{{C_{{{\text{inh}}}} }}} \right) = \ln K_{{{\text{ads}}}} + a \times \ln (1 - \theta )$$
(6)
$${\text{Frumkin isotherm }}\left( {\frac{\theta }{{1 - \theta }}} \right){\text{exp }}( - 2 \times f \times \theta )={K_{{\text{ads}}}} \times {C_{{\text{inh}}}}$$
(7)

where Kads is the equilibrium constant of the adsorption process; Cinh is the inhibitor concentration; f is the factor of energetic inhomogeneity, and the parameter ‘a’ in Eq. (6) is the water molecules number replaced by inhibitor molecules on metallic surface.

2.4 Molecular Dynamic Modelling

Recently, molecular dynamics simulation constituted an advancement part in corrosion inhibition studies as it is employed at the atomistic level to explore the interaction of inhibitor molecules on metal surfaces [15]. The simulation of adsorption process of inhibitor molecules on Iron surfaces was investigated by molecular dynamics simulation using (Material Studio 2017) software from Accelrys Inc, USA. The most stable planes of crystalline metals are the one with densely packed; it is commonly used in molecular dynamics simulations to represent the corroding substrate metal [16, 17]. The simulations were performed in a simulation box of dimensions (3.44 nm × 4.05 nm × 5.34 nm). The molecular dynamics simulations were carried out with periodic boundary conditions to model a representative part of the interface devoid of any arbitrary boundary effects. Firstly, the surface of (pure Fe crystal) was cleaved, and relaxed by minimizing its energy by means of molecular mechanics. Next, the surface of cleaved plane Fe (110) was enlarged to a super cell of an appropriate size, and then a vacuum slab with zero Thickness was built above these surfaces. Since corrosion inhibition in aqueous solution is an electrochemistry process, the use of water molecules and different ions is essential. The effect of chemical species involved in the adsorption system was taken into consideration; thus, the system in the molecular dynamics simulations incorporated 250 H2O, 5 H+, 5 Cl and one inhibitor molecule in each case [18]. Finally, the most stable orientation of inhibitor molecules on metal surface was searched by Monte-Carlo search simulations. The molecular dynamics simulations were performed at 298 K (controlled by the Andersen thermostat) using a canonical ensemble (NVT) with a time step of 1.0 fs and a simulation time of 500 ps. For the whole simulation procedure, the COMPASS (Condensed-phase Optimized Molecular Potentials for Atomistic Simulation Studies) force field [19] was used, because it allows the accurate and simultaneous prediction of structural, conformational, vibrational, and thermo-physical properties for a broad range of chemical species, including organic molecules, metals, metal oxides, and metal halides [20].

2.5 Morphology Analysis Using (AFM) Technique

Atomic force microscopy (AFM) analysis is one of the major analysis methods to study a surface and was used here for the further investigation of the formation of a protective film on the surface of the mild steel. AFM was used to investigate the topography image of the uninhibited and inhibited mild steel surface using 10−3 M of ethyl 9-(4-chlorophenyl)-8-cyano-3-hydroxy-2,7-dioxo-4-(p-tolyl)-1,2,5,7-tetrahydropyrido[1,2-b] [1, 2, 4] triazepine-10-carboxylate (Cl–Me–CN).

3 Results and Discussion

3.1 Corrosion Inhibition Efficiency Studies

In our first part of this work, we have introduced that all the tested triazepine carboxylate derivatives act as good corrosion inhibitors for mild steel electrode in 1.0 M HCl solution.

The intensity-potential curves indicated that these compounds operate as mixed type inhibitors and their inhibition efficiencies increase with their concentrations to attain a maximum at 10−3 M.

It is established also that the mechanism of the anodic and cathodic reactions change by the addition of triazepine carboxylate compounds. It is found that these compounds act by an adsorption mechanism on the metallic surface and their inhibition efficiency depends on the nature of the alkyl substituents, where the Cl–Me–CN compounds are the best. The electrochemical impedance spectroscopy (EIS) was utilized to decide and provide us the kinetic information and important mechanistic for the examined electrochemical system. Figure 2 presents respectively its Potentiodynamic polarization curves and Nyquist plots. Table 2 resumes the effect of triazepines carboxylate derivatives on mild steel corrosion in 1.0 M HCl using different electrochemical techniques such as Potentiodynamic polarization curves and electrochemical impedance spectroscopy.

Fig. 2
figure 2

Potentiodynamic polarization curves (a) and Nyquist plots (b) for mild steel in 1.0 M HCl solution in the absence and presence of various concentrations of best inhibitor performance at 298 ± 2 K: (scater) experimental; (red line) fitted data

Table 2 Electrochemical parameters for mild steel in 1.0 M HCl at various concentrations of inhibitors

Furthermore, in order to gain more information about the adsorption type of triazepine carboxylates compounds and its effectiveness at higher temperatures:

  • Corrosion Kinetic Study;

  • Temperature effect on the corrosion inhibition of mild steel;

  • Corrosion inhibition stability studies versus temperature;

  • Thermodynamic parameters of the adsorption process;

  • Adsorption isotherm analysis and thermodynamic parameters;

  • Surface morphology was also investigated using (Atomic force microscopy);

  • Monte-Carlo simulation & Pair correlation function;

  • Finally, corrosion protection mechanism was proposed for all triazepine carboxylate compounds studied.

3.2 Temperature Effect on the Inhibition Efficiency

In order to get others information about the type of adsorption and the effectiveness of the triazepine carboxylate compounds at higher temperature (simulation of industrial process condition), polarization experiment was conducted in the range of 298–328 ± 2 K without and with triazepine carboxylate compounds. Figure 3 presents the obtained potentiodynamic polarization curves and their corresponding data are presented in Table 3.

Fig. 3
figure 3

Potentiodynamic polarization curves for mild steel in 1.0 M HCl with triazepine carboxylate compounds (Me–CN), (Cl–Me–CO2Et) and (Cl–Me–CN) at various temperatures

Table 3 Electrochemical, activation parameters and corresponding inhibition efficiencies at various temperatures of mild steel in 1.0 M HCl in the absence and presence of 10−3 M of triazepines carboxylate compounds studied

It is clear that according to the substitution of each triazepine carboxylate compounds studied, it can be noted that the inhibition efficiency of inhibitors depends on the temperature and decreases with the rise of temperature from 298 to 328 ± 2 K. This can be explained by the decrease of the strength of the adsorption process at elevated temperature [21]. It is seen also that the presence of carboxylate compounds will provide a film barrier protecting steel surface from being exposed to acidic media. Surface coverage θ was calculated from the following equation [22]:

$$\theta =\frac{{({i_{{\text{corr}}}} - i_{{{\text{corr}}}}^{{\text{i}}})}}{{({i_{{\text{corr}}}} - {i_{{\text{sat}}}})}},$$
(8)

where \({i}_{\text{c}\text{o}\text{r}\text{r}}\), \({i}_{\text{c}\text{o}\text{r}\text{r}}^{\text{i}}\), and \({i}_{\text{s}\text{a}\text{t}}\) are the corrosion current density values in the absence and the presence of triazepine carboxylate compounds.

As isat << icorr, thus

$$\theta =\frac{{({i_{{\text{corr}}}} - i_{{{\text{corr}}}}^{{\text{i}}})}}{{{i_{{\text{corr}}}}}}.$$
(9)

Analysis of the results in Table 7 indicates that the Electrochemical kinetic parameters,

  • Corrosion potential (Ecorr)

  • Corrosion current density (icorr)

  • And cathodic Tafel slope (bc), depend of substitution of triazepine carboxylate compounds.

This is more clearly illustrated in Table 3 by the variations of surface coverage with temperature:

  • Whimpers from 0.941 for Me–CN compound at 298 ± 2 K to 0.865 at 328 ± 2 K;

  • Also surface coverage of Cl–Me–CO2Et compound decreases from 0.926 to 0.855 respectively at 298 K and 328 ± 2 K;

  • Moreover for Cl–Me–CN compounds reduce from 0.946 to 0.840 respectively at 298–328 ± 2 K.

Increasing of inhibition efficiency (η%) will reduce the rate of corrosion process due to higher surface coverage (θ) from carboxylate compounds studied. This is due to the highest concentration of inhibitor and can protect the mild steel surface from the aggressive hydrochloric acid environment. At this condition, the surface coverage is the highest with 0.946 for Cl–Me–CN compared to the protection using 0.941 for Me–CN and 0.926 for Cl–Me–CO2Et. It is noted that the Large surface areas of mild steel are covered by all triazepine carboxylate compounds film and this reduces the reaction sites available.

3.3 Corrosion Inhibition Stability Studies Versus Temperature

Furthermore, calculating standard deviation (σinh) is very important to determine the stability of triazepine carboxylate compounds in acid medium against variation of temperatures. Statistical data such as absolute deviation (Ad), standard deviation (ση), mean \(\stackrel{-}{(x})\)are listed in Table 3. The range of a set of data is the difference between the highest and lowest measurements. Algebraically, the range (Rη) can be expressed as

$${R_{{{\upeta}}}}={\eta _{{\text{better}}}} - ~{\eta _{{\text{less}}}},$$
(10)

where (\({\eta }_{better}\)) and (\({\eta }_{less})\) are the great and less value of inhibition efficiency obtained for each inhibitor, respectively.

The mean \(\stackrel{-}{x}\) is part of calculating the range (Rη) and it is the primary calculation for reporting the measured value. The mean is found by adding up the sum of inhibition efficiency obtained for temperature range studied and then dividing by the number of tests.

$$\bar {x}=\frac{{\mathop \sum \nolimits_{{i=1}}^{n} {x_{\text{i}}}}}{n}.$$
(11)

However, the average deviation of inhibition efficiency measurements is calculated using Eq. (12):

$${\text{Absolute~deviation}}~=\left| {x - \mu } \right|.$$
(12)

Absolute deviations are represented algebraically as

$${\text{Average~deviation}}=~\frac{{\mathop \sum \nolimits_{{i=1}}^{n} \left| {x - \mu } \right|}}{n}.$$
(13)

The obtained results are listed in Table 3. Standard deviation is a reliable statistic for reporting precision, and the following formula below can be used:

$$\sigma =\sqrt {\frac{{\mathop \sum \nolimits^{} {{(x - \mu )}^2}}}{n}}.$$
(14)

The standard deviation of the inhibition efficiency reveals very good stability of all triazepine carboxylate inhibitors studied at temperature range of 298–328 ± 2 K. Value of standard deviation (ση) is 4.75%, 3.06% and 3.33% for Me–CN, Cl–Me–CO2Et and Cl–Me–CN, respectively. These results confirmed that there were no significant changes, or variation between all temperatures. All plots follow the same pattern.

3.4 Adsorption Isotherm Analysis and Thermodynamic Parameters

The efficiency of an organic species as a successful corrosion inhibitor is mainly dependent on its ability to get adsorbed on the surface of the metal. Adsorption isotherm models can provide important clues to the nature of metal/inhibitor interaction. Attempts were made to find a good fit for triazepine carboxylate compounds adsorption on mild steel surface with various isotherms. So, the coverage surface values (θ) can be easily determined from AC impedance, Tafel polarization or the linear polarization by the ratio η %/100. In the present study, the coverage surface values were evaluated from Tafel polarization (Table 3).

Adsorption isotherm models considered were fitted and presented in (Fig. 4). Their corresponding fitting curve results are shown in Table 4. It is demonstrated that the triazepine carboxylate compounds were adsorbed on mild steel surface according to Langmuir isotherm model (Fig. 4a). The correlation coefficient is known nearly linear (R2 close to 1), i.e., 0.99999 for both Cl–Me–CN and Cl–Me–CO2Et compounds and 0.99995 for Me–CN inhibitor. The values of regression coefficients (R2) given in Table 4 confirmed the validity of the approach. Besides, isothermal adsorption Langmuir describes molecules adsorbed triazepine carboxylate compounds just stick to outer layers of the surface of the mild steel or just form a monolayer without bond strong.

Fig. 4
figure 4

Adsorption isotherm plots for mild steel in 1.0 M hydrochloric acid at different concentrations of triazepine carboxylate compounds a Langmuir, b Freundlich, c Temkin, d Flory–Huggins, e Frumkin adsorption isotherm plots: comparison of experimental (scatter) and fitting (red line) data

Table 4 Equilibrium constant and free energy of adsorption values for mild steel 1.0 M hydrochloric acid in the presence of triazepine carboxylate compounds at different concentrations

This kind of isotherm involves the assumption of no interaction between the adsorbed species on the electrode surface [23]. So, the adsorption constant, (Kads), is related to the free energy of adsorption, (ΔG*ads), by Eq. (15):

$${K_{{\text{ads}}}}=\frac{1}{{55.55}}exp( - \Delta G_{{{\text{ads}}}}^{^\circ }/RT),$$
(15)

where the value 55.55 represents the water concentration in solution by mol L−1; R is the universal gas constant, and T is the absolute temperature.

The values of (Kads), (R2), (ΔG*ads) and other parameters are calculated and are given in Table 5. The high obtained value of (Kads) reflects the high adsorption ability of this inhibitor on the mild steel surface.

Table 5 The constant value Kads and the calculated free enthalpy ∆Gads° for the inhibitors from the Langmuir isotherm for mild steel in 1.0 M HCl in the absence and presence of 10−3 M of triazepines carboxylates compounds at 298 ± 2 K

In addition, if the value of (∆G*ads) is − 40 kJ/mol or more negative, it indicates the transfer of the electrons from the inhibitor to the metal surface forming a coordinate bond between them. (ΔG*ads) are lower than above, for example, − 20 kJ/mol, leading to a weak electrostatic attraction between the charged inhibitor and the charged metal surface in the corrosion medium [24, 25].

Moreover, the negative value of (ΔG*ads) indicates the

  • stability of the adsorption layer on the steel surface;

  • spontaneity of the adsorption process;

  • strong interaction between triazepine carboxylate inhibitor molecules and the mild steel surface [26, 27].

The perusal of (ΔG*ads) value ranging from − 39.3 to − 44.8 kJ/mol suggests that the adsorption of pyoverdine follows chemisorptions which is spontaneous in nature [28].

3.5 Thermodynamic Parameters of Activation Corrosion Process

In order to gain more information about the adsorption type of triazepine carboxylates compounds and its effectiveness at higher temperatures, potentiodynamic polarization curves for mild steel in 1.0 M HCl without and with various concentrations of triazepine carboxylates compounds were used in the temperatures range from 298 to 328 ± 2 K. The activation parameters for the corrosion reaction can be regarded as an Arrhenius-type process, according to the following equation:

$${i_{corr}}=A~{\text{exp}}\left( { - {E_a}/RT} \right),$$
(16)

where (Ea) is the apparent activation corrosion energy; (R) is the universal gas constant, and (A) is the Arrhenius pre-exponential factor. The apparent activation energies (Ea) in the absence and in the presence of triazepine carboxylates compounds for mild steel are calculated by linear regression between ln(icorr) and 1/T (Fig. 5), and the results are given in Table 3. All the linear regression coefficients are close to 1, indicating that the steel corrosion in hydrochloric acid can be elucidated using the kinetic model.

Fig. 5
figure 5

Arrhenius plots of mild steel in 1.0 M HCl without and with performant triazepine carboxylate inhibitors studied

A corresponding increase in the corrosion rate occurs because of the greater area of metal that is consequently exposed to the acid environment [29]. The enthalpy and entropy of activation respectively (ΔHa) and (ΔSa) for the intermediate complex in the transition state for the corrosion of mild steel in 1.0 M HCl in the absence and in the presence of triazepine carboxylates compounds were obtained by applying the alternative formulation of Arrhenius equation [30]:

$${i_{corr}}=~\left( {\frac{{RT}}{{Nh}}} \right){\text{exp}}\left( {\frac{{\Delta {S_{\text{a}}}}}{R}} \right){\text{~exp}}\left( { - \frac{{\Delta {H_a}}}{{RT}}} \right),$$
(17)

where (h) is the Plank’s constant and (N) is the Avogadro’s number. Figure 6 shows a plot of ln(icorr/T) versus 1/T. A straight line is obtained with a slope of (−ΔHa/R) and an intercept of (ln R/Nh + ΔSa/R) from which the values of (ΔHa) and (ΔSa) were calculated and reported in Table 3. The positive values of (ΔHa) in the absence and the presence of triazepine carboxylates compounds reflect the endothermic nature of the mild steel dissolution process. One can also notice that (Ea) and (ΔHa) values vary in the same way as shown in Table 3, indicating that the corrosion process is a unimolecular reaction. This result permits to verify the known thermodynamic equation between the (Ea) and (ΔHa).

Fig. 6
figure 6

Transition Arrhenius plots for mild steel in 1.0 M HCl solution without and with performant triazepine carboxylate inhibitors studied

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

Therefore, when all the details are worked out one ends up with an expression that again takes the form of an Arrhenius exponential multiplied by a slowly varying function of (T). The precise form of the temperature dependence depends upon the reaction, and can be calculated using formulas from statistical mechanics involving the partition functions of the reactants and of the activated complex. Nevertheless, in order to carry simple calculations, Eq. (19) was rearranged to become

$$\ln \left( {{\raise0.7ex\hbox{${{i_{{\text{corr}}}}}$} \!\mathord{\left/ {\vphantom {{{i_{{\text{corr}}}}} T}}\right.\kern-0pt}\!\lower0.7ex\hbox{$T$}}} \right)=\left( {\frac{{ - \Delta {H_{\text{a}}}}}{R}} \right)\left( {\frac{1}{T}} \right)+\left[ {\ln \left( {\frac{R}{{Nh}}} \right)+\left( {\frac{{\Delta {S_{\text{a}}}}}{R}} \right)} \right].$$
(19)

A plot of ln (icorr/T) against 1000/T should give a straight line with a slope of ( ∆Ha/R) and intercept of [ln (R/Nh) + (Sa/R)], as shown in Fig. 6. (ΔHa) and (ΔSa) were calculated and tabulated in Table 3. The activation energy (Ea) increases in the presence of the inhibitor; the same patterns were observed for all triazepine carboxylate compounds studied. Increases in (Ea) with the presence of triazepine carboxylate compounds indicate that a physical (electrostatic) adsorption occurred in the first stage. The increase in (Ea) may be resulted either due to physical adsorption that occurs in first stage [31] or due to decrease in the adsorption of inhibitor molecules on the steel surface with increasing temperature [29]. The (Ea) value was (Ea−(Me–CN) = 43.7 kJ mol−1), (Ea−(Cl–Me–CO2Et) = 39,1 kJ mol−1) and (Ea−(Cl–Me–CN) = 51.4 kJ mol−1), respectively, for Me–CN, Cl–Me–CO2Et and Cl–Me–CN. The (Ea) value for all inhibitors studied was greater than 20 kJ mol−1 in both the presence and absence of the triazepine carboxylates compounds, which reveals that the entire process is controlled by the surface reaction.

The values of (\({\varDelta H}_{\text{a}\text{d}\text{s}}^{\text{*}})\) are nearly the same and are higher in the presence of the inhibitor. This indicates that the energy barrier of the corrosion reaction increased in the presence of the inhibitor without changing the mechanism of dissolution.

The positive values of (\({\varDelta H}_{\text{a}\text{d}\text{s}}^{\text{*}})\) for both corrosion processes with and without the inhibitor reveal the endothermic nature of the steel dissolution process and indicate that the dissolution of steel is difficult [32].

According to the recorded values of enthalpy of activation (Table 3), exothermic adsorption behaviour was detected depending on applied temperatures. The value of enthalpy of activation \(\left({\varDelta H}_{\text{a}\text{d}\text{s}}^{\text{*}}\right)\) is respectively (41.1 KJ × mol−1), (36.5 KJ × mol−1) and (48.8 KJ × mol−1) for the Me–CN, Cl–Me-CO2Et and Cl–Me–CN.

The large negative value of \(\left({\varDelta S}_{\text{a}}^{\text{*}}\right)\) for mild steel in 1.0 M HCl implies that the activated complex is the rate-determining step, rather than the dissociation step. In the presence of the triazepine carboxylate inhibitors, the value of (\({\varDelta S}_{\text{a}}^{\text{*}})\) increases and is generally interpreted as an increase in disorder as the reactants are converted to the activated complexes [33]. The values of activation entropy (\({\varDelta S}_{\text{a}}^{\text{*}}\)) are higher for inhibited solutions than that for the uninhibited solution (Table 3). The positive increment of (\({\varDelta S}_{\text{a}}^{\text{*}}\)) suggesting that an increase in randomness occurred on going from reactants to the activated complex. This observation is in agreement with the findings of other workers [34].

3.6 Surface Morphology (AFM)

Atomic force microscopy (AFM) is a very high-resolution type of scanning probe microscopy, with demonstrated resolution in the order of fractions of a nanometer, more than 1000 times better than the optical diffraction limit. The morphology of the surface of mild steel after immersion for 6 h in 1.0 M HCl solution without and with 10−3 M of Cl–Me–CN was examined in the light of an atomic force microscope.

The three-dimensional (3D) AFM morphology and the AFM cross-sectional profile for polished mild steel surface (reference sample), mild steel surface immersed in 1.0 M HCl (blank sample), and the mild steel surface immersed in 1.0 M HCl containing 10−3 M of Cl–Me–CO2Et are shown in (Fig. 7a, b). Also, in Table 6, summary of the root mean square (Sq), average roughness (Sa), peak-to-peak (Sy), ten-point height (Sz), surface skewness (Ssk) and coefficient of kurtosis (Ska) values for the mild steel surface immersed in protected and non-protected aggressive medium are listed.

Fig. 7
figure 7

AFM photographs of corroded mild steel surface a uninhibited acid and b inhibited acid by adding Cl–Me–CN

Table 6 AFM data of the surface of protected and non-protected mild steel surface after immersion for 6 h in 1.0 M HCl solution

Whereas (Sq) is root-mean-square roughness (the average of the measured height deviations taken within the evaluation length and measured from the mean line) and (Sa) is the average roughness (the average deviation of all points’ roughness profile from a mean line over the evaluation length). Figure 7a displays corroded metal surface in the absence of the Cl–Me–CN inhibitor immersed in 1.0 M HCl. The values of Root Mean Square (Sq), Average Roughness (Sa) and the Ten-point height (Sz) height for the polished carbon steel surface (inhibited sample) are 496.13, 521.46 and 1612.17 nm, respectively. The slight roughness observed on the polished carbon steel surface was due to atmospheric corrosion.

These data suggest that the carbon steel surface immersed in 1.0 M HCl has a greater surface roughness. Figure 7b displays the mild steel surface after immersion in 1.0 M HCl containing 10−3 M of Cl–Me–CN. The (Sq), (Sa) and (Sz) values for the mild steel surface are 54.064, 40.748 and 305.693 nm, respectively. The Root Mean Square (Sq), Average Roughness (Sa), and the Ten-point height (Sz) are considerably less in the inhibited environment compared to the uninhibited environment. These parameters confirm that the surface is smoother. The smoothness of the surface is due to the formation of a compact protective film of Fe2+/Cl–Me–CN complex on the metal surface, thereby, inhibiting the corrosion of mild steel.

3.7 Molecular Dynamic Simulation

The adsorption mode of investigated derivatives on Fe (1 1 0) surface was studied by the molecular dynamics simulation method. At the molecular level, the most stable configuration of the molecules on the metal surface and the values of the adsorption (EAdsorption) between organic inhibitor and the metal surface are the results of the simulations process [35]. The most stable (lowest energy) configurations of the tested compounds on Fe (110) surfaces are depicted in Fig. 8.

Fig. 8
figure 8

Most stable orientation of inhibitors on Fe (110) in 1.0 HCl simulated a Cl–Me-CO2Et, b Cl–Me-CN, c Me–CN

It was observed that the heteroatoms of the compounds adsorbed on the iron at first. Then, the remaining centres of the compounds have moved gradually close to the metal surface. Therefore, as shown in Fig. 8, the studied molecules Cl–Me–CN and Me–CN adsorbed on the Fe surfaces with an almost flat orientation, where compound Cl–Me–CO2Et is not fully oriented in flat position on metal surface. The parallel configuration as in compound Cl–Me–CN and Me–CN supports the maximum surface coverage and the higher binding interaction.

The values of (Eads) are large and negative implies that the binding between the investigated inhibitors and the metal surface is spontaneous, and the more negative values of the adsorption energy can be attributed to the stable and strong interaction of the inhibitor on the metal surface [36]. It is observed in Table 7 that the binding energy of Cl–Me–CN on the iron surface is higher than the energy determined for H3O+ and Cl. This supports that the inhibitors are stable on the iron surface than other competing species. It has been reported that the organic inhibitors with unoccupied orbitals promote the formation of a chelate on the metal surface by accepting electrons from a d-orbital of the metal during such strong adsorption process [34]. Therefore, the compound Cl–Me–CO2Et and Me–CN can form a stable chelate with the iron after strong adsorption, and this leads to a good corrosion inhibition efficiency.

Table 7 Outputs and descriptors calculated by the Monte-Carlo simulation for adsorption of triazepine carboxylate compounds Cl–Me–CO2Et, Cl–Me–CN and Me–CN on Fe (1 1 0)

The radial distribution function (RDF) g (r) is a modern tool used to measure the bond length which provides an indication on the type of interaction of inhibitor molecules on metal surface. In literature, when the first peak occurs at 1–3.5 Å, this implies the chemisorption whereas the physisorption is associated with the peaks longer than 3.5 Å. The radial distribution function of heteroatoms of inhibitors graphically as shown in Fig. 9 shows that all the bond length values of are less than 3.5 Å, so chemical interactions might occur between these atoms and the metallic surface.

Fig. 9
figure 9

Pair correlation function of N and O atoms from triazepine carboxylate compounds a Cl–Me–CO2Et, b Cl–Me–CN and c Me–CN with Fe atoms from Fe (1 1 0) surface

3.8 Mechanism of Corrosion Inhibition

The experimental results suggested that the corrosion inhibition mechanism is appertained to the adsorption of the investigated compounds on the metal surface. The unshared electron pairs on (O, N) heteroatoms along with π-electrons of aromatic systems and multiple bonds contribute virtually in the adsorption process.

The studied triazepine carboxylate compounds are favourably chemisorbed on the metal surface. In the first stage of the chemisorption, the protonated form of interested compounds competes with aqueous H+.

The evolution of H2 gas occurs followed by a transformation of triazepine carboxylate compounds inhibitors to their neutral state and this step is accompanied by electron transfer unshared on heteroatoms (O, N) to the vacant d-orbital of iron surface atoms. As a consequence, the metal surfaces are accumulated with excess negative charge where back donation is more probable from metal surface to the anti-bonding orbital of inhibitors compounds. Both donation and back donation synergize and substantiate the adsorption of the inhibitor molecules on mild steel surface. In this report, the (Cl–Me–CN) exhibits the highest corrosion inhibition performance. This pertains to the difference in molecular structure of compounds studied due to the electronic effect and basic nature of substitution in (Cl–Me–CN) compound that enhance the inhibitive power.

4 Conclusion

Triazepine carboxylate compounds studied (Cl–Me–CN, Me–CN and Cl–Me–CO2Et) are acting as good corrosion inhibitors in 1.0 M HCl, and their inhibition efficiency increases with increasing concentration, and best performance is for (Cl–Me–CN). The inhibition efficiency trend of inhibitors obtained from electrochemical and molecular dynamic simulation is in good agreement. The experimental data give very good curves fitting for the applied adsorption isotherms as correlation coefficients (R2) were in the range of 0.99995 ≤ R2 ≤ 0.99999. All the inhibitors follow the Langmuir adsorption isotherm with slopes of almost unity, monolayer interaction between the adsorbed species. The high negative value of (∆G*ads) indicates that triazepine carboxylate compounds can be adsorbed on mild steel surface by chemical mechanism and also the spontaneity of the adsorption process. Surface examination via means of Atomic force microscopy (AFM) shows a remarkable mitigation of mild steel corrosion by the formation of protective layer on steel surface. Molecular dynamic simulations supported the experimental results that showed Cl–Me–CN, Me–CN and Cl–Me–CO2Et as efficient corrosion inhibitors. On the other hand, it could be interesting also to study the effect of these compounds on the corrosion of another metal in another acidic medium such as H2SO4 and 1.0 M H3PO4. This study confirmed the performance and the other application of the triazepine carboxylate compounds.