Introduction

The use of inhibitors to control the destructive attack of acid environment has found widespread applications in many industrial processes such as acid cleaning, acid pickling, acid descaling, and oil well acidizing [1]. The applicability of organic compounds as corrosion inhibitors for metals in acidic media has been recognized for a long time [2, 3]. Most of the effective organic inhibitors used contain hetero-atoms such as O, N, S, and multiple bonds in their molecules through which they are adsorbed on the metal surface [4, 5]. It has been observed that adsorption depends mainly on certain physico-chemical properties of the inhibitor group, such as functional groups, electron density at the donor atom, π-orbital character, and the electronic structure of the molecule [6].

For proper selection of inhibitors, chemical and electrochemical techniques coupled with surface analytical techniques can be used but a need exists for a systematic approach for characterization of the interaction between the organic inhibitor molecules and the metal surfaces in order to search for new and efficient corrosion inhibitors. In recent years, there is a growing interest on the development of drug as inhibitors for metallic corrosion. In literature, several authors have reported that drugs are efficient inhibitors for the corrosion of metals in acid media [712].

Fexofenadine is the commercial name of 2-[4-{1-hydroxy-4-(4-(hydroxy-diphenyl-methyl)-1-piperidyl)butyl}phenyl]-2-methyl-propanoic acid (Fig. 1). It is an antihistamine drug used in the treatment of hayfever and similar allergic symptoms. In continuation of our work on the development of drugs as corrosion inhibitors [11, 12], the present work aims to investigate the inhibitive action of fexofenadine hydrochloride on the corrosion of mild steel in molar hydrochloric acid solutions using electrochemical impedance spectroscopy (EIS), potentiodynamic polarization resistance weight-loss techniques, and theoretical studies. Quantum chemical calculations provide means of analyzing the interactions of inhibitors with metal surface and there are many reports related with this area [4, 13, 14]. The molecular structure and the electronic parameters that can be obtained through theoretical calculations as the highest occupied molecular orbital (HOMO) energy, the lowest unoccupied molecular orbital (LUMO) energy, the HOMO–LUMO energy gap (∆E L–H = E LUMO − E HOMO), are involved in the activity of the inhibitors. However, in our previous study [15] we find that vertical ionization potential (IP), vertical electron affinity (EA), and molecular band gap (∆E MBG) are fundamentally more involved in the activity of inhibitors.

Fig. 1
figure 1

Molecular structure and IUPAC name of fexofenadine

Experimental

The studied drug, fexofenadine hydrochloride, is available under the brand name ALLEGRA manufactured by Aventis Pharma Limited, Ankleshwar (India). Stock solution of this drug was made in 10:1 ratio water:ethanol mixture to ensure solubility. This stock solution was used for all experimental purposes.

Prior to all measurements, the mild steel specimens, having compositions of (in wt.%) 0.076 C, 0.012 P, 0.026 Si, 0.192 Mn, 0.050 Cr, 0.135 Cu, 0.023 Al, 0.050 Ni, and the remainder iron, are polished successively with fine-grade emery papers from 600 to 1,200 grade. The specimens are washed thoroughly with double distilled water and finally degreased with acetone and dried at room temperature. The aggressive solution of 1 M HCl was prepared by dilution of analytical grade HCl (37%) with double distilled water and all experiments were carried out in unstirred solutions.

AC impedance (EIS) measurements and potentiodynamic polarization studies were carried out using a GAMRY PCI 4/300 electrochemical work station based on ESA 400. Gamry applications include EIS 300 (for EIS measurements) and DC 105 software (for corrosion) and Echem Analyst (5.50 V.) software for data fitting. All electrochemical experiments were performed in a Gamry three-electrode electrochemical cell under atmospheric condition with a platinum counter electrode and a saturated calomel electrode (SCE) as the reference electrode. The working electrode mild steel (7.5-cm long stem) with the exposed surface of 1.0 cm2, was immersed into aggressive solutions with and without inhibitor, and then the open-circuit potential was measured after 30 min. EIS measurements were performed at corrosion potentials, E corr, over a frequency range of 100 kHz to 10 mHz with an AC signal amplitude perturbation of 10 mV peak to peak. Potentiodynamic polarization studies were performed with a scan rate of 1 mVs−1 in the potential range from 250 mV below the corrosion potential to 250 mV above the corrosion potential. All potentials were recorded with respect to the SCE.

