Introduction

Steel is a preferred choice in variety of industries due to its great mechanical strength. However, in industries, the corrosion of steel occurs because of interaction with corrosive media like sulfuric acid and hydrochloric acid, which are commonly employed for cleaning and descaling purposes1. Corrosion can cause dangerous and expensive damage to everything from pipelines, bridges, and public buildings to vehicles, water and wastewater systems, and even home appliances2. It was indicted the iron rust can easily absorb the Arsenic content and contaminate the external environment3. In addition to the existence of the iron rust can enhance the growth rate of the Legionella bacteria in water. The growth rate can be enhanced by to 103–105 fold with the ferric oxide4. The employment of inhibitors is one of the most efficient strategies to inhibit unexpected metal dissolution, particularly in acid solutions5. A lot of synthetic chemicals are being used as corrosion inhibitors to reduce corrosion reaction, however many of them have significant environmental consequences and also hazardous to human health6. To overcome this problem, natural and biodegradable corrosion inhibitors must be employed due to their non-toxicity and affordability. Various phytochemicals are present in plant extracts, like terpenoids, alkaloids, flavonoids, coumarins, tannins and poly phenols that contain heteroatoms that effectively play role in protective layer formation on the steel surface7,8,9. Several plants are available from the literature having different phytochemicals as demonstrated in Table 110,11,12,13,14,15,16,17.

Table 1 Different phytochemicals in plants.

The existence of phytochemicals boosts the effectiveness of plant as corrosion inhibitors. Corrosion of steel in aggressive media can be controlled by using such green inhibitors that comprise various heteroatoms like oxygen, nitrogen, and sulfur18,19,20,21,22,23.

Bhawsar et al.24 observed that the extract of Nicotiana tabacum, which include nicotine, inhibit steel in 2 M sulphuric acid, with efficiency of 94% in 1 g/L. Rauwolfia macrophylla was discovered as a corrosion protector in HCl as well as in H2SO4 because of the presence of alkaloids perakine and tetrahydroalastonine25. These phytochemicals suppress, or even prevent the corrosion of the steel when employed in acidic media. Numerous plant parts, having different phytochemicals were used as corrosion inhibitors and showed good inhibition efficiency as presented in Table 226,27,28,29,30,31,32,33,34,35,36,37,38,39,40.

Table 2 Corrosion inhibition efficiency of some plants.

The main vision of the current research is to determine the inhibitory effect of fruit extract of Terminalia bellerica. This extract can be used as a pickling agent to reduce the corrosion of steel in industries where acid corrosion occurs. Terminalia bellerica also known as baheda that is a species of Combretaceae and a huge deciduous tree that can be found on the plains and on the lower slopes. Medicinal properties of the Terminalia bellerica fruit have been studied earlier; however, anticorrosive properties were not investigated yet. A literature survey reveals that Terminalia bellerica extract contains Ellagic, Gallic, and Malic Acid41,42 as displayed in Fig. 1. The following study include electrochemical measurements, surface morphology measurements, DFT calculations and Monte Carlo simulations.

Figure 1
figure 1

Phytochemicals constituents of Terminalia bellerica.

Experimental studies

Specimen preparation

The steel alloy composition used in the study is depicted in Table 3. The steel sample has a 1 cm2 surface area. Each steel coupon was cleaned using several sandpapers prior to the corrosion examination.

Table 3 Composition of the studied steel coupons.

Sample collection and preparation of an inhibitor

Plants (either cultivated or wild), including the collection of plant material, complied with relevant institutional, national, and international guidelines and legislation. Terminalia bellerica fruit sample was purchased from the market of Sirhind, Punjab. The dried fruits were then crushed to a powder using a grinder. Then 250 g powdered fruits were refluxed at 50 °C for around 24 h using a Soxhlet apparatus and 250 ml of methanol. A hot water bath was then utilized to dry the extract. The concentration range of the Terminalia bellerica fruit extract employed was (1000–4000 mg/l) in 1 M H2SO4 solution.

Preparation of the corrosive media

For the current experiment, we utilized a 1 M H2SO4 solution that was made using AR grade sulphuric acid from Loba Chemie in double-distilled water. To get various extract concentrations, it was then further diluted.

Weight-loss measurement

Before every corrosion study, the 1 cm2 steel coupons were polished with emery paper of various grades. The steel coupons were firstly weighed and then submerged in 1 M sulphuric acid with several inhibitor concentrations (1000, 2000, 3000, and 4000 mgL-1) for 24 h. The coupons of steel were taken out after being exposed to acidic media. Following acetone rinsing and drying of the coupons, the weight loss data were computed using the following equation43,44:

$$\eta {\%} = \frac{W_0-W_i}{W_0}\times 100$$
(1)
$$\theta = \frac{W_0-W_i}{W_0}$$
(2)

\(W_0-W_i=\Delta W\) is the weight loss (mg), where w0 and wi is the loss of weight without inhibitor and with involvement of inhibitors, respectively and θ is the surface coverage.

Electrochemical studies

Electrochemical analysis (PDP and EIS) of the steel coupons was performed with a Metrohm Autolab electrochemical analyzer45,46. There were three electrodes connected in the corrosion cell: a working electrode made of steel, a reference electrode made of saturated calomel, and a counter electrode made of platinum. The steel was covered with araldite resin, leaving a 1 cm2 active region exposed. Current–potential curves were obtained by varying the electrode potential between −250 and + 250 mV in relation to the open circuit potential45,46.

The following relationship is used to calculate efficiency47:

$$\eta \%= \frac{{I}_{0corr}-{I}_{icorr}}{{I}_{0corr}} \times 100$$
(3)

I0corr and Iicorr are measurements of the corrosion current density without and with plant extract. The same electrochemical workstation was employed for PDP analysis as well as for EIS measurements. To set the OCP, the steel electrode was immersed in the acidic medium for approximately 45 min prior to each experiment. The effectiveness of the inhibition was evaluated using the following equation48:

$$\eta \%= \frac{{R}_{ct}-{{R}^{0}}_{ct}}{{R}_{ct}} \times 100$$
(4)

R0ct is used to demonstrate the charge transfer resistance of a solution without any plant extract in it, and Rct that refers to the charge transfer resistance of a solution containing a plant extract.

Phytochemical testing

Methanolic extract of Terminalia bellerica was examined for the phytochemicals like alkaloids, flavonoids, saponins, sugar, coumarin, and quinones. A testing solution was prepared by dissolving 0.35 gm of the concentrate in 50 mL of methanol which was subsequently utilized for the phytochemicals investigated. Numerous studies were carried out to assess the phytochemical conformation41.

UV–visible spectra analysis

Using a UV–Visible spectrophotometer, the spectrum of a Terminalia bellerica extract in 1 M H2SO4 was determined. To describe the adsorption/desorption behavior of the inhibitor, UV/Visible analysis was conducted for the solutions in which steel specimen was dipped for 24 h and for solutions in which steel specimen was not dipped. To understand the inhibitory mechanism, both spectra was assigned49.

Surface inspection

SEM and AFM data of steel were utilized to estimate the surface morphology during the corrosion-protection process. The SEM and AFM pictures of cleaned steel specimen and steel that was dipped in an acid solution without and with an inhibitor were examined.

Theoretical models

Initial guesses of structures of Ellagic, Gallic, and Malic acids were prepared by ChemBioDraw Ultra 14.0 in 2D dimensions then a minimization (energy/geometry) was performed by Gaussian 09 revison-A.02-SMP package50 at B3LYP/6-31 g(d,p) level51,52,53. The optimized parameters were reached after achieving the convergence criteria indicated by Gaussian 09: the maximum remaining force on an atom and the average root mean square (RMS) force on all atoms are below the tolerance threshold \(45\times {10}^{-5}\) and \(30\times {10}^{-5}\) Hartree, respectively as well as the maximum structural drift of one coordinate and RMS change over all structural parameters in the last two iterations are below \(18\times {10}^{-4}\) and \(12\times {10}^{-4}\) Å , respectively. Obtained optimized molecules representing local minima were sketched by Gauss view 6 and presented in Fig. 254.

Figure 2
figure 2

Optimized structural parameters at B3LYP/6-31g(d,p): from left (ellagic, gallic and malic acids).

Often Density Functional Theory (DFT) calculations underestimate Frontier molecular orbitals eigen values55, therefore the DFT calculations were repeated using the Time-dependent density-functional theory (TD-DFT) method to calculate the lowest excited state energy and therefore correct the value of band gap energy \({\Delta E}_{gap}\) between Highest Occupied Molecular Orbital (HOMO) and Lowest Unoccupied Molecular Orbital (LUMO). Six energy states were included for this calculation at TD-B3LYP/6-31 g(d,p) following the procedure described by Ref.55. \({E}_{HOMO} \mathrm{and} {E}_{LUMO}\) as well as their corresponding reactivity descriptors were obtained as described by Ref.56. HOMO and LUMO surfaces with an iso value of 0.02 and density of 0.0004 were presented as transparent surfaces using the molecular orbital editor of Gauss view 657. Natural bond orbitals (NBOs) were measured at B3LYP/6-31 g(d,p) level for selected sites of Ellagic, Gallic, and Malic acids. NBOs surfaces were created using the NBO Version 3.158 in Gaussian 09 software and plotted using the same isovalue of 0.02 and density of 0.0004 in order to compare them to Frontier Molecular Orbitals (FMOs). In addition, Fukui functions were calculated by addition of a positive and a negative charge to the neutral molecules and then re-optimizing it at B3LYP/6-31g (d,p).

