Introduction

Molecules of natural or organic origin exhibiting a strong affinity for metallic surfaces are the focus of research toward the development of environmentally tolerant corrosion inhibiting compounds. Among the green corrosion inhibitors are organic compounds that act by adsorption on the metal surface, such as ascorbic acid [1,2,3,4,5]. In acidic industrial environments, compounds containing heteroatoms, aldehydes and some alkaloids such as papaverine and nicotine are used as inhibitors. Inorganic chemical compounds such as chromate, nitrates and phosphates are the most common corrosion inhibitors for metallic alloys in aqueous systems; however, of recent these compounds have been facing more stringent regulations on their use by the US Environmental Protection Agency and other governing agencies worldwide due to their adverse environmental and health effects. In view concerns, development and use of corrosion inhibitors based on low molecular weight compounds of organic origin have proven to be successful carbon steels, but most tend to be efficient inhibitors at relatively high concentrations. Previous research has shown Rosmarinus officinalis to be very promising in the development and use of safe compounds for corrosion inhibition. The main chemical components of rosemary include borneol, bornyl acetate, camphor, cineole, camphene, catechin, alpha-pinene and high amounts of hydrocarbons [6]. It is believed that the catechin fraction present in the rosemary extracts contributes to the inhibitive properties that act upon the alloy. Rosmarinus officinalis was evaluated to be an effective corrosion inhibitor on Al + 2.5 Mg alloy in 3% NaCl solution [7]. The inhibition properties of R. officinalis were studied by Yee [8] on aluminum, copper, iron and zinc in sodium chloride and sodium sulfate solutions. Cathodic inhibition was observed when the metal was polarized in sodium chloride solution. Ouariachi et al. [9] reported on the inhibitory action of R. officinalis on C38 steel in 0.5 M H2SO4. Velázquez-González et al. [10] studied the corrosion inhibition effect of R. officinalis on carbon steel using extracts of acetone, hexane and methanol. The compounds performed effectively with high inhibition efficiency obtained from the hexane extract in the presence of flavonoids. Other researches by various authors confirm the excellent inhibition effect of R. officinalis on metallic alloys [11,12,13,14,15]. Vanillin derivative has been proven to be good inhibitor against metallic corrosion especially in combination with other compounds [16,17,18,19,20,21]. This research aims to study the synergistic effect of R. officinalis and 5-bromovanillin on the corrosion inhibition of 1018CS in 1 M HCl and H2SO4 solution.

Experimental Methods

Materials and Preparation

1018 carbon steel (1018CS) with a nominal composition as shown in Table 1 was the steel sample for the corrosion test. The steel in cylindrical form with dimensions of 1 cm length and 1 cm diameter after machining was abraded with silicon carbide papers (80, 320, 600, 800 and 1000 grits) before washing with distilled water and propanone, and kept in a desiccator for coupon analysis and potentiodynamic polarization test according to ASTM G1-03 (2011) [22]. 5-bromovanillin obtained from BOC Sciences, USA, and R. officinalis obtained from NOW Foods, USA, are the organic compounds to be assessed for their combined corrosion inhibiting properties. Rosmarinus officinalis is a golden, translucent, oily liquid with major compositions such as p-cymene (44.02%), linalool (20.5%), gamma-terpinene (16.62%), thymol (1.81%), beta-pinene (3.61%), alpha-pinene (2.83%) and eucalyptol (2.64%). It is also composed of monoterpenic hydrocarbons, oxygenated monoterpenes and sesquiterpene hydrocarbons [23]. It has a molar mass of 691.14 g/mol. 5-bromovanillin is a phenolic aldehyde organic compound with the molecular formula of C8H8O3 and molar mass of 152.15 g/mol. It is the primary component of the extract of the vanilla bean and is used as a flavoring agent in foods, beverages and pharmaceuticals. Their combined admixture (ROSV) was prepared in molar concentrations of 2.96 × 10−3, 5.93 × 10−2, 8.89 × 10−2, 1.19 × 10−2, 1.48 × 10−2, 1.78 × 1−2, in 200 mL of 1 M HCl and H2SO4 solutions, prepared from analar grade of HCl acid (37%) and H2SO4 acid (98%) with deionized water.

Table 1 Nominal (wt.%) composition of 1018CS