Weight-loss measurements were performed on the mild steel samples with a rectangular form (2.5 cm × 2.0 cm × 0.025 cm) in 1 M HCl solution with and without addition of different concentrations of inhibitor. Every sample was weighed by an electronic balance, and then placed in the acid solution (100 mL). The duration of the immersion was 3 h at the temperature range from 308 to 338 K. After immersion, the surface of the specimen was cleaned by double distilled water followed by rinsing with acetone, and the sample was weighed again in order to calculate inhibition efficiency (E%) and the corrosion rate (C R). The experiments were done in triplicate and the average value of the weight loss was noted. For each experiment, a freshly prepared solution was used and the solution temperature was thermostatically controlled at a desired value.

FTIR spectra were recorded in a Thermo Nicolet-5700 FTIR spectrophotometer (USA). The mild steel specimens of size 2.5 cm × 2.0 cm × 0.025 cm were prepared as described above. These specimens were immersed for 3 h in 100 mL of 1 M HCl solution containing 3.0 × 10−4 M fexofenadine. In order not to damage the protective film/or layer of the mild steel surfaces, the FTIR reflectance accessory was applied to study the mild steel surface.

Quantum chemical calculations for the molecular parameters related to fexofenadine were calculated using unrestricted Kohn–Sham formalism at density functional theory (DFT) level. For all DFT calculations, the Perdew–Burke–Ernzerhof (PBE1) functional [16] was used. We have chosen PBE1 functional because it has many times proved its efficiency on a wide range of compounds and it generally provides accurate results on ground and excited-state properties, including charge-transfer transitions [17]. The split valence 6-31G** basis sets were used for all atoms and quantum chemical calculations were performed with the help of the Gaussian 03 package [18]. We have performed all calculations in gas phase.

Results and discussion

Electrochemical impedance spectroscopy study

Figure 2a shows AC impedance results of mild steel/hydrochloric acid interface obtained in the absence and in the presence of various concentrations of fexofenadine in the form of Nyquist plots. The Nyquist plots for all fexofenadine concentrations are characterized by one semicircular capacitive loop. The impedance response of the mild steel in 1 M HCl solution in the presence of fexofenadine is characterized by diffusion tail (Fig. 2a). Therefore, the presence of inhibitor introduces the diffusion step in corrosion process and the reaction becomes diffusion-controlled. Hence, the corrosion process can have two steps as in any electrochemical process at the electrochemical interface, first, the oxidation of the metal (charge-transfer process) and second, the diffusion of the metallic ions from the metal surface to the solution (mass transport process). Inhibitors get adsorbed on the electrode surface and thereby produce a barrier for the metal to diffuse out to the bulk and this barrier increases with increasing the inhibitor concentration [19].

Fig. 2
figure 2

Typical a Nyquist and b Bode-magnitude plots obtained for the mild steel in 1 M HCl in the absence and presence of different concentrations of fexofenadine

It is seen from Figs. 2 that the diameter of the semicircular capacitive loop (Fig. 2a) and the impedance of the double layer (Fig. 2b) increased with increasing concentration of the fexofenadine.

