Introduction

Mild steel is a metallic alloy with very high percentage of iron. It is one of the most widely used materials, especially in mechanical and transportation industries. However, it can corrode easily when exposed to a humid environment and the corrosion rate is even higher in an acidic medium (Chaitra et al. 2015; Jamil et al. 2018; Odewole et al. 2021). Nevertheless, acidic solutions are extensively used in several processes in industries such as acid pickling, acid cleaning, acid de-scaling and oil-wet cleaning. The total prevention and eradication of corrosion are impossible; thus, the only helpful remedy lies in controlling it (Chaitra et al. 2015; Jamil et al. 2018; Masroor 2017; Odewole et al. 2021). Protecting a metal against corrosion is a great challenge and one effective way of checkmating it is by using corrosion inhibitors. Corrosion inhibitors are chemical compounds that react with a metal surface thereby protecting it against deterioration. Corrosion inhibitors of different types have been employed to retard mild steel deterioration in acidic mediums. In all, organic compounds containing aromatic rings, multiple bonds or electron-pair donor atoms (such as N, O, S, P) has been proved to be effective in mitigating corrosion (Al-Amiery et al. 2013; Alaneme et al. 2016; Ghasemi et al. 2014; Singh et al. 2018; Yadla et al. 2012; Zukal et al. 2016).

One way by which organic compounds retards corrosion of metals is through adsorption. The extent of adsorption is controlled by the properties of the inhibitor molecules, the nature of the metal surface, the type of corrosion media, the temperature and pressure, steric effect and mode of adsorption. The adsorption of the inhibitor molecules on the metal surface provides a protective film thereby preventing metal dissolution. The mechanism of adsorption could be through physical means (electrostatic attractions), chemical means (formation of bonds) or the combination of both methods (Alaneme et al. 2016; Ansari et al. 2018; Benabid et al. 2017; Finšgar and Jackson 2014; Hamadi et al. 2018; Pandey et al. 2017).

Schiff bases are organic compounds with functional group (C=N) called azomethine group. These compounds were first synthesized in 1864 by a German Chemist, Hugo Schiff by condensation of an amine and active carbonyl group (Afak 2012). Schiff base ligands can be prepared easily and mostly form complexes with metal ions in different oxidation states (Chaitra et al. 2015). Several Schiff bases, especially those from benzaldehyde derivatives, have been reported in the literature as excellent corrosion inhibitors for different metals and alloys in acidic media (Ichchou et al. 2019). The increased recognition of Schiff bases in the field of corrosion inhibition science is because they can be easily synthesized from relatively low-cost raw materials and they are eco-friendly or have low-toxicity properties (Alaneme et al. 2016; Ansari et al. 2018; Finšgar and Jackson 2014; Ghasemi et al. 2014; Gürten et al. 2015; Masroor 2017). To the best of our knowledge, the literature reports on the synthesis and applications of Schiff bases originating from 2,5-dimethoxybenzaldehyde are scanty. Therefore, we present in this studies, synthesis, characterization and corrosion inhibition performance of a new Schiff base derived from 2-amino-4-methylphenol and 2,5-dimethoxybenzaldehyde. To further understand the mechanism of inhibition, computational techniques were applied.

Experimental

Materials and methods

All the reagents and solvents used in the synthesis were purchased from Sigma-Aldrich and were used without further purification. The compound was prepared based on modified method by Obasi et al. (2016), as represented in Scheme 1. The IR spectrum was recorded on Bruker FT-IR spectrometer. Bruker DPX-300 spectrometer was employed in recording 1H and 13C NMR spectra with broadband decoupling of 1H at 600.29 MHz and 150.96 MHz using CD3OD as solvent. The surface morphology of the mild steel coupons was analyzed after immersion in 1.0 M HCl with and without DMPC using scanning electron microscope (SEM) (VEGA 3 TESCAN) and energy-dispersive X-ray (EDX) spectroscopy.

Scheme 1
scheme 1

