Introduction

Steel alloys are very used in different acidic industrial applications such as petrochemical process, refining crude oil and others. Hydrochloric and sulfuric acid are widely used in many processes in the industry for example, industrial cleaning, acid pickling, oil well cleaning and industrial descaling, etc. [1]. Corrosion processes are responsible of expensive costs that continue to be a greatest challenge to scientists. Among the various techniques to stop or prevent degradation of metal and alloys surface, the corrosion inhibitor is one of the best options and the most useful in the industry [2]. The environmental toxicity of organic and inorganic corrosion inhibitors have encouraged researchers to use green corrosion inhibitors, which have economic benefits as they are low cost and biodegradable [3, 4]. In addition, they are ecofriendly, ecologically acceptable and sustainable resource [5]. A large number of green corrosion inhibitors have been studied as an alternative. Therefore, these natural products are becoming the subject of a wider range of investigations.

Examination of inhibitors issued from the plant extract have shown that they are wealthy of tannins, alkaloids, organic, amino acids and present inhibiting action [6]. Most of the effective inhibitors used in industry contain hetero-atoms as oxygen (O), phosphorus (P), sulphur (S), nitrogen (N) or aromatic component having multiple bonds leading to an easier adsorption on the metal surface [7, 8]. Recently, several researches have been devoted to corrosion inhibition by plant extracts [9, 10], essential oils [11, 12] and purified compounds [13], in order to study their properties and the inhibition’s mechanisms against steel corrosion. The yield of these corrosion inhibitors, also called “green inhibitors”, depends mainly on the parts of plant used and geographical location [1]. Many plant extracts have been used against the degradation of material in the aggressive media such as: Sesbania grandiflora [14]; Urtica dioica [15], Zanthoxylum alatum [16], etc. Additionally, most of these green products used as corrosion inhibitors are extracted using methanol, ethanol or aqueous solvent. Gerengi and Sahin [17] found that Schinopsis lorentzii extract obtained by water extraction acted as slightly cathodic inhibitor with inhibition efficiency of 66% at 2000 ppm, Krishnan and Shibli [14] have evaluated the inhibitive action of the methanol extract of the Sesbania grandiflora leaf on the mild steel corrosion in an aggressive HCl medium with a high inhibition efficiency of 98% at 10,000 ppm of inhibitor. High inhibitor efficiency of the green compounds (Ruta chalepensis) has been obtained against hydrogen embrittlement of mechanical properties of pipe steel in HCl medium [18]. This significant inhibition of 99.17% explains their importance in the industrial applications. Also, the first patented corrosion inhibitors used were natural products (flour, yeast, etc.) or by product from food industries to hold iron corrosion in the media [19].

The present research is focused on the effect of the ethanol extract of Senecio anteuphorbium as a corrosion inhibitor for steel corrosion in hydrochloric acid. This plant, belonging to the Kleinia family, is endemic to Morocco and the Canary Islands. This species contains alkaloids pyrrolizidiniques in the form of macrocyclic diesters [20]. Our study exhibits that the SA extract has good inhibition efficiency in hydrochloric acid. Moreover, this plant has never been studied as a corrosion inhibitor.

The aim of the present work is to study the inhibition effect of Senecio anteuphorbium extract as green corrosion inhibitor of S300 steel in hydrochloric acid. The mechanism of corrosion inhibition of steel in hydrochloric acid 1 M was studied using electrochemical impedance spectroscopy and the potentiodynamic polarization. The morphology of the steel surface was examined by FITR, contact angle and SEM–EDX.

Materials and methods

Preparation of extracts

The Senecio anteuphorbium (SA) plant was collected from Tiznit, located in the south of Morocco during April 2015. The plant has been identified by Professor of Botany A. Ouhammou at Cadi Ayyad University. Samples of the aerial part were deposited in the herbarium of the Biology department in Faculty of Science under the reference MARK-10016. The corresponding extract was produced by maceration in ethanol. Before that, the whole plant (leaf and stem) was washed with water, cut into small pieces and dried in a dark and aerated place. Therefore, the dried SA powdered (5 g) was added to 100 mL of ethanol and stirred during 24 h at room temperature. After filtration, the ethanolic extract was concentrated using the vacuum evaporation setup, then it has been used as corrosion inhibitor.