The general overview of the AC impedance results meets the expectations from the theory of technique, but it must be noted that the capacitive loops are depressed ones with centers under the real axis even though they have a semicircle appearance. Deviations of this kind are mostly referred to as frequency dispersion and they are attributed to irregularities and heterogeneities of the solid surfaces [4]. In addition, in the real corrosion systems, the double layer on the interface of metal/solution does not behave as a real capacitor. On the metal side of the double layer, the charge distribution is controlled by electrons, whereas on the solution side, it is controlled by ions. The high-frequency part of the impedance and phase angle reflects the behavior of heterogeneous surface layer, whereas the low frequency part shows the kinetic response for the charge-transfer reaction [20]. A small inductive loop can be seen for both uninhibited and inhibited solutions (Fig. 2a). The presence of this low frequency inductive loop may be attributed to the relaxation process obtained by adsorption of species like (Cl)ads and (H+)ads on the electrode surface [21].

For the appraisal of the experimental Nyquist plots, equivalent circuit models, which physically correctly represent the systems under investigation, must be applied. The simplest model consists of the solution resistance (R s) in series with the parallel combination of constant phase element (CPE) in place of double-layer capacitance (C dl) and charge-transfer resistance (R t) was used. Such equivalent circuit (Fig. 3) has been used previously to model the mild steel/acid interface [22]. The charge-transfer resistance (R t) must be corresponding to the resistance between the metal and OHP (outer Helmholtz plane), and can be calculated from the difference in impedance at lower and higher frequencies, as suggested by Tsuru et al. [23].

Fig. 3
figure 3

The electrochemical equivalent circuit used to fit the impedance measurements that include, a solution resistance (R s ), a constant phase element (CPE) and a polarization resistance or charge transfer (R t )

Mathematically, a CPE’s impedance is given by

$$ {Z_{\rm{CPE}}} = {Q^{ - 1}}\,{\left( {j\omega } \right)^{ - {\rm{n}}}} $$
(1)

where Q is the magnitude of the CPE, j is the imaginary unit, ω is the angular frequency (ω = 2πf, the frequency in Hz), and n is the phase-shift gives details about the degree of surface inhomogeneity. When n = 1, this is the same equation as that for the impedance of a capacitor, where Q = C dl. In fact, when n is close to 1.0, the CPE resembles a capacitor, but the phase angle is not 90°. It is constant and somewhat less than 90° at all frequencies.

In spite of the mentioned fact, the term double-layer capacitance, is still often used in the evaluation of AC impedance results to characterize the double layer believed to be formed at the metal/solution interface of systems displaying non-ideal capacitive behavior. For providing simple comparison between the capacitive behaviors of different corrosion systems, the values of Q were converted to C dl. Hsu and Mansfeld [24] have given the following equation for calculating the ‘true’ capacitance (C dl):

$$ {C_{\rm{dl}}} = Q{\left( {{\omega_{\max }}} \right)^{n - 1}} $$
(2)

here, ω max represents the frequency at which the imaginary component reaches a maximum. It is the frequency at the top of the depressed semicircle, and it is also the frequency at which the real part (Z r) is midway between the low- and high-frequency x axis intercepts. The values of E% inhibition were calculated as described previously [5].

The AC impedance parameters extracted from the Nyquist plots for mild steel in 1 M HCl containing different concentrations of fexofenadine are given in Table 1. It is apparent that the impedance response for mild steel in 1 M HCl changes significantly with increasing inhibitor concentration. Table 1 shows that the addition of the fexofenadine into the corrosive solution caused to an increase in the inhibition efficiency, charge-transfer resistance and a decrease in the double-layer capacitance (C dl) given as [25].

$$ {C_{\rm{dl}}} = \frac{{\varepsilon {\varepsilon_0}A}}{d} $$
(3)

where ε 0 is the vacuum dielectric constant, ε is the local dielectric constant, d is the thickness of the double layer, and A is the surface area of the electrode. According to Eq. 3, a decrease in C dl can happen if the inhibitor molecules (low dielectric constant) replace the adsorbed water molecules (high dielectric constant) on the mild steel surface. The capacitance is inversely proportional to the thickness of the double layer. Thus, decrease in the C dl values could be attributed to the adsorption of fexofenadine on the metal surface. Decrease in the capacitance, which can result from a decrease in the local dielectric constant and/or an increase in the thickness of the electrical double layer, strongly suggests that the inhibitor molecules adsorbed at the metal/solution interface. In the absence and in the presence of inhibitor, phase-shift value remains more or less identical; this indicates that the charge-transfer process controls the dissolution mechanism [26] of mild steel in 1 M HCl solution.

