1 Introduction

Organic inhibitors were applied extensively to protect metals from corrosion in many aggressive acidic media (e.g., in the acid pickling and cleaning processes of metals) [14]. Organic compounds containing N, S and O atoms [514] were found to be good corrosion inhibitors of metals particularly for active metals like Fe, Zn, and Mg etc. The effectiveness of theses compounds as corrosion inhibitors has been interpreted in terms of their molecular structure, molecular size, and molecular mass, hetero-atoms present and adsorptive tendencies [15]. Under certain conditions, the electronic structure of the organic inhibitors has a key influence on the corrosion inhibition efficiency to the metal. The inhibitors influence the kinetics of the electrochemical reactions which constitute the corrosion process and thereby modify the metal dissolution in acids. The existing data show that most organic inhibitors act by adsorption on the metal surface. They change the structure of the electrical double layer by adsorption on the metal surface. Quite a number of studies have been carried out in determination of adsorptivity of various compounds at the electrode/solution interface [1618].

A large number of organic compounds were studied as corrosion inhibitor, uunfortunately most of the organic inhibitors used are very expensive and health hazards. Their toxic properties limit their field of application. Thus, it remains an important object to find cost-effective and non-hazardous inhibitors for the protection of metals against corrosion. In this connection, the influences of non-toxic organic compounds and drugs on the corrosion of metals in acid media were investigated by several authors [1927].

2 Experimental

2.1 Materials

Mild steel strips composed of (wt%) C = 0.17, Mn = 0.46, Si = 0.26, S = 0.017, P = 0.019 and balance Fe were used for weight loss as well as electrochemical measurements. The rectangular specimens with dimension 2.5 × 2.0 × 0.025 cm were used in weight loss experiments and of size 1.0 cm × 1.0 cm (exposed) with a 7.5 cm long stem (isolated with commercially available lacquer) were used for electrochemical measurements. The solutions (1 M HCl) were prepared by dilution of an analytical grade HCl with double distilled water. The molecular structure of ceftobiprole is shown in Fig. 1. The inhibitor concentration in the weight loss and electrochemical study was in the range of 0.93 × 10−4–9.31 × 10−4 M.

Fig. 1
figure 1

Molecular structure of ceftobiprole

2.2 Weight loss studies

Weight loss experiments were done according to the method described previously [28]. Weight loss measurements were performed at 308 K (except for temperature effect) for 3 h (except for immersion time effect) by immersing the mild steel coupons into acid solution (100 mL) without and with various amounts of inhibitors.

The inhibition efficiency (µ WL %) and surface coverage (θ) was determined by using following equation:

$$ \theta \,\, = \,\,{\frac{{w_{\text{o}} - w_{\text{i}} }}{{w_{\text{o}} }}} $$
(1)
$$ \mu_{\text{WL}} \% \, = \,\,{\frac{{w_{0} - w_{\text{i}} }}{{w_{0} }}}\,\, \times \,\,100 $$
(2)

where, w i and w 0 are the weight loss value in presence and absence of inhibitors, respectively.

2.3 Electrochemical measurements

The electrochemical studies were performed using a three electrode cell assembly at room temperature [29, 30]. The mild steel of 1 cm2 was the working electrode, platinum electrode was used as an auxiliary electrode, and standard calomel electrode (SCE) was used as reference electrode. All potentials were measured versus SCE. The polarization and impedance studies were carried out using Gamry Potentiostat/Galvanostat (model 300) with EIS software, Gamry-Instruments Inc., USA.

Tafel curves were obtained by changing the electrode potential automatically from −250 to +250 mV versus corrosion potential (E corr) at a scan rate of 1 mV s−1. EIS measurements were carried out in a frequency range from 100,000 Hz to 0.01 Hz under potentiodynamic conditions, with amplitude of 10 mV peak-to-peak, using AC signal at E corr. All experiments were measured after immersion for 30 min in 1 M HCl with and without addition of inhibitor.

The linear polarization study was carried out from cathodic potential of −20 mV versus OCP to an anodic potential of +20 mV versus OCP with a scan rate 0.125 mV s−1 to study the polarization resistance (R p).