2-[(E)-(2,5-dimethoxybenzylidene)amino]-4-methylphenol

Synthesis of 2-[(E)-(2, 5-Dimethoxybenzylidene) amino]-4-methylphenol

The reaction mixture was prepared by dissolving 2-amino-4-methylphenol (0.62 g, 5 mmol) in water and subsequent addition to a methanolic solution of 2,5-dimethoxybenzaldehyde (0.83 g, 5 mmol). The reaction mixture was stirred for about 15 min at 35 °C, and a yellowish solid was obtained. The reaction completion was monitored using Thin-layer Chromatography (TLC). The resulting yellowish powdery solid was collected after filtration, recrystallized in methanol to obtain a pure compound and then air-dried. The yield obtained was 90% and melting point of 90–92 °C). IR (υ cm−1): 3451(b, O–H), 3054 & 3000 (m, C–H aromatic), 2967 & 2921 (s, C–H aliphatic), 2838 (C–H imine), 1615 (s, C=N), 1502–1597 (s, C=C aromatic).1H NMR (δ ppm): 2.35 (s, 3H, -CH3), 3.87 & 3.92 (s, 6H, 2CH3- O), 6.91–7.28 (m, 6H, Ar–H), 7.69 (s, 1H, CH=N) and 9.13 (s, 1H, O–H). 13C NMR (δ ppm): 20.81, 55.89, 56.26, 110.71, 112.81, 114.46, 116.65, 119.53, 125.00, 129.17, 129.30, 136.55, 150.04, 152.62, 153.78 and 154.34. Mass Spectrum: [LH+] = 271.2 Anal. calcd. For C16H17NO3 = 271. UV (λmax nm) (methanol): 228.4, 274.0.4, 388.2 and 405.5. (See Scheme 1, the UV/Vis, IR, 1H and 13C NMR, and MS spectra of DMPC are shown in Figure S1–5, respectively, in supporting material).

X-ray crystal determination

Yellowish crystals of DMPC with dimensions 0.26 × 0.12 × 0.12 mm3 suitable for X-ray single-crystal structure determination were grown in methanol by slow evaporation at room temperature. Crystal determinations of DMPC were performed at 106(3)K with the use of graphite monochromatedCuKα (λ = 1.54184), and the crystallographic data were collected on an XtaLAB Synergy. The implementation of data reduction and absorption was carried out using Crysallispro Software (Rigaku 2015), while the structural solution was performed on the Olex2 interface (Dolomanov et al. 2009) with the ShelXT (Sheldrick 2015a) structure solution program applying intrinsic phasing and refined with the ShelXL (Sheldrick 2015b) refinement package under Least Squares minimization. Hydrogen atoms were refined isotopically, while non-hydrogen atoms were refined anisotropically. Using OlexDraw, a crystal diagram was drawn as shown in Fig. 1; Table 1 contains the crystallographic refinement parameters.

Fig. 1
figure 1

a ORTEP Diagram showing the molecular structure of the Schiff base (DMPC). b Molecular aggregation in the crystal structure of DMPC showing intermolecular C-HO and O–HN hydrogen bonding interactions in red and blue dotted lines, respectively

Table 1 Crystal data and structure refinement for DMPC

Corrosion inhibition procedure

Electrochemical impedance spectroscopy (EIS) and potentiodynamic polarization (PDP) were employed to study the inhibition performance of DMPC on mild steel corrosion in 1.0 M HCl. The mild steel of composition (in wt%): Fe (99.621), C (0.076), Cr (0.050), Al (0.023), Si (0.026), Mn (0.192) was mechanically cut into 1 cm × 1 cm in dimension. Subsequently, they were fixed in an epoxy resin and the 1 cm2 exposed area abraded with the help of a Struers LaboPol-1 machine to get rid of any epoxy resin after which emery papers of different grades (600–1200) were used to clean up rusts and scales. The mild steel surface was thoroughly washed with distilled water, degreased with acetone and then dried at room temperature before use.

