Introduction

Steel is the most prominent structural material of humankind and has headed to scientific advances in various fields, comprising safety, energy, and automobiles. As they are durable and versatile, steel is widely used in construction as well [1]. Corrosion can result in heavy financial losses; assessing the corrosion of metal is very important [2]. Corrosion is essentially the deprivation of metal by its reaction to the exposed medium. The reaction can be chemical or electrochemical, which usually produces rust or other metallic oxides. Demand for moderately low-carbon steels is growing steadily in the locomotive, aeronautical, defence, and other manufacturing sectors. This is due to their better mechanical properties, excellent breaking strength, fatigue, and wear resistance [3,4,5]. Furthermore, for practical use, the resistance to corrosion of carbon steel is a significant property. In a variety of industrial environments, the low corrosion resistance of carbon steels results in their rapid destruction. Consequently, carbon steel must be continuously replaced after some duration, causing substantial maintenance costs [6,7,8]. Corrosion is an inevitable act that cannot be eliminated but can be controlled using suitable corrosion control methods [9, 10]. From a metallurgical perspective, coating and heat treatment (HT) are commonly used methods of controlling corrosion.

HT is an important technique for improving the properties and resistance to corrosion of steel by altering the structure of the material. Annealing, normalizing, hardening, and tempering heat treatments are used to alter the microstructure and mechanical properties of materials, particularly steels [8, 11, 12]. HT consists of successive heating, followed by quenching and tempering to get the anticipated properties. During HT, the material undergoes changes in the crystal structure and phase transformation affecting most of the properties of steel including corrosion properties. As a result of the decline of coarse grains during heating, there is a minor enhancement in the hardenability of steels [13].

Recently, as a result of its combination of strength and formability, considerable attention has been given to improving the dual-phase (DP) steel. While most types of steel have only one microstructural phase, DP steel usually has a multiphase combination of bainite, ferrite, and martensite phases. The high ductility and resistance features are due to the unique microstructure of DP steel. As a result, DP steel has generated significant scientific and technical interest over the last decade [14]. The characteristic of DP steel is a microstructure consisting of a fine ferrite matrix containing small patches of a harder second phase. While a small percentage of preserved austenite or bainite may be present, this second phase consists primarily of martensite or bainite. The mechanical properties of DP steel are enhanced by the formation of two phases [8, 15]. DP steel's poor corrosion resistance compared to stainless steel limits its use in the automotive industry, particularly in automotive exterior panels [16]. Many mineral acid solutions such as hydrochloric or sulphuric acid are used to a large degree for various treatments of industrial materials such as pickling, descaling, acid cleaning, and oil-well acidizing. The use of corrosion inhibitors is therefore very important to keep the steel surface intact and reduce the corrosion rate. Corrosion occurs when a metal gives its electrons to an oxidation reaction. This may be delayed by metal paint, or the use of corrosion inhibitors to protect those metals from corrosion. Many well-known inhibitors are organic compounds that contain N, S, and O atoms [17,18,19,20,21]. Corrosion inhibitors attach to the metal or metal oxide layer and prevent oxygen from reaching the cathode [22, 23]. This prevents hydrogen evolution from the cathode or prevents the metal from dissolving by anode inhibitors. When added in small amounts to the medium, inhibitors limit or prevent metal from reacting to its environment. The use of inhibitors is one of the most efficient methods for protecting metals against corrosion.

The optimization process is perhaps the most widely recognized application in corrosion chemistry to determine the levels of process parameters that result in a maximum value of an outcome [24,25,26,27,28,29]. Recently, multivariate techniques are frequently used in optimization studies because they require less time, reagents, and experimental work. The design of experiment is widely used as an empirical multivariate modelling strategy to graphically assess the link between various factors and outcome parameters for optimization [30,31,32,33,34,35,36]. Accessible designs are useful to notice the impacts of factors and their interactions on the measured responses with a moderately lower number of investigations and to create a numerical model.

