1 Introduction

Corrosion problems are part of the environment protection, which occupies nowadays a primordial place in the field of industrial chemistry. Owing to their excellent properties, copper and its alloys (brass, bronze, etc.) are amply used in various industrial fields. For instance, they are used in petrochemical heat exchangers, cooling water systems, nautical constructions, industrial equipment, and building construction. Despite its high resistance, this type of metal is corroded at a rapid pace in contact with solutions containing chloride ions [1]. This dilemma prompted scientific researchers to explore green potential solutions to protect copper and its alloys in a 3% NaCl solution (e.g., seawater), by focusing their research on natural anti-corrosion inhibitors easily available in nature and does not contain heavy metals [2, 3]. The trend towards natural corrosion inhibitors, especially the essential oils has confirmed their efficiency thanks to their simple and easy mode of extraction to obtain effective chemical compounds using less energy and effort. There are several studies that have come to light in this field in the past few years [4, 5]. In this context, the molecules which have a corrosion inhibiting power in these oils can form a protective layer covering the metal surface by absorption through their active sites via chemical bonding (chemisorption) and/or electrostatic interactions (physisorption) [6]. Corrosion inhibiting characteristics of these types of compounds are due to the ability of heteroatoms (oxygen) and π aromatic cycle or double bonds to share electrons with an unoccupied orbital of the metal surface leading to the formation of a protective film covering the metal surface [7, 8]. Hence, the idea of this work tends to discover efficient of natural inhibitor compounds through essential oils against corrosion of brass in a saline medium. Thymbra capitata (L.) Cav. belongs to the Lamiaceae family, is an aromatic and medicinal plant with many uses. In the Mediterranean areas, it is found in several countries [9]. A number of studies in different fields have focused on the chemical compositions of the pure essential oil (EO) and the EO extracted from the hydrosol (HY) of T. capitata (L.) Cav. in Morocco [10], Italy [11], Greece [12], Portugal [13] and Spain [14]. Most of these studies have proven that carvacrol is presented in high percentage in its essential oils. This compound is an eco-friendly element [15] with antimicrobial and antioxidant activities [16]. In this article, as a first step, we focused on identifying the proportion of carvacrol in EO and HY of T. capitata (L.) Cav. In the second step, we investigate the corrosion inhibition effect of the carvacrol and the other minor compounds in these green extracts to protect the study metal in the corrosion medium. Finally, this study was supplemented by using quantum chemical studies based on DFT calculations to identify the inhibition process of green compounds (major or minor) from the EO and HY with the analysis of their electronic distribution [6, 17]. In addition, in order to achieve the goal of this part, we also use dynamic simulations based on the Monte Carlo (MC) method to clarify the adsorption of the inhibitory molecules on the metal surface to complete the quantum chemical studies.

2 Materials and Methods

2.1 Plant Material and Study Site

The aerial part (stems, leaves and flowers) of T. capitata (L.) Cav. were harvested at flowering period during the month of May 2017 from natural population (Fig. 1) located in Tangier-Tetouan-Al Hoceima region, northern Morocco. As shown in Table 1, the coordinates and climatic characteristics of the sampling site. MAT: mean annual temperature; MAWM: mean annual temperature of the warmest month; MACM: mean annual temperature of the coldest month; MAP: mean annual precipitation; AI (unitless): aridity index, calculated as PET (mm/year)/MAP with PET: potential evapotranspiration. The study site is characterized with dry and sub-humid climate (UNEP, 1997) (Table 1; Fig. 1). MAP, MAT, MACM and MAWM were extracted from WorldClim database (version 1.4) [18]. Aridity index (AI) was extracted from the CGIAR Global Aridity database [19].

Fig. 1
figure 1

Geographical coordinates of Thymbra capitata (L.) Cav. in the study area

Table 1 The coordinates and climatic characteristics of Thymbra capitata (L.) Cav. in the study area

The species identification was done by Pr. Mohamed Kadiri (Botanist in Biology Department, Faculty of Sciences, Tetouan, Morocco) based on the “Flore Pratique du Maroc” [20]. The collected aerial parts of T. capitata (L.) Cav. were dried at room temperature.

2.2 Extraction of Essential Oil and Its Corresponding Hydrosol

The EO was extracted from the aerial parts of T. capitata (L.) Cav. (1 kg) by hydrodistillation for 3 h until total recovery of oil. The recovered water droplets are stored in order to obtain hydrosol. During the process of EO extraction, heavy steam is produced consisting of an organic phase. It is separated from the aromatic water through decantation. This water contains a great amount of aromatic substances in a solubilized form. This oil is extracted by liquid–liquid extraction with an organic solvent [21]. The use of the rotary evaporator allows removal of the solvent and thus obtaining the dissolved oil in the HY. The extracted oil and the dissolved one in the hydrosol obtained ware dried over anhydrous sodium sulfate and stored in the refrigerator in a brown glass bottle sealed at 4 °C in the shade.

2.3 Chemical Analysis and Identification of Components

The identification of the chemical compounds of EO and HY extract were investigated by GC–MS. The column used is 60 m × 0.32 mm TR-5 with a film thickness of 0.25 μm, gas helium was used as carrier (1 mL/min). The column temperature was programmed from 40 to 280 °C with gradient of 3 °C/min, the injector temperature was set at 240 °C and the volume of the injected sample was 1 µL of diluted oil in hexane. The constituents of EO and HY were detected based on their Kovats retention indices and computer matching with (NIST-MS), as well as by comparison of commercial mass spectral reported in literature [22].

2.4 Metal and Solution

