Experimental and modeling analysis on the performance of 2-mercaptobenzimidazole corrosion inhibitor in hydrochloric acid solution during acidizing in the petroleum industry

In this work, the corrosion inhibition of carbon steel in 1 molar HCl solution was evaluated by experimental and modeling approaches using 2-mercaptobenzimidazole (2-MBI). To this end, an experimental design for the weight loss method using response surface methodology (RSM) was carried out and the corrosion rate (CR) and inhibition efficiency (IE) were determined. The study was completed at various values of temperature, exposure time, and inhibitor concentration to determine the optimal conditions for corrosion prevention. Using experimental data on the corrosion rate and inhibition efficiency of 2-MBI, new models were developed, the significance of which was tested using ANOVA-analysis of variance. The developed RSM-based CR and IE models were highly accurate and reliable, and their P-values were less than 0.0001. The novelty of this study lies in the newly developed model for the evaluation of 2-MBI inhibition performance and its application to high-temperature conditions in the petroleum industry. Besides, the R2-statistics (R2, adjusted-R2, and predicted-R2), adequate precision and diagnostic plots were used as main measures to verify the accuracy and adequacy of both CR and IE models. In addition, it was observed that inhibitor concentration had the most impact on both CR and IE models compared to other parameters due to its largest F-values (561.65 for CR and 535.56 for IE models). Moreover, the results indicated that adding 140–150 ppm of 2-MBI at low-level temperatures of 30–35 °C had the most interaction effect on the performance of the corrosion inhibition process. In this case, the CR was less than 0.9 mm/y and the IE more than 94%, even after a high exposure time of 105 h. Furthermore, numerical optimization of the corrosion inhibition process for 2-MBI showed that the optimum conditions for maximum IE and minimum CR were achieved at a concentration of 115 ppm, temperature of 30.7 °C, and exposure time of 60.4 h. Under these conditions, the efficiency and corrosion rate were 92.76% and 0.53 mm/y, respectively. Finally, the adsorption of 2-MBI on the sample surface was studied at various exposure times and temperatures. In all cases, the adsorption behavior obeyed the Langmuir isotherm. In this case, the Gibbs adsorption free energy varied from − 33 to − 37 kJ/mol, which reflects both physical and chemical adsorption of the corrosion inhibitor at all tested temperatures and test times.


