1 Introduction

Mild steel possessed good tensile strength and it has low cost. It is easy to fabricate and hence readily available. These account for its being widely used in many industries. However, it suffers severe corrosion when it comes in contact with acid solutions during acid cleaning, transportation of acid, de-scaling, storage of acids and other chemical processes. Corrosion is a natural phenomenon, which degrades the metallic properties of metals and alloys. Corrosion of metals is a major industrial problem that has attracted much investigations and researches, in some cases corrosion inhibitors are introduced to reduce the menace of corrosion. Most of the corrosion inhibitors are synthetic chemicals, expensive and hazardous to the environment. The need to source for environmentally safe corrosion inhibitors is being advocated [1, 2]. Most of the best known corrosion inhibitors are organic compounds which contain hetereatoms and pi-electrons in triple or conjugated double bonds [3]. The heteroatoms serve as a major adsorption centre in these inhibitors. Green corrosion inhibitors are compounds of plant origin, hence are cheap, biodegradable and do not contain heavy metals or other toxic substances. Literature surveys have shown that the inhibitive effect of some plant’s extract, is due to the adsorption of phytochemicals present in the plant onto the metal surface [4, 5], which encapsulates the metal surface and thus prevent corrosion process from taking place [6,7,8,9]. Acalypha chamaedrifolia is a readily available plant in all season in the tropics (Fig. 1).

Fig. 1
figure 1

The Acalypha chamaedrifolia plant

The plant leaves is occasionally used to treat skin disease in infant by the local. The study is aimed at establishing the corrosion inhibitive potential and mechanism of corrosion inhibition of mild steel in acid medium by Acalypha chamaedrifolia leaves extract.

2 Materials and methods

2.1 Collection and preparation of plant materials

The leaves of Acalypha chamaedrifolia were obtained from biological science garden, Faculty of Science, Ahmadu Bello University, Zaria, Kaduna State, Nigeria. The plant was first identified at the field using standard keys and description. Its botanical identity was further confirmed and authenticated at herbarium section of the botany unit of the Department of biological science, Ahmadu Bello University, Zaria. The Acalypha chamaedrifolia leaves trimmed uniformly into pieces. 50 g of the leaves was soaked in 250 cm3 of 99% methanol for 48 h, filtered and the filtrate concentrated using rotor evaporator. Varying concentration of 0.25, 0.5, 0.75, 1.00 and 1.25 g/L of the extract was prepared in 1 M HCl and used for further studies.

2.2 Infrared analysis

FTIR analysis of the plant extract was carried out using Scimadzu FTIR-8400S Fourier transform infra red spectrophotometer. The sample was prepared using NUJOL and the analysis was done by scanning the sample through a wave number range of 500–4500 cm−1.

2.3 GC–MS analysis

The GC–MS analysis was carried out on a GC Clarus 500 Perkin Elmer system comprising of a AOC-20i auto-sample and gas chromatograph interfaced to a mass spectrometer (GC–MS) instrument employing the following condition: column Elite-1 fused silica capillary column (30 × 0.25 mm ID × 1 μm df, composed of 100% Dimethylpoly diloxane), operating in an electron impact mode at 70 eV; helium (99.999%) was used as carrier gas at a constant flow of 1 mL/min and an injection volume of 0.5 μL was employed (split ratio of 10:1) injector temperature 250 °C; ion-source temperature 280 °C. The spectrum was programmed from 110 °C (isothermal for 2 min), with an increase of 10 °C/min, to 200 °C, the 51 °C/min to 280 °C., ending with a 9 min isothermal at 280 °C. Mass spectra were taken at 70 eV; a scan interval of 0.5 s and fragments from 40 to 450 Da. Total GC running time is 36 min. Interpretation on mass spectrum GC–MS was conducted using database at National Research Institute of Chemical Technology (NARICT) Zaria. The spectrum of the unknown component was compared with the spectrum of the known component stored in the National Institute of Science Technology (NIST) library. The name, molecular weight and structure of the components of the test materials were ascertained.

2.4 Preparation of mild steel

Mild steel was obtained from the Department of Metallurgical Engineering, Ahmadu Bello University, Zaria. The chemical composition in wt% was C = 0.181, Si = 0.056, Mn = 0.474, S = 0.039, P = 0.039, Ni = 0.078, Cr = 0.038 and the rest Fe. Mild Steel specimens of size 2 cm × 1 cm × 0.27 cm were used in weight loss experiments. The concentration of HCl used for the experiments were 1 M. Thread was tied to each of mild steel pieces for easy suspension in the media. Each coupon was mechanically polished using emery papers to remove scaling, surface contaminants and oxide film on the surface of the coupons. This was followed by degreasing with acetone to remove grease, dirt or dust. The degreased coupons were then stored in a desiccator prior to corrosion study experiments to avoid reaction with the environment as reported in literature [10, 11].