The degradation of parts, especially in acid and saline environments, has continued to develop much urgency for researchers to find a durable solution to the problem. The current study emphasizes the assessment of the inhibition of pectin in dual-phase AISI1040 steel with ferrite–martensite (FM) and ferrite–bainite (FB) structure corrosion in 0.5 M sulphuric acid (H2SO4) at various exposure times, and concentration of inhibitor at 30 ℃. The 0.5 M sulphuric acid is selected based on the concentration of mineral acid used for the pickling process. A Plackett–Burman model was used in the investigational design, which is ideally suited to fit a quadratic surface model and to optimize the relevant parameters, which resulted in better inhibition efficiency (IE) using the weightloss method.

The corrosion study of heat-treated applicable material using green inhibitors is limited. Therefore, the present study focused on the preparation of heat-treated AISI1040 steel to arrive at two phases followed by its corrosion behaviour and inhibition studies by varying time and inhibitor concentrations. The adsorption isotherms for pectin were explored followed by its correlation with computational and statistical analysis. The confirmation of the adsorption of pectin on the metal surface was carried out using a scanning electron microscope and atomic force microscopy.

Methodology

Material, medium and inhibitor

A medium carbon, moderate strength, non-alloy AISI1040 steel was manufactured by Vizag Steel Plant, Visakhapatnam, and supplied by Hi-Tech Sales Corporation, Mangalore, India. It is used in the present investigation. The test pieces were made in the form of a cylindrical rod 19 mm in diameter and 8 mm in height using an electrical discharge wire cutting machine. The sample was abraded using different grades of sandpaper (80–1200 µm) and finally on the polishing disc with different grades (3 µm to 0.25 µm) of diamond paste. Finally, the samples were washed with distilled water, cleaned with acetone, and dried for use in the experiment. The samples were first heated at the predetermined austenitization temperature (900 °C) in an electric muffle furnace. The samples were then held at that temperature for 2 h. Then, the specimens are quickly taken out from the furnace for air cooling to get the room-temperature structure (normalized structure). These normalized specimens were then used for obtaining the FM DP structure (Fig. 1a) where the austenitizing is carried out at 790 °C for 2 h followed by then quenching in water. Similarly, normalized specimens were used for obtaining the FB DP structure (Fig. 1b) where the austenitizing is carried out at 790 ºC for 2 h followed by quenching in a salt bath containing an equal proportion of molten sodium nitrate and sodium nitrite mixture held at a specific temperature of 350 °C isothermally. After isothermal holding for about 30 min, specimens are cooled to room temperature in still air.

Fig. 1
figure 1

Schematic drawing of the heat treatment process and its corresponding parameters to obtain a DP structure: a FM and b FB

The medium and inhibitor used in the investigation (H2SO4 and commercially available pectin) were procured from Merch Chemicals & Loba Chemie Pvt. Ltd, supplied by Sri Durga Laboratory Equipment Supplies, Mangalore, India. A large quantity, solution of H2SO4 was made ready by diluting an analytical reagent-grade H2SO4 to an appropriate volume. The solution was standardized by using sodium carbonate and methyl red solution as indicators. The solution of concentration (0.5 M) was made ready from the stock solution. 0.5, 2.0, 3.5, and 5.0 gL−1 amounts of pectin were added to the 0.5 M H2SO4 solution for the inhibition investigation. All the experiments were carried out at 30 ℃.

Corrosion test by weightloss method

An immersion corrosion test was performed to identify the effect of different heat treatments on the corrosion rate of AISI1040 steel. The weightloss method was carried out in unstirred conditions because the pickling process is done in a stagnant medium. The setup for the test was designed with ASTM G31-72 and G1 − 03 (Reapproved 2017) in mind [37, 38]. The specimens were immersed in 0.5 M H2SO4 at 30 ℃ for a duration of 1, 3, 5, and 7 h with 0.5, 2.0, 3.5, and 5.0 gL−1 of pectin. Before the test, specimen weight was measured with a 4-decimal electronic weighing balance and recorded. The specimens are then removed from the immersion environment depending on the duration of the immersion and cleaned with acetone and a non-metallic bristle brush to remove the oxide layers that formed on the specimens. After cleaning, specimens were weighed again on a scale and their weight was recorded. The specimen weights (before and after corrosion) were then compared with the initial weight to calculate the weight loss (WL) caused by corrosion. Based on the WL data, the corrosion rates (Eq. 1 [38]) and inhibition efficiencies (Eq. 2) are derived using the formula as specified below:

$$CR_{w} = \frac{{3.45 \, x \, 10^{6} \times \Delta w}}{A \times t \times d} \, [mils \, per \, year(mpy)]$$
(1)

where Δw—weight loss (in g), A—specimen area exposed to acid medium (in cm2), t—immersion time (in h), and d—density of AISI1040 steel is 7.85 (in gcm−3).

$$IE_{w} \left( \% \right) = \frac{{w_{0} - w_{i} }}{{w_{0} }} \times 100$$
(2)

where wi—weight of the specimen in the presence of pectin and w0—weight of the specimen in the absence of pectin, respectively, in g.

Adsorption isotherm and thermodynamic parameters

The interaction of the metal surface with the pectin molecule is described by adsorption isotherm. The adsorption used in the present study was Langmuir, Temkin, kinetic–thermodynamic, Freundlich, and Flory–Huggins isotherms. The correlation coefficient (R2) and best fits are the deciding criteria for selecting the best suitable adsorption isotherm. The calculation of the standard free adsorption energy (∆Goads) was based on the adsorption equilibrium constant (K) [39, 40].

Surface characterization

The surface morphology of the DP AISI1040 steel with FB structure immersed in an H2SO4 solution of 0.5 M with or without 5.0 gL−1 pectin inhibitor was investigated by taking the pictures with the magnification of 500 X using EVO MA18 for SEM. IB342 Innova model was used for capturing atomic force microscopy (AFM) spectral images. The surface characterization was carried out on the surface of corroded and inhibited surfaces.

Computational analysis

The structural–pH (0–14) relationship and its geometric values were obtained by Chemicalize-Instant Cheminformatics Solutions Suite [39]. The computational parameters for the adoption of corrosion inhibitors were done by applying the density functional theory (DFT) approach using Avagadro 1.19.0 and Gauss 09 W. The reactivity indices for the inhibitory molecule were obtained from the base set 6-31G(d,p) and the functional correlation B3LYP [39].

Statistical analysis

Minitab 19 statistical software has been used to investigate recorded experimental information. This investigation was conducted to determine the presence of a critical difference in means for stand-alone factors. Analysis of variance (ANOVA) was utilized because there was a stand-alone interpretation of perceptions that showed a lack of multicollinearity. A series of runs were conducted in a random order where input factors are varied to identify the changes in the output response. A Plackett–Burman model was used to investigate the effect of DP steel type, immersion time, and pectin inhibitor concentration on the effectiveness of corrosion inhibition. Type of DP steel was taken at two levels (FM and FB), whereas other two factors such as immersion time (1, 3, and 5 h) and concentration of pectin inhibitor (2, 3.5, and 5 gL−1) are taken at three levels. The design matrix and levels of the experimental variables are presented in Table 1 in the form of actuals. To reduce the error in the experimentation, experiments were conducted at random and the mean of three values is taken into consideration during the analysis.

Table 1 Experimental design matrix used for statistical analysis

Result and discussion

Heat treatment

Figure 2a shows the microstructure having ferrite and martensite. Martensite is a highly distorted structure formed because of the arrested diffusion of carbon particles from austenite. When the steel is held in the inter-critical temperatures and is quenched in liquid at room temperature, the austenite converts into martensite and proeutectoid ferrite remains unchanged. As the cooling takes place, the carbon atoms do not get enough time to diffuse out of austenite and lead to the formation of a distorted martensite structure. Figure 2b shows the DP structure in the steel containing ferrite and feathery bainite. The steel is heated in between lower and upper critical temperatures of the iron carbide phase diagram where homogeneous austenite is not formed. During this process, the pearlite of as-received steel converts into austenite first and proeutectoid ferrite remains unchanged. When the steel is quenched from this temperature, the austenite converts to lower-temperature structures like bainite or martensite. When the steel is quenched in subcritical temperatures (350 ℃), the cooling curve enters the bainite zone. When austenite is cooled in this temperature range, carbon atoms redistribute in austenite. Low-carbon regions transform to ferrite by diffusionless processes and result in fine needles of ferrite. As time passes, carbon diffuses out and precipitates in the form of fine carbides, the arrangement of carbides here is not in the form of lamellar structure. In this study, the steel displays upper or feathery bainite along with proeutectoid ferrite.

