1 Introduction

Mild steel, also known as plain-carbon steel, is the most preferred form of steel due to its availability, low price and relatively acceptable physical properties. The problem being faced as regards its use is its susceptibility to corrosion especially in acidic environments. Many manufacturing industries (such as automobile, chemical, food, oil and gas industries) make use of iron and steel vessels in carrying out their operations. In most cases, acidic solutions are used extensively in such environment, thereby causing such materials to be prone to corrosion [1,2,3,4].

Also, stainless steel that is frequently in contact with acidic medium is not exempted from the degradation/deterioration caused by corrosion. Some of the consequences of stainless steel corrosion in industrial operations include reduction in the thickness of the shell or an effective pipe diameter, leakage of hazardous fluids from stainless steel (which acts as a conveyor, container or reservoir), and even plants shutdown resulting from the economy loss [5].

It was reported by [6] that the estimated loss to corrosion of oil pipelines in the Nigerian oil and gas industry is up to $765 million yearly. Directly and indirectly, corrosion has effects on different areas of our lives. For example, sudden failure of an equipment leads to a construction collapse or cause a fire explosion, or some metallic materials when corrode release toxic substances that are harmful to human health, plants and animal in the vicinity [6].

The need for corrosion control and mitigation is evident in the above-stated undesirable issues being faced by important sectors of the nation’s economy. There are two major methods used in the protection of steel from corrosion, namely cathodic protection and corrosion inhibitors. Cathodic protection works using the principle of a sacrificial anode, that is, making a metal to assume the work of a cathode in an electrochemical cell. With the aim of maximizing profit and reducing cost for various industries, the use of corrosion inhibitors has been set as the most effective means of addressing the corrosion of metals [7, 8].

The term eco-friendly (green) inhibitor is used to describe inhibitors that are compatible with nature while also performing their anticorrosion functions. This explains the reason why the recent research trends on corrosion inhibitors has shifted its focus from the use of certain chemicals that have hazardous effects on the environment. Furthermore, the availability, cost effectiveness of these green inhibitors and environmental legislation have favourably placed emphasis on the relevance and use of these green inhibitors [9].

One main property that an inhibitor must possess to be able to effectively protect a metal from corrosion is an excellent adsorption behaviour on the surface of the metal to be protected. Some plant extracts, that are being used as eco-friendly (green) corrosion inhibitors due to their biodegradability and non-toxic nature, have this adsorption behaviour [10]. Some active functional substances that research has shown to be the cause of effectiveness in corrosion inhibitors include tannins, pigments, steroids, saponins, anthraquinones and phenolic compounds are also present in these extracts [1, 11, 12].

With recent trends showing focus on the use of environmentally friendly plant extracts as effective corrosion inhibitors, this research focuses on aloe vera plant extract as corrosion inhibitor in acidic media of mild and stainless steels, both the gravimetric and electrochemical tests will be considered, with emphasis on the aloe vera inhibitor concentration range of (0–10) vol/vol% in the acidic medium. The novelty of this research work is in the establishment of the adsorption behaviour (in terms Gibbs free energy, ∆Gads, of the Langmuir isotherm) of both the mild steel and stainless steel in the acidic medium to determine the appropriate inhibitor concentration.

2 Materials and Methods

2.1 Aloe Vera and Metal Samples Preparation

The colourless liquid extract from clean and succulent aloe vera was collected in a clean air-tight container at room temperature. The extraction was obtained through simple hand press after cutting each strand of aloe vera plant into two [10, 13].

Figure 1 shows the main chemical compounds in aloe vera that are responsible for the inhibitive nature of the plant. These compounds possess aromatic structures with long aliphatic chains and free electron pairs available to bond easily with ions on the metal surface, exhibiting good corrosion protection efficiency [1, 10].

Fig. 1
figure 1

Corrosion inhibitive compounds in aloe vera: a Anthraquinone, b p-Coumaric acid, c Caffeic acid, d Ferulic acid

Each of the mild steel and stainless steel samples used was cut into the dimension of 15 × 15 × 5 mm. The samples were polished with emery papers of different grades, rinsed with distilled water and allowed to dry at the room temperature [4, 7]. The weights of the samples were taken and the samples were labelled accordingly, based on the experimental design employed. Varied concentration of the aloe vera extracted and 0.5 M H2SO4 acidic medium of 200 mL volume were used in the course of the experiments [13].

2.2 Corrosion Tests