Introduction
Corrosion is the gradual deterioration of the properties of metals and materials as a result of an electrochemical reaction in a corrosive environment. Damage caused by corrosion is not limited to metals and affects the water, energy, and manual effort used in the construction and installation of metal framing (Angst 2018;Neville et al. 2002;Raja et al. 2016). Thus, corrosion is one of the key problems facing various industries, including oil and gas (Askari et al. 2019(Askari et al. , 2018Barker et al. 2018;Kumari and Lavanya 2021;Obot et al. 2020;Prasad et al. 2020;Zehra et al. 2021). Corrosion and its related processes are one of the main reasons that reduce equipment performance. Proper corrosion prevention should avoid various severe damages, including financial and economic losses, water resources, and environmental pollution Taheri et al. 2022;Wasim and Djukic 2022). Nowadays, the study of the corrosion process in carbon steel samples is one of the most important subjects of industries and scientific centers. Carbon steel is widely used in the petroleum industry (Abd El-Lateef et al. 2016;Al-Sabagh et al. 2011;Barker et al. 2017;Hegazy et al. 2016;May et al. 2022;Migahed et al. 2005;Panossian et al. 2012;Wang and Melchers 2017). Thus, the corrosion control of carbon steel is one of the essential topics in corrosion science.
Corrosion inhibitors are of great practical importance because they are widely used to minimize the destruction of metals (Panchal et al. 2021;Tamalmani and Husin 2020;Verma et al. 2018aVerma et al. , 2021. The industrial applications of corrosion inhibitors are increasing daily to reduce the damage to the process. Corrosion inhibitors consist of compounds whose molecules can be absorbed on the surface of metals, resulting in the formation of a protective layer that separates the surface from the corrosive agent (Gladkikh et al. 2020;Markhali et al. 2013;Prasai et al. 2012;Tansuğ et al. 2014). This adsorption of inhibitors can occur chemically, physically, or both, as determined by the free energy of adsorption. The corrosion rate, inhibition performance, and inhibitor adsorption depend on various parameters. Some of them are as follows: type and surface of the metal, structure of the used corrosion inhibitor, the type, and strength (pH) of the tested solution (corrosive medium), inhibitor concentration, immersion (contact) time, and temperature (Christov and Popova 2004;Dkhireche et al. 2020;Murthy and Vijayaragavan 2014;Sanni et al. 2019;Sharma and Kumar 2021;Verma et al. 2018b;Wang et al. 2011).
Various groups of organic compounds are known as corrosion inhibitors for carbon steel in various corrosive environments. Azole derivatives have many uses, which can be mentioned as corrosion inhibitors for protecting different metal surfaces (Abdallah et al. 2019;Caldona et al. 2021;Ouakki et al. 2020). The mechanism of their action is that they work through the process of surface adsorption and create a protective hydrophobic layer on the metal surface, which prevents the metal from dissolving in aggressive environments. Thus, these reagents block the anodic and cathodic active sites and limit the attack of corrosive substances on the surface. Prevention of the corrosion process on the surface of a metal sample is carried out in two main stages as follows: the transfer of reagent particles to the metal surface and then the interaction of its functional groups with the surface. 2-Mercaptobenzimidazole (2-MBI) is an effective corrosion inhibitor, the performance of which is widely evaluated. The high inhibition efficiency of this reagent is associated with its structure consisting of double bonds and the presence of nitrogen and sulfur heteroatoms (Damej et al. 2021;Lgaz et al. 2020;Mahdavian and Ashhari 2010;Mirzakhanzadeh et al. 2018;Wang 2001). An overview of the use of 2-MBI for corrosion control by various researchers under different conditions is shown in Table 1. Based on this review, 2-MBI can be used to prevent the corrosion process in carbon steel samples, taking into account different affecting parameters on its performance through experimental and model analysis.
The importance of using experimental design methods to optimize the number of experiments is that more accurate results can be obtained about the final responses (CR and IE) and the interactions of the studied variables (parameters). Thus, the simultaneous evaluation of the influence of various parameters on CR and IE can be accelerated by design methods. One of the valid and practical methods in this regard is the response surface method (RSM) (Goh et al. 2008;Haladu et al. 2022;Kumari and Lavanya 2021). RSM is a set of statistical and mathematical methods that are very helpful for simulation and evaluating problems where the response variable is affected by multiple independent parameters, and its aim is to optimize the responses (Saikia and Mahto 2018). The most important advantage of RSM is the reduction in the number of tests needed to evaluate multiple variables and their relationships. RSM can be beneficial for obtaining models for predicting CR and IE for a specific inhibitor (Haris et al. 2021;Omran et al. 2022). The following is a review of the application of RSM and analysis of variance (ANOVA) in investigating the effectiveness of an inhibitor in preventing the corrosion process. Omran et al. (2022) used RSM for the optimization of corrosion inhibition by utilizing green inhibitors for mild steel samples in sulfuric acid (Omran et al. 2022). To this end, they completed corrosion inhibition efficiency by the electrochemical method and used experimental data to develop a model to predict corrosion inhibition performance using ANOVA. The authors determined that pH and reagent concentration are the main parameters for corrosion inhibition of the studied reagents, and the proposed model had very good accuracy. Yamin et al. (2020) investigated the IE of a new organic corrosion inhibitor containing oxygen, sulfur, and nitrogen heteroatoms in its structure for mild steel samples in 1 M HCl solution using RSM (Yamin et al. 2020). They used laboratory data from the weight loss method at By increasing acid concentration from 1 to 9 molar, the corrosion inhibition efficiency decreased from 82 to 67% at 30 ºC and inhibitor concentration of 10 −5 molar The corrosion rate increased continuously as the temperature increased from 21 to 71 ºC in the presence and absence of 2-MBI Mahdavian and Ashhari (2010) Mild steel HCl Nitrogen atoms in the structure of the inhibitor promote the protonation of the azole ring during the corrosion inhibition process 2-MBI is a mixed-type corrosion inhibitor and affects cathodic and anodic reactions Adsorption of the inhibitor on the surface of steel samples is confirmed by observing sulfur atoms through SEM-EDX analysis Morales-Gil et al. (2015) Carbon steel HCl 2-MBI is directly adsorbed on the surface of the samples 2-MBI prevents the cathodic reduction reaction associated with dissolved oxygen Inhibition efficiency is over 90% after 4 h of immersion at room temperature Calderón et al. (2017) Carbon steel EDTA solution 2-MBI is adsorbed on the metal surface spontaneously and endothermically Coefficient of determination obtained from the linear dependence of the reagent concentration and surface coverage by the Langmuir isotherm is equal to unity in the temperature range from 25 to 80 ºC Mirzakhanzadeh et al. (2018) Mild steel NaCl solution High efficiency of inhibition is associated with the creation of a layer on the surface of the studied samples Zhang et al. (2019) Mild steel HCl A concentration of 100 ppm is the optimal dosage of 2-MBI to prevent the corrosion process in room conditions effectively The adsorption isotherm of 2-MBI does not depend on the temperature and time of immersion Lgaz et al. (2020) Mild steel HCl 2-MBI obeys the Langmuir model 2-MBI is adsorbed both chemically and physically Adsorption energy ranges from − 20 to − 40 kJ/mol Damej et al. (2021) Carbon steel HCl 2-MBI molecules are close to the surface of the metal samples Donor-acceptor interactions occur between heteroatoms and multiple bonds of 2-MBI and vacant d-type orbitals of iron in the steel samples A free adsorption energy of − 36.34 kJ/mol is observed (a combination of physical and chemical adsorption) Inhibition property is increased by increasing immersion time Ji et al. (2021) Carbon steel HCl The adsorption of 2-MBI, and its reaction with iron on the surface of metal samples provide a high corrosion inhibition efficiency A synergistic effect is observed for the mixture of 2-MBI and oleic acid various reagent concentrations, test temperatures, and times to develop a new quadratic formula to predict the effectiveness of corrosion prevention. The completed analysis by the authors showed that the immersion time and temperature are two main parameters that significantly affect the inhibition efficiency of the corrosion inhibitor used. Chung et al. (2021) evaluated the changes in the corrosion current density for carbon steel samples using RSM and drawing contour plots in different media (Chung et al. 2021). To do this, they analyzed the corrosion current density at various pH values and chloride and sulfate concentrations by conducting electrochemical experiments. On the basis of experimental data, the authors obtained a mathematical model for determining the corrosion current density. They concluded that the model is successful in the studied ranges of the parameters, and chloride concentration is the main parameter influencing the corrosion process. Kumari and Lavanya (2021) optimized the corrosion inhibition performance of a Schiff base in an HCl solution for mild steel samples using electrochemical tests and RSM (Kumari and Lavanya 2021). They conducted tests at various concentrations of acids, temperatures, and concentrations of reagents. They measured the experimental data on CR and IE and derived a regression model of corrosion inhibition efficiency. The proposed model was significant for predicting the effectiveness of inhibition, and the obtained data by the models were close to the laboratory data. According to the above literature, temperature, inhibitor concentration, and exposure time of steel samples in an acidic environment are the main parameters that affect CR and IE. Thus, in this work, it is planned to experimentally evaluate the effect of these parameters on IE of 2-MBI in 1 molar hydrochloric acid solution for carbon steel samples by determining CR and IE values. The obtained experimental data are analyzed by RSM to develop mathematical models for the prediction of CR and IE in the presence of 2-MBI over a wide range of influencing parameters. Finally, the adsorption mechanism of the used inhibitor is evaluated as a function of temperature, test time, and reagent concentration.
The literature review shows that the effect of important parameters such as 2-MBI concentration, temperature, and time has not been studied simultaneously on inhibition effectiveness. In industry, important and effective factors in the corrosion process usually affect both the corrosion rate and the inhibition efficiency at the same time, which is discussed in this study. The novelty of this work lies in the development of a new model for predicting the effectiveness of 2-MBI corrosion inhibition as a function of time, inhibitor concentration, and temperature. This inhibitor has been extensively studied in the literature. However, the model for predicting its inhibitory effectiveness has not been carried over. The developed model had high accuracy for a wide temperature range. In addition, the effectiveness of the 2-MBI corrosion inhibitor was evaluated in high-temperature conditions of the oil reservoirs. The efficiency of this reagent at 160 °C was more than 80%.

Weight loss method for determination of corrosion rate and inhibition efficiency
In this work, carbon steel samples in the presence and absence of 2-MBI in 1 M HCl solution were used in each test. Experiments were carried out at various temperatures, concentrations of reagents, and exposure times by the weight loss method. In this technique, the reductions in mass of carbon steel specimens were measured in each test to determine the corrosion rate. For each case, two corrosion rates were determined: with and without the addition of the corrosion reagent (2-MBI) to the HCl solution. To do this, CR and IE have been determined using the following formulas: where CR is the corrosion rate, mm/y; m 0 is the initial mass of carbon steel samples before corrosion testing, mg; m 1 is the final mass of carbon steel samples after corrosion testing, mg; t is the test time, h; S is the surface area of the samples, mm 2 ; ρ is the density of the used samples, gr/cm 3 ; IE is the inhibition efficiency in the presence of 2-MBI, %; CR 1 is the corrosion rate in the absence of 2-MBI, mm/y; CR 2 is the corrosion rate in the presence of 2-MBI, mm/y.

Corrosion inhibitor
In this study, 2-mercaptobenzimidazole (2-MBI) was used to study corrosion rate and inhibition effectiveness in a 1 M HCl solution at various values of exposure time, inhibitor concentration, and solution temperature. The chemical structure of 2-MBI is presented in Fig. 1. As shown in the figure, Chemical structure of 2-MBI corrosion inhibitor used in this study the inhibitor has both S and N heteroatoms in its structure, which can provide high inhibition performance. Benzimidazole derivatives containing both nitrogen and sulfur atoms show better effectiveness compared to derivatives containing only nitrogen atoms. The application of 2-MBI inhibitor for corrosion control by various researchers was reviewed in the Introduction section.

Adsorption isotherm of 2-MBI on the surface of carbon steel samples
To determine the adsorption mechanism of 2-MBI on the surface of the studied samples, various models of adsorption isotherm were analyzed. The results presented that the Langmuir formula better describes this behavior for 2-MBI in 1 M HCl solution. The mathematical relationship in the Langmuir adsorption isotherm is depicted as follows: where C inh is the molar concentration of 2-MBI, M; θ is the surface coverage (IE/100); K ads is the adsorption constant, 1/M. By linear fitting of C inh /θ versus C inh , K ads can be determined. Knowing K ads , Gibbs free energy of adsorption, which is useful for determining inhibitor adsorption, can be calculated using the following equation: where ΔG°a ds is the Gibbs free energies of adsorption, J/ mol; R is 8.314 J/(mol.K); T is the absolute temperature, K. In this paper, Gibbs free energy of adsorption was calculated at different levels of temperature and immersion time to investigate the adsorption behavior of 2-MBI in 1 M HCl solution under different conditions.

Experimental design
Design-Expert ® (V13.0.5.0) program has been used in this study for laboratory planning and statistical evaluation of results. The objective of statistically evaluating experimental data has been to develop a high-accuracy analytical model to recognize and predict the effects of different variables on the response function as well as to pinpoint the optimal conditions (Iqbal et al. 2020;Kumari and Lavanya 2021; (3) Prabhu et al. 2022). In this study, the designing of experiments, modeling, and optimizing of the corrosion inhibition process were completed based on the RSM. The following vital parameters were examined: inhibitor concentration (A), temperature (B), and exposure time (C) at five experimental levels. A total of 53 experiments were created using the RSM. The independent parameters and their laboratory levels in this design are presented in Table 2. The performance of the inhibition process was assessed by calculating the corrosion rate (CR, mm/y) and inhibition efficiency (IE, %), which were determined from Eqs. (1) and (2).
The RSM experimental design and the results are shown in Table 3. At the end of the experiments, the obtained experimental results were fitted to quadratic polynomial design as indicated in the following equation: In this case, Y presents the predicted response function; X i stands for the independent input factors; β 0 , β i , β ii , and β ij are the regression coefficients, referring to the constant, linear, quadratic, and interaction effects, respectively.

Results and discussion
In this part of the study, firstly, the influence of inhibitor concentration (A), temperature (B), and exposure time (C) on CR and IE was investigated. Then, the optimum conditions for minimum CR and maximum IE have been determined using developed models obtained by RSM.

Analysis of variance
ANOVA is a helpful technique that evaluates the significance of models, individual experimental variables, and their interactions using P-values and F-values (Ahmadi et al. 2022;Antony 2014; Odejobi Oludare and Akinbulumo Olatunde 2019). In statistics, a model is described as highly significant if its a P-value is lower than 0.050 (significance level) and its F-value is substantial. Moreover, for model terms, a P-value less than 0.050 depicts that the corresponding terms are significant, while values greater than 0.100 denote that the terms are considered  Liu et al. 2013). Based on RSM, the obtained experimental results were fitted to a quadratic polynomial design, and two models for the prediction of CR and IE were developed (Eqs. 6 and 7). In addition, the ANOVA test, along with the fit statistics for the corrosion rate (CR) and inhibition efficiency (IE) models, are illustrated in Tables 4 and 5, respectively.
As illustrated in Table 4, for the corrosion rate (CR), the model F-value of 129.74 demonstrates that the proposed formula is significant because there is a 0.01% chance that an F-value this big may occur due to noise. For inhibition efficiency (IE), similar tendencies have also been detected. As presented in Table 5, a model F-value of 312.59 was noted. Meanwhile, for the model terms, a P-value lower than 0.050 represents that the corresponding terms are significant, while values larger than 0.100 refer to the non-significant terms. Accordingly, in the CR model, the significant model terms are A, B, C, AB, AC, A 2 , B 2 , A 2 B with the corresponding F-values of 561. 65, 9.97, 21.41, 41.84, 9.89, 277.56, 4.61, and 16.23. Additionally, it was observed that the most important model terms for the corrosion rate have been found in the following order: At the same time, as shown in Table 5, the significant model terms for the inhibition efficiency were A, B, C, AB, AC, A 2 , and AC 2 having  P-values lower than 0.050. Moreover, as can be seen, inhibitor concentration had the most significant effect on the inhibition efficiency compared to other parameters due to its largest F-value of 535.56.