Materials and solutions

Corrosion tests were performed on S300 steel specimens with the composition (wt%): C (0.15%), Mn (1.25%), Si (0.05%), and Fe (98.55%). The solution of hydrochloric acid (HCl) 1 M was prepared by dilution of analytical grade (37%) of hydrochloric acid using distilled water.

Electrochemical analysis

The electrochemical experiments of the corrosion behavior of steel in hydrochloric acid were conducted using a PGZ100 potentiostat connected to a jacketed glass cell of 175 mL capacity, connected to the bath thermostat (± 1 °C). A 2 cm2 platinum sheet electrode and silver–silver chloride electrode (Ag/AgCl) have been used as auxiliary and reference electrodes, respectively. Prior to each experiment, the working electrode (0.76 cm2) has been polished with various grades of sand paper (500, 1200 and 2000), washed and immersed in acidic solution. The polarization curves have been obtained in the potential range of −0.8 V to − 0.2 V at a scanning rate up to 1 mV/s. EIS has been conducted in frequencies varying from 100 kHz to 10 mHz at open-circuit potential by applying the signals of sine wave voltage of 10 mV. The data were fitted using EC-Lab software. Before all experiments, the potential has been stabilized over 30 min. The operating temperatures range between 293 and 323 K. For reproducibility reasons, the measurements were repeated three times for each concentration and temperature.

Surface analysis

To set the morphology of the steel surface, the sample has been immersed in 1 M HCl solution without and with inhibitor for 2 h, then washed and dried. To investigate the interaction between inhibitor and metal, Fourier transform infrared spectroscopy (FTIR) spectra were achieved using Vertex 70 sample compartment RT-DLa TGS. The changes of contact angles were measured using a goniometer. Samples surface have been analyzed using scanning electron microscope (SEM) technique. Different elements were detected on the steel surface using high-energy dispersive X-ray (EDX) technique. The SEM and EDX analysis have been realized using VEGA3 LM TESCAN instrument at an accelerating voltage of 20 kV.

Results and discussion

Electrochemical experiments

Open-circuit potential (OCP)

Open-circuit potential was recorded versus time under free corrosion conditions until attaining the steady state. Figure 1 shows the time variation of OCP of steel immersed in 1 M HCl medium without and with different concentrations of inhibitor at 293 K. Without inhibitor, the potential increases and then stabilizes after 30 min. This may be related to the ennoblement of the surface by the formation of a passivating film. In the presence of inhibitor, the electrode potential tends to stabilize at − 430 mV versus Ag/AgCl for all inhibitor concentrations. This evolution (Fig. 1) may be due to the modification of interface, and a steady state is reached after 30 min. Thereafter, EIS and PDP measurements were performed.

Fig. 1
figure 1

Variation of EOCP–time curves for steel without and with inhibitor in 1 M HCl solution at 293 K

Potentiodynamic polarization measurements (PDP)

Figure 1 illustrates the potentiodynamic polarization curves of steel in 1 M HCl solutions without and with different concentrations of SA extract. Electrochemical parameters such as corrosion current density (icorr), corrosion potential (Ecorr), open-circuit potential (Eocp), Tafel slopes (ba, bc) and inhibition efficiency (η%) calculated using Eq. 1 are listed in Table 1.

$$\eta \left( \% \right) = \frac{{i_{{\rm corr}}^{'} - i_{{\rm corr}} }}{{i_{{\rm corr}}^{'} }} \times 100,$$
(1)

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

Table 1 Polarization parameters for S 300 steel in 1 M HCl in the presence and absence of SA extract

Examination of Table 1 reveals that the addition of SA extract significantly decreases the corrosion current density. Both anodic and cathodic Tafel slopes were reduced compared to those of the blank. In addition, Fig. 2 shows that the anodic curves clearly showed to be dependent on the extract concentration, whereas the cathodic curves seem to be independent. From these experimental results, it can be explained that the presence of SA extract has inhibited the cathodic evolution of hydrogen and the anodic dissolution process of iron [21]. This trend confirms that the SA extract molecules were adsorbed at both anodic and cathodic sites, suggesting the creation of barrier between steel and aggressive medium [22]. According to Bockris mechanism, the anodic dissolution of Fe in acidic media depends primarily on the adsorbed intermediate FeOHads as shown in the following equations [19, 23]:

$${\text{Fe }} + {\text{H}}_{2} {\text{O}} \leftrightarrow {\text{FeOH}}_{{\rm ads}} + {\text{H}}^{ + } + {\text{e}}^{ - } ,$$
(2)
$${\text{FeOH}}_{{\rm ads}} \mathop \to \limits^{{\rm rds}} {\text{FeOH}}^{ + } + {\text{e}}^{ - } ,$$
(3)
$${\text{FeOH}}^{ + } + {\text{H}}^{ + } \leftrightarrow {\text{Fe}}^{2 + } + {\text{H}}_{2} {\text{O}} .$$
(4)
Fig. 2
figure 2

Polarization curves of S 300 steel in 1 M HCl with different concentrations of SA extract

The cathodic hydrogen evolution reaction may be accounted for as follows:

$${\text{Fe }} + {\text{H}}^{ + } \leftrightarrow ({\text{FeH}}^{ + } )_{{\rm ads}} ,$$
(5)
$$({\text{FeH}}^{ + } )_{{\rm ads}} + {\text{e}}^{ - } \leftrightarrow ({\text{FeH}})_{{\rm ads}} ,$$
(6)
$$({\text{FeH}})_{{\rm ads}} + {\text{H}}^{ + } + {\text{e}}^{ - } \leftrightarrow {\text{Fe}} + {\text{H}}_{2} .$$
(7)

However, the first step of adsorption of inhibitor on the steel surface involves replacement of water molecules initially adsorbed on the surface [24]:

$${\text{Inh}}_{{\left( {\text{sol}} \right)}} + {\text{x}}.{\text{H}}_{2} {\text{O}}_{{\left( {\text{ads}} \right)}} \leftrightarrow {\text{Inh}}_{{\left( {\text{ads}} \right)}} + {\text{x}}.{\text{H}}_{2} {\text{O}}_{{\left( {\text{sol}} \right)}}$$
(8)

The second step is the release of iron ions on the steel surface and formation of metal–inhibitor complexes:

$${\text{Fe }} \to {\text{Fe}}^{2 + } + 2{\text{e}}^{ - } ,$$
(9)
$${\text{Fe}}^{2 + } + {\text{Inh}}_{{\left( {\text{ads}} \right)}} \to {\text{Fe}}({\text{Inh}})_{{\rm ads}}^{2 + } .$$
(10)

Figure 1 reveals that the corrosion potential has slightly shifted to the cathodic direction for the concentrations less than 10 mg/L. However, the anodic shift is more pronounced for the concentrations up to 20 mg/L.

In general, an inhibitor acts as anodic or cathodic type, if the variation of Ecorr towards the blank is greater or closer to 85 mV [10, 25]. Besides that, the difference in behavior between OCP and Ecorr could be explained by the role of inhibitor in polarization condition. The OCP is measured without any applied potential where the steady-state value was reached over time, while the Ecorr was obtained by Tafel curves extrapolation method. In the polarization condition, it was seen that the anodic currents are dependent on the extract concentration, whereas the cathodic currents seem to be independent. Therefore, there was a greater variation of the Ecorr with the concentration than the OCP. Table 1 clearly evidenced that SA extract acts as mixed-type inhibitor and the inhibition efficiency reached 91% at 30 mg/L.

From the outcome, it is obvious that corrosion current density decreases when the concentration of inhibitor increases. The effectiveness of SA extract depends on inhibitor concentration. The availability of corrosion inhibitor at each concentration explains its performance [26].

Impedance measurements were used to provide a complete analysis of the inhibitor action mechanism and to investigate deeply the film growth formed on the steel surface.

Electrochemical impedance spectroscopy (EIS)

EIS is a powerful technique to understand the adsorption mechanism, electrode kinetics and surface properties [27, 28]. Nyquist spectra obtained without and with different concentrations of inhibitor in hydrochloric acid 1 M are shown in Fig. 4. The corresponding electrochemical parameters are summarized in Table 2.

Table 2 Electrochemical impedance parameters obtained from EIS measurements for steel in 1 M HCl in absence and presence of SA extract at 293 K

