1 Introduction

Nowadays, metallic corrosion is an important social and industrial issue because it leads to the deterioration of metallic materials, augmented maintenance and repair costs and wastage of inorganic resources [1]. The metallic corrosion impacts virtually all the achievements of the engineering, from heavy to advanced industry: energy production, construction, transport, medical sector, electronics, etc. In industrialized countries, the consequences of corrosion do not only lie in the economic cost (waste of raw material, energy and time) but also in the accidents that can cause (public safety) as well as the bad impact on the environment. The mild steel (MS) material is widely used in several engineering applications due to their inherent properties [2]. However, MS is poor corrosion resistance in acidic solutions. These solutions are frequently used for the elimination of unwanted rust and scale in diver’s industrial processes, such as industrial acid cleaning, acid pickling, acid descaling, etc. [3]. The most commonly used acid is hydrochloric acid. Several methods of protection and prevention are widely cited in the literature to protect materials against corrosion process but the use of inhibitor has been turned out to be the most reasonable and proficient [4]. The common inhibitors are synthetic organic compounds containing heteroatoms such as oxygen, sulfur, nitrogen, phosphorous atoms and the heterocyclic compounds with polar functional groups and conjugated double bonds [5, 6].

These organic compounds form a protective barrier of one or some molecular film against corrosion attack [7]. However, several organic compounds present a good anticorrosion effect, but most of them are expensive and highly toxic to humans and environment. These inhibitors can cause temporary or permanent problems to the organ system such as the liver, respirator or kidneys, or disrupt the enzymatic system in the body [8]. This has prompted the researchers to develop new ecological or green inhibitors, to replace the toxic organic inhibitors actually used in the industry. These ecological compounds could be extracted from medicinal plants, spices and aromatic herbs [9]. Moreover, the ecological compounds are in use in the form of pure compounds, extracts, or essential oils. Recently, several essential oils were reported as ecological corrosion inhibitors for different metals in various environments, such as Mentha Pulegium oil [10,11,12], Thymus Algeriensis oil [13, 14], Thymus Satureioides oil [15, 16], Thymus Capitatus oil [17], Artemisia Mesatlantica oil [18], Thymus Pallidus oil [19], Thyme oil [20], Thymus Sahraouian oil [21], Asteriscus Graveolens oil [22], Salvia Aucheri Mesatlantica oil [23], Foeniculum Vulgare oil [24], Lavandula angustifolia oil [25], Lavender oil [26], Artemisia oil [27], and Rosemary oil [28]. These essential oils are readily available, renewable source, low cost and above all environmentally acceptable. Actually, corrosion study uses a diversity of methods and techniques to understand how and why corrosion happens and at what rate MS perdition is being tested.

In the present study, the inhibiting effect of orange zest essential oil, denoted OZEO extracted from the fruits of orange, on the corrosion of MS in 1 M HCl, was investigated using mass loss, linear polarization resistance (LPR), potentiodynamic polarization (Tafel and Stern methods), electrochemical impedance spectroscopy (EIS) and scanning electron microscope (SEM) associated with energy-dispersive X-ray spectroscopy (EDX) measurements. Besides, the effect of temperature and the adsorption isotherms on the corrosion rate were investigated, too. Moreover, it is to be noted that orange fruit residues are produced in large quantity especially in the industry of juice and is disposed indiscriminately. Consequently, the usage of essential oil as an eco-friendly inhibitor is quite economical [29].

2 Experimental Detail

2.1 Fruits Material and Its Extraction

Coupons of orange fruits came from the city of Agadir city (located in the South West of Morocco in the Souss-Massa region) was accumulated in winter and only the aerial parts were used. OZEO was obtained by hydrodistillation realized by boiling of the aerial part of orange fruits for 2 h by Clevenger. OZEO was then dehydrated over Na2SO4. The mean yield of essential oil was 1.72 mL/100 g of dry substance.

2.2 GC–MS Analysis

The essential oil was analyzed by gas chromatography–mass spectrometry (GC–MS) (Shimadzou® QP2010) ultra-fitted with a RTX-5 MS (with a length of 30 m, an interior diameter of 0.25 μm and a layer thickness of 0.25 μm) capillary column. The vector gas (mobile phase) used was the helium with a flow rate of 1.25 mL/min. The starting oven temperature was set at 80 °C (isothermal for 3 min) and then augmented to 260 °C. The terminal oven temperature obtained was 300 °C. A volume of 2 µL of essential oil was injected in splitless mode with n-hexane. However, total gas chromatography running time was 1 h. The ion source was set at 250 °C and the technique of electron-impact ionization was used with an ionizing potential of 70 eV.

2.3 Mass Loss Measurements

First, MS sample used for all the experiments has a chemical composition (wt%) C = 0.11, Si = 0.24, Ni = 0.1, Mn = 0.47, Al = 0.03, Cu = 0.14, Mo = 0.02, W = 0.06, Cr = 0.12, Co < 0.0012, V < 0.003 and balance Fe. The mass loss results were carried out at the definite time of 6 h at 298 K (error ± 2 K) utilizing a numerical balance with a sensitivity of 10−4 g. MS samples used have a rectangular form (length = 3 cm, thickness = 0.05 cm and width = 1 cm). The MS coupons were mechanically abraded with various wet sandpaper successively from 80 to 1500 grade washed with bidistilled water, degreased with pure ethanol, dried with acetone and finally kept in a desiccator. Mass loss study was realized in a double glass cell associated with a thermostatted refrigeration condenser containing 60 mL of non-deaerated examination solution. The samples of MS were immersed in the solution containing 1 M HCl solution without and with different concentrations of OZEO. The apparent surface of MS samples used was 6.4 cm2. Three experiments were realized for each study.

2.4 Electrochemical Measurements

