1 Introduction

Metallic corrosion is one of the critical problems found in most industries. The influence of corrosion is profoundly visible in practically all industrial and domestic fields. Material degradation is more predominant in chemical and petrochemical plants, combustion motors, hydraulic power aggregates, nuclear reactors, vehicles, turbines, and many other projects. It has been assessed that around 5% of an industrialized nation's income (GDP) is spent to overcome corrosion-related problems. The actions that might be taken to prevent, or strictly speaking, to reduce corrosion is proper materials choice, alteration of the corrosive environment, the utilization of inhibitors, planning good designs, use of coatings, and employing cathodic and anodic protection methods [1, 2].

Aluminum and its alloys, as a base metal in metal in matrix composites (MMCs), play an important role to make present materials all the more commercially useful. MMCs can be customized by varying the reinforcement and their volume fraction. The MMC has extraordinary properties when compared to the base metal. They are known for higher transverse strength and stiffness, greater shear and compressive strength, creep resistance, and enhanced high-temperature capabilities [3, 4]. In addition, they have advantageous physical properties such as high electrical and thermal conductivities, non-flammability, resistance to most radiations, and negligible moisture absorption. Generally utilized reinforcements are silicon carbide (SiC), boron carbide (B4C), titanium di-boride (TiB2), aluminum oxide (Al2O3), graphite, and zirconium silicate (ZrSiO4). To attain higher strength in composites, the elementary requirement is a strong interface bond between reinforcement and matrix [5,6,7].

Aluminum metal matrix composites, because of their strength to weight and stiffness to weight proportion, are prominently used in aviation, automobile, marine, defense, and construction applications [8, 9]. One of the fundamental obstacles to utilizing MMCs is the decrease in corrosion resistance because of reinforcement which is invariably cathodic with reference to the base metal. In aluminum alloy-based composites, a defensive oxide layer provides corrosion resistance. But the discontinuities in the film due to the reinforcement can increase the sites where corrosion can be initiated; thereby, the Al-MMC is vulnerable to corrosion attack [10, 11].

The corrosion behavior of these materials in a chloride medium has been studied by various researchers [12]. It was observed from the literature that the degree of corrosion in 6061Al-SiC composites in chloride environments is dependent on the SiC content and processing condition of composites [13].

Inhibition is a preventive measure against the corrosion of materials. Mineral acids like hydrochloric and sulfuric acid are mostly utilized in pickling to eliminate the metal oxides. During pickling process, metal undergoes dissolution. Inhibitors are utilized in industrial and chemical process plants to limit the metal loss and consumption of pickling agents. Organic heterocyclic compounds are well-known corrosion inhibitors. Heteroatoms (N, S, and O) and double or triple bonds present in the inhibitor restrain the metal from deterioration by forming a defensive layer on the surface of the metal [14].

Chemical inhibitors exhibit toxic nature either during synthesis or application, resulting in temporary or lasting harm to human beings and the environment. From an environmental point of view, green inhibitors are preferred over chemical inhibitors. Green inhibitors are natural compounds of biological origin that are biodegradable, easily available, and lack toxicity. Green inhibitors are of different types like plant extracts, expiry date drugs, biopolymers, surfactants, and ionic liquids [15,16,17].

Ionic liquids are liquid salts that contain natural cation and diverse anion, which could be liquefied at/or under room temperature [18]. Because of their physicochemical properties, biodegradability, ease of availability, and lack of toxicity, ionic liquids are likewise utilized as green and reasonable alternatives for organic compounds [19]. Recently, ionic liquids have been used as inhibitors to prevent metal corrosion in acidic media [20,21,22].

In our present study, we have selected aluminum metal matrix composites, as it has a wide range of application in aviation, automobile, defense, marine, construction, and also in domestic purposes. Therefore, the study of the corrosion of 6061Al-10vol% SiC composite (Al-MMC) is very important. The corrosion study is conducted in 0.05 M HCl medium. Usually, for the cleaning, descaling, and pickling processes in industries, HCl is used during which the metal undergoes dissolution. To overcome this problem, ionic liquid 1-methyl-1-propyl piperidinium bromide (MPPB) is used as a corrosion inhibitor.

Even though every year lots of organic heterocyclic compounds are being synthesized and tested for anticorrosive performance, there is always quest for eco-friendly green inhibitor. As discussed in the introduction part, ionic liquid is considered as eco-friendly green inhibitor because of its unique characteristics. Thus, work is a contribution (both experimental and theoretical) to corrosion chemistry to attenuate corrosion of material of engineering applications with eco-friendly green inhibitor [23].