Model fitting
In this work, the R 2 -statistics, consisting of R 2 (coefficient of determination), adjusted-R 2 , and predicted-R 2 have been applied to explain the model fit with the laboratory data (Goh et al. 2008;Yonguep and Chowdhury 2021). Meanwhile, models with an R 2 value of over 80% are usually considered significant (Karazhiyan et al. 2011). As presented in Tables 4 and 5, the values of R 2 were obtained to be 0.9593 and 0.9827 for the CR and IE models, respectively, which emphasizes that the developed models could explain 95.93 and 98.27% of the response variance.
Moreover, the adjusted-R 2 is found to boost R 2 by taking into account the sample size and model terms. Adjusted-R 2 values for the CR and IE models were 0.9519 and 0.9796, respectively. Having looked at the R 2 and adjusted-R 2 values (for both models), it is evident that they are quite high and close together, indicating that the developed quadratic models for corrosion rate and inhibition efficiency provide sufficient information to adequately explain the experimental data within the chosen operational conditions. In addition, the predicted-R 2 values of the CR and IE models were 0.9404 and 0.9721, respectively. Accordingly, as can be observed, the predicted-R 2 value for each model was in reasonably good agreement with the corresponding adjusted-R 2 value, as their difference was less than 0.20 (Antony 2014). Besides, adequate precision (Adeq Precision) as a helpful measure has been applied to evaluate the signal-to-noise ratio. A ratio of at least four can be regarded as acceptable (Biniaz et al. 2016). The Adeq precision of 46.7067 and 60.9809 for the CR and IE models indicate adequate signal, as these values have been sufficiently larger four. Consequently, these models could be effectively used to navigate the design space. Based on these findings, it can be stated that the developed models have been in excellent agreement with the experimental data and can be utilized to forecast corrosion rate and inhibition efficiency in the industry.