Electrochemical experiments were realized in a traditional three-electrode cell with a VoltaLab Radiometer® PGZ100 potentiostat controlled by VoltaMaster® 4 software. The conventional cell contains a beaker of Pyrex glass with three electrodes such as working, reference and counter electrodes. Rectangular samples of size (length = 6 cm, width = 1 cm, thickness = 0.05 cm) with 1 cm2 exposed surface areas were used as working electrode (WE) for electrochemical measurements. The chemical composition of the working electrode used in the electrochemical study is the same as used in the gravimetric experiments. Moreover, a saturated calomel electrode (SCE) was used as the reference electrode and a large area platinum mesh was used as the auxiliary electrode. All electrochemical results were obtained at 298 K (error ± 2 K). WE was primary immersed into the examination solution for a period of 1 h to establish a stable open circuit potential values. Potentiodynamic polarization curves were recorded from − 900 to − 100 mV with a scan rate of 1 mV/s. Moreover, for the LPR measurements, a small sweep from − 10 to + 10 mV versus free potential at a scan rate of 1 mV s−1 was used and the reverse polarization resistance (Rp) was obtained from the slope of current density versus potential curve in the proximity of Ecorr. However, the calculated anodic Tafel lines and the linear Tafel segments of the cathodic branches were extrapolated to their intersection point to determine the corrosion current density (icorr) and the corrosion potential (Ecorr) [30]. EIS experiments were realized in the frequency domain of 105–10−2 Hz by applying an alternating signal amplitude of 10 mV sine wave AC voltage. Furthermore, EIS data were achieved using Nyquist and Bode representations. The results of the electrochemical system were obtaining with data density of 10 points per decade. Besides, the EIS results were fitted with ZView® 2.80d software (Scribner associates, inc). All results were repeated 3 times to confirm reproducibility.

2.5 Surface Analysis

The surface micrographs of MS samples before and after exposure to the aggressive solution (1 M HCl) in the absence and presence of 2.5 g L−1 of essential oil for 24 h were evaluated by the SEM analysis using an FEI Quanta® 200 SEM instrument equipped with EDAX probe microanalysis at high vacuum and 30 kV EHT. However, the percent chemical composition of the MS samples was analyzed by EDX.

3 Results and Discussion

3.1 Characterization and Chemical Composition of OZEO

OZEO was analyzed by GC–MS technique. Figure 1 presents the mass spectrum of the identified compounds given by the analysis of OZEO. The find compound percentages of the essential oil are summarized in Table 1. The chemical structures of the major compounds of the essential oil are presented in Fig. 2.

Fig. 1
figure 1

Spectre of gas chromatography–mass spectrometry of OZEO

Table 1 Chemical composition of OZEO
Fig. 2
figure 2

Chemical structures of the major compounds in OZEO

3.2 Effect of Concentration

3.2.1 Mass Loss Studies

Mass loss technique can illustrate the intuitive inhibitory effect of essential oil used and deliver dependable results of the corrosion process with or without OZEO [31]. In this regard, the corrosion effect of MS in 1 M HCl at 298 K (error ± 2 K) with and without OZEO is assessed utilizing mass loss technique. The corrosion rate (Wcorr) and the protection efficiency (ηML%) can be calculated according to the following Eqs. 1 and 2 [32]:

$$W_{\text{corr}} = \frac{{m_{\text{i}} - m_{\text{f}} }}{S \times t}$$
(1)
$$\eta_{\text{ML}} \% = \left( {1 - \frac{{W_{\text{inh}} }}{{W_{ 0} }}} \right) \times 100$$
(2)

mi and mf are the weighted of the specimens before and after immersion in the tested solution in mg, S is the total area of MS sample in cm2, t is the exposure time in hours. Winh and W0 are the values of mass loss of MS specimens after 6 h of immersion in the solutions in the presence and absence of OZEO, respectively.

Figure 3 presents the corresponding trend of the effect of OZEO concentration on Wcorr and ηML%. It is clear from this figure that ηML% increases while the Wcorr decrease as the essential oil concentration increase in 1 M HCl solutions. However, the best protection efficiency of 75.45% is observed at 2.5 g L−1. These obtained results indicate that OZEO used as an eco-friendly corrosion inhibitor is a fairly efficient inhibitor for MS in 1 M HCl. The effectiveness of OZEO may be attributed to the coverage of MS surface with OZEO major compounds [33]. Besides, their adsorption such as Methenolone and Geraniol butyrate onto the MS surface through nonbonding electron pairs of oxygen atoms of as well as π-electrons block the active sites on MS, and therefore, reducing the Wcorr [18]. The best protection of essential oil suggests a higher bonding capacity of this molecules on MS surface. The present results are also supported by the electrochemical tests realized below. Furthermore, it is important to be noted that if we accept that the adsorption phenomenon is only made by Methenolone and Geraniol butyrate as the principal constituents of the OZEO, we indicate that the protection effect of the essential oil may also be due to a co-operative effect of all the active compounds present in OZEO although minor compounds. A similar result has been documented by many researches [26, 34, 35].

Fig. 3
figure 3

Corrosion rate and inhibiting efficiency of MS exposed for 6 h in 1 M HCl at different concentrations of OZEO at 298 K (error ± 2 K)

3.3 Electrochemical Measurements

3.3.1 Potentiodynamic Polarization Study

The effect of OZEO concentration on the cathodic and anodic polarization on MS in corrosive solution (1 M HCl) has been investigated using polarization experiments and the obtained Tafel plots are presented in Fig. 4. However, the cathodic branches present the hydrogen evolution reaction and the anodic branches present the metal dissolution reaction.

Fig. 4
figure 4

Polarization curves of MS in 1 M HCl at different concentrations of OZEO at 298 K (error ± 2 K)

It is shown in Fig. 4 that the addition of OZEO into the aggressive solution (1 M HCl) clearly decreasing the anodic and the cathodic branches, and therefore, reduces the corrosive attack of MS in 1 M HCl. Consequently, the cathodic hydrogen evolution reaction and the anodic metal dissolution reaction are also inhibited after addition of OZEO [36].