Table 1 Electrochemical impedance parameters and the corresponding inhibition efficiencies for mild steel in 1 M HCl solution in the absence and presence of different concentrations of fexofenadine

In acidic solutions, it is known that inhibitor molecules can be protonated. Thus, in solution, both neutral molecule and cationic forms of inhibitor exist [27]. It is assumed that Cl ion is first adsorbed onto the positively charged metal surface by coulombic attraction and then inhibitor molecules can be absorbed through electrostatic interactions between the positively charged molecules and the negatively charged metal surface [27]. These adsorbed molecules interact with (FeCl)ads species to form monomolecular layers (by forming a complex) on the steel surface. These layers protect mild steel surface from attack by chloride ions. Thus, the oxidation of (FeCl)ads into Fe++ can be prevented. On the other hand, the protonated inhibitor molecules are also adsorbed at cathodic sites in competition with hydrogen ions that going to reduce hydrogen evolution.

Inhibition performance of fexofenadine for mild steel/1 M HCl interface depends on several factors such as the number of adsorption sites, molecular size, mode of interaction with the metal surface, and extent of formation of metallic complexes [28]. The adsorption of fexofenadine at the mild steel surface can take place through its three active centers; two oxygen and one nitrogen polar atoms in addition to pi-electron interaction of the benzene rings with unshared d electrons of iron atoms.

Potentiodynamic polarization study

The typical Tafel polarization curves of mild steel in 1 M HCl in the presence and absence of fexofenadine at different concentrations are shown in Fig. 4. It could be observed that both the cathodic and anodic reactions were suppressed with the addition of the drug studied, which suggested that the fexofenadine reduced anodic dissolution and also retarded the hydrogen evolution reaction.

Fig. 4
figure 4

Typical polarization curves for corrosion of mild steel in 1 M HCl in the absence and presence of different concentrations of fexofenadine

Electrochemical corrosion kinetics parameters, i.e., corrosion potential (E corr), cathodic and anodic Tafel slopes (b c, b a), and corrosion current density (I corr) obtained from the Tafel extrapolation of the polarization curves, are given in Table 2. The E% was calculated as described previously [5]. The obtained results show that the inhibition efficiency increased, while the corrosion current density decreased when the concentration of the inhibitor is increased. This could be explained on the basis of adsorption of fexofenadine on the mild steel surface and the adsorption process enhanced with increasing inhibitor concentration. The data in Table 2 show that increasing fexofenadine concentration slightly affects the values of corrosion potential (E corr) indicating that it acts as mixed-type inhibitor. From Table 2, it is clear that the values of both anodic and cathodic Tafel slope constants increase with increasing fexofenadine concentration. These results suggest that studied drug acts by affecting the mechanism of both anodic and cathodic reactions. Increase in b c values is more pronounced than b a values, indicating that cathode is more polarized. The increase in cathodic Tafel constant (b c) values changes the mechanism of hydrogen evolution reaction. This is probably due to a diffusion or barrier effect [29]. According to Bockris and Srinivasan [30], this behavior can be correlated to the decrease of the cathodic transfer coefficient which, in this case, can be ascribed to the thickening of the electric double layer due to the adsorbed inhibitor molecules. The increase in b a values indicates change in the mechanism of anodic dissolution of mild steel in 1 M HCl solution. This can be ascribed that adsorbed inhibitor molecules participate in the reaction, probably in the form of a complex, (iron–inhibitor)ads [31]. The results obtained from the polarization measurements are in good agreement with those obtained from the EIS method.

Table 2 Electrochemical polarization parameters and the corresponding inhibition efficiencies for mild steel in 1 M HCl solution in the absence and presence of different concentrations of fexofenadine

Weight-loss measurements

