Corrosion inhibition of mild steel in hydrochloric acid solution by the expired Ampicillin drug

This study examines the utilization of the expired drug, namely ampicillin, as a mild steel corrosion inhibitor in an acidic environment. The inhibitor was evaluated using weight loss and electrochemical measurement accompanied with surface analytical techniques. The drug showed a potential inhibitory efficiency of > 95% at 55 °C. The inclusion of the inhibitor increased the charge transfer resistance at the steel-solution interface, according to impedance analyses. According to potentiodynamic polarisation measurements, expired ampicillin drug significantly decreased the corrosion current density and worked as a mixed-type corrosion inhibitor. The Langmuir adsorption isotherm was followed by the adsorption of ampicillin drug on the steel substrate, exhibiting an association of physical and chemical adsorption mechanisms. The surface study performed using contact angle and scanning electron microscopy–energy dispersive spectroscopy (SEM–EDS) measurements supported the inhibitor adsorption on the steel substrate.

Weight loss measurements. The corrosion protection effect of the drug on mild steel in 5% HCl solution at varying temperatures was analysed through the weight loss method 50 .
The testing samples were suspended in 5% HCl solution in the absence and presence of various inhibitor concentrations for 6 h at 25, 35, 45 and 55 °C, respectively. Specimens were washed with water immediately after immersion and then rubbed with a soft brush; finally, the samples were washed with acetone and anhydrous ethanol and weighed accurately again after drying. In this study, the average corrosion rate (ν in mpy) and inhibition efficiency (%η w ) of mild steel were calculated according to the following formulas 51 : where ν-corrosion rate, K-constant (3.46 × 10 6 ), t-immersion time in h, W-weight loss in grams, A-coupon's exposed area in cm 2 , ρ-density of MS, whose value is 7.86 g cm −3 .
where corrosion rates are indicated by ν 0 and ν i in the absence and presence of inhibitor, respectively.

Electrochemical analyses. Potentiodynamic polarization (PDP) and Electrochemical impedance (EIS)
measurements investigations were done using the three-electrode cell system comprising of a circular MS specimen with exposed area of 1 cm 2 as a working electrode, Ag/AgCl saturated by 3 M KCl and platinum rod (The surface area is approximatively 1 cm 2 ) as a reference and counter electrodes, respectively. Before the measure- www.nature.com/scientificreports/ ment, the MS samples were immersed in a corrosive environment for 30 min to achieve a steady-state open circuit potential (OCP) to check that the surface of working electrodeattained a steady-state potential. The test was performed at a frequency range of 10 -2 to 10 5 Hz with a potential perturbation of 10-mV. All the experiments were performed in this investigation at 25, 35, 45 and 55 °C. The inhibition efficacies of the inhibitor using EIS parameter i.e., polarization resistance (R p ) was denoted as %η E and calculated using Eq. (4): p and R o p are the polarization resistances in the presence and absence of inhibitor, respectively. The PDP measurements evaluates the corrosion current potential and inhibition efficacy of MS that has been exposed to acidic environments both in the occurrence and absence of inhibitor within a range of + 250 to − 250 mV vs. open circuit potential (OCP) and at scan rate of 0.1 mV s −1 . The %η I (percent inhibition efficiency calculated by corrosion current density values) can be determined using Eq. (5).
corr and I (i) corr are the corrosion current densities in the absence and presence of inhibitor, respectively.

Contact angle measurement.
To determine the effective wetting characteristics of mild steel, the KRUSS Germany model FM41Mk2 Simple drop wettability analyser was used. The samples were prepared according to the weight loss measurements.

Surface characterization methods.
In order to better understand the surface film morphology and composition, the samples were investigated through SEM-EDS analysis. The specimens were analysed using the JEOL JSM-6510LV model, equipped with an INCA, Oxford energy dispersive X-ray spectrometer. Morphologies of all the coupons were recorded with a magnification of 250× to present the constant view.

Results and discussion
Weight loss test. The Table 1 shows the outcomes of MS corrosion behaviour in HCl with varying concentrations of expired ampicillin drug for 6 h in the temperature range of 25-55 °C. The results of this Table  shows that the rate of MS corrosion and inhibition efficiencies increased with increasing temperature 52,53 . This suggests that at high temperatures, the ampicillin drug's improved performance could result from the alteration in adsorption behaviour from physical to chemical adsorption. In the case of chemical adsorption, the chemical interactions among active sites of metal and the adsorption centres of inhibitor molecules occur, making the desorption process difficult. Besides, increasing temperature results in the desorption of water molecules from the surface and increasing accessibility of the surface sites for the adsorption of inhibitor molecules. The results confirmed that the drug molecules were chemically adsorbed on the MS 54 and are a suitable temperatureresistant corrosion inhibitor.