Including water as a solvent, (2H+ and SO4--) as corrosive medium (200 H2O, 20 H3O+, 10 SO4--), a Monte Carlo simulation had been used to get deeper details of the adsorption pattern for the Terminalia bellerica fruit extract phytochemical structures and their binding with the metal surface. The simulation was done using the Adsorption Locator module included in the Materials Studio 7.0 program59. All constituents within the structure were optimized using a COMPASS force field. Fe (1 1 0) unit cell with 11 layers of (11 × 11) atoms (under periodic boundary conditions with size 18.386 × 22.341 × 22.341 Å) and a vacuum slape of 30 Å which was employed to depict the steel surface. The electrostatic energy was determined using the Ewald summation technique, whereas the van der Waals energy was calculated utilizing the atom-based procedure60.

Result and discussions

Measurements of weight reduction

Weight loss values, surface coverage and inhibitory effectiveness were determined and presented in Table 4 at varying concentrations of Terminalia bellerica extract at different environment temperatures. According to the information in the Table 4, by raising the extract's concentration, inhibition effectiveness increases (approached a maximum value of 83.38% at 4000 ppm and 298 K) while the corrosion rate decreased, which can also be inferred from the plot in Fig. 3. The corrosion rate was calculated using the following equation61:

$$Corrosion\,rate (mpy)= \frac{k x W}{D x A x T}$$
(5)

where K is the corrosion constant, W is the loss of weight after corrosion (mg), A is the total area of the coupon (cm2), T is the corrosion time (h) and D coupon density (g/cm3). This increase in inhibition effectiveness is only possible if electron-rich hereto atoms were adsorbed on the steel surface so that it retards the rate of metal corrosion in the abrasive medium62,63.

Table 4 Weight loss data of inhibition efficiency and surface coverage of Terminalia bellerica in 1 M H2SO4.
Figure 3
figure 3

Corrosion inhibition efficiency of Terminalia bellerica extract at different concentrations.

As the temperature ascending from 298 to 318 K, the rate of corrosion was raised which led to a decline in protection ability (Table 4, Fig. 3). Physical adsorption may be responsible for the decline in protective efficacy with raising temperature at all the evaluated doses. Due to desorption, the inhibitor molecules get detached from the steel substrate at elevated temperatures43.

Adsorption isotherm

The data calculated by weight loss analysis can be fitted to different isotherms to examine the adsorption characteristics64. The fitting results were collected for four different isotherms (Freundlich, Langmuir, Temkin and kinetic-thermodynamic models) in Table 5 and Fig. 4. Langmuir model showed high fitting affinity to the WL data (R2 = 0.99986 at 298 K, 0.99669 at 308 K and 0.99535 at 318 K)65. By plotting C/θ vs. log C, Eq. (6) can be employed to calculate the adsorption66:

Table 5 Adsorption isotherms models of the Terminalia bellerica with values of R2, slopes, intercepts, and thermodynamic parameters (Kads and ΔGoads) by using data obtained from WL measurements.
Figure 4
figure 4

Adsorption isotherms for Terminalia bellerica on steel in 1 M H2SO4.

$$\frac{C}{\theta }= \frac{1}{{K}_{ads}}+C$$
(6)

Where surface coverage is represented by θ, inhibitor concentration is depicted by C while Kads is the adsorption equilibrium constant.

The relationship between the concentrations of Terminalia bellerica extract and C/θ is depicted in Fig. 4. The resultant plot is linear, and the adsorption equilibrium constant (Kads) can be measured by using the intercept. The corresponding Kads values are 0.0033, 0.0019 and 0.0018 ppm−1 at the temperatures 298 K, 308 K, and 318 K, respectively.

The following formula was used to determine the \({\Delta G}_{ads }^{\circ}\) from the Kads values67:

$$\Delta {G}_{ads }^{{\circ}}=-RTln({10}^{6} \times {K}_{ads})$$
(7)

Where ΔG°ads is the  standard free energy of adsorption; R is the gas constant; T is the absolute temperature.

The obtained values of \(\Delta {G}_{ads }^{\circ}\), by using Eq. (7), are −20.37, −18.98 and −18.91 kJ mol−1 at the temperature of 298 K, 308 K, and 318 K, respectively. In general, values of ΔG0ads around −20 kJ/mol or more positive are indicative of the inhibitor's physisorption on the surface, likewise, values of −40 kJ/mol or more negative are indicative of the inhibitor’s chemisorption on the steel surface68. Due to possible interaction between the above-mentioned phytochemicals and the surface of the metal, they can be considered as effective corrosion inhibitor. The inhibitor layer prevents corrosion by obstructing the active sites upon the steel's surface and the physical adsorption is predominant.

