1 Introduction

The dissolution of metals, especially in aqueous solutions, is commonly mitigated by using corrosion inhibitors [1]. In the metallurgical industry, hydrochloric and sulfuric acids are widely used in various processes such as pickling of metals to remove scale, deactivation of equipment in atomic power establishments, chemical or electrochemical processes in oil refinery, rocket fuel components in rocket technology, etc. [2, 3]. Organic compounds containing nitrogen, oxygen and phosphorus atoms are assumed to have protective action against the corrosion of different metals and alloys [4]. Many synthetic compounds have shown good anticorrosive activity, but these compounds are very toxic to both human beings and the environment. The toxicity, safety and environmental issues of corrosion inhibitors have given prominence to the use of naturally synthetic products as alternative corrosion-preventive agents, which are harmless and environmentally safe. From the standpoint of safety, the development of non-toxic, safe and effective inhibitors, known as eco-friendly or green corrosion inhibitors, has become increasingly desirable [59]. Over the past couple of decades, studies have focused on the application of non-toxic inhibitors called green or eco-friendly environmental inhibitors. Natural plants in the form of extracts, oils or pure compounds may play major roles in keeping the environment more healthy, safe and under pollution control. Among the various natural products, such as the Lawsonia extract [10], Hibiscus sabdariffa extract [11], Garcinia kola extract [12], fenugreek extract [13], Phyllanthus amarus extract [14], Azadirachta indica [15], blackener [16] and Gossypium hirsutum L. [17], all have been reported to be good inhibitors for steel in acidic solutions. In our laboratory, several extracts of natural plants, such as coffee husk extract [18], gave 88 % inhibition efficiency for α-brass in 1 M HNO3 at 500 ppm, Melilotus officinalis extract [19] gave 88 % inhibition efficiency at 300 ppm for Al in 1 M HCl, Roselle extract [20] gave 93 % inhibition efficiency at 500 ppm for C-steel in 0.5 M HCl, and Ceratonia siliqua extract gave more than 80 % inhibition for Cu in nitric acid.

This work is a continuation of the earlier works and an attempt to evaluate the inhibitive action of natural Thevetia peruviana on the corrosion of C-steel in 1 M HCl using chemical and electrochemical techniques.

2 Materials and Methods

2.1 Composition of Material Samples

2.1.1 Solutions

A 1-M aggressive solution (hydrochloric acid) was prepared in the laboratory by diluting the appropriate volume of analytical grade 37 % HCl with bi-distilled water. The acid was standardized by a standard solution of sodium carbonate.

2.1.2 Chemical Structure of Compounds Present in the Plant (Thevetia peruviana)

Thevetia peruviana belongs to the Apocynaceae family and is commonly called yellow oleander or Pilakanher. All parts of the plant contain a variety of cardiac glycosides [21]. Figure 1 shows some of the important chemical constituents present in the plant.

Fig. 1
figure 1

Structures of cardiac glycosides and their free aglycones found in the Thevetia peruviana plant

2.1.3 Preparation of Plant Extract

The dried plant was crushed into small pieces of 5–10 mm using a cylindrical crusher and extracted with bi-distilled water. The extract was obtained by mixing 100 g of the dried plant in 250 ml of water at 80 °C for 30 min. The extract was left overnight, then filtered through a filter paper, completed to 1000 ml with bi-distilled water and finally stored under refrigeration in glass flasks tapered with a screw plastic lid [22].

2.1.4 Weight Loss Tests

The specimens with dimension of (2 × 2 × 0.2) cm were used for the weight loss measurements. The specimens were abraded successively with different series of emery paper of variable grades starting with the coarsest (80) and proceeding in steps to the finest (1200) grade, degreased with acetone and air-dried. The weight loss experiment was completed in a 100 ml 1 M HCl solutions without and with various concentrations of the investigated extract. The corrosion rates (CRs) were determined using the following equation [23]:

$${\text{Corrosion rate }}\left( {\text{CR}} \right) \, = \Delta m/st$$
(1)