2.4 Atomic force microscopy

The surface morphology of mild steel specimen was investigated by using atomic force microscope (AFM). Atomic force microscopy was performed using a NT-MDT multimode AFM, Russia, controlled by Solver scanning probe microscope controller. Semi-contact mode was used with the tip mounted on 100 μm long, single beam cantilever with resonant frequency in the range of 240,000–255,000 Hz, and the corresponding spring constant of 11.5 N m−1 with NOVA programme used for image rendering. The mild steel strips of 1.0 × 1.0 × 0.025 cm sizes were prepared as described in Sect. 2.2. After immersion in 1 M HCl with and without addition of 7.45 × 10−4 M ceftobiprole at 308 K for 3 h, the specimen were cleaned with distilled water, dried and then used for AFM.

3 Result and discussion

3.1 Weight loss studies

3.1.1 Effect of inhibitor concentration

The value of inhibition efficiency (µ WL %) and corrosion rate (C R) obtained from weight loss method at different concentrations in 1 M HCl at different temperatures are presented in Table 1. The optimum concentration of inhibitor was evaluated based on their inhibition efficiency. The inhibition behaviour of ceftobiprole against concentration is given in Fig. 2a.

Table 1 Corrosion rate and Inhibition efficiency values for the corrosion of mild steel in aqueous solution of 1 M HCl in absence and presence of different concentrations of ceftobiprole from weight loss measurements at different temperatures
Fig. 2
figure 2

Variation of inhibition efficiency in 1 M HCl on mild steel of surface area 10 cm2 with a different conc. of ceftobiprole inhibitor at different temperatures and b immersion time at 7.45 × 10−4 M conc.

3.1.2 Effect of immersion time

The variation of inhibition efficiency of ceftobiprole with immersion time is shown in Fig. 2b. The inhibition efficiency of the inhibitor was found to decrease with time, suggesting that the inhibitor start to desorb with increasing time.

3.1.3 Effect of temperature

In order to study the effect of temperature on the inhibition characteristic of ceftobiprole, weight loss measurements were performed at different temperatures from 308 to 338 K in absence and presence of different concentrations of ceftobiprole for 3 h immersion time and the effect of temperature on inhibition efficiency at different inhibitor concentration is shown in Fig. 2a.

As detected from Fig. 2a, inhibition efficiency decreased in the presence of optimum concentration of ceftobiprole in studied temperature range which indicated desorption of inhibitor molecule with increasing temperature. However, this decrease in inhibition efficiency is small at higher inhibitor concentration.

The dependence of corrosion rate at temperature can be expressed by Arrhenius equation and transition state equation [31, 32]:

$$ \log (C_{\text{R}} ) = {\frac{{ - E_{\text{a}} }}{2.303RT}} + \log \lambda $$
(3)
$$ C_{\text{R}} = \frac{RT}{Nh}\exp \left( {{\frac{{\Updelta S^{*} }}{R}}} \right)\exp \left( { - {\frac{{\Updelta H^{*} }}{RT}}} \right) $$
(4)

where E a apparent activation energy, λ the pre-exponential factor, ΔH* the apparent enthalpy of activation, ΔS* the apparent entropy of activation, h Planck’s constant and N the Avogadro number, respectively.

The apparent activation energy and pre-exponential factors for a wide range of concentration of ceftobiprole can be calculated by linear regression between logC R and 1/T, the results were shown in Table 2. All the linear regression coefficients are close to 1, indicating that corrosion of mild steel in hydrochloric acid can be explained using the kinetic model. Figure 3a depicted an Arrhenius plots for mild steel immersed in 1 M HCl in presence of different concentration of ceftobiprole. The plots obtained are straight lines and the slope of each straight line gives its apparent activation energy. Table 2 summarized E a values for a wide range of concentration of ceftobiprole. Inspection of Table 2 showed that apparent activation energy increased with increasing concentration of ceftobiprole. The increase in E a could be interpreted as the physical adsorption. Szauer and Brand [33] explained 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 and a corresponding increase in corrosion rates occurs due to the fact that greater area of metal is exposed to the acid environment.

