1 Introduction

Corrosion is an undesirable natural event that occurs between metals and their surroundings. It has been a major problem to metallic material applications in the industry as a whole. Corrosion is disastrous to mild steel applications [1,2,3], aluminum, and other materials, causing huge cost of controlling in the process of minimizing it. This has caused inadequate functioning and breakdown of industrial infrastructures. Therefore, the need for corrosion control is highly essential, most especially for industrial applications. Large number of researches has revealed corrosion control of steel, especially in acid environment as a major issue which are addressed by minimizing it with different types of methods. One of the methods employed is corrosion inhibition because of their effectiveness [4,5,6].

Mild steel inhibitive control of corrosion in acidic medium from past research has shown that inhibitors used are synthetic compounds, heterocyclic in nature, showing excellent effectiveness of corrosion inhibition but they are not environmentally friendly and are expensive [7,8,9,10]. As a result of these, the use of eco-friendly, non-expensive corrosion inhibitors such as drugs are now used for protection of steel in acidic and saline environments [11,12,13,14,15,16]. Researchers have showed many applications of use of drugs as inhibitor on mild steels in recent times, which are popularly known for their excellent result in control of corrosion [17,18,19,20,21,22]. The high rate of use of drug is due to its corrosion control nature on metals when used, which promotes strong capacity to adhere quickly on steel surfaces to form protective covering when used [23,24,25,26].

Drugs usage as corrosion inhibition has performed greatly in mitigating steel surfaces from corrosion when used as control of corrosion, especially in different corrosive environments [27, 28]. Another important reason for the use of drugs as inhibitor is as a result of its swift ease purification and production control [29,30,31,32,33]. This research focuses on the examination of the inhibitive nature of Ibuprofen drug as inhibitor of mild steel in acidic environment. The Ibuprofen drug behavior was studied using linear polarization method.

2 Experimental Processes

2.1 Preparation of Sample

The samples of steel used for this research are (10 × 10 × 1.5) mm by dimension. Chemical composition for the metal in weight (%) is shown in Table 1. Emery paper of different grades was used to polish the mild steel samples and their weights were recorded after polishing them. The H2SO4 acid was prepared with water and the mild steel samples were placed in the mixture inside the beaker containers, containing the inhibitors with concentrations of 0 ml, 5 ml, 10 ml, 15 ml, and 20 ml, respectively. The Ibuprofen drug inhibitor molecular structure is shown in Fig. 1.

Table 1 Composition of the metal used
Fig. 1
figure 1

Molecular structure of Ibuprofen [34]

2.2 Linear Polarization Resistance

The PGSTAT 101 Metrohm potentiostat/galvano stat (Auto lab) was connected to a computer in order to generate the linear polarization results. The mild steel sample was introduced into the acidic environment that was prepared and connected with a three-electrode system (working, reference, counter) and mounted together. The mild steel acted as the working electrode, while the graphite rod is the counter electrode and silver chloride electrode, which functions as a reference. Linear potential scan range was − 1.5 V to + 1.5 V. The Tafel plot shows the values of current density (Jcorr) and polarization potential (Ecorr). The inhibitor efficiency and surface coverage (θ) were totaled with Eqs. 1 and 2 [35,36,37].

$$\varTheta = 1 - \frac{{J{\text{corr}}}}{{J{\text{ocorr}}}}$$
(1)

Corrosion current density values were used to calculate the inhibitor efficiency, using the equation below:

$${\text{I}} . {\text{E}}\% = 1 - \frac{{J{\text{corr}}}}{{J{\text{ocorr}}}} \times 100$$
(2)

\(J{\text{corr}},\) Inhibited corrosion current densities. \(J{\text{ocorr}},\) Uninhibited corrosion current density.

3 Results and Discussion

3.1 Linear Potentiodynamic Polarization

The potentiodynamic values for mild steel in H2SO4 acidic environment in 0 ml value of Ibuprofen drug as no inhibitor for sample A and 5 ml, 10 ml, 15 ml, 20 ml Ibuprofen drug for samples B, C, D, and E are stated in Table 2 respectively and its corresponding polarization curves are shown in Fig. 2. The Ibuprofen drug inhibitor was administered in the concentrations of 0, 5, 10, 15, and 20 ml, respectively, and each reading was observed, recorded and used for the plotting of the graph as shown below.