From the cathodic branches, it can be seen that in presence and absence of different concentration of OZEO, the cathodic curves are giving rise to circa parallel lines and the hydrogen evolution is activation controlled [37]. The reduction of hydrogen ions at the cathodic sites of the metal surface takes place through a charge transfer mechanism [38]. Furthermore, the active essential oil compounds are primarily adsorbed onto the electrode surface and, as results, block the reactive sites of the electrode surface. Thus, the surface area accessible for the hydrogen ions is reduced while the real reaction mechanism remains unchanged [39]. In the case of anodic branches, the essential oil acts as eco-friendly corrosion inhibitor only at low overpotentials. Furthermore, corrosion rate augmented in the presence of essential oil at additional positive potentials than ≈ − 0.292 V and the mechanism of the anodic reaction was seen to be modified. This behavior can be related to an important dissolution of the metal surface, conducting to desorption of essential oil film from the MS surface [40]. However, the protection efficiency ηTafel% can be calculated using the following Eq. 3 [36]:

$$\eta_{\text{Tafel}} \% = \left( {\frac{{i_{\text{corr}} - i_{\text{corr/inh}} }}{{i_{\text{corr}} }}} \right) \times 100$$
(3)

where icorr and icorr/inh are the corrosion current density values without and with OZEO, respectively, obtained by extrapolation of cathodic Tafel lines at Ecorr, using the software (Voltamaster 4, VoltaLab Radiometer®).

Thereafter, the LPR tests were realized to ignore the effect of the metal surface changes which can be produced in the course of polarization at elevated overpotentials in potentiodynamic polarization study [41]. Furthermore, the resistance of polarization (Rp) can be determined from the slope of the current–potential curves in the vicinity of Ecorr ± 10 mV according to the following Eq. 4 [42]:

$$R_{\text{p}} = \left| {\frac{{{\text{d}}E}}{{{\text{d}}i_{{}} }}} \right|_{\Delta E \to 0}$$
(4)

In this Equation, di represents the difference in the current density and dE is the difference in the applied potential. The inhibiting efficiency obtained by LPR technique (ηS&G%) can have obtained from Rp using the Eq. 5 [39]:

$$\eta_{\text{LPR}} \% = \left( {1 - \frac{{R_{\text{p}} }}{{R_{\text{p/inh}} }}} \right) \times 100$$
(5)

where Rp and Rp/inh are the polarization resistance values without and with OZEO, respectively.

The data of Rp calculated from the LPR experiments are also presented in Table 2. However, from this results, it is clear that the values of Rp rise with rising in the concentration of essential oil and reached a maximum value of 144.23 Ω cm2 at 2.5 g L−1 in comparison to 39.67 Ω cm2 in 1 M HCl solution. Consequently, the augmented values of Rp in presence of essential oil indicate a non-conducting adsorbed physical barrier layer of essential oil made at electrolyte -MS interface [29, 43]. The related electrochemical parameters such as Ecorr, icorr, and the cathodic Tafel slope (βc) given from the polarization experiments are listed in Table 2.

Table 2 Electrochemical data evaluated from the cathodic current–voltage characteristic for the system MS/1 M HCl without and with OZEO at 293 K (error ± 2 K)

From Fig. 4, it appears clearly that the anodic branches do not present well-defined experimental Tafel regions. This is probably related to the existence of the corrosion products or such impurities on the metal surface to form a non-passive surface layer [44]. However, a contrary behavior is registered in cathodic branches because the cathodic branches presented an exhibit linear Tafel region. For that reason, the cathodic branches are preferred to determining electrochemical parameters using the Tafel extrapolation method such as Ecorr, βc, and icorr [45, 46].

The various parameters extracted from Tafel method are presented in Table 2. It is shown from this table that in the presence of various concentration of OZEO compounds cause a decrease of icorr when the concentration of OZEO is increased. Furthermore, the Ecorr of MS in the corrosive solution is displaced and the maximum value displace is 34.6 mV compared to that of the blank solution. However, it is recognized that if the displacement of Ecorr after addition essential oil is superior than 85 mV with respect to Ecorr of HCl 1 M solution, the essential oil can be considered as anodic or cathodic inhibitor and if the displacement is inferior than 85 mV the essential oil can be considered as mixed inhibitor [47]. So that, OZEO is considered as mixed type inhibitor with a predominantly anodic action. Subsequently, the small difference of the βc after addition of OZEO confirmed that the cathodic process is under activation control, as said above. Furthermore, the protection efficiency ηTafel% increases with increasing concentration of essential oil, it reaches a maximum value of 74.84% at 2.5 g L−1.

To confirm the previously obtained electrochemical parameters, another method, derived from potentiodynamic polarization curves is used to search for electrochemical parameters from a fitting by the Stern equation. Thus, the total current density values i, is considered as the summation of anodic and cathodic current density ia and ic respectively. Therefore, it can be obtained from Eq. 6 [48]:

$$i = i_{\text{a}} + i_{\text{c}} = i_{\text{corr}} \times \left( {e^{{b_{\text{a}} \, \times \,(E - E_{\text{corr}} )}} - e^{{b_{\text{c}} \, \times \,(E - E_{\text{corr}} )}} } \right)$$
(6)

where ba is the Tafel constant of anodic reaction (V−1) and bc is the Tafel constant of cathodic reaction (V−1). These both constants are related to the classical Tafel slopes β (Vdec−1), in normal logarithmic scale, according to the following Eq. 7 [48]:

$$b = \frac{\ln 10}{\beta }$$
(7)

Moreover, it is important to signal that the potential window is limited in the vicinity of Ecorr ± 100 mV. The experimental and fitting curves obtaining by Stern method is illustrated in Fig. 5. The electrochemical data (Ecorr, icorr, βc and βa) is computed with a nonlinear least square method by means Eq. 6 utilizing Origin® 9 software (OriginLab). The best concordance, between the fitting and experimental curves, is observed in Fig. 5.

Fig. 5
figure 5

Comparison of experimental (scatter) and fitting (line) data using a nonlinear fitting with Stern Equation for MS electrode at various concentrations of OZEO