2 Materials and methods

2.1 Test coupons

The cylindrical test coupon was precasted using the cold setting resin except one of the cut surfaces of the sample with an area 1 cm2 was exposed to corrosive. The test coupon was abraded using different grades of emery papers (grit level: 150 to 1500) and further polished using levigated alumina paste by a disk polisher. The test coupon was thoroughly washed with double-distilled water and dried before use. The composition of the base alloy is shown in Table 1.

Table 1 Composition of the base alloy

2.2 Preparation of medium

1 M HCl stock solution was made in double-distilled water from HCl (Sigma-Aldrich, 35%). It was standardized by the standard volumetric procedure. The solution was diluted with a proper volume of distilled water to prepare fresh 0.05 M HCl.

2.3 Preparation of inhibitor solution

The ionic liquid, 1-methyl-1-propyl-piperidinium bromide (MPPB) (Sigma-Aldrich) (CAS:88840-42-0), was used without further purification. Inhibitor solutions of different concentrations were freshly prepared in 0.05 M HCl solution as and when required. The inhibitor MPPB is readily soluble in 0.05 M HCl.

2.4 Corrosion rate measurement techniques

Potentiodynamic polarization (PDP) and electrochemical impedance spectroscopy (EIS) techniques were used to measure the corrosion rate using an electrochemical workstation (CH600 D-series, beta software). Three electrodes in a pyrex glass beaker fitted with three electrodes were used as an electrochemical cell. Al-MMC served as the working electrode, while the platinum electrode and the saturated calomel functioned as an auxiliary electrode and reference electrode, respectively. Finely polished Al-MMC coupon was exposed to 0.05 M HCl, in the absence and in the presence of different concentrations of MPPB, at temperatures ranging from 308 to 323 K. Experiments were performed by immersing the electrochemical cell in a thermostat, which is maintained at a constant temperature. All measurements were done under unstirred conditions.

2.4.1 Potentiodynamic polarization (PDP) measurement

At the end of the 1800s, the steady-state open-circuit potential (OCP) was recorded. At a scan rate of 1 mVsec−1 Al-MMC coupon was polarized with respect to OCP from − 250 mV cathodically to + 250 mV anodically for every MPPB concentration [24].

2.4.2 Electrochemical impedance spectroscopy (EIS) method

EIS measurements were carried out at the OCP using a 10 mV amplitude AC signal with a frequency range of 100 kHz to 0.01 Hz. The Nyquist plot so obtained was used to assess the corrosion characteristics. Using version 3.21 of ZSimpwin software, the Nyquist plot was fitted to the relevant circuit, and then the double-layer capacitance (Cdl) and the polarization resistance (RP) were determined.

Potentiodynamic polarization tests were done immediately after the electrochemical impedance experiment, without any surface treatment. In all the cases, a minimum of 3–4 trials were done, and an average of best-agreeing value was reported.

2.5 Surface morphology studies

SEM images were taken (JEOL JSM-6380L) for freshly polished Al-MMC, Al-MMC in corrosive media in the absence and in the presence of 400 ppm of MPPB at a magnification of 500X. The accelerated voltage of the scanning electron microscope is 10 kV. Immersion time is 12 h. Energy-dispersive X-ray (EDAX) analysis was used for elemental mapping. With the help of the AFM (1B342 Innova model) technique, surface roughness was determined.

2.6 FTIR

The inhibitor compound and the corrosion product were characterized by an FTIR spectrophotometer (Schimadzu FTIR 8400S) in the frequency range of 4000 to 400 cm−1 using KBr pellets.

2.7 XRD

XRD analysis was carried out for corroded products before and after inhibition using a mini flex 600 Model. The finely powdered sample was used for the studies by monitoring the diffraction angle from 5 to 80 (2θ) on the instrument with a voltage of 40 kV and a current of 15 mA.

2.8 Quantum chemical calculations

Schrodinger software from Maestro Material Science was used for quantum chemical calculations. Calculations were done by using the hybrid functional with the correlation functional (B3LYP) and 6-31G as the basis set From the DFT technique, the energy gap (ΔE) was found out using the energies of EHOMO (highest occupied molecular orbital) and ELUMO (lowest unoccupied molecular orbital). The energy gap is a measure of the inhibitor molecule's interaction with the Al-MMC’s surface. Different quantum chemical descriptors were calculated from EHOMO, ELUMO, and energy gap (ΔE). From the Mulliken charge population, the highest electron density of MPPB was found.