Fig. 2
figure 2

SEM images of DP AISI1040 steel with a FM and b FB structure

Corrosion rate (CR) and inhibition efficiency (IE)

IE, WL, and CR for 0.5, 2.0, 3.5, and 5.0 gL−1 pectin concentration at 30 ℃ are presented in Fig. 3a, b, respectively, for FM and FB DP AISI1040 steel. From Fig. 3, it is seen that the IE dropped with exposure time and increased with inhibitor concentration. The IE was observed to be highest at 1-h immersion time and lowest at 7-h immersion time. This may be due to the inefficiency of the inhibitor to withstand the corrosive due to hydrolytic degradation of the pectin layer on the metal surface when exposed for a longer duration. The rise in time exponentially increased the rates of corrosion processes in 0.5 M H2SO4 where corrosion is accompanied by the evolution of hydrogen gas, resulting in the higher dissolution of metals. Higher rates of hydrogen gas evolution increasingly disturb the metal–solution interface and could obstruct the inhibitor adsorption of already adsorbed molecules, especially when the interaction between the metal and the inhibitor is comparatively weak. As a result, the efficiency of pectin is significantly reduced when the time of the system is increased, which often signifies the physical interaction of inhibitor than chemical adsorption [40].

Fig. 3
figure 3

Weightloss data and IE in 0.5 M H2SO4 in the presence of pectin at 30 ℃ for a FM and b FB DP AISI1040 steel

Variation of CR in various pectin concentrations at different immersion times for FM and FB DP AISI1040 steel is presented in Fig. 4. Prolonged exposure can increase the solubility of the inhibitor protective films on the metallic surface. The WL data and IE relation with immersion time are shown in Fig. 5. The increase in the CR of materials with time could be also due to the increase in the kinetic energy of the reaction. The same trend was observed for both FM and FB DP AISI1040 steels, but CR was more for FM than for FB.

Fig. 4
figure 4

Variation of CR in 0.5 M H2SO4 without and with various pectin concentrations at different immersion times for a FM and b FB DP AISI1040 steel

Fig. 5
figure 5

Variation of IE in 0.5 M H2SO4 at various pectin concentrations and at different immersion times for a FM and b FB DP AISI1040 steel

Generally, martensite formation is associated with the development of internal stresses due to the presence of retained austenite. This retained austenite is developed in the steel when the martensite finishing (Mf) temperature is not reached by the cooling curve. As the internal stresses increase in a steel component, it leads to shifting the chemical reactions/corrosion toward the higher side [41]. The susceptibility of the body-centred tetragonal (BCT) unit cell of martensite to give out Fe+2 electron is more due to its metastable structure [42]; this ion formation enhances the reduction rate on the surface of the steel component, which tends to corrode it. Due to this phenomenon, the corrosion rate in FM is found higher than in the FB DP structure.

Adsorption isotherms, adsorption equilibrium constant, and Gibb’s free energy change of adsorption

Adsorption isotherms refer to the relationship between the pectin concentrations in the liquid phase and the adsorption amount of pectin on the solid phase at a certain temperature. We can study the adsorption equilibrium constant data by the isotherms and investigate Gibb’s free energy information, such as the adsorption mechanisms and the properties of pectin by the isotherms [43].

Assuming a direct relationship between IE and the degree of surface coverage (\(\theta\)) for various pectin concentrations, the weightloss data have been adapted to determine the suitability for some well-known adsorption isotherms, including the Langmuir, Temkin, Freundlich, and Flory–Huggins isotherms, and kinetic–thermodynamic model. Common adsorption isotherms are generally expressed in the form [40] as presented in Eq. 3:

$$f \, (\theta ,x) \, \exp \, ( - \alpha \theta ) \, = \, KC$$
(3)