Effect of inhibitor concentration

Table 3 shows the corrosion parameters obtained from weight-loss studies for the mild steel in 1 M HCl solution in the absence and presence of different concentrations of fexofenadine. The inhibition efficiency (E%) and corrosion rate (C R, mm year−1) were calculated as described previously [5].

Table 3 Corrosion parameters obtained from weight-loss measurements for mild steel in 1 M HCl in presence of different concentrations of fexofenadine at 308 K

It can be observed that E% increases and corrosion rate decreases as inhibitor concentration increased from 0.2 × 10−4 to 3.0 × 10−4 M (Table 3). This behavior is the result of increased adsorption and increased coverage of inhibitor on the mild steel surface with increase in the inhibitor concentration. The results obtained from the weight-loss measurements are in good agreement with those obtained from the EIS and the polarization methods.

Effect of temperature

The effect of temperature on the inhibition performance of fexofenadine for mild steel in 1 M HCl solution in the absence and presence of 3.0 × 10−4 M concentration at temperature ranging from 308 to 338 K was obtained by weight-loss measurements. The results are given in Table 4. The inhibition efficiencies are found to decrease with increasing the solution temperature from 308 K to 338 K. This behavior can be interpreted on the basis that the increase in temperature results in desorption of the inhibitor molecules from the surface of mild steel. Table 4 shows that the corrosion rate increased with increasing temperature both in uninhibited and inhibited solutions. The corrosion rate increases more rapidly with temperature in the absence of the inhibitor. These results confirm that fexofenadine acts as an efficient inhibitor for mild steel in 1 M HCl in the range of temperature studied.

Table 4 Corrosion parameters obtained from weight-loss measurements for mild steel in 1 M HCl in presence of 3.0 × 10−4 M fexofenadine at various temperatures

Thermodynamic activation parameters

It is important to study thermodynamic parameters to get insight of the inhibitive mechanism. A plot of the logarithm of the corrosion rate (mm year−1) of mild steel obtained from weight-loss measurements vs. 1,000/T gave a straight line as shown in Fig. 5a. The apparent activation energy (E a) was calculated by using following Arrhenius equation:

$$ {C_{\rm{R}}}\,{ = }\,\lambda \,{ \exp }\,\left( { - \frac{{{E_{\rm{a}}}}}{{RT}}} \right) $$
(4)

where E a is the apparent activation energy for the corrosion of mild steel in 1 M HCl solution, R is the general gas constant, λ is the Arrhenius pre-exponential factor, and T is the absolute temperature. The values of E a and λ obtained from the slope and intercept, respectively, of the line (Fig. 5a) are given in Table 5. An alternative formula of the Arrhenius equation is the transition state equation:

$$ {C_{\rm{R}}} = \frac{{R\,T}}{{N\,h}}\,\exp \,\left( { - \frac{{\Delta \,H^\circ }}{{R\,T}}} \right)\,\exp \,\left( {\frac{{\Delta \,S^\circ }}{R}} \right) $$
(5)

where N is Avogadro’s number, h the Planck’s constant, ∆H° the enthalpy of activation and ∆S° the entropy of activation. Figure 5b shows a plot of log (C R/T) versus 1,000/T gives a straight line with a slope of (−∆H°/2.303R) and an intercept of log (R/Nh + ∆S°/2.303R) from which the values of ∆H° and ∆S° are calculated and are given in Table 5. The data in Table 5 reveal that the values of thermodynamic activation functions (E a and ∆H°) of the corrosion of mild steel in 1 M HCl solution in the presence of the inhibitor are higher than those in the free acid solution. Higher values of E a and ∆H° in the presence of inhibitor indicate more energy is required for the dissolution of mild steel in 1 M HCl in presence of the fexofenadine. Similar results were reported by other authors [32]. The increase in the apparent activation energy for mild steel dissolution in inhibited solution may be interpreted as physical adsorption that occurs in the first stage [33]. Szauer and Brand explained [34] that the increase in activation energy can be attributed to an appreciable decrease in the adsorption of the inhibitor on the mild steel surface with increase in temperature.