The goodness of fit relating to Eq. 6 is referred by both parameters; the coefficient of determination (R2) and the Chi square value (χ2), in which the coefficient of determination presents how close the experimental data when compared to the fitted regression curve and χ2 values, given by Eq. 8, exemplifies a measurement of how expectations compared to the experimental data according to Stern Eq. 8 [49]:

$$\chi^{2} = \frac{1}{N}\sqrt {\sum\limits_{i = 1}^{N} {\left( {i_{{{\text{mes}},i}} - i_{{{\text{cal}},i}} } \right)^{2} } }$$
(8)

where imes, i is the measured experimental data, ical, i presents the calculated model data and N present the freedom degrees.

The inhibition efficiency of the essential oil has been obtained from corrosion current density values utilizing the following Eq. 9 [50].

$$\eta_{\text{Stern}} \% = \left( {\frac{{i_{\text{corr}} - i_{\text{corr/inh}} }}{{i_{\text{corr}} }}} \right) \times 100$$
(9)

Examination of the results present in Table 3 shows that the values of icorr are sensibly reduced in the presence of essential oil, indicating that the rate of corrosion is retarded via the formation of a barrier film on MS surface by adsorption of active compounds of the essential oil. Besides, the achieved χ2 between 8.28 × 10−10 and 1.50 × 10−9, and the values of R2 greater than 0.980 designate that the experimental results are well described by the Stern method. Moreover, a similar trend is observed for Ecorr, icorr, βc, βa and ηStern% parameters with those obtained from Tafel method. In conclusion, the polarization results given by the three methods, Tafel, Stern &Geary, and Stern also confirm the mass loss results and give more information about the inhibitor action of OZEO.

Table 3 Data obtained from the polarization curves of MS in 1 M HCl solution at different concentrations of OZEO using the Stern method

3.3.2 EIS Study

To get a better comprehension of the mechanism between the essential oil active compounds and the MS electrode surface, an EIS experiments are attained. The EIS measurements are used under potentiostatic conditions at corrosion potential in the absence and presence of different concentrations of OZEO. Figure 6, presents the Nyquist plots of MS realized at 298 K (error ± 2 K).

Fig. 6
figure 6

Nyquist (Z′, − Z″) diagrams of MS in 1 M HCl at various concentrations of OZEO at 298 K (error ± 2 K)

At first sight, it is clear that for each experiment, the Nyquist plot presents a single depressed capacitive loop indicating that only one phenomenon occurred. Furthermore, the depressed form of the plots is related to the presence of inhomogeneity or micro-roughness of the MS surface created during the process of corrosion [51]. The capacitive loops are dominated with the charge transfer process of the electrode surface and double-layer behavior. Actually, when OZEO is added to the aggressive solution, the Nyquist plots are larger compared to 1 M HCl, and the size of EIS plots augmented when the concentration of essential oil increases. However, all the EIS plots are interpreted in terms of simple modified Randles circuit which is a parallel combination of the charge transfer resistance (Rt) and the Constant Phase Element (CPE), all are in series with other resistor corresponding to the electrolyte solution resistance (Rs) Fig. 7.

Fig. 7
figure 7

The equivalent circuit used for the fitted impedance spectra

In this circuit, CPE is used to replace the capacity of double layer (Cdl). Moreover, the CPE is mathematically expressed as [52]:

$$Z_{\text{CPE}} = A^{ - 1} (j \times \omega )^{ - n}$$
(10)

where A is the magnitude of CPE or proportionality coefficient (µF sn−1), n is the CPE exponent associated to the phase shift which can be used as a measure of surface irregularity, i is an imaginary number and ω is the angular frequency (rad s−1). Cdl can be calculated using Mansfield and Hsu formula [53] according to the following Eq. 11 [54]:

$$C_{\text{dl}} = \left( {A \times R_{t}^{1 - n} } \right)^{{\frac{1}{n}}}$$
(11)

The relaxation time constant τ of the charge transfer process can be calculated via Eq. 12 [54]:

$$\tau = R_{t} \times C_{\text{dl}}$$
(12)

The EIS parameters such as Rs, Rt, Cdl, Q, n, χ and ηEIS% are presented in Table 4. The values of ηEIS% are calculated using the following Eq. 13 [9]:

Table 4 Impedance data of MS in 1 M HCl containing various concentrations of OZEO at 298 K (error ± 2 K)
$$\eta_{\text{EIS}} \% = \left( {1 - \frac{{R_{\text{t}} }}{{R_{\text{t/inh}} }}} \right) \times 100$$
(13)

Rt/inh and Rt stand for charge transfer resistance of MS in the presence and absence of different concentrations of OZEO, respectively. Moreover, χ2 used by impedance method measure the goodness of fitting to the choose equivalent circuit (Fig. 7), to examine the precision of the fitted experimental data. χ2 can be obtained according to the following Eq. 14 [55]:

$$\chi^{{\prime}{2}} = \sum\limits_{i = 1}^{n} {\frac{{\left| {M_{\text{m}} (c) - M_{\bmod } ({\text{fc,pa}})} \right|^{2} }}{{D_{i}^{2} }}}$$
(14)

D 2 i presents the average deviation, Mm (i) is the measured EIS at the fc frequency, Mmod (fc, pa) depends on the used model and pa is the model parameter (Rs, Rt, A).

EIS data achieved following the fitting of the impedance experimental results by utilizing the ZView® software are presented in Fig. 6 and listed in Table 4.

