Optimization of the inhibition corrosion of carbon steel in an acidic medium by a novel eco-friendly inhibitor Asphodelus ramosus using response surface methodology

Ethyl acetate extract of Asphodelus ramosus (ARAE) was examined as an anti-corrosion agent for carbon steel (CS) in 1 M HCl acid medium using different techniques, namely weight loss method, potentiodynamic polarization, and electrochemical impedance spectroscopy (EIS) at various temperatures and inhibitor concentrations. An inhibition efficiency of 89.81 % was obtained by the weight loss method at the inhibitor concentration of 700 ppm at 293 K. Increasing the temperature decreases the corrosion inhibition rate. Poten-tiodynamic polarization results showed that the extract is adsorbed on CS surface according to the Freundlich isotherm, while negative values of the standard free energy of adsorption (  G 0ads ) suggested the physical spontaneity of the adsorption reaction. Scanning electron microscopy (SEM) and energy dispersive spectrometry (EDS) analyses were performed to examine the surface morphology of inhibited and uninhibited CS samples. Central composite design (CCD) based optimization was engaged to analyze factors and maximize inhibition efficiency by applying response surface methodology (RSM) using Design-Expert software.


Introduction
Corrosion is a natural electrochemical process that transforms metal into a more stable chemical form, such as metal oxides, sulfides, and chlorides [1].Steel and its important alloys are widely used as important construction materials in the chemical, petrochemical, thermal and nuclear industries.In all these industrial facilities, hydrochloric acid has usually been used for descaling carbon steel (CS), which promotes the acceleration of metallic corrosion.This has a negative impact on the ecological balance and the economic field, particularly in terms of repair, replacement, and product losses [2,3].Due to all these difficulties, researchers have developed plans to mitigate corrosion and increase the life of infrastructure, machinery, metal devices, etc.The degradation of different metals can be reduced largely by using various methods of corrosion protection, such as material improvement, alloying, use of different types of coatings, environmental modification and application of corrosion inhibitors [4].
Among corrosion inhibitors, synthetic compounds show good anti-corrosion effects, but most are highly toxic and harmful to health and the environment.This serious limitation turned research studies toward inhibitors obtained from several plant parts, including stems, seeds, fruits, stem bark, and bagasse [5].As it is universally known, plants make a huge source of natural compounds, which have complex molecular structures with different chemical, biological and physical properties.These compounds are mainly used as they are eco-friendly, low-cost, effective, and abundant.Due to these advantages, plant extracts are widely used in many applications, such as corrosion inhibition of metals and alloys [6].These compounds contain heteroatoms such as N, S, and O and π electrons in their structure, which makes them good corrosion inhibitors in the acidic media by forming a protective layer on the surface of the metal [4,[7][8][9][10].In general, the inhibitory action of these compounds has been improved according to the following order: O < N < S < P [11].
Much of scientists' attention has recently been directed toward the use and development of various sustainable inhibitors.Numerous studies have looked into the efficacy of green plant-derived corrosion inhibitors in attempting to prevent metal corrosion in acidic environments.Among them is Ficus tikoua leaf extract, which has a 95.8 % effectiveness for carbon steel [12], Azadirachta indica leaf extract, with an efficiency of 86.4 % [13], kiwi juice, with an efficiency of 96.1 % [14], Phyllanthus amarus leaf extract with an efficiency of 95 % at 303 K [15], peach juice with an efficiency of 91 % [16], Laurus nobilis leaf extract with an efficiency of 92 % [17], Juniperus plants [18], Origanum majorana extracts [19], and Phyllanthus fraternus extracts [20].In addition, Xanthium strumarium extract showed an efficiency of 94.8 % for carbon steel in 1 M HCl at 10 g/L [21], while Glycyrrhiza glabra leaves extract showed an efficiency of 88 % for mild steel in 1 M HCl at 800 ppm [22].
Response surface methodology (RSM) has already been applied by various researchers to study and statistically analyze corrosion inhibition for metals in acidic environments.This strategy can be used to optimize experimental results achieved by weight loss measurements and is, therefore, essential to any research in this area.RSM offers the possibility to significantly reduce the number of experiments required to fully evaluate the performance of inhibitors, thus minimizing the cost and duration of the experiment [23][24][25][26][27][28][29][30].
In this work, a novel eco-friendly inhibitor extracted from the Asphodelus ramosus plant has been investigated.The main interests of the survey of this plant stem from the fact that, on the one hand, this plant has never been studied as a corrosion inhibitor.On the other hand, phytochemical analysis carried out on Asphodelus ramosus showed richness in flavonoids and acid phenol [31,32], while in the study conducted by Chimona et al. [33], even thirty-eight secondary metabolites were detected in tepals of ephemeral flowers of Asphodelus ramosus.Therefore, the present study could also serve for further assessment of the properties of this useful plant.
Research in the corrosion area has been developed considerably in the last few years and is increasingly oriented towards the development of non-toxic, non-polluting, and stable organic molecules.Also, plant extracts are commonly obtained by simple extraction processes and have good inhibiting properties.In this work, weight loss measurements, electrochemical impedance spectroscopy, and potentiodynamic polarization are employed to explore the inhibitory influence of Asphodelus ramosus ethyl acetate extract (ARAE) in 1 M hydrochloric acid medium of carbon steel.The RSM is used for modeling, analysis, experiment design, and processing parameters optimization.

Materials
In the corrosion inhibition study, carbon steel (16MnCr5) with a chemical composition (0.19 wt.% C, 0.4 wt.% Si, 1.3 wt.% Mn, 0.035 wt.% S, 0.035 wt.% P, 0.8-1.1 wt.% Cr and the rest Fe) was used.Specimens of 1×1×1 cm 3 in size were prepared for weight loss measurements.For electrochemical measurements, specimens were incorporated in an epoxy resin, leaving an exhibition area of 1 cm 2 .The surface of specimens was pre-treated by mechanical grinding with 500, 800, 1000, 1200, and 2000 grit abrasive paper.Then, specimens were washed with acetone, degreeased with distilled water, and dried at room temperature before being used in experiments.

Plant extracts
In this study, we used plant tissue from the flowers and leaves of the plant Asphodelus ramosus to produce three types, i.e., dichloromethane, ethyl acetate, and n-butanol extracts.The plant was cut into small pieces and then extracted by maceration in a hot methanol-water mixture (7/3: V/V) for 24 hours.This operation was repeated three times.The various fractions recovered are then combined and evaporated under reduced pressure at a temperature lower than 70 °C until a syrup residue is obtained.To remove chlorophyll, boiling water was added to the residue and stored at room temperature for one night.The filtered mixture was submitted to liquid-liquid extraction using several solvents separately in a sequence of increasing polarity, starting from dichloromethane, ethyl acetate, and n-butanol, where the organic phase is recovered for each solvent.The last solutions were evaporated to dryness using a rotary evaporator to obtain the desired extracts (paste form).
Experiments performed with all three prepared extracts showed that the ethyl acetate extract has significantly higher inhibitory power than the two other extracts.Therefore, the ethyl acetate extract was chosen for presentation in this work.

Electrolyte and inhibitor solutions
The aggressive solution used was 1 M hydrochloric acid prepared by dilution of 37 wt.%HCl (Merck) with distilled water.
To prepare 250 ml of a 700 ppm aqueous solution of the ARAE extract, the weight of the solute (ARAE) is determined from the relationship: C=(mARAE/msolution)×10 6 .For an aqueous solution, and mARAE = (Cmsolution)/10 6 = 0.175 g.Therefore, to prepare 250 mL of the aqueous solution of the ARAE extract of concentration 700 ppm, it is necessary to dissolve 0.175 g of ARAE in methanol (a small drop added with a Pasteur pipette to dissolve the extract).A little distilled water is added, followed by the addition of 20.72 ml of concentrated HCl (37 wt.%) (to have 1 M HCl), and then the solution is completed to 250 ml with distilled water.The same protocol was followed for all other extract concentrations.

Weight loss measurements
The determination of weight loss is the common method to calculate corrosion rates.The specimens were immersed for 3 h in 1.0 M HCl without and with the presence of different concentrations of Asphodelus ramosus ethyl acetate extract (ARAE) at different temperatures ranging from 293 to 323 K. To remove any oil and organic impurity, the coupons were degreased with acetone and finally washed with distilled water and dried in air.The accurate weight of each coupon was taken using an electronic weighing balance and the initial weight was recorded.The coupons were labeled in a manner to avoid any mix-up.The following equations were used to estimate the corrosion inhibition performance of the used inhibitor.
where W is the average weight loss (mg), S is the total area of carbon steel specimen (cm²), t is immersion time (h), and CR is the corrosion rate in mg cm -2 h -1 .The inhibitory efficiency (IEw), as well as the surface coverage , were determined using the following equations: where CR0 and CRi represent the corrosion rate in the absence and presence of inhibitors, respectively.

Electrochemical measurements
Electrochemical measurements were realized using a Voltalab-PGZ 301 potentiostat controlled by a computer using Voltamaster 4 software.The electrochemical cell used was a three-electrode Pyrex glass cell with CS coupon as the working electrode (WE), saturated calomel electrode (SCE) as the reference electrode (RE), and Pt-plate as the counter electrode (CE).Each potential was estimated relative to the submerged SCE.Before each measurement, a steady state of the system was obtained by immersing a freshly polished CS electrode in the test solution at the open circuit potential (Eocp) for 30 minutes.The potentiodynamic polarization curves studied in the absence and presence of different inhibitor concentrations were obtained from the cathodic potential of -250 mV to the anodic potential of + 50 mV relative to Eocp [34].The inhibition efficiency (IEp) values were derived from corrosion current density (jcorr) using the following equation: where, jcorr 0 and jcorr ARAE represent corrosion current density in the absence and presence of the inhibitor, respectively.
Electrochemical impedance spectroscopy (EIS) measurements were carried out at the Eocp in the frequency range of 100 kHz to 10 mHz with a perturbation using 10 mV amplitude signal.The inhibition efficiency (IEEIS) was calculated using the following formula: where Rp and Rp ARAE are polarization resistance in the absence and presence of the inhibitor, respectively.

Scanning electron microscopy and energy dispersive spectroscopy (SEM/EDS)
The influence of corrosion attack on the surface morphology of carbon steel after immersion in the corrosive solution (1 M HCl) with and without the addition of 700 ppm of ARAE at 293 K for 3 h was observed using SEM/EDS TESCAN VEGA 3 scanning electron microscope and BRUKER energy dispersive spectroscopy devices, by which surface morphology and chemical composition can be evaluated.

Weight loss measurement using response surface methodology (RSM)
The response surface method of the Design-Expert software was used to design experiments for the weight loss method.Process variables such as inhibitor concentration and temperature were considered, while inhibition efficiency was the expected response of the study.Several models in terms of coded factors have been proposed to provide predictions of the response for given levels of each factor.The 3-level (-1, 0, +1), two factors central composite design (CCD) was implemented in this study.This reduced the number of experiments to 13, including 8 factorial points and 5 central points.

Weight loss measurements
Table 1 displays the results of carbon steel corrosion rate (CR) and inhibition efficiency (IE) in 1 M HCl medium in the absence and presence of various concentrations of ARAE after 3 hours of immersion in the temperature range of 293-323 K.According to data collected in Table 1 and shown in Figure 1, it can be seen that corrosion rate decreases, while the inhibitory efficiency EI increases with rising of the extract concentration.As the temperature increases, however, the inhibitory effectiveness falls down because the rising temperature tends to spread the extract from the surface of the carbon steel, decreasing the inhibitory efficiency.The optimal inhibition efficiency of 89.81 % was registered at the temperature of 293 K and 700 mg/L of inhibitor.This phenomenon is attributed to the coverage of the metal surface by the accumulation of a great number of molecules leading to the formation of an adsorbed film of extract (ARAE) which isolates the surface from the corrosive solution [35].(a) (b)

Adsorption isotherm
Essentially, the use of adsorption isotherms can provide basic information about the interaction between the inhibitor and the surface of carbon steel.Furthermore, in-depth knowledge of the adsorption character of inhibitors is vital for a proper understanding of the kinetics process.The adsorption of the inhibitor is attributed to the presence of heterocyclic compounds in the extract, which obstruct corrosion by forming a protective film layer that functions as a barrier, preventing the ingress of the corrodent onto the metal surface.In this study, Langmuir, Temkin, and Freundlich isotherms were assessed.General forms of equations describing three adsorption isotherm models that are based on different assumptions were explored.To find the appropriate adsorption isotherm, the results of weight measurements were fitted to the aforementioned isotherms, and the correlation coefficient (R²) was used to choose the isotherm that best fits the experimental data.After the experimental study, the analysis of the results showed that the adsorption of ARAE on the surface of carbon steel obeys the Freundlich adsorption isotherm model with a large R 2 value of 0.9952.The linearized form of Freundlich adsorption isotherm can be represented by the following equation: where Cinh is the inhibitor concentration,  is the fraction of the surface covered with inhibitor and Kads is the adsorption equilibrium constant.Kads of the inhibitor is determined by the intercept of the straight line obtained as the Freundlich adsorption isotherm for the acetate extract (Figure 2), which is used to evaluate the adsorption capacity of the inhibitor .

Thermodynamic parameters
The value of the equilibrium constant of the adsorption process is related to the standard free energy change of adsorption (G 0 ads) by the following relation: where R is gas constant, T is absolute temperature, and CH 2 O is the concentration of water expressed in mg L -1 with an approximate value of 10 6 .The thermodynamic parameters are collected in Table 2.
The negative values of G 0 ads indicate that the adsorption of the corrosion inhibitor on the metal surface is spontaneous.Through these values, this adsorption can be defined as physical or chemical.G 0 ads values close to or less negative than -20 kJ mol -1 correspond to electrostatic interactions between charged molecules and the metal (physical adsorption).Those close to or more negative than -40 kJ mol -1 indicate a charge transfer between organic molecules and the metal surface (chemisorption) [36][37][38].G 0 ads values listed in Table 2 are between -20 and -40 kJ mol -1 , which suggests a mixed type of physical and chemical adsorption.The mode of adsorption (physisorption and chemisorption) observed could be attributed to the fact that ARAE extract contains many different chemical compounds, some of which can adsorb chemically and others physically [1,2].The values of the standard adsorption enthalpy (H 0 ads) were obtained from Van't Hoff equation: 0 0 ads ads 6 1 ln ln 10 The straight lines of ln Kads as a function of 1/T of ARAE at different temperatures are shown in Figure 3.This plot gave straight lines with a correlation coefficient close to unity.The slope is equal to -H 0 ads/RT, while the intersection of each straight line is equal to the constant ln(1/10 6 ) + S 0 ads/R, which allows the determination of S 0 ads.The estimated values of these parameters are given in Table 2.

Figure 3. ln Kads versus 1/ T for adsorption of ARAE on carbon steel in 1.0 M HCl
The negative value of H 0 ads indicates the exothermic nature of the adsorption process of inhibitor molecules [3].An exothermic adsorption process can be chemical, physical, or a mixture of both [37], whereas the endothermic process is attributed to chemisorption [38].This process means the efficiency decreases as the temperature increases [3].The positive sign of the adsorption entropy of ARAE can be explained by the adsorption of inhibitor on the carbon steel surface, which is produced via a quasi-substitution process between the inhibitor molecules in the aqueous phase [Orgsol] and water molecules [H2Oads] on the electrode surface.

Activation parameters of the corrosion process
With increasing temperature, most chemical and electrochemical reactions become faster.In general, the temperature has a great influence on the corrosion phenomenon, especially the corrosion rate, which leads to some changes in the action of inhibitors.The relationship between the corrosion rate and temperature is often expressed by the Arrhenius equation, which allows calculating of the activation energy Ea: where CR is corrosion rate, Ea is the apparent activation energy, and A is Arrhenius pre-exponential factor.
Figure 4 shows the Arrhenius curves of ln CR versus 1/T for corrosion of carbon steel in 1 M HCl without and with different concentrations of ARAE.

Figure 4. Arrhenius plots of ln(CR) vs. 1/T for carbon steel corrosion in 1 M HCl with and without ARAE inhibitor
The thermodynamic parameters of activation, such as enthalpy of activation (Ha) and entropy of activation (Sa) were calculated using the transition equation: where N is Avogadro's number (6.022×10 23 mol −1 ) and h is Planck's constant (6.626×10 -34 J s).
Figure 5 shows plots of ln (CR/T) against 1/T.The straight lines were obtained with a slope of (Ha/R) and intercept of (ln(R/Nh)+(Sa/R)) from which the values of Ha and Sa were calculated.
The values of the activation energy, the activation enthalpy, and the activation entropy in the absence and presence of the inhibitor (ARAE) are represented in Table 3.Many studies showed a decrease in activation energy Ea in the presence of an inhibitor compared to the uninhibited solution, which could be interpreted as chemical adsorption (chemisorption) [39].Other studies reported an increase in activation energy, Ea, which indicates physical adsorption.In our case, it is clear that Ea is higher in the presence of the inhibitor than in its absence and increases with increasing inhibitor concentration [40].

Figure 5. Alternative Arrhenius diagrams of ln (CR/T) versus 1/T for carbon steel corrosion in 1 M HCl with and without ARAE inhibitor
This increase of Ea reflects the adsorption of ARAE extract molecules onto the CS substrate by electrostatic bonds (physisorption).As temperature rises, this kind of temperature-sensitive liaison (weak bonds) cannot effectively control corrosion.The positive sign of Ha denotes that the adsorption of the extract on the surface of CS is an endothermic process and that the dissolution of steel is difficult [36].The Sa values in the presence of ARAE are positive and high compared to the blank solution, reflecting an increase in the disorder that occurs during the formation of the complex metal/adsorbed species [41].

SEM and EDS results
To assess the elemental composition of the surface before and after exposure to the corrosive media with and without ARAE inhibitor, the surface morphology of carbon steel before and after immersion in corrosive solution was investigated by SEM analysis together with EDS.SEM-EDS micrographs presented in Figure 6 were recorded for (a) polished carbon steel, (b) after 3 h of immersion in 1.0 M HCl, and (c) after 3 h of immersion in 1.0 M HCl in the presence of 700 ppm ARAE.
Figure 6a shows the image of the abraded surface with some lines resulting from polishing.It can be seen that the carbon steel surface, after 3 hours of immersion in 1 M HCl (Figure 6b), is heavily damaged and severely corroded.After immersion in the corrosive solution with 700 ppm of ARAE (Figure 6c), the damages are reduced, and the external morphology appears softer.The metal surface has been remarkably improved due to the formation of the adsorbed protective layer, which prevents the aggressive attack of the electrolyte.
Table 4 presents mass percentages of various elements obtained by the energy dispersive spectroscopy (EDS) of the carbon steel surface in 1 M HCl before and after immersion in the inhibited and uninhibited solution for 3 hours.Figure 6a (right) indicates a greater percentage of iron compared to the steel submerged in the inhibited and uninhibited solutions, while Figure 6c shows an increase in the peak of oxygen, carbon, and nitrogen when compared to Figure 6b, which displays the EDS spectra of the corroded steel in 1 M HCl alone.This demonstrates that the tested inhibitory molecules adhere to the metal surface.In Nyquist plots, impedance spectra display slightly flattened semi-circles, with diameters increasing with the extract concentration rise.The same is seen from impedance magnitude, log |Z|, values of Bode plots that are at all frequencies higher for higher ARAE concentration.The rise of impedance could happen due to the adsorption of ARAE, which forms a resistant inhibiting film on the metal surface [23].Depending on the concentration, the adsorbed ARAE film has delayed the steel dissolution rate.

Table 4. Content of elements for each specimen obtained from EDS analysis of carbon steel prior and after 3 h of immersion in corrosive solutions
The formation of a protective layer on the electrode surface may cause decreased capacity (i.e.thickness growth of the electrical double layer) with a rise in plant extract concentration [42].The electronegative charge of heteroatoms present in the extract and the electropositive charge on the steel surface can both be used to explain this phenomenon [37].In Bode plots of Figure 7b, decreased capacitance values are clearly seen by increased impedances of about -1 sloped lines appearing at f between 1000 and 10 Hz, which denote dominant capacitive impedance response at these frequencies.On the other side, increased impedances of zero-slope lines dominant in Bode plots at frequencyes (10 Hz) indicate an increase in the resistive contribution with increased concentration of ARAE.In Nyquist plots presented in Figure 7a, this increase of resistive contributions at the lowest frequencies is seen as increased diameters of semi-circles, which can be observed for the increase of ARAE concentration.
The EIS graphs must be fitted with equivalent electrical circuits to thoroughly investigate the corrosion inhibition process.It is obvious from the impedance spectra in Figure 7 that the steel/acid interface could be approximated by an equivalent circuit with a single time constant.Figure 8 depicts such single time constant equivalent electrical circuit (EEC) that should match experimental data.

Figure 8. Electrical equivalent circuit used to fit measured impedance spectra
The fact that EEC in Figure 8 can well simulate experimental impedance spectra is shown in Figure 9, where fitting results that best suit the experimental data for carbon steel in 1.0 M HCl in the presence of 700 ppm of ARAE, are presented as Nyquist and Bode plots, showing excellent agreement between experimental and fitted impedance spectra.
EEC in Figure 8 is made up of the polarization resistance (Rp), which is the total of all possibly present resistances (Rp = Rct + Rd + Rf + Ra), and the solution resistance (Rs) [23].Rct is the charge transfer resistance of metal dissolution, Rd represents the resistance of the diffuse layer, Ra is the  The polarization resistance is in parallel with the constant phase element (Rp//CPE), where CPE replaces the electrical double layer (Cdl) capacitance.The increase of absolute impedance at low frequencies in Bode plots confirmed the higher protection with the increasing of inhibitor concentration and the good performance of the inhibitor with a constant period for different concentrations of ARAE related to the adsorption of inhibitor on the carbon steel surface [21].Based on the following equation, the double-layer electrical capacity (Cdl) for each inhibitor concentration was calculated according to: where n is the deviation parameter of the CPE: 0 ≤ n ≤ 1 and Q is the magnitude of the CPE.The electrochemical impedance parameters values, including Rp, Q, n, Rs, and IEEIS, obtained by fitting the EEC in Figure 8 to impedance spectra in Figures 7 and 9, are listed in Table 5.The data in Table 5 show that as inhibitor concentrations increase, Rp values rise, but Cdl values decrease.These findings imply that molecules adhere to the carbon steel surface, forming a barrier that prevents the carbon steel from dissolving into the HCl medium [43,44].Potentiodynamic polarization measurements The potentiodynamic polarization curves were used to show the effect of the ARAE inhibitor on the dissolution of carbon steel on the anode side and the evolution of hydrogen on the cathode side.Figure 10 shows the straight Tafel curves for CS in 1 M HCl solution without and with the addition of different concentrations of ARAE at 293 K.The addition of inhibitors causes the appearance of nearly parallel cathodic branches of Tafel.The parameters obtained from the fitting of the polarization curve, such as corrosion potential Ecorr, cathodic and anodic Tafel slopes (a, b) as well as corrosion current density (jcorr) and inhibition efficiency (IER), are presented in Table 6.Ecorr in presence of inhibitor is less than 85 mV, what suggests the mixed type of inhibition [45].The addition of inhibitor strongly affects the anodic and cathodic reactions [46] by decreasing anodic and cathodic current densities.On the other hand, with increasing extract concentration, the inhibition efficiency shows an increasing trend, which is consistent with the results of weight loss experiments.This increase in inhibition efficiency is the result of the strong interaction of the inhibitor with the metal surface, which covers active sites of the surface and causes the formation of a barrier layer that reduces the reactivity of the metal.These suggest that the inhibition actions are due to adsorption onto the steel surface, where adsorbed molecules mechanically protect the coated portion of the metal surface from corrosion action [47].In addition, the ARAE extract has a good protective effect at 293 K, showing at 700 ppm the maximum value of 90.09 % (Table 6).

Inhibition efficiency of ARAE on carbon steel using response surface methodology (RSM)
The generated experimental data were analysed using Design-Expert to obtain an analysis of variance (ANOVA) at 95 % confidence interval.The factor levels with corresponding actual values are presented in Table 7, while the experimental design matrix is presented in Table 8 with actual and coded values.In this study, a variety of mathematical models were put forth to illustrate how the best model was chosen for the description of inhibitory efficiency data of ARAE on carbon steel.Linear and polynomial models were applied as two main sets of models.In terms of the response (Y) and independent variables (Xi…Xn), these models are generally defined by equations ( 12) to (17): Linear model: Logarithmic -linear model: Linear-interaction effect model: Logarithmic-interaction effect model: The second-order polynomial models are: Polynomial-interaction effect model Logarithmic -polynomial -interaction effect model In the present case, the response surface methodology (RSM) was employed to explore the interaction between the factors, i.e., inhibitor concentration and temperature.Therefore, in eqns.(12)(13)(14)(15)(16)(17), Y is inhibition efficiency, Xi are variables (X1 = A is inhibitor concentration, X2= B is the temperature), n is the number of variables, ε is the standard error, a0 and ai are constants [48].Equations ( 12) to ( 17) can be expanded and regression has been carried out to evaluate the coefficients of these equations.Design-Expert was used to estimate the coefficients.The expanded equations can be rewritten as presented in equations (12a) to (17a): For a successful model with high predictive efficiency, the value of R 2 -should be close to 1.0 [28], for adequate precision, the estimate of the signal-to-noise ratio should be greater than 4, while a model can be considered reasonable if its statistical measure of the relative variability coefficient (CV) does not exceed 15 % [49].Using Design-Expert software 10.0, the suggested models and numerical values of these coefficients were rewritten, equations (12b) to (17b): Y = 69.12+ 15.49A -4.76B (12b) log Y = 1.83 + 0.099A -0.03B (13b) Y = 69.12+ 15.49A -4.76B -0.035AB (14b) log Y = 1.83 + 0.099A -0.03B + 6.426×10 -3  (15b) Y = 68.27+15.49A -4.76B -0.035AB -0.43A² + 2.29B² (16b) log Y = 1.83 + 0.099A -0.03B + 6.426×10 -3 AB -0.014A² + 0.013B² (17b) Total errors, adequate precision, coefficient of variation, and correlation coefficients were evaluated, as shown in Table 9.The analysis of variance (ANOVA) (R², coefficient of variation, and adequate precision) of the different models revealed that the logarithmic-polynomial model has the most satisfactory R² correlation coefficient (Eqn.17a).According to Table 9, this model is marked by a coefficient of variation (CV = 0.24 %), which means that the model is appropriate with a faithful estimation.The ratio of 88.170 % obtained indicates an adequate signal.Therefore, the choice of the logarithmicpolynomial model is justified.

Statistical analysis
Values of "Prob > F" less than 0.05 indicate that the terms of the model are significant at a 95 % confidence level [48][49].In this case, A, B, AB, A 2 , and B 2 are significant terms in the model.The ANOVA results related to the inhibitory efficacy response of the extract are summarized in Table 10.The F-value (Fisher ratio) and the p-value of the model denote the statistical significance of the model as a totality.The F-value must be greater than the p-value to assess whether the result is significant enough to reject the null hypothesis.In this analysis, the F-value of 698.96 is superior to the p-value of 0.0001.As a result, we can assert that this model is significant.The fit statistics for the response data exhibit an R 2 value of 0.9980 and an adjusted R 2 value of 0.9966.This indicates a good correlation between the experimental outcomes and those generated by the model.The predicted R 2 of 0.9863 is in reasonable agreement with the adjusted R 2 of 0.9966 since the difference is less than 0.2.This suggests that the experimental data obtained for the inhibition efficiency of the ARAE extract on carbon steel in 1 M HCl were statistically consistent and that the second-order logpolynomial model adopted was appropriate for modelling.The model in decoded form is given below by the equation: log EIW = 1.8417 + 4.02214×10 -4 C -6.77376×10 -3 T + 1.42791×10 -6 CT --1.52891×10 -7 C² + 5.96428 ×10 -5 T² (18) A normal probability of the residuals was performed to fully understand the nature of the fit.Figure 11 shows that the fit of the regression data is close to a straight line.This indicates that the hypothesis of the analysis is satisfied.In addition, the plots of the predicted values against the experimental values were used to ensure the predictability of the experimental results.Figure 12 illustrates the predicted values of inhibition efficiency obtained from eq. ( 18) are in good agreement with the experimental values.

Figure 12. Correlation between measured and predicted values of inhibitory efficiency
The effect of the two factors (concentration of the ARAE extract and temperature) on the response (inhibition efficiency) is represented by 3D curves in Figure 13.When time is maintained constant, the inhibition efficiency decreases with increasing temperature and extract concentration.The amount of heteroatoms responsible for the inhibition in the corrosive solution increases as the ARAE extract concentration increases.

Optimization and confirmation of the results
An optimization study of the inhibitory efficacy of the ARAE extract on carbon steel in a 1 M HCl acid medium was conducted.Its purpose is to predict the optimal conditions under which the maximum inhibition efficiency can be achieved.The experimental findings of the top 10 cases with the maximum desirability are selected and reported in Table 11.The confirmation of these results is illustrated in Figure 14.The optimal conditions of the highest inhibitory efficiency of 90.52 % are reached for a temperature equal to 20 °C and a concentration of the extract of 700 ppm.

Conclusion
The effect of the extract (ARAE) on the corrosion inhibition of carbon steel (16MnCr5) in 1 M HCl acid media was experimentally investigated and statistically analyzed using the response surface methodology (RSM) based on the composite-centered design (CCD).Many mathematical models have been proposed to statistically analyze the inhibitory efficiency of the ARAE extract on the corrosion of carbon steel.Polynomial models and linear models are the two groups of models.According to a comparison of the various models (R 2 , coefficient of variation, and appropriate accuracy), the logarithmic-polynomial model has the best R 2 correlation coefficient and by a coefficient of variation (CV = 0.24 %), a ratio of 88.170 % was obtained and indicated an adequate signal.Experimental results showed that both parameters, concentration and temperature, were significant in obtaining maximum inhibition efficiency.After optimization using RSM, the results revealed that the highest value of the inhibition efficiency is 90.52 % when the temperature is equal to 20 °C and the concentration of inhibitor 700 ppm.The results also showed that corrosion rate decreases, while the efficiency of inhibition increases with ARAE concentration but decreases with the rise of temperature.According to the thermodynamic analysis, the extract spontaneously adheres to the steel surface following the Freundlich adsorption isotherm model.G 0 ads values obtained are between -20 and -40 kJ mol -1 of ARAE, which suggests the mixed type of adsorption attained by physical and chemical interactions.Potentiodynamic polarization experiments indicated that ARAE extract is a mixed-type inhibitor and the electrochemical impedance spectroscopy EIS results suggest that a protective film is formed on the carbon steel surface, which is confirmed by SEM micrographs.

Figure 2 .
Figure 2. Freundlich adsorption isotherm of ARAE on carbon steel in 1.0 M HCl at different temperatures

Figure 6 .
Figure 6.SEM micrographs (left) and EDS spectra (right) of carbon steel: (a) prior immersion and after 3 hours of immersion in (b) 1.0 M HCl and (c) 1 M HCl containing 700 ppm ARAE inhibitor Electrochemical experiments Electrochemical impedance spectroscopy (EIS)In an attempt to acquire more in-depth information on the phenomenon of corrosion inhibition of carbon steel in 1 M HCl without and in the presence of different concentrations of ARAE at 20 °C, EIS measurements were performed.These measurements were carried out when the stability of CS electrode was reached after 30 min of a wait at the open circuit potential.Figure7displays impedance spectra in the form of Nyquist (Zi vs. Zr) and Bode (log|Z| and phase angle vs. log f) plots, respectively.

Figure 7 .
Figure 7. Nyquist (a) and Bode (b) impedance plots of carbon steel in 1 M HCl in the absence and presence of different concentrations of ARAE inhibitor at 293 K

1 Zr
accumulated at the metal/solution interface and Rf is the resistance of the inhibitor film on the steel considered only in the presence of inhibitors.

Figure 9 .
Figure 9. Best fitted impedance plots of carbon steel in 1 M HCl without and with 700 ppm ARAE inhibitor (a) Nyquist diagrams and (b) and (c) Bode diagrams

Figure 10 .
Figure 10.Polarization curves of carbon steel without and with presence of ARAE inhibitor in 0.1 M HCl at 293 K

Figure 11 .
Figure 11.Normal plot of residuals

Figure 13 .
Figure 13.3D response surface plots for inhibition efficiency of AREA extract on mild steel in 0.1 M HCl: temperature vs. inhibitor concentration

Figure 14 .
Figure 14.Optimal conditions selected for parameters influencing corrosion inhibition of carbon steel in 0.1M HCl (concentration of AREA inhibitor and temperature) with their responses (inhibition efficiency)

Table 3 .
Thermodynamic activation parameters of carbon steel dissolution in 1 M HCl solution with and without various concentrations of ARAE inhibitor

Table 5 .
Electrochemical impedance parameter values for carbon steel in 1M HCl containing different concentrations of ARAE at 293K

Table 6 .
Fitting parameters of polarization curves of carbon steel in 1 M HCl without and with the presence of ARAE inhibitor at 293 K

Table 7 .
Experimental range of independent variables

Table 8 .
RSM results of the corrosion inhibition of carbon steel in 1 M HCl by ARAE extract

Table 9 .
Total error, adequate precision, coefficient of variation, and correlation of suggested models

Table 10 .
ANOVA results for the inhibition efficiency of ARAE on mild steel corrosion in HCl solution

Table 11 .
Ten best solutions for parameters influencing corrosion inhibition and inhibition efficiency for carbon steel in the absence and presence of ARAE inhibitor (Desirability = 1.00)