3 Results and discussion

3.1 Open-circuit potential (OCP)

The time dependence of open-circuit potential (OCP) of 6061 Al-MMC in 0.05 M HCl in the presence of different concentration of MPPB is shown in Fig. 1.

Fig. 1
figure 1

Time dependence of open circuit potential of 6061 Al-MMC in 0.05 M HCl in the presence of different concentrations of MPPB

Fig. 1 shows the graph of EOCP vs. immersion time at 0.05 M HCl in the absence and presence of MPPB. In the absence of an MPPB inhibitor, EOCP was more negative initially then moved toward positive potential because of the formation of the passive oxide layer. slowly it moved to more negative potential as there is a dissolution of the passive film taking place. In the presence of an MPPB inhibitor, the EOCP was more negative and slowly moved toward positive potential. As the concentration of MPPB increased, EOCP showed an increase in positive values due to the formation of the inhibitor–metal complex [25, 26].

3.2 PDP

Figure 2 shows the PDP curves for Al-MMC in 0.05 M HCl without and with various concentrations of MPPB at 313 K. Curves obtained at 308 K, 318 K, and 323 K were also similar. Results of PDP are tabulated in Table 2.

Fig. 2
figure 2

Potentiodynamic polarization plot

Table 2 Results of PDP for corrosion of Al-MMC in 0.05 M HCl containing varying concentrations of MPPB

Metal oxidation is represented by anodic curves, while hydrogen evolution is by cathodic curves in an acid medium. From Fig. 2, we can observe that the anodic curve shows a plateau at the potential range of − 0.65 to − 0.50 V that indicates a kinetic barrier effect, presumably due to an oxide layer, followed by partial breakdown or increased porosity of the layer [27]. Therefore, corrosion current density (icorr) was obtained by extrapolation of the linear portion of the cathodic curve [28,29,30]. From the corrosion current density (icorr), the corrosion rate was calculated. As there is a plateau in the anodic curve, the anodic slope value (− βa) shows a lot of variations, therefore only the cathodic slope (− βc) is mentioned in Table 2. Other electrochemical parameter such as corrosion potential (Ecorr) is also obtained from the plot. Corrosion rate and inhibition efficiency were determined using Eqs. (1) and (2)

The corrosion rate was calculated by using the formula shown in Eq. 1.

$$ {\text{CR}} = \frac{{K X i_{corr} X M}}{\rho X n} $$
(1)

where K is a constant equal to 0.00327 mm g μ A−1 cm−1 y−1, icorr (corrosion current density expressed in μA cm−2), M (molar mass), ρ (metal density = 2.7 g cm−3), and n (metal valence electrons = 3) [31]. Using the formula given in Eq. 2, the % IE of MPPB was calculated.

$$ \eta \left( \% \right) = \frac{{i_{corr} - i_{{corr\left( {inhi} \right)}} }}{{i_{corr} }} \times 100 $$
(2)

where icorr and icorr(inhi) are the corrosion current densities for blank and the inhibitor MPPB.

The results of PDP are tabulated in Table 2.

In the presence of MPPB, a substantial decrease in corrosion rate was observed. The corrosion rate decreased with an increase in the concentration of MPPB. With an increase in temperature, MPPB's inhibition efficiency decreased, which implies the inhibitor possibly got physically adsorbed on the surface of the composite [32, 33]. Cathodic Tafel lines are almost parallel to one another. The Cathodic Tafel slope did not change after the addition of MPPB. This suggests that added inhibitor did not change the mechanism of the cathodic reaction. Corrosion inhibition is mainly because of the simple blocking effect. The addition of 400 ppm MPPB resulted in maximum efficiency of 60.9% at 308 K.

According to the literature, if a shift in the corrosion potential (Ecorr) by the addition of an inhibitor is more than ± 85 mV, then the inhibitor is said to be anodic or cathodic [34, 35]. The observed difference in this study was less negative than − 85 mV. Hence, MPPB worked as a mixed inhibitor.

3.3 EIS

Nyquist plots for corrosion of Al-MMC in the absence and in the presence of MPPB are given in Fig. 3. There are three frequency phases in the impedance plots. They are high-frequency (HF) capacitive loop, intermediate-frequency (IF) inductive loop, and low-frequency (LF) secondary capacitive loop. These shapes of Nyquist plots matched quite well with the reported Nyquist plots for aluminum composite corrosion in an acidic media [36].