It is clear from Table 4 that the Rt value increased from 34.86 Ω cm2 for the 1 M HCl to 142.9 Ω cm2 with addition of 2.5 g L−1 of OZEO. Besides, the increase of Rt values could be attributed to adsorption of the active compounds of the essential oil at electrode/electrolyte interface, which efficiently stopped the movement of charges through the MS/solution interface and hence corrosion inhibition was attained [56]. Furthermore, The diminution in Cdl resulting from a diminution of local dielectric constant and/or an increase in the thickness of the electrical double layer suggests that the essential oil acts by adsorption on the electrode/solution interface [57, 58]. On top of that, in the presence of essential oil, the difference in the values of the electrolyte solution resistance (Table 4) does not trace a regular pattern. This may be ascribed to the dissimilarity in a geometrical area through which current is transported in the electrochemical cell [1]. Then, the values of n inferior to 1 reflect the deviation from the ideal capacitor. A reel capacitive behavior is rarely obtained and in this situation, the values of n (Table 4) did not vary significantly indicating the charge transfer controlled dissolution mechanism of MS in corrosive solution in absence and presence of OZEO. However, the lower value of A in presence of essential oil is indicative of the creation of protective film on electrode surface by progressive substituted of H2O and Cl molecules by OZEO active compounds. Furthermore, the addition of essential oil to 1 M HCl increases the relaxation time constant values indicating that the charge and discharge rates to the electrode/electrolyte interface is markedly reduced [50]. This illustrates that there is relation between the quantity of charge that can be stored and the discharge velocity in the electrode/electrolyte interface. Therefore, the adsorption of essential oil active compounds on the electrode surface reduces its electrical capacity because OZEO active compounds substituted the H2O and Cl molecules initially adsorbed on MS surface. Consequently, the reduce in the capacity with the augmenting in the essential oil concentration, can be ascribed to the development of an isolated film on the metal surface [18]. Besides, χ2 values between 0.00265 and 0.00675 are considered as best fitting to the proposed circuit [1]. Finally, it is clear from Table 4 that the protection efficiency ηEIS% increases continuously with increasing of essential oil concentration and the maximum of 75.64% is attained in the case of 2.5 g L−1.

Bode plots can confirm the results obtained by Nyquist diagrams. At first place, Fig. 8 presents the Bode plots of MS in aggressive solutions in the absence and presence of different concentrations of OZEO.

Fig. 8
figure 8

The bode (log f, log |Z|) and (log f, phase) diagrams of MS in 1 M HCl at different concentrations of OZEO at 298 K (error ± 2 K)

It is obvious from Fig. 8 that, the Bode diagrams present three distinctive regions in the absence and presence of various concentrations of essential oil. First, in the high-frequency region, the absolute impedance magnitude (log |Z|) values tend to become zero and the phase angle values descending quickly to zero degrees. These are corresponding to the solution resistance Rs [54]. Second, in the middle-frequency region, we remark that the slopes of Bode impedance magnitude plots (P) are different from − 1 (Table 4) and the phase angles tend to become − 70° (Fig. 8). These results are indicating the presence of capacitive behavior [59]. A perfect capacitive behavior (P = − 1 and phase angle = − 90°) is rarely obtained. Third, in the low-frequency region, the absolute impedance magnitude does not depend on frequency [60]. Although, the Bode plots confirm the presence of an equivalent circuit having one CPE in the electrode/electrolyte interface. Furthermore, the increase of absolute impedance magnitude of electrochemical experiments at low frequencies justifies the best protection with the increase of essential oil concentration [61]. Moreover, the phase angle diagram provides only a sole peak which means the presence of a unique time constant [62]. However, the increase in the essential oil concentrations in the normal hydrochloride solution (1 M HCl) results in more negative values of phase angle suggesting a best protection behavior of essential oil which can be due to the adsorption of active compounds of OZEO on the electrode surface at higher concentrations [61].

3.3.3 Comparison of the Overall Results

A comparative study (Fig. 9) is realized concerning the different inhibition efficiency (η%) values obtained, utilizing various methods such as mass loss, Tafel, Stern, Stern & Geary and EIS for MS in tested solution (1 M HCl). From this figure, it is clear that the inhibition efficiencies, calculated from various methods following the same trend and are in good correlation. In addition, the protection efficiency is quite high at all given concentrations of the essential oil. Indeed, a good inhibition efficiency was obtained in the case of 2.5 g L−1 OZEO concentration.

Fig. 9
figure 9

Comparison of various inhibition efficiency η% values acquiring by mass loss, Tafel, Stern, Stern & Geary and EIS methods

3.3.4 Impact of Temperature

Temperature can modify the interaction between MS surface and the acid medium with and without the essential oil. Besides, for more information concerning both kinetics and standard thermodynamics parameters of MS corrosion in the test solution, the impact of temperature was realized by potentiodynamic polarization measurements based on Stern plots at different temperature, namely 298, 308, 318 and 328 K in the absence and presence of 2.5 g L−1 of OZEO in HCl 1 M. However, Figs. 10 and 11 present the polarization curves by Tafel and Stern representations of MS in 1 M HCl with and without 2.5 g L−1 of essential oil.

Fig. 10
figure 10

Polarization curves of MS in 1 M HCl with 2.5 g L−1 of OZEO at different temperatures

Fig. 11
figure 11

Polarization curves of MS in 1 M HCl at different temperatures

The values of Ecorr, icorr, βc, βa, R2, χ2 and ηStern% are obtained by the same extrapolation method mentioned in Sect. 3.3.1. However, the corresponding data are shown in Table 5.

Table 5 Corrosion parameters obtained by the Stern extrapolation method at various temperatures studied in 1 M HCl for MS in absence and presence of essential oil

It is clear from Table 5 that the current density is around 3 and 6 times greater, at 328 K when compared to 298 K, in absence and presence of essential oil, respectively. Moreover, it is important to notice that in the presence of essential oil, the current density slows down in all temperature investigated by an average of 3 times by comparison to the test solution (HCl 1 M). Furthermore, the inhibition efficiency (ηStern%) decreases slightly with rise of temperature from 298 to 318 K and drops at 328 K. This decrease in ηStern% may be attributed to physical adsorption of active compounds of essential oil on MS surface. Besides, this behavior may be due, on the one hand, to the increased rate of dissolution process of MS and, on the other hand, to the partial desorption of OZEO compounds from MS surface [63].

For more comprehension of the activation process, the Arrhenius plots are acquired by the classical Arrhenius relation (Eq. 15) and the transition state Arrhenius relationship (Eq. 16) [64].