The brass electrode was prepared from a 2 mm thick brass sheet with composition of (wt%) 58.36% Cu, 37.43% Zn, 3.57% Pb, and 0.33% Fe. The remainder being trace amounts of Sn, Ni, Cd, and Ag were used. The brass specimen used had a disc form with a surface area of 1.2 cm2. Before using the working electrode, it was polished by emery papers with increasing grades (400, 600, 800, and 1200 grit size) under water flow, washed with acetone, and dried prior to the experiment. The electrolyte used was prepared by dilution of commercial NaCl with bi-distilled water. The concentration range of the two studied extracts was 0.5–2 g/L. This concentration range was chosen up on the maximum solubility of EO and HY.

2.5 Electrochemical Measurements

Electrochemical measurements were studied using three electrodes [the working electrode was a brass disc, a saturated calomel electrode (SCE) as reference and a platinum electrode (Pt) as an auxiliary electrode]. Corrosion cell (100 mL) connected to Voltalab PGZ301 driven by a computer, programmed with the (Volta master 4) software. Measurements were performed in a 3% NaCl solution without and with different concentrations of the tested two studied extracts. These analyzes were performed after 1 h of immersion time with stirring. The potential range was from − 700 to 200 mV/SCE under corresponding potentiodynamic conditions at a scan rate of 0.5 mV/s. This speed allows as close as possible to the conditions of the stationary state of the studied system. Concerning the impedance spectroscopy (EIS) measurements, Nyquist and Bode plots were plotted within a frequency range between 100 kHz and 10 MHz, with 10 mV in amplitude of the superimposed AC signal.

2.6 Surface Examination

The electrode surface was analyzed after the potentiodynamic polarization tests after its immersion with and without the optimum concentration (2 g/L) of the two studied extracts (EO and HY) in 3% NaCl solution. The surface morphology of brass sample was detected by scanning electron microscopy (SEM) coupled with an energy-dispersive X-ray analysis (EDX) using SH-4000M model.

2.7 Quantum Chemical Calculations

In order to provide information on the atomic level as well as the identification of organic compounds which have potential inhibitory action on brass in 3% NaCl, we performed the ab-initio calculations based on density functional theory (DFT) method at B3LYP with the 6-31G(d,p) basis sets [7, 23]. The DFT calculations were carried out using Gaussian 09 software [24]. The neutral forms of all studied molecules structures in an aqueous solution achieved by the polarizable continuum model (PCM) using the integral equation formalism variant (IEFPCM), which is the theory of self-consistent reaction field, SCRF [25, 26]. Based on theoretical study, we can compare the effectiveness of the corrosion inhibition of potential inhibitory compounds using electronic structure parameters. These parameters include; the highest occupied molecular orbital (HOMO) and the lowest unoccupied molecular orbital (LUMO); the energies of these frontier orbitals (i.e., EHOMO, ELUMO); the frontier orbital energy gap (ΔEgap = ELUMO − EHOMO), the ionization potential (I), the electron affinity (A), the electronegativity (χ), the molecular dipole moment (μ), the hardness (η), the softness (σ), the electrophilicity index (ω) and the nucleophilicity (ε), and finally the fraction of electron transferred (ΔN). These parameters are given by Eqs. 18 [7, 27]:

$$I = - E_{{{\text{HOMO}}}} ,$$
(1)
$$A = - E_{{{\text{LUMO}}}} ,$$
(2)
$$X = \frac{(I + A)}{2},$$
(3)
$$\eta = \frac{(I - A)}{2},$$
(4)
$$\sigma = \frac{1}{\eta },$$
(5)
$$\omega = \frac{{X^{2} }}{2\eta },$$
(6)
$$\varepsilon = \frac{1}{\omega },$$
(7)
$$\Delta N_{{{\text{Cu}}}} = \frac{{X_{{{\text{Cu}}}} - X_{{{\text{inh}}}} }}{{2(\eta_{{{\text{Cu}}}} + \eta_{{{\text{inh}}}} )}}.$$
(8)

To understand the ΔN between brass and inhibitors, we applied this study to copper as the main component of this alloy (brass). The fraction of electrons transferred was applied to as previously used [4, 17], considering theoretical values, XCu = 4.48 eV and nCu = 0 eV [28].

2.8 Molecular Dynamics Simulation

The Metropolis MC simulation type of molecular dynamics (MD) implemented by using the BIOVIA Material Studio 8.0 software from Accelrys, Inc. This method was used to evaluate the nature of the adsorption energy interactions between the inhibitors, in their neutral forms, and the metal surface. Since copper is the main component of the studied metal (brass), the simulated adsorption system was performed on the Cu (111) surface. This selected crystal surface is the most stable as reported in the literature [29, 30]. The condensed phase optimized molecular potentials for atomistic simulation studies (COMPASS) force field at 298 K was used to optimize the structures of all components of all the system (metal surface/inhibitor) [31]. The simulation was carried out with a supercell of size (4 × 4) and a vacuum slab with 30 Å thickness was made above the Cu (111) plane, that created on the Cu (111) surface in a simulation box (20.44 Å × 20.44 Å × 38.34 Å) with periodic boundary conditions to model a representative part of the interface devoid of any arbitrary boundary effect [32]. The Ewald and group method was applied for the electrostatic interaction, and atom-based method for the van der Waals interaction. The interaction energy between Cu (111) and the inhibitors is calculated in the simulation system based on the following Eqs. (9) and (10) [33]:

$$E_{{{\text{Interaction}}}} = E_{{{\text{Total}}}} - (E_{{{\text{Surface}}}} + E_{{{\text{Inhibitor}}}} ),$$
(9)
$$E_{{{\text{binding}}}} = - E_{{{\text{Interaction}}}} .$$
(10)