The corrosion tests carried out are the gravimetric and electrochemical tests. The gravimetric test involves the immersion of the samples (for both mild steel and stainless steel) in 200 mL of 0.5 M H2SO4 solutions containing various concentrations of the aloe vera inhibitor and one without the inhibitor, for a period of 21 days at an ambient temperature 25 °C. Weight loss due to corrosion (with a 3–day interval) was determined. Also, inhibition efficiency (IE%) and surface coverage (θ) were determined using

$$IE\% = \frac{W - {W}_{i}}{W}\times 100$$
(1)
$$\theta = \frac{{{\text{W}} - W_{i} }}{{\text{W}}}$$
(2)

where \(W\) and \({W}_{i}\) are weight loss in the absence of inhibitor and weight loss in the presence of inhibitor, respectively.

The electrochemical experiment was carried out at ambient temperature of 25 °C using Autolab PGSTAT 30 ECO CHIMIE potentiostat and electrode cell containing 200 mL of 0.5 M H2SO4 electrolyte (with and without varied concentrations of inhibitor). The electrochemical cell has a graphite rod (auxiliary electrode), Ag/AgCl (reference electrode) and the metal sample (working electrode), for both the mild steel and the stainless steel when used separately. The stabilization of the electrode at OCP was noted, potential range considered was − 2.0 V to + 1.0 V, at a scan rate of 0.00166 V/s, and current measurement (I) was taken.

The values of corrosion potential (Ecorr), corrosion current density, Icorr, (A/cm2), corrosion rate and polarization resistance were obtained using the experimental measurements from the Tafel plots of potential E (V) against log current I. Inhibition efficiency (IE%) and surface coverage (θ) were also determined using

$$\theta = 1 - \frac{{I_{corr} }}{{I_{ocorr} }}$$
(3)
$$IE\% = 1 - \frac{{I_{corr} }}{{I_{ocorr} }} \times 100$$
(4)

where \({I}_{corr}\) and \({I}_{ocorr}\) are the current densities with and without inhibitor, respectively.

2.3 Adsorption Study of the Aloe Vera Inhibitor

The gravimetric data obtained from this research work were fitted into various adsorption isotherms. Based on the adsorption isotherms considered, the appropriate model was considered by the plot that gives a straight line that has a correlation coefficient of approximately one (1). The adsorption isotherm models employed in this research work is Langmuir adsorption isotherm which is expressed as

$$\frac{C}{\theta } = \frac{1}{K} + C$$
(5)

where K is the adsorption constant.

2.4 Thermodynamics Study of the Aloe Vera Inhibitor

The thermodynamic parameter, change in Gibbs free energy, (∆Gads) was evaluated from the data obtained from the adsorption isotherm plots, using the equation:

$$\Delta {\text{G}}_{{{\text{ads}}}} = { 2}.{3}0{\text{3RTlog }}\left( {{55}.{\text{5 K}}_{{{\text{ads}}}} } \right)$$
(6)

where Kads is the adsorption constant. The values of ∆Gads obtained were be used to validate the form of adsorption mechanism that aloe vera inhibitor employed during the corrosion process.

2.5 SEM Analysis

Quanta 200FEI Scanning equipment was used in carrying out the comparative morphological structures of the surface of the samples (with and without inhibitor) that suffered corrosion.

3 Results and Discussion

3.1 Gravimetric Test

Figure 2a and b shows the weight loss obtained from the variation of the aloe vera inhibitor, at different exposure time during gravimetric test. The weight loss rate of the stainless steel was observed to be lower than that of the mild steel, and this can be attributed to the combined alloy effect used in the make-up of stainless steels [13]. Also it could be seen that the weight loss rate decreased as the concentration of aloe vera inhibitor increased, an indication of the increased formation of a barrier layer of the inhibitor on the surface of the metal sample, thereby reducing corrosion reaction rate [10]. When no inhibitor was applied (control), the rate of weight loss was very high, and this established the performance of aloe vera as a corrosion inhibitor.

Fig. 2
figure 2

a Trend of weight loss with increasing exposure time for mild steel. b Trend of weight loss with increasing exposure time for stainless steel

Figure 3a and b shows the inhibitor efficiency (%) obtained from the variation of the inhibitor concentration. For both mild steel and stainless steel, inhibition efficiency increase with increase in inhibitor concentration, but higher inhibitor efficiency was observed for stainless steel. The least value of efficiency was recorded when no inhibitor was introduced into the corrosion process. The results also show that the efficiency of the inhibitor slightly reduced with time, an indication that the inhibitive activity of the aloe vera inhibitor reduced with time.

