Introduction

Mild steel has many industrial applications because of its easy availability, low cost, uncomplicated fabrication and extensive usage, such as in water pipe lines [1, 2], cooling water systems [3], boilers, process industries, oil and gas, refining and extraction, etc. However, it is susceptible to different forms of corrosion induced by the very reactive anions in these astringent environments. Corrosion is a prevailing destructive phenomenon which has received worldwide attention as a result of the enormous economic impact of its damage. The corrosion inhibition of mild steel in acidic solutions has been widely investigated, most especially in hydrochloric acid [411]. Hydrochloric acid is the most difficult of the common acids to handle from the standpoints of corrosion and materials of constructions. Extreme care is required in the selection of materials to handle the acid by itself, even in relatively dilute concentrations, or in process solutions containing appreciable amounts. This acid is very corrosive to mild steel. In industries, hydrochloric acid solutions are often used in order to remove scale and salts from steel surfaces, cleaning tanks and pipelines, production of organic and inorganic compounds, regeneration of ion exchange resins, oil production, etc. [12]. The acid must be treated to prevent an extensive dissolution of the underlying metal. This treatment involves the addition of some organic compounds to the acid solution that adsorb at the metal/solution interface forming a compact barrier film. Corrosion prevention of mild steel is a matter of theoretical as well as practical importance, most especially with the use of inhibitors. Corrosion inhibitors are substances which, when added in small concentrations to a corrosive media, decrease or prevent the reaction of the metal with the media [13]. Most of the effective inhibitors contain heteroatoms such as O, N, and S and multiple bonds in their molecules through which they are adsorbed on the metal surface [1423]. It has been observed that adsorption depends mainly on certain physicochemical properties of the inhibitor group, such as functional groups, electron density at the donor atom, π-orbital character, and the electronic structure of the molecule [2449]. The efficiency of an organic compound as an inhibitor is mainly dependent on its ability to get adsorbed on the metal surface which consists of a replacement of water molecules at a corroding interface. This study aims to evaluate the inhibitive effect of aniline on the corrosion inhibition of mild steel in hydrochloric acid at ambient temperature using weight loss and potentiodynamic polarization measurements.

Experimental procedure

Material

The mild steel used for this work was obtained in the open market and analyzed at the Applied Microscopy and Triboelectrochemical Research Laboratory, Department of Chemical and Metallurgical Engineering, Tshwane University of Technology, South Africa. The mild steel has the nominal per cent composition: 0.401C, 0.169Si, 0.440Mn, 0.005P, 0.012S, 0.080Cu, 0.008Ni, 0.025Al, and the rest being Fe.

Inhibitor

Aniline (ANL) a brownish, translucent liquid is the inhibitor used. The structural formula of ANL is shown in Fig. 1. The molecular formula is C6H5NH2 while the molar mass is 93.13 g mol−1.

Fig. 1
figure 1

Chemical structure of Aniline (AN)

ANL was prepared in various concentrations of 1.25, 2.5, 3.75, 5, 6.25, and 7.5 % which were used as the inhibiting medium.

Test media

The test medium used for the investigation consists of 200 ml of 0.5 M dilute HCl of Analar grade with 3.5 % recrystalized sodium chloride in addition to the vspecified concentrations of aniline.

Preparation of test specimens

A cylindrical mild steel rod with a diameter of 14.5 mm was carefully machined and cut into a number of test specimens of average dimensions of length 6 mm. A 3-mm hole was drilled at the center for suspension. These mild steel specimens were then thoroughly rinsed with distilled water and cleansed with acetone before analysis.

Weight-loss experiments

Weighed test pieces were totally immersed in each of the various prepared test solutions contained in a 200-ml plastic container maintained in static condition at ambient temperature for 360 h with and without inhibitor addition. They were taken out every 72 h, washed with distilled water, rinsed with acetone, dried, and re-weighed. The tests without inhibitors were done for comparison with the tests in inhibited environments to observe the corrosion reaction behavior of the tested specimens. The corrosion rate was calculated using the formula:

$$ R = \left[ {\frac{87.6W}{DAT}} \right] $$
(1)

where W is the weight loss in milligrams, D is the density in g/cm2, A is the area in cm2, and T is the time of exposure in hours. Curves of corrosion rate (calculated) versus time of immersion were also plotted.

The degree of surface coverage (θ) was calculated from Eq. 2a

$$ \theta = \left[ {\frac{{W_{1} - W_{2} }}{{W_{1} }}} \right] $$
(2)

The % inhibitor efficiency (%IE) was calculated from the relationship:

$$ \% {\text{IE }} = \left[ {\frac{{W_{1} - W_{2} }}{{W_{1} }}} \right]{\text{x 1}}00 $$
(3)

where W 1 and W 2 are the corrosion rates in the absence and presence, respectively, of a predetermined concentration of inhibitor. The % inhibitor efficiency was calculated for all the inhibitors throughout the exposure period.

Linear polarization resistance

Linear polarization measurements were carried out using a cylindrical coupon embedded in resin plastic mounts with exposed surface of 1.65 cm2. The electrode was polished with different grades of silicon carbide paper to 6 μm, rinsed by distilled water and dried with acetone. The studies were performed at ambient temperature with an Autolab PGSTAT 30 ECO CHIMIE potentiostat and electrode cell containing 200 ml of electrolyte maintained in static condition, with and without inhibitor. A graphite rod was used as the auxiliary electrode and silver chloride electrode (SCE) was used as the reference electrode. The steady state open circuit potential (OCP) was noted. The potentiodynamic studies were then made from −1.5 V versus OCP to +1.5 mV versus OCP at a scan rate of 0.002 V/s, and the corrosion currents were registered. The corrosion current density (j corr) and corrosion potential (E corr) were determined from the Tafel plots of potential E(v) versus log current I. The corrosion rate (r) and the  %inhibition efficiency (% IE) were calculated as follows

$$ r\left( {\text{mmpy}} \right) \, = \frac{{0.00327 \times i_{\text{corr}} \times {\text{eq}}.{\text{wt}}}}{D} $$
(4)

where i corr is the current density in μA/cm2, D is the density in g/cm3; equation is the specimen equivalent weight in grams;

The % inhibition efficiency (%IE) was calculated from corrosion current density values using the equation.

$$ \% {\text{IE }} = { 1}-\left[ \frac{c2}{c1} \right] \times 100 $$
(5)

where c1 and c2 are the corrosion current densities in absence and presence of inhibitors, respectively.

Results and discussion

Weight-loss measurements

The weight loss of mild steel was studied at various time intervals, in the absence and presence of stated concentrations of (ANL) in 0.5 M HCl + 3.5 % NaCl at 25 °C. The values of weight loss (WtL), corrosion rate (CR) and the % inhibition efficiency (%IE) are presented in Table 1. The corrosion rate is reduced with increases in the inhibitor concentration due to the increased number of inhibitor molecules adsorbed on the steel surface, thus providing wider surface coverage. Figures 2, 3 and 4 show the variation of weight-loss, corrosion rate and % inhibition efficiency versus exposure time at different inhibitor concentrations, while Fig. 5 shows the variation of %IE with inhibitor concentration. The curves obtained indicate progressive increases in %IE with increases in inhibitor concentration accompanied by a reduction in corrosion rate. The surface coverage values indicates a progressive increase in film formation with increases in inhibitor concentration which further increases the inhibition efficiency.

Table 1 Data obtained from weight loss measurements for mild steel in 0.5 M HCl +3.5 % NaCl in presence of specified concentrations of ANL at 360 h
Fig. 2
figure 2

Variation of weight-loss with exposure time for samples in 0–7.5 % ANL concentrations

Fig. 3
figure 3

Effect of % concentration of ANL on the corrosion rate of austenitic stainless steel