where \(f(\theta ,x)\)—configuration factor which depends on the physical model used and the hypotheses formulated in the calculation of the isotherms; x—size relationship that signifies the comparative size of the molecule adsorbed with the solvent molecule. In particular, for water-based corrosion inhibitors, x is the number of water molecules substituted by an adsorbed inhibitor. \(Inh_{sol} + xH_{2} O_{ads} \to Inh_{ads} + xH_{2} O_{sol}\); \(\alpha\)—molecular interaction parameter [44], C-inhibitor concentration and K-adsorption equilibrium constant. Linear functional forms for isothermal equations are given in Table 2. The thermodynamic parameters are related to the adsorption process using Eq. 4:

$$\Delta G^\circ_{ads } = \, - RT \ln \, \left( {C_{solvent} K} \right)$$
(4)

where R = 8.314 J mol−1 K−1, T = 303 Kelvin, Csolvent = 1000 g/lt of water. Negative values of \(\Delta G^\circ_{ads }\) are associated with a spontaneous adsorption process. (Figure 6) shows different models of adsorption isotherms under consideration in this study. The functional and linear forms of isotherm adsorption equations tested (Eqs. 5–9) are given in Table 2.

Table 2 Functional and linear forms of adsorption isotherm equations tested
Fig. 6
figure 6figure 6

Various isotherm plots for DP AISI1040 steel with (a) FM and (b) FB structure in 0.5 M H2SO4 at 30 ℃

The data correspond to the isotherms Langmuir, Flory–Huggins, Kinetic-thermodynamic model, Freundlich, and Temkin, but Langmuir provides the best fit. Langmuir isotherm with R2 values of about 0.99 best-describes the adsorption mechanism of pectin on FM and FB in the sulphuric medium. The R2 values for each isotherm model, adsorption equilibrium constant K, were calculated for all the above adsorption isotherms, as given in Tables 3 and 4, respectively.

Table 3 Adsorption isotherm parameters obtained from DP AISI1040 FM steel corrosion data in 0.5 M H2SO4 containing pectin
Table 4 Adsorption isotherm parameters obtained from DP AISI1040 FB steel corrosion data in 0.5 M H2SO4 containing pectin

Positive K values indicate the feasibility of adsorption of the inhibitor onto the surface of the metal. The values of K decreased with increased immersion time in most cases indicating at higher immersion time; the adsorbed inhibitor tends to detach from the metallic surface due to higher corrosion. As far as corrosion inhibitor studies are concerned, a large number of experimental adsorption data fit the Langmuir isotherm (Eq. 5) to achieve a good linear fit; a similar trend is seen for all the other used adsorption isotherms with small variations in the R2 values. The adsorption of uncharged molecules on the surface is described by the Temkin isotherm (Eq. 7); this isotherm contains a factor (f) that takes into account adsorbent–adsorbate interactions. This makes the isotherm quite suitable for systems where the chemical interaction of inhibiting species with the metal surface is more pronounced.

Negative ∆G°ads values indicate that the adsorption of pectin onto the DP AISI1040 steel into sulphuric acid is a spontaneous process. Also, ∆G°ads values below 20 kJ/mol signify that the adsorption of pectin on the metal surface is based on physical adsorption. The decrease in ∆G°ads values over time implies a reduction in the stability of the absorption of pectin at a higher immersion time.

Computational analysis pH and structural studies

When pectin is put into an acidic medium, it tends to undergo adsorption based on the structural features. It is therefore highly desirable to carry out the study on the correlation of the pectin structure in a pH range [39]. In this study, pH analysis was performed between 0 and 14 to analyse the structure of pectin. The results of different pectin structures at different pHs are given in Fig. 7. From the correlation of structure with pH of the solution, it is clear that at acidic pH, OH groups of pectin molecules are available to undergo reaction with sulphuric acid and with the metal surface, which is not the case at alkaline conditions. Table 5 represents the geometry values of the pectin molecule, indicating the dimension of the structure available for the surface coverage of the metal, thereby implementing the corrosion inhibition process.

Fig. 7
figure 7

Correlation of variation in the structure of pectin with pH of the solution

Table 5 Geometry values of the pectin molecule

DFT-based quantum chemical calculations