Potentiodynamic Polarization Test

Polarization measurements were carried out at 30 °C using a three electrode system and glass cell containing 200 mL of the corrosive test solution at predetermined concentrations of ROSV with Digi-Ivy 2311 electrochemical workstation. Cylindrical 1018CS electrodes mounted in acrylic resin with an exposed surface area of 0.79 cm2 were prepared according to ASTM G59-97 (2014) [24]. Polarization plots were obtained at a scan rate of 0.0015 V/s between potentials of −1.25 and +0.5 V according to ASTM G102-89 (2015) [25]. Platinum rod was used as the counter electrode and silver chloride electrode (Ag/AgCl) as the reference electrode. Corrosion current density (J cr, A/cm2) and corrosion potential (E cr, V) values were obtained using the Tafel extrapolation method whereby the estimated corrosion current, I cr, was obtained from the intercept of the two linear segments of the Tafel slope from the cathodic and anodic polarization plots [26, 27]. The corrosion rate, C R (mm/year), was calculated from the mathematical relationship given below,

$$C_{\text{R}} = \frac{{0.00327 \times J_{\text{cr}} \times E_{\text{qv}} }}{d}$$
(1)

where E qv is the sample equivalent weight (g), 0.00327 is a constant for corrosion rate calculation [28] and d is the density (g/cm3). The inhibition efficiency (η, %) was determined from the corrosion rate values according to Eq 2,

$$\eta_{2} = \, 1 \, {-}\left[ {\frac{{C_{{{\text{R}}2}} }}{{C_{{{\text{R}}1}} }}} \right] \times 100$$
(2)

C R1 and C R2 are the corrosion rates without and with ROSV compound. Polarization resistance, R p (Ω), was calculated from Eq 3 given below,

$$R_{\text{p}} = \, 2.303\frac{{B_{\text{a}} B_{\text{c}} }}{{B_{\text{a}} + B_{\text{c}} }}\left( {\frac{1}{{I_{\text{cr}} }}} \right)$$
(3)

where B a is the anodic Tafel slope and B c is the cathodic Tafel slope, both are measured as (V/dec).

ATF-FTIR Spectroscopy and Optical Microscopy Characterization

ROSV/1 M HCl and H2SO4 solution (before and after the corrosion test) was exposed to specific range of infrared ray beams from Bruker Alpha FTIR spectrometer between wavelengths of 375 and 7500 cm−1 and resolution of 0.9 cm−1. The transmittance and reflectance of the infrared beams at various frequencies were decoded and transformed into an IR absorption plot consisting of spectra peaks. The spectral pattern was evaluated and equated to the theoretical IR absorption table to identify the functional groups involved in the corrosion inhibition reactions. Images of corroded and inhibited 1018CS surface morphology from optical microscopy were analyzed after weight loss measurement with Omax trinocular through the aid of ToupCam analytical software.

Weight Loss Measurement

Measured 1018CS steel coupons separately immersed in 200 mL of the dilute acid test solution for 240 h at 30°C were weighed every 24 h according to ASTM G31-72 (2004) [29]. Corrosion rate (C R) is determined as follows,

$$C_{\text{R}} = \left[ {\frac{87.6\omega }{DAt}} \right]$$
(4)

ω is the weight loss (g), D is the density (g/cm3), A is the total surface area of the coupon (cm2) and 87.6 is a constant for corrosion rate determination. t is the time (h). Inhibition efficiency (η) was determined from the mathematical relationship,

$$\eta = \left[ {\frac{{\omega_{1} - \omega_{2} }}{{\omega_{1} }}} \right] \times 100$$
(5)

ω 1 and ω 2 are the weight loss of each steel coupon at specific ROSV concentrations. Surface coverage was determined from the relationship [30, 31]:

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

where θ is the degree of ROSV compound, adsorbed per gram of the steel samples.

Results and Discussion

Potentiodynamic Polarization Studies