Fig. 5
figure 5

Arrhenius plots of a log C R vs. 1,000/T; b log (C R/T) vs. 1,000/T for the mild steel in 1 M HCl solution in the absence (1) and presence (2) of 3 × 10−4 M inhibitor. c Langmuir adsorption isotherm for the adsorption of the fexofenadine on the mild steel surface in 1 M HCl solution by using surface coverage values calculated by EIS (1), Tafel polarization (2), and weight-loss (3) data

Table 5 Different thermodynamic parameters for the corrosion of mild steel in 1 M HCl solution in the presence of 3 × 10−4 M Fexofenadine obtained from weight-loss measurements

The pre-exponential factor λ in the Arrhenius equation (Eq. 4) for corrosion process (heterogeneous reactions) is related to the number of active centers [35]. On the other hand, these active centers have different energy if energetic surface heterogeneity is assumed. There are two possibilities: in the first case (E a,inh > E a,HCl), the inhibitor is adsorbed on the most active adsorption sites (having the lowest energy) and the corrosion process takes place predominantly on the active sites of higher energy. In the second case (E a,inh < E a,HCl), the values of λ are lower than in pure HCl, i.e., a smaller number of more active sites remain uncovered which take part in the corrosion process. In the present case, E a,inh > E a,HCl, that is the inhibitor is adsorbed on the most active adsorption sites (having the lowest energy) and the corrosion process takes place predominantly on the active sites of higher energy. Values of E a and λ obtained in the presence of fexofenadine are higher than those obtained in free acid solutions which mean that the presence of fexofenadine results in high number of active centers remain uncovered with the inhibitor.

Inspection of Table 5 shows that the value of enthalpy of activation is positive and higher in the presence of an inhibitor. The positive sign of ∆H° reflects the endothermic nature of the mild steel dissolution process suggesting that the dissolution of mild steel is slow. The entropy of activation ∆S° is higher (−38 J K−1 mol−1) in the presence of an inhibitor than that (−123 J K−1 mol−1) in the absence of the inhibitor. This is opposite to what would be expected, since adsorption of inhibitor is an exothermic process and is always accompanied by a decrease of entropy. The reason could be explained as follows: the adsorption of organic inhibitor molecules from the aqueous solution can be regarded as a quasi-substitution process between the organic compound in the aqueous phase [Org(sol)] and water molecules at the electrode surface [H2O(ads)]. In this situation, the adsorption of organic inhibitor is accompanied by desorption of water molecules from the surface. Thus, while the adsorption process for the inhibitor is believed to be exothermic and associated with a decrease in entropy of the solute, the opposite is true for the solvent. The thermodynamic values obtained are the algebraic sum of the adsorption of organic molecules and desorption of water molecules. Therefore, the gain in entropy is attributed to the increase in solvent entropy [36]. The positive values of ∆S° mean that the adsorption process is accompanied by an increase in entropy, which is the driving force for the adsorption of inhibitor onto the mild steel surface [37].

The standard free energy of adsorption (∆G°ads) at different temperatures is calculated from the equation:

$$ \Delta G{^\circ_{\rm{ads}}} = - 2.303RT\,\log \left( {{55}{.55}{K_{\rm{ads}}}} \right) $$
(6)

where the value 55.5 is the concentration of water in solution expressed in M [38] and K ads is equilibrium adsorption constant and is given by:

$$ {K_{\rm{ads}}} = \theta /\left( {1 - \theta } \right)C $$
(7)

where θ is degree of surface coverage of the mild steel surface which is equals to E%/100 and C the molar concentration of inhibitor.