Activation parameter

Figure 5a demonstrates a linear relationship between ln (CR) and 1/T, from which Ea can be figured out. Using Eq. (8), Ea can be calculated and with accordance to the Arrhenius law, Ea varies as temperature rises, which accelerates metal corrosion.

Figure 5
figure 5

Arrhenius plots and Transition state plots for steel dissolution with and without different concentrations of Terminalia bellerica in 1.0 M H2SO4 solution.

$${E}_{a}= -Slope\times 8.314$$
(8)

When an inhibitor was added, Ea (Table 6) was increased from 32.69 to 58.19 kJ/mol, demonstrating the physical adsorption of the inhibitor onto the metal surface69. Due to the development of a protective layer over the exposed steel surface, activation energy has therefore increased, suggesting that dissolved steel has been reduced.

Table 6 Activation parameters of dissolution reaction of steel in 1 M H2SO4 with at different concentrations of Terminalia bellerica.

Adsorption parameter for entropy and enthalpy

The following equation has been used to evaluate the entropy and enthalpy of adsorption:

$$ln\left\{\frac{CR}{T}\right\}=log \left\{\frac{R}{{N}_{a}h}\right\}+ \frac{{\Delta S}_{a}}{R }- \frac{{\Delta H}_{a}}{RT}$$
(9)

In this formula, Na, h, ∆Ha, and ∆Sa are Avogadro's number, Planck constant, standard activation enthalpy and standard activation entropy, respectively.

By using graph ln (CR/T) versus /T, as shown in Fig. 5b, the ∆Ha and ∆Sa parameters have been determined and illustrated in Table 6. It can be inferred, the metal is very well protected because a corrosion-preventing energy barrier is maintained, as demonstrated by the fact that Ha is greater when there an inhibitor used (54.46 kJ/mol) compared to solution without inhibitor (29.50 kJ/mol). The inhibitor adsorption leads to a rise in the corrosion reaction’s enthalpy (+ ve, endothermic). The introduction of the inhibitor produced an entropy value of -21.02 J/mol/K as opposed to the blank solution having entropy of −93.96 J/mol/K.

Electrochemical studies

Potentiodynamic polarization (PDP) study

In the corrosive solvent with various extract concentrations, Fig. 6 clearly demonstrates the anodic and cathodic polarization responses of steel coupons, while Table 7 enlists the related corrosion outcomes and inhibition efficiencies.

Figure 6
figure 6

Tafel polarization curves in 1 M H2SO4 without and with various concentrations of Terminalia bellerica extract.

Table 7 Potentiodynamic polarization parameters for steel dissolution without and with various concentrations of extract.

According to the Tafel curves, the anodic and cathodic section current density is decreasing in the presence of the Terminalia bellerica extract. This behavior demonstrate that the inhibitor has the ability to suppress the cathodic hydrogen evolution as well as anodic metal oxidation70. The anodic as well as cathodic Tafel graphs (βa and βc) with the Terminalia bellerica extract has been changed with certain concentrations which show that the inhibitor affects the cathode hydrogen gas evolution and also interfering with the anode iron dissolving process71. Thus, in a solution of 1 M H2SO4, the Terminalia bellerica extract regulates both cathodic and anodic corrosion reactions72,73. This should indicate that adding more Terminalia bellerica extract prevents the steel corrosion process. According to Table 7, the corrosion current density reduces as Terminalia bellerica extract concentration increases74. At a concentration of 4000 mg/L, the lowest corrosion current density is 2.610–4 A/cm2 and the best inhibition efficiency showed 91.03%. In addition, Table 7 demonstrates a decline in the corrosion rate in the presence of extract; all this is due to the adsorption capacity of the extract on the surface of the metal which provides remarkable resistance against metal dissolution.

Electrochemical impedance spectroscopy

The resulting Nyquist as well as Bode diagrams are displayed in Fig. 7a, b, and resulted findings are shown in Table 8. Figure 7a also, shows the circuit which was employed in this study.

Figure 7
figure 7

Nyquist (a) and Bode plots (b), and equivalent circuit of constant phase element (CPE) for steel in 1 M H2SO4 without and with various concentrations of Terminalia bellerica extract at 298 K.

Table 8 Electrochemical parameters calculated from EIS measurements on mild steel electrode in 1.0 M H2SO4 solutions without and with various concentrations of Terminalia bellerica at 298 K.