Fig. 3
figure 3

Shows Nyquist plots for the Al-MMC corrosion in an uninhibited and inhibited medium of 0.05 M HCl at 313 K

HF capacitive loop was because of the oxidation of Al-MMC at the Al3+/Al2O3/solution interface [24]. Due to oxidation, Al+1 gets converted to Al+3. Al+1 migrates from the Al+/Al2O3 interface to the O2−/electrolyte interface. Thus Al+1 from the interface gets converted to Al+3. O2− and OH ions are generated in the O2−/electrolyte system. The diameter of the primary capacitive loop was more for the solution containing MPPB than in the case of the solution without. Further diameter increased with an increase in the concentration of MPPB. The depressed semicircle could be due to surface inhomogeneity.

The passivating oxide film on the metal surface refers to the inductive loop in the IF region [37]. The inductive loop at IF refers to surface species relaxation in the protective oxide film, as well as the relaxation of adsorbed inhibitor (MPPB) molecules over the Al-MMC surface or the adsorption of Cl ions, H+ads,, charged intermediates, and oxide ions on the composite surface [38]. Oxide film depletion could be the reason for the LF capacitive loop. It could also indicate that the protective oxide film is dissolving [39,40,41].

ZSimpWin software version 3.21 was used for circuit fitting. The equivalent circuit that best fitted into this was a nine-element circuit given in Fig. 4. Out of these, resistance components being solution resistance (Rs), resistance components (R1, R2), charge transfer resistance (Rct), and inductive resistance (RL). These resistance components which are in series is used to compute polarization resistance (Rp), Parallel to resistors R1 and R2, there are two capacitors C1 and C2. An inductive element (L) is present, which is parallel to RL. Constant phase element Q (CPE) is parallel to all the capacitors [42].

Fig. 4
figure 4

Equivalent fitment for the EIS data

The charge transfer and inductive loop collective resistance were measured as polarization resistance, RP. Equation (3) was used to calculate the Rp value [43].

$$ {\text{R}}_{{\text{p}}} = {\text{R}}_{{1}} + {\text{ R}}_{{2}} + {\text{ R}}_{{\text{L}}} + {\text{ R}}_{{{\text{ct}}}} $$
(3)

The inhibition efficiency was calculated by using Eq. (4).

$$ \eta \left( \% \right) = \frac{{R_{{p\left( {inhi} \right)}} - R_{{p\left( {blank} \right)}} }}{{R_{{p\left( {inhi} \right)}} }} $$
(4)

The polarization resistances in the presence and absence of the inhibitor are denoted as RP (inh) and RP (blank), respectively. The increased polarization resistance in the presence of an inhibitor suggested improved corrosion resistance because MPPB served as a barrier layer on the corroding electrode surface [44].

Using Eq. (5), the double-layer capacitance (Cdl) was calculated.

$$ C_{dl } = \, Y_{o} \left( {\omega_{\max } } \right)^{n - 1} $$
(5)

CPE (ZCPE) was calculated by using Eq. (6) [45].

$$ Z_{CPE} = \frac{{ Y_{O} \left( { \omega_{\max } } \right)^{n - 1} }}{{\sin \left( {\frac{n\pi }{2}} \right)}} $$
(6)