Here, Δm is the mass loss, s is the exposed surface area of the specimen (cm2), and t is the immersion time. The inhibition efficiency, %IE and degree of surface coverage, θ, were determined using the following equation [24]:

$$\% {\text{IE}} = \theta \times 100 \, = \, \left[ { 1- \left( {{\text{CR}}_{\text{inh}} /{\text{CR}}_{\text{corr}} } \right)} \right] \, \times 100$$
(2)

Here, CRcorr and CRinh are the corrosion rates of carbon steel without and with extract, respectively.

2.1.5 Gasometric Method

Carbon steel sheets with dimension of (2 × 2 × 0.2 cm) were used for the hydrogen evolution experiments. Prior to each experiment, the surfaces of the carbon steel specimens were treated as before. The specimen was inserted in a beaker having a capacity of 100 ml evolved hydrogen gas and collected through a side arm connected by flexible polyethylene tubing to a gas burette standing in a beaker filled with water. This allowed measurement of the variation of the volume of hydrogen evolved during dissolution of the metal as a function of time. The experiments were carried out in the absence and presence of the different concentrations of extract. The corrosion rate (r) was taken as the slope of straight lines obtained from the relation between the volume of evolved hydrogen and time. The inhibition efficiency (%IE) was calculated as follows:

$$\% {\text{IE}} = \left[ {\frac{{r_{\text{f}} { - }r_{\text{i}} }}{{r_{\text{f}} }}} \right] \times 100$$
(3)

Here, r f and r i are the corrosion rates in the absence and presence of the extract.

2.1.6 Potentiodynamic Polarization Tests

Potentiodynamic polarization experiments were conducted in a conventional three-electrode cell using platinum gauze as the counter electrode and a saturated calomel electrode (SCE) as the reference electrode. The working electrode was prepared from a square carbon steel sheet of the same chemical composition as shown in Table 1 embedded in epoxy resin of polytetrafloroethylene such that the exposed surface area was 1 cm2. Prior to each test, the electrode surface was pretreated in the same manner as in the weight loss experiments. Before measurements, the electrode was immersed in solution at the open-circuit potential for 25 min until a steady state was reached. The cell was equipped so that the temperature during each experiment was kept constant and measurable. The potential of the working electrode was ramped ±250 mV in the vicinity of the corrosion potential, and the anodic and cathodic curves were obtained from −0.7 to 0.7 V at a scan rate of 1 mVs−1. All experiments were conducted in freshly prepared solutions at 25 °C, and the results were repeated three times to check the reproducibility. The inhibition efficiencies for each concentration of the extract and surface coverage, θ, were calculated using the following equation [25]:

Table 1 Chemical composition (weight %) of carbon steel
$$\% {\text{IE}} = \theta \times 100 \, = \left[ { 1- i_{\text{inh}} /i_{\text{corr}} } \right] \, \times 100$$
(4)

Here, i corr and i inh are the corrosion current densities calculated from the extrapolation of Tafel slopes without and with inhibitors.

2.1.7 Electrochemical Impedance Spectroscopy (EIS) Tests

Impedance measurements (EIS)were conducted using the same cell arrangement as before with a Gamry framework system based on ESA400. EIS measurements were performed using AC signals with an amplitude of 5 mV peak to peak at the open circuit potential in the frequency range of 100 kHz to 0.5 Hz. All impedance data were fitted to the appropriate equivalent circuit using the Gamry Echem Analyst software.

2.1.8 Electrochemical Frequency Modulation (EFM) Tests

EFM experiments were carried out by applying the potential perturbation signal with amplitude 10 mV with two sine waves of 2 and 5 Hz. The choice for the frequencies of 2 and 5 Hz was based on three arguments [26]. The larger peaks were used to calculate the corrosion current density (i corr), the Tafel slopes (β c and β a) and the causality factors CF2 and CF3 [27].

Electrochemical measurements were performed using the Gamry Instrument Potentiostat/Galvanostat/ZRA (PCI4-G750). This includes Gamry applications, DC105 software for DC corrosion, EIS300 software for electrochemical impedance spectroscopy (EIS) and EFM140 for electrochemical frequency modulation (EFM) measurements along with a computer for collecting data. Echem analyst version 6.03 software was used for plotting, graphing and fitting data.