$$i_{\text{corr}} = C\exp \left( { - \frac{{E_{\text{a}} }}{R \times T}} \right)$$
(15)
$$i_{\text{corr}} = \frac{R \times T}{N \times h}\exp \left( {\frac{\Delta S*}{R}} \right)\exp \left( { - \frac{\Delta H*}{RT}} \right)$$
(16)

where C is the preexponential factor, Ea is the effective activation, R is the universal gas constant, T the absolute temperature, N is the Avogadro’s number, h the Plank’s constant, ΔS* and ΔH* the entropy and enthalpy of activation, respectively. Plotting of natural logarithm (ln icorr) versus 1/T gives straight lines as revealed from Fig. 12.

Fig. 12
figure 12

Arrhenius plots of MS in 1 M HCl with and without 2.5 g L−1 of OZEO

Figure 13 shows a plot of natural logarithm ln (icorr/T) against 1/T for OZEO and straight lines are obtained with a slope of (− ΔH*/R) and an intercept of (ln R/(N × h) + ΔS*/R) from which the values of ΔH*and ΔS* are deduced, respectively (Table 6).

Fig. 13
figure 13

Variation of ln (icorr/T) versus 1/T in 1 M HCl with and without 2.5 g L−1 of OZEO

Table 6 The values of activation parameters C, Ea, ΔH*, ΔS* for MS in 1 M HCl in the absence and the presence of 2.5 g L−1 of OZEO, respectively

An inspection of the data presented in Table 6 reveals that Ea and C in the presence of essential oil is higher than that for test solution. Popova et al. [65] reported in their article that if the inhibition efficiency decreases with temperature increase and the value of the preexponential factor increases in the presence of inhibitor when compared to test solution can be attributed to the phenomenon of physical adsorption. In our case, taking into consideration the reference cited above, we could confirm the physical adsorption. Consequently, the active compounds of essential oil adsorb on the metal surface by displacing water molecules and Cl anions. Besides, this active compounds increasing also the energy barrier of the corrosion process by physical interaction with the MS surface, leading to a reduction in corrosion rate [7]. However, the temperature effect studies are indispensable but they do not provide all the information needed for the adsorption mechanism clarification. Popova et al. [66] reported that there are cases where chemical adsorption is accepted as the most probable type of adsorption although the inhibition efficiency decreases with temperature increase and the effective activation in the presence of inhibitor is higher than that for blank.

The positive sign for ΔH* in the absence and presence of essential oil translating the endothermic nature of the corrosion process [34]. The entropy of activation value decreases (more negative) in the presence of essential oil than in the test solution which designates that the system passes from less orderly state to a more random arrangement [67].

3.3.5 Adsorption Isotherm

The adsorption isotherm can provide more fundamental information about the interaction between the MS surface (adsorbent) and the active compounds of essential oil (adsorbate). Besides, depending on the nature of metal, the electronic structure of inhibitor molecules, the test solution, the environment temperature, the concentration of inhibitor or electrolyte, etc. adsorption can be physical, chemical or both of physical and chemical adsorption. In this context, different commonly used isotherms in corrosion study namely Langmuir, El Awady, Flory–Huggins, Freundlich, Dubinin–Radushkevich, Temkin, Frumkin and Langmuir–Freundlich isotherms are investigated to fit the surface coverage (θ) values. Stern method is employed in this work to find θ at different essential oil concentrations. The surface coverage is calculated according to Eq. 17 [68].

$$\theta = \frac{{\eta_{\text{Stern}} \% }}{100}$$
(17)

However, the various linearized isotherm tested can be described by the Equations given in Table 7 as below [69,70,71,72,73,74,75,76]:

Table 7 The linearized isotherm models used in the present investigation

Cinh is the OZEO concentration in the electrolyte, Kads is the adsorption coefficient. 1/y and x are the number of water molecules displaced by only one inhibitor molecule. a and d reflect the interaction factors between the active compounds of essential oil on MS surface (these interaction parameters may be negative or positive: if a or d is inferior to 0 then a repulsion force, occurs otherwise, if a or d is superior to 0 then a lateral attraction between the active compounds of inhibitor). z presents the constant characterizing the adsorption degree in electrode/electrolyte interface: (if z is between zero and one, the adsorption is easy, if z equal to 1 adsorption is moderate and if z superior to 1 adsorption is difficult). m is the heterogeneity parameter (between zero and one) which characterizes the distribution of adsorption energy at different sites on a non-ideal surface. θmax presents the maximum surface coverage and σ (polany potential) can be correlated as Eq. 26 [77, 78]:

$$\sigma = RT\left( {1 + \frac{1}{{C_{\text{inh}} }}} \right)$$
(26)

Furthermore, B (mol2 kJ−2) is a constant which can be obtained from the slope of the plot given by Eq. 22. Moreover, E presents the transfer energy of one mole of the active compounds of essential oil from infinity to the surface of the metal given by the following Eq. 27:

$$E = \,\frac{1}{{\sqrt {2\,B} }}$$
(27)

Figure 14 presents different adsorption isotherm for MS in 1 M HCl containing the experimental data (point) and the fitting line obtained by the least square method.

Fig. 14
figure 14

Plots of different adsorption isotherm models of OZEO onto MS surface at 298 K (error ± 2 K)

For choosing the isotherm that reflects the best fitting to the experimental results, the determination coefficient (R2) can be assessed. However, from Fig. 14 a best linearity is detected in the Langmuir adsorption isotherm. Table 8 presents the values of different isotherms used for studying the corrosion process by OZEO on MS at 298 K.

Table 8 Parameter values issued from linearized adsorption isotherm model for the adsorption of essential oil onto MS in 1 M HCl at 298 K (error ± 2 K)