The electrochemical experiments were performed at 303 K on Metrohm AutoLab (model PGSTAT302N) Potentiostat/Galvanostat driven by NOVA software. In the electrochemical setup, the mild steel was the working electrode, Ag/AgCl, 3 M KCl as the reference electrode while platinum rod was the counter electrode all immersed inside the electrolyte. For a steady open-circuit potential to be established, the mild steel was allowed to corrode freely without external current or potential for 1800s before the measurements. The procedures for EIS and PDP were as reported by Okey et al. (2020). The experiments were carried out in the absence and presence of different concentrations of the inhibitor. The electrochemical potentials of the mild steel coupons were evaluated bypassing the potential from − 0.25 to + 0.25 at a scan rate of 1 mVs−1. Parameters such as corrosion potential (\(E_{cor}\)), cathodic and anodic Tafel slopes (βa and βc) and corrosion current density (\(i_{corr}\)) were obtained from extrapolation of Tafel plots produced from polarization study. The inhibition efficiency was calculated from Eq. 1:

$$\% IE_{{{\text{PDP}}}} = 100 \left( {1 - \frac{{i_{{{\text{corr}}}} }}{{i_{{{\text{corr}}}}^{o} }}} \right)$$
(1)

where \(i_{corr}^{o}\) and \(i_{corr}\) are the corrosion current densities in the absence and presence of different concentrations of the inhibitor. The impedance measurement was taken in the spectrum range of 10 mHz to 100 kHz at an amplitude of ± 10 mV for frequency response (Yusuf et al. 2020). A suitable circuit that was comparable was used to fit data resulting from impedance spectra. Parameters like charge transfer resistance \(\left( {R_{ct} } \right)\), solution resistance \(\left( {R_{s} } \right)\) and inhibition efficiency (%IEEIS) were determined. The impedance spectra were plotted as Nyquist and Bode plots. Corrosion inhibition efficiency was calculated using Eq. 2:

$$\% IE_{EIS} = 100\left( {\frac{{R_{ct} - R_{ct}^{o} }}{{R_{ct} }}} \right)$$
(2)

where \(R_{ct}\) and \(R_{ct}^{o}\) represents the charge transfer resistances in the presence and absence of studied inhibitor. For the accuracy of the reported experimental data, electrochemical studies were performed in triplicate at each tested concentration of the tested inhibitors, and the mean values are presented.

Computational method

DMPC was optimized using B3LYP functional (Becke 1993) and 6–31 + G(d) (Jensen 2001) basis set. This method according to the literature proves to be reliable with experimental findings (Adejoro et al. 2016; Odewole et al. 2021). Parameters such as the highest occupied molecular orbital (EHOMO) and lowest unoccupied molecular orbital (ELUMO) generally known as energies of the frontier molecular orbitals (FMOs) and other reactivity descriptors were calculated. These include electron affinity, A (Eq. 3), ionization potential, I (Eq. 4), energy gap, ΔE (Eq. 5), chemical hardness, η (Eq. 6), softness, δ (Eq. 7), electronegativity, χ (Eq. 8), chemical potential, CP (Eq. 9), global electrophilicity index, ω (Eq. 10) and the Fukui parameters (Eq. 1113) were obtained, all calculation were carried out using Gaussian16(Frisch et al. 2009). The simulations were performed in gas and HCl medium. Since the imine (> C=N–) group have the tendency to get protonated in acid medium, both the neutral and protonated forms for the electronic properties were calculated.

$${\text{A}} = - {\text{E}}_{{{\text{HOMO}}}}$$
(3)
$${\text{I}} = - {\text{E}}_{{{\text{LUMO}}}}$$
(4)
$$\Delta E = E_{{{\text{LUMO}}}} - E_{{{\text{HOMO}}}}$$
(5)
$$\eta = \frac{\Delta E}{2}$$
(6)
$$\delta = \frac{1}{\eta }$$
(7)
$$\chi = \frac{{\left( {I + A} \right)}}{2}$$
(8)
$$C_{P} = - \chi$$
(9)
$$\omega = \frac{{{\upchi }^{2} }}{\Delta E}$$
(10)
$$f_{k}^{ + } = \left[ {q_{k} \left( {N + 1} \right) - q_{k} \left( N \right)} \right]\quad {\text{for nucleophilic attack}}$$
(11)
$$f_{k}^{ - } = \left[ {q_{k} \left( N \right) - q_{k} \left( {N - 1} \right)} \right]\quad {\text{for electrophilic attack}}$$
(12)
$$\Delta f_{k} \left( r \right) = f_{k}^{ + } - f_{k}^{ - }$$
(13)