Assessment of Adsorption Isotherms and thermodynamic parameters.
The results of the gravimetric measurement were used to select the most appropriate isotherm for the adsorption of drug molecules on the metal surface ( Fig. 2a-c). The linear regression coefficient (R 2 ), meticulously related to the unity, authenticated the Langmuir adsorption model as shown in Eq. 6 where θ is the fraction of the surface covered by the adsorbed inhibitor molecules and C is the inhibitor's concentration 55 : where the equilibrium adsorption constant is denoted by K ads , which can be attained as the intercept value from the plot of C/θ against C (Fig. 2a) . The conquered unit slope of Eq. (6) given in Table 2 confirmed the fitted  Table 2 suggests the more pronounced adsorption process (Table 2). Equation (7) can be employed to measure Gibbs free energy of adsorption (∆G°a ds ) 56 : where R − 8.314 J K −1 mol −1 (universal gas constant), T-absolute temperature in K, and 55.5-water's molar concentration in mol L −1 . The negative sign of ∆G°a ds indicates that the adsorption process is spontaneous 57 . Adsorption enthalpy change (ΔH o ads ) was obtained by plotting to log K ads against 1/T ( Fig. 3) using Eq. (8) 57 : The standard activation entropy (ΔS°a ds ) can be measured utilizing Vant't Hoff Eq. (9) 58 : Table 2 shows the values of ΔS°a ds and ΔH°a ds measured from Fig. 3. The positive ΔH°a ds values depict the endothermic nature of the activated step of the corrosion process. Instead, the negative ΔS°a ds values suggest that the entropy is reduces by the adherence of inhibitor molecules to a metal surface reduces 59,60 . Activation parameters. The increasing temperature can significantly affect a material's various properties, such as its kinetics, corrosion rate, and equilibrium. These parameters were attained through Arrhenius and transition-state Eqs. (10) and (11)   where N is Avogadro's number, and h is Planck's constant. The activation energy of a process is computed from the log CR vs. 1/T plot (Fig. 4a). The lower activation energy of a process in the occurrence of a drug compared to that of a process in its absence is due to its chemical adsorption 61 . The increase in the %η with temperature increase also suggests chemical adsorption 62,63 .
The entropy and enthalpy of activation were computed by taking into account the Transition State (Eq. 9). From the intercept of Fig. 4b and the slope of (− ∆H*/2.303R), the values of ∆S* and ∆H* were determined. The ∆H* value with positive sign indicates the endothermic process of the MS, which suggests that the solution containing the synthesized inhibitor has difficulty in preventing the steel from corrosion. The reduction in the ΔS* values (Table 3) when using inhibitor-protected acid solutions suggests that the transition state is formed through an associative mechanism 64 . EIS measurement. The impact of temperature on the ampicillin drug's efficacy in 5% HCl solution containing MS was investigated at a temperature ranging from 25 to 55 °C. The electrochemical parameters namely, the polarization resistance (R P ), double layer capacitance (C dl ), and percent inhibition efficiencies (%η E ), were analysed and given in Table 4. Table 4 shows that the absence and presence of the inhibitor significantly affects the these parameters. The radius of the MS capacitive loops in an inhibited solution is larger when compared to the solution with no inhibitor. As the concentration of inhibitor increases, this effect continues. The increase in the temperature leads to a decrease in the radius of the capacitive loop, but the increase in the presence of an inhibitor increases its diameter. The increase in impedance of mild steel due to the increased surface coverage where Z CPE represents the CPE' impedance, j-an imaginary number associating to the square root of − 1, Y 0proportionality integral, ω-angular frequency, and n-the CPE exponent which is detailing about the degree of surface inhomogeneity. The data collected during the experiment were then fitted to an equivalent circuit model as illustrated in Fig. 6, which comprises the R p , R s (solution resistance) and C dl . The values of C dl were then obtained through the given equation 66 : where ω max stands for angular frequency for the mythic proportion of impedance being maximum.
The data indicated that the R p values escalated with the increase in the solution temperature and the concentration of the inhibitor 67,68 . The reduced C dl values could be used to support the idea of the metal surface's ability to absorb the inhibitor molecules.

Potentiodynamic polarization (PDP) measurement. Potentiodynamic polarization investigations
were achieved in the temperature range of 25-55 °C in the absence and presence of 0.1, and 20 mM of expired ampicillin drug and illustrated in Fig. 7. Table 5 records the parameters extracted from PDP measurements such as I corr , corrosion potential (E corr ), and %η I of MS with and without inhibitor. It was discovered that the E corr values of the used inhibitor differ from those of the blank solution, but the change does not exceed 85 mV, proving that these inhibitors are mixed type and reduces the values of both anodic and cathodic Tafel slope 69 . The polarization curves remain constant even when the diverse concentrations of the inhibitor are used at different  (Fig. 7). The curve's shift for a lower current density indicates that the molecules' adsorption on the metal surface slowed down the corrosion process. In addition, the inclusion of an inhibitor to the blank solution results in a reduction in the values of I corr . In the absence of the studied inhibitor, I corr was 286.2 (µA cm −2 ), which increased to reach 71.2 (µA cm −2 ) at 25 °C in the occurrence of 20 mM Ampicillin drug suggesting the adsorption of drug molecules on the metal surface. The results of the polarization curve verified that the increasing   www.nature.com/scientificreports/ temperature caused the increase in the current density and the intensity of inhibition efficiencies. In addition, the time lag amid the desorption and adsorption of the inhibitor molecules on the metal surface increases with the temperature. The increase in the concentration and solution temperature of the inhibitor and its proficiency is consistent with the outcomes of the weight loss and the electrochemical impedance measurements. It could be due to the strong adsorption of drug molecules on the surface of the metal, which could improve the stability of the protective film of the inhibitor 70 .