It is clear from Table 8 that the best linear fit is presented from the Langmuir isotherm with a correlation regression of 0.9956. Nevertheless, the slope of Langmuir isotherm is higher to 1 (1.2922). Oguzie et al. reported that these increase in relation to unity is ascribed to interaction between the active compounds of essential oil on MS surface and variations in the values of the heat of adsorption (Qads) with increasing surface coverage, factors which were not taken into account in derivation of the Langmuir isotherm [79]. In our situation, such active compounds of essential oil interaction by mutual repulsion or attraction and would affect the slope [80].

It is well known that the Langmuir adsorption isotherm is originally developed to describe gas–solid-phase adsorption onto activated carbon [69], then it has been modified to fit the adsorption of solutes onto the solid surfaces in solution [81]. Moreover, the Langmuir adsorption isotherm model postulates that the adsorbed film on the MS surface has a thickness equal to one molecule diameter (monolayer) and the adsorption process can be formed on a fixed number of particular local sites [82]. These adsorption sites are similar and there are no interactions between molecules adsorbed on these sites [83]. That is why, the energy of adsorption is independent of the surface coverage [25]. Furthermore, Langmuir isotherm model assumed that the surface is homogeneous and each molecule of the inhibitor can displace one water molecule on the surface because it has been reached to the steady state and adsorption would not continue at this occupied site. Besides, if we apply all these postulates, we obtain the following results: 1/y = x=m = 1 indicating that each active compound of essential oil displaced only one water molecule on a homogenous surface of MS and a = d = 0 indicating the absence of interaction between the adsorbed compounds. In contrary, From Nyquist and Bode results, it is clear that n values are between 0.864 and 0.890 (n < 1), P values are between − 0.665 and − 0.749 (p > − 1) and the phase angles tend to become − 70° (different from 90°). All of these results confirms, that we have a heterogeneity of the surface of MS or a non-ideal MS/electrolyte interface. Furthermore, in the case of OZEO, containing different compounds and having some heteroatoms, aromatic rings or π band can make the steric and electronic effects more important [50]. Therefore, all of these findings indicate that our system does not completely obey the Langmuir isotherm, despite the R2 close to 1 and the slopes very close to unity. However, it appeared to us logical to search for other more realistic isotherms reflecting the fact that the surface is heterogeneous (n ≠ 1, P ≠ − 1 and the phases angle different to 90°) and the mixture character of essential oil in corrosion inhibition with the normal interaction between the adsorbed species.

Inspection of the results given in Table 8 shows that the values of R2 is 0.859 from El-Awady isotherm. Bokati and Dehghanian report, that if the parameter of El-Awady isotherm (1/y) less to one imply the formation of multilayers of the inhibitor on MS surface. Else if the value of (1/y) more than one indicate that the inhibitor will occupy more than one active site. In the current work, values of 1/y confirm that each active compound of essential oil replaces three H2O molecules from MS surface [84]. Similarly, this result can be confirmed with the parameter of Flory–Huggins x which is equal to three, suggesting that the active compound of essential oil adsorbed on MS surface replaces three H2O molecules [72]. Besides, this displacement of the water molecules can be related to the two major compound of OZEO (Methenolone and Geraniol butyrate) that contain each molecule two oxygen heteroatoms capable of adsorption on the surface of MS. Moreover, The Langmuir–Freundlich isotherm describes multisite adsorption behavior on a non-ideal MS surface while neglecting interactions among essential oil components. However, the closer the m parameter to one, the narrower the distribution of the adsorption energy, and thus, the more homogeneous the formed essential oil adsorption film. Consequently, it is seen that m values are less than 1 (0.3067) which testify the existence of various sensitivities of the essential oil molecules linked to MS surface roughness [85, 86]. Subsequently, the negative value of Temkin parameter (a) and Frumkin parameter (d) show that there were highly repulsive lateral interactions in the adsorbed film [71]. Besides, the Freundlich parameter z is between zero and one (0.097) indicating that the adsorption is easy [74]. Then, Dubinin–Radushkevich isotherm can be used for providing more information about the physicochemical characteristics of adsorption process (physical or chemical adsorption) on MS surface in 1 M HCl [75]. This isotherm postulated that, if the magnitude of E is between 8 and 16 kJ mol−1, adsorption occurs via a chemical mechanism, while for magnitude of E less than 8 kJ mol−1, a physical mechanism takes place [73, 76]. In this study, the value of E (12.83 kJ mol−1) indicate that corrosion inhibition process of MS by essential oil involves chemical process. Furthermore, the values of the absorption coefficient for all isotherms reflecting an indicative of favorable adsorption of OZEO on MS surface.

3.3.6 Explanation for Inhibition by OZEO

It is clear that the initial step in the adsorption process of an active compound of OZEO on a MS surface generally involves displacement of three or more H2O molecules adsorbed at the MS surface as given below in Eq. 28 [87]:

$${\text{Com}}_{{({\text{Solution}})}} + 3{\text{H}}_{2} {\text{O}}_{{({\text{Adsorption}})}} \leftrightarrow {\text{Com}}_{{({\text{Adsorption}})}} + 3{\text{H}}_{2} {\text{O}}_{{({\text{Solution}})}}$$
(28)

where Com(Solution) is the active compound of OZEO in 1 M HCl, Com(Adsorption) is the adsorbed active compound onto MS surface and the H2O(Adsorption) is the water molecule on the electrode surface. Besides, this adsorption can be influenced by the composition and surface charge of MS, the corrosive environment, temperature, OZEO concentration and the chemical structure of active compounds of essential oil [88]. Both major constituents of essential oil are Methenolone and Geraniol butyrate whose chemical structures are given in Fig. 2 having heteroatoms of oxygen and conjugated double bonds in the chemical structures. Moreover, the major constituents of OZEO can be adsorbed on MS with one or more ways:

  • Interaction donor–acceptor by the π-electrons or the unshared electron pairs of oxygen of major compounds of OZEO for creating a bond with the vacant d- orbital of the iron atom on MS surface.

  • Interaction of d-electron of iron surface atom to the vacant orbital of oxygen’s heteroatoms (back donation).

  • Interaction of protonated form of Methenolone or Geraniol butyrate with previously adsorbed Cl anions [54].