Parameters: qk (N + 1) represents the anionic charges on the atoms, whereas qk (N − 1) is known as the cationic charges on the atoms in the molecules. qk (N) represents atoms in their neutral state. Fk+ and fk are the nucleophilic and electrophilic Fukui functions, respectively.

Results and discussion

X-ray crystallography

The single-crystal X-ray structural analysis of DMPC reveals that it crystallizes from methanol as a yellow crystal in the monoclinic crystal system with a space group of C2/c and Z = 8-unit cell. The summary of the crystallographic data is presented in Table 1, while the bond lengths and bond angles are presented in Tables 2 and 3, respectively. The molecular structure of the Schiff base DMPC is presented in Fig. 1 which shows two methoxy phenyl moieties on either side of the central azomethine functionality. The dimethoxy phenyl moiety is planar to an r.m.s deviation of 0.06 Å while the methoxy phenylene moiety is much more planar to an r.m.s deviation of 0.009 Å. The dihedral angles between the central azomethine functionality and the adjacent methoxy phenyl moieties are, respectively, − 173.10(3) and − 139.71(4) for N1–C8–C9–C14 and C8–N1–C1–C2. The unique bond C8-N1 (1.2832(13) Å) and C8-N1-C1 (118.64(9)º) azomethine bond length and angle reveal the formation of the Schiff base. These bond parameters agree with those reported previously in the literature (Ezeorah et al. 2018). As expected, the C11-O2 (1.3757(13)Å) and C14-O3 (1.3686(13)Å) bond lengths are longer than the phenolic C2-O1 (1.3608(12)Å) bond length due to the reduced bond strengths caused by the -CH3 bonded to O2 and O3, respectively. The supramolecular analysis of the crystal structure of DMPC indicates the presence of intermolecular hydrogen bonding O1–H1···N1, C6–H6···O2 and C8–H8···O3 interactions. Molecular aggregation in the crystal structure of the compound in Fig. 2 shows two molecules of the compound interconnected by a two-way O–H···N hydrogen bonding interaction and these two aggregate synthons is linked two other two molecule synthons by C–H···O intermolecular interactions to form a 6-molecule aggregate synthon in 3-D supramolecular architecture (Okpareke et al. 2020).

Table 2 Experimental bond length of DMPC
Table 3 Experimental bond angles for DMPC
Fig. 2
figure 2

Tafel plots for corrosion of mild steel in 1.0 M HCl in the absence and presence of various concentrations of DMPC at 30 °C

FT-IR spectra

The FT-IR data of the Schiff base are given in the experimental section. A strong vibration band with wavenumber 1615 cm−1 is assigned to the azomethine C=N stretching mode. This is evidence that the proposed compound was formed. The broad peaks at 3451 cm−1 are assigned to the phenolic O–H stretching vibration. The presence of aromatic ring has been confirmed by their characteristic ring absorption at 1500–1400, 1100–1050 and 900–700 cm−1 regions. The absence of bands characteristics of v(C=O), primary amine ۷(NH) also indicates the formation of the named Schiff base. The wavenumber of 3054 cm−1 could be assigned to the aromatic C–H stretching mode while that observed in the range of 3000–2800 cm−1 could be attributed to (C–H) stretching vibrations of methyl, methoxy and CH=N. The strong bands located in the range of 1258–1307 cm−1 are assigned to C–O stretching vibrations (Afak 2012; Chaitra et al. 2015; Ghames et al. 2017; Gürten et al. 2015).