ETotal is energy of the metal crystal together with the adsorbed inhibitor molecule, ESurface is energy of the metal crystal, EInhibitor is energy of the free inhibitor molecular, Ebinding is the binding energy of the inhibitor molecule is the negative value of the interaction energy.

3 Results and Discussion

3.1 Chemical Composition of EO and HY from Thymbra capitata (L.) Cav.

The analysis of the essential oil (EO) of T. capitata (L.) Cav. by GC–MS identified 15 compounds representing 99.87% of the total detected compounds in the oil (Table 2). Figure 2 shows the typical GC–MS chromatogram of the chemical analysis of EO. The results found that carvacrol is the major component with (85.96%). The other minor components of the oil were p-cymene (4.23%), γ-terpinene (2.81%) and α-humulene (2.88%). These results are consistent with similar findings by group of authors in different geographic regions: Morocco [10], Spain [14], Italy [11] and Tunisia [34] who reported that the carvacrol being the main component of EO of the same species.

Table 2 Chemical composition (%) of EO and HY from Thymbra capitata (L.) Cav.
Fig. 2
figure 2

Chromatogram profile of EO and HY from Thymbra capitata (L.) Cav. obtained by GC–MS

Using the same approach, the GC–MS analysis of the chemical composition of the essential oil extracted from the HY of T. capitata (L.) Cav. is presented in Table 2 and Fig. 1. This oil extracted from hydrosol is characterized by a sharp increase in the percentage of carvacrol, which varies from 85.96% in the essential oil to 98.04% in the hydrosol. Further, we note a complete disappearance of the hydrocarbon monoterpenes in the hydrosol, in particular p-cymene, γ-terpinene, and α-humulene. Meanwhile, we note the appearance of eugenol (phenolic compound) with a percentage of 0.50% and caryophyllene oxide (sesquiterpene) with a percentage of 1.46%. The composition of HY has demonstrated trends similar to that found by Tabti et al. [35] which concludes that the oil extracted from the HY of the same species consists mainly of carvacrol (95.1%), while it is almost devoid of all hydrocarbon compounds. This can be explained from the literature that hydrosol is permanently enriched in oxygenated compounds with high hydrophilic nature. While the hydrocarbons are found more often as traces or absent [36, 37]. This observation is consistent with other researches that have confirmed that these extracts of the same species contain a high percentage of carvacrol [12, 14]. As shown in Fig. 3 the mass spectrum of major chemical compound (carvacrol) in EO and HY, with retention time (RT) = 16.92.

Fig. 3
figure 3

Mass spectrum and chemical structure of major chemical compound (carvacrol) in EO and HY from Thymbra capitata (L.) Cav

3.2 Yields of Essential Oil and Its Corresponding Hydrosol of Thymbra capitata (L.) Cav.

Table 3 shows that the yield difference between the EO (1.33%) and that extracted from the corresponding HY (0.12%), is mainly due to the fact that the essential oil is very rich in many compounds (monoterpenes, sesquiterpenes) compared to HY. In addition, we note that the yield of EO in our study is less compared to the results reported by Bounatirou et al. (2.6%) [38] and very important in comparison to the results found by Bakhy et al. (0.9%) [39], while the HY yield appears very important in comparison to the results reported by Tabti et al. (0.0016%) [35]. In general, the difference in relative yields can be attributed probably to the distillation apparatus used, the period of harvest, and to the geoclimatic factors, as well as other factors [40, 41].

Table 3 Relative yields to the EO and HY from Thymbra capitata (L.) Cav.

3.3 Electrochemical Measurements

3.3.1 Polarization Curves

The polarization curves of brass in absence and presence of various concentrations of the EO and its corresponding HY of T. capitata (L.) Cav. at 298 K in 3% NaCl are shown in Fig. 4. Examination of the polarization curves with increasing concentrations of the two studied extracts shows that the curves move directly to lower current density and the corrosion rate of brass has been decreased significantly, with a preference for HY over EO which indicates that the inhibition efficacy of HY is greater than EO. These results can be attributed to the formation of a protective film on the metal surface thanks to the inhibitory molecules which constitute the two studied extracts, making it possible to slow down the kinetics of anodic dissolution and retard the oxygen reduction in the cathodic branch of brass. we should note that the EO and HY from T. capitata (L.) Cav. are mixed inhibitors [42].

Fig. 4
figure 4

Polarization curves of brass in 3% NaCl without and with different concentrations of EO and HY at 298 K

In the same figure (Fig. 4), it is difficult to define the Tafel part in the cathode branch due to the reduction of oxygen or to identify the cathode process, which is dominated by the polarization of the concentration. Therefore, to determine the corrosion current density (Icorr), we used the methodology reported in the literature [29, 43, 44]. Thus, to overcome the issue of determining the Tafel part in a cathodic branch, we extrapolating the Tafel part of the anode region alone back to zero overvoltage which is typical in our case. Through this can be determined the Icorr. The electrochemical parameters: corrosion potential Ecorr, corrosion current density Icorr, inhibition efficiency E (%) and Tafel constant βa obtained are showing in Table 4. The corrosion inhibition efficiency is calculated using Eq. (11) [45], where Icorr(inh) and Icorr being the values of corrosion current densities with and without inhibitors, respectively.

$$E\;(\% ) = \frac{{I_{{{\text{corr}}}} - I_{{{\text{corr}}}} ({\text{inh}})}}{{I_{{{\text{corr}}}} }}\,*\,100.$$
(11)
Table 4 Electrochemical parameters and inhibition efficiency [E (%)] of brass immersed in 3% NaCl solution without and with different concentrations of EO and HY at 298 K