Fig. 4
figure 4

Variation of inhibition efficiencies of samples during the exposure period

Fig. 5
figure 5

%inhibition efficiency of ANL at varying concentrations from weight loss

Polarization studies

The potential was scanned from −1.50 to 1.50 V versus Ag/AgCl at a rate of 0.02 V s−1, which allows for quasi-stationary state measurements. The inhibitive effect of the addition of ANL on the potentiodynamic corrosion behaviour of mild steel in the acid chloride solution was studied. Figure 6 shows the polarization curves of mild steel in the absence and presence of ANL concentrations while Figs. 7 and 8 show the plot of corrosion rate and inhibition efficiency versus inhibitor concentration. A comparative plot of % inhibition efficiency versus inhibitor concentration for both weight loss and linear polarization resistance is shown in Fig. 9. Anodic and cathodic reactions were inhibited effectively with increasing concentrations of the inhibitor. ANL appeared to act as mixed-type inhibitor since anodic (metal dissolution) and oxygen reduction reactions were significantly influenced by its presence in the corrosive medium. All scans exhibited slightly similar polarization behavior over the potential domain examined, indicating similar electrochemical reactions took place on the metal. The electrochemical parameters such as corrosion potential (E corr), corrosion current (i corr)corrosion current density (I corr), cathodic Tafel constant (bc), anodic Tafel slope (ba) and  %inhibition efficiency (%IE) were calculated and are given in Table 2. These results show that the %IE increased while the corrosion current density generally decreased with the addition of ANL until the 10 and 12.5 % concentrations when there was a sharp increase before decreasing at the 15 % concentration. The corrosion current density (I corr) and corrosion potential (E corr) were determined by the intersection of the extrapolating anodic and cathodic Tafel lines, % IE was calculated from Eq. 6

Fig. 6
figure 6

Polarization scans for austenitic stainless steel in 0.5 M HCl +3.5 % NaCl solution in the absence and presence of different concentrations of ANL (0–7.5 %) at 25 °C

Fig. 7
figure 7

The relationship between corrosion rate and inhibitor concentration for polarization test

Fig. 8
figure 8

The relationship between %IE and inhibitor concentration for polarization test

Fig. 9
figure 9

Comparative plot of the variation between % inhibition efficiency and inhibitor concentration for weight loss analysis and linear polarization resistance technique

Table 2 Data obtained from polarization resistance measurements for mild steel in 0.5 M HCl +3.5 % NaCl in presence of different concentrations of the ANL
$$ \% {\text{IE}} = \frac{{{\mathbf{CR}}1 - {\mathbf{CR}}2}}{{{\mathbf{CR}}1}}\% $$
(6)

It can be seen from Table 2 that ANL increases electrolytic activity at the immediate onset of the electrochemical process, whereby before the inhibition effect of ANL starts instantaneous desorption takes place as observed in the low E corr (obs) value of the control specimen compared to the E corr (obs) values of the inhibited specimens. ANL shifts both the cathodic and anodic branches of the polarization curves of the acid chloride solution to lower values of current density, indicating the inhibition of both the hydrogen evolution and mild steel dissolution reactions; however, the cathodic reaction was more effectively inhibited than the anodic reactions of mild steel with slight differentiation of the corrosion potential. These observations indicate that a mixed-type corrosion inhibition, i.e. ANL, is an inhibitor of mixed-type with a predominant effect on the hydrogen reaction for the corrosion of mild steel in 0.5 M HCl + 3.5 % NaCl.