where Cdl is the double-layer capacitance [24], Yo represents the CPE constant, the frequency at which the imaginary impedance (Z//) is greatest is represented by ωmax, and n represents the CPE exponent, representing the electrode surface unevenness. The CPE functions like an ideal capacitor when n = 1. Table 3 represents the results of EIS measurements.

Table 3 Results of EIS measurements for corrosion of Al-MMC in 0.05 M HCl containing varying concentrations of MPPB

From the table, we can observe that polarization resistance (RP) and inductive resistance (RL) increases with the increase in inhibitor concentration. This leads to decrease in corrosion rate. The value of n is comparatively more in the presence of MPPB than in the absence. This suggests that the MPPB molecule adsorb on the metal surface uniformly and make the surface smooth. With increase in MPPB concentration the n value increases, which implies decrease in surface unevenness. As the temperature increases, the n value decreases which represents increase in corrosion [46, 47]. Cdl value decreases with increase in inhibitor concentration. Therefore, as the temperature increases, corrosion rate increases and inhibition efficiency decreases. But as the concentration of MPPB increases, inhibition efficiency increases [48, 49]. The maximum efficiency was found to be 60.7% from EIS measurement. Bode plot of 6061 Al-MMC at different MPPB concentrations is given in Fig. 5.

Fig. 5
figure 5

Bode plot of 6061 Al-MMC for different concentrations of MPPB in 0.05 M HCl at 313 K

Figure 5 depicts the Bode plot for the corrosion of 6061 Al-MMC at 313 K in the presence of varying MPPB concentrations. As the MPPB concentration increases, the phase angle increases, indicating that the MPPB molecule is covering the surface of the 6061 Al-MMC [50]. At 400 ppm MPPB concentration, the impedance modulus is greatest, indicating that the MPPB molecule is most efficient. This suggests that MPPB effectively controls corrosion of Al-MMC in an acid medium [51]. According to EIS studies, the highest efficiency was 60.7% at 308 K for 400 ppm MPPB concentration in 0.05 M HCl.

3.4 Effect of temperature

As the temperature was increased, inhibition efficiency decreased, possibly due to physical adsorption [52]. Figure 6 gives the Arrhenius plots for corrosion of Al-MMC in 0.05 M HCl containing varying concentrations of MPPB.

Fig. 6
figure 6

Arrhenius plots for the corrosion of Al-MMC in 0.05 M HCl containing varying concentrations of MPPB

The activation energy was obtained from the Arrhenius equation (Eq. 7).

$$ ln \left( {CR} \right) = B - \frac{{E_{a} }}{RT} $$
(7)

where Ea is activation energy got from the slope, R is the universal gas constant (8.314 JK−1 mol−1), T is the temperature (K), B is Arrhenius constant, and CR is the corrosion rate [53].

Enthalpy of activation (\(\Delta \)Ha) and entropy of activation (\(\Delta \)Sa) were obtained from the transition state equation given in Eq. (8).

$$ ln\left( \frac{CR}{T} \right) = \left[ {\ln \left( \frac{R}{Nh} \right) + \left( {\frac{{\Delta S_{a} }}{R}} \right) - \left( {\frac{{\Delta H_{a} }}{RT}} \right)} \right] $$
(8)

where T is temperature, R is the universal gas constant (8.314 JK−1 mol−1), N is Avogadro's number (6.022 × 1023 mol−1), and h is the Planck's constant (6.626 × 10–34 Js). Activation parameters are tabulated in Table 4.

Table 4 Activation parameters for the corrosion of Al-MMC in 0.05 M HCl containing varying concentrations of MPPB

The inhibited solutions had higher energy of activation (Ea) than the uninhibited solution [50]. As a result of the physical adsorption of MPPB on the surface of Al-MMC, a barrier is produced between composite and corrosive. Consequently, corrosion of the Al-MMC is reduced, which results in an increase in the value of Ea. The value of enthalpy of activation is almost the same as that of Ea supporting the exothermic reaction of the adsorption process. The negative value of entropy of activation indicated that an ordering resulted when MPPB got adsorbed on Al-MMC.

3.5 Adsorption study

To justify the inhibitor's adsorption on the composite surface, adsorption isotherms are verified. Various adsorption models, such as Freundlich, Langmuir, Frumkin, Temkin, and Florry-Huggins, are commonly used. The best fit is considered when the average regression coefficient (R2) becomes close to unity. The corrosion of Al-MMC in 0.05 M HCl with MPPB resulted in a linear plot that fitted into the Langmuir adsorption isotherm [54, 55] given by Eq. (9).

$$ \frac{{C_{{\left( {inhi} \right)}} }}{\theta } = {\text{C}}_{{\left( {{\text{inhi}}} \right)}} + \frac{1}{{\text{K}}} $$
(9)

K is the equilibrium constant for the adsorption–desorption process which is obtained from the intercept, \(\theta \) is the surface coverage, and C(inhi) is the equilibrium concentration of inhibitor. Table 5 shows Langmuir adsorption isotherm parameters.

Table 5 Langmuir adsorption isotherm

From Table 5, it is noted that the slope values deviate, from the unity which is because of the interaction of adsorbed inhibitor molecules or the inhibitor has adsorbed on cathodic and anodic sites of Al-MMC. A similar trend is observed in the literature [56, 57]. Value of R2 is close to unity which means results fitted best into Langmuir adsorption isotherm. As the temperature increases, the value of K decreases implying the inhibitor molecules adsorbed physically on the Al-MMC. Langmuir adsorption isotherm plot is shown in Fig. 7.

Fig. 7
figure 7

Langmuir adsorption isotherm plots

K was calculated by taking the reciprocal of the plot's intercept values [58].

To determine the standard free energy of adsorption (\(\Delta \)G0ads), the value of K was incorporated in Eq. (10)

$$ {\text{K}}_{{{\text{ads}}}} = \frac{1}{55.55}\exp \left( {\frac{{ - {\Delta G}0_{ads} }}{RT}} \right) $$
(10)

where T denotes the temperature in Kelvin, R denotes a universal gas constant, and. 55.5 is the molar concentration of water in the solution in mol dm−3 [59]. Plot of ΔG0ads vs. T is shown in Fig. 8.

Fig. 8
figure 8

Plot of ΔG0ads vs. T for the adsorption of MPPB on Al-MMC in 0.05 M HCl

From Fig. 8, which showed a linear fit of ΔG0ads vs. T, the standard enthalpy of adsorption (H0ads) and standard entropy of adsorption (S.0ads) were determined using Eq. (11)

$$ \Delta {\text{G}}^{0}_{{{\text{ads}}}} = \, \Delta {\text{H}}^{0}_{{{\text{ads}}}} {-}{\text{ T}}\Delta {\text{S}}^{0}_{{{\text{ads}}}} $$
(11)

Table 6 shows the thermodynamic parameters. When MPPB adsorbs on the aluminum composite surface, the values of standard free energy (\(\Delta \)G0ads) are negative and range from \(-\) 14.67 to − 12.18 kJ mol−1 [60]. For physisorption, the threshold standard free energy of adsorption is less negative than − 20 kJ mol−1, and for chemisorption, it is − 40 kJ mol−1 to – \(100\) kJ mol−1 [61]. The calculated standard free energy values for MPPB adsorption in HCl are below the threshold value of physical adsorption, implying that MPPB adsorption on the Al-MMC is through the physisorption process. Physisorption is indicated by negative standard enthalpy (ΔH0ads) values [62]. The negative values of ΔS0ads reflect a decrease in randomness in the system due to the displacement of water molecules by MPPB [63].

Table 6 Thermodynamic parameters for the adsorption of MPPB on Al-MMC in 0.05 M HCl

3.6 Mechanism of corrosion inhibition

Aluminum metal matrix and SiC particulates constitute the composite. Because of the presence of SiC particles, the protective oxide film on the surface of aluminum becomes discontinuous. The corrosion resistance of the aluminum composite is reduced due to this discontinuity in the oxide surface layer. Apart from that, silicon carbide particles act as cathodes. Aluminum has a tendency to oxidize because of its lower standard electrode potential (− 1.66 V). In the presence of a strong electrolyte like HCl, the oxidation–reduction processes are increased on the composite material. Electrolytes act as a conductor, generating small galvanic cells, which leads to micro-galvanic corrosion. This accelerates the aluminum oxidation reaction at the anode and hydrogen evolution at the cathode [64].

Ionic liquids prevent corrosion by inhibiting reactions at the anodic and/or cathodic sites of the composite. As a result, in the presence of ionic liquids, corrosion is inhibited by preventing metal dissolution and hydrogen evolution. The mechanism of aluminum corrosion in hydrochloric acid solution is described [65]. The anodic dissolution of aluminum is given in Eqs. 12 and 13.

$$ {\text{Al}} + {\text{ Cl}}^{ - } \to {\text{AlCl}}^{ - }_{{({\text{ads}})}} $$
(12)
$$ {\text{AlCl}}^{ - }_{{({\text{ads}})}} + {\text{ Cl}}^{ - } \to {\text{AlCl}}_{{2}}^{ + } + {\text{ 3e}}^{ - } $$
(13)

In an aggressive medium, the protonated inhibitor molecule gets drawn to the negatively charged metal surface. The protonated MPPB binds to AlCl(ads) and stops AlCl(ads) from oxidizing further to AlCl2+. In an aggressive environment, the adsorption process is mainly dependent on the charge on the metal surface. Initially, at cathodic sites, the adsorption of hydronium ions and hydrogen gas evolution occur simultaneously. MPPB+ competes for electrons with hydrogen ions at the cathode, resulting in the production of [Al-MPPBads] shown in Eqs. 14 and 15.

$$ {\text{Al}}_{{2}} {\text{O}}_{{3}} + {\text{ H}}_{{3}} {\text{O}}^{ + } + {\text{ e}}^{ - } \to {\text{Al}}_{{2}} {\text{O}}_{{3}} \left( {{\text{H}}_{{2}} {\text{O}}} \right) \, + \frac{1}{2}{\text{H}}_{{2}} $$
(14)
$$ {\text{Al }} + {\text{ MPPB}}^{ + } + {\text{ e}}^{ - } \to \left[ {{\text{Al}} - {\text{MPPB}}_{{({\text{ads}})}} } \right] $$
(15)

MPPB has a large molecular size. Thus, it can replace more water molecules from the composite’s surface. Inhibitor molecule contains positive charge on the nitrogen atom [66, 67]. This will easily get adsorbed over the negatively charged electrical double layer. Figure 9 shows the diagrammatic representation of the mechanism of adsorption.

Fig. 9
figure 9

Physical adsorption of MPPB on Al-MMC

3.7 Surface analysis

3.7.1 SEM analysis

The surface morphology images of polished Al-MMC and Al-MMC immersed in 0.05 M HCl in the absence and presence of MPPB are given in Fig. 10. The accelerated voltage of the scanning electron microscope is 10 kV. Secondary electrons are used in SEM analysis. The surface of freshly polished Al-MMC (Fig. 10a) looked very smooth as no corrosion occurred. In Fig. 10b, there was more roughness on the surface because Al-MMC was immersed in 0.05 M HCl, which readily underwent corrosion [68]. The surface looked smooth when the Al-MMC was immersed in 0.05 M HCl containing 400 ppm of inhibitor (MPPB) shown in Fig. 10c. The smooth surface was because MPPB molecule adsorbed on the Al-MMC surface and formed a protective barrier, resisting the attack of corrosives [69].

Fig. 10
figure 10

a Finely polished Al-MMC, b Al-MMC + 0.05 M HCl, c Al-MMC + 0.05 M HCl + 400 ppm of MPPB

3.8 EDX analysis

Table 7 shows the composition of components present in the case of freshly polished Al-MMC, Al-MMC + 0.05 M HCl, Al-MMC + 0.05 M HCl + 400 ppm of MPPB. The magnification of EDAX analysis was 200 µm. In an acid medium, the presence of chlorine is because of the interaction between the material and the medium, and the oxygen content present is because of the interaction of water molecules with the material. The presence of Br and nitrogen is from the interaction of inhibitor and the material. In the presence of 400 ppm of MPPB, corrosion is reduced as inhibitor adsorbs on the composite surface [70, 71].

Table 7 Results of EDX measurements

3.9 AFM studies

AFM analysis was carried out by contact mode. Figure 11 shows 3D pictures of Al-MMC surface for freshly polished metal coupon, Al-MMC immersed in 0.05 M HCl, and Al-MMC immersed in 0.05 M HCl with 400 ppm of MPPB, respectively.

Fig. 11
figure 11

Three-dimensional pictures of a Finely polished Al-MMC b Al-MMC + 0.05 M HCl, c Al-MMC + 0.05 M HCl + MPPB

More roughness is observed in the 3D image of Al-MMC immersed in 0.05 M HCl as more corrosion takes place. In the presence of inhibitor, the surface looks smooth comparatively. Table 8 shows the average surface roughness (Ra), root mean square roughness (Rq), and Rmax values. In the presence of the MPPB, Ra, Rq, and Rmax values of the specimen are noticeably lower than in the absence of the MPPB. This indicates the adsorption of MPPB on the metal's surface [72, 73].

Table 8 AFM data of different samples

3.10 Spectroscopic techniques

3.10.1 XRD

Figure 12a, b shows the XRD spectra for corroded powdered samples of Al-MMC in 0.05 M HCl and in the presence of 400 ppm of MPPB, respectively. Figure 12a shows the peak intensities with respect to the corroded sample, i.e., 1582.36, 735.89, 310.27, 266.91, and 101.67. Similar peaks are obtained in Fig. 12b with a sample containing inhibitor with intensities less than the sample with 0.05 M HCl, i.e., 1127.63, 541.52, 248.78, 185.86, and 96.07. The decrease in the peak intensities is because of MPPB adsorption on the surface of Al-MMC. The peaks are in agreement with the reported literature [74,75,76].

Fig. 12
figure 12

XRD spectra of a corroded sample in 0.05 M HCl, b sample with 0.05 M HCl and inhibitor (MPPB)

3.11 FTIR spectroscopy

Structure of MPPB is shown in Fig. 13a. The absorption band at 2949.02 cm−1 in the FTIR spectra of MPPB corresponds to the C–H bond, which is directly attached to nitrogen. Band at 2873 cm−1 corresponds to the C–H bond of aromatic nucleus. The C–N bond is represented by the absorption band at 1464.53 cm−1 [77, 78].

Fig. 13
figure 13

a Structure of MPPB, b FTIR Spectrum of MPPB and corroded sample with MPPB

After inhibition, the IR spectra of the corroded product are shown in Fig. 13b. A decrease in the intensity of the C-H and C-N peaks suggests the adsorption of MPPB on Al-MMC.

3.12 Quantum chemical calculations

Quantum chemical studies using the DFT approach were used to explain the inhibitory action of MPPB on Al-MMC in 0.05 M HCl [79]. The DFT approach can be used to calculate various quantum chemical characteristics such as HOMO and LUMO energy, energy gap (ΔE), dipole moment (Mulliken charges), etc., by correlation functional (B3LYP) and 6-31G as the basis set. Figure 14 depicts the optimized MPPB structure. Figure 15a and b show the optimized geometry of HOMO and LUMO frontier molecular orbitals. Table 9 lists the various quantum chemical parameters for the MPPB.

Fig. 14
figure 14

Shows the optimized structure of MPPB

Fig. 15
figure 15

a and b Optimized geometry of HOMO and LUMO frontier molecular orbitals

Table 9 Quantum chemical calculations of ionic liquid

The energy gap ΔEE = ELUMOEHOMO) is connected to the inhibitor's inhibition efficiency, as per the frontier molecular orbital theory (FMO). EHOMO is a term that refers to an inhibitor's ability to donate electrons. Any inhibitor with a higher EHOMO value is considered to have a greater potential to donate electrons. ELUMO represents the inhibitor molecule's ability to receive electrons into its unoccupied anti-bonding molecular orbital [80]. These parameters are quite helpful in estimating the interaction capability of inhibitor orbitals to explain the inhibitor compound's adsorption capability [81]. The energy gap (ΔE = 5.4282 eV) reveals the measures the inhibitor molecule's interaction with the Al-MMC's surface. Low ΔE values are considered to give great inhibition efficiency [82, 83].