2.1.9 Surface Analysis

The surface of carbon steel was first abraded using different emery papers (grades 80–1200) and washed off using bi-distilled water before immersing the specimens for 12 h in 1 M HCl in the absence and presence of an optimum concentration of the investigated plant extract. After this immersion time, the specimens were rinsed with bi-distilled water, completely dried and mounted into the spectrometer without any further treatment. The corroded carbon steel surfaces were examined using a Philips Energy Dispersive X-ray diffractometer (pw-1390) with a Cu-tube (CuKa1, l = 1.54051 Å) and a scanning electron microscope (SEM, JEOL, JSM-T20, Japan).

3 Results and Discussion

3.1 Weight Loss Tests

The weight loss of carbon steel specimens was recorded after different time intervals of immersion (30, 60, 90, 120, 150 and 180 min) at different temperatures (25, 30, 35, 40 and 45 °C); only the weight-loss curve at 25 °C is shown here (Fig. 2). The %IE values at different temperatures are given in Table 2. The results revealed that the presence of Thevetia peruviana extract suppressed the corrosion rate of the carbon steel specimens in 1 M HCl solution. The %IE was noted to increase when increasing the plant extract concentration as illustrated in Table 2. This can be attributed to the adsorption of extract molecules on the steel surface. This adsorption decreases the dissolution of the steel by blocking the corrosion sites and hence decreasing the weight loss while increasing the efficiency as the concentration of the extract increases.

Fig. 2
figure 2

Weight loss-time curve for the dissolution of carbon steel in the absence and presence of different concentrations of Thevetia peruviana extract at 25 °C

Table 2 Effect of addition of different concentrations of Thevetia peruviana extract on the surface coverage (θ) and inhibition efficiency values (%IE) at different temperatures

3.1.1 Adsorption Isotherms

In acid corrosion, generally, it is assumed that inhibitors act through a process of adsorption on the metal surface. The adsorption of the inhibitor may determine a structural charge of the double layer, thus reducing the rate of electrochemical partial reactions. Moreover, adsorption that particularly takes place at the active sites of the metal surface may hinder the reactivity of the metal in the process of dissolution. On the other hand, if the adsorption is followed by the reaction of hydration or reduction or polymerization of the inhibitor itself, thick layers may form that behave as a true physical barrier. In any case, the knowledge of the adsorption behavior of the inhibitors is important for the definition of its action mechanism. An adsorption isotherm gives the relation between the coverage of an interface with the adsorbed species and the concentration of the species in solution. Interpretation of the performance of the adsorbent type of inhibitor can be enhanced by fitting the data in one of known adsorption isotherms, which is represented in Fig. 3. The Temkin adsorption isotherm [28] was found to fit the experimental data well.

Fig. 3
figure 3

Temkin adsorption plots for carbon steel in 1 M HCl at different temperatures in the presence of various concentrations of Thevetia peruviana extract

$$\theta = \, \left( { 2. 30 3/a} \right){\text{ Log}}\,K_{\text{ads}} + \, \left( { 2. 30 3/a} \right){\text{ Log}}C$$
(5)