After performing the experimental study, the theoretical study was carried out to correlate the inhibition efficiency with quantum chemical calculations. Two factors influence the distribution of frontier molecular orbitals (FMOs): they are energy gap, and reactivity of the pectin molecules. Quantum chemical computations are essential tools for understanding parameters such as the orbital molecular density of boundary electrons, which are related to adsorption affinity [45,46,47]. Metal tends to accept electrons from the inhibitor molecule in its lower unoccupied molecular orbit (LUMO). This type of donor–acceptor association between the inhibitor and the empty Fe d-orbital is responsible for inhibiting adsorption to the metal surface. Simulations based on DFT were carried out to derive parameters such as HOMO energy, LUMO, energy gap (ΔE), and dipole moment (μ). The optimized geometry of the frontier molecular orbit of HOMO and LUMO is illustrated in Fig. 8. The quantum parameters of pectin can be found in Table 6.

Fig. 8
figure 8

a Optimized structure of pectin b HOMO c LUMO

Table 6 Quantum–chemical property values determined from the neutral pectin molecule

The EHOMO value characterizes the electron-giving capacity of the inhibitor molecule; the higher EHOMO value is connected with the higher electron-giving capacity of the inhibitor molecule to the d-orbital of the metal surface. ELUMO value is equal to the capacity to accept electrons from the d-orbital of the metal surface by the inhibitor molecule. The ΔE (energy gap) = 7.204 eV of inhibitor molecule reveals the inherent capacity of electron donation with the surface of the metal. Low ΔE values have been reported to provide good IE because the energy to remove an electron from the last occupied orbit will be low. The resulting value of the energy gap was not very small, suggesting that inhibition was moderate and a maximum IE of 83.36% was achieved. The value of the dipole moment of pectin is 2.4069 D, which is slightly superior to the value of dipole moment of water (1.88 D) indicating dipole–dipole interaction between the inhibitor and the surface of the metal. Agreeing to Koopman’s theorem, the resulting molecular orbital energies can be linked to ionization potential and electronic affinity according to Eqs. (10) and (11) [45,46,47]. The electronegativity, hardness, and softness can be obtained from Eqs. (13), (14), and (15). The electrophilicity index (ω) can be computed with Eq. (16) [47]. The electronegativity (χ) and chemical hardness (η) and the fraction of the transferred electron (ΔN) are computed using Eq. (17) [47].

Global softness and chemical hardness play an important role in the effectiveness of pectin, some calculations are required to compute the required parameters, and stepwise calculations are described in Table 6. A low value of softness and a high value of chemical hardness showed good inhibition efficiency in the literature [22]. Thus, we inferred to provide the maximum inhibition efficiency. The absolute electronegativity (χ) and global electrophilicity (ω) indicated the stability and reactivity of the inhibitor molecule. According to the literature [47], ΔN value suggests that the inhibitor is capable of releasing electrons. The value of ΔN for pectin is 0.173 (should be less than 3.6), suggesting electron transfer from inhibitor to metal, thereby confirming the formation of the physical barrier on the metal surface.

Figure 9 shows the Mulliken charge population for pectin. The values of Mulliken charge density provide useful information for locating the pectin high electron density region [48, 49]. The higher the density of the electrons on the heteroatom, the stronger the contact between the inhibitor and the metal [49]. A careful look at Fig. 9 shows the accumulation of negative charges on the oxygen atom of the –OH group. This helps the formation of a barrier between the metal and the medium of corrosion. The data of quantum calculations demonstrate the active sites on pectin that can facilitate the adsorption on the metal surface forming a protective film.

Fig. 9
figure 9

Mulliken charge population for pectin

SEM and AFM

Figure 10a shows the SEM image of the polished specimen where the metal surface appears to be very flat and uniform, with limited abrasion marks caused by polishing. Figure 10b depicts the specimen surface immersed in 0.5 M H2SO4 for 3 h where the surface of the material is severely corroded as seen in the SEM image. The surface of the corroded specimen is very uneven following the dissolution of the metal and deposits of corrosion products. Pits are also seen in some areas, which are caused by the separation of the products of corrosion from the surface of the metal. The addition of 5.0 gL−1 of pectin to 0.5 M H2SO4 showed a noticeable variation on the metal surface, as shown in Fig. 10c. Most superficial cavities are successfully covered by the inhibitor creating an obstacle between the metal and the corrosive medium, preventing any additional corrosion.