Table 2 Thermodynamic activation parameters for mild steel in 1 M HCl in absence and presence of different concentrations of ceftobiprole
Fig. 3
figure 3

a Adsorption isotherm plot for log (CR) versus 1/T; b Adsorption isotherm plot for log (CR/T) versus 1/T

According to Eq. 3, corrosion rate (C R) is being effected by both E a and λ. In general, the influence of E a on the mild steel corrosion was higher than that of λ on the mild steel corrosion. However, if the variation in λ was drastically higher than that of E a, the value of λ might be the dominant factor to determine the mild steel corrosion. In the present case, E a and λ increased with concentration (the higher E a and lower λ led to lower corrosion rate). As it can be seen from Table 1, the corrosion rate of steel decreased with increasing concentration; hence, it is clear that increment of E a is the decisive factor affecting the corrosion rate of mild steel in 1 M HCl.

The results obtained in the study could be explained by the mechanism proposed by Riggs and Hurd [34]. The authors proposed a mechanism which can be applied to explain the result of present study. The authors suggested that the corrosion rate, −d(Fe)/dt, can be expressed by sum of two rates: −d(Fe)/dt = k 1(1 − θ) + k 2 θ, where k 1 and k 2 are the rate constants for the uninhibited reaction and completely covered surface, respectively, and θ is the fraction of surface covered by adsorbed inhibitor.

To confirm this proposal, the C R/θ was plotted against the 1 − θ/θ for each temperature tested. The values of k 1 and k 2 can be calculated from slopes and intercept of straight lines, respectively. The values of k 1 and k 2 calculated at different temperature are presented in Table 3. The corrosion rate of uninhibited mild steel, 40.4–174.5 mm y−1 determined using weight loss method shows good agreement with the results obtained from k 1 and the hypothesis is justified.

Table 3 Corrosion rate constant, k 1 and k 2, values obtained as a function of the covered metal surface

The Fe (Inh)ads, reaction intermediates [35]: Fe + Inh ↔ Fe-(Inh) ads + Fen+ + ne + Inh can explain the inhibition mechanism. At first, when there is not enough Fe (Inh)ads to cover the metal surface, because the inhibitor concentration is low or because the adsorption rate is slow, metal dissolution takes place on the mild steel surface free of Fe (Inh)ads. With high inhibitor concentration a compact and coherent inhibitor film is formed on the mild steel which reduces chemical attacks on the metal.

In many systems k 2 may be so small that k 2 θ may be negligible. When θ becomes quite large (>0.9), very small increase in k 2 causes the term k 1 (1 − θ) to decrease markedly so that it would take a very large ratio of k 1/k 2 to make the term k2 θ negligible at high coverage. Thus, the corrosion rates of many inhibited systems at high coverage do no suggest simply the high degree of adsorption but rather a new expression, i.e., simply k 2 θ. In such cases, the term k 1 (1 − θ) will be negligible and the corrosion mechanism probably involves direct reaction of the species ‘metal atom-adsorbed inhibitor molecules’. It is thus probable that the activation energy in \( k_{2\,} = \,\lambda e^{{ - \Updelta E_{2} /RT}} \) will be quite different from that in the uninhibited rate constant k 1. Thus it is possible that the activation energy of inhibited reaction at high coverage can be either larger or smaller than that of the uninhibited reaction. The trend of activation energies in the present work may be followed in this way.

The relationship between \( \log \,({{C_{\text{R}} } \mathord{\left/ {\vphantom {{C_{\text{R}} } T}} \right. \kern-\nulldelimiterspace} T}) \) and 1/T was shown in Fig. 3b. Straight lines are obtained with a slope (\( {{ - \Updelta H^{*} } \mathord{\left/ {\vphantom {{ - \Updelta H^{*} } {2.303R}}} \right. \kern-\nulldelimiterspace} {2.303R}} \)) and an intercept of \( \left[ {\log \left( {R/Nh} \right) + \left( {\Updelta S^{*} /2.303R} \right)} \right] \), from which the value of \( \Updelta H^{ *} \) and \( \Updelta S^{ *} \) were calculated and presented in Table 2.