2.5 Gravimetric method

Weight loss technique was employed in the experiment as follows. Each coupon was weighed using Analytical weighing balance and recorded as weight W1. The coupon was suspended in a 100 cm3 beaker using a thread. A 100 cm3 of 1 M HCl was introduced into reaction beakers. The experimental set-up was kept in the laboratory away from direct sunlight, while the time of exposure for each coupon was carefully noted. Each coupon was retrieved from the test medium in intervals of 24 h. The corroded coupons were washed in 20%NaOH in 100 g/L zinc dust to stop the corrosion reaction and dried using acetone. The coupons were reweighed and the final weights, W2 recorded. Weight losses, ΔW = W1 − W2 were calculated. The inhibition efficiency % IE and surface coverage θ was determined by using the following equations:

$$\begin{aligned} & \theta = \frac{{{\text{W}}_{ 0} - {\text{W}}_{\text{i}} }}{{{\text{W}}_{ 0} }} \\ & \% IE = \frac{{{\text{W}}_{ 0} - {\text{W}}_{\text{i}} }}{{{\text{W}}_{ 0} }} \times 100 \\ \end{aligned}$$

where wi and w0 are the weight loss value in presence and absence of inhibitor, respectively.

The experiment was repeated using a concentrations of 0.25 g/L, 0.50 g/L, 0.75 g/L, 1.00 g/L, 1.25 g/L, of the plant extract in the 1 M HCl medium, a varying time of between 24 and 120 h and at a varying temperature of between 25 and 65 °C for a time of 2 h. The corrosion rate (CR) is expressed as an increase in corrosion depth per unit time in (mg cm−2 h−1). The corrosion rate equation is given as:

$${\text{C}}\;{\text{R}} = \Delta {\text{W/At}}$$

where ΔW = weight loss of coupon, t = immersion time, and A = area of coupon.

2.6 Molecular dynamics simulation

In order to sample many different low energy configurations and identify the low energy minima, molecular dynamics (MD) simulation of the interactions between a single molecule of interest and Fe surface was performed using Forcite quench molecular dynamics in the Material Studio (MS) modelling 7.0 software. Calculations were carried out using COMPASS II force field and Monte Carlo algorithm in a simulation box 17 Å × 12 Å × 28 Å with a periodic boundary condition, to model a representative part of the Fe slab and a vacuum layer of 20 Å height. The Fe crystal was cleaved along the (110) plane with a fractional depth of 3.0 Å. The geometry of the bottom layers were constrained before optimizing the Fe (110) surface which was subsequently enlarged into a 10 × 9 supercell to avoid edge effects [2, 12]. Temperature was fixed at 290 K which represents a tradeoff between a system with too much kinetic energy where the molecule detaches from the surface and a system with not enough kinetic energy for the molecule to move around the surface [13]. Temperature was fixed with the NVE (microcanonical) ensemble with a time step of 1 fs and simulation time 5 ps. The system is quenched every 250 steps. Forcite optimised structures of the constituents from the plant extracts compounds and the Fe surfaces were used to sample the different interactions of the molecule with the surfaces [14, 15].

3 Results and discussion

3.1 FTIR study

Table 1 presents the band assignments of Acalypha chamaedrifolia extract. Analysis of the spectrum reveals the presence of O–H stretch due to alcohol or phenol group at 3347 cm−1, C–H aliphatic stretch at 2935 cm−1, O–H stretch of carboxylic acid at 2725 cm−1, C–O stretch due to alcohol, carboxylic acid, esters, or ethers group at 1159 cm−1, C=O stretch at 1625 cm−1, C–H stretch in ring due to aromatic at 1455 cm−1, O–H bend due to carboxylic acid at 1061 cm−1, C–H rocking vibration at 1366 cm−1, N–H stretch at 3191, and C–F stretch at 451 cm−1.

Table 1 The functional groups identified from the FTIR spectrum of the extract

3.2 GC–MS study on the extract

Figure 2 shows the GC–MS spectrum of Acalypha chamaedrifolia leaves extract. It is evident that the spectrum of the extract consists of thirteen peaks characterized with several retention time (RT) and fragmentation peaks as presented in Table 2. Since area under a chromatogram is proportional to the concentration of the identified substance in each fraction, area normalization was also carried out in order to calculate the percentage constituent of molecules identified in each fraction.

Fig. 2
figure 2

GC–MS spectrum of Acalypha chamaedrifolia leaves extract