1 H , 13 C NMR and UV/visible spectra analysis

The 1H and 13C NMR spectra are shown in supporting materials (Figure S2 and S3). The O–H and azomethine protons are observed as a singlet at 9.13 and 7.69 ppm, respectively. The peaks at δ 6.91–7.02 ppm (3H m) are attributed to the phenyl protons C3, C4 and C6. The phenyl protons C10, C12 and C13 exhibited peaks in the range of δ 7.03–7.28 ppm (3H m). δ 3.87 ppm (3H s) and δ 3.90 (3H s) could be attributed to the three equivalent protons of methoxy groups (O–CH3) of C16 and C15, respectively.13C spectra revealed signals which are in support of the crystal structure gotten through X-ray crystallography. The peak at δ 20.81 ppm is assigned to the methyl carbon C7 while peaks at δ 55.89 and 56.26 ppm are because of methoxy (O–CH3) carbons of C16 and C15, respectively. The phenyl carbons C3, C4, C5, C6, C9, C10, C12 and C13 are assigned to peaks ranging from δ 110.71 to 136.55 ppm while benzene ring carbons C1, C2, C11 and C14 appeared at peaks 136.52–154.34 ppm. The existence of the Schiff base functional group was confirmed by the peak at 154.34 ppm assigned to carbon C8. The UV/Visible spectrum of DMPC was recorded in a range of 200–800 nm in methanol at concentration of 3.7 × 10–4 M at room temperature. The result showed bands at 228.4 nm, 274.4 nm, both assigned to π–π* transitions. Bands at 388.2 and 405.5 nm were assigned to n–π* transitions.

Electrochemical studies

Potentiodynamic polarization

