Introduction

Metal corrosion is a difficult task, especially in the steel, oil, and gas industries, because mild steel surface corrosion has a long-term impact on industrial projects. For many years, corrosion scientists have been searching for a corrosion inhibitor that has a significant effect with a small amount in an aggressive environment (Pan et al. 2012; Sastri 2011; Yadav and Quraishi 2012; Gopi et al. 2014; Kumar et al. 2013). The efficacy of corrosion inhibitors based on organic compounds containing oxygen, sulfur, and nitrogen atoms is promising (Yadav and Quraishi 2012; Gopi et al. 2014; Kumar et al. 2013). Nonetheless, the physicochemical properties of the molecule, which are related to its aromaticity, functional groups, electronic density of donors, nature of the corrosive solution, and the type of interaction between the p-orbital of the organic molecule and the d-orbital of steel, determine the stability of the protective inhibitor film layer formed on the metal surface (Yadav and Quraishi 2012; Gopi et al. 2014; Kumar et al. 2013; Murulana et al. 2015; Saha et al. 2015).

The influence of molecular structure, particularly on chemical reactivity, is a major research topic at the moment (Saha et al. 2015; Oguzie et al. 2007a, b; Karthik et al. 2014; Bereket et al. 2001). Many quantum-chemistry studies have been carried out in the course of developing novel and efficient organic corrosion inhibitors in order to better understand the relationships between inhibition efficiency and the molecular properties of various types of compounds (Kumar et al. 2013; Murulana et al. 2015). The molecular structure and relevant electronic parameters that can be calculated theoretically, such as the HOMO (highest occupied molecular orbital) energy, the LUMO (lowest unoccupied molecular orbital) energy, and the energy of the gap, (E = ELUMO—EHOMO), are associated in the inhibitors' relativities (Khalil 2003; Costa and Lluch 1984; Obi-Egbedi et al. 2011a, b; Chidiebere et al. 2014a, b; Guo et al. 2017a, b; Hammer et al. 1999). As a result, density functional theory (DFT) is an appealing theoretical technique that provides insight into the fundamentals. For this reason, density functional theory (DFT) is an attractive theoretical technique hence it provides insight on the basic parameters for complex molecules even at no cost. It is therefore a very important approach to probe the inhibitor/metal surface interaction and to complement this with experimental data.

The effectiveness of these organic compounds having sulfur, oxygen and nitrogen heteroatoms as a good inhibitor depends on its ability to be firmly adsorb on the metal surface (Pan et al. 2012; Sastri 2011; Yadav and Quraishi 2012). The coordination affinity of iron towards sulfur, nitrogen and oxygen is well known. Among majority of the organic compounds, heterocyclic molecules containing nitrogen and sulfur atoms, e.g. substituted triazole molecules are considered to belong to a good class of inhibitors for metal protection in aggressive solutions (Kumar et al. 2013; Murulana et al. 2015; Saha et al. 2015; Oguzie et al. 2007a). Some researchers have made major contributions to the use of pharmacological compounds (drugs) as corrosion inhibitors. The influence of some amide compounds (1 and 2) employed as corrosion inhibitors on C-steel in 1.0 M HCl solution using weightloss, and electrochemical techniques have been investigated and the results revealed that the highest inhibition efficiency values of 99% for compound (1) and 98.8% for compound (2) at maximum concentration tested (50 µM) by polarization method was obtained. Polarization studies reveal that these inhibitors behaved in a mixed type manner. The mode of adsorption on the carbon steel obeys Langmuir adsorption isotherm (Fouda et al. 2021). Megavit zinc drugs have been employed for the corrosion inhibition of steel in 1 M HCl environment, the obtained result shows an increase in inhibition efficiency with an increase in concentration and a decreased with rise in temperature. Potentiodynamic polarization data show that the expired drugs retard both anodic and cathodic potential suggesting it is a mixed inhibitor (Hameed et al. 2021). Cemitidine performed well on mild steel in a 1 M HCl media, with a maximum efficiency of 95.6 percent at 600 mgL-1 in their testing. The drug molecules adsorption on the steel surface followed the Langmuir isotherm (Singh et al. 2014). When ceftobiprole was tested on mild steel in a 1 M HCl media, it had a high efficiency of 92.2 percent at 93.1 mM concentration. In a 1 M HCl environment, cephalothin with a thiophene structure was tested in an API 5L X52 steel (36). A 92 percent inhibitory efficiency was found at a dosage of 600 mgL-1. The medication was adsorbing on the metallic surface according to the Langmuir isotherm (Singh and Quraishi 2011). Naphthoquinones and chloroguanide chemical compounds have high attraction toward mild steel due to the existence of p-electrons and unshared electron pairs on the oxygen and nitrogen atoms that can interact with the d-orbitals of the metal surface, resulting to the formation of a protective thin film (Oguzie et al. 2007b; Karthik et al. 2014; Jarvis et al. 2015; Yesudass et al. 2016; Yurt et al. 2006; Khaled et al. 2012; Schmitti and Bedbur 1985; Quraishi and Jamal 2000; Finšgar et al. 2009a, b; Okafor et al. 2008; Oguzie et al. 2012).