Model validation using diagnostic plots
One of the basic techniques for assessing the adequacy and validity of a developed model is the use of diagnostics plots. They are used to assess if the selected design can accurately approximate the results to match the actual experimental data (Abdulredha et al. 2020). The diagnostics plots (normal plot of residuals, studentized residuals against the run number, and the predicted versus actual plot) are shown in Figs. 2, 3, 4.   Figure 2A and B demonstrate the normal plot of residuals for corrosion rate (CR model) and inhibition efficiency (IE model), respectively. These graphs are applied to verify the normality of the assumptions. In other words, they determine if the difference between the actual and predicted results is distributed normally (Kumari and Lavanya 2021). As depicted in Fig. 2, both CR and IE models have been found to demonstrate a normal distribution, as the points generally followed a diagonally straight line for both models. Moreover, none of the plot's regression lines have outliers, indicating that the models fit well with the data. Figure 3A and B depict the residuals plotted against the order of the experimental runs for the CR and IE models, respectively. This check is conducted to observe if any lurking variables may have affected the response during the experiments. It should be taken into account that a randomized scattering of data no distinct trends or patterns within the confidence interval should be observed (Mohammed et al. 2017). As demonstrated in Fig. 3A, the residual points for the CR model have been randomly distributed within the confidence interval. Moreover, a comparable distribution was also observed for the IE model within its associated confidence interval. No data point has exceeded the limit range, demonstrating no outliers in the residuals for both models. Additionally, as can be seen, the residuals in both graphs appear to have no specific patterns in their distributions. Figure 4A and B illustrates the plots of the predicted against the actual data for corrosion rate and inhibition efficiency, respectively. This figure could be considered the most important among diagnostics plots since it compares the predicted data obtained by the model and the actual data from the experiment. A model could effectively predict experimental results when the points of the predicted and actual graphs are close to each other and have a random distribution around a diagonal line (Biniaz et al. 2016). As illustrated in the plots, the points are randomly distributed, and there is a good agreement between the predicted values by the models and the corresponding actual values.
The observations from diagnostics plots (Figs. 2, 3, 4) confirm the adequacy and reliability of the established response models for predicting CR and IE when using the studied inhibitor.