The anodic/cathodic polarization curves for the corrosion inhibition of ROSV on 1018CS in HCl and H2SO4 acid solution are shown in Figs. 1 and 2. Results of the polarization curves are presented in Table 2. Variation in corrosion rate for sample A at 0% ROSV and samples B–G (0.25–1.5% ROSV) in both acid solutions is due to the adsorption of ROSV compound on the steel’s surface. The current peaks of the polarization curves in HCl solution (Fig. 1) decreased significantly with increase in ROSV concentration. Precipitation of ROSV molecules shifts the polarization curves in the anodic direction, as confirmed from the corrosion potential values in Table 2. Changes in ROSV concentration has no significant influence on the cathodic Tafel slopes at all concentrations evaluated and hence on the hydrogen evolution and oxygen reduction reactions. The anodic Tafel value at 0% ROSV is due to the presence of surface oxides resulting from the slow electron transfer step [32, 33]. There is an increase in Tafel slope values after 0% ROSV, and it is due to changes in the electrode substrate, rate controlling step and influence of potential controlled conditions (i.e., high coverage by intermediates). The values show that addition of ROSV altered the oxidation electrochemical reactions, confirming the mechanism of inhibition to be probably as a result of surface coverage whereby ROSV inhibits the electrolytic transport and diffusion of corrosive anions (Cl ions) to the carbon steel at the metal solution interface. This is further proven from the inhibition efficiency, whose values increased in proportion to ROSV concentration. At 0.25% ROSV, the inhibition efficiency is 52.45%, the value increased to 85.27% at 0.75% ROSV, after which the values remained above 90% till 1.5% ROSV.

Fig. 1
figure 1

Potentiodynamic polarization curves for 1018CS in (0–1.5% ROSV) 1 M HCl

Fig. 2
figure 2

Potentiodynamic polarization curves for 1018CS in (0–1.5% ROSV) 1 M HCl

Table 2 Potentiodynamic polarization data for 1018CS in 1 M HCl and H2SO4 (0–1.5% ROSV) acid solution

1018CS at 0–0.75% ROSV (Fig. 2) was subject to severe anodic dissolution in H2SO4 solution. The corrosion rate significantly improved after 0.75% ROSV, but changes in corrosion rate values were marginal at 60% average till 1.5% ROSV and significantly lower than values obtained in HCl solution due to the high current density at the intercept between the anodic and cathodic polarization curves. The corrosion potential shifts in the cathodic direction of the potential domain after 0% ROSV due to release of excess electrons, thus slowing the anodic reaction and speeding up the cathodic process before shifting in the anodic direction from 0.75 to 1.5% ROSV. This observation is presented as a wide scatter in the polarization curve due to ROSV addition. The lower anodic Tafel slope values in H2SO4 in comparison with HCl show that 1018CS electrode is a strong electrocatalyst at high overpotentials in H2SO4. ROSV inhibition characteristics in the acid solution are probably through surface coverage and modification of the corrosive environment whereby reduction reactions are significantly influenced [34]. The differences in coverage of the steel surface by the adsorbed ROSV species in both acids is explained by the Langmuir, Frumkin, Freundlich and Temkin adsorption isotherms and is responsible for the corrosion rate values of 1018CS. The maximum change in corrosion potential of 1018CS in HCl solution is 42 mV, while in H2SO4 the change in corrosion potential is 52 mV; thus, ROSV is a mixed type inhibitor in both acid media.

ATF-FTIR Spectroscopy Analysis

Identification of the functional groups active in ROSV inhibition of 1018CS in HCl and H2SO4 acid solution was performed through ATF-FTIR spectroscopy and matched with the theoretical IR table [35, 36]. The IR spectra of 1 M HCl/ROSV and H2SO4/ROSV solution before and after the corrosion tests are shown in Figs. 3 and 4. The spectra diagram (Fig. 3) for ROSV in HCl before corrosion test shows peak configurations at some wavelength with intensities of 3350.43, 2921.81, 2855.86, 2169.15, 1634.86 and 1458.03 cm−1 which refers to N–H stretch (amines and amides), O–H stretch, H–bonded (alcohols and phenols), C–H stretch (alkanes), –C≡C– stretch (alkynes), N–H bend (amine), C–C stretch in-ring (aromatics) and N–O asymmetric stretch (nitro compounds). After the corrosion test, only the spectra peaks of 3331.26 and 1631.37 cm−1 remained as shown in the diagram due to chemisorption adsorption of the functional groups at other peaks. This is responsible for the strong electrochemical action of ROSV in HCl due to complete hydrolysis and ionization of the organic compound which formed a protective film on the carbon steel surface.

Fig. 3
figure 3