From Table 4, we observe that the Ecorr values were shifted to the noble direction in the presence of different concentrations of EO, but it tends to more negative potentials when using HY. The values of current density (Icorr) decreased with increasing concentration of EO and HY. Likewise, the values of (βa) found to decrease with increasing concentrations of both EO and HY. This process indicates that the inhibitory molecules, which constitute the EO and HY, have blocked the dissolution of brass by being adsorbed on the metal surface [46]. The inhibition efficiency of EO and HY reached maximum values of 82.33% and 91.11%, respectively at concentration of 2 g/L.

3.3.2 Electrochemical Impedance Spectroscopy (EIS)

The inhibition performance of EO and HY in the corrosive medium of brass was evaluated by EIS measurements. The Nyquist plots are shown in Fig. 5 in the absence and the presence of the two studied extracts. The plots show one depressed semicircle which is related to the frequency dispersion as a result of the inhomogeneous of the metal surface [47]. Furthermore, the diameter of the curves in the presence of two studied extracts is larger than that of the blank one. This indicates that the diameter of the curves of the inhibited substrate increases with the concentrations of the two studied extracts. It can also be observed that the diameter of the impedance curves loop for HY is larger than that for the EO, especially at the concentration of 2 g/L both two extracts are in the medium of corrosion, which indicates that the inhibition efficacy for the HY is greater than the EO.

Fig. 5
figure 5

Nyquist plots for brass in 3% NaCl without and with different concentrations of EO and HY at 298 K

Generally, the corrosion of copper and its alloys in sodium chloride solution is characterized by the appearance of the diffusion phenomenon at low frequency in a level of impedance diagrams. It is seen that the Nyquist plot without the two studied extracts (Fig. 5) resemble a depressed semicircle. It can be noted that it is controlled by charge transfer process rather than diffusion process. There are several reasons for this phenomenon such as surface roughness, impurities, and adsorption of corrosion products. It corresponds to what was reported by Keleş and Akça [48]. In addition, it is noted that the phenomenon of diffusion does not appear at the level of the Nyquist plots of the metal surface protected by EO and HY (Fig. 5). This indicates that the inhibitory molecules are packed with sufficiently dense packs to prevent the diffusion of oxygen to the metal surface and thus inhibit the brass corrosion process. This indicating that the charge transfer resistance becomes dominant in this process. This is consistent with results reported by Chen et al. [49] and Keleş and Akça [48]. They suggested that the diffusion process has disappeared from the Nyquist plots due to the absorption of the inhibitors on the metal surface, which limits this phenomenon, and also depends to the efficacy of inhibitor. This is moreover an indication of the effectiveness of the inhibitors used in our research which may have occurred from the appearance of diffusion at the impedance diagrams level.

Moreover, the equivalent circuit as depicted in Fig. 6 describes the metal/electrolyte interface, the experimental EIS data are simulated by EC-LAB software, this circuit has been adopted by several researches [43, 49]. As reported in Fig. 6, the equivalent circuit elements consisting of solution resistance (Rs) connected in series with two-time constants. (CPE1) represents the capacitive behavior of the double layer coupled with the charge transfer resistance (Rct). In the second detected process, (CPE2) is a constant phase element representing the capacity of the passive film at the interface between the metal and the solution, and (Rf) is the resistance of the film, the film resistance is attributed to the inhibitory molecules of the two studied extracts. In general, the CPE impedance is presented by Q benefits from the possibility of a non-ideal capacitance of (CPE) with varying n, is described by using Eq. (12) [50], with (ω) is the angular frequency and (j) is the imaginary unit. For n = 1, the Q element reduces to a capacitor with a capacitance C and, for n = 0, to a simple resistor.

$$Z_{{{\text{CPE}}}} = \frac{1}{{Q(j\omega )^{n} }}.$$
(12)
Fig. 6
figure 6

Equivalent circuit used to fit the experimental EIS data of brass in 3% NaCl in absence and presence of EO and HY

The inhibition efficiency ERp (%) is calculated using Eq. (13) [51], where Rpinh and Rp are the polarization resistance with and without inhibitors, respectively.

$$E_{{{\text{Rp}}}} \,(\% ) = \frac{{R_{{{\text{pinh}}}} - R_{{\text{p}}} }}{{R_{{{\text{pinh}}}} }}\,*\,100.$$
(13)

The parameters of the equivalent circuit fitting results and the corresponding inhibitory efficiencies (ERp %) are given in Table 5. According to Table 5, we observe that when the concentration of the two studied extracts increases the polarization resistance (Rp) increases and reaches a maximum value of 11,500 (Ω cm2) and 5300 (Ω cm2) for HY and EO at 2 g/L, respectively. In the same way, one notes that the element with constant phase (CPE1) decreases with the increase of the two studied extracts, this decrease in CPE1 is due to the adsorption of the inhibitory molecules which constitute EO and HY on the metal surface leading to the formation of a protective film on the metal/solution interface. It was observed that the values of inhibitions efficiency increase with inhibitor concentration reaching a maximum value of 93.04% and 84.90% for HY and EO, respectively, at 2 g/L. It is clear that HY has the highest values of Rp and ERp% with respect to EO. This can be attributed to the presence of high proportion of carvacrol in HY; probably this component is accumulated when adsorbed on the surface of brass.

Table 5 Parameters of the equivalent circuit fitting results and the corresponding inhibitory efficiencies (ERp %) of brass in 3% NaCl in absence and presence of EO and HY at 298 K