Influence of inhibitor concentration
The inhibitor concentration is one of the main parameters influencing corrosion inhibition efficiency (IE). For the field application of corrosion inhibitors, they should be utilized at an optimum value to have the lowest cost and maximum effectiveness. The results of the influence of 2-MBI concentration on the CR and IE of carbon steel samples in 1 M HCl solution are presented in Fig. 5. As shown in this figure, as the dosage of 2-MBI in the working solution increased, the corrosion rate steadily decreased. This reduction in CR continued until the inhibitor concentration reached about 150-160 ppm. At higher concentrations, there was no further decrease in the corrosion rate. As shown in the figure, as the inhibitor concentration increases from 10 to about 150 ppm, Fig. 4 The predicted versus the actual data for the CR A and IE B models the corrosion rate decreases from 14.7 to about 1.5 mm/y. This reduction in corrosion rate is considerable. In addition, IE increased with the inhibitor concentration in the acidic medium. In this case, the highest IE value for corrosion protection of carbon steel specimens was observed at a concentration of about 140-150 ppm. At this concentration, the percentage of inhibition was about 90%. The higher inhibition efficiency and lower corrosion rate at higher inhibitor concentrations can be associated with the formation of a stronger layer on the surface of the samples at the adsorption stage.

Influence of temperature
The temperature is an essential factor that affects the electrochemical reactions of the corrosion process. At higher temperatures, the activation energy of the reaction may be reduced, and, consequently, the corrosion process may be accelerated. Thus, the corrosion rate and corrosion inhibition performance can be influenced by changing the temperature of the solution. In this work, using the developed models (Eqs. 6 and 7), we analyzed the effect of temperature on CR and IE of 2-MBI for carbon steel samples in 1 M HCl solution. To do this, the temperature was raised from 30 to 70 °C at a constant inhibitor concentration of 110 ppm (meanlevel) and an exposure time of 55 h. It should be noted that this section analyzes the effect of only one parameter on CR and IE, while the other parameters remain constant. The obtained results are presented in Fig. 6. As shown in Fig. 6A, with an increase in temperature, the corrosion rate increased due to decreased activation energy. In the studied temperature range, the corrosion rate varied approximately from 0.5 to 2.7 mm/y. Although the corrosion rate was increased by temperature, these changes were insignificant. It is related to the presence of 2-MBI in the solution at a suitable concentration. In addition, Fig. 6B shows the changes in the effectiveness of 2-MBI at various temperatures. This figure depicts that the inhibition efficiency was reduced due to an increase in the solution temperature. This is also related to the acceleration of the corrosion process. In this case, the IE decreased from 92 to about 82.5% as the temperature increased from 30 to 70 °C. Figure 7 depicts the significance of the effect of inhibitor concentration on CR and IE for corrosion control of carbon steel samples. This figure presents the variation of CR (Fig. 7A) and IE (Fig. 7B) at concentrations of 10 ppm (low-level) and 210 ppm (high-level) of 2-MBI after 55 h of immersion of the samples at various temperatures. The results confirmed that at both concentrations (low and high values) of 2-MBI, the temperature had a negative effect on corrosion control (increase in CR and decrease in IE). However, this effect is stronger at low inhibitor concentrations. As shown in Fig. 7, the slope of the change in CR and IE at 210 ppm is much less than at 10 ppm. These results confirm that determining the effective concentration of a corrosion inhibitor has two advantages: (I) high inhibition efficiency and very low corrosion rate; (II) weaker effect of temperature on CR and IE.