Fig. 3
figure 3

a Inhibition efficiency against inhibitor concentration for mild steel. b Inhibition efficiency against inhibitor concentration for stainless steel

Figure 4a and b shows the plots of the metal surface coverage by the aloe vera inhibitor against inhibitor concentration. The trends observed were similar to that of the trends obtained in the plots of inhibitor efficiency against inhibitor concentration: that is surface coverage increased with increased inhibitor concentration, an indication that the active sites on the metal samples were blocked by the inhibitor, thereby reducing the exposed surface area of the metal samples to the corrosive medium [12, 14].

Fig. 4
figure 4

a Surface coverage against inhibitor concentration for mild steel. b Surface coverage against inhibitor concentration for stainless steel

3.2 Electrochemical Tests

Tables 1 and 2 show the electrochemical test parameters obtained for inhibited and uninhibited mild steel and stainless steel, respectively. It was observed that the increased concentration of the inhibitor in the corrosive medium reduced both the current density (jcorr) and corrosion rate significantly, and also indicated the non-uniformity of the corrosion process. These results are in conformity with the results obtained earlier in Figs. 2, 3 and 4: that is, an increase in the concentration of aloe vera inhibitor hindered the corrosion of both the mild and stainless steels. The decrease in jcorr values can also be attributed to the increased adsorption of the inhibitor on the mild steel metal surface: that is, the bond between the inhibitor molecules and the metal surface increased, thereby reducing the metal corrosion reaction rate [11, 12]. This fact is further justified by the increase in polarization resistance experienced as the inhibitor concentration increased.

Table 1 Electrochemical tests parameters for inhibited and uninhibited mild steel
Table 2 Electrochemical tests parameters for inhibited and uninhibited stainless steel

The Ecorr values obtained from the experiment for both mild and stainless steel exhibit similar patterns. The Ecorr values define the potential at which the rate of oxidation is equal to the rate of reduction and at this point, both polarities of current are present. The values tend towards the more negative side of the Ecorr, then the cathodic current predominates at the expense of the anodic current. The little variations in the Ecorr values suggest a mixed-type behaviour in polarization of both steels. Although it did not fully assume either the negative or the positive type, it exhibited more of cathodic nature.[11, 12].

Figure 5 shows a steady decrease in the rate of corrosion with an increase in inhibitor concentration. This supports the weight loss data obtained from the gravimetric experiments. Also, Figs. 6 and 7 reflect increased inhibition efficiency and surface coverage as the inhibitor concentration increased. In all, the plots for both mild steel and stainless steel follow the same trend, and the values obtained indicated that stainless steel has higher corrosion resistance than the mild steel and the use of aloe vera (as inhibitor) was justified, as indicated in the Tafel plots (Figs. 8a and b).

Fig. 5
figure 5

Corrosion rate against inhibitor concentration during electrochemical test

Fig. 6
figure 6

Inhibitor efficiency against inhibitor concentration during electrochemical test

Fig. 7
figure 7

Surface coverage against inhibitor concentration during electrochemical test

Fig. 8
figure 8

a Potentiodynamic polarization curves for inhibited and uninhibited mild steel. b Potentiodynamic polarization curves for inhibited and uninhibited stainless steel

Also, Tafel plots in Fig. 8a and b indicated the prevalence of the cathodic current due to the polarization of the sample in the negative direction: that is, aloe vera inhibitor exhibited more as cathodic inhibitor than anodic inhibitor.

3.3 Surface Morphology Analysis

The optical images of the mild steel and stainless steel after immersion in the acidic media (0.5 M H2SO4 solution) with and without aloe vera inhibitor are shown in Figs. 9 and 10. Minimal pits (indication of pitting corrosion) were observed in the case of stainless steel, while the major form of corrosion of the mild steel was uniform corrosion: that is, the degree of surface roughness in the case of mild was more than that of the stainless steel, an indication that mild steel suffered more corrosion attack by the aggressive medium (acid) compared to the corrosion level of the stainless. The morphological deterioration in each case of the metal samples was observed to reduce as the concentration of the aloe vera inhibitor increased, this implies increase in inhibitor concentration amounts to the formation of more passive film blocking the metal surface from further corrosion [15, 16]. In the case of the use of no inhibition, the corrosion impact (traceable to the level of roughness) of the sample was the highest, and the corrosion products formed (whitish substance) could be easily observed in this case.