To explain the choice of the proposed equivalent circuit, we analyzed Bode diagrams shown in Fig. 7. In the presence the optimum concentrations of the two studied extracts, the Bode phase diagrams (Fig. 7b) shows the existence of two well-defined time constants attributed to the charge transfer process taking place in metal/solution interface and to the film present on the surface of the brass, respectively. The Bode module (Fig. 7a) confirms the diffusion does not appear at the level of the impedance diagrams and also the choice of our equivalent circuit. The EIS results are in good agreement with those of polarization measurements.

Fig. 7
figure 7

Bode module (a) and phase (b) diagrams in 3% NaCl in absence and presence (2 g/L) of EO and HY at 298 K

This difference in inhibitions efficiency between HY and EO, can be attributed to the high carvacrol ratio and possibly the presence of synergistic effect with eugenol in HY compared to the EO. This observation may play an important role in the inhibition efficiency differences between EO and HY.

3.4 SEM Images and EDX Spectra

3.4.1 SEM Images

The SEM allows us to have information on the chemical compositions of the adsorbed layer on the metal surface. This technique was carried out after the polarization test after 1 h of immersion in aerated 3% NaCl solution in the absence and the presence of the optimal concentration (2 g/L) for the two extracts (EO and HY). The results obtained are shown in Fig. 8. The homogeneous brass surface which is detected in Fig. 8a shows the presence of the same scratches attributed to the polishing traces by emery papers before immersion in the corrosive medium. After polarization experiment in the blank solution in Fig. 8b, the brass surface shows that the sample undergoes corrosion by the appearance of cracks and pores existing on the surface, it is also noted that our sample appears to be covered with a layer of corrosion products (ZnO and Cu2O) [3].

Fig. 8
figure 8

SEM images of the brass surface a polished, after polarization tests in 3% NaCl medium: b without inhibitors, c and d with (2 g/L) of EO and HY at 298 K

Furthermore, we can see the quantity of “white hills” on the surface which are due to the chloride ions, which contribute to the production of other corrosion products (CuCl and CuCl2) when they interact with brass surface [52]. Chloride ions are known to help facilitate the dissolution of copper and its alloys in solutions containing these ions [52, 53].

Moreover, it is indicated by the surface of the two samples which are represented in Fig. 8c and d, that they were inhibited by EO and HY, respectively, and were not significantly affected by corrosion in the 3% NaCl medium. We note that the two samples are smoother and show a marked improvement over the not inhibited surface of Fig. 8b due to the formation of a layer protective on the metal surface by inhibitory molecules which constitute the EO and HY. These results indicate that the inhibition of corrosion of brass by EO and HY in 3% NaCl remarkably reduces the corrosion rate and prevent the attack of the ions responsible for this phenomenon. In addition, it is clearly noted that the sample inhibited by HY is almost covered with a large protective film, which indicates a better inhibiting performance for HY compared to EO.

3.4.2 EDX Analysis

In the same context, we performed energy-dispersive X-ray spectroscopy (EDX) in order to identify different elements presented on the metal surface before immersion and after polarization in 3% NaCl in the absence and presence of the optimal concentration (2 g/L) of EO and HY. These analyzes are presented in Fig. 9.

Fig. 9
figure 9

EDX spectra of brass surface a dry, after polarization tests in 3% NaCl medium: b without inhibitors, c and d with (2 g/L) of EO and HY at 298 K

The resulting EDX spectrum in Fig. 9a presents the characteristic peaks of the studied sample constituents (Cu, Zn) homogeneous brass surface. These results correspond to the components characteristics of brass as reported in the literature [3, 4]. After exposing the brass sample in 3% NaCl in the absence of EO and HY as shown in Fig. 9b, we noted the appearance of additional peaks of Cl and O with a less intense signal of Cu and Zn compared to the “homogeneous brass surface”. According to these results, we are witnessing the dissolution of brass in 3% NaCl by the formation of corrosion products of oxides (ZnO, Cu2O) and copper chloride complexes (CuCl and CuCl2) [53, 54]. In addition, we observed the presence of the lead signal (Pb) as one of the insertion elements of our studied sample. In addition to the sodium peak, most likely in form of NaCl crystals. Figure 9c, d clearly show the disappearance of corrosion products by the disappearance of chlorine peaks and the reduction of oxygen peaks when adding EO and HY, in addition, on the same spectra, we noted the appearance of carbon peaks that indicates the presence of organic compounds, which confirms that the inhibitory molecules, which constitute the two studied extracts, were strongly adsorbed on the brass surface.

These observations confirm that the two extracts stop the corrosion of brass surface by the formation of a protective film on the metal surface which limits the access of the electrolyte to the surface. Moreover, the spectrum of Fig. 9c and d have very high carbon peaks with a percentage of 67.26% and 75.96% for EO and HY, respectively, this indicates that HY has a very high protective capacity compared to EO, perhaps due to the presence of a large proportion of carvacrol and the presence of eugenol in HY, which brings us to suggest that carvacrol is the main inhibitory molecules in the two studied extracts and also probably that a synergistic effect has occurred between eugenol and carvacrol, which creates high inhibitory performance at HY level.

3.5 Quantum Chemical Calculations