Here, \(\theta\) is the degree of surface coverage \(\left( {\theta = \% {\text{IE}}/100} \right)\), K ads is the adsorption equilibrium constant, C is the concentration of the extract, and “a” (heterogeneous factor of the metal surface) is a molecular interaction parameter depending upon molecular interactions. The Temkin adsorption model is based on the spontaneity of the adsorption process and may be applied to find various thermodynamic parameters. A plot of \(\theta\) versus log C gives straight lines with the slope equal to (2.303/a), and the intercept is (2.303/a) log K ads. The experimental data give good curve fitting for the applied adsorption isotherm as the correlation coefficients (R 2) close to 1, which were in the range (0.98–0.99). The values obtained of Kads and \(\Delta G_{\text{ads}}^{\text{o}}\) are given in Table 3. The negative value of \(\Delta G_{\text{ads}}^{\text{o}}\) and the value of Kads are more than unity, which ensures the spontaneity of the adsorption process and stability of the adsorbed layer on the carbon steel surface. Generally, values of \(\Delta G_{\text{ads}}^{\text{o}}\) around −20 kJ mol−1 or lower are consistent with the electrostatic interaction between the charged molecules and the charged metal (physisorption); those around −40 kJ mol−1 or higher involve charge sharing or transfer from organic molecules to the metal surface to form a coordinate type of bond (chemisorption) [29]. In this study, the calculated \(\Delta G_{\text{ads}}^{\text{o}}\) values being closer to −40 kJ mol−1 indicate that the adsorption mechanism of the extract on carbon steel in 1 M HCl solutions was typical of chemisorption. The unshared electron pairs in oxygen may interact with the d-orbital of carbon steel to provide a protective chemisorbed film [30]. The adsorption of these molecules could take place via interaction with the vacant d–orbital of iron atoms (chemisorption). It is logical to assume that such adsorption is mainly responsible for the good protective properties of this extract. We may easily posit that inhibition occurs by a synergistic effect of these various molecules [31]. While an endothermic adsorption process (\(\Delta H_{\text{ads}}^{\text{o}}\) > 0) is attributed unequivocally to chemisorption [32], an exothermic adsorption process (\(\Delta H_{\text{ads}}^{\text{o}}\) < 0) may involve either physisorption or chemisorption or a mixture of both processes. The values of \(\Delta S_{\text{ads}}^{\text{o}}\) in the presence of the investigated extract are large and negative, that is, accompanied by an exothermic adsorption process [33].

Table 3 Thermodynamic parameters for the adsorption process of Thevetia peruviana extract on a carbon steel surface in 1 M HCl at different temperatures

3.1.2 Effect of Temperature

The effect of temperature on the rate of dissolution of mild steel in 1 M HCl containing different concentrations of the investigated inhibitor was tested by weight loss measurements over a temperature range from 25 to 45 °C. The effect of increasing temperature on the corrosion rate (k corr) and %IE were obtained from weight loss measurements. The results revealed that with increasing temperature there is a decrease in k corr while %IE increases. The activation energy (\(E_{\text{a}}^{*}\)) of the corrosion process was calculated using the Arrhenius equation (Eq. 6) [34]:

$$k = A{ \exp }\left( { - E_{\text{a}}^{*} /RT} \right)$$
(6)

Here, k is the rate of corrosion, A is the Arrhenius constant, R is the gas constant, and T is the absolute temperature. Figure 4 represents the Arrhenius plot (log k corr vs. 1/T) for uninhibited and inhibited 1 M HCl containing different concentrations of the studied inhibitor. The values of E *a can be obtained from the slope of the straight lines. As in Table 4, the activation energy is lower in the presence of Thevetia peruviana extract than in its absence. This was due to the slow rate of extract adsorption with a resultant closer approach to equilibrium during the experiments at higher temperatures according to Hoar and Holliday [35]. However, Riggs and Hurd [36] explained that the decrease in the activation energy of corrosion at higher levels of inhibition arises from a shift of the net corrosion reaction from the uncovered part of the metal surface to the covered one. Schmid and Huang [37] found that organic molecules inhibit both the anodic and cathodic partial reactions on the electrode surface, and a parallel reaction takes place on the covered area, but the reaction rate on the covered area is substantially less than on the uncovered area, similar to the findings of the present study. The entropy of activation (ΔS *) and the enthalpy of activation (ΔH *) for dissolution of mild steel in 1 M HCl were obtained by applying the transition state equation:

Fig. 4
figure 4

Arrhenius plots for corrosion rates (k corr.) of carbon steel in 1 M HCl in the absence and presence of various concentrations of Thevetia peruviana extract

Table 4 Activation parameters for carbon steel corrosion in the absence and presence of various concentrations of Thevetia peruviana extract in 1 M HCl
$${\text{Log}}k_{\text{corr}} /T = { \log }\left( {R/ \, Nh + \Delta S^{*} /{ 2}. 30 3R} \right) \, + \, \left( { - \Delta H^{*} /{ 2}. 30 3RT} \right)$$
(7)