From Fig. 7a, the diameter of the capacitive loops increased when the extract was added compared to that one without extract, indicating that this additive significantly slowed down the dissolution of steel75,76. The profiles of the spectra seem similar, and the semicircular form suggests that the corrosion mechanism was not affected by the presence or absence of the plant extract77. The outcomes of Table 8 indicate that increasing the inhibitor concentration while it reaches the highest efficiency at 4000 ppm increases the value of charge transfer resistance and inhibition efficiency. According to the Bode angle diagram, just after introduction of the inhibitor, the establishment of a protective layer on the surface, causes the curves to widen while moving to the left (toward smaller frequencies). In this study, Rct values increase with rise in inhibitor concentrations, which indicates that the extract from Terminalia bellerica is easily absorbable on the steel's surface, with a highest efficiency of 91.95% at a concentration of 4000 mg/L being observed. A presence of non-ideal capacitor can be indicated by the slightly flattened semi-circles that result from the electrode flaws and/or surface reactions78. In an analogous circuit, the capacitive element's variations are represented by a constant phase element (CPE). The variation of the capacitor behavior for a CPE is represented by a value of 0 < n < 1 (n = 1 represents a pure capacitor)72,73. For n, a value of around 0.8 was found in this study as shown in Table 8.

Analysis of phytochemicals

The phytochemicals found in the Terminalia bellerica extract are further described in Table 9.

Table 9 Phytochemical analysis of Terminalia bellerica extract.

Test for alkaloids

Wagner’s test

The extract was treated with Wagner's reagent. The development of a brownish-reddish precipitate hints the presence of alkaloids79.

Mayer’s test

Solution was tested for alkaloids using Mayer's reagent. Presence of alkaloids revealed by yellow color in the solution79.

Test for flavonoids

After addition of several drops of concentrated HCl to a small amount of the plant extract solution the quick appearance of red color was used to identify the flavonoids80.

Test for saponins

Five milliliters of water and five milliliters of filtrate are mixed vigorously. The development of steady foam is a clue that saponins are present.81.

Test for quinones

Upon addition of one mL of the extract in H2SO4, a color change is observed accordingly the existence of quinones is verified82.

Test for coumarin

To about 2 ml of the extract, a few drops of an alcoholic NaOH solution were added. The appearance of a yellow color is an evidence that coumarin exists82.

Test for sugars

Fehling solution test for sugars

Both the Fehling solutions A and B were combined in a one-to-one ratio and then boiled for 1 min. About 1 ml of an extract was taken from that mixture and then heated for 5 to 10 min in the water bath. When yellowish or brick red precipitates first appeared, The presence of carbohydrates is confirmed79,80.

UV visible spectroscopy

UV spectra of Terminalia bellerica extracts were analyzed before and after corrosion. The acidic medium having an inhibitor, while the steel was not yet submerged, showed a significantly high absorbance, as shown by the spectra. This was compared to that of the abrasive medium in which the steel was submerged for 24 h, as shown in Fig. 8. When the steel specimen was soaked in the corrosive media containing an inhibitor, a complex between the surface of the steel and the inhibitor was formed. It is clear that the various phytochemicals of the inhibitor have formed a protective layer after being adsorbed to the metal83.

Figure 8
figure 8

UV spectrum of Terminalia bellerica extract before and after the corrosion inhibition performance.

Surface investigation

Scanning electron microscope (SEM)

The morphological changes to the cleaned steel surfaces after a 24-h immersion in 1M H2SO4 with or without extract are illustrated in Fig. 9. It can be observed from Fig. 9a that the polished metal surface was not homogeneous and had a few flaws that might serve as corrosion points. Figure 9b shows a very rough surface caused by the rapid and powerful corrosion processes that took place during the immersion of steel in blank H2SO4. Accordingly a protective layer on the steel's surface was created by adding an inhibitor to 1 M H2SO4, thereby reducing the extent of surface damage caused by corrosion (see Fig. 9c)84.

Figure 9
figure 9

Surface pictures of (a) cleaned mild steel (b) corroded in 1 M H2SO4, and (c) inhibited by 4000 mg/L Terminalia bellerica’s fruit extract.

Analysis by atomic force microscope (AFM)

Figure 10a–c described the two-dimensional AFM pictures of polished, uninhibited, and protected steel in 1 M H2SO4 with Terminalia bellerica extract, respectively. For polished steel, the surface roughness value is 2.08 nm. The upper surface of the steel was extensively corroded in the absence of Terminalia bellerica extract because steel was dissolved in the acidic solution and the average surface roughness in this condition was 145.75 nm. The surface roughness measured in the presence of Terminalia bellerica extract was 23.27 nm. From the values of roughens, it is evident that a protective layer was developed on the metal's surface85.