IR spectra of ROSV compound in 1 M HCl solution before and after 1018CS corrosion test

Fig. 4
figure 4

IR spectra of ROSV compound in 1 M H2SO4 solution before and after 1018CS corrosion test

The electrochemical action of ROSV in H2SO4 (Fig. 4) contrasts its behavior in HCl solution. The spectra peaks before corrosion test consist of 3353, 2954.05–2852.30, 1460.74, 1376.96, 1168.40, 1052.35 and 721 cm−1 which corresponds to O–H stretch, H–bonded (alcohols, phenols), N–H stretch (amines and amides), O–H stretch (carboxylic acids), C–H stretch (alkanes), C–C stretch in–ring (aromatics), C–H bend (alkanes), C–H rock (alkanes), C–O stretch (esters, ethers), C–H wag (alkyl halides) and C–N stretch (aliphatic amines). Studying the peaks after corrosion, there is no significant change in the wave number of the peaks but only a decrease in the peak intensity signifying limited adsorption of the functional groups of ROSV on 1018CS in H2SO4. This is probably responsible for the comparatively lower corrosion rate and inhibition efficiency values. While most of the spectra peaks for ROSV in HCl disappeared due to chemisorption as earlier explained, the spectra peaks in H2SO4. In HCl, several points of inhibitor/metal interaction can be deduced from the spectra peaks.

Weight Loss Measurement and Optical Microscopy Analysis

Data obtained for weight loss (ω), corrosion rate (C R) and ROSV inhibition efficiency (ɲ) in 1 M HCl and H2SO4 acid media at 240 h are presented in Table 3. Figures 5a, b and 6a, b show the plot of 1018CS corrosion rate and ROSV inhibition efficiency versus exposure time in the acid solutions. Macroimages of the 1018CS before corrosion and after corrosion with and without ROSV effect are shown in Fig. 7a–c. Microanalytical images of 1018CS morphology before corrosion and after corrosion, without ROSV and in the presence of ROSV are shown in Figs. 8a, b, 9a, b, 10a, b, 11a, b, and 12a, b at mag. ×40 and ×100. At 0% ROSV (Figs. 5a and 6a), 1018CS undergo severe anodic dissolution in HCl and H2SO4 acids due to the presence and electrochemical action of SO4 2− and Cl ions resulting in the formation of porous oxides on the steel surface (Figs. 9a and 10b). Continuous deterioration and oxide formation lead to the formation of pores and channels within the oxide layer which further accelerates the corrosion of the steel (Fig. 7c) [37]. The corrosion rate at 0% ROSV in H2SO4 declined progressively with time until 144 h; wherewith, it remained generally constant till 240 h while the corrosion rate in HCl solution alternated at high values throughout the exposure hours. Values for H2SO4 are significantly higher than in HCl due to the ability of H2SO4 to completely ionize in the solution releasing two protons which reacts strongly with 1018CS surface compared to HCl which releases one proton. Transition from active deterioration of the steel surface to the passive state in the presence of ROSV (Fig. 12a and b) was gradual in H2SO4 due to inability of ROSV adsorption to sufficiently inhibit 1018CS corrosion until 1–1.25% ROSV (Fig. 6b); wherewith, the inhibition efficiency stabilized at an average value of 62.4%. In HCl, adsorption of ROSV through electrostatic attraction with the ionized valence atoms on the carbon steel surface results in effective corrosion inhibition from 0.25 to 1.5% ROSV (Fig. 6a). More ROSV molecules are adsorbed on the steel surface at higher concentrations, leading to greater surface coverage [38]. This is due to the electrochemical reactions of ROSV within HCl solution which results in the formation of a protective, adherent film that sufficiently hindered the access of Cl ions to the metal surface. Its molecules interact with the redox cells, retarding the electrochemical process. ROSV protonates more strongly in HCl than H2SO4 releasing more electrons from its molecules; this phenomenon increases the reactivity of the ROSV enabling strong adsorption with the steel surface.

Table 3 Data from weight loss analysis at 240 h for 1018CS in 1 M HCl and H2SO4 solution (0–1.5% ROSV)
Fig. 5
figure 5

Plot of (a) 1018CS corrosion rate vs. exposure time in HCl (b) 1018CS corrosion rate vs. exposure time in H2SO4