The aim of this study is to investigate the possible adsorption sites, adsorption energies and anti-corrosion properties of the active components of Malarone Pediatric malaria drug namely Atovaquone[trans-2-[4-(4-chlorophenyl)cyclohexyl]-3-hydroxy1,4-naphthalenedione (CCHN)] and Proguanil hydrochloride [1-(4-chlorophenyl)-5-isopropylbiguanide hydrochloride (CIBH)]. The 3 D structures of the two compounds are presented in Fig. 1. Careful scrutiny of the selected active components of malarone pediatric malaria drug structure reveals the presence of some heteroatoms, oxygen, nitrogen, fluorine etc. these are useful in the protection of metals. Considering this, the selected active components of this drug could be considered as effective corrosion inhibitors hence their use in this current research. Furthermore, the inhibition mechanisms of the two compounds were investigated using theoretical modeling, with some surface probe analysis namely SEM, AFM and EDX, respectively.

Fig. 1
figure 1

Molecular structure of CCHN and CIBH inhibitors

A flowchart of the steps involved in the investigation is shown in Fig. 2. In Step 1, theoretical modeling approach was used to determine the potential adsorption sites and adsorption energies of the compounds chosen as corrosion inhibitors. In Step 2, the three electrochemical techniques were used to determine the efficacy of the selected inhibitors (CCHN and CIBH), but the first technique (OCP) was used specifically to achieve a steady state for the test solution. The final stage (Step 3), surface probe techniques (AFM, SEM/EDX) was also used to view the surface morphology of the metal surfaces before and after the experimental runs; this step was used to supplement the experimental techniques.

Fig. 2
figure 2

A flowsheet of the procedure involved in this study

Experimental

Preparation of materials