The relationship between activation energy and enthalpy of activation against the concentration of ceftobiprole is shown in Fig. 4. From the data obtained in Table 2, it is clear that\( E_{\text{a}}^{{}} \), \( \Updelta H^{ *} \) vary in the same manner. In the presented study, activation parameters increase first with increasing concentration and at higher concentration are almost constant. In this case, there was no dramatic change in the value of λ, and therefore the decrease in corrosion rate is mainly controlled by activation parameters.

Fig. 4
figure 4

Variation of activation parameters with different concentrations of ceftobiprole

On comparing the values of entropy of activation (\( \Updelta S^{ *} \)) listed in Table 2, it is clear that entropy of activation increased in presence of ceftobiprole compared to free acid solution. Such variation is associated with the phenomenon of ordering and disordering of inhibitor molecules on the mild steel surface. The increase of entropy of activation in the presence of ceftobiprole indicated that increase in disorderness takes place on going from reactant to activated complex.

3.2 Thermodynamic parameters and adsorption isotherm

The adsorption on the corroding surfaces never reaches the real equilibrium and tends to reach an adsorption steady state. When corrosion rate is sufficiently decreased in the presence of inhibitor, the adsorption steady state has a tendency to attain quasi-equilibrium state. Now, it is reasonable to consider quasi-equilibrium adsorption in thermodynamic way using the appropriate adsorption isotherm. The degree of surface coverage (θ) for inhibitor was obtained from average weight loss data. Different adsorption isotherms were tested in order to find the best suitable adsorption isotherm for adsorption of ceftobiprole on the surface of mild steel from 1 M HCl solution. Langmuir adsorption isotherm (Eq. 5) was found best fit (Fig. 5). The deviation of the slopes from unity can be attributed to the molecular interaction among the adsorbed inhibitor species, a factor which was not taken into consideration during the derivation of the Langmuir equation.

Fig. 5
figure 5

Langmuir adsorption isotherms for the adsorption of ceftobiprole at different conc. in 1 M HCl on the surface of mild steel

Though the linearity of Langmuir plot may be interpreted to suggest that the experimental data for ceftobiprole obey the Langmuir adsorption isotherm, the considerable deviation of the slope from unity showed that the isotherm can not be strictly applied.

With regard to the Langmuir adsorption isotherm the surface coverage (θ) of the inhibitor on the mild steel surface is related to the concentration (C inh) of the inhibitor in the bulk of the solution according to the following equation:

$$ \theta \, = \,{\frac{{K_{\text{ads}} C_{\text{inh}} }}{{1 + K_{\text{ads}} C_{\text{inh}} }}} $$
(5)

where, \( K_{\text{ads}} \) is the equilibrium constant for the adsorption/desorption process. This equation can be rearranged to

$$ {\frac{{C_{\text{inh}} }}{\theta }}\, = \,{\frac{1}{{K_{\text{ads}} }}}\, + \,C_{\text{inh}} $$
(6)

It is known fact that \( K_{\text{ads}} \) represents the strength between adsorbate and adsorbent. Large values of \( K_{\text{ads}} \) imply more efficient adsorption and hence better inhibition efficiency [36].

From the intercepts of the straight lines on the \( {{C_{\text{inh}} } \mathord{\left/ {\vphantom {{C_{\text{inh}} } \theta }} \right. \kern-\nulldelimiterspace} \theta } \)-axis (Fig. 5a), \( K_{\text{ads}} \) can be calculated which is related to free energy of adsorption, \( \Updelta G_{\text{ads}}^{\text{o}} \), as given by Eq. 7.

$$ \Updelta G_{\text{ads}}^{\text{o}} \, = \, - RT\,\ln (55.5K_{\text{ads}} ) $$
(7)

The negative values of \( \Updelta G_{\text{ads}}^{\text{o}} \) ensure the spontaneity of the adsorption process and stability of the adsorbed layer on the mild steel surface [37, 38]. It is usually accepted that the value of \( \Updelta G_{\text{ads}}^{\text{o}} \) around −20 kJ mol−1 or lower indicate the electrostatic interaction between charged metal surface and charged organic molecules in the bulk of the solution while those around −40 kJ mol−1 or higher involve charge sharing or charge transfer between the metal surface and organic molecules [39].