It can also be seen that ANL decreases the corrosion current densities at all the studied concentrations, meaning that the corrosion rate of mild steel is significantly reduced. The inhibition efficiency obtained from polarization measurements is in good agreement with results obtained from the weight loss tests. Moreover, the anodic and cathodic Tafel slope values are different from the ones obtained with and without the presence of ANL, respectively, suggesting that the mechanism of the reaction of mild steel in 0.5 M HCl + 3.5 % NaCl is influenced by the presence of ANL. The anodic Tafel lines (ba) are observed to change with the addition of inhibitors suggesting that the inhibitors were first adsorbed onto the metal surface and impede the passage of metal ions from the oxide-free metal surface into the solution, by merely blocking the reaction sites of the metal surface thus affecting the anodic reaction mechanism. Increasing the concentration of the inhibitor gives rise to a consistent decrease in anodic and cathodic current densities, indicating that ANL acts as a mixed-type inhibitor [50]. As shown in Table 2, the values of cathodic Tafel slope constants (bc) varied differentially in the presence of ANL concentrations, indicating changes in the mechanism of its inhibition. This suggests that the inhibitor affects the mechanism of the cathodic reaction (hydrogen evolution and oxygen reduction reaction) which is the main cathodic process under activation control, and that the addition of ANL modifies and suppresses the reaction. Results suggest that the inhibition mode of the tested ANL is by simple blockage of the surface via adsorption, accompanied by an increase in the number of adsorbed organic molecules on the steel with increase in inhibitor concentration, which further impedes the diffusion of ions to or from the electrode surface as the degree of surface coverage (θ) increases [51]. The adsorption ANL on the metal surface can also occur on the basis of donor–acceptor interactions between the π-electrons of the aromatic compound, the lone pairs of the heteroatoms, and vacant d-orbitals of the iron surface atoms [52]. When ANL is dissolved in HCl medium, protonation can occur by the reaction of the amino group with HCl. Amines and heterocycle nitrogen compounds may also adsorb through electrostatic interactions between the positively charged nitrogen atoms and the negatively charged metal surface. The protonated compounds may decrease the hydrogen evolution by adsorbing on the cathodic sites of the mild steel. The adsorption of amine can be influenced by the nature of the anions in the acidic solution [53]. Being specifically adsorbed, they create an excess negative charge towards the solution and favor more adsorption of the cations [54]. ANL may adsorb anodic sites through the nitrogen atoms and aromatic rings, which are electron-donating groups, and decrease anodic dissolution of mild steel.

The values of the anodic Tafel slope can be attributed to diffusion control rather than a surface kinetic process. ANL acts on both anodic and cathodic sites, reducing the corrosion rate without a significant change in the corrosion potential, generally by surface adsorption over the surface of the steel in contact with the inhibitor, and consequently forming a thin protective layer. It is clear that the cathodic reaction (hydrogen evolution) is inhibited and that the inhibition increases along with the inhibitor concentration. [55]. This controls corrosion by attacking the cathodic activity, blocking sites where oxygen picks up electrons and is reduced to hydroxyl ions [56]. The variable constancy of this cathodic slope can indicate that the mechanism of proton discharge reaction changes by addition of the ANL to the acidic media.

Mechanism of inhibition

The results obtained from the electrochemical and weight loss measurements prove that ANL inhibits the corrosion of mild steel in 0.5 M HCl + 3.5 % NaCl by adsorption at the mild steel solution interface through film formation. It is a general assumption that the adsorption of organic inhibitors at the metal surface interface is the first step in the mechanism of the inhibitor action. Organic molecules may adsorb on the metal surface in four types, namely

  1. (i)

    Electrostatic interaction between the charged molecules and the charged metal,

  2. (ii)

    Interaction of unshared electron pairs in the molecule with the metal,

  3. (iii)

    Interaction of pi-electrons with the metal, and

  4. (iv)

    A combination of types (i–iii).