In aggressive solution (HCl 1 M), the Methenolone and Geraniol butyrate may be adsorbed on MS surface in the form of the neutral compounds by displacing H2O molecules. Besides, the carbonyl oxygen (C=O) containing in Methenolone and Geraniol butyrate may be protonated and this both compounds may exist as a polycation [75]. However, the charge of MS surface can be calculated from the value of zero charge potential (Ecorr − Eeq = 0) [89]. Banerjee and Malhotra reported that the value of Eeq of iron is − 530 mV (Vs SCE) in HCl solution [90]. Furthermore, in the present study, Ecorr for 1 M HCl is − 517.7 mV (Vs SCE). Thus, MS can be charged positively in 1 M HCl solution because (Ecorr − Eeq = 12.3 mV (Vs SCE) > 0) and the Cl may be specifically adsorbed on MS surface [91]. In fact, MS becomes charged negatively because of the first adsorbed Cl anions. Then, methenolone and geraniol butyrate are adsorbed via coulombic interactions between protonated charged oxygen atom and Cl anions on MS surface. Consequently, the cationic form of major compounds of OZEO immersed in the 1 M HCl solution begins to compete with H+ cations for the electrons on MS surface and primarily get adsorbed on MS surface by physical interaction (physisorption) with previously adsorbed Cl anions. In this respect, H2 release and the cationic form of major compounds of OZEO returns to its neutral form with an oxygen’s heteroatoms containing free electron pairs that promoted the chimisorption on MS surface [92]. Figure 15 presents the proposed mechanism for inhibition of ZOEO in 1 M HCl solution.

Fig. 15
figure 15

Presentation of the adsorption behavior of major compounds of OZEO on MS surface in 1 M HCl solution a chemical interaction and b physical interaction

3.3.7 SEM and EDX Study

The high-resolution surface micrographs (50 µm) of MS samples exposed in three environments are investigated by SEM technique (Fig. 16a, b, c). Figure 16a presents the SEM micrograph of the abraded MS specimen prior to immersion in the acid solution. Parallel lines are observed due to mechanical polishing by grinding with emery paper. After immersion of the electrode in 1 M HCl solution only (Fig. 16b), a severe corrosion attack of the metal surface is recorded. It is clear that the surface of the electrode is badly damaged due to the excessive electrode dissolution in 1 M HCl. That is why a large number of cracks and pits dispersed over the surface have appeared. In sharp contrast, in the presence of essential oil (Fig. 16c), a significant improvement in the surface morphology of MS was remarked. Indeed, a relatively smoother and a homogeneous surface in absence of corrosion products aggregates is clearly observed. This observation is perhaps due to the formation of a good protective film of essential oil onto the MS surface [93]. Furthermore, for determining the elementary composition in the absence and presence of essential oil on MS surface during the corrosion process, the EDX survey spectra are utilized. Figure 16a′–c′ presents the EDX panorama for MS before and after exposure to the 1 M HCl and 1 M HCl + 2.5 g L−1 of essential oil.

Fig. 16
figure 16

SEM and corresponding EDX spectra of MS surface: a, a′ metallic surface after being polished, b, b′ metallic surface after 24 h immersion in 1 M HCl and c, c′ metallic surface after 24 h immersion in 1 M HCl with 2.5 g L−1 of OZEO

It is obvious from Fig. 16a′ that the EDX spectrum presents the characteristics peaks of certain elements present in the chemical composition of the electrode surface. Moreover, in aggressive solution (1 M HCl) the EDX spectrum of MS observed in Fig. 16b′ presents the appearance of an increase in the intensity of the oxygen peak with respect to bare MS (Fig. 16a′). Subsequently, in the presence of essential oil Fig. 16c′ the spectrum presents the appearance of the characteristic peak of nitrogen and an increase in intensities of oxygen and carbon peaks. Furthermore, the quantity percentages in each case are listed in Table 9.

Table 9 Percentage of atomic contents of elements obtained from EDX spectra

Furthermore, the evaluation of the mass composition (Table 9) of bare MS and the electrode immersed in the aggressive solution an increase in the mass percentage of carbon and oxygen is detected while a decrease in iron is obtained. Besides, in presence of essential oil, the percentage of iron is decreased while an increase in the percentage of oxygen and carbon is observed. Moreover, an additional peak of nitrogen is detected [94]. This results is due to the nitrogen, carbon and oxygen atoms constituting the OZEO and demonstrated that the active compounds of essential oil having a remarkable effect on the corrosion of electrode surface, by the formation of a film protector at the metal/solution interface [95]. However, these results are in agreement with those recorded by SEM micrographs.

4 Conclusion

In this study, different chemical and electrochemical methods were used to investigate the essential oil of orange zest as an eco-friendly corrosion inhibitor for mild steel in 1 M HCl. The principal conclusions are:

  1. 1.

    The investigated OZEO as new eco-friendly corrosion inhibitor exhibits effective inhibiting properties for mild steel in 1 M HCl. The inhibition efficiency increases with the increase in OZEO concentration and attain the maximum value at 2.5 g L−1.

  2. 2.

    Tafel polarization data illustrates that OZEO acts as mixed type corrosion inhibitor in 1 M HCl with predominantly anodic action.

  3. 3.

    Stern polarization study confirms the results obtained by Tafel polarization.

  4. 4.

    EIS investigation reveals that the essential oil decreases the corrosion rate by increasing the charge transfer resistance of the metal surface, and the equivalent circuit is found to fit well with a constant phase element.

  5. 5.

    The results obtained from chemical and electrochemical methods are in good agreement.

  6. 6.

    The temperature effect demonstrates a physical adsorption of the active compounds of essential oil on metal surface.

  7. 7.

    The adsorption isotherm studies confirm that the active compounds of OZEO displaced three water molecules from MS surface and of the repulsive lateral interactions can exist in the adsorbed film.

  8. 8.

    SEM micrographs and the EDX analyses of the metal surface demonstrate the presence of an adsorbed film.