Assuming thermodynamic model, corrosion inhibition of mild steel in the presence of ceftobiprole can be better explained, therefore, heat of adsorption and entropy of adsorption were calculated.

According to Van’t Hoff equation [40]:

$$ \ln K_{\text{ads}} \, = \,({{ - \Updelta H_{\text{ads}}^{\text{o}} } \mathord{\left/ {\vphantom {{ - \Updelta H_{\text{ads}}^{\text{o}} } {RT}}} \right. \kern-\nulldelimiterspace} {RT}})\, + \,{\text{constant}} $$
(8)

To calculate adsorption heat, \( \ln K_{\text{ads}} \) was plotted against \( 1 /T \), as shown in Fig. 6a. The straight lines were obtained with slope equal to \( ({{ - \Updelta H_{\text{ads}}^{\text{o}} } \mathord{\left/ {\vphantom {{ - \Updelta H_{\text{ads}}^{\text{o}} } R}} \right. \kern-\nulldelimiterspace} R}) \) and intercept equal to \( ({{\Updelta S_{\text{ads}}^{\text{o}} } \mathord{\left/ {\vphantom {{\Updelta S_{\text{ads}}^{\text{o}} } R}} \right. \kern-\nulldelimiterspace} R}\, + \,\ln \,1/55.5) \). The calculated values of heat of adsorption and entropy of adsorption are listed in Table 4. Under the experimental conditions, the adsorption heat could be approximately regarded as the standard adsorption heat (\( \Updelta H_{\text{ads}}^{\text{o}} \)).

Fig. 6
figure 6

Adsorption isotherm plot for a ln K ads vs. 1/T and b ΔG ads° vs. T for adsorption of ceftobiprole on mild steel in 1 M HCl

Table 4 Thermodynamic parameters for the adsorption of ceftobiprole in 1 M HCl on the mild steel at different temperatures

The thermodynamic parameters \( \Updelta H_{\text{ads}}^{\text{o}} \) and \( \Updelta S_{\text{ads}}^{\text{o}} \)can also be calculated from the following equation:

$$ \Updelta G_{\text{ads}}^{\text{o}} \, = \Updelta H_{\text{ads}}^{\text{o}} \, - T\Updelta S_{\text{ads}}^{\text{o}} $$
(9)

A plot of \( \Updelta G_{\text{ads}}^{\text{o}} \) vs. T gives straight lines (Fig. 6b) with the slope equal to \( - \Updelta S_{\text{ads}}^{\text{o}} \), and the value of \( \Updelta H_{\text{ads}}^{\text{o}} \) can be calculated from intercept. Values of \( \Updelta H_{\text{ads}}^{\text{o}} \)and \( \Updelta S_{\text{ads}}^{\text{o}} \) obtained by both methods follow the same trend.

The sign of enthalpy of adsorption is negative in the presence of ceftobiprole. The values of entropy of adsorption are also negative. In fact, it is well known fact that adsorption is an exothermic phenomenon accompanied by a decrease in entropy [41]. Inspection of Table 4 revealed that decrease in enthalpy and entropy are the driving force for the adsorption of ceftobiprole on the mild steel surface.

3.3 Electrochemical impedance spectroscopy

Electrochemical impedance measurements were carried over the frequency range from 100 kHz to 0.01 Hz at open circuit potential. EIS behaviour of ceftobiprole at different concentration is shown in Fig. 7a–c.

Fig. 7
figure 7

Typical a Nyquist, b Bode-magnitude and c impedance-phase plots obtained for the mild steel in 1 M HCl in the absence and presence of different concentrations of ceftobiprole

Inhibition efficiency can be calculated from Nyquist plot as follows:

$$ \mu_{{R_{\text{ct}} \% }} \,\, = \,\,{\frac{{R_{\text{ct}}^{\text{i}} - R_{\text{ct}}^{0} }}{{R_{\text{ct}}^{\text{i}} }}}\,\, \times \,\,100 $$
(10)