Fig. 10
figure 10

SEM images of a polished surface of DP AISI1040 FB steel, b corroded surface in 0.5 M H2SO4 and c inhibited surface in 0.5 M H2SO4 and 5.0 gL−1 of DP AISI1040 steel with FB structure at 3-h immersion time

The three-dimensional images of DP AISI1040 steel with FB structure of the polished, specimen dipped in 0.5 M H2SO4, and the specimen dipped in 0.5 M H2SO4 along with 5 gL−1 pectin, are presented in Fig. 11a, b and c, respectively. The values such as average surface roughness (Ra), root-mean-square roughness (Rq), and Rmax values derived from AFM studies are provided in Table 7. It is clear from the results of Ra, Rq, and peak-valley maximum (P-V) that for the inhibited specimen the values are lower when compared to the polished and medium in the absence of pectin [50]. This is a clear indication of the adsorbed pectin, which means the formation of a protective film on the surface of the metal.

Fig. 11
figure 11

AFM spectra of a polished surface of DP AISI1040 FB steel, b DP AISI1040 FB steel + 0.5 M H2SO4, c DP AISI1040 FB steel + 0.5 M H2SO4 + 5.0 gL−1 pectin 0.5 M H2SO4 at 30 ℃

Table 7 AFM data obtained for DP FM AISI1040 steel in 0.5 M H2SO4

Statistical analysis

Table 8 depicts the IE (%) calculated from weightloss measurements and predicted IE (%) obtained from the statistical analysis.

Table 8 Experimental design matrix and IE (%) calculated from weightloss measurements and predicted IE (%) from design of experiments

P values defined as the lowest level of significance leading to rejection of the null hypothesis were used to test the significance of the effects of inhibition effectiveness. The Student's t test is used to check the significance of the coefficients of regression, and whether the slope of a regression line is significantly different from zero or not. Values of P lower than 0.05 indicate that the terms of the model are significant [27]. The outcomes disclosed that all the three variables (type of DP steel, immersion time, and inhibitor concentration) and the interaction effect of type of DP steel with the immersion time and concentration of pectin inhibitor are found to be significant at a 95% certainty level. The values of R2 will help in selecting the model with the best fit. As the values of R2 approach one, the model better fits the data [34, 35]. According to Table 9, the value of R2 is relatively close to one. The general impact of every parameter on the IE is shown in the analysis of variance (ANOVA) as given in Table 9. The outcomes of ANOVA demonstrate that the concentration of inhibitor has the highest influence on the IE (43.87% contribution) followed by the type of DP steel and immersion time.

Table 9 ANOVA table for % IE

An empirical (quadratic) model is developed to depict the IE as a function of stand-alone factors in the range chosen (Eq. 18). The values laid down in the empirical model are matched to the experimental values. The contour graphs are plotted to envisage the effect of variables according to the empirical model prepared for the response. The model obtained was utilized to predict the IE for all values of factors within the range considered. The model meets the 95% confidence standard. It demonstrates that the terms chosen in the model have a significant impact on response. At a level of 95% certainty, a close correlation is observed between the expected and measured values, as shown in Fig. 12. It shows that residuals fall on a straight line recommending that errors be normally distributed, and the max. avg. error is found at approximately 4.89%

$$\begin{aligned} {\text{IE}} \, (\%) \, &= \, 65.37 \, + \, 0.33 \, {\text{Immersion Time}}\\& + 4.28 \,{\text{Concentration of Inhibitor}}\\& - \, 0.272 \; {\text{Immersion Time}} * {\text{Immersion Time}}\\& - \, 0.127 \, {\text{Concentration of Inhibitor}}\\& * {\text{Concentration of Inhibitor}} \\& - \, 0.059 \, {\text{Immersion Time}}\\& * {\text{Concentration of Inhibitor}} \end{aligned}$$
(18)
Fig. 12
figure 12

Normal probability plot for IE

The main effect graph for IE illustrated in Fig. 13 shows the relative effect of each factor on IE. The IE value increases as the values of inhibitor concentration vary from lower to a higher level and decrease as the immersion time varies from lower to the higher level. In the interaction effect plot, if there is an association of the variables at specific levels, they are approached by crossed lines. The straight and parallel lines indicate that no association exists between the variables. From Fig. 14, it is noticed that interaction exists between the immersion time and concentration of the inhibitor.