Influence of exposure time
The last factor in the analysis of CR and IE of 2-MBI on carbon steel specimens was exposure time. According to Eq. 1, by increasing the time, the corrosion rate can be reduced if other parameters, such as mass loss, remain constant. The mass loss cannot remain constant as time increases; a longer contact of the steel sample with the corrosive environment provides more interaction for the corrosion process. Thus, with an increase in exposure time, the mass loss of the studied samples increases due to the corrosion process. Therefore, if the decrease in mass is greater than the time, the corrosion rate will increase (according to Eq. 1). In this part, the influence of test time on CR and IE of 2-MBI on carbon steel samples was studied using the developed models at a constant temperature of 50 °C and a reagent concentration of 110 ppm. The exposure time range was from 5 to 105 h. The results are presented in Fig. 8. As shown in the figure, with increasing time, the corrosion rate of the studied steel samples increased. Nevertheless, these changes were not significant. In this case, the corrosion rate increased from about 1.4 to 3.4 mm/y, with an increase in time of 100 h. Thus, the results show that the reduction in weight loss was greater than the change in exposure time. Moreover, by increasing the test time, the effectiveness of corrosion inhibition was increased. In the studied exposure time range, the inhibition efficiency increased from approximately 82.5 to 89%. This  Figure 9 represents the influence of parameter interactions on CR and IE in the contour graphs. In these plots, CR and IE are a function of two interaction parameters, while another variable is kept constant at its mean-level. As can be seen from the ANOVA results (Tables 4 and 5), the interaction between concentration and temperature (AB and A 2 B terms) as well as the interaction between concentration and exposure time (AC and AC 2 terms) have the greatest effect on CR and IE. Figure 9A1 and A2 show the effect of concentrationtemperature interaction on the CR and IE, respectively. As depicted in Fig. 9A, the temperature at its high level (70 °C) and the concentration at its low level (10 ppm) had a very weak effect on CR and IE. In this case, CR and maximum IE were observed to be 18 mm/y and less than 30%, respectively. In addition, the graph indicates that the simultaneous decrease in the temperature and increase in the 2-MBI concentration had a positive effect on the corrosion inhibition process. This has reduced the corrosion rate and increased the efficiency to the desired values. The greatest interaction effect between parameters was observed near the high concentration levels (140-150 ppm) at temperatures below 40 °C. In this case, the CR reached less than 0.75 mm/y and the IE was improved to more than 94%. Figure 9B1 and B2 depict the effect of concentration-time interaction on the CR and IE, respectively. As shown in Fig. 9B1, the increase in exposure time at all ranges of 2-MBI concentration had a negative effect on the corrosion control and increased the CR. It is well known that mass loss cannot remain constant as time increases. A longer contact of the steel sample with the corrosive environment provides more interaction for the corrosion process. As can be seen from Fig. 9B1, this effect was strong at lowto-mean levels of inhibitor concentration (< 80 ppm) and not significant at its mean-to-high levels (> 110 ppm). The maximum interaction effect of parameters was observed at about 130-150 ppm of inhibitor concentration. In this case, the corrosion rate was increased by less than 0.8 mm/y from about 0.75-1.5 mm/y by increasing time from 10 to 80 h (by 70 h). These results confirm the importance of optimal concentration of 2-MBI inhibitor. In addition, Fig. 9B2 demonstrates that the maximum interaction effect between parameters on the IE was observed near the high levels of concentration (140-150 ppm) and exposure time (85-105 h). In this case, the IE was improved to a value of more than 94%.

