Introduction

Mild steel and aluminum are the two most commonly used material as it is easily available and at a lower cost. Acid solutions are commonly used in industry where hydrochloric, sulfuric acid, and phosphoric acids are the mostly used to remove the metal oxides that are formed on the surface of metals (Solomon et al. 2010; Yüce 2020; Santos et al. 2020). Over time, the frequent use of these acid solutions may cause deterioration in metallic materials. Nowadays, the industry and the academic sectors have been interested in the use of inhibitors due to their adsorption onto the surface of the metal can reduce the corrosion rate (CR), and such adsorption depends on the physical–chemical properties of the molecules of inhibitor, the nature of metal, the aggressiveness of the corrosive medium, temperature, and electrochemical potential in the metal–solution interface (Gao and Liang 2007). On the other hand, the legislations and environmental policies enforce restrictions and the installation of residual water treatment plants as a cause of toxic inhibitors, which cause an increment in costs for industries (Fernández 1989). Those circumstances motivate the increase in developing effective and low toxicity chemical substances(Galo et al. 2020; Saxena et al. 2020; Şahin et al. 2020). Natural organic molecules such as caffeine (Fallavena, Antonow, and Gonçalves 2006), tryptamine (Moretti, Guidi, and Grion 2004; Lowmunkhong, Ungthararak, and Sutthivaiyakit 2010), and succinic acid (Giacomelli et al. 2004) have been reported as good inhibitors that are absorbed on the surface of metal decreasing the rate of corrosion. The majority of the eco-friendly inhibitors are normally acquired comprising nitrogen, oxygen, and sulfur as principal functional groups (D Prabhu and Rao 2013; Ferdosi Heragh and Tavakoli 2019; P. R. Prabhu, Prabhu, and Rao 2020a, b; Sedik et al. 2020; Shinato, Zewde, and Jin 2020; Chen and, Bin Zhu 2020; Benabbouha et al. 2020; Vincent Onuegbu Izionworu, Chukwuemeka Peter Ukpaka 2020; Bouhlal et al. 2020; Umoren et al. 2020). In this way, it is clear to utilize natural extracts as corrosion inhibitors for Al in the corrosive medium (Deepa Prabhu and Rao 2019; Mizuno, Nylund, and Olefjord 2001; Udensi, Ekpe, and Nnanna 2020; Fouda et al. 2020). There have been very few works reported on H3PO4 corrosive with aluminum (Li and Deng 2012; Fouda et al. 2009; Li, Deng, and Fu 2011; Fouda et al. 2012; P. R. Prabhu, Prabhu, and Rao 2020a, b).

In practice, it is a very tedious process to optimize all the process variables considered for the study to obtain the best arrangement for the enhanced performance. To interrelate the examined variables, a huge number of trials must be done to cover all the conceivable parameter mixes. This procedure is profoundly uneconomical and troublesome. The regular optimization strategies include change of one variable and keeping other variables constant. It empowers us to think about the effect of specific parameters on the whole execution of the procedure. This system is tedious and bulky, and requires an enormous number of experimental data. It is tough to get data about the related interactions of the variables in the normal technique of the optimization process (Q.K. Beg, V. Sahai 2003).