where, \( R_{\text{ct}}^{\text{i}} \) and \( R_{\text{ct}}^{0} \) are the charge transfer resistance of mild steel with and without inhibitor molecules, respectively. Inhibition efficiencies and other calculated impedance parameters presented Table 5.

Table 5 Impedance parameters and inhibition efficiency values for mild steel after 30 min immersion period in 1 M HCl in absence and presence of different concentrations of ceftobiprole

The impedance response of mild steel in acid solution was significantly changed after the addition of ceftobiprole, and the impedance of the inhibited system increased with inhibitor concentration. Furthermore, at 7.45 × 10−4 M concentration of ceftobiprole gives rise to much larger semicircle diameter than other two lower concentrations of ceftobiprole (Fig. 7a). In the presence of ceftobiprole, in the completely studied concentration interval, the electrochemical impedance spectra in complex plane presentation (Nyquist diagram) are characterized by one depressed semicircle, with a high frequency capacitive loop and low frequency inductive loop. Deviation from perfect circular shape, often known as frequency dispersion, was attributed to surface roughness and inhomogeneities of the solid surface [42, 43]. The high frequency capacitive loop may be due to a charge transfer process. The low frequency inductive loop can be attributed to bulk relaxation process of the adsorbed compound [44].

Figure 8 showed the electrical equivalent circuit employed to analyse the impedance spectra. Excellent fit with this model was obtained for all experimental data. As an example, the Nyquist and Bode plots for ceftobiprole at 7.45 × 10−4 M in 1 M HCl are presented in Fig. 9a and b, respectively. The measured and simulated data fitted very well. It is observed that the fitted data follow almost the same pattern as the original results along the whole diagrams. The high frequency part of the impedance and phase angle describes the behaviour of an inhomogeneous surface layer, while the low frequency contribution shows the kinetic response for the charge transfer reaction [45].

Fig. 8
figure 8

Electrochemical equivalent circuit used to fit the impedance spectra

Fig. 9
figure 9

a Nyquist plot of iron corrosion in 1 M HCl solution and b Bode-phase plots of iron corrosion in 1 M HCl solution

Phase angle at high frequencies provides a general idea of anticorrosion performance. The more negative the phase angle the more capacitive the electrochemical behaviour [46]. Depression of phase angle at relaxation frequency occurs with decreasing ceftobiprole concentration which indicated the decrease of capacitive response with the decrease of inhibitor concentration (Fig. 7c). Such a phenomenon could be attributed to higher corrosion activity at low concentrations of inhibitors.

To get more accurate fit of these experimental data, constant phase element has used instead of capacitive element. The CPE impedance is given by [47]:

$$ Z_{\text{CPE}} \, = \,Y_{0}^{ - 1} \,(i\omega )^{ - n} $$
(11)

where, Y 0 is the CPE constant, ω is the angular frequency (in rad s−1), i 2 = −1 is the imaginary number and n is a CPE exponent which can be used as a gauge of the heterogeneity or roughness of the surface [48]. Depending on the value of n, CPE can represent resistance (n = 0, Y 0 = R), capacitance (n = 1, Y 0 = C), inductance (n = −1, Y 0 = L) or Warburg impedance (n = 0.5, Y 0 = W).

The electrochemical parameters, including R s, R ct, Y 0 and n, obtained from fitting the recorded EIS data using the equivalent circuit of Fig. 8, were listed in Table 5. C dl values derived from CPE parameters according to Eq. 12 were also listed in Table 3.

$$ C_{\text{dl}} \, = \,(Y_{0} \cdot \,R_{\text{ct}}^{\,1 - n} )^{\,1/n} $$
(12)

Inspection of the results in Table 5 indicated that the R ct value increased with the concentration of ceftobiprole. The increase in R ct value is attributed to the formation of protective film on the metal/solution interface. Indeed, the increase of the values of n when compared with 1 M HCl and with ceftobiprole concentration can be explained by some decrease of the surface heterogeneity, due to the adsorption of the inhibitor on the most active adsorption sites [49]. Moreover, the values of double- layer capacitance, C dl, decreased with increasing ceftobiprole concentration. The thickness of the protective layer (d) is related to C dl according to the following equation [50]:

$$ C_{\text{dl}} \, = \,{\frac{{\varepsilon \,\varepsilon_{0} }}{d}} $$
(13)

where, ε is the dielectric constant of the protective layer and ε0 is the permittivity of free space.

It is obvious from the results that the ceftobiprole inhibited the corrosion of mild steel in 1 M HCl solution at all concentrations used in this study and the \( \mu_{{R_{\text{ct}} }} \% \) was seen to increase continuously with increasing additive concentration at 303 K (Table 5). The inhibition efficiencies, calculated from ac impedance results, show the same trend as those obtained from weight loss measurements.

3.4 Linear polarization resistance

Polarization resistance values were determined from the slope of the potential-current lines,

$$ R_{\text{p}} \, = \,A\frac{dE}{di} $$
(14)

where, A is the surface area of the electrode, \( {\text{d}}E \) is change in potential and \( {\text{d}}i \)is change in current. The R p values were used to calculate the inhibition efficiencies, (\( \mu_{{R_{\text{p}} }} \% \)) using the relationship:

$$ \mu_{{R_{\text{p}} }} \% \, = \,{\frac{{R_{\text{p}}^{\text{i}} - R_{\text{p}}^{0} }}{{R_{\text{p}}^{\text{i}} }}}\, \times \,100 $$
(15)

where, \( R_{\text{p}}^{\text{i}} \), and \( R_{\text{p}}^{ 0} \) are the polarization resistances in the presence and absence of inhibitor, respectively. The inhibition efficiencies and polarization resistance parameters presented Table 6.

Table 6 Potentiodynamic polarization parameters for mild steel without and with different concentrations of ceftobiprole in 1 M HCl

3.5 Tafel polarization

The values of corrosion potential (E corr), corrosion current density (i corr), anodic and cathodic Tafel slopes (β a and β c) can be evaluated from anodic and cathodic regions of Tafel plots. The linear Tafel segments of anodic and cathodic curves were extrapolated to corrosion potential to obtain corrosion current densities (i corr).

The inhibition efficiency was evaluated from the measured i corr values using the relationship:

$$ \mu_{\text{P}} \% = {\frac{{i_{\text{corr}}^{\text{o}} - i^{\prime}_{\text{corr}} }}{{i_{\text{corr}}^{\text{o}} }}} \times 100 $$
(16)

where, \( i_{\text{corr}}^{\text{o}} \)and \( i_{\text{corr}}^{\text{i}} \) are values of corrosion current density in absence and in presence of inhibitor, respectively.

Figure 10 represented the potentiodynamic polarization curves of mild steel in 1 M HCl in the absence and presence of various concentrations of the ceftobiprole. It can be seen from the Fig. 10 that, in the presence of inhibitor, the curves are shifted to lower current regions, showing the inhibition tendency of the ceftobiprole. There was no definite trend is observed in the E corr values in the presence of ceftobiprole. In the present study, shift in E corr values is in the range of 20–25 mV suggested that they all are acted as mixed type of inhibitor [51, 52]. The values of various electrochemical parameters derived by Tafel polarization of all the inhibitors are given in Table 6. Investigation of Table 6 revealed that the values of β a change slightly in the presence of ceftobiprole where as more pronounced change occurs in the values of β c, indicating that both anodic and cathodic reactions are effected but the effect on the cathodic reactions is more prominent. Thus, ceftobiprole acted as mixed type, but predominantly cathodic inhibitor [53]. Increase in inhibition efficiencies with increasing concentration of ceftobiprole reveals that inhibition action is due to adsorption on steel surface and the adsorption is known to depend on the chemical structure of the inhibitors.

Fig. 10
figure 10

Tafel Polarization behaviour of mild steel in 1 M HCl with different concentration range of ceftobiprole

The inhibition efficiencies of investigated compound obtained by weight loss, polarization resistance and Tafel polarization methods are in good agreement.

3.6 Surface characterization: AFM study