In the final part of this work, we tend to evaluate the performance of corrosion inhibition, for both studied extracts (EO and HY), where the experimental results showed high inhibitory efficacy, (ERp): 84.90 and 93.04 (%) for EO and HY, respectively, with a clear preference for HY. The use of theoretical study was necessary through to identify the component or components responsible for these inhibitory performances for these studied extracts. based on DFT method, we have compared the interaction with the metal surface by analysis of electronic structure in neutral form of the major compound (carvacrol) of EO and HY, as well as their minor compounds for both extracts such as phenolic compound (eugenol), monoterpenes (β-pinene, p-cymene and γ-terpinene), terpene alcohol (linalol), sesquiterpenes (α-humulene, caryophyllene oxide). During the first phase, we did the calculations of the quantum chemical descriptors (EHOMO, ELUMO, ΔEgap, and μ) for the compounds cited previously for EO and HY in order to identify compounds that have possible inhibitory properties for both extracts. These descriptors are given in Table 6.

Table 6 Quantum chemical parameters for the studied compounds of EO and HY in their neutral forms in the aqueous solution

According to many researches, a compound is a good corrosion inhibitor when it is more likely to give and accept electrons when interacting with on the metal surface atoms [55]. Based on this, it is possible to evaluate the inhibitory properties of a molecule by the frontier molecular orbitals (FMO) of chemical reactivity. The energy of highest occupied molecular orbital (EHOMO) shows the regions of the molecule propitious the donation of electron to unoccupied orbital of the metal surface. Also, the energy of the lowest unoccupied molecular orbital (ELUMO) shows the capacity of the compound to accept electron from metal surface. As known that the inhibitor molecule has a higher EHOMO and lower ELUMO indicates that this compound has feature an easy tendency towards the donor–acceptor electron to the metal surface, which increases the adsorption of the inhibitor compound on the metal surface and hence increases the efficiency of inhibition.

The results of Table 6 show that the major compound (carvacrol) has the highest EHOMO (− 5.90 eV) level and the lowest ELUMO (0.03 eV) level with respect to other components of EO. These results indicate that carvacrol is better electron donor–acceptor than others. Moreover, it has been reported that the lower energy gap (ΔEgap = 5.93 eV) confirms the chemical stability and the greater adsorption of the inhibitor molecule on the metal surface leading to an increase of the inhibition efficiency [56]. The calculated of ΔEgap showed that carvacrol has the lowest ΔE value as compared to other EO compounds. As well, the dipole moment (μ) is an important electronic indicator of the chemical reactivity of atoms in the molecule, the high value of dipole moment (μ = 1.82 Debye) of carvacrol probably indicates its strong dipole–dipole interaction with the metal surface resulting in an increasing adsorption [56], the (μ) value of carvacrol is bigger than the others compounds of EO. According to the studied quantum chemical parameters, there is a good agreement among them which indicates that carvacrol shows properties related to corrosion inhibitor from other compounds and therefore it is responsible for the main inhibiting properties in EO. The theoretical descriptors of the HY compounds listed in Table 6 have shown in addition to the main compound carvacrol that the values of ELUMO (0.07 eV), EHOMO (− 5.61 eV), ΔEgap (5.68 eV), and dipole moment (μ = 3.25 Debye) are suitable for the minor component eugenol where it corresponds compatible with the properties of the inhibitor compound as was previously mentioned. Furthermore, it has been has reported that eugenol is a good inhibitor of corrosion [57]. However, in the case of linalool and caryophyllene oxide two molecules of EO and HY, respectively, they have shown a high value of (μ), although they do not have the values for the quantum parameters (EHOMO, ELUMO, and ΔEgap) equal to that obtained for carvacrol and eugenol. These results show that there is not always a correlation between the dipole moment and the performance inhibition of corrosion. Some authors have referred this divergence to which we have referred [17, 58]. These results indicate that carvacrol is responsible for inhibitory performance in EO, but the inhibitory activity in HY is shared between carvacrol and eugenol, this approach gives us a preliminary idea that the synergistic effect between these two green inhibitors, which enhance the inhibitory capacity of HY compared to EO.

For a better understanding of our assumption and distinguish the inhibitory capacity of carvacrol and eugenol, we investigate other quantum parameters such as electronegativity (χ), hardness (η), softness (σ), electrophilicity index (ω), nucleophilicity (ε), and electron charge transfer (ΔNCu) given in Table 7.

Table 7 Chemical reactivity indices for carvacrol and eugenol in their neutral forms

The electron-donating tendency of the compound can be directly measured by mean of electronegativity (χ). According to literature, a good corrosion inhibitor molecule characterized by a low electronegativity (χ) [59]. Through the results of the Table 7, we note that the values (χ) obtained with respect to the studied compounds show that they are low and thus indicate the reactivity of these compounds with a preference for eugenol. Hardness (η) and softness (σ) are important index to understand the molecular reactivity and stability. Based on the principle of HSAB (hard and soft acids bases) a hard molecule is associated with a low basicity which means a low electron-donating ability; while a soft molecule is associated with a high basicity and a high tendency to donate electrons [60]. This suggests that a higher value of (σ) and lower value of (η) are associated with high electron-donating ability and therefore high inhibition efficiency [61]. In our present study, Table 6 showed that eugenol has slightly higher value of σ = 0.35 eV and slightly lower value of η = 2.84 eV with respect to carvacrol (σ = 0.33 eV and η = 2.96 eV). These values for both descriptors are equivalent to inhibitory values reported in other studies [61], and also confirm that these compounds are reactive and have a high absorption capacity on the surface. In addition, an electrophilicity and nucleophilicity were used to examine the efficacy of the studied inhibitors (carvacrol and eugenol), as these parameters enable us to determine the chemical behavior of compound, which can be used to evaluate the efficacy of inhibitory compounds [27]. It has been reported that a good corrosion inhibitor acts as a high nucleophilic value and low electrophilic value [27]. The values obtained of these two factors confirm the experimental action of carvacrol and eugenol as corrosion inhibitors.