Figure 10
figure 10

AFM images of (a) cleaned mild steel (b) corroded in 1 M H2SO4, and (c) inhibited by 4000 mg/L Terminalia bellerica’s fruit extract.

Molecular reactivity

Global reactivity

Organic molecules usually show good reactivity toward metallic surfaces or metal ions because they are rich in π-electrons and lone pairs of hetero atoms86. Such loosely tight electrons with low ionization potentials are easily reallocated in the vicinity of d-orbitals of common transition metals87,88. This donating behavior of organic molecules can be evaluated by calculating the global reactivity descriptors including ionization potential, electronegativity, chemical harness, electron affinity etc. (Table 10) in addition to the band gap between the HOMO and LUMO (Fig. 11). However, the B3LYP method underestimates the HOMO eigen value by average absolute error of 3.10 eV according to Zhang and Musgrave et. al.55.

Table 10 Calculated electronic reactivity indices for ellagic, gallic and malic acids.
Figure 11
figure 11

Frontier molecular orbitals: LUMOs (upper row) and HOMOs (lower row).

Although it cannot be predicted about the LUMO eigen value that agrees with the recorded electron affinities; therefore, a calculated accurate band gap is a challenge. Nevertheless, the estimated band gap using time-dependent (TD) B3LYP is fairly accurate. Therefore, a correction to the eigen value of HOMO could be used with the TD band gap for accurate estimation of LUMO and hence an accurate prediction for the reactivity descriptors. Correction of HOMO eigen value is carried out using the formula: \(-{HOMO}_{corr}=A+B(-{HOMO}_{cal})\) where A = 1.42 and B = 1.20; correlation parameters of B3LYP functional55. Then, an accurate value of LUMO is obtained using the formula: \(LUMO=HOMO+{\Delta E}_{gap}\). The band gap \({\Delta E}_{gap}\) calculated by TD-B3LYP for Ellagic, Gallic and Malic acids are 4.813, 5.444 and 7.562 eV, respectively (Table 10 and Fig. 11). Because the HOMO and LUMO wave functions of a moderate-sized band gap are easily combined, the molecule is quickly polarized and requires less energy to be excited56,89. Therefore, the calculated low energy gaps promote the reactivity of these molecules toward the metal surface and hence their ability as corrosion inhibition candidates in the following order Ellagic > Gallic > Malic acid.

The calculated eigenvalues for HOMO of Ellagic, Gallic, and Malic acid molecules are −8.723, −8.603, and −10.219 eV, respectively (Table 10). These low orbitals eigen values indicate that the electrons occupying these orbitals need few electron volts of energy to be ionized (i.e.: + 8.723, + 8.603, and + 10.219 eV for Ellagic, Gallic, and Malic acid, respectively) and hence can be easily shared into the metal surface. As expected, the HOMOs are mainly localized on the π-system of the carbonyl group and phenyl ring in both Ellagic and Gallic acids and on the carbonyl group and bonds including covalently attached oxygen atoms (Fig. 11). Moreover, the chemical hardness for the studied molecules was estimated as suggested by R. G. Pearson in “chemical hardness”56. Pearson suggested that in molecules where the HOMO is filled with electrons, the electronegativity divides the band gap into two parts and the addition of these parts gives the chemical hardness. Having low chemical hardness 2.407, 2.723, and 3.781 (Table 10) for Ellagic, Gallic, and Malic acid, respectively indicates that they are good candidates for strong and efficient interactions with the metal surface. Furthermore, the mutual tendency of charge transfer between two interacting entities, in this case, inhibitor and metal surface, could be calculated as follows90:

$$\Delta N=\frac{({\chi }_{metal}-{\chi }_{inh.})}{2({\eta }_{metal}+{\eta }_{inhi.})}$$
(10)

where \(\chi\) and \(\eta\) are electronegativity and chemical hardness, respectively. The predicted ΔN for the Ellagic, Gallic, and Malic acid are 0.288, 0.308, and 0.228, respectively (Table 10) revealing the good tendency of these molecules to mutually share electrons with the metal surface. Overall, global reactivity indices suggest a feasible mutual inhibitor-metal interactions between Ellagic, Gallic, and Malic acid and mild steel nominating them for effective corrosion suppression and explaining their recorded electrochemical high inhibition efficiency.

Natural bond orbital analysis

The results of NBO analysis are summarized in Tables 11, 12 and 13 for molecules of Ellagic, Gallic, and Malic acid, respectively.

Table 11 Calculated NBOs of ellagic acid at expected adsorption sites.
Table 12 Calculated NBOs of gallic acid at expected adsorption sites.
Table 13 Calculated NBOs of Malic acid at expected adsorption sites.