Here, N is Avogadro’s number; h is Planck’s constant. The plot of log (kcorr/T) versus (1/T) (Fig. 5) should give a straight line with a slope = (−ΔH */2.303R) and an intercept = log [(R/Nh)−(ΔS */2.303R)]. The positive signs of the enthalpies (ΔH *) reflect the endothermic nature of the steel dissolution process. The negative values of ΔS * in the absence and presence of the inhibitors imply that the activated complex is the rate-determining step and represents association rather than dissociation, indicating that a decrease in disorder takes place, going from the reactant to the activated complex [38].

Fig. 5
figure 5

Plots of log (k corr/T) versus (1000/T) of carbon steel in 1 M HCl in the absence and presence of different concentrations of Thevetia peruviana extract

3.2 Gasometric Tests

The dissolution reaction of carbon steel in 1 M HCl devoid of and containing different concentrations of Thevetia peruviana was studied using the hydrogen evolution method. The relationship between the volume of hydrogen evolved during the corrosion action and the reaction time is represented in Fig. 6.

Fig. 6
figure 6

Hydrogen evolutions during the corrosion of carbon steel in the absence and presence of different concentrations of Thevetia peruviana extract

Inspection of the figure reveals that there is a linear relation between the hydrogen volume and time. The rate of hydrogen evolution is small at the beginning of the reaction, and then after a certain time it increases markedly. The initial time interval, during which the rate of reaction is small, is the incubation period. During this incubation period, the breakdown of the pre-immersed oxide film on the metal surface takes place before the start of metal attack. Since carbon steel is readily soluble in aqueous acidic solutions with the liberation of hydrogen, the rate of hydrogen liberation corresponds to the carbon steel corrosion rate. Therefore, the slopes of the straight portions of the curves, after the incubation period, were taken as a measure of the corrosion rates of carbon steel in free and inhibited acid solutions. Inspection of the curves of Fig. 5 reveals that the addition of Thevetia peruviana reduces the rate of hydrogen evolution as the Thevetia peruviana concentration is increased. The inhibition efficiency values of different concentrations of Thevetia peruviana are given in Table 5. These values show that the IEs of the Thevetia peruviana are very high at high concentrations and comparable to those obtained from the weight loss technique [39].

Table 5 Inhibition efficiencies as revealed from hydrogen evolution measurements at 25 °C

3.3 Polarization Curves

The potentiodynamic curves for carbon steel in 1 M HCl in the absence and presence of Thevetia peruviana extract are shown in Fig. 7. It is clear that the investigated inhibitor promotes the retardation of anodic dissolution of carbon steel and cathodic hydrogen discharge reactions. Electrochemical parameters such as corrosion current density (i corr), corrosion potential (E corr), Tafel constants (β a and β c), degree of surface coverage (θ) and inhibition efficiency (%IE) were calculated from Tafel plots as given in Table 6. It is observed that the presence of extract lowers i corr because of the adsorption of extract components on the steel surface, while the E corr and Tafel slopes experience no significant change in the inhibited solution compared to the uninhibited solution. The addition of the investigated extract caused no considerable shift in the E corr values, suggesting that the inhibitor acts as a mixed-mode inhibitor [40]. Furthermore, both cathodic (β c) and anodic Tafel lines (β a) were shifted to more negative and positive directions, respectively. This shows that the mechanism of the corrosion reaction is maintained and the corrosion reaction is impeded by the simple adsorption mode [41]. The irregular trends of (β a and β c) values indicate the involvement of more than one type of species adsorbed on the metal surface.

Fig. 7
figure 7

Polarization curves for carbon steel in 1 M HCl in the absence and presence of different concentrations of Thevetia peruviana extract at 25 °C

Table 6 Potentiodynamic data of carbon steel in 1 M HCl in the absence and presence of different concentrations of Thevetia peruviana extract

3.4 EIS Tests