Table 2 Polarization values of both with inhibitor and without inhibitor on mild steel
Fig. 2
figure 2

Potentiodynamic curves for inhibited and uninhibited

The values of the corrosion current density decrease as the inhibitor concentration increases, indicating the adsorption of the inhibitor on mild steel, causing corrosion rate reduction by moving the anodic and cathodic polarization curves in the direction of the lower values of corrosion current density. This reduces the cathodic evolution and anodic metal dissolution reactions of the steel [38]. This shows that increase in Ibuprofen drug particle from 5 ml through 10 ml, 15 ml, and finally to 20 ml rapidly reduces the corrosion of steel. However, there are little changes in corrosion potential values on varying concentrations of Ibuprofen drug which implies that polarization is a mixed type inhibitor having adsorbed its molecules on the surface of the steel [39,40,41,42,43].

3.2 Open Circuit Potential (OCP) Measurement

Figure 3 shows the potential (V) versus Time (S) curves for the mild steel. From observation, it can be seen that the presence of Ibuprofen drug moved the steady-state potential to the positive direction. The positive shift implies that the anodic reaction is relatively more affected than the cathodic reaction. There were notable changes in the features of the curved compared to the sample without inhibitor. The values of OCP for the samples inhibited were between − 0.6 and –0.71 V within the first 5 s. It is important to note that the potential vs. time curve for the inhibited and uninhibited mild steel were almost straight line indicating that steady-state potential was achieved [44].

Fig. 3
figure 3

Open circuit potential (OCP) against Time for Ibuprofen drug inhibitor

3.3 Measurement of Inhibition Efficiency and Corrosion Rate

Figure 4 shows the effect of Ibuprofen drug on the corrosion rate of the mild steel. This indicates that the introduction of Ibuprofen drug into the corrosive medium reduces the corrosion rate of the steel. The corrosion rate of the mild steel was high without inhibitor with about 10.56 mm/year but gradually reduces to 8.12, 7.05, 5.80 and finally to 3.88 mm/year as the concentration of the inhibitor increases. This is an indication that the adsorption of the inhibitor on the mild steel had been achieved. The rate of corrosion reduces as the concentration of Ibuprofen drug increases, which is in accordance with the work of author Ref. [45]. The corrosion rate of the uninhibited mild steel was found to be the highest on the chart.

Fig. 4
figure 4

Representation of rate with respect to the inhibited and uninhibited steel

3.4 Inhibition Efficiency and Inhibitor Concentration

Figure 5 shows the relationship between the inhibition efficiency and the inhibitor concentration of Ibuprofen drug on the mild steel. The value of inhibitor efficiencies increases as the concentration of the Ibuprofen drug increases, with maximum inhibitor efficiency of 63.25% at the highest inhibitor concentration. This establishes the absorption of Ibuprofen drug on the surface of the mild steel [46].

Fig. 5
figure 5

Variation of inhibition efficiency with increase in concentration of Ibuprofen drug

3.5 The Adsorption Study of Ibuprofen Drug

Figure 6 compares the relationship between the surface coverage and the inhibitor concentration of Ibuprofen drug on the mild steel. This shows the Freundlich adsorption isotherm and correlation coefficient. The adsorption facilitates the calculation of Log C and Log θ. The Freundlich plot in Fig. 6 for surface features shows linear relationship with higher inhibitor concentration, indicating the continues adsorption of the inhibitor on the steel surface. Freundlich value for (R2) is 0.9676. This shows that corrosion control in mild steel by Ibuprofen drug was successful since R2 is close to unity [47].

Fig. 6
figure 6

Freundlich isotherm of inhibited mild steel at room temperature

Freundlich isotherm law [48],

$$\log \uptheta = \log K_{{ads}} + n\log {\text{C}}$$
(3)

4 Conclusions

  • Freundlich isotherm law was obeyed by the inhibitor with correlation regression coefficient of R2 = 0.9676. The value of R2 is close to unity showing the inhibitor’s effectiveness.

  • The maximum corrosion inhibitor efficiency was 63.25% for the inhibited mild steel in the acidic environment.

  • The Ibuprofen drug behaves as a mixed type inhibitor in the corrosive medium.