Potentiodynamic polarization study was employed to ascertain the kinetics of the cathodic and anodic reactions taking place at the mild steel surface (Bingöl and Zor 2013; Dominic and Monday 2016; Njoku and Onyelucheya 2015; Thiruvengadam et al. 2015). In this way, the effects of the inhibitor on the corrosion reaction of mild steel in 1.0 M HCl can be determined. The polarization curve (Tafel plot) of the uninhibited and the inhibited (with various concentrations of DMPC) corrosion of mild steel is depicted in Fig. 2. Corrosion reaction data (corrosion potential (\({E}_{corr}\)), corrosion current density (\({i}_{corr}\)), anodic Tafel slope (\({\beta }_{a}\)) and cathodic Tafel slope (\({\beta }_{c}\)) were gotten through extrapolation of the linear area of the polarization plot and are presented in Table 4 together with inhibition efficiency. Table 4 shows that on the addition of DMPC the corrosion current density (\({i}_{corr}\)) values reduce drastically when compared to the blank experiment. Also, as the concentration of the compound increases, the \({i}_{corr}\) values decrease while the inhibition efficiency (%IEPDP) increases. This implies that DMPC is an effective corrosion inhibitor, and as the compound is being added, the molecules are adsorbed on the metal surface, thereby blocking the actives sites. The more the inhibitor, the more the active sites will be blocked, resulting in the highest %IEPDP achieved at the highest inhibitor concentration (Afak 2012; Thiruvengadam et al. 2015).

Table 4 Electrochemical kinetic parameters (\(\pm \mathrm{SD}\)) extrapolated from linear area of Tafel plot for mild steel in 1.0 M HCl in the absence and presence of different concentrations of DMPC at 30 °C

Observation from Fig. 2 and Table 4 shows that when DMPC was added to the corrosion medium, the corrosion potential (\({E}_{corr}\)) did not follow any defined pattern, but at higher concentrations (0.75 mM and 1.0 mM), the values of \({E}_{corr}\) moves to a less negative value, suggesting that DMPC curtailed the rate of metal dissolution at the anode (Ashassi-Sorkhabi et al. 2005). For an inhibitor to be classified as a cathodic or anodic type inhibitor, the change in the \({E}_{corr}\) value must be greater than 85 mV (Saha et al. 2014). The highest difference between \({E}_{corr}\) of the uninhibited and the inhibited corrosion is 30.4 mV at 303 K; therefore, DMPC can be categorized as mixed-type inhibitor. The cathodic and anodic Tafel slopes (\({\beta }_{c}\) and \({\beta }_{a}\), respectively) were both altered as the different concentrations of the inhibitor were added, suggesting that DMPC performed as a mixed-type inhibitor but influenced anodic reaction more (Okey et al. 2020; Saha et al. 2014). Figure 2 shows that the shape of the curves for the uninhibited and inhibited corrosion are similar, implying that the mechanism of the cathodic and anodic reactions mainly by charge transfer was unaffected as the inhibitor was added (Njoku and Onyelucheya 2015; Nkuzinna et al. 2014).

Electrochemical impedance measurement

The Nyquist and Bode plots obtained from the impedance spectra for mild steel in 1.0 M HCl are presented in Figs. 3 and 4, respectively. Data derived from Nyquist plot were fitted into an equivalent circuit known as Randle circuit (Fig. 5) for better understanding. The circuit comprises constant phase element (CPE), solution resistance (\({R}_{s}\)) and the charge transfer resistance (\({R}_{ct}\)). Nyquist plot without and with the various concentrations of DMPC presents a single depressed semicircle loop which suggests that the corrosion of mild steel in the test media was predominantly through charge transfer process. This assertion was further strengthened by the appearance of single maxima in the Bode plot (Bingöl and Zor 2013; Dominic and Monday 2016; Nkuzinna et al. 2014; Omoruwou et al. 2017; Omotioma and Onukwuli 2017).

Fig. 3
figure 3

Nyquist plots for mild steel in 1.0 M HCl without and with various concentrations of DMPC at 303 K

Fig. 4
figure 4

Bode (a) and Phase angle (b) plots for mild steel corrosion with and without various concentrations of inhibitors

Fig. 5
figure 5

Randle equivalent circuit

Parameters from Nyquist plot such as charge transfer resistance (\({R}_{ct}\)), solution resistance (\({R}_{s}\)) and inhibition efficiencies obtained from electrochemical impedance measurement in the absence and presence of various concentrations of DMPC are given in Table 5. Inspection of Table 5 revealed that the charge transfer resistance increased greatly as more of the inhibitor was being added into the corrosive media; this also corresponds to the increased size of the semicircle loop in Nyquist plot as the concentration of the inhibitor was increased. This suggests that DMPC was adsorbed on the mild steel surface forming a protective film and thereby decreasing the rate of metal dissolution (Bingöl and Zor 2013; Njoku and Onyelucheya 2015). At the utmost concentrations, there is a likelihood that the dielectric constant might have been drastically reduced due to the thick adsorbed layer of the inhibitor. The shape of the semicircle loops in Fig. 3 was not altered as more of the inhibitor is being added suggesting that a uniform mechanism was adopted throughout the inhibition process. From Bode plot (Fig. 4), it is apparent that absolute impedance increased at a lower frequency as the concentrations of the compound increased. There was also an increase in the phase angle (− α (°)) as the concentration of the compound was increased, hence supporting the assertion that DMPC retards the dissolution of mild steel by forming a protective film on its surface (Ansari et al. 2018; Bingöl and Zor 2013). The values of inhibition efficiencies of DMPC gotten from impedance measurement agree with that obtained from potentiodynamic polarization. These results also showed that DMPC is a good corrosion inhibitor compared to other benzaldehyde derivatives applied as corrosion inhibitors (Abd-El-Nabey et al. 2012a, b; Abdallah et al. 2012).

Table 5 EIS parameters (\(\pm \mathrm{SD}\)) for corrosion of mild steel in 1.0 M HCl in the absence and presence of various inhibitor concentrations

Another vital parameter that gives considerable insight on the nature of the constant phase element (CPE) and also the degree of roughness of the electrode surface is the values of n in Table 5. For a pure capacitive CPE, the value of n has to be 1 while value of n approximately unity means that the electrode has a pseudocapacitive surface. The values of n derived from EIS (Table 5) approaches unity indicating the pseudocapacitive nature of the electrode surface. One could associate this type of observation to non-homogenous nature of the electrode coupled with structural defect. In addition, another supporting parameter that describes the nature of an electrode surface is phase angle derived from Bode plot. For an ideal capacitor, the phase angle (− α) should be equal to 90 degrees but from our experiment, the phase angle ranges from 50.73 to 66.01 indicating the pseudocapacitive nature of the electrode surface (Okey et al. 2020; Yusuf et al. 2020).

Adsorption study: Langmuir adsorption isotherm

Adsorption study was employed to gain insight into the mechanism by which DMPC adsorbed on the mild steel surface. Data obtained from the two methods of corrosion study (PDP and EIS) were fitted into Langmuir adsorption isotherm equation (Eq. 14) and the resulting plot depicted in Fig. 6.

$$\frac{C}{\theta } = C - K_{ads}$$
(14)

where C = inhibitor concentration (g/L), θ = degree of surface coverage, \(\left( {\frac{{{\text{Inhibiter}}\;{\text{efficiency}}}}{100}} \right)\) \({K}_{ads}\) = equilibrium constant for the adsorption process.

Fig. 6
figure 6

Langmuir adoption isotherms for mild steel corrosion using PDP and EIS methods

The result displayed a good correlation with the determinant of correlation (R2) values of 0.9998 and 0.9996 for PDP and EIS, respectively, which are very close to unity. This implies adequate adherence to Langmuir adsorption mechanism via monolayer adsorption (Adejo et al. 2014; Madhifitri et al. 2018). Thermodynamic parameter such as Gibbs free energy (\(\Delta G\)) was calculated using Eq. 15(Okey et al. 2020; Saha et al. 2014).

$$\Delta G = - RT\ln \left( {55.5K_{ads} } \right)$$
(15)

where R = gas constant (8.314 Jmol−1 K−1), T = Temperature (K).

The parameters resulting from adsorption studies are given in Table 6. Inspection of Table 6 revealed that the Δ \({G}_{ads}\) values were close to (− 40 kJ mol−1) which is a benchmark for the chemisorption mechanism. Note that Δ \({G}_{ads}\) from − 40 kJ mol−1 and above signifies absolute chemisorption mechanism, whereas values ranging between − 20 kJ mol−1 and below indicate perfect physisorption. It is obvious then that the two mechanisms (physisorption and chemisorption) were adopted by DMPC with chemisorption being predominant.

Table 6 Parameters from adsorption studies for corrosion inhibition of mild steel in 1.0 M HCl at 303 K

Electron-dispersive X-ray

To determine the elemental composition of the mild steel surface, electron-dispersive X-ray (EDX) spectroscopy was employed in this regard after immersion time of 5 h in 1.0 M HCl in the (a) absence and (b) presence of 1.0 mM of DMPC. Analysis of the result (Fig. 7) revealed total elimination of oxygen that promotes corrosion as the inhibitor was incorporated into the corrosion media. This indicates the efficacy of DMPC in minimizing corrosion of mild steel in the studied media (Odewole et al. 2021; Okey et al. 2020).

Fig. 7
figure 7

Energy-dispersive X-ray spectra of the surface of mild steel after immersing in 1.0 M HCl for 5 h (a) blank (b) with 1.0 mM of DMPC

Scanning electron microscopy (SEM) analysis of the corroded surface microstructure

The morphology of the mild steel surface was examined using scanning electron microscopy (SEM). SEM images in Fig. 8 (a) before immersion and after five hours immersion in (b) blank, (c) 1.0 mM of inhibitor, revealed minimal damage of the mild steel surface in the presence of 1.0 mM of DMPC when compared with the blank experiment. The mild steel surface was greatly damaged in the absence of an inhibitor but on addition of DMPC, metal dissolution was significantly retarded. This attests to the fact that the studied compound is an excellent corrosion inhibitor.

Fig. 8
figure 8

SEM images of the surface of mild steel a before immersing in 1.0 M HCl and b after immersing in 1.0 M HCl blank for 5 h c after five hours immersion in the presence of DMPC

DFT analysis

DFT calculations were employed to probe more on the inhibition and adsorption performance of DMPC. The optimized geometries of the neutral and protonated species are presented in Fig. 9.

Fig. 9
figure 9

Optimized structure of a DMPC and b DMPC-H+

Electronic properties

The distribution of electron density of protonated and neutral species in gas and HCl medium is shown in Fig. 10. This reveals that the HOMO and LUMO are localized all through the molecule revealing the involvement of the whole molecular entities in electron transfer. The electron densities centers around the electronegative groups promotes the formation of chemical and physical bonds with electrophilic moieties such as iron atoms (Belakhdar et al. 2020). The low EHOMO and ELUMO gap obtained from the calculation is in line with high inhibition efficiency (Adejoro et al. 2016; Ibeji et al. 2021; Odewole et al. 2021). In this study, the low value of ∆E suggests that DMPC is a good corrosion inhibitor supporting the experimental results. Other reactivity descriptors such as low softness and high electronegativity are also presented in Table 7 which indicates high reactivity of DMPC. It was also observed that the protonated form of DMPC showed a lower ∆E which is expected since (> C=N–) group could be the active species in the corrosion process. The molecules with large EHOMO are more likely to donate electrons to the unoccupied orbital of a Fe atom, however, molecules with a lower ELUMO are willing to accept electrons from the metal atom (Adejoro et al. 2016; Ferkous et al. 2020; Ibeji et al. 2015). Table 7 shows that DMPC has high values of EHOMO, especially the protonated form.

Fig. 10
figure 10

Distribution of the electron density of DMPC via frontier molecular orbital Neutral and protonated specie

Table 7 Electronic properties and global reactivity descriptors of DMPC in HCl medium

Fukui function is a theoretical index that describes the site of adsorption of molecules. Adsorption of compounds on a metal surface is determined by certain functional groups in a molecule, hence analysis of descriptors that gives insight on the preferred site of adsorption is key (Odoemelam et al. 2018). Fukui indexes fk and fk+ (nucleophilic and electrophilic) are related to the HOMO and LUMO which explains the sites of preferred adsorption onto the metal. As shown in Table 8, C1 atom in DMPC displayed the highest electrophilic Fukui function while the nucleophilic Fukui function was in the C16. Hence the adsorption onto the metal surface will preferably occur around C1 and C16, the methoxy group carbon.

Table 8 Selected calculated Fukui functions and Mulliken atomic charges of DMPC

Conclusion

A Schiff base2-[(E)-(2,5-dimethoxybenzylidene)amino]-4-methylphenol (DMPC) was synthesized and characterized using IR, NMR, UV and mass spectroscopy techniques. The crystals data obtained via X-ray diffraction (XRD) revealed that DMPC belongs to the crystal system of monoclinic with space group of C2/c and Z = 8-unit cell. The inhibition efficiency of 96.56% and 97.02% obtained at the optimal inhibitor concentration for PDP and EIS, respectively, agree reasonably. Results from polarization data indicate that the DMPC adsorbed strongly onto the surface of mild steel, acting as mixed-type inhibitor. The experimental data was adequately fitted into the adsorption isotherm of Langmuir with R2 and slope values approaching unity which implies monolayer adsorption mechanism. The Gibbs free energy values for the adsorption of the compound suggest that DMPC adopts both physisorption and chemisorption modes while retarding corrosion. The EDX spectra show the elimination of oxygen on the surface of mild steel for the inhibited corrosion, indicating retardation of corrosion rate. Scanning Electron Microscopy (SEM) images further demonstrate the inhibitory performance of DMPC in the acid medium. Parameters calculated from the DFT study supports the fact that DMPC is an excellent corrosion inhibitor.