The EIS provides important mechanistic and kinetic information for investigating an electrochemical system. Nyquist impedance plots were obtained for the carbon steel electrode at respective corrosion potentials after 30 min immersion in 1 M HCl in the presence and absence of various concentrations of Thevetia peruviana extract. The resultant Nyquist and Bode plots are shown in Figs. 8, 9, respectively. In this case, there was a gradual increase in the diameter of each semicircle of the Nyquist plot as a consequence of the increase in the number of extract molecules when the concentration was increased from 50 to 300 ppm. This diameter increase clearly showed that the (R ct) values were also increased from 13 to 140 ohms cm2 at the optimum concentration of 300 ppm. Table 7 includes various parameters such as the R ct, double layer capacitance (C dl) and (%IE). The (R ct) values are noted to increase while the (C dl) values gradually decrease from 720.4 to 81.9 μF/cm−2 when the inhibitor concentration increases; this can be attributed to the gradual replacement of water molecules by the adsorption of the extract molecules on the metal surface, decreasing the extent of the dissolution reaction. The higher (R ct) values are generally associated with slower corroding systems [42]. The EIS spectra of the investigated extract analyzed using the equivalent circuit, Fig. 10, which represents a single charge transfer reaction and fits well with these experimental results. The main parameters deduced from the analysis of the Nyquist diagram are the resistance of charge transfer R ct (diameter of high frequency loop) and the capacity of double layer C dl, which is defined as:

Fig. 8
figure 8

Nyquist plots of carbon steel in 1 M HCl solution in the presence and absence of different concentrations of Thevetia peruviana extract at 25οC

Fig. 9
figure 9

Bode plots for corrosion of carbon steel in 1 M HCl in the absence and presence of different concentrations of Thevetia peruviana extract at 25 °C

Table 7 Data from electrochemical impedance measurements for corrosion of carbon steel in 1 M HCl solutions at various concentrations of Thevetia peruviana extract
$$C_{\text{dl}} = 1/ \, \left( {2\pi f_{ \hbox{max} } R_{\text{ct}} } \right)$$
(8)

Here, f max is the frequency at which the imaginary component of the impedance is maximum-Zim (max). The values of ER % were calculated by the equation as follows:

$$\% {\text{IE}}_{\text{EIS}} = \, \left[ { 1- R_{\text{ct}} /R_{\text{inh}} } \right] \, \times 100$$
(9)

Here, R ct and R ct(inh) are charge-transfer resistance values in the absence and presence of the inhibitor, respectively.

Fig. 10
figure 10

Electrical equivalent circuit model used to fit the impedance results

3.5 EFM Tests

In corrosion science, the non-linear relationship of the corrosion process is well known and established [43]. Applying potential distortion by one or more sine waves causes responses at more frequencies than the frequencies of the applied signal [44]. EFM showed that this non-linear response contains important information about the corroding system so that the corrosion current can be calculated directly. The great strength of the EFM is the causality factors that serve as an internal check on the validity of the EFM measurements [3]. With the causality factors the experimental EFM data can be verified. Figures 11 and 12 show the current response includes not only the input frequencies, but also contains frequency components that are the sum, difference and multiples of the two input frequencies. The larger peaks were used to calculate the corrosion current density (i corr), Tafel slopes (β a and β c) and causality factors (CF2 and CF3). These electrochemical corrosion kinetic parameters at different concentrations of the investigated plant extract in 1 M HCl at 25 °C are listed in Table 8. The inhibition efficiency (%IE) calculated from Eq. (10) is found to increase with the addition of the studied extract.

Fig. 11
figure 11

EFM spectra for carbon steel in 1 M HCl at 25 °C

Fig. 12
figure 12

EFM spectra for carbon steel in 1 M HCl in the presence of different concentrations of Thevetia peruviana extract at 25 °C

Table 8 Electrochemical kinetic parameters obtained by EFM technique for carbon steel in 1 M HCl solution containing various concentrations of the Thevetia peruviana extract at 25 °C
$$\% {\text{IE}}_{\text{EFM}} = \, \left[ { 1 { }{-} \, \left( {i_{\text{corr}} /i^\circ_{\text{corr}} } \right)} \right] \, \times 100$$
(10)