The values of adsorption equilibrium constant and standard free energy for mild steel in 1 M HCl solution in the presence of 3.0 × 10−4 M fexofenadine is given in Table 5. The negative values of ∆G°ads suggest that the adsorption of inhibitor molecules onto the mild steel surface is a spontaneous process [39]. The large values of adsorption equilibrium constant also suggest the spontaneity of the adsorption process and stability of the adsorbed layer on the mild steel surface. Generally, the value of the ∆G°ads of −40 kJ mol−1 is usually accepted as a threshold value between chemisorption and physisorption [40]. The values of ∆G°ads up to −20 kJ mol−1 are consistent with the electrostatic interaction between the charged molecules and the charged metal (physical adsorption) while those more negative than −40 kJ mol−1 involve sharing or transfer of electrons from the inhibitor molecules to the metal surface to form a coordinate type of bond (chemisorption) [41]. The values of standard free energy of adsorption (∆G°ads) calculated in the presence of fexofenadine are found to be around −40 kJ mol−1. This probably suggests that the adsorption mechanism of the fexofenadine on the mild steel surface in 1 M HCl solution involves chemisorption. This chemisorption mechanism can be attributed to the donation of pi-electron by the aromatic rings, the nonbinding electron pair of the oxygen atoms and the presence of piperidine ring containing one nitrogen atom as reactive centers. The adsorption of inhibitor molecules on the mild steel surface can be explained on the grounds of donor–acceptor interaction between electron density of N, O, and aromatic rings of inhibitor and vacant d orbitals of iron atoms at the surface [5, 42].

Adsorption isotherm

As it is known, organic inhibitors establish their inhibition via the adsorption of the inhibitor molecules onto the metal/solution interface. The adsorption process is influenced by the chemical composition of molecules, the distribution of charge in molecule, the temperature at the metal/solution interface, the nature and surface charge of metal and the type of aggressive media [43, 44]. The values of surface coverage, θ (E%/100), for the different concentrations of the studied drug have been used to explain the best adsorption isotherm to determine the adsorption process. The data obtained from three different techniques have been tested with several adsorption isotherms (such as Frumkin, Langmuir, Temkin, Freundlich, Bockris–Swinkels and Flory–Huggins isotherms). The Langmuir adsorption isotherm was found to fit best with our experimental data. A straight line was obtained on plotting log θ/(1 − θ) vs. log C (mol L−1) as shown in Fig. 5c which suggested that the adsorption of the inhibitor at the metal/solution interface follows Langmuir’s adsorption isotherm. The values of θ obtained from three different techniques are in good agreement and all obey the Langmuir adsorption isotherm.

FTIR study

It has been established that FTIR spectrophotometer is a powerful instrument that can be used to determine the type of bonding for organic inhibitors absorbed on the metal surface. In the present study, reflectance FTIR spectra were used to support the fact that corrosion inhibition of mild steel in acid media is due to the adsorption of inhibitor molecules on the mild steel surface. The prominent peaks are given in Table 6. The peak around 3,842 cm−1 can be attributed to Fe–O bending, indicating the coordinate bond formed by partial transference of electrons from polar O atom of inhibitors to metal surface atoms [45]. From data in Table 6, we conclude that reflectance FTIR spectra support good inhibition performance of fexofenadine for mild steel corrosion in molar hydrochloric acid solution.

Table 6 Prominent peaks obtained from reflectance FTIR spectroscopy

Quantum chemical calculations

In order to correlate experimental data obtained from different techniques (viz., electrochemical and weight loss) for fexofenadine and its structural and electronic properties, molecular parameters such as energy of highest occupied molecular orbital (E HOMO), energy of lowest unoccupied molecular orbital (E LUMO), HOMO–LUMO energy gap (∆E L–H), vertical ionization potential (IP), vertical electron affinity (EA), molecular band gap (∆E MBG), and number of transferred electrons (∆N) were computed. These computed parameters are listed in Table 7. The vertical ionization potential (IP) and vertical electron affinity (EA) were computed using unrestricted Kohn–Sham formalism. The molecular band gap was computed as the first vertical electronic excitation energy from the ground state using the time-dependent density functional theory (TD-DFT) approach as implemented in Gaussian 03. The findings of our previous studies [15] have shown that the molecular band gap is fundamentally more appropriate (than HOMO–LUMO energy gap) to correlate inhibition properties of compounds. We found that the lower the ∆E MBG of the inhibitor, the higher is the corrosion inhibition efficiency. The ∆E MBG value of 3.5 eV confirmed the good inhibitive effect of fexofenadine.