Fig. 6
figure 6

ROSV inhibition efficiency vs. exposure time at 0–1.5% ROSV concentration (a) in 1 M HCl, (b) in 1 M H2SO4

Fig. 7
figure 7

Macroimages of 1018CS (a) before corrosion, (b) after corrosion without ROSV and (c) after corrosion with ROSV

Fig. 8
figure 8

Microanalytical image of 1018CS before corrosion (a) mag. ×40, (b) mag. ×100

Fig. 9
figure 9

Microanalytical image of 1018CS after corrosion in HCl without ROSV (a) mag. ×40, (b) mag. ×100

Fig. 10
figure 10

Microanalytical image of 1018CS after corrosion in H2SO4 without ROSV (a) mag. ×40, (b) mag. ×100

Fig. 11
figure 11

Microanalytical image of 1018CS after corrosion in HCl with ROSV (a) mag. ×40, (b) mag. ×100

Fig. 12
figure 12

Microanalytical image of 1018CS after corrosion in H2SO4 with ROSV (a) mag. ×40, (b) mag. ×100

Adsorption Isotherm

The corrosion inhibition and adsorption of ROSV compounds over 1018CS surface in the acid media is responsible for the reaction rate of the steel as a result of the strong interaction between the steel surface and the pi-electrons within the heteroatoms of the inhibiting compound [39]. Organic adsorption from aqueous solution is relatively complex and depends on the property of the interfacial region between the steel and acid solution. Due to the solvated nature of the interfacial region, the electrochemical adsorption can be viewed as a replacement reaction of water molecules in the adsorbed layer by ROSV molecules within the bulk acid solution [40, 41]. A number of adsorption models have been previously applied to assess experimental results [42]; however, in this research Langmuir, Freundlich and Temkin adsorption isotherm produced the best fit as shown in Figs. 13, 14, 15, 16, 17, and 18 according to the following equations,

$$\theta = \left[ {\frac{{K_{\text{ads}} C_{\text{ROSV}} }}{{1 + K_{\text{ads}} C_{\text{ROSV}} }}} \right]$$
(7)

where θ is the degree of ROSV surface coverage on 1018CS, C ROSV is ROSV concentration and K ads is the equilibrium constant of the adsorption mechanism. The plots of \(\frac{{C_{\text{ROSV}} }}{\theta }\) versus C ROSV for ROSV adsorption in HCl showed linearity in agreement with Langmuir adsorption isotherm (Fig. 13) with a correlation coefficient of 0.9999. In H2SO4, the plots (Fig. 14) deviated from ideal Langmuir model with a correlation coefficient of 0.3561. Langmuir isotherm suggests single layer adsorption, adsorption occurs at definite number of reaction sites, all adsorptions are identical and equivalent and no lateral interaction between the adsorbed molecules [43].

$$\theta = KC^{n}$$
(8)
$$\log \theta = \, n\log C + \log K_{\text{ads}}$$
(9)

where n is a constant depending on the characteristics of the adsorbed molecule and K ads is the adsorption–desorption equilibrium constant denoting the strength of interaction in the adsorbed layer. The Freundlich isotherm states that adsorbed molecules interact and influence further adsorption through repulsion or attraction of molecules. The amount adsorbed is the total of adsorption on all sites, with the more reactive sites being first occupied, until adsorption energy is exponentially decreased upon the completion of adsorption process [44, 45]. The correlation coefficient for Freundlich isotherm plot (Fig. 15) for ROSV adsorption in HCl is 0.7549, while in H2SO4 (Fig. 16) it is 0.7668.

$${\text{qe }} = {\text{ B}}\;{ \ln }\left( {{\text{A}} + {\text{Ce}}} \right)$$
(10)
$${\text{Where B }} = {{\text{RT}} \mathord{\left/ {\vphantom {{\text{RT}} {\text{b}}}} \right. \kern-0pt} {\text{b}}}$$
(11)

where A is Temkin isotherm constant (L/g), b is the Temkin constant related to heat of adsorption, T is the temperature (K), R is the gas constant (8.314, J/mol K) and Ce is the concentration of adsorbate. B is the Temkin constant related to heat of sorption (J/mol). The Temkin isotherm assumes the heat of adsorption decreases linearly with increase in surface coverage. It is characterized by a uniform distribution of binding energies, taking into account the indirect interactions of adsorbate–adsorbate molecules on adsorption isotherm [46]. The Temkin isotherm plot for ROSV in HCl (Fig. 17) had a correlation coefficient of 0.9380, while in H2SO4 it is 0.9359 (Fig. 18).