Table 2 The information derivable from the GC–MS spectrum of the sample

The GC–MS result shows presence of haloalkane, carboxylic acid, alkanoate, and alkanol. It is observed from the result that majority of the compounds are alkanoate. A careful analysis of chemical structures of the compounds reveals that this extract is a good corrosion inhibitors because it possessed π-electrons that can ease their adsorption on the metal surface, and hetero atoms (i.e. N, S, and O), which can act as adsorption centers as reported in literature [16].

3.3 Effects of inhibitor concentration on inhibition efficiency of the extract

Figure 3 shows that inhibition efficiency (IE %) increases with increase in the concentration of the extract. Similar observation was reported by Onuegbu et al. [17]. The inhibition efficiency increased from 70.34 to 85.11% as the concentration of the inhibitor increased from 0.25 to 1.25 g/L while the corrosion rates dropped from a value of 0.49 mg cm−2 h−1 for the uninhibited medium to a value of 0.15 mg cm−2 h−1 for the inhibited medium of 1 M HCl in 0.25 g/L of the extract. This implies that the corrosion rate decreases with increase in the concentration of the extract, indicating that the extract is effective in inhibiting corrosion of mild steel. This is in agreement with several literatures [9, 17,18,19,20,21].

Fig. 3
figure 3

Variation of inhibition efficiency (IE) with concentration of the inhibitor in acid medium

3.4 Effect of immersion time and temperature on corrosion rate

Figure 4 is the plot of corrosion rate against immersion time. The corrosion rate increases as the immersion period is lengthen at a fixed concentration of the extract. The corrosion rate increased with increase in temperature (Fig. 5).

Fig. 4
figure 4

Variation of corrosion rate with immersion time for the corrosion of mild steel in solution of 1 M HCl containing 0.5 g/L of inhibitor

Fig. 5
figure 5

Variation of corrosion rate with temperature for the corrosion of mild steel in solution of 1 M HCl containing 0.5 g/L of inhibitor

3.5 Adsorption study

The adsorption isotherms are used to study the interaction between inhibitor and mild steel surface. The values of surface coverage (θ) were evaluated using CR values obtained from the weight loss method. The values of surface coverage at different concentrations of inhibitor in HCl medium at temperature of 290 K is used to generate the isotherm data.

The plots of log(θ/1 − θ) versus log C yielded a straight line (Fig. 6), where C is the inhibitor concentration, proving that the inhibition is due to the adsorption of the active compounds onto the metal surface and obeys the Langmuir isotherm. It is significant to note that this plots is linear and gave a positive value of slope equal to 0.97, which indicates a strong adherence to the Langmuir adsorption isotherm [17, 19, 21].

Fig. 6
figure 6

Langmuir isotherm plot for adsorption of inhibitor on the mild steel surface

3.6 Computational and theoretical considerations

The structures of the constituents in the GCMS spectrum of the plant extract used to inhibit the corrosion of mild steel in an acid media, were identified and presented in Fig. 7 and the line number further used in the course of this computational study were specified for the molecules as (line 1) 5,5-dimethyloxazolidine-2,4-dione, (line 5) Methyl stearate, (line 10) (Z)-tetradec-9-enal and (line 11) (3Z,13Z)-2-methyloctadeca-3,13-dien-1-ol.

Fig. 7
figure 7

The molecular structures of the investigated plant extract composition, selected on the basis of percentage composition and structural diversity with the rest matrix

The optimized structures of the compounds, the highest occupied molecular orbital and lowest molecular orbitals are presented in Fig. 8. The structures aligned horizontally with their respective line numbers. It is evident from Fig. 8 that the HOMO of the molecules are in areas with hetero atoms and exposes the possibility of these atoms to donate lone pairs of electron to the surface of the Fe metal, while the LUMO was mostly found around the molecules with double bonds. Representative snapshots from Adsorption Annealing Study of the four selected constituents of the plant extract on Fe (110), highlighting the soft epitaxial adsorption mechanism with accommodation of the molecular backbone in distinctive epitaxial channels on the metal surface is shown in Fig. 9. The differential adsorption energy was calculated and presented in Tables 3 and 4. The differential adsorption energy of these compounds were found to correlate with the energy of the HOMO, hence the ability for the compound to adsorb strongly on the surface of the metal is greatly improved by the number of heteroatoms that are available for donating lone pairs of electron on the low lying d-orbitals or interstitial spaces of the Fe metal and the number of double bonds present in the LUMO of the compounds used for accepting any electron released as a result of the metal bonds trying to achieve a certain stability on the mild steel.

Fig. 8
figure 8