The Tables list natural bond orbitals at expected inhibitor-metal interactions in descending order according to their energies along with their type of bonding, electron occupancy, energy, hybridization, and percent of s and p characters. Moreover, the surface densities of these orbitals are plotted in Table S1 to Table S3 with the same descending order. Analyzing NBOs allows us to determine the importance of individual sites of a molecule to come into interaction with the steel surface. In other words, NBOs order is an order of donating ability of the electron density involved in an interaction. The results in Table 11 show that the electron density of Ellagic acid molecule can be shared into the metal surface in the following order: LP(2)O27 > LP(2)O28 > BD(2)C7-C8 > BD(2)C4-C5 > BD(2)C10-C12 > BD(2)C1-C6 > BD(2)C13-C14 > BD(2)C2-C3 > LP(2)O23 > LP(2)O19 > LP(2)O26 > LP(2)O25 > LP(2)O21 > LP(2)O17 > BD(2)C9-O27 > BD(2)C15-O28. The plots in (Table S1 to S3) show the source orbitals for these NBOs; for example, bonding orbital LP(2)O27 originates from HOMO of the Ellagic acid molecule. In other words, the HOMO of the Ellagic acid molecule is localized on the lone pair of the O27 atom and it is easier to interact with the steel surface than the other NBOs. In this order, the electronic density of BD (2)C15-O28 orbital of the double bond C15-O28 comes late at HOMO-15 which indicates a weaker ability to reallocate its density into d-orbitals of the steel metal. In accordance, the donating ability of Gallic acid molecule shows the following order: BD(2)C3-C4 > LP(2)O10 > BD(2)C5-C6 > BD(2)C1-C2 > LP(2)O13 > LP(2)O11 > LP(2)O15 > LP(2)O17 > BD(2)C9-O10 > BD(1)C3-H7 as listed in Table 12 while corresponding orbital densities from HOMO to HOMO-9 are listed in Table S2. Moreover, NBOs of Malic acid show donating behavior following the order: LP(2)O16 > LP(2)O10 > LP(2)O12 > LP(2)O14 > BD(2)C9-O16 > BD(1)C1-H2. It is worth noticing that the number of donating sites follows the order Ellagic > Gallic > Malic which in turn favors the adhering of metal surface in the same order.

Local reactivity

While global reactivity explores the tendency of a molecular entity to be involved in chemical change, local reactivity figures out the sites within this entity to react with another one. For a molecule contacting metal surface and suppress corrosion reaction, it is worthy to have electron rich regions more than electron-poor ones. These regions could be explored using a calculated molecular electrostatic potential (MEP) map shown in Fig. 12.

Figure 12
figure 12

Molecular electrostatic potential (MEP) map: from left (ellagic, gallic and malic acids).

In such map, electron-rich sites having low electrostatic potential are designated with red color and electron-poor sites are blue colored while sites with green color indicate moderate charge density content. The mapped surfaces presented in Fig. 12 show that the distribution of the colors follows the order: green > blue > red. The existence of wide areas with moderate electron density is common in organic molecules; however, maps of Ellagic, Gallic, and Malic molecules are characterized by electron-rich regions much more than electron poor-regions. The red regions are localized around carbonyl groups which agree with the order of the NBOs where HOMOs are corresponding to the lone pairs of oxygen atoms of the carbonyl groups suggesting that these groups have the priority to contact the metal surface.

Although the localization of electronic density over a particular site indicates its tendency to contact metal surface, which is useful, the magnitude of this conduct cannot be estimated from the MEP map. The magnitude of a particular site to be either nucleophile or electrophile could be determined using Fukui functions. In this procedure, the neutral molecule is charged by either a negative or a positive charge than the second derivative of energy is probed, for each atom, with respect to number of electrons and the external potential owing while molecules approaching each other as follows:

$$f\left(r\right)={\partial }^{2}E/\partial N \partial \nu$$
(11)

A good approximation to solve this equation is to use “condensed” Fukui functions on an atom-by-atom basis91:

$${f}_{k}^{-}=[{q}_{k}\left(N\right)-{q}_{k}\left(N-1\right)]$$
(12)
$${f}_{k}^{+}=[{q}_{k}\left(N+1\right)-{q}_{k}\left(N\right)]$$
(13)

Where \({f}_{k}^{-}\) and \({f}_{k}^{+}\) are electrophilic and nucleophilic Fukui indices, respectively and \({q}_{k}\) is the atomic charge. We used Hirshfeld charges since it is corrected to bond orders and is much accurate for molecules having single-double bonds in conjugations. We listed the predicted Fukui indices for the Ellagic, Gallic, and Malic molecules in Table 14 according to the descending order of electrophilic Fukui function since it is of more interest for inhibitor-metal interactions.