According to the study of Lukovits et al. [62], if ΔN < 3.6, the inhibition efficiency increases with the ability of the inhibitor molecule to give electrons to the surface atoms of the metal. According to the information obtained through a study of the fraction of electrons transferred (ΔNCu) of our studied inhibitors, it was shown that they act as electron donors towards the metal surface. As carvacrol is predominant in EO and HY, it possesses the best charge transfer abilities towards the metal surface.

Figure 10 clarify the visual representation of the chemically active sites of HOMO and LUMO for two green selected inhibitors in neutral forms. The HOMO distribution is indicated by the red colors over whole optimized geometry for carvacrol and eugenol including the heteroatoms and π electrons located in aromatic rings and double bonds. These results demonstrate that these reactive sites can share electrons with the metal surface. On the other hand, the blue colors indicates that the principal LUMO regions located in these compounds are distributed over carbon atoms and which express areas that can receive electrons from the metal surface atoms. Also, in Fig. 10, the electrostatic potential (ESP) was studied, which provides important information on reactive sites and the electron density is higher than other parts in the compound. As shown in this figure, the ESP is expressed on the surface of the selected inhibitors in different colors where the light blue—blue colors stands for the location nucleophilic attacks while the red, orange and yellow colors express the regions electrophilic attacks [63]. As prove in neutral form of carvacrol and eugenol compounds, the electrophilic attacks are located around the oxygen atoms and some carbon atoms for these green compounds. These sites are considered to have the greatest ability to donate electrons on unoccupied d-orbitals of metal atoms and thus higher interaction on the metal surface. While the nucleophilic attacks occur around the rest of the carbon atoms for these two green compounds [63], the study demonstrated that these inhibitors can accept electrons from the metal across these regions.

Fig. 10
figure 10

The optimized structures, HOMO, LUMO and electrostatic potential (ESP) of carvacrol and eugenol in their neutral forms obtained in the aqueous phase using DFT at the B3LYP/6-31G (d,p) basis set (Color figure online)

Through all these results based on the analysis quantum chemical parameters with electronic distribution and ESP for two green inhibitors selected, confirms that carvacrol is responsible for the inhibition in EO among all other compounds that have been examined, but for HY, in addition to carvacrol as a major inhibitor there may be a synergistic effect with eugenol. This approach explains the high inhibitory efficacy of HY.

3.6 Mulliken Charges

Following the same approach, the Mulliken atomic charges calculated and analyzed for further examination of the adsorption centers (electrophilic and nucleophilic attacks) of carvacrol and eugenol in their neutral forms, the results are shown in Fig. 11. There is general agreement in the literature, that the adsorption centers in the inhibitor onto the metal surface is generally concentrated in heteroatoms and some carbon atoms (benzene rings, and double bonds) because it is characterized by more negative atomic charges with high electron density, consequently, these atoms will behave like electrophilic attacks sites and that have the greatest ability to form coordination bonds with the unoccupied orbital of the metal [6]. It is noted from Fig. 11 that neutral forms for the two studied compounds, show that the electrophilic behavior at the most negative charges are found on the oxygen atoms and some atoms carbon of double bond and aromatic rings: for the carvacrol, the most negative charges are found in O9 and C8, C6, with regard to eugenol the negative charges appeared mainly on the O11, O3 and also C4, C5, C9, C10. This shows that these heteroatoms and these π-electrons are electrophilic attacks which have the greatest capacity to bond to the metal surface. While the most positive charges are centered on the rest of the other carbon atoms for carvacrol and eugenol, where it is possible through these sites the nucleophiles can attack, so that these inhibitors can accept electrons from the orbital of surface metal atoms through these atoms. We can conclude, by the results of the analysis of the Mulliken atomic charges analysis, which correspond to what has been reported [64], that these phenolic compounds are good corrosion inhibitors, which through their active sites to form a chemical adsorption with the metal surface.

Fig. 11
figure 11

Mulliken atomic charges distribution (given outside the atoms) of carvacrol and eugenol in their neutral forms calculated in the aqueous phase using DFT at the B3LYP/6-31G (d,p) basis set

3.7 Molecular Dynamics Simulation

In the current study, Metropolis MC simulation type of MD were performed by in order to obtain more details about the inhibitor/C(111) intermolecular interactions and adsorption tendency of carvacrol as well as clarify the capacity of the synergistic effect between carvacrol and eugenol to achieve the greatest protection on the metal surface in their neutral forms, and that is for to try to clarify more precisely the experimental results that we have obtained. the different interaction energy (EInteraction) and the binding energy (Ebinding) through the MC simulation have been calculated and the results obtained are summarized in Table 8, the negative values of EInteraction confirm quantitatively evidence that the studied compounds have been absorbed into the metal surface.

Table 8 The adsorption and binding energies for the investigated neutral for carvacrol and the synergistic effect on Cu (111) surface calculated by Monte Carlo simulation

It is seen in Table 8 that the calculated EInteraction values of carvacrol and the synergistic effect (carvacrol + eugenol) in their neutral forms on Cu (111) which are − 46.26 kcal/mol and − 101.66 kcal/mol, respectively. The studied negative values of EInteraction for carvacrol show the inhibitory efficiency and the capacity of this green inhibitor to adsorb on the metal surface. According to the literature that the higher the negative of EInteraction, the stronger and stable interaction of inhibitor molecules on the metal surface [33]. Moreover, the expected high interaction ability showed by the synergistic effect (carvacrol + eugenol) in comparison with the interaction potential of carvacrol proves that the absorption of this phenomenon is stable and has high interaction on the metal surface. On the other hand the binding energy (Ebinding) values have also been calculated in Table 8 for carvacrol and the synergistic effect (carvacrol + eugenol), the results showed:

$$E_{{{\text{binding}}}} \;\left( {{\text{synergistic}}\;{\text{effect}}} \right) > E_{{{\text{binding}}}} \;\left( {{\text{carvacrol}}} \right).$$

It has been reported that the higher the binding energy, the more easily the inhibitor will be absorbed on the metal surface [55], which in turn contributes to increasing the performance of inhibition. These results provide information on the inhibitory ability of the main component of carvacrol as well as provide evidence on the high adsorption potential for a synergistic effect (carvacrol + eugenol), which is accompanied by a high inhibiting efficacy.

The snapshot of the stable equilibrium configurations of the major green inhibitor (carvacrol) and also the synergistic effect (carvacrol + eugenol) in their neutral forms of adsorption on Cu (111) surface were displayed in Fig. 12. As can be seen in this figure all these equilibrated configurations adsorbed in parallel and adopted a completely flat orientation with the Cu (111) surface. This modeling observation declares that carvacrol and also the synergistic effect (carvacrol + eugenol) are able to adhere and bind to the metal surface and the formation of protective film at the interface. The higher inhibition performance of a synergistic effect can be explained by the numerous active sites of the organic inhibitors available on the system (carvacrol + eugenol), which are more related to vacant d-orbital of copper surface atoms. This increased the surface coverage and greater resistance to corrosion. Depending on the results of MC simulation, carvacrol is responsible for the inhibition efficacy of EO. As for HY, the presence of eugenol despite its low proportion, helps to increase the activity of the main inhibitor (carvacrol) by increasing the inhibitory efficiency indicated in the experimental results.

Fig. 12
figure 12

The snapshots of equilibrium adsorption configuration of carvacrol and the synergistic effect over Cu (111) surface

3.8 Inhibition Mechanism of Carvacrol and Synergistic Effect

According to the same previous approach, we focused on developing a more rational explanation for understanding the adsorption mechanism of carvacrol and at the same time as well synergistic effect (carvacrol + eugenol) in their neutral forms on the surface of copper as a dominant element of brass in neutral 3% NaCl solution based on experimental and theoretical results.

Here are the possible modes of interaction:

  • The first mode of adsorption includes the formation the chemical adsorption between the carvacrol and eugenol in their neutral forms with the metal surface, this process involves sharing of extra pair electrons on the oxygen atoms with unoccupied orbital of the copper, likewise “donor-acceptor” interactions between π electrons in the aromatic ring as well as the double bond (C=C) with vacant d-orbital of copper surface.

  • The second mode involves the return of electrons from occupied copper orbitals (reterodonation) that could be transferred to the anti-binding molecular orbitals (vacant π*) present in the two studied inhibitors.

As such, the proposed adsorption mechanism is parallel to that mentioned in the literature [65, 66]. In addition, the possible adsorption mode with respect to the synergistic effect can be based on the formation of chemisorption mechanism with the metal surface by sharing many electrons from many heteroatoms and also π electrons from heterocyclic rings and double bonds located in these two inhibitors. Thus, this process leads to the formation of a strong protective film on the metal surface, which leads to better protection of the metal in the corrosion medium. This analysis confirms the high inhibitory efficacy of HY obtained in the experimental results. This adsorption mechanism is consistent with the results of the quantum chemical study and the MC simulations which show that the two inhibitors in their neutral forms adsorb on the surface of the metal by chemical adsorption and that the higher binding energy with copper surface was for the synergistic effect. The estimation of the adsorption mechanism of the carvacrol and at the same time the synergistic effect (carvacrol + eugenol) on the copper are shown in Fig. 13.

Fig. 13
figure 13

Proposed mechanism of carvacrol and synergistic effect (carvacrol + eugenol) in their neutral forms on the copper surface

4 Conclusion

The first part of this study, was devoted to identify the chemical composition of the EO and its corresponding HY of T. capitata (L.) Cav. collected from northern Morocco. Based on the results of GC–MS, we note that the EO consists of a high content of carvacrol (85.96%), while carvacrol constitutes the main element of the HY with a concentration of (98.04%), which gives it a quality of an almost pure product, with a low percentage of eugenol by (0.5%). We evaluated in the second part the inhibitory power of EO and HY on the corrosion of brass in 3% NaCl solution through to the use of electrochemical techniques, with and without different concentrations of EO and HY. The results show that a high inhibition efficiency reached (93.04%) at the highest concentration (2 g/L) for HY compared to that of EO (84.90%). Polarization measurements show that EO and HY are mixed inhibitors. SEM and EDX analysis reveal the formation of a protective film on brass surface in the presence of EO and HY with greater coverage for HY. The electrochemical results with surface morphology obtained in part three of this study were explained and analyzed through the computational study achieved from DFT and MC simulations. These methods showed that carvacrol and eugenol can be adsorbed on the metal surface by their active sites (heteroatoms and π electrons) and that the synergistic effect (carvacrol + eugenol) in their neutral forms has showed high adsorption energy when interacting with the copper surface (− 101.66 kcal/mol). From all obtained results, we can confirm that carvacrol remains the main compound responsible for inhibiting corrosion, but the synergistic effect with eugenol despite its low proportion has shown a high inhibition efficiency.

Finally, this study contributes in one way or another to the promotion of natural products as green inhibitors. Moreover, the results of this study, not reported in other research, makes it original from the perspective of the synergistic effect phenomenon between carvacrol and eugenol, which exhibited great inhibitory performance.