Table 7 The computed molecular parameters for fexofenadine

It has been reported that E HOMO is often associated with the electron-donating ability of a molecule, whereas E LUMO indicates its ability to accept electrons. The high values of E HOMO are likely to indicate a tendency of the molecule to donate electrons to appropriate acceptor molecules with low energy and empty molecular orbital. Figure 6 shows the full optimized minimum energy structure of fexofenadine.

Fig. 6
figure 6

Optimized structure of fexofenadine

The bonding tendencies of the inhibitors towards the metal surface atoms can be discussed in terms of the HSAB (hard–soft–acid–base) [46, 47] and the frontier-controlled interaction concepts [47, 48]. According to the general rule of HSAB principle, hard acids prefer to coordinate to hard bases and soft acids prefer to coordinate to soft bases. Furthermore, metallic atoms are known to be soft acids, and hard molecules have a large HOMO–LUMO energy gap and soft molecules have a small HOMO–LUMO energy gap. In the present study, the HOMO–LUMO energy gap is 2.5 eV mol−1 (Table 7), suggesting that fexofenadine is a soft molecule and this results in high-corrosion inhibition implying soft–soft interaction. According to the molecular orbital (MO) theory, a similar result can also be found. Since iron atom (acid) is the electron pair acceptor and inhibitor (base) is the electron pair donor, the energy difference of the LUMO (HOMO is nothing special) of the acid and the HOMO (LUMO is nothing special) of the base must be considered. MO theory suggests that the overlap between the LUMO(acid) and the HOMO(base) is the governing factor in bonding; the lower the HOMO–LUMO energy gap, the higher the HOMO–LUMO overlap and the stronger the base–acid bond formation and consequently higher the inhibition efficiency. With these results in mind, the energy data in Table 7 together with molecular band gap also suggest that fexofenadine is an efficient inhibitor for mild steel corrosion in molar hydrochloric acid solution.

In addition, the number of transferred electrons (∆N) was also calculated depending on the quantum chemical method [13]. The calculated value of ∆N is given in Table 7. If ∆N < 3.6 (electron), inhibition efficiency increases with increasing values of ∆N, while it decreases if ∆N > 3.6 (electron) [13, 14]. In this study, fexofenadine was the donor of electrons, and the iron surface atom was the acceptor. The fexofenadine was bound to the mild steel surface, and thus formed inhibition adsorption layer against corrosion.

Conclusions

The following are the main conclusions of this study:

  1. 1.

    Fexofenadine functioned as a good inhibitor for the corrosion of mild steel in 1 M HCl and the inhibiting efficiency value increased with the inhibitor concentration.

  2. 2.

    The electrochemical impedance study showed that corrosion inhibition of mild steel in molar hydrochloric acid solution takes place by adsorption process. Tafel polarization curves indicated that the fexofenadine acted as mixed-type inhibitor.

  3. 3.

    The large negative values of ∆G°ads indicated that adsorption of the studied drug on the mild steel surface is spontaneous and adsorption mechanism is typical of chemisorption. The high values of K ads suggested that the studied drug is strongly adsorbed at the mild steel/hydrochloric acid interface.

  4. 4.

    The adsorption of the fexofenadine on the mild steel surface from 1 M HCl solution obeyed the Langmuir adsorption isotherm.

  5. 5.

    The calculated quantum chemical parameters such as HOMO–LUMO energy gap, ∆E MBG, ∆N support the good inhibition performance of fexofenadine.

  6. 6.

    The FTIR spectrum showed that the inhibition is due to the formation of the film on the metal/acid solution interface through adsorption of fexofenadine molecules.