Introduction

Carbon steel is the most used type of steel generally and made into a variety of products, inclusive structural beams, car bodies, appliances for kitchen and cans. The utmost practical techniques for corrosion protection are probably the utilization of inhibitors [1,2,3,4]. Several studies have investigated the influence of nitrogen-containing organic compounds on the corrosion of carbon steel in acidic media [5,6,7,8,9]. These inhibitors are adsorbed on the metal surface and conserve the surface of the metal from the corrosive medium. Azo dye derivatives have attracted considerable attention due to their versatile application in various fields, including leather, textile and pharmaceutical and in high-technology areas [10, 11]. The inhibition effectiveness depends on physicochemical and electronic properties of the organic inhibitor which relate to its functional groups, orbital character of donating electrons, steric effects and electronic density of donor atoms [12, 13].

This current research was intended to study the corrosion inhibition of carbon steel in 0.5 M H2SO4 solutions by some chromotropic azo dyes as corrosion inhibitors using weight loss, SEM and potentiodynamic polarization technique. The use of theoretical study correlates the electronic descriptors with the obtained experimental work [14, 15].

Experimental method

Synthesis of azo compounds

A solution of 0.01 M of aniline (I), p-toulidine (II) and p-anisidine (III) were dissolved in HCl solution (1:1) and cooled at -5 °C. A 0.01 M solution of sodium nitrite was prepared separately and kept cooled at −5 °C. The cooled nitrite solution was gradually added to the amine solution with continuous stirring and the temperature kept at −5 °C. A 0.01 M solution of chromotropic acid disodium salt was prepared by dissolving the appropriate amount of the solid acid in 10% NaOH, and the coupler solution was cooled at −5 °C. The diazonium salt solution was coupled with the chromotropic acid solution. After dilution, the crude azo dyes were collected by filtration and crystallized from petroleum ether (40:60), and then dried in vacuum desicator over anhydrous CaCl2. The structural formula of the formed azo dyes was checked by FTIR as shown in Fig. 1 and 1H-NMR as shown in Fig. 2, and similar curves (not shown) were obtained for the other compounds. The structural formula is represented as follows:

The IR spectra show broadband at (3300—3600) cm−1 for OH group and a sharp band at 1540 cm−1 for N = N. 1H-NMR (DMSO-d6): δ (ppm) = 4.95 (S, OCH3, 3H), 7.2–7.9 (m, Ar H, 7H), 8 (S, OH, 1H), 8.3 (S, OH, 1H).

Weight loss measurements

The steel sample utilized had the composition (wt%) 0.11 C, 0.10 Si, 0.69 Mn, 0.038 P, 0.019 S, 0.05 Cr, 0.09 Ni, 0.04 Cu and the remainder Fe. Pieces of steel with dimension of 15 × 20 × 1 mm were utilized for weight loss measurements. The sample surface was polished with various grades of emery paper, degreased with acetone and rinsed with distilled water. The cleaned C-steel pieces were weighed before and after immersion in 50 ml of the test solution for a period of 4 h. The required temperature was adjusted using water bath thermostat.

Potentiodynamic polarization measurements

The electrochemical tests were performed in a conventional three-electrode electrochemical cell at 30 °C, consisting of carbon steel electrode with an exposed area of 2 cm2 as working electrode, a saturated calomel electrode as reference electrode and a platinum sheet as counter electrode that were used for electrochemical studies. Potentiodynamic polarization experiments were carried out using a PS remote potentiostat with PS6 software at scan rate 10 mV/s [16,17,18].

SEM measurements

The steel pieces were polished using different grades of emery paper up to 2000 grit size then keeping for 4 h. in 0.5 M sulfuric acid solution without and with 0.02 M of inhibitors. After this immersion time, the specimens were washed gently with distilled water, then carefully dried and put into the spectrometer without any further treatment. The SEM observation is done utilizing JSM-6510LV, in Mansoura University in Egypt. The AFM was executed in Nano Technology center, Mansoura University [5].

Theoretical calculations

The geometry optimization of inhibitor molecules was carried out by using density functional theory (DFT) based on Beck’s three-parameter exchange functional and Lee–Yang–Parr nonlocal correlation functional (B3LYP) [19, 20] and 6-311G(d,p) basis sets for all atoms without any symmetry constraint in the gaseous phase. The geometries are re-optimized in an aqueous phase using conductor-like polarizable continuum model (CPCM) at the same level of theory. All calculations were performed using the Gaussian 09 program package [21] and visualized using Gauss View program (version 5.0.8) [22]. The following quantum parameters were calculated from the optimized structure: the energy of highest occupied molecular orbital (EHOMO) and the energy of lowest unoccupied molecular orbital (ELUMO), the energy gap (ΔE) between EHOMO and ELUMO, dipole moment (μd), electronegativity (χ), hardness (η), softness (σ), electrophilicity (ω), nucleophilicity (ε), the fraction of electrons transferred (ΔN) and the total energy change (ΔET).