For this sort of case, statistical tools and a proper plan of experiments help to acquire data about the optimization settings. Response surface methodology (RSM) with desirability function approach (DFA) encourages the investigation of the association of a huge number of factors and their conditions with few trials prompting significant sparing in time and cost for the optimization of the process (Femiana Gapsari, Rudy Soenoko, Agus Suprapto 2018; Tansuǧ et al. 2014; Ali Fakhri 2013; Demirel and Kayan 2012; Maher T, Al-Shamkhani 2018; Omoruwou F and CN 2017; P. R. Prabhu, Prabhu, and Rao 2020a, b). From the literature, it is seen that many have utilized RSM as a tool to evaluate the influence of different factors on the properties of the framework viable and to optimize the process variables which will decrease the rate of corrosion and, in this way, augment the inhibition proficiency (Asghari et al. 2016; Bingöl and Zor 2013; Jeirani et al. 2013; Sunday O. Ajeigbe, Norazah Basar 2017; Rashid and Khadom 2019). The natural inhibitor (Terminalia chebula Ritz.) used in this work is non-toxic, easily available, and environmentally friendly, and plays a unique role in the control of corrosion. The dried ripe fruits of Terminalia chebula Retz are widely used in ayurvedic medicine (Barthakur and Arnold 1991). Fruits are drupes, glabrous, sub globose to ellipsoid, 2.5–5.0 cm by 1.5–2.5 cm, usually smooth and wrinkled. Principal active ingredients of fruits of Terminalia chebula Retz. are tannins up to 30%, chebulic acid 3–5%, chebulinic acid 30%, tannic acid 20–40%, ellagic acid, 2,4-chebulyi–β-d-glucopyranose, gallic acid, ethyl gallate, etc. (Chang and Lin 2012). It is cost-effective and has distinct advantages over the chemical inhibitors which are used to control corrosion. In addition to this, the design of experiment approach has been used to minimize the number of experiments with the same level of accuracy when all the combination of experiments is conducted. Finally, we have tried to optimize the process parameters which influence the inhibition efficiency of aluminum in the phosphoric acid environment.

In this paper, the corrosion inhibition characterization of Terminalia chebula Ritz. extract on aluminum in H3PO4 was studied using PDP technique, and the surface measurements were carried out using SEM, EDXS, and AFM. TCE on the enhancement made to IE of Al in H3PO4 was considered using the central composite design (CCD), RSM, and DFA. This methodology of optimization of process empowers the investigation of the impact of individual variables, builds up the connection among factors and operational settings, and forecasts the exhibition at the ideal levels.

Experimental

Material, medium, and inhibitor preparation

The working electrode used for the study is the commercially obtained aluminum with the following composition: 99.61% Al, 0.27% Fe, and 0.12% Si. The cylindrical test specimen molded in acrylic material was exposed to a corrosive medium with a surface area of 1.0 cm2. The specimen is first mechanically rubbed with sandpapers of various grades (grade 300—800), polished with a disk polishing machine to get a mirror surface finish, and then washed and dried. The experimental setup used for electrochemical measurements consists of three-electrode setups: test specimen—working electrode, the platinum electrode—counter electrode, and calomel electrode—reference electrode. H3PO4 (85%) was used for preparing the corrosive medium with different concentrations.

The extraction process is depicted in Fig. 1 and dry fruits of Terminalia chebula Ritz. (TC), and residue of the extract obtained after extraction is shown in (Fig. 2). Dried fruits of TC (Fig. 2a) were grinded well into powder. The 10 g of powdered TC was refluxed with 100 ml of distilled water for 3 h. The refluxed solution was kept overnight and filtered. Extract was heated on a water bath. After the evaporation dry dark brown powder was obtained (Fig. 2b). The residue of TCE obtained was then finely grinded using a mortar and pestle and stored in desiccator. Shimadzu FTIR spectrophotometer was utilized for the FTIR measurement of the inhibitor sample.

Fig. 1
figure 1

Chat representing extraction process of Terminalia chebula Ritz. (TC)

Fig. 2
figure 2

a Dry seeds Terminalia chebula Ritz. b Residue of the extract obtained after extraction

Potentiodynamic polarization

The instrument used for performing the potentiodynamic polarization measurement is an electrochemical work station of model CH600D. Polished test specimens were allowed to achieve open circuit potential (OCP). Then, the samples were polarized with the potential of − 250 mV cathodically and + 250 mV anodically at a scan level of 1.0 mVs−1.

Effect of temperature and kinetic factors

The CRs were measured at several Ts (30–50 ℃) by the PDP method was utilized for the calculation of Ea (activation energy), ΔH# (activation enthalpy), and ΔS# (activation entropy). The Ea was determined from the Arrhenius equation, ΔH# and ΔS# were calculated using transition state equation (Deepa Prabhu and Rao 2019).

Adsorption and thermodynamic factors