To establish whether inhibition is due to the formation of a film on the metal surface via adsorption, atomic force micrographs were taken. The three-dimensional AFM images are shown in Fig. 11a–c. As can be seen from Fig. 11a–c, there was much less damage on the surface of mild steel with ceftobiprole. The average roughness of polished mild steel (Fig. 11a) and mild steel in 1.0 M HCl without inhibitor (Fig. 11b) was calculated to be 66 and 395 nm, respectively. The mild steel surface in the free acid solution is getting cracked due to the acid attack on the surface (Fig. 11b). However, in presence of 7.45 × 10−4 ppm concentration of ceftobiprole, the average roughness was reduced to 185 nm in the presence of ceftobiprole (Fig. 11c).

Fig. 11
figure 11

Atomic force micrographs of mild steel surface a polished mild steel, b mild steel in 1 M HCl and c inhibited mild steel (1 M HCl + 7.45 × 10−4 ceftobiprole)

4 Mechanism of inhibition

From the results obtained from different electrochemical and weight loss measurements, it was concluded that ceftobiprole inhibited the corrosion of mid steel in 1 M HCl by adsorption at mild steel/solution interface.

It is general assumption that the adsorption of organic inhibitors at the metal surface interface is the first step in the mechanism of the inhibitor action. Organic molecules may adsorbed on the metal surface in four types namely,

  • (i) Electrostatic interaction between the charged molecules and the charged metal,

  • (ii) Interaction of unshared electron pairs in the molecule with the metal,

  • (iii) Interaction of π-electrons with the metal and

  • (iv) a combination of types (i–iii) [54, 55].

The inhibition of active dissolution of the metal is due to the adsorption of the inhibitor molecules on the metal surface forming a protective film. The inhibitor molecules can be adsorbed on to the metal surface through electron transfer from the adsorbed species to the vacant electron orbital of low energy in the metal to form a co-ordinate type link.

The inhibition efficiency depends on many factors [56, 57] including the number of adsorption centres, mode of interactions with metal surface, molecular size and structure.

It is well known that iron has co-ordination affinity towards nitrogen, sulphur and oxygen bearing ligands [58, 59]. Hence, adsorption on iron can be attributed to co-ordination through iminic group, hetero atom (N and S) and π-electrons of aromatic ring.

In acidic solution, carbonyl group (O16), secondary amine group (N13), free amino group (N22), iminic nitrogen (N23) as well as nitrogen atoms in thiadiazole ring are protonated easily because all of them are planar and having high electron density (Fig. 12). Physical adsorption may take place due to electrostatic interaction between protonated molecule and (FeCl)ads species. Interaction between mild steel surface and unshared electron pairs of N-atoms and unprotonated S-atom occurs due to co-ordinate covalent bond formation. Another striking feature for high inhibition performance of ceftobiprole is the presence of S-atom. The presence of S-atom in the inhibitor structures makes the formation of dπ–dπ bond resulting from overlap of 3d-electrons from iron atom to the 3d vacant orbital of S-atom possible, which enhances the adsorption of the compounds on the metal surface. Chemical adsorption of ceftobiprole is also possible due to interaction of π-electrons with metal surface following deprotonisation step of the physically adsorbed protonated molecules.

Fig. 12
figure 12

Three-dimensional representation of ceftobiprole molecule

The results obtained from weight loss, EIS, linear polarization and Tafel polarization are in a good agreement.

5 Conclusions

The corrosion behaviour of mild steel was investigated in 1 M HCl with and without addition of various concentrations of ceftobiprole using weight loss, EIS, linear polarization and potentiodynamic polarization. The main conclusions are:

  • 1. The adsorption of ceftobiprole obeyed Langmuir adsorption isotherm.

  • 2. Ceftobiprole acted as mixed type inhibitor.

  • 3. Decrease in enthalpy and entropy are the driving force for the adsorption of ceftobiprole on the mild steel surface.

  • 4. The inhibition efficiency of ceftobiprole decreased with temperature, which leads to an increase in activation energy of corrosion process.

  • 5. The increase in CPE exponent (n) with increasing concentration of ceftobiprole indicated that the surface roughness of mild steel decreased with increasing inhibitor concentration.