The ionization potential and the electron affinity are defined as IP = -EHOMO and EA =—ELUMO, respectively. The absolute electronegativity (χ), chemical potential (µ) and global hardness (η) of the inhibitor molecule are approximated as follows [23]:

$$\chi = - \mu = \frac{{{\text{IP}} + {\text{EA}}}}{2}$$
(1)
$$\eta = \frac{{{\text{IP}} - {\text{EA}}}}{2}$$
(2)

The softness σ is the inverse of the hardness, according to the following equation [24]:

$$\sigma = \frac{1}{\eta }$$
(3)

The number of transferred electrons ΔN was calculated using the following equation [23]:

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

where \(\chi _{{{\text{Fe}}}}\) and \(\chi _{{{\text{inh}}}}\) indicate absolute electronegativity of iron atom (Fe) and the inhibitor molecule, respectively; \(\eta _{{{\text{Fe}}}}\) and \(\eta _{{{\text{inh}}}}\) indicate absolute hardness of Fe atom and the inhibitor molecule. In order to apply the Eq. 4 in the present study, the electronegativity theoretical value for of bulk iron was used \(\chi _{{{\text{Fe}}}}\) = 7 eV and a global hardness of \(\eta _{{{\text{Fe}}}}\) = 0, by assuming that for a metallic bulk IP = EA, because they are softer than the neutral metallic atoms [23]. The absolute electrophilicity index ω is given in the following equation [25]:

$$\omega = \frac{{\mu ^{2} }}{{2\eta }}$$
(5)

The total energy change ΔET was used to characterize the change of energy associated with the electron donation and the electron back-donation processes that occurred through the adsorption process and is given in the following equation [26, 27]:

$$E_{T} = \Delta {\rm E}_{{{\text{back}} - {\text{donation}}}} = - \frac{\eta }{4}$$
(6)

Results and discussion

Weight loss measurements

After 4 hours of immersion, the weight loss of steel specimens in uninhibited acid solution and solutions containing different inhibitor concentrations was calculated and is described in Table 1. The corrosion rate (CR), inhibition effectiveness (%I.E) and surface coverage () obtained from weight loss measurements were calculated using the following equations and are given in Table 1:

$${\text{CR}} = \left( {{\text{w}} - {\text{w}}_{0} } \right)/{\text{St}}$$
(7)
$$\% I.E = \left[ {1 - \frac{w}{{w_{0} }}} \right] \times 100~~~$$
(8)
$$\theta = \left[ {1 - \frac{w}{{w_{0} }}} \right]$$
(9)

where w and wo are weight losses in the absence and presence of inhibitor, respectively, S is the surface area (cm2) and t is the exposed time (h.)

Table 1 Corrosion rate, inhibition efficiency and surface coverage of azo dyes compound (I–III) for corrosion of C-steel in 0.5 M H2SO4 solutions using weight loss method at 30 °C

These data showed that, as the inhibitor concentration rises, the weight loss and corrosion rate decrease, while the inhibition effectiveness increases. It may be inferred that these inhibitors act through adsorption on surface of metal and formation of a barrier layer between metal and corrosive media. The order of inhibition effectiveness of these compounds is:

III > II > I.

Potentiodynamic polarization measurements

In the absence and presence of varying concentrations of inhibitor III, Fig. 3 shows standard anodic and cathodic polarization curves of carbon steel at 0.5 M H2SO4. For the other substances, identical curves (not displayed) were obtained.

Fig. 1
figure 1

FTIR for azo compound (III)

Fig. 2
figure 2

H-NMR for azo compound (III)

Fig. 3
figure 3

Potentiodynamic polarization curves for the dissolution of carbon steel in 0.5 M H2SO4 in the absence and presence of different concentrations of azo compound (III) at 30 °C

The values of cathodic (βc) and anodic (βa) Tafel constants were calculated from the linear region of the curves of polarization. The corrosion current density (Icorr) was specified from the intersection of the linear part of cathodic and anodic curves with stationary corrosion potential (Ecorr). The percentage inhibition effectiveness (%I.E) was calculated using the following equation:

$$\% {\text{ I}}.{\text{E }} = {\text{ }}\left[ {{\text{1}} - {\text{ I}}_{{{\text{add}}}} /{\text{ I}}_{{{\text{free}}}} } \right]{\text{ }} \times {\text{ 1}}00$$
(10)

where Iadd and Ifree are the corrosion current densities in the presence and absence of inhibitors, respectively. The obtained corrosion parameters are represented in Table 2.

Table 2 Values of corrosion parameters for the corrosion of carbon steel in 0.5 M of H2SO4 by potentiodynamic polarization technique

By increasing the concentrations of inhibitors, the efficiency of inhibition increased, suggesting that these compounds retard the dissolution of C-steel in 0.5 M H2SO4 solution and the degree of inhibition depends on the inhibitor's concentration and form. This indicates that these compounds have acted as excellent inhibitors. In the presence of these investigated compounds, the corrosion potential (Ecorr.), cathodic and anodic Tafel lines did not significantly change, so these compounds can be identified as mixed inhibitors for C-steel in 0.5 M H2SO4 solution [28].

Study the surface morphology

Figure 4 presents the SEM obtained of carbon steel samples after immersion in 0.5 M H2SO4 in the absence and presence of 0.02 M inhibitors (I –III) for 4 h. It is clear that carbon steel surfaces in the absence of the inhibitors are seriously damaged. The morphology of carbon steel surfaces in the presence of inhibitors becomes smooth and less. These results prove that the investigated compounds formed a protective film by adsorption on the surface lead to protect the C-steel from the aggressive ions [5].

Fig. 4
figure 4

SEM micrographs for C-steel in the absence and presence of inhibitors (I–III)

Quantum chemical calculation

The optimized geometries obtained at the B3LYP/6-311G (d,p) level of theory used in this study are shown in Fig. 5. EHOMO is associated with the electron-donating ability of a molecule and ELUMO indicates the ability of the molecule to accept electrons. The adsorption of the inhibitor to the metal surface increases with an increasing HOMO energy (EHOMO) and a decreasing LUMO energy (ELUMO), and the energy gap (ΔE) reflects the reactivity of the inhibitor molecule toward the adsorption on the metal surface. The decrease in ΔE leads to better inhibition effectiveness [29] The calculated values of EHOMO, ELUMO and ΔE of the studied inhibitors in gas as well as in aqueous phases are collected in Table 3. The effectiveness of these azo inhibitors was mainly confirmed by the electrons on HOMO because when they adsorbed on a metallic surface, the inhibitor could provide electrons to the d-orbital of metal and then form a coordination bond. The inhibition effectiveness will be higher with increasing of EHOMO. The order of HOMO is effectively related to experimental inhibition effectiveness.

Fig. 5
figure 5

Optimized structure (I) H (II) CH3 and (III) OCH3

Table 3 Quantum chemical parameters of the studied inhibitors at B3LYP/6-311G (d,p) in gas (G) and aqueous (W) phases

The highest (HOMO) and lowest (LUMO) occupied molecular orbital are displayed in Fig. 6. The HOMO of the studied inhibitors are distributed on naphthalene ring and LUMO are distributed on N = N group.

Fig. 6
figure 6

HOMO and the LUMO of the studied inhibitors computed at B3LYP/6-311G (d,p) level in gas phase

The dipole moment μd is important parameter that measures the polarity of a covalent bond. The high value of the dipole moment likely increases the adsorption between the inhibitor and the metal surface [30, 31]. The energy of the deformability increases with an increase in the µ, making easier adsorption of the molecule at the metal surface. Besides, the volume of the inhibitor molecules increases with an increasing µ, and this increases the contact area between the molecule and the surface of the metal, thus increasing the corrosion inhibition ability of the inhibitor. The inhibition effectiveness increases as the µ values increases Scheme 1.

Scheme 1
scheme 1

Structure of the studied inhibitors

Electronegativity values of inhibitor molecules is a useful quantity in terms of electron transfer that obtain between metal and inhibitor. Electronegativity [32] is an important property in structural and reactivity studies in organic and inorganic chemistry. The electronegativity of any molecules represents its electron-withdrawing power, and the molecules with high values of electronegativity cannot give electron easily. According to the values of electronegativity presented in Table 3, the studied azo compounds follow the order I > II > III in the gas phase, indicating that III gives better inhibition effectiveness. In an aqueous phase, these azo compounds follow the order I > II > III.