Fig. 13
figure 13

Main effects’ plot for IE

Fig. 14
figure 14

Interaction effect plot for IE

From the contour and surface plots of IE shown in Fig. 15a, b, it is seen that the lower values of immersion time resulted in better IE. Similarly, better values of IE are observed at a higher value of the concentration of inhibitor. When the metal is exposed for a larger duration of time and at a lower concentration of inhibitor, the rate of corrosion is more, and consequently, more corrosion products results in lower IE.

Fig. 15
figure 15

a Contour plot and b surface plot of IE (%) vs concentration of inhibitor and immersion time

Response optimization

The desirability function approach (DFA) is perhaps the most generally utilized technique for response optimization. Figure 16 shows the optimization plot for IE obtained from the DFA; the main effect plots of IE with desirability are given. Desirability has a range of 0 to 1. One addresses the ideal case; zero demonstrates that at least one response is outside their adequate cut-off points.

Fig. 16
figure 16

Response optimization plot for IE

The optimum variables obtained from the response optimization plot which gave better values of IE (84.34%) for the parameters under consideration with the desirability of 0.9978 are as follows: type of DP steel—FB, immersion time—1.2542 h, and 5.0 gL−1 concentration of pectin inhibitor. Further, a set of confirmatory experiments were performed at the optimal parameter setting to confirm the improvement made to IE in DP AISI1040 FB steel. In this case, the variables are fixed at the optimum levels obtained from the DFA. The results obtained from validation experiments show that the predictions agree with the results of experimental tests and the absolute mean error between the measured and anticipated values at the optimum combination of the variables for IE is calculated at 4.23%.

Corrosion inhibition mechanism

The inhibitor molecules react with the sulphuric acid medium. Due to this, they become cationic with the representation of molecular charge given in Eq. 19.

$$PECTIN - OH \, + \, xH^{ + } \to [PECTIN - OHH_{x} ]^{x + }$$
(19)

Physical adsorption of pectin occurs due to the interaction (electrostatic) between protonated pectin molecules with the negatively charged sulphate ion layer (on the metal surface). The interaction of electrons of oxygen of aliphatic cycles with the metallic surface may also occur. Chemical adsorbed will result from the π–orbitals’ interaction with the metallic surface; this is not happing because there are only one π bonds’ interaction in each pectin molecule (C = O) that are placed away from the metal surface. In the present study, the free energy of adsorption values is lower the − 20 kJ mol−1; therefore, it shows that the adsorption of pectin molecules at the surface of AISI1040 FB steel is primary by physical adsorption.

Conclusion

  • The study demonstrated that pectin successfully inhibits the corrosion of DP AISI1040 steel in 0.5 M H2SO4 solution. IE increased with pectin concentration but declined with extended immersion time.

  • Based on all the analyses carried out, it is concluded that DP FB AISI1040 steels are more resistant to corrosion than to DP FM AISI1040 steels. The obtained findings show the maximum IE of 83.36% for a specific set of parameters.

  • The adsorption behaviour was qualitatively approached by the different isotherms, but the Langmuir isotherm gave the best fit with an R2 of 0.99.

  • Quantum chemical calculations based on the DFT of parameters associated with pectin's electronic molecular structures confirmed their inhibitory potential and established their contributions to the observed adsorption/inhibitory effect.

  • The results of the statistical analysis show that the inhibitor concentration has the greatest influence with a contribution of 43.87% to the efficiency of the inhibition followed by the immersion time.

  • The results of the confirmatory experiments show that the predictions are consistent with the results of the experimental tests and that the absolute average error for IE is 4.23% at the optimum combination of the variables.

  • The corrosion behaviour and inhibition study of heat-treated AISI1040 dual-phase ferrite–martensite and ferrite–bainite steel with pectin in 0.5 M H2SO4 at 30 ℃ were carried out, and the results obtained are in correlation with computational and statistical analysis. The confirmation of the adsorption of pectin on the metal surface was achieved by surface analysis.