The charge transfer resistance was calculated from Nyquist plot in which the inhibition efficiency was calculated using the relationship (11):

$$\eta \left( \% \right) = \frac{{R_{{\rm ct}}^{'} \left( {inh} \right) - R_{{\rm ct}} }}{{R_{{\rm ct}} \left( {inh} \right)}} \times 100$$
(11)

Figure 2 illustrates the impedance data of the steel in 1 M HCl solution and the corresponding plot of the fitting. Impedance parameters were obtained from the fitting of the experimental data of the Nyquist plots using EC-Lab software. The corresponding equivalent circuit modeling the steel/solution interface without and with inhibitor has been determined as depicted in Fig. 3.

Fig. 3
figure 3

Fitting the EIS data for steel in 1 M HCl solution

Figure 4 presents Nyquist plots obtained from alternating current (AC) impedance measurements for S300 steel in 1.0 M HCl without and with different concentrations of SA extract. All impedance plots present depressed semicircles associated to the single time constant indicating that the corrosion of steel is controlled by the charge transfer [29]. The presence of SA extract does not change the mechanism of steel corrosion. Noticeably, the addition of SA extract to the corrosive media significantly changes the diameter of semicircles. This diameter grows up with the concentration of SA extract. The examination of Fig. 4 shows that the Nyquist plots are not perfect capacitive loops which can be related to the frequency dispersion as well as to the inhomogeneities of S300 surface [30, 31]. Moreover, the Nyquist plots were analyzed by fitting experimental data in the equivalent electrical circuit shown in Fig. 5. It consists of electrolyte resistance (Re), charge transfer resistance (Rct), Chi-squared (χ2) that illustrates the excellent goodness of fit for the validation of the equivalent circuit proposed and the constant phase element (CPE). The CPE contains the component Qdl which is the magnitude of the CPE and α is the coefficient that describes different physical phenomena such as surface roughness, inhibitor adsorption and porous layer formation [32]. Thus, the capacitance can be calculated from:

$$C_{{\rm dl}} = Q_{{\rm dl}} \times (2\pi f_{ \hbox{max} } )^{\alpha - 1} .$$
(12)
Fig. 4
figure 4

Nyquist plots for steel in 1 MHCl solution in the absence and presence of SA extract

Fig. 5
figure 5

Equivalent circuit used to fit the EIS data for steel in 1 M HCl solution

The impedance parameters values of electrolyte resistance (Re), charge transfer resistance (Rct), double layer capacitance (Cdl), Chi-squared (χ2) and inhibition efficiency (\(\eta\)) are summarized in Table 2.

The analysis of Table 2 reveals that the increase of inhibitor concentration has increased the charge transfer resistance and reduced the double layer capacitance. The increase in Rct is attributed to the decrease in the local dielectric constant and/or from the increase in thickness of the electrical double layer which suggests the formation of a protective layer on steel surface [32, 33]. The decrease in double layer capacitance is most likely attributed to the progressive replacement of the water molecules by the adsorbed organic molecules [34].

The results obtained from EIS are in good agreement with the PDP. The difference observed in the inhibition efficiency obtained from these methods (EIS and PDP) may be due to the technique type. PDP measurements provide real time kinetics of the electrochemical processes (polarization at wide range of potential with a possible irreversible change occur due to the measuring process [28]), and EIS data are usually obtained at the OCP and provide measured values of the overall interfacial resistance at the electrode–electrolyte interface.

Kinetic parameters

To calculate the kinetic parameters of the inhibition and the adsorption process, the potentiodynamic polarization measurements were conducted at the temperature range of 293–323 K. Table 3 lists the details about the effect of temperature on steel corrosion in hydrochloric acid containing 30 mg/L of SA extract. It is explicitly shown that the increase of temperature leads has almost no effect on the inhibition efficiency. This might be due to the chemisorption of the inhibitor molecules onto the steel surface [35].

Table 3 Effect of temperature on the steel in free acid and at 30 mg/L of SA extract

Analysis of activation parameters in absence and presence of SA extract gives more insights on the inhibitor adsorption mechanism. The apparent activation energy can be calculated using the Arrhenius famous equation which evaluates the temperature dependency to the corrosion current density:

$${ \log }(i_{{\rm corr}} ) = { \log }A - \frac{{ - E_{{\rm a}} }}{2.303 \times R.T},$$
(13)

where icorr is the corrosion current density of steel, Ea is the apparent activation energy, A is constant, R is the universal gas constant (R = 8.314 J mol−1 K−1) and T is the absolute temperature.

This equation can be used to calculate the Ea values of the corrosion reaction without and with SA extract. By plotting the logarithm of icorr versus 1/T, the activation energy can be calculated from the straight lines slope corresponding to 34.57 kJ mol−1 and 34.94 kJvmol−1 in the absence and the presence of inhibitor, respectively. The Arrhenius plots are presented in Fig. 6, and the corresponding values of the apparent activation corrosion energy are listed in Table 4.

Fig. 6
figure 6

Arrhenius plots of log (icorr) versus 1/T (K−1) in 1 M HCl without and with 30 mg/L of SA extract

Table 4 Values of activation parameters Ea, ∆H *ads and ∆S *ads for steel in 1 M HCl in absence and presence of 30 mg/L of SA extract, respectively

Generally, the increase in activation energy in the presence of inhibitor compared to the blank is due to the physical adsorption on the metal surface. Unchanged or lowered value of Ea suggests the chemical adsorption. In the other hand, it is accepted that the mixed adsorption is characterized by lower or no change in Ea values [36,37,38]. From the data presented in Table 4, it is clear that the values of Ea without and with inhibitor are close. These Ea values explain that the chemical and physical adsorption occurring contribute in the evolution of the protective layer with the temperature. This character suggests that the adsorption of inhibitor reduces the available reaction area by blocking the active sites.

Activation parameters, such as enthalpy and entropy of corrosion process were evaluated from the effect of temperature. A transition formulation of Arrhenius equation (Eq. 14) can be used:

$${ \log }\left( {\frac{{ i_{{\rm corr}} }}{T}} \right) = \left[ {{ \log }\left( {\frac{R}{hN}} \right) + \left( {\frac{{\Delta S_{{\rm a}}^{*} }}{2.303 \times R}} \right)} \right] - \frac{{\Delta H_{{\rm a}}^{*} }}{RT},$$
(14)

where h is Planck’s constant, N is Avogadro’s number, \(\Delta S_{{\rm a}}^{*}\) is the entropy of activation, \(\Delta H_{{\rm a}}^{*}\) is the enthalpy of activation, T is the absolute temperature and R is the universal gas constant.

Figure 7 shows the variation of log (ic/T) against 1000/T for SA extract. Straight lines are obtained with a slope of (\(- \frac{{\Delta H_{{\rm a}}^{*} }}{2.303 \times RT}\)) and an intercept of (log \(\frac{R}{hN}\) + \(\frac{{\Delta S_{{\rm a}}^{*} }}{2.303 \times R}\)) from which the values of \(\Delta H_{{\rm a}}^{*}\) and \(\Delta S_{{\rm a}}^{*}\) are calculated, respectively.

Fig. 7
figure 7

Transition-state plots of log(icorr/T) versus 1/T (K−1) in 1 M HCl without and with 30 mg/L of SA extract

From the data obtained in Table 4, it can be concluded that the negative values of ∆S *ads imply that the adsorption is accompanied by a decrease in entropy [39]. This can be explained by the chaotic degree between steel and solution before introduction of inhibitor. But when the inhibitor is adsorbed, the increase in order has involved a decrease in entropy [40]. The positive sign of ∆H *ads reflects the endothermic nature of the steel corrosion process, explaining that the metal dissolution does not occur readily [41].

Adsorption isotherm

The adsorption behavior of the SA extract on the metal surface can be deduced in terms of the adsorption isotherms, this provides important information on the interaction between the inhibitor and the metal surface. The adsorption of inhibitor can be regarded as a quasi-substitution process between the plant extract in the aqueous phase [org(sol)] and water molecules at the metal surface [H2O]ads [42, 43]:

$${\text{Org}}_{{\left( {\text{sol}} \right)}} + {\text{nH}}_{2} {\text{O}}_{{\left( {\text{ads}} \right)}} \leftrightarrow {\text{Org}}_{{\left( {\text{ads}} \right)}} + {\text{nH}}_{2} {\text{O}}_{{\left( {\text{sol}} \right)}} ,$$
(15)

where Org(sol) and Org(ads) are the organic species dissolved in the aqueous solution and adsorbed onto the metallic surface, respectively, H2O(ads) is the water molecules adsorbed on the metallic surface, and n is the number of water molecules replaced by one inhibitor molecule (size ratio). The degree of surface coverage (θ) for different concentrations of inhibitor was determined using potentiodynamic polarization measurements. So as to obtain the isotherm that fits best, the surface coverage was determined from the following equation:

$$\theta = \frac{{i_{{\rm corr}} - i_{{\rm corr}}^{inh} }}{{i_{{\rm corr}} }},$$
(16)

where \(i_{{\rm corr}}^{inh}\) and icorr are the density current of steel with and without inhibitor, respectively. In the present work, several adsorption isotherms (Langmuir–Freundlich–Temkin) have been tested to determine the best fit model. The correlation coefficient between surface coverage (θ) and the amount of inhibitor in the corroding medium were compared. The adsorption data fitted well to the three models, but the better it was Langmuir model as evidenced by R2 values (Table 5).

Table 5 Isotherm adsorption parameters of Langmiur model

The Langmuir equation was developed assuming that adsorption will only occur in specific homogeneous sites in the adsorbate surface with uniform distribution of energy level. This achieves that the adsorption process is kind of monolayer [44].

The adsorption models can be given as [45]:

$$\frac{{C_{inh} }}{\theta } = \frac{1}{{K_{{\rm ads}} }} + C_{inh} \quad \left( {{\text{Langmuir}}\;{\text{isotherm}}} \right),$$
(17)
$$\hbox{Exp} \left( { - 2a \times \theta } \right) = K \times C_{inh} \quad ({\text{Temkin}}\;{\text{isotherm}}),$$
(18)
$$l{\text{n}}\,\theta = l{\text{n}}K + \left( {\frac{1}{n}} \right) \times l{\text{n}}C_{inh} \quad ({\text{Freundlich}}\;{\text{isotherm}}),$$
(19)

where \(\theta\) is the surface coverage, \(C_{{\rm inh}}\) is the concentration of inhibitor and \(K_{{\rm ads}}\) is equilibrium adsorption constant that relates to the standard free energy \(\Delta G_{{\rm ads}}^{^\circ }\) of adsorption by the following relation:

$$\Delta G_{{\rm ads}}^{^\circ } = - RTLn\left( {10^{3} \times K_{{\rm ads}} \times 55.5 \times M_{{\rm inhibitor}} } \right),$$
(20)

where 55.5 is the concentration of water in the solution in mol L−1 [46], R is the gas equilibrium constant and \(M_{{\rm inhibitor}}\) is the molecular weight of inhibitor. In general, the values of free energy of adsorption (\(\Delta G_{{\rm ads}}^{^\circ }\)) around or below of −20 kJ/mol represent physisorption mechanisms and inhibition is due to the electrostatic interaction between inhibitor and metal. The values of \(\Delta G_{{\rm ads}}^{^\circ }\) around − 40 kJ/mol or smaller result in covalent bonds through chemisorption mechanism due to the sharing or charge transfer from the inhibitor to the metal surface [17, 26].

In the present work, the value of \(\Delta G_{{\rm ads}}^{^\circ }\) is not possible to obtain, thus is due to non-estimation of molecular weight of inhibitor \(\left( {M_{{\rm inhibitor}} } \right)\), because the whole extract was used (Fig. 8).

Fig. 8
figure 8

Plots of Langmuir adsorption isotherm of SA extract on the steel surface at 293 K

Surface investigation

SEM analysis and contact angle

Surface analysis of steel was carried out using SEM micrographs and the variations of wettability of the surface were done after 2 h immersion and the results are presented in Fig. 9. The polished metal surface before immersion shows a good surface property with the angle of 86.0° ± 3.90° (Fig. 9a). The surface morphology of steel after immersion without inhibitor is very rough and strongly damaged due to acidic solution aggressiveness. The water contact angle was found up to 81.8° ± 1.73° which confirms a hydrophilic character of surface (Fig. 9b). This explains that the surface of steel in hydrochloric media is highly porous with oxides formed over it [47, 48]. However, it is obvious that the addition of 30 mg/L of extract shows less damage in the surface as compared to blank with water contact angle of 103.1° ± 5.83° demonstrating a hydrophobic character, suggesting the formation of protective film due to adsorption of SA onto the steel surface (Fig. 9c). The morphology of steel specimen with extract is smoother compared to the steel without inhibitor. This may conclude that the presence of inhibitor protects the steel surface from the aggressive aqueous environment.

Fig. 9
figure 9

a Polished metal surface before immersion; b steel after 2 h immersion in 1 M HCl solution without inhibitor; c metal surface after addition of 30 mg/L SA extract

Energy-dispersive X-ray spectroscopy

Energy-dispersive X-ray spectra (EDX) analyses were conducted to obtain the characteristic peaks of the elements on the steel sample without and with inhibitor in 1 M HCl solution [49]. Figure 10 depicts the EDX spectrum of steel. It is observed from the EDX spectrum of steel the absence of oxygen peak (Fig. 10a). However, the spectrum of steel in medium presents some peaks of oxygen (11.92%) indicating the corrosion of steel and the formation of iron oxide on the metal surface (Fig. 10b) [50]. The EDX spectra in presence of SA extract give some contents of C and O suggesting that the SA extract has covered steel surface acting consequently as barrier between metal and acidic medium (Fig. 10c). It is also clear from Table 6 that in presence of SA extract, the decrease in iron atomic percentage is due to the mild steel surface covered by inhibitor molecules.

Fig. 10
figure 10

a EDX images of steel surface; b after 2 h immersion in 1 M HCl; c in the presence of 30 mg/L SA extract

Table 6 Atomic percentage of elements obtained from EDX spectra of steel

FTIR analysis

Figure 11 shows the FTIR spectra of inhibitor and steel after 24 h of immersion in hydrochloric media without and with 30 mg/L SA extract. It is observed from the spectra of adsorbed layer that the peaks obtained are similar to those of SA extract. The peaks at 3412, 2912 and 1617 cm−1 can be assigned to the superficial adsorbed water and the functional groups such as C–H, C=O and C=C, respectively. The peaks at 1736, 1414, 1257 and 1073 cm−1 are related to C=O, aromatic ring C–C, C–O and C–O, respectively [16]. This explains that the plant extract contains different organic molecules having various functional groups.

Fig. 11
figure 11

FTIR spectra of a inhibitor and b adsorption layer formed on the surface of steel in 1.0 M HCl + 30 mg/L SA extract 24 h at 293 K

Figure 11 shows the existence of some peaks displacement between the adsorbed inhibitor spectra and inhibitor extract, also some peaks are either lost or less prominent [51]. The peaks at 585 and 625 cm−1 arise from Fe2O3 and FeOOH that indicates the oxidation of the adsorbed protective film by O2 and H2O in air [52]. The peak shift from to 1607 to 1640 cm−1 is due to formation of the iron–inhibitor complex or salt. This shift may be also linked to the possibility of electron transfer from inhibitor to steel surface that promotes the formation of the adsorbed layer onto the steel surface [16, 53,54,55].

Conclusion

The adsorption and inhibitor effect of SA on the corrosion behavior of steel in 1 M HCl were investigated using different techniques. Experimental analysis of the corrosion inhibition properties of ethanol extract of Senecio anteuphorbium showed good inhibiting performance towards the steel corrosion in aggressive media. AC impedance plots of steel show that the inhibition efficiency rises with the increase in plant extract concentration and the corrosion process is controlled by the charge transfer. The results obtained from the PDP curves pointed showed that the SA inhibits both anodic metal dissolution and cathodic hydrogen evolution and corroborated the EIS results. Adsorption of inhibitor molecules on the steel surface was found to be endothermic. The values of the activation energy suggested that the adsorption mechanism is simultaneously physical–chemical adsorption. The adsorption was found to follow Langmuir isotherm. FTIR spectra allowed the detection of some functional groups containing hetero-atoms. The SEM–EDX and contact angle analysis showed that the inhibitor adsorption forms an adsorbed film on the steel surface.