Tests were carried out on mild steel specimens having a weight percentage composition as listed: C − 0.05%; Mn − 0.6%; P − 0.36%; Si − 0.3% and the balance Fe 98.9%. The metal sheet was cut to 1 cm × 1 cm × 0.3 cm dimension employing mechanical cutter. These coupons were polished under running water—with the aid of emery paper of diffferent grades (from grade #600 to #1200). Thereafter, the coupons were carefully degreased, cleaned using distilled water, dried with warm air and stored in moisture-free desiccator that contains silica gel prior to use. The test environment is 1 M Hydrochloric acid. Various concentrations of CCHN and CIBH used for this experiment were prepared by weighing out and adding the accurate grams directly to the test environment. The obtained solutions were allowed to stand for a while before use. Solutions containing CCHN and CIBH were prepared in the desired concentration range (0.2 g/L and 1.0 g/L).

Electrochemical technique

Electrochemical tests were conducted using a PARSTAT-2263 (Princeton Applied Research) Advanced Electrochemical System workstation. The electrolytic cell, made of cylindrical glass, contains the three conventional electrodes; a graphite rod (counter electrode), a saturated calomel electrode (SCE) (Hg/Hg2Cl2/KCl reference electrode), the working electrode (mild steel). The SCE reference electrode was employed because the offer stable half-cell potentials that do not change over time or with temperature. In addition, the loss of electrolyte to evaporation does not change the saturated nature of the solution, nor the potential. The mild steel employed as the working electrode was mounted in epoxy resin with a surface area of 1 cm × 1 cm × 1 cm exposed to the test solution under inquiry. The central processing system with a visual monitor, electrochemical workstation and the terminals of electrolytic cell were properly connected using luggin capillaries.

Open circuit potential was performed for a duration of 1800s, to achieved a steady state potential for the test solution before commencing the EIS and PDP experiment. At a temperature of 303 K, the measurements were performed in aerated and stagnant solutions at the end of 1800s of immersion. Polarization curves were obtained by scanning the electrode potential from—250 mV to + 250 mV versus corrosion potential (Ecorr) at a scan rate of 0.166 mVs _ (Pan et al. 2012). The linear polarization segments of anodic and cathodic curves were extrapolated to acquire corrosion current densities (I corr). Power suite software was used to extrapolate experimental data.

EIS experiments were executed using PARSTAT-2263 (Princeton Applied Research) Advanced Electrochemical System workstation. Impedance measurements were made at corrosion potentials (Ecorr) over a frequency range of 100 kHz—0.1 Hz, with a signal amplitude perturbation of 5 mV. A graphite electrode and saturated calomel electrodes (SCE) were employed as the counter and reference electrodes, while mild steel was used as the working electrode. The electrochemical data was analyzed using the ZSimpWin 3.10 software modeling package.

The EIS technique employed to monitor the performance of thin film normally formed on the metal surface due to adsorption of the active components of the inhibitor. It provides evidence of adsorption, this uses alternating current (AC) as a result the system is not perturbed. While the PDP technique was employed to provide evidence on the effect of the inhibitors on the anodic and cathodic partial reactions, this could help to classify the inhibitor as a cathodic, anodic or mixed type, respectively. A direct current (DC) is used in this technique. Each experimental measurement (EIS and PDP) was repeated three times to ensure reproducibility of the results.

Scanning electron microscopy

To have a thorough view of the surface morphology of the substrate under investigation, XL-30FEG type scanning electron microscope was used. The surface morphology of the metals after dipping in the absence and presence of CCHN and CIBH were carefully viewed. Mild steel with specifications of 1 cm × 1 cm × 0.25 cm were carefully prepared and immersed for 24 h in 1 M HCl solution, in the absence and presence of the best concentration (1.0 g/L) of CCHN and CIBH inhibitors. After which, the specimens were unimmersed and cleaned with distilled water, it was further dried in warm air and submitted for the desired SEM analysis.

Atomic force microscopyc

Picoplus 2500 surface probe microscope was used for three-dimensional AFM studies. Mild steel specimens 1.5 cm × 1.5 cm × 0.2 cm were immersed in the test solutions for 24 h at 303 K with and without 1 g/L CCHN and CIBH.. After the substrates were retrieved, they were cleaned thoroughly using distilled water and dried in warm air. All measurements were carried out thoroughly.

Theoretical approach

The DFT calculations were performed with the aid of DMol3 package. DMol (Yadav and Quraishi 2012) is employed to model the electronic structure and energetics of molecules, solids, and surfaces using density functional theory (DFT). This was achieved using a Mulliken population analysis (Oguzie et al. 2012). All the electronic parameters for this model involve the Generalised Gradient Approximation (GGA). It is the simplest one-point functional which explicitly includes effects of electron density inhomogeneity. The GGA is regarded as the gradient-corrected functional method, it was used with a double numeric plus polarization (DNP) basis set and a Becke One Parameter (BOP) functional. The solvation effects (aqueous phase) was included in DMol (Yadav and Quraishi 2012) calculations by COSMO controls. The model was used to model solvation effects. For assessment of the core electrons at the lowest atomic orbitals, the DFT semicore pseudopotentials (DSPP) was made active (Yadav et al. 2014). The self-consistent field (SCF) procedure was carried out with a convergence of 10−5. Furthermore, a Fermi daubing parameter of 0.005 hartree was fasten the level of SCF merging. The geometry optimization was reached with the aid of the COMPASS force field and Smart minimization method, further geometrical optimization of CCHN and CIBH structures were carried out employing neglect of diatomic differential overlap (NDDO) with Austin Model 1 (AM1) Hamiltonian, this was performed in the semi-empirical molecular orbital package VAMP, to determine the molecular surface area (Chidiebere et al. 2012). Vital parameters such as EHOMO, ELUMO, the energy gap ΔE (ELUMO − EHOMO), molecular surface area, and adsorption energy were obtained for the CCHN and CIBH molecules in order to predict its activity toward the Fe surface.

As previously described (Finšgar et al. 2009b), molecular dynamics (MD) simulations were performed to determine the adsorption energy of the molecules under study unto the metal surface. MD simulation was carried out inside a simulation box with periodic boundary conditions using Materials Studio software. The iron crystal was imported and cleaved along the (110) plane, with a slab of 5 used. The energy of the Fe (110) surface was reduced using the smart minimizer technique, which relaxed it. The Fe (110) surface was expanded to a (12 × 12) supercell to provide a larger surface area for the interaction ofI the organic components.

In an approximated electrolyte solution containing 500 H2O, 5 H3O+, and 5 Cl-, a vacuum slab with zero thickness and a supercell with size a = b = c = 27.20 Å were built for each active species. The quantum chemical computations were performed as contained in the Materials Studio 7.0 software. The simulation was performed in a mockup box (26.01 Å × 26.01 Å × 37.86 Å) with the aid of a discover module with a time step of 1 fs and simulation time of 500 ps at 350 K. The adsorption energy between the inhibitor structures and Fe (110) was estimated by calculating the interaction energies using Equation [1]:

$${E}_{\mathrm{adsorption}}={E}_{\mathrm{total}}-({E}_{\mathrm{surface}\ +\ \mathrm{solution}}+{E}_{\mathrm{inhibitor}})$$
(1)

where Etotal denotes the total energy of the system, Esurface + solution represents the total energy of Fe (110) surface and solution without the inhibitor film and Einhibitor signifies the total energy of inhibitor film. Adsorption energy is related to interaction energy by the relation; (EAdsorption = 

- Einteraction). Substantial positive adsorption energies and the corresponding pronounced negative interaction energies indicate spontaneous interactions (Finšgar et al. 2009b; Okafor et al. 2008; Oguzie et al. 2012).

Results and discussion

Electrochemical discussion

Open circuit potential analysis

Presented in Fig. 3a and b are the open circuit potential (OCP) results gotten in the uninhibited and inhibited solutions of 1 M HCl containing CCHN and CIBH at 303 K. The presented result shows that the environments subjected to examination reached a significant level of steady state before the EIS and PDP experimentation was carried out. The values obtained within a time limit of 3600 s in the presence of CCHN and CIBH inhibitors tend to shift towards the noble areas in each case. The observed behavior reveals a slight anodic effect on the corrosion inhibition process, though at different degrees in both environments.

Fig. 3
figure 3

A plot of potential with elapsed time in; (a) 1 M HCl + CCHN and (b) 1 M HCl + CIBH at various concentrations

Polarization results

Corrosion process is electrochemical in nature (i.e. cathodic and anodic half reactions), therefore, the need to ascertain the influence of CCHN and CIBH on the different reaction forms. PDP technique provides a perfect insight in this regard.

Presented in Fig. 4 is the potentiodynamic polarization results obtained for the polished steel in 1 M HCl environment in the presence and absence of the inhibitors (CCHN and CIBH). From the presented polarization curves, the corrosion potential (Ecorr) and corrosion current density (Icorr) were obtained by means of Tafel extrapolation for each duplicate measurement.

Fig. 4
figure 4

Potentiodynamic polarization spectra of mild steel in 1 M HCl showing the effect of: (a) CCHN and (b) CIBH

The substrate exhibited rapid dissolution. The polarization curves/results, did not reveal any form of passivation within the investigated potential range.

The data acquired are shown in Table 1. On introduction of 0.2 g/L and 1.0 g/L concentrations of CCHN and CIBH, a significant influence on the electrochemical corrosion behavior of mild steel samples was recorded. Considering the effect of the inhibitors on corrosion potential, careful scrutiny of the results showed that the presence of CCHN (see Fig. 4a) and CIBH (see Fig. 4b) had a slight but negligible effect on the corrosion potentials of the polished steel, compared to that in the uninhibited environment.

Table 1 Polarization Parameters for Mild Steel in 1 M HCl in the Absence and Presence of CCHN and CIBH extract at 303 K

The polarization curves reveal that the introduction of the inhibitors shifts the cathodic and anodic curves towards direction of lesser current densities. Careful scrutiny of the cathodic curves reveals that the cathodic current versus potential curves resulted to parallel polarization This phenomenon has been attributed to the steadiness of the mechanism of the cathodic reaction with a change in the concentration of the inhibitors showing that the inhibition of the corrosion of the steel in the environments containing CCHN and CIBH is due to the efficient blockage of the cathodic sites by these inhibitor molecules (Dubey and Singh 2007).

The higher the corrosion current (Icorr) values, the lower the inhibition process with time. Comparing the results, presented in Table 1, it is apparent that the Icorr values retarded considerably in the presence of CCHN than CIBH, showing that the interaction of CCHN species with the mild steel formed a more compact film on its surface. The observed phenomenon retarded the penetration of the corrosive species and rapid formation of corrosion products with time.. In the test environment, CCHN and CIBH shifts Ecorr in the anodic direction and consequently retards the anodic and cathodic reactions, with the former effect being slightly pronounced at low and high concentrations.

Previous reports have revealed that if a shift in Ecorr is greater than 85 mV or lesser than 85 mV, the inhibitor could be termed as cathodic or anodic in behavior depending on the direction of shift. Furthermore, if a shift in Ecorr is less than85 mV, the inhibitor is regarded as a mixed type (Gopi et al. 2014; Oguzie et al. 2007b; Khalil 2003). Nevertheless, the result reveal that the shift in Ecorr towards the anodic direction is less than 85 mV, suggesting a mixed inhibition mechanism.

Considering the presented data in Table 1, the Icorr values reduced considerably on addition of CCHN and CIBH inhibitors compared to the uninhibited solution, it is obvious that the inhibition process is concentration dependent. The inhibition efficiency was calculated using the equation:

$$IE\%= \left(\frac{{I}_{corr(bl)}-{I}_{corr(inh)}}{{I}_{corr(bl)}}\right) \times 100$$
(2)

where \({I}_{corr(bl)}\) and \({I}_{corr(inh)}\) shows the corrosion current density without and with CCHN and CIBH (Dubey and Singh 2007). Another point that is of significant consideration is the issue of hydrogen evolution which is always thermodynamically conceivable in the presence of water. It usually occurs during polarization especially on the cathodic part. This phenomenon is contrary to what electrochemical theory would predict easily. However, it could be retarded considerably in the presence of an oxide, hydroxide, or mixed thin film that physically separates the metal surface from the test solution. Here the capability of chloride ions to be specifically adsorbed on the positively charged mild steel surface, enables the adsorption of protonated CCHN and CIBH inhibitor species on cathodic sites on the corroding metal surface, leading to a reduction in %e H2 gas evolution reaction. The mild steel had the highest inhibition efficiency values of 95.5% and 89.7% in the presence of CCHN and CIBH at concentrations of 1.0 mg/L.

Impedance spectroscopy analysis

This technique was chosen because it uses alternating current, which does not disturb the environment under investigation. It also provides a thorough understanding of the electrochemical routes that occur at the metal/solution interface. Presented in Figs. 5 and 6 are the impedance responses of mild steel in the absence and presence of a number of concentrations of CCHN and CIBH in 1 M HCl environment. Considering the Nyquist representations (See Figs. 5a and 6a), a plot of the blank sample was used as a control for the inhibited sample. Careful scrutiny of the result presented in Figs. 5(a) and 6(a) revealed that all the Nyquist plots displayed a single capacitive arcs, though depressed with the center beneath the real axis. The observed feature reveals the impact from distribution of active sites, surface roughness and adsorption of inhibitors species. Accordingly, areas of high-frequency intercept and low – frequency intercept having its real axis in the Nyquist plots is allotted to the solution resistance (Rs) charge transfer resistance (Rct). The acquired data were fixed with the accurate circuit presented in Fig. 7, with the aid of ZSimpWin 3.10 software. The present and Rct elements which signify the impedance consequence due to corrosion product species for the environment without the inhibitor. Here, the CPE was used to supplant the pure capacitance to compensate the electrode surface unevenness often created due to the accumulation of corrosion products (Okafor et al. 2008; Oguzie et al. 2012) and surface micro-defects. The CPE in question gives clear understanding of the non-conformities from ideal dielectric behavior. The impedance, Z, of CPE is set as:

Fig. 5
figure 5

The EIS spectra of mild steel in 1 M HCl solution revealing the influence of CCHN: (a) Nyquist plots, (b) Bode phase angle plots and (c) Bode modulus plots, respectively

Fig. 6
figure 6

The EIS spectra of mild steel in 1 M HCl solution revealing the influence of CCHN: (a) Nyquist plots, (b) Bode phase angle plots and (c) Bode modulus plots, respectively

Fig. 7
figure 7

Equivalent circuit model

$${\mathrm{Z}}_{\mathrm{CPE}}={\mathrm{Q}}^{-1}{(\mathrm{r\omega })}^{-\mathrm{n}}$$
(3)

In Eq. 3, Q is the CPE constant, while n is the exponent, respectively, r2 which is equal to -1 is regarded as an imaginary number, and ω is the angular frequency expressed in rad s−1 (ω = 2πf when f is the frequency in Hz), CPE is the resistance (ZCPE = R, n = 0), capacitance (ZCPE = C, n = 1). The addition of CIBH and CCHN in each case resulted to an increase in the charge transfer resistance in the Nyquist plots, the Bode phase angle plots and the Bode modulus plots, respectively (see Figs. 5 and 6). The diameter (ascribed to charge transfer resistance) increased with an increase in concentration showing that the process is concentration dependent, this provides a prove of corrosion inhibition.

To assess the obtained results of the corresponding impedance parameters presented in Table 2, the spectra were thoroughly evaluated with the aid of the correct circuit used to model the metal/acid interface (Murulana et al. 2015; Okafor et al. 2008). The decrease in Qdl values presented in Table 2, usually results from a decrease in the dielectric constant and/or a rise in the double layer thickness. The reduction in the obtained Qdl values in solutions containing the inhibitor is a prove of the adsorption of these inhibitor species on the mild steel surface. The IE% values for the different concentrations of CIBH and CCHN were obtained from impedance plots using the relation below:

Table 2 EIS Parameters for mild steel in 1 M HCl with and without CCHN and CIBH
$$IE\%= \left(\frac{{R}_{ct(inh)}-{R}_{ct(blk)}}{{R}_{ct(inh)}}\right) \times 100$$
(4)

Here Rct(blk) and Rct (inh) represents the Rct of CIBH and CCHN in the absence and presence of the inhibitors. EIS result is in line with the Polarization finding.

Adsorption considerations

It has been recognized that the binding power of organic inhibitors depend on numerous features, including: the type and charge on the steel surface, the reaction temperature, the nature of the environment under investigation and finally, the structure of the inhibitor (Ebenso and Oguzie 2005; Nwanonenyi et al. 2018).

The compounds under investigation can exits in protonated and molecular state. The genre of adsorption would therefore include two groups, molecular species intermingling with active sites on the mild steel surface, and secondly the protonated species intermingling with the pre-adsorbed chloride ions (in 1 M HCl which serves as the corrodent) on the substrate surface.

More explanation was provided on the adsorption of CCHN and CIBH by fitting the surface coverage (θ) data acquired from gravimetric results (not presented) to the Langmuir adsorption isotherm. The degree of coverage (θ) was obtained using the relation (Simeon et al. 2021; Obot and Obi-Egbedi 2010; Umoren et al. 2006):

$$\theta =1-\frac{{I}_{inh}}{{I}_{blk}}$$
(5)

here Iblk and Iinh represents, the weight loss data obtained with and without the introduction of CCHN and CIBH. The Langmuir adsorption isotherm is explained by the equation;

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

where Cinh and Kads denotes the inhibitor concentration, the level of surface coverage and then stability constant of the adsorption–desorption process. The adsorption procedure validated the Langmuir adsorption isotherm with a linear fit (see Fig. 8a & b) with slopes of 1.04 and 0.98 and linear correlation coefficients (R2) of 0.9999 and 0.09976. The slope deviation from unity are caused by interactions between adsorbed CCHN and CIBH species on the steel surface, as well as variations in adsorption energies as the surface coverage rises.

Fig. 8
figure 8

Langmuir adsorption isotherms for mild steel in (a) CCHN and (b) CIBH

SEM Results

Presented in Fig. 9 is the SEM micrographs of mild steel sample dipped in the absence (see Fig. 9a) and presence of 1.0 g/L CCHN (see Fig. 9b) and CIBH (see Fig. 9c). In the absence of the inhibitors under study, a rough surface was observed revealing some grain boundaries as a result of active dissolution of the steel in 1 M HCl, whereas the surface of the metal appears less jagged in the presence of CCHN and CIBH. A careful look at part b in Fig. 9 reveal a steel surface that is more protected in the presence of CCHN compared to CIBH. In the presence of CCHN more adsorbent species seems to present unlike what is obtainable in the presence of CIBH. It could be that the performance of CCHN in protecting the steel surface is better compared to CIBH effect. The observed phenomenon shows that the protective component species in CCHN was readily available, resuling to a well compact and pronounced surface coverage of the metal.

Fig. 9
figure 9

SEM micrgraph of the mild steel surface after 24 h immersion at 303 K in: (a) 1 M HCl (b) 1 M HCl + 1.0 g/L CCHN and (c) 1 M HCl + 1.0 g/L CIBH

EDX Analysis

Energy dispersive X-ray spectroscopy (EDX) is an analytical method for analytical or chemical characterization of materials. EDX systems are generally attached to an electron microscopy instrument such as scanning electron microscopy (SEM). In this study it was employed for detection of elemental content and their concentration on the surface of the metal. This analysis was performed on mild steel surfaces immersed in the environment with and without the presence of CCHN and CIBH, the result is presented in Fig. 10. The accompanying EDX graph provided further evidence of the adsorption of a protective thin film of CCHN and CIBH onto the mild steel surface. The result of the analysis reveals peaks of Fe and O2, suggesting that there may be the presence of iron oxide/hydroxide. The peaks of N and Cl in the inhibited solutions (see Fig. 10c) suggests the adsorption of a compound rich in N and Cl which is CIBH whereas Fig. 10b with the presence of Cl denotes the presence of CCHN. The percentage weight of Fe is seen to be higher in the inhibited environment compared to the uninhibited. For instance, we have 88.3%, 89.4% and 89.23% as the weight of Fe in the absence and presence of the inhibitors. the higher values of Fe confirms the inhibitors were able to protect the surface of the mild steel from corroding.

Fig. 10
figure 10

EDX graph with the accompanying elemental percentage content in: (a) 1 M HCl, (b) 1 M HCl + 1 g/L CCHN and (c) 1 M HCl + 1 g/L CIBH, respectively

Atomic force microscopy characterization

This analysis was carried out to acquire data on the average roughness (Ra), root-mean-square roughness (Rq), and the maximum peak-to-valley (P − V) height values. 3D AFM micrographs of mild steel surfaces immersed in the absence and presence of CCHN and CIBH are presented in Fig. 11a, b and c, respectively. From the data (see Table 3), it can be seen that the steel surfaces were protected in the presence of the inhibitors; considering the fact that the average roughness (Ra) and root-mean-square roughness (Rq) were all lesser in value compared to that determined for the mild steel in the uninhibited solution, the observed roughness factor depicts the surface irregularities, non-uniformity, and heterogeneity; hence, a faster rate of breakdown, especially in this environment (Nwanonenyi et al. 2018). The better result obtained for mild steel could be due to the stronger Fe2+  − inhibitor complex formed on the steel surface in the inhibited environment. The thin film formed on mild steel surface in the presence of the inhibitors prevents the ingress of corrosive species, while the contrary takes place in the absence of the inhibitors. Careful scrutiny of the pictorial representation validates this. The result is in line with the electrochemical result.

Fig. 11
figure 11

AFM analysis of mild steel in: (a) 1 M HCl, (b) 1 M HCl + 1 g/L CCHN and (c) 1 M HCl + 1 g/L CIBH, respectively

Table 3 Average roughness and root mean-square roughness values for mild steel in I M HCl environment

Quantum chemical calculations

It has been shown that the role of the highest occupied molecular orbital (HOMO) and the lowest unoccupied molecular orbital (LUMO) of a compound are the key factors for the assessment of its reactivity (Simeon et al. 2021). For CCHN and CIBH, significant characteristics such as ELUMO, EHOMO, the energy gap ΔE (ELUMO – EHOMO), adsorption energy, and so on have been calculated, with the intension of providing their role towards the observed inhibition process. Considering Koopman’s theorem, the correlation between the HOMO and LUMO energies, electron affinity (A) and ionization potential (I) of inhibitor molecule is shown in the equations beneath (Gomez et al. 2006; Dewar et al. 1985).

$${\mathrm{I}=-\mathrm{E}}_{\mathrm{HOMO}}$$
(7)
$${\mathrm{A}=-\mathrm{E}}_{\mathrm{LUMO}}$$
(8)

Also, the absolute hardness (η) and global softness (\(\sigma\)) for CCHN and CIBH molecules were calculated in terms of EHOMO and ELUMO:

$$\upeta = \frac{\mathrm{I}-\mathrm{A}}{2}$$
(9)
$$\sigma = \frac{I}{\eta }$$
(10)

Geometric optimization was used to determined the listed parameters. Frontier molecular orbital theory (FMOT) was employed in predicting the adsorption/active centers in CCHN and CIBH inhibitors; these active sites are responsible for interaction with the Fe (110) surface. Figure 12(a–d) and (e–h) shows the optimized structure, electron density, HOMO and LUMO for CCHN and CIBH. The HOMO and LUMO energy orbitals are found on the carbon/nitrogen areas.

Fig. 12
figure 12

The optimized geometry structures and the frontier molecular density distribution of the inhibitors (a and e = Optimized structure of CCHN and CIBH, b and f = Electron density of CCHN and CIBH, c and g = HOMO of CCHN and CIBH, d and h = LUMO of CCHN and CIBH, Atomic Legend: White = Hydrogen; Grey = Carbon; Blue = Nitrogen; Red = Oxygen; Green = chloride)

A close scrutiny of the HOMO reveals vital areas of the molecule structure that have the ability to release electrons to electrophilic species, whereas the LUMO reveals the section of the molecule with a high affinity to admit electrons from nucleophilic species.

Structures of CCHN and CIBH are shown in Fig. 12a and e. As presented in Fig. 12a, the HOMO orbital has the highest electron density, primarily on chloride and carbon single bonds, indicating that these are the sites of the molecule with the greatest ability to release electrons; whereas the LUMO orbital is purely confined on oxygen and carbon atoms.

Looking at the studied compounds (See Table 4), the EHOMO is larger in CCHN compared to CIBH, accordingly, CCHN would have the maximum attraction to adsorb itself on the Fe (110) surface and to easily release electrons (the lone pair electrons on oxygen to the unoccupied iron d-orbital. They acquired results are in line with the experimental results. A negative value for EHOMO suggests a physical adsorption of the inhibitor species (Yurt et al. 2006). Also, the LUMO energy reveals the propensity of the molecule to agree to take electrons from an electron-rich molecule. It is necessary to note that molecules with the minimum energy of the LUMO has the utmost propensity to receive electrons. The change among the EHOMO and the ELUMO, i.e. ∆E, expresses the reactivity of the molecule via assessment with other compounds. The molecules that has the minimum ∆E value express the utmost affinity reactivity and ofcourse would positively link with the surface. The sort of stable interaction and hydrophobicity created by the inhibitor system is thus determined by the level of response from electron donation and acceptance at the HOMO and LUMO regions, respectively. Table 5 shows the computed values of ELUMO, EHOMO, and Egap for CCHN and CIBH in both gas and aqueous phases. The results of the theoretical simulation using DMol3 tool are consistent with experimental findings, indicating that the CCHN molecule has a higher inhibitory efficiency than the CIBH molecule. The energy gap value of CCHN and CIBH in the gas phase is higher compared to the aqueous phase, indicating that the water or solvation effect lowers the inhibitor's strength.

Table 4 Calculated Quantum Chemical Properties for the Most Stable Conformation of CCHN and CIBH
Table 5 Computed Values of Energy Optimization for CCHN And CIBH using Dmol3 Module tool

Molecular dynamics simulation

Dynamics simulation is regarded as a vital computational method that has been commonly employed by numerous researchers. The procedure involves simulation of the accepted pathway of molecular motion to model successive configurations, after the classical Newtonian mechanics. This simulation was performed in several ensembles, to sample several low energy adsorption arrangements of CCHN and CIBH. Using this technique one will be able to determine adsorption energies of the two compounds studied. It was engaged to anlyse the nature of adsorption interaction that occurs between the metal surface and they inhibitor molecules in the approximated electrolyte solution containing some ions; 500 H2O, 5H3O + and 5 Cl. and in gas phase. Another reason for adopting the technique is to interpret what is obtainable in the real experimental process that comprises corrosion and adsorption inhibition using theoretical basis. Careful scrutiny of the result presented in Fig. 13 shows that the bonding/energy gap that exists between the inhibitors and the metal surface (Fe 110) seems to be lesser with CCHN compared to CIBH, this could be the reason for the observed higher inhibition efficiency values obtained for CCHN.

Fig. 13
figure 13

Representative snapshots from molecular dynamics models of (a) CCHN and (b) CIBH, Atom legend: white = H; gray = C; red = O; blue = N; green = chloride

Further simulation was employed to examine the nature of adsorption interaction that exists between the Fe(110) surface and inhibitor molecule in the approximated electrolyte solution containing important ions; 500 H2O, 5 H3O+ and 5 Cl and gas phase. This approach is employed to interpret the real experimental process that involves corrosion and adsorption inhibition using theoretical basis.

This technique was employed to sample various low energy adsorption configurations of CCHN and CIBH on the Fe (110) surface (Dewar et al. 1985; Awad et al. 2010). The iron slabs used for the simulations were cleaved alongside the (110) plane. The calculations were carefully carried out in a 10 × 12 supercell with the aid of a Compass force field and the Smart algorithm with constant-volume ensemble (NVE) (microcanonical) ensemble, a time step of 1 fs and simulation time of 5 ps. The system was maintained at a Temperature of 350 K. Quenching of the system was done at intervals of 250 steps. The optimized structure of CCHN, CIBH and Fe (110) was used for this simulation. The bottom layers of the Fe (110) slab was constrained, therefore the energy of the forces between them was constant through out the simulation time. Therefore, they obtained values were not included in the calculation hence, they will not influence the entire motion of the adsorbed CCHN and CIBH molecules.

For a single molecule of CCHN and CIBH, the lowest energy adsorption on the Fe (110) surface from the simulation results are presented in Figs. 14 and 15. In each case, a horizontal alignment was observed as presented.

Fig. 14
figure 14

Representative snapshots from molecular dynamics models of CCHN in liquid phase (a) Front view (b) Top view and (c) Side view; adsorption on Fe(110)

Fig. 15
figure 15

Representative snapshots from molecular dynamics models of CIBH in liquid phase (a) Front view (b) Top view and (c) Side view; adsorption on Fe(110)

To quantify the relations between the two molecules under investigation, the adsorption energy (Eads) for each system was calculated using the following equation (Chidiebere et al. 2014b):

$${\mathrm{E}}_{\mathrm{ads}}={\mathrm{E}}_{\mathrm{total}}-({\mathrm{E}}_{\mathrm{inh}}+{\mathrm{E}}_{\mathrm{Fe}})$$
(11)

where Einh, EFe and Etotal denotes the energy of the single molecule, the Fe slab without adsorption and the total energy of the system having the molecule and Fe surface, respectively. The obtained results are presented in Table 4. The acquired results of the adsorption energy (Eads) for CCHN and CIBH in aqueous phase are – 34.67 kJ/mol, and—13.82 kJ/mol (See. Figs. 14 and 15) whereas in gas phase we have – 142.27 kJ/mol and – 97.06 kJ/mol (See Figs. 16 and 17). The adsorption energies obtained are all negative in value, this conforms to a steady adsorption. In gas phase CCHN and CIBH structures formed a strong and significant adsorption interaction with the Fe (110) surface, however, in electrolytic solution the presence of multicomponent active ingredients (such as H2O molecules, H3O+ and Cl ions) resulted to a pronounced reduction in the interaction energy (See Table 4). It can be seen that the values of adsorption energy of interaction in gas phase is higher compared to the aqueous phase. Similar results have been reported elsewhere (Simeon et al. 2021). Some factors listed below could be responsible for the observed phenomenon: (i) synergistic interaction between inhibitor molecules and charges on metal surface (ii) dispersive interactions as a result of pi-electron delocalization and also polarization of atoms in the inhibitors molecular structure, (iii) possible protonation of inhibitor molecule by the electrolytic solution.

Fig. 16
figure 16

Representative snapshots from molecular dynamics models of CCHN in gas phase (a) Front view (b) Top view and (c) Side view; adsorption on Fe(110)

Fig. 17
figure 17

Representative snapshots from molecular dynamics models of CIBH in gas phase (a) Front view (b) Top view and (c) Side view; adsorption on Fe(110)

Comparable trends of Eads values have been described for some organic inhibitors (Casewit et al. 1992; Nwanonenyi et al. 2017). Past information have revealed a right relationship between inhibition efficiency and adsorption energy. Furthermore, it has been confirmed in this study that greater values of Eads was obtained in gas phase environment in line with similar works elsewhere (Nwanonenyi et al. 2017). From the results it is clear that inhibition efficiency, increased with an increase in adsorption energy (Oguzie et al. 2010; Obot et al. 2011). The trend of Eads (CCHN > CIBH) confirms that CCHN exerts a greater adsorption effect compared to CIBH. In line with the experimental results obtained.

Conclusion

The findings proved that CCHN and CIBH extracts inhibited the corrosion of mild steel in 1 M HCl environment. The inhibition efficiency was increased with concentration. Polarization studies reveal that the adsorbed CCHN and CIBH species in each case retarded the corrosion rate through a mixed-type mechanism. A reduction in the active dissolution of mild steel was significant in the presence of the studied inhibitors. The EIS results provided evidence of adsorption, since CCHN and CIBH inhibited the extent of corrosion via adsorption of its species on the mild steel surface. Inhibition efficiency values of 95.5% and 89.7% was obtained for CCHN and CIBH. SEM and AFM monitoring technique were employed to investigate the surface of the substrate and the obtained result is in line with experimental findings. DFT calculations were employed to thoroughly ascertain the parameters connected with the electronic and adsorption structures of CCHN and CIBH. This backed up their separate roles in the reported inhibitory efficacy. From the literature, similar inhibition efficiency values of 93% to 96% has been obtained in I M HCl environment.. The inhibitors employed in this work possess a high protective strength and can improve the safety of the system by forming a bond and barrier layer on the metal surface.