The interface between the inhibitor molecule and the surface of the metal is described by adsorption isotherm. The isotherm is decided based on the correlation coefficient (R2) that best fits the obtained investigational data. The standard free energy of adsorption (∆Goads) was calculated from the adsorption equilibrium constant (K) (D Prabhu and Rao 2013). The plot of ∆ads vs. T was then used to obtain the standard enthalpy of adsorption (Δads) standard entropy of adsorption (Δads).

Surface characterization

The surface characterizations of metal dipped in 1.0 M H3PO4 solution with and without 500 ppm TCE inhibitor were examined by capturing the images with the magnification of 1 K X using SEM and EDXS using EVO MA18. AFM was carried out using the instrument IB342 Innova model.

Optimization of parameters for IE

RSM with CCD was utilized for identifying the influence of temperature (A), the concentration of TCE extract (B), and concentration of acid (C) on the IE, and the interference between these variables. All three variables were taken at three levels as given below: temperature—30, 40, and 50 ℃; concentration of TCE extract—100, 300, and 500 ppm; concentration of acid–0.5, 1.25, 2.0 M. A full quadratic regression model was used to find out the association between the efficacy of the inhibitor and the factors which were used for the study. The influences of various variables on the IE are accurately examined using the formula as given below (Eq. 1):

$$Y1 = c_{0} + c_{1} A + c_{2} B + c_{3} C + c_{12} AB + c_{13} AC + c_{23} BC + c_{11} A^{2} + c_{22} B^{2} + c_{33} C^{2} ,$$
(1)

Y1: IE predicted by the regression equation.

A, B, and C: independent factors representing the temperature, concentration of TCE extract, and concentration of H3PO4.

\(c_{0}\): constant, \(c_{1}\), \(c_{2}\), and \(c_{3}\): constants indicating the impact of variables A, B, and C.

\(c_{12}\), \(c_{13}\), \(c_{23}\): constants indicating the collaboration between the variables AB, AC, BC.

\(c_{11}\), \(c_{22}\), and \(c_{33}\): constants indicating the impact of quadratic A, B, and C.

The examination plans to recognize the ideal parameter setting to limit the pace of corrosion and in this way to secure the maximum IE. It is hard to discover the ideal handling factors. In this way, the DOE approach was utilized to look at the effects of the various factors on the reaction. At that point, the mix of the procedure factors that can achieve an ideal foreseen worth can be obtained.

Results and discussion

Inhibitor characterization

The aqueous extract of Terminalia chebula comprises of many carbon-based compounds and the major constituents reported in the literature to be chebulinic acid and 1,2,3,4,6-pentagalloyl glucose (Chang and Lin 2012). FTIR spectrum of TCE is given in (Fig. 3).

Fig. 3
figure 3

FTIR spectrum of Terminalia chebula Ritz. extract solid residue

Potentiodynamic polarization

The PDP measurements for the corrosion of Al were performed in different strength of H3PO4 and with different amounts of TCE. Figure 4 represents the PDP plots for the deterioration of Al in 1.0 M H3PO4 having various concentrations of TCE at 30 ℃. The anodic branches of the PDP plots were strongly curved (Li and Deng 2012), henceforth it was unable to obtain anodic Tafel slopes (βa). For the obtained cathodic Tafel slope (βc) there was no substantial variation in the values, which propose that there was no alteration in the mechanism of the cathodic process with TCE. According to Riggs, if the corrosion potential value (Ecorr) was on an average of less than ± 85 mV (Nathan and of Corrosion Engineers 1973). This suggests that TCE act as a mixed type of inhibitor. Results of the PDP on Al containing TCE at 30 ℃ are given from Table 1. The icorr values increased with an increase in the concentration of medium indicating the increased corrosion activity due to which decrease in the IE was observed.

Fig. 4
figure 4

Potentiodynamic polarization plots in 1.0 M H3PO4 containing different concentrations of TCE at 30 ℃ for the corrosion of aluminum

Table 1 Results of potentiodynamic polarization for the corrosion of aluminum in different concentration of H3PO4 containing different concentrations of TCE at 30 °C

Effect of concentration of H3PO4, variations in temperature, and kinetic factors