MPPB has a dipole moment of 13.62 Debye, higher than the water (1.88 Debye), indicating that the MPPB molecule and the aluminum composite material have significant dipole–dipole interaction. This suggests that water molecules are favorably displaced from the metal surface, and MPPB is physically adsorbed to the metal surface [84]. The electronic parameters related to the energy gap (E), electronegativity (χ), global hardness (η), softness (σ), electrophilicity index (ω), nucleophilicity (ϵ), and a fraction of electron transfer (ΔN) are calculated based on the literature [85] and reported in Table 9.

The χ values of the MPPB are an important parameter to be considered for analyzing its reactivity. The value describes the ability to hold its electrons [86]. The significant interaction between the Al-MMC and the MPPB was supported by the low value of σ and the high value of η. The ω value of the MPPB molecule indicates stability. Reciprocal of electrophilicity gives nucleophilicity (ϵ). The calculated ΔN value for MPPB is 0.4145, indicating that it can release electrons, confirming the formation of a physical barrier on the metal surface [87]. Figure 16 depicts the Mulliken charge population for MPPB. Mulliken charge density data help identify the inhibitor molecule's high electron density area. As the electron density on the heteroatom are higher, the bond formed becomes stronger. The small negative charge in the nitrogen is because of the electron donating carbon present around it. Br shows more negative charge than nitrogen. Therefore, charge in each atom present in a molecule is known by Mulliken change density. Quantum simulations demonstrate that the currently used inhibitor has more active adsorption sites that can easily attach to the metal surface and form a protective coating [88, 89].

Fig. 16
figure 16

Mulliken change density of MPPB

4 Conclusion

Corrosion inhibition study of 6061 Al-MMC was carried out by using effective ionic liquid MPPB at different temperatures by electrochemical methods. Effectiveness of MPPB ionic liquid increased with increase in MPPB concentrations, but decreased with increase in temperature. MPPB acted as a mixed type of inhibitor and underwent physical adsorption following Langmuir adsorption isotherm. The maximum inhibition efficiency was found to be 60.9% for the 400 ppm of MPPB concentration at 308 K. Surface analysis was carried out using SEM, AFM, and EDAX. The metal coupon in the presence of corrosive medium showed more roughness due to the corrosion taking place in acid medium. When inhibitor MPPB is added, the surface appeared to be smooth. Surface studies confirmed the physisorption of MPPB on the composite material. Results of the quantum chemical study supported the mechanism of corrosion inhibition.