Fig. 9
figure 9

Optical images (mag. X50, 100 µm) of the mild steel surface after immersion in the acidic media with a 0 vol/vol%, b 2.5 vol/vol%, c 5.0 vol/vol%, d 7.50 vol/vol%, e 10.0 vol/vol%

Fig. 10
figure 10

Optical images (mag. X50, 100 µm) of the stainless steel surface after immersion in the acidic media with a 0 vol/vol%, b 2.5 vol/vol%, c 5.0 vol/vol%, d 7.50 vol/vol%, e 10.0 vol/vol%

3.4 Adsorption Studies on the Inhibitive Performance of Aloe Vera

The adsorption behaviour determines the nature and inhibitive effect of aloe vera. The data obtained from the experiments were tested to fit the Langmuir adsorption isotherm by plotting graphs. The data could not successively fit into Temkin and Freundlich adsorption isotherms. Figures 11 and 12 show Langmuir adsorption plots for mild steel and stainless steel, respectively.

Fig. 11
figure 11

Langmuir adsorption plot for aloe vera adsorption process for mild steel

Fig. 12
figure 12

Langmuir adsorption plot for aloe vera adsorption process for stainless steel

From Figs. 11 and 12, it could be seen that as the inhibitor concentration increased, the inhibitor coverage on the metal surface increased: that is, the increased inhibitor coverage caused the bond between the inhibitor molecules and the metal surface to increase, thereby reducing the corrosion reaction rate on the metal surface [12]. The adsorption mechanism (physisorption or chemisorption) is described in terms of the values of the adsorption constant (Kads) and Gibbs free energy (∆Gads) obtained [20].

By plotting C/ Ө against C for different aloe vera inhibitor concentration, straight line graphs were obtained; this follows the principle of Langmuir adsorption isotherm as stated in Eq. 5 and also reported in literatures [17, 18]. The equilibrium adsorption constant (Kads) was also calculated.

From Table 3, the slope and the linear correlation coefficient (R2) of the fitted data were close to unity in each case, an indication that the adsorption of the inhibitor molecules obeys the Langmuir adsorption isotherm [10, 17, 19, 20].

Table 3 Linear correlation coefficient of the fitted data obtained from the Langmuir adsorption model for mild steel and stainless steel at 25 °C

3.5 Thermodynamics Studies on the Inhibitive Performance of Aloe Vera

The different values of Kads were used in calculating the ∆Gads values for Langmuir adsorption isotherms. From the calculated change in Gibbs free energy obtained (∆Gads), the validation of the form of adsorption mechanism that aloe vera inhibitor employed (as an anticorrosion agent) was established. Table 4 shows the thermodynamics properties obtained for mild steel and stainless steel, using aloe vera inhibitor.

Table 4 Thermodynamics properties obtained for mild steel and stainless steel

The negative values of ∆Gads indicate that the reaction is spontaneous and a physisorption adsorption mechanism of the aloe vera inhibitor since the values of ∆Gads obtained are more than − 20 kJ/mol (the standard value for physisorption); this supports the consistent electrostatic interaction between charged molecules and a charged metal surface [20]. The lesser negative values of ∆Gads in the Langmuir isotherm indicate a better physisorption property of aloe vera as an inhibitor, and hence it is reasonable to claim that Langmuir isotherm is a suitable isotherm for the adsorption mechanism.

4 Conclusion

From this research work, the following conclusion can be made:

  1. 1.

    Aloe Vera was found to be an effective inhibitor of mild and stainless steel as an increase in its concentration up to 10 vol/vol% led to an increase in inhibition efficiency.

  2. 2.

    Aloe vera attained a maximum inhibition efficiency of 88.9% for the mild steel and 99.1% for stainless steel, both at an optimum concentration of 10 vol/vol% in H2SO4 medium.

  3. 3.

    Langmuir adsorption isotherm was obeyed by the inhibition of mild and stainless steel using aloe vera in 0.5 M H2SO4 with the values of the regression coefficients near unity.

  4. 4.

    The negative values of ∆Gads show the spontaneous adsorption of inhibitor unto the mild and stainless steel surfaces.

  5. 5.

    The electrochemical potentiodynamic polarization studies show that aloe vera acted as mixed-type inhibitor, but more of cathodic inhibitor

  6. 6.

    The overall results show that stainless steel has a higher corrosion resistance compared to mild steel.