The rate of corrosion of aluminum increased with an increase in the concentration of H3PO4 corrosive arrangement. It is since, more is the concentration of the corrosive medium, higher will be the rate of corrosion. Since the present examination additionally targets finding the ideal concentration of inhibitor essential to acquire the highest possible IE, the various concentrations of inhibitor have been utilized in the various concentration if corrosive medium instead of utilizing the same arrangement of inhibitor.

Figure 5 characterizes the variation of the IE of TCE with T (30–50℃). With an increase in T, the IE decreased indicating physical adsorption, since the interaction is electrostatic between TCE molecules with the metal surface. These electrostatic forces reduce their attractive force at high temperatures.

Fig. 5
figure 5

Effect of temperature on inhibition efficiency with different concentration of TCE in 1.0 M H3PO4 for the corrosion of aluminum

Arrhenius plot and ln (CR/T) vs. 1/T in 1.0 M H3PO4 comprising TCE on Al is given in Fig. 6. Activation factors for the deterioration of Al in 1.0 M H3PO4 comprising TCE are presented in Table 2. With the increase in concentrations of inhibitor, the activation energy (Ea) increased, which directs that the energy barrier for the corrosion process increased with an increase in TCE concentration. The values of activation enthalpy (∆H#) varied correspondingly as that of Ea, associate the suggested mechanism. The entropy activation (∆S#) values were negative, which characterizes molecular association and decreases in disorderliness during the formation of the activated complex (Oguzie et al. 2008).

Fig. 6
figure 6

a Arrhenius plot and b ln (CR/T) versus 1/T in 1.0 M H3PO4 with different concentrations of TCE for the corrosion of aluminum

Table 2 Activation parameters for the corrosion of aluminum in H3PO4 containing different concentrations of TCE

Energy of activation (Ea) was calculated from the Arrhenius equation (Eq. 2):

$$\ln (CR) = B - \frac{{E_{a} }}{RT},$$
(2)

where B is a constant which varies from one metal type to another, R is the universal gas constant (8.314 J mol−1 K−1), and T is the absolute temperature. The enthalpy of activation (ΔH#) and entropy of activation (ΔS#) were calculated using transition state equation (Eq. 3):

$$CR = \frac{RT}{{Nh}} \, \exp \, \left( {\frac{{\Delta S^{\# } }}{R}} \right)\exp \left( {\frac{{\Delta H^{\# } }}{RT}} \right),$$
(3)

where h is Plank’s constant (6.626 × 10−34 J.s), N is Avogadro’s number (6.022 × 1023 mol−1) and T is the absolute temperature.

Adsorption and thermodynamic factors

TCE obeyed Langmuir adsorption isotherm, shown in Fig. 7a. The standard free energy of adsorption (∆ads) was obtained from the adsorption equilibrium constant (K) (Akinbulumo, Odejobi, and Odekanle 2020). A plot of ∆G°ads versus T for TCE on Al in 1.0 M H3PO4 is given in Fig. 7b. Thermodynamic factors for the TCE adsorption are given in Table 3.

Fig. 7
figure 7

a Langmuir adsorption isotherms and b Plot of ∆G°ads versus T for TCE in 1.0 M H3PO4 for the corrosion of aluminum

Table 3 Thermodynamic factors for the adsorption of TCE on aluminum in H3PO4 at different temperatures

The Langmuir adsorption isotherm mathematically can be represented by the following equation (Eq. 4):

$$\frac{{C_{inh} }}{\theta } \, = \, C_{inh} + \frac{1}{K},$$
(4)

where K is the adsorption equilibrium constant, Cinh is inhibitor concentrations (in ppm), and θ is the surface coverage.

From the adsorption equilibrium constant (K), standard free energy of adsorption (∆ads) can be calculated using the equation (Eq. 5):

$$\Delta G^\circ_{ads} = - RT\ln K,$$
(5)

where R is the universal gas constant (8.314 J mol−1 K−1) and T is the absolute temperature.

Standard enthalpy of adsorption (∆ads) and standard entropy of adsorption (∆ads) can be calculated from equation (Eq. 6):

$$\Delta G^\circ_{ads} = \, \Delta H^\circ_{ads} - T\Delta S^\circ_{ads} ,$$
(6)

With TCE as an inhibitor, the Δads were close to −20 kJ mol−1 (Galo et al. 2020) and the value increased with the increase in T. This suggests physical adsorption of TCE on the surface of Al (Fouda et al. 2009). The adsorption enthalpy (Δads) was negative, which is the indication of the exothermic process, which additionally confirms physisorption. The entropy of adsorption (∆ads) was large and negative, indicating the orderly arrangement of inhibitor molecules on the surface) (Tang, Mu, and Liu 2003).

Surface characterization

SEM and EDXS analysis

The SEM and EDXS pictures of Al in 1.0 M phosphoric corrosive are given in Fig. 8. Within the sight of 1.0 M H3PO4 metal surface, it is seen from Fig. 8a that the surface is rough with the deposition of corrosion products on the surface of the metal. The corresponding EDXS investigation validates the existence of Al oxides on the surface of the metal, the composition on the surface at this stage consists of aluminum (84.18%), oxygen (14.76%), and phosphorous (1.06%). EDXS analysis can be ascribed to the contact of the metal with the corrosive medium as it consists of phosphorus peak.

Fig. 8
figure 8

a SEM b EDXS spectra of aluminum in the presence of 1.0 M H3PO4

The SEM and EDXS pictures of Al in 1.0 M phosphoric corrosive in 500 ppm of TCE are given in Fig. 9. The surface turned out to be smooth and uniform with the inclusion of the inhibitor. There was the construction of inhibitor film above the surface of metal due to the adsorption of protective species. Uniform and reduced surface film legitimize the adsorption of the inhibitor atom on the outside of the metal. EDXS inspection showed a drop in the ingredient of aluminum (80.90%), oxygen (5.44%), and phosphorous (0.50%). The carbon peak (14.21%) confirms the adsorption of TCE on Al.

Fig. 9
figure 9

a SEM b EDXS spectra of aluminum in the presence of 1.0 M H3PO4 with TCE (500 ppm)

AFM analysis

The 3-D AFM method is a method for exploring the surface topography at the micro- and nano-levels. The 3-D images of Al with and without TCE are given in Fig. 10. Al immersed in 1.0 M H3PO4 and 1.0 M H3PO4 comprising TCE are given in Fig. 10a and Fig. 10b, respectively. It is observed that the roughness of the surface of samples in contact with 1.0 M H3PO4 corrosive was higher when compared to the sample surface after inhibition. The higher value of roughness before corrosion inhibition can be attributed to the higher corrosion tendency of Al in 1.0 M H3PO4. The value of Maximum Roughness Depth (Rmax) dropped from 2193 to 1287 after the addition of 500 ppm of TCE. This confirmed the film-forming ability of the TCE on the surface of the metal. Results of AFM measurements are tabulated in Table 4.

Fig.10
figure 10

a AFM 3-D image of aluminum in 1.0 M H3PO4 and b aluminum in 1.0 M H3PO4 with TCE (500 ppm)

Table 4 AFM data obtained for aluminum in 1.0 M H3PO4 with 500 ppm of TCE

Optimization of parameters for IE

Screening tests uncovered that temperature, the concentration of TCE inhibitor, and concentration of acid notably affected the corrosion current density (icorr). Consequently, they were selected as investigation factors for further examination. The impact of temperature (A), the concentration of TCE inhibitor (B), and concentration of H3PO4 (C) were found by strategies for a CCD (Bingöl and Zor 2013). All the exploratory trials were executed arbitrarily to avoid regular slip-ups, and the results were then evaluated applying Minitab-19 programming (State College, PA: Minitab 2019). The arrangement of examination and the settings of the individual elements are given in Table 5 as coded esteems alongside the corrosion current density. The IE was, moreover, acquired from polarization results, using the accompanying condition (Eq. 7):

$$IE(\% ) = \frac{{i_{corr} {-} \, i_{corr(inh)} }}{{i_{corr} }} \times 100,$$
(7)
Table 5 Experimental plan of design and their settings

where icorr and icorr(inh) are the corrosion current densities of blank and inhibited solutions.

From Table 5, it has been seen that the most elevated effectiveness is achieved in the trial with a TCE concentrate of 500 ppm, the concentration of H3PO4 of 0.5 M, and an operating temperature of 30 ℃. From the results, it is also seen that with the increase in the concentration of TCE inhibitor, the icorr value diminished. The multivariate regression empirical formula between IE and process factors was then established as shown in the following equation (Eq. 8):

$$\begin{gathered} IE(\% ) = 104.39 - 1.371 \times A + 0.01534 \times B - 10.364 \times C + 0.00323 \times A \times A + 0.000037 \times B \times B + \, \hfill \\ 2.645 \times C \times C + 0.000306 \times A \times B + 0.00617 \times A \times C + 0.000142 \times B \times C, \hfill \\ \end{gathered}$$
(8)

To locate a decent understanding of Analysis of Variance (ANOVA), the impact of factors at each level and the sum of squares (SS) and relating computations need further illustration. During the study, the level of significance is taken as 5%. The estimation of P specifies whether the influence of that term is noteworthy or not (Asghari et al. 2016). From Table 6, it is seen that for most of the cases, the P value is 0.000. A P-esteem under 0.05 demonstrates that the full quadratic model is the right model for this setting. Seven of the nine P-estimations of the model are under 0.05, which shows that 78% of the model process factors are significantly affecting the response. The results from the ANOVA exhibited that the temperature and concentration of TCE inhibitor are having a critical effect, with the impact of 47.89% and 46.85%. Figure 11 represents a Pareto chart for Al in the H3PO4 solution which suggests that all the linear and square effects of the process parameters are having a significant effect on the response except the two-way interaction parameters (the same can be observed from the Table 6).

Table 6 ANOVA for IE for Al in H3PO4 solution
Fig. 11
figure 11

Pareto chart of the standardized effects of parameters for Al in H3PO4

Validation of the model

Table 5 also demonstrates the anticipated IE against the IE, which was obtained experimentally. The analysis gave R2 of 0.9998 and adjusted-R2 of 0.9996, which are very close to one, in this way, showing a generally decent relationship between the anticipated and test estimations of the IE. Additionally, a very minimum deviation was observed between the experimental and predicted IE, which demonstrates that there is a good fit between them.

The performance of the influence of three factors measured separately on IE is presented in Fig. 12. From Fig. 12, it is seen that there was a decrease in IE when the temperature was increased from 30 ℃ to 50 ℃. The increase in temperature prompts an increment of the dynamic vitality for the inhibitor particles. This raises the pace of their crash with one another. This accordingly blocks and eases back the arrangement of the protective film of inhibitors on the surface of the metal. The increase in temperature causes a decrease in the adsorption process of inhibitor on the surface of the metal. A similar trend was observed with the concentration of H3PO4 when it was increased from 0.5 M to 2.0 M. Whereas the relationship between the concentration of TCE inhibitor and IE has an inverse relationship. The IE increased when the concentration of TCE inhibitor was increased from 100 to 500 ppm. The corrosion rate was the most elevated without inhibitor arrangement, and afterward, it begins to decline when the inhibitor being included until it becomes stable toward the finish of examination. However, IE increases with the increase of concentration of TCE inhibitor. The concentration of inhibitor rise prompts both the adsorption and surface inclusion rise, and along these lines, this developing leads to lessen the corrosion rate and increase the IE.

Fig. 12
figure 12

Main effects plot for IE for Al in H3PO4

The collaboration between variables happens when the change in response is distinctive for two factors. In the interaction plot, if there is any interaction, they are represented by crossed lines. If the lines are straight/parallel, then there is no interaction among the factors. Figure 13 shows the interaction effect plot for IE recommends that the interaction between the variables is not exceptionally noteworthy. From the ANOVA investigation, it is additionally observed that two-way interactions among the factors are not considered as the value of P is higher than 0.05; showing there is no connection among the concentration of TCE inhibitor, the concentration of H3PO4, and temperature.

Fig. 13
figure 13

Interaction effect plot for IE for Al in H3PO4

Optimization of response

Numerical streamlining of the model in Eq. (8) was done to decide the concentration of TCE inhibitor, the concentration of H3PO4, and temperature at which the corrosion rate of aluminum was at least with the goal that it will bring about highest IE. The DFA was utilized to enhance the process factors for the most noteworthy conceivable response. In the first place, the objective components for temperature, the concentration of TCE inhibitor, and concentration of H3PO4 were set, while that of IE was set to “most extreme”. The response optimization plot for IE is shown in Fig. 14. From the plot, the anticipated ideal elements were evaluated to be temperature (30 ℃), and concentration of TCE inhibitor (500 ppm), and concentration of H3PO4 of 0.5 M. At these ideal conditions, the comparing anticipated IE was seen as 83.35%. Affirmation tests were likewise directed to approve the ideal parameter settings and to confirm the improvement of the IE. The reason for affirmation tests is to check the redundancy of the exploratory outcomes and approve the exactness of the prescient model.

Fig. 14
figure 14

Response optimization plot for IE

Mechanism of inhibition

The charge on the metal–solution interface is dependent on solution pH. In the presence of an acid, the surface charge of Al is due to the interaction of the oxygen atoms of the surface with water developing M–OH. Hydroxylated sites (Al–OH) acquire positive charged by reacting with the proton of acid (H+). These surface charges initiate the adsorption of negatively charged ions from the electrolyte. The TCE consists of a large number of compounds. The principal components are reported in Sect. 3.1. The structures of these components are given in Fig. 15.

Fig. 15
figure 15

Structure of components of Terminalia chebula

The inhibitor structures are protonated at the OH terminal in the presence of acid. These protonated inhibitor molecules become attracted to phosphate layer (negatively charged) and thus get physically adsorbed on the surface of Al, as shown in Eq. 9:

$${\text{A1 } - \text{ OH}}_{{2}}^{ + } \to {\text{A1 } - \text{ OH}}_{{2}}^{ + } {\text{ } - \text{ PO}}_{{{4}^{{\left( {{\text{ads}}} \right)}} }}^{{3 - }} \to {\text{OH}}_{{2}}^{ + } {\text{ } - \text{ PO}}_{{{4}\left( {{\text{ads}}} \right)}}^{{3 - }} { - }\left( {{\text{Inh}}} \right)_{{\left( {{\text{ads}}} \right)}}^{ + } ,$$
(9)

Due to the relatively larger size of the molecule, the protective film of the inhibitor covers the entire surface of the metal. It results in a barrier formed between the Al and acid medium. This is largely attributed to the bulky size and the large number of –OH groups of components of TCE, which are covering the metal surface thus reducing the corrosion reaction.

Conclusions

In this investigation, PDP and RSM techniques were utilized to identify the inhibition efficiency of aluminum as an element of the working factors: temperature, the concentration of TCE inhibitor, and concentration of H3PO4.

  • The inhibition efficiency of TCE increased with an increase in the concentrations of the inhibitors, and decreased with an increase in temperature as well as with an increase in concentrations of H3PO4.

  • Langmuir adsorption isotherm was followed and the adsorption of TCE was physisorption.

  • The surface analysis results were complementing the obtained data and justified the adsorption phenomena.

  • Analysis of variance showed that the model was profoundly significant, and temperature and concentration of TCE inhibitor were found to be the two most significant factors with a contribution of 47.89% and 46.85%, affecting the corrosion of Al, thereby increasing the inhibition efficiency.

  • High values of R2 (0.9998) and adjusted-R2 (0.9996) indicated a good correlation between the predicted and experimental values.

  • In boosting the inhibition efficiency, the ideal working conditions were acquired at a temperature of 30 ℃, inhibitor concentration of 500 ppm, and acid concentration of H3PO4 of 0.5 M.

In this way, it is evident that RSM not just gives a critical understanding of the interaction between the variables, yet also helps to identify the optimum parameter setting for the same.