Fig. 13
figure 13

Langmuir plot of \(\frac{C}{\theta }\) vs. ROSV concentration in 1 M HCl

Fig. 14
figure 14

Langmuir plot of \(\frac{C}{\theta }\) vs. ROSV concentration in 1 M H2SO4

Fig. 15
figure 15

Freundlich isotherm plot of ROSV surface coverage (θ) vs. ROSV concentration in HCl solution

Fig. 16
figure 16

Freundlich isotherm plot of ROSV surface coverage (θ) vs. ROSV concentration in H2SO4 solution

Fig. 17
figure 17

Temkin isotherm plot of ROSV surface coverage (θ) vs. log ROSV concentration in HCl

Fig. 18
figure 18

Temkin isotherm plot of ROSV surface coverage (θ) vs. log ROSV concentration in H2SO4

Thermodynamics of the Corrosion Process

The strength of adsorption of ROSV on 1018CS can be determined from the thermodynamics of the inhibition mechanism. Calculated results of Gibbs free energy (\(\Delta G_{\text{ads}}^{o}\)) for the adsorption process shown in Tables 4 and 5 were evaluated from the relationship [47].

$$\Delta G_{\text{ads}} = \, - \, 2.303RT\log \left[ {55.5K_{\text{ads}} } \right]$$
(12)

where 55.5 is the molar concentration of water in the solution, R is the universal gas constant, T is the absolute temperature and K ads is the equilibrium constant of adsorption. K ads is related to surface coverage (θ) from the Langmuir equation.

Table 4 Data for Gibbs free energy (\(\Delta G_{\text{ads}}^{o}\)), surface coverage (θ) and equilibrium constant of adsorption (K ads) for ROSV adsorption on 1018CS in HCl
Table 5 Data for Gibbs free energy (\(\Delta G_{\text{ads}}^{o}\)), surface coverage (θ) and equilibrium constant of adsorption (K ads) for ROSV adsorption on 1018CS in H2SO4

The presence of flaws, impurities, inclusions, etc., on the steel surface significantly affect the values of \(\Delta G_{\text{ads}}^{o}\) with changes in surface coverage value of ROSV [48]. The amount of cations passed into the solution is related to the extent of coverage of ROSV inhibitor over the 1018CS surface. The negative values of \(\Delta G_{\text{ads}}^{o}\) show the spontaneity and stability of the adsorption mechanism. The highest and lowest values of \(\Delta G_{\text{ads}}^{o}\) in HCl are value obtained is −44.75 KJ/mol at 0.25% ROSV and −44.05 KJ/mol at 1.25% ROSV. The values align with chemisorption adsorption mechanism involving charge sharing or transfer between the inhibitor cations and the valence electrons of the metal forming a coordinate covalent bond [49, 50]. In H2SO4, the values are −39.31 KJ/mol at 0.5% ROSV and −36.77 KJ/mol at 0.25% ROSV. These values in H2SO4 are consistent with physiochemical adsorption mechanism.

Conclusion

ROSV effectively inhibited the corrosion and surface deterioration of 1018 carbon steel in dilute HCl acid solution but marginally inhibited in H2SO4. The organic compound chemisorbed onto the carbon steel in HCl, passivating it through identified functional groups in the compound from ATF-FTIR spectroscopy analysis. Physiochemical interaction was observed in H2SO4 solution resulting in significant surface deterioration of the carbon steel. The comparatively lower anodic Tafel slope values in H2SO4 show that 1018CS electrode is a strong electrocatalyst at high overpotentials. ROSV had no direct influence on the cathodic Tafel slopes in both acids at all concentrations. Changes in the anodic Tafel slope values in HCl were due to changes in the electrode substrate, rate controlling step and influence of potential controlled conditions due to surface coverage whereby ROSV inhibits the electrolytic transport and diffusion of corrosive anions. In both acids, inhibition efficiency was proportional to inhibitor concentration and the inhibition property of the compound was determined to be mixed type inhibitor.