Comparative study. The results of a comparison study of the corrosion inhibition behaviour of previously
reported drugs that were tested as corrosion inhibitors for various metals and media are shown in Table 6 34,71-77 . It is obvious from comparing the results that the expired drug under study has significantly more potency than other drugs. This approach improves the applicability of using the investigational inhibitor. Additionally, the fact that this inhibitor is used in low concentrations compared to previously reported drugs, can be used to explain the cost effectiveness.

Contact angle analysis.
A contact angle test was executed to determine if a surface has a hydrophilic or hydrophobic characteristic. This is useful in identifying a solid substrate's ability to repel liquids. A contact angle measurement was conducted on the mild steel surface that was immersed in 5% HCl in the absence and presence of drug. The contact angle of a steel surface without an inhibitor was measured at 29.8°. The results indicated that the surface's wettability could give it favourable water-related hydrophilicity 78 . The increase in the contact angle from 29.8° to 37.3°, 58.2°, 73.8° to 89.4° with the addition of inhibitor, as shown in Fig. 8, proposes that the steel surface has a hydrophobic layer due to the adsorbed drug molecules.
Surface morphology. The SEM micrographs were used to analyse the morphological variations in MS exhibited by 5% HCl solution. The polished MS surface exhibited a defect-free appearance Fig. 9a, while the rough MS surface was seen in the presence of 5% HCl solution because of the intense dissolution of the metal surface Fig. 9b. Figure 9c showed the changes in the surface appearance which were caused by the existence of a protective layer on the surface. This layer prevented the surface from getting rougher. The occurrence of the drug on the surface of the metal can act as a barrier against corrosion Fig. 9c. EDS can determine the presence of chemical composition in a sample. The surface configuration for the polished MS and MS in uninhibited and inhibited drug solutions are illustrated in Fig. 10a-c. Figure 10a displays the EDS peak of the polished MS surface before exposing it to any aggressive media, which shows some of the constituent peaks of MS. When the MS surface was exposed to 5% HCl without inhibitor (Fig. 10b), the peaks of oxygen and chlorine appeared, suggesting the formation of corrosion products in the form of oxide/chlorides due to the continuous degradation of metal in acidic phase. The absence of the oxygen peak and the increase in the peaks of iron and carbon were also observed in the 5% HCl solution. These effects led to the establishment of the surface's safety from corrosive solution because of the adsorption of inhibitor molecules (Fig. 10c).

Mechanism of corrosion protection.
In the presence of HCl solution, the MS surface is positively charged. It is well known that chloride ions have a low degree of hydration and that, through specific adsorption, they provide an excessive amount of negative charge to the metal's solution side, attracting the majority of cations 69 . In an acidic media, inhibitor molecules can remain as neutral or as protonated molecules. As a result, the adsorption modes of drug can be considered by neutral molecules or protonated forms 79 . The structure of ampicillin drug includes a benzene ring, beta-lactam ring and thiazolidine ring and heteroatoms like S, N, and O. Neutral drug molecules can be adsorbed on the mild steel' surface via the chemisorption mechanism, which involves the water molecules' displacement from the steel surface and the sharing of electrons between Fe and heteroatoms.
Moreover, the drug is adsorbed on the MS surface via donor-acceptor interactions among the ampicillin drug and the vacant d-orbital of iron atoms. Ampicillin heteroatoms can establish a coordinate bond by donating a lone pair of electrons to the metal's vacant d orbital. Besides that, π-electron in benzene ring may form the similar bond with the metal atom. The inhibitor molecules in the protonated form can bind to the metal surface through chloride ions, which form interconnecting bridges between the protonated drug cations and the positively charged metal surface. As a result, a densely packed layer will form on the metal surface, reducing charge and mass transfers.

Conclusion
To develop an effective and eco-friendly corrosion inhibitor, the effect of expired ampicillin drug on the corrosion of MS in 5% HCl was studied. The study's results revealed that the drug exhibited a 96.9% inhibition efficiency at 55 °C when 10 mM of concentration of drug was used. The potentiodynamic polarization results validated that the drug exhibited mixed-type inhibition behaviour. The impedance spectra also disclosed that the inhibitor efficacy increases with the increased concentration of inhibitor, and the diameter of the semicircle increased with increased inhibitor concentration. SEM-EDS analysis confirmed the surface film formation. It can be utilized as an eco-friendly alternative to toxic corrosion inhibitors in industrial processes such as descaling and acid pickling.

Data availability
The data sets used and/or analysed during the current study are available from the corresponding author on reasonable request.