Optimization of the corrosion inhibition process
In this study, the primary objective was to obtain the optimum conditions of parameters in order to achieve maximum corrosion prevention of carbon steel in the investigated environment. For this purpose, optimization of the process was completed using the Design-Expert-Software based on the established CR and IE models. The main goals (optimization criteria) of the current work were to "minimize" CR and  Fig. 9 The influence of parameter interactions on CR and IE "maximize" IE simultaneously. The parameters and goals of the optimization process are presented in Table 6.
Based on the numerical optimization, a number of solutions were obtained, which can be regarded as optimal conditions of parameters. These solutions are presented in Table 7. It should be noted that the optimal values of variables in each solution were chosen based on the Desirability. According to this concept, Desirability is an objective function ranging from zero (the least desirable) to one at the goal (the most desirable). According to the results, there was a 100% Desirability for all solutions, which indicates that it is possible to obtain desirable results of CR and IE under optimal conditions for each solution. However, solution 7 could provide the minimum CR (< 0.75) and maximum IE (> 92.08%) by the lowest consumption of the 2-MBI inhibitor (115 ppm). Therefore, solution 7 was selected as the optimal condition of parameters for this study. As depicted in Table 7, the optimal values (based on solution 7 were obtained to be 115 ppm, 30.67 °C, and 60.42 h for the inhibitor concentration, temperature, and exposure time, respectively. Furthermore, Fig. 10 indicates the 3D-surface plot of numerical optimization for inhibition efficiency. According to this 3D plot, the minimum CR and maximum IE of the studied inhibitor in 1 M HCl medium under optimal conditions were determined to be 0.53 mm/y and 92.76% (marked with a flag).

Application of 2-MBI for high-temperature conditions
Additional experiments were performed at higher temperatures (70-100 °C) to determine the 2-MBI inhibition performance. These results are shown in Table 8. As shown in this table, the predicted and experimental values are close to each other, and the maximum error between them is 2.08%. Therefore, the developed model can be used for higher temperatures. On this basis, the developed model was used to determine the corrosion inhibition efficiency of 2-MBI under high-temperature conditions (140-160 °C). The results are shown in Table 9. As shown here, the inhibition efficiency was over 80% at higher temperatures. From these results, it can be concluded that 2-MBI can be used for acidizing oil reservoirs under high-temperature conditions. Furthermore, applying the mixture of 2-MBI and green inhibitors under high-pressure conditions by core-flood tests is a topic of our future work.

Study of 2-MBI adsorption behavior on the metal samples by the Langmuir isotherm and its environmental impact
Figures 11 and 12 demonstrate the changes in the ratio of 2-MBI concentration to surface coverage as a function of its concentration (C inh /θ Vs. C inh ) depending on the temperature and exposure time. These figures show the adsorption behavior of the studied corrosion inhibitor on the surface of carbon steel samples under various conditions. Figure 11 presents these changes for a constant exposure time of 30 h at temperatures of 30, 40, 50, 60, and 70 °C. In addition, Fig. 12  . As shown in the figures, the coefficient of determination (R 2 ) at all temperatures and times was greater than 0.98, indicating a linear relationship between the y-axis (C inh /θ) and the x-axis (C inh ) data. In all cases, the slope of the fitted line  Table 10 shows the adsorption parameters of 2-MBI on the carbon steel surface over a wide range of temperatures and exposure times. These parameters were calculated based on the data obtained from the linear fit in Figs. 11 and 12. As presented in Table 10, the Gibbs free energy of adsorption ranged from 33.46 to 37.09 kJ/mol under all studied conditions. Thus, both physisorption and chemisorption occurred for 2-MBI at various temperatures and times. As seen in this table, by increasing temperature and exposure time, the Gibbs free energy of adsorption was increased. In this case, the effect of temperature on this energy was stronger than the time effect. This phenomenon indicates that chemical adsorption outperforms physical adsorption at higher temperatures.
2-MBI is widely used in industry due to its low cost, high efficiency, and low effective concentration. There have been no reports of severe adverse effects of 2-MBI on the environment or humans. However, prolonged exposure to this reagent can alter the thyroid gland (Saitoh et al. 1999). To reduce this effect, we are currently working on a mixture of 2-MBI and green corrosion inhibitors (various plant extracts). Thus, a synergistic effect will be found between 2-MBI and the green inhibitor. This will maintain high corrosion inhibition performance and prevent negative environmental impact.

Conclusions
In this study, 2-mercaptobenzimidazole (2-MBI) was used to study corrosion rate (CR) and inhibition efficiency (IE) in a 1 M HCl solution at various values of exposure time, inhibitor concentration, and solution temperature. The main results of the work are as follows: A) Based on response surface methodology (RSM) through analysis of variance (ANOVA), two significant RSMbased models were developed to predict CR and IE. Besides, the R 2 -statistics, adequate precision as well as diagnostics plots were used as main measures to verify the accuracy and adequacy of both CR and IE models. B) It was observed that inhibitor concentration had the most significant effect on CR as well as IE compared to other parameters due to its largest F-value (561.65 for CR model and 535.56 for IE model) C) The temperature at its high level (70 °C) and the concentration at its low level (10 ppm) had the least effect on CR and IE. In this case, CR and maximum IE were observed to be 18 mm/y and less than 30%, respectively. D) The addition of 140-150 ppm of 2-MBI at low-level temperatures of 30-35 °C had the most interaction effect on the performance of the corrosion inhibition process. In this case, the CR was less than 0.9 mm/y and the IE more than 94%, even after a high exposure time of 105 h. E) Numerical optimization of the corrosion inhibition process for 2-MBI showed that the optimum conditions for maximum IE (92.76%) and minimum CR (0.53 mm/y) were achieved at a concentration of 115 ppm, temperature of 30.7 °C, and exposure time of 60.4 h. F) Among various models of adsorption isotherm, the Langmuir formula was found to better describe this behavior for 2-MBI in 1 M HCl solution. In addition, chemical and physical adsorptions of 2-MBI have been observed based on the obtained values of the Gibbs adsorption free energy ranging from − 33 to − 37 kJ/mol.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.