Here, i°corr and icorr are corrosion current densities in the absence and presence of inhibitors, respectively. The causality factors CF2 and CF3 given in Table 8 are close to their theoretical values of 2.0 and 3.0, respectively, indicating that the obtained results are of good quality. The inhibition efficiency calculated from weight loss, Tafel polarization and EIS measurements are in good agreement with EFM results. It is concluded that the corrosion rate depends on the chemical nature of the electrolyte rather than the applied technique.

3.6 SEM Studies

Figure 13 depicts the micrographs of carbon steel samples in the absence and presence of 300 ppm of Thevetia peruviana extract after 12 h immersion in 1 M HCl. Figure 13a represents the surface of pure carbon steel. Figure 13b shows the surface of carbon steel that has experienced a severe corrosion attack in case of only immersion in 1 M HCl for 12 h. It is clear that when the plant extract was added to the test solution, the carbon steel surface suffered a remarkable change from the previous one, and the specimen surface was largely smoother, as presented in Fig. 13c. The formation of a protective layer is assumed to be randomly distributed on the whole surface of the carbon steel. This could be attributed to the adsorption of the active molecules present in the extract of the investigated plant on the carbon steel surface incorporating into the passive film in order to block the active sites present on the carbon steel surface. In addition, another reason is the involvement of extract molecules in the interaction with the active sites on the carbon steel surface, causing a decrease in the contact between carbon steel and the aggressive medium and sequentially exhibiting excellent corrosion inhibition properties [45].

Fig. 13
figure 13

SEM micrographs for carbon steel in the absence and presence of 300 ppm of Thevetia peruviana extract. a Pure carbon steel surface. b After 12 hours immersion in 1 M HCl. c 12 hours immersion in 1 M HCl + 300 ppm ofplant extract

3.7 EDX Studies

The EDX spectra were employed to determine the elements on the surface of carbon steel after 12-h immersion in the test solution of 1 M HCl without and with 300 ppm of inhibitor extract. The EDX analysis in Fig. 14a shows the composition of the pure surface of a carbon steel specimen without any exposure to the acid and inhibitor treatment. The EDX analysis indicates that Fe was detected, which shows that free carbon steel without any rust formed. Figure 14b illustrates the EDX analysis result on the composition of the carbon steel surface after 12-h immersion only in the test solution of 1 M HCl. Figure 14c portrays the EDX analysis of the carbon steel surface after immersion in a test solution of 1 M HCl and in the presence of 300 ppm of Thevetia peruviana extract. The spectra show additional lines, demonstrating the existence of O (owing to the oxygen atoms of inhibitor extract molecules). These data show that the carbon and O atoms covered the specimen surface. This layer originated because of the adsorption of the active chemical constituents of the investigated extract onto the metal surface because the O signals are absent on the specimen surface exposed to uninhibited HCl.

Fig. 14
figure 14

EDX analysis on carbon steel in the absence and presence of 300 ppm of Thevetia peruviana extract for 12 h immersion in 1 M HCl. a Pure carbon steel surface. b After 12 hours immersion in 1M HCl. c 12 hours immersion in 1M HCl +300 ppm of plant extract

4 Conclusions

The present study found that Thevetia peruviana extract can be used as an inhibitor of C-steel corrosion in HCl solution. While the green extract molecule probably acts by being adsorbed on the C-steel surface, the overall inhibition is provided by a synergistic effect. It has also been found that the inhibitive action of Thevetia peruviana extract is basically controlled by the temperature and concentration of the extract; the maximum IE was 90.3 % at 300 ppm. The green natural Thevetia peruviana tested acts as a mixed type inhibitor. Further analysis of the experimental data shows that it conforms with a modified form of the Temkin adsorption isotherm and that the nature and value of the Gibb’s free energy of adsorption obtained suggest that the spontaneous physical and chemical (mixed one) adsorption of the plant extract molecules is the most likely inhibitory mechanism responsible for the reduction of the corrosion rate of C-steel in 1 M HCl containing Thevetia peruviana extract. The data obtained from the four different methods are in good agreements.