The global hardness η and softness σ are important parameters that characterize the molecular stability and reactivity. It is known that hard molecules are more resistant to eventual deformation or polarization of the electronic cloud caused by small perturbation of molecular reactions [17, 18]. A hard molecule has a large energy gap and a soft molecule has a small energy gap [33]. Inhibitors with the lowest values of global hardness are expected to be good corrosion inhibitors. The global hardness values presented in Table 3 show that OCH3 have the lowest value of η (the highest value of global softness).

The number of electrons transferred (ΔN) shows the tendency of a molecule to donate electrons. The higher the value of ΔN, the greater the tendency of a molecule to donate electrons to the electron poor species. In the case of corrosion inhibitors, a higher ΔN means a greater tendency to interact with the metal surface indicating increase in inhibition effectiveness [34]. However, in this paper, inhibitor III has the highest ΔN value as presented in Table 3.

The electrophilicity index \(\omega\) indicates the tendency of the inhibitor molecule to accept electrons. Nucleophilicity ε is inverse of electrophilicity (1/ω). Nucleophilicity represents the tendency to share or donate electrons with a molecule. Consequently nucleophilicity may be considered as the basicity of a molecule. Hence, it should be stated that a molecule that has large electrophilicity value is ineffectual as corrosion inhibitor; however, a molecule that has large nucleophilicity value is expected to be a good corrosion inhibitor. Electrophilicity and nucleophilicity values are listed in Table 3 that III has lower electrophilicity and higher nucleophilicity.

The values ΔE back-donation (ΔEb-d) for the inhibitor molecules are listed in Table 3 and show that the order followed is: III > II ≈I in the gas phase and III > II > I in the aqueous phase, which indicates that back-donation is favored for the molecule III which is the best inhibitor than II and I. The results obtained by these parameters are in good agreement with the experimental observations.

The analysis of atoms selectivity within inhibitor molecules is useful in indicating the reactive sites toward nucleophilic and electrophilic attacks. The local selectivity of a corrosion inhibitor has been analyzed using the Fukui function [35, 36]. For a system of N electrons, the condensed Fukui functions are computed using the finite difference approximation as follows:

For nucleophilic attack

$$f_{{\text{k}}}^{ + } = \rho_{{\text{k}}} \left( {{\text{N}} + 1} \right) - {\text{~}}_{{\text{k}}} \left( {\text{N}} \right)$$
(15)

For electrophilic attack

$$f_{{\text{k}}}^{ - } = \rho_{{\text{k}}} \left( {\text{N}} \right) - {\text{~}}_{{\text{k}}} \left( {{\text{N}} - 1} \right)$$
(16)

where \(\rho _{{\text{k}}} \left( {\text{N}} \right),{\text{~}}\rho _{{\text{k}}} \left( {{\text{N}} + 1} \right)\;{\text{and}}\;{\text{~}}\rho _{{\text{k}}} \left( {{\text{N}} - 1} \right)\) are the natural populations for the atom k in the neutral, anionic and cationic species, respectively. The condensed Fukui function indices were calculated in the gas phase and are displayed in Table 4 The highest value of \({f}_{\mathrm{k}}^{+}\) for the studied inhibitors occur at N28, C10, N29 and C31 indicating their preferred site for nucleophilic attack. Based on the \({f}_{\mathrm{k}}^{-}\) values obtained, the site O15 is found to be the most reactive site for the electrophilic attack.

Table 4 Fukui indices for nucleophilic and electrophilic attacks for inhibitor I and II calculated at B3LYP/6-311G(d,p) in the gas phase; maxima in bold

Mechanism of inhibition

From the obtained data, Azo compounds adsorbed on the surface of carbon steel may be explicated the inhibition conduct. The presence of oxygen, nitrogen atoms and unsaturated bonds in azo molecule facilitates its adsorption on the carbon steel surface. These adsorbed azo molecules lead to conserve the carbon steel surface from the offensive ions [3,4,5].

Conclusions

The inhibition efficiency of all the studied azo dyes increases with increasing the concentration. The morphology of carbon steel surfaces in the presence of inhibitors becomes smooth and less. The results from potentiodynamic polarization, weight loss and SEM prove that the investigated compounds formed a protective film by adsorption on the surface, leading to the protection of the C-steel from the aggressive ions. Also, the azo compounds inhibitors were investigated using density functional theory (DFT). The calculated quantum chemical parameters were calculated. The theoretical results are consistent with the experimental data reported.