The inhibition of active dissolution of the metal is due to the adsorption of the inhibitor molecules on the metal surface forming a protective film. The inhibitor molecules can be adsorbed onto the metal surface through electron transfer from the adsorbed species to the vacant electron orbital of low energy in the metal to form a coordinate type link. Owing to the acidity of the medium, neither the N heteroatoms nor the –NH2 group could remain in solution as free bases. They exist as a neutral species or in the cationic form, thus the adsorption of the examined ANL molecules could occur due to the formation of a link between the d-orbital of iron atoms, involving the displacement of water molecules from the metal surface, and the lonely sp2 electron pairs present on the N atoms of both the benzene rings. Aniline is highly susceptible to electrophilic substitution reactions. Its high reactivity reflects that it is an enamine, which enhances the electron-donating ability of the ring. In the acidic medium, it prevents metallic ionization, thus inhibiting anodic dissolution through film formation. This creates an impenetrable barrier to the sulfate and chloride ions responsible for corrosion

It is well known that iron has coordinate affinity toward nitrogen, sulfur and oxygen-bearing ligand; hence, adsorption on iron can be attributed to coordination through the –NH group, hetero atoms (N), and pi-electrons of the aromatic ring. Thus, it is assumed that ANL follows the type (iv) inhibition mechanism. In all cases, the value of %IE increases with increases in inhibitor concentration, suggesting an increase of the number of molecules adsorbed on the mild steel surface [57], blocking the active sites of acid attack which protects the metal from corrosion. The maximum efficiency of ANL varies between 95.1 and 98.9 %.

Adsorption isotherm

The mechanism of corrosion protection may be explained on the basis of adsorption behavior [58]. Adsorption isotherms are very important in determining the mechanism of organo-electrochemical reactions. The adsorptive behavior of a corrosion inhibitor is an important part of this study, as it provides important clues to the nature of the metal–inhibitor interaction [59]. Interaction information between the inhibitor molecule and metal surface can be provided by an adsorption isotherm [60]. The degree of surface coverage (θ) which represents the part of the metal surface covered by inhibitor molecules was calculated using Eq. 2b. The degree of surface coverage was found to increase with increasing the concentration of inhibitors. Attempts were made to fit the values to various isotherms. For an inhibitor to have a high surface coverage on the surface, a chemical bond between the inhibitor and the metal atom stronger than the one for water molecules should be formed. The adsorption of corrosion inhibitors at the metal/solution interface is due to the formation of either electrostatic or covalent bonding between the adsorbates and the metal surface atoms. Langmuir, Frumkin and Freudlich adsorption isotherms were best able to describe the adsorption mechanism for ANL compounds as they fit the experimental results at 25 °C.

Frumkin isotherm was applied according to Eq. 7.

$$ KC = \left[ {\frac{{{\uptheta}}}{{1 - {{\uptheta}}}}} \right]{ \exp }\left( { - 2a\theta } \right) $$
(7)

The graph is shown in Fig. 10. This confirms the existence of molecular interactions on the adsorbed layer [61, 62]

Fig. 10
figure 10

Relationship between the log of equilibrium constant of adsorption K and Inhibitor concentration C

where a is a parameter characterizing the interaction between the adsorbed particles, 2a represents the variation of adsorption potential with coverage, which depends upon molecular interactions in the adsorption layer.

The fit of the experimental data to the above isotherm suggests an occurrence of multilayer physical adsorption on top of the chemisorbed monolayer formed at the ANL concentrations [63].

Freudlich adsorption isotherm is of the general form as shown in equation [8].

$$ {\text{f}}(\theta ,x){ \exp }( - 2a\theta ) = KC $$
(8)

where f (θ, x) is the configurational factor which depends upon the physical model and assumption underlying the derivative of the isotherm [64], θ is the surface coverage, C is the inhibitor concentration, x is the size ration, ‘a’ is the molecular interaction parameter, and K is the equilibrium constant of adsorption process.

For the Freundlich adsorption isotherm, a plot of log [%IE] is made against log C. Figure 11, which is linear graph, was obtained, showing that the adsorption of ANL on the surface of the mild steel obeys the Freundlich adsorption isotherm [65, 66]

Fig. 11
figure 11

Plot of logarithm of inhibition efficiency versus inhibition concentration