Table 14 Calculated condensed Fukui functions for ellagic, gallic and malic acid molecules.

Some good information can be inferred from Table 14, for example, in Ellagic acid, the oxygen atoms of carbonyl groups carry the highest \(({f}_{k}^{-}=0.073)\) electrophilic Fukui indices (O28 and O27) while those of hydroxyl groups carry lower indices ranging between 0.024 and 0.035 and those involved in the carbon skeleton are of the lowest electrophilic sites (Table 14). The same trend applies to oxygen atoms of Gallic acid; however, the presence of conjugation within the carbon rings provides stronger electrophilic sites than those of oxygen atoms. Finally, the Malic acid has the lowest electrophilic Fukui indices, though its carbonyl is much electrophilic than the corresponding carbonyl of Gallic acid which could be attributed to the conjugation of the latter with the phenyl ring.

Monte Carlo simulations

The modeling at the molecular level was done for the adsorption of Terminalia bellerica Fruit Extract (Ellagic, Gallic, and Malic acid) on steel (or Fe (1 1 0)) in the gas phase and the aqueous phase. Figure 13 displays the most stable configurations of the adsorbed Terminalia bellerica Fruit Extract modeled using MC in the aqueous phase settings. Figure 13 shows the close contact between Terminalia bellerica Fruit Extract constituents and the steel surface. This confirms their ability to compete with water and the corrosive ions in adsorption and so enhance protection92. It is noteworthy findings of the MC support the DFT investigation, which showed that the Ellagic structure has a high reactivity (completely flat and parallel adsorption) compared to Gallic and Malic acid, which are partially flat adsorbed. This may be used to support the inhibitory performance of the studied structures. Table 15 displays the binding energy and the different forms of the adsorption energy values for the Ellagic, Gallic, and Malic acid molecules. The spontaneous tendencies of Terminalia bellerica Fruit Extract constituents for adsorption are confirmed by negative adsorption energies values93. This is due to the numerous active adsorption sites found on the extract molecules. Based on the binding energy values, Ellagic has the highest binding energy followed by Gallic and Malic acid. This arrangement supports the outcomes of the DFT computation.

Figure 13
figure 13

Side and top views of the most appropriate configuration for adsorption of neutral molecules on Fe (110) Surface obtained by MC simulations in the aqueous solution.

Table 15 The outputs and descriptors calculated by the Monte Carlo simulation for adsorption of ellagic, gallic and malic acid molecules on Fe (110).

Corrosion inhibition mechanism by the extract of Terminalia bellerica on steel

A corrosion reaction consists of two electrochemical reactions: oxidation on the anode and reduction on the cathode.

$$\mathrm{Fe }\to \mathrm{ Fe}2+ + 2\mathrm{e}-$$
$$2\mathrm{H}+ + 2\mathrm{e}- \to \mathrm{ H}2$$

When the electrons of the heteroatoms donate electrons to the empty orbital of the metal, a coordinate bond is formed94.

In 1 M sulfuric acid, steel corrosion can be reduced using phytochemicals present in Terminalia bellerica extract. These phytochemicals have a variety of functional groups, like carbonyl, hydroxyl, and carboxylic acids, as well as double bonds. Figure 14 illustrates how the lone pair of heteroatoms and the multiple bonds found in the phytochemicals form a coordinate bond. It is the inhibitory activity of the plant extract on the metal surface that leads to blocking of the active site.

Figure 14
figure 14

Terminalia bellerica’s phytochemical adsorption on steel to form protective layer.

Conclusion

  1. 1.

    The weight reduction method, potentiodynamic polarization study, and DFT were used to assess the corrosion resistance of steel immersed in H2SO4 in the absence of Terminalia bellerica extract and in presence of extract.

  2. 2.

    The addition of a fruit extract from Terminalia bellerica seems to increase the effectiveness of corrosion inhibition.

  3. 3.

    It has been found that at a concentration of 4000 ppm, the inhibitory efficacy was 91.79%.

  4. 4.

    The potentiodynamic polarization investigation shows that when the concentration of Terminalia bellerica extracts raises, the corrosion current density decreases.

  5. 5.

    The various phytochemicals found in the extract have an impact on the inhibition's potency.

  6. 6.

    As the inhibitor concentration is increased, the inhibition efficiency improves.

  7. 7.

    According to the NBO study, Ellagic acid has a stronger inhibitory efficiency due to the low energy gaps that may promote the reactivity of these molecules toward the metal surface.

  8. 8.

    As a result of the Langmuir adsorption isotherm, SEM, and AFM, the adsorption process has been identified as the mechanism that prevents corrosion.