Electronic properties of some constituents of the GCMS spectrum of the plant extract: a optimized structure, b HOMO orbital, c LUMO orbital and the GCMS Line number (atom legend: light gray H, dark gray C, red O and deep blue N). The isosurfaces (larger lobes) portray the electron density variance; the darker sections display electron build-up, whereas the lighter sections show electron loss

Fig. 9
figure 9

Representative snapshots from adsorption annealing study of the four selected constituents of the plant extract on Fe (110)

Table 3 Differential adsorption energy of the plant extract composition for five Iterations on Fe (110) surface
Table 4 Mean and Standard deviation of the differential adsorption energy of the GCMS line number representing the selected constituents of the plant extract

Lines 1 and 5, which are 5,5-dimethyloxazolidine-2,4-dione and Methyl stearate respectively were found to have the highest adsorption energy in the plant. This correlated with the composition of this component for 5,5-dimethyloxazolidine-2,4-dione, but vary for Methyl stearate which was related to the presence of high LUMO type orbitals responsible for accepting back-donated electron from the metal surface and its molecular weight just as reported in the literature [22].

The molecular dynamics model of the individual molecules selected for this study namely (line 1) 5,5-dimethyloxazolidine-2,4-dione, (line 5) Methyl stearate, (line 10) (Z)-tetradec-9-enal and (line 11) (3Z,13Z)-2-methyloctadeca-3,13-dien-1-ol adsorbed on Fe (110) were presented in Figs. 10, 11, 12 and 13, highlighting the soft epitaxial adsorption mechanism of the compounds on the metal surface which was further exploited in calculating their Binding Energies.

Fig. 10
figure 10

Molecular dynamics model of a single 5,5-dimethyloxazolidine-2,4-dione molecule (line 1) adsorbed on Fe (110): a side view, b on-top view

Fig. 11
figure 11

Molecular dynamics model of a single methyl stearate molecule (line 5) adsorbed on F(110): a side view, b on-top view

Fig. 12
figure 12

Molecular dynamics model of a single (Z)-tetradec-9-enal molecule (line 10) adsorbed on Fe (110): a side view, b on-top view

Fig. 13
figure 13

Molecular dynamics model of a single (3Z,13Z)-2-methyloctadeca-3,13-dien-1-ol molecule (line 11) adsorbed on Fe (110): a side view, b on-top view

The binding energies of the molecules under study are presented in Table 5. Methyl stearate (line 5) and (3Z,13Z)-2-methyloctadeca-3,13-dien-1-ol (line 11) were found to have the highest binding energy of − 197.69 ± 3.12 and − 194.56 ± 10.04 in kcal/mol respectively. These were found to be in the range of compounds having relative high binding affinity for Fe metal as reported by Eddy et al. [23]. The binding energy of these compounds indicates that they would be a very good corrosion inhibitor for mild steel and other Fe related materials.

Table 5 The binding energy of the plant extract constituents determine from their adsorption annealing study on Fe (110) surface

4 Conclusion

The corrosion inhibition efficiency of Acalypha chamaedrifolia extract increases with concentration of the inhibitor, immersion time and experimental temperature. The inhibitor showed maximum inhibition efficiency of 85.11% at a concentration of 1.25 g/L for an immersion period of 24 h at 290 K. The inhibitive properties of Acalypha chamaedrifolia extract is due to the adsorption of the active compounds onto the metal surface and obeys the Langmuir adsorption isotherm with a correlation coefficient 0.97. The GC–MS spectrum shows presence of haloalkane, carboxylic acid, alkanoate, and alkanol. The optimized structure of the compounds of interest shows that the HOMO of the molecules are in areas with hetero atoms and this suggests the possibility of these atoms to donate lone pairs of electron to the surface of the Fe metal, while the LUMO was mostly found around the molecules with double bonds. The differential adsorption energy of these compounds were found to correlate with the energy of the HOMO, hence the ability for the compound to adsorb strongly on the surface of the metal is greatly improved by the number of heteroatoms that are available for donating lone pairs of electron on the low lying d-orbitals or interstitial spaces of the Fe metal and the number of double bonds present in the LUMO of the compounds used for accepting any electron released as a result of the metal bonds trying to achieve a certain stability on the mild steel. Evidence from molecular dynamics model shows that Methyl stearate (line 5) and (3Z,13Z)-2-methyloctadeca-3,13-dien-1-ol (line 11) were found to have the highest binding energy of − 197.69 ± 3.12 and − 194.56 ± 10.04 in kcal/mol respectively. The binding energy of these compounds indicates that they would be a very good corrosion inhibitor for mild steel and other Fe related materials.