The Langmuir adsorption isotherm best describes the adsorption mechanism for ANL. The conventional form of the Langmuir isotherm is shown in Eqs. 9 and 10.

$$ \left[ {\frac{\theta }{1 - \theta }} \right] = \, KC $$
(9)

Re-arranging gives

$$ \left[ {\frac{c}{\theta } = \frac{1}{\theta }} \right] + \, C $$
(10)

where θ is the degree of coverage on the metal surface, C is the inhibitor concentration in the electrolyte, and K ads is the equilibrium constant of the adsorption process. The plots of \( \frac{C}{\theta } \) versus the inhibitor concentration were linear (Fig. 12) indicating Langmuir adsorption.

Fig. 12
figure 12

Relationship between \( \frac{C}{\theta } \) and inhibitor concentration (C)

The slight deviation of the slopes from unity is attributed to the molecular interaction among the adsorbed inhibitor species, a factor which was not taken into consideration during the derivation of the Langmuir equation. The Langmuir isotherm assumes that:

  1. (i)

    The metal surface contains a fixed number of adsorption sites and each site holds one adsorbate.

  2. (ii)

    ΔG ads is the same for all sites and is independent of θ.

  3. (iii)

    The adsorbates do not interact with one another, i.e. there is no effect of lateral interaction of the adsorbates on ΔG ads [67].

The free energies of adsorption, ΔG ads, were calculated from the equilibrium constant of adsorption using the following equation as shown in Table 3 \( \Updelta G_{\text{ads}} = - 2. 30 3{\text{RT}}{ \log }\left[ { 5 5. 5 {\text{K}}} \right] \)

Table 3 Data obtained for the values of Gibbs free energy, surface coverage and equilibrium constant of adsorption at varying concentrations of ANL

where 55.5 is the molar concentration of water in the solution, R is the universal gas constant, and T is the absolute temperature. Generally, values of ΔG ads around −20 kJ/mol or lower are consistent with the electrostatic interaction between the charged molecules and the charged metal (physisorption); those around −40 kJ/mol or higher involve charge sharing or transfer from organic molecules to the metal surface to form a coordinate type of bond [68]. The value of ΔG ads reflects the strong adsorption capability. The negative values of ΔG ads show that the adsorption of inhibitor molecules on the metal surface is spontaneous [69]. The values of ΔG ads calculated range between −31.50 and −35.10 kJ mol−1 for AN. Accordingly, the values of ΔG ads obtained in the present study indicate that the adsorption mechanism of ANL on austenitic stainless steel is of mixed interaction, i.e. chemisorption and physisorption, due to the strong adsorption of water molecules on the surface of the stainless steel., The removal of water molecules from the surface is accompanied by chemical interaction between the metal surface and the adsorbate, and that turns to chemisorption [70]. It is assumed from observations that the adsorbed layer was of multiple layers of molecular thickness at all sites, resulting in equal energies and enthalpies of adsorption. The intermolecular bonding to the adsorption sites can be either chemical or physical, but is sufficiently strong to prevent displacement of adsorbed molecules along the surface [71]. The nitrogen atoms of the inhibitor molecules are readily adsorbed onto the metal surface, forming insoluble stable films on the metal surface, thus decreasing metal dissolution.

Conclusions

  1. 1.

    The corrosion rate of mild steel in 0.5 M HC1 +3.5 % NaCl acid solution decreased significantly with increase in inhibitor concentration

  2. 2.

    ANL showed effective inhibition with maximum inhibitor efficiency of 98.9.8 % at 0.001611 M inhibitor concentration.

  3. 3.

    ANL adsorption on the metal surface strongly obeyed the Langmuir adsorption isotherm more than the Freudlich and Frumkin adsorption isotherms.

  4. 4.

    Mixed molecular adsorption was proposed from the calculated values of Gibb’s free energy.

  5. 5.

    The potentiodynamic values were greatly influence by the actions of the inhibitor, while the current density was significantly depressed with greater influence on the cathodic reactions