Introduction

It is well known that HCl solution is considered one of the mineral acids utilized in many industrial procedures, which include pickling, acid cleaning and descaling, petrochemical manufacturing, oil, and natural gas extraction, especially for old wells, and finally, geothermal water extraction1,2,3,4,5,6,7 Unfortunately, when we use HCl solution in these applications, carbon steel alloys can be corroded, which is a tremendous waste of money and resources8,9,10. For this reason, special attention must be applied to prevent steel degradation to reduce the amount of harmful metal ions produced from steel degradation entering the ecosystem11,12. Corrosion avoidance methods prefer using chemical compounds with an environmentally low impact.

One of the most practical ways to prevent metals from corroding is to utilize Gemini cationic surfactant molecules as corrosion inhibitors, gaining popularity13,14,15,16,17,18,19,20,21,22. According to existing research, organic inhibitors work by adsorption and form a protective shield around the metal23,24.

Organic molecules having multiple bonds that are considered adsorption centers or adsorption centers such as phosphorus, sulfur, nitrogen, and oxygen heteroatoms with high electron density, are effective corrosion inhibitors25,26,27,28,29,30,31,32. Doubling the hydrophilic head groups and hydrophobic tails increased the efficiency of surfactants in inhibiting steel breakdown in an acidic media33,34.

The efficiency of inhibition of Gemini cationic surfactants for carbon steel in an acidic medium is related to surfactant concentrations, media temperature, immersion time, the structure of surfactants, and the synergetic effect of additional salts35,36,37,38,39,40,41,42,43. The derivatives of thiazole have been studied before as corrosion inhibitors and confirmed higher inhibition efficiencies44,45,46,47,48.

This study explores the recently synthesized Gemini cationic surfactants (TAC 6 and TAC 18) as non-toxic corrosion inhibitors prepared in our laboratory49. These findings offer a cost-effective, eco-friendly solution for prolonging petroleum infrastructure lifespan, reducing maintenance costs, improving pipeline safety, acidizing treatments, and well-stimulation processes7,50,51. Unlike conventional research that examines surfactant inhibitors alone, this work investigates their synergistic effect with inorganic salts (CoCl₂, MnCl₂, CuCl₂).

This paper focuses on the inhibition performance of a TAC series with diverse hydrocarbon chain lengths (n = 6 and 18) by ML, PP, and EIS measurements. Surface examination tools (SEM, EDX, FTIR) are used and confirmed by computational quantum calculations (DFT).

Experimental

Working electrode Preparation

The carbon steel specimen used is composed of C (0.14%), Cr (0.10%), Ni (0.10%), Si (0.024%), Mn (0.05%), P (0.05%), and Fe (balance). The copper rod responsible for electrical conductivity was fixed to a carbon steel sheet with an area of 1 cm2 which was exposed to a corrosive medium. The pieces were inserted into a Teflon cover and fitted with epoxy resin. The carbon steel surface was polished with different grades (800-1000-1200) of emery paper to measure the required smoothness. The electrode surface was washed and degreased with bi-distilled water and acetone, respectively, and then dried with filter paper.

Chemicals

The studied substances were obtained from Sigma-Aldrich, a global firm with headquarters in the United States, and were of a high purity grade, meaning further purification was not necessary: hydrochloric acid (37%), and acetone (99.9%). Chloride salts of Co, Mn, and Cu with a purity of 98% were used.

Test solutions

The corrosion medium was carried out in HCl deprived of and using diverse concentrations of TAC 6 and TAC 18 Gemini cationic surfactants; the molecular structure is shown in Structure 1. Terephthalaldehyde was refluxed with thiazol-2-amine in ethanol for 12 h in the presence of p-toluene sulfonic acid as a dehydrating agent. The intermediate was further refluxed with different alkyl halides (C₆H₁₃ and C₁₈H₃₇) in acetone. The resulting compounds were purified by filtration, recrystallization, washing, and vacuum drying at 60 °C. The final products were TAC 6 and TAC 18, corresponding to hexyl and octadecyl thiazolium bromide derivatives49. The corrosive solutions were prepared by fresh diluting a high analytical grade of concentrated hydrochloric acid with doubly distilled water. The concentration of inhibitors used in this study varied from 5 to 50 ppm. Salt solutions are prepared at several concentrations from 10 to 90 ppm. The temperature was controlled thermostatically at different temperatures ranging from 30 °C to 50 ℃.

Structure 1
structure 1

The molecular structure of TAC Gemini cationicsurfactants.

Mass loss quantification

Carbon steel specimens with dimensions of \(\:2.0\times\:2.0\times\:0.2\) cm were polished with varied emery papers with different grades of 800, 1000, and 1200, washed, degreased, and dried with filter paper. The prepared steel specimens were then accurately weighed by using a USS-DBS10 Digital Analytical Balance Scales, readability 0.1 mg, U.S. Solid, United States. The specimens were submerged in hydrochloric acid without and with diverse concentrations of Gemini cationic surfactants for 48 h. Once every eight hours, samples were detached from the corrosive solution, scrubbed, dried, and reweighed three times, and then the average weight was calculated.

Electrochemical techniques

Electrochemical measurements were done by using a high-performance potentiostat/galvanostat /ZRA, Reference 3000 with Echem Analyst 2 software, Gamry Instruments, United States. A cell with three electrodes was used. Calomel and platinum electrodes are used as reference and auxiliary electrodes, respectively. The working electrode was submerged in a corrosive solution for 30 min to ensure the establishment of a steady-state potential (\(\:{E}_{ocp}\)), then other measurements were done. The EIS technique was performed around the frequency range of 100–0.0002 kHz with an amplitude of 10 mV at an (\(\:{E}_{ocp}\)). By fitting the experimental data extracted from Echem Analyst software according to a different equivalent circuit, the impedance can be calculated. The potentiodynamic polarization test was indicated by sweeping the potential range of \(\:\pm\:250\) mV from \(\:{E}_{ocp}\), starting from the cathodic potential to the anode site with a sweep rate of 1 mV s−1.

Surface examination

The carbon steel surface was examined without and with 50 ppm of TAC 6 Gemini cationic surfactant at two different temperatures. SEM was used to scan the surface morphology after 24 h of immersion. The elements on the surface carbon steel were indicated by energy dispersive X-ray (EDX) on the same specimens used in SEM examination. Fourier transform infrared (FT-IR) spectroscopy is used to confirm the functional groups adsorbed from TAC 6 surfactant on a carbon steel surface after 8 h of immersion.

Computational DFT technique

Quantum simulations were carried out via Gaussian software version 9.0 to examine the impact of molecular structure on inhibition efficiency. Complete geometry optimization was used throughout all calculations, and the hybrid B3LYP functional level with a higher basis set, designated by 6–31 G, was used (d, p). Gauss View was used to evaluate the energy of the highest occupied molecular orbital (EHOMO), the energy of the lowest unoccupied molecular orbital (ELUMO), and the energy gap (ΔE).

The experimental routes of all techniques used in this examination are shown in Fig. 1.

Fig. 1
figure 1

A schematic representation of the experimental techniques used to evaluate the corrosion inhibition performance of Gemini cationic surfactants for carbon steel in 1 M HCl, both in the absence and presence of inorganic salts. The methods include weight loss measurements, electrochemical techniques (open circuit potential, potentiodynamic polarization, electrochemical impedance spectroscopy), surface analysis (SEM, EDX, FTIR), and computational studies (DFT).

Results and discussion

Mass loss quantification

Effect of immersion time

The data collected from mass loss measurements were used to calculate the corrosion rate of carbon steel specimens in a 1 M hydrochloric acid solution in the absence and presence of different concentrations of TAC 6 and TAC 18. The efficiencies of inhibitions were calculated according to Eq. 1.

$$\:\text{I}\text{E}\:\text{\%}\:=\left[1-\frac{{\text{W}}_{\text{i}\text{n}\text{h}.}}{{\text{W}}_{\text{b}}}\right]\times\:100$$
(1)

where \(\:\frac{{\text{W}}_{\text{i}\text{n}\text{h}.}}{{\text{W}}_{\text{b}}}\) is the ratio between the mass loss in the inhibited solution and the blank solution. Table 1 includes data indicated from mass loss, corrosion rate (\(\:{K}_{corr}\)), surface coverage (θ), and inhibition efficiencies (IE%). The corrosion rate decreases with the increase of the inhibitor concentration, consequently, the inhibition efficiency of the inhibitors increases, indicating that the increase in the inhibitor concentration indicates an increase in the capacity for adsorption52. The inhibition efficiency of TAC 18 is higher than TAC 6. The hydrocarbon chains play a vital role in hydrophobic interaction and shielding on the steel surface to create a protective layer on the steel surface, making it difficult for corrosive chloride ions and water molecules to adsorb on the steel surface, thereby inhibiting steel dissolution53. The mass loss of carbon steel specimens through the immersion times is shown in Fig. 2.

Table 1 Values of mass loss, corrosion rate (\(\:{K}_{corr}\)), surface coverage (θ), and Inhibition efficiencies (ɳ%) for both inhibitors at 25 °C after 32 h.
Fig. 2
figure 2

Mass loss of carbon steel in 1 M HCl over immersion time with various concentrations of TAC 6 inhibitor at 303 K.

Effect of temperature

The effect of temperature on the inhibition efficiencies of TAC 6 and TAC 18 on specimens in a 1 M HCl solution was studied at various temperatures in the range between 30⁰C and 50⁰C. The correlation between temperature and inhibition efficiencies was detected in Fig. 3. The inhibition efficiencies decreased with the increase in temperature54. At low temperatures, the heteroatoms nitrogen and sulfur, as well as the lone pairs of electrons in a benzene ring, create an electrostatic attraction to the steel surface, forming a film on the surface55. As the temperature increases, the chloride ions from the HCl solution contest to adsorb on the surface, decreasing the surface coverage of inhibitors and decreasing inhibition efficiency56.

Fig. 3
figure 3

The inhibition efficiencies of inhibitors TAC 6 and TAC 18 with various concentrations (5–50 ppm) under the influence of different temperatures 303–323 K.

Kinetic and thermodynamic parameters

The activation parameters of the corrosion reaction between carbon steel specimens and 1 M HCl solution were calculated from the Arrhenius relationship (Eq. 2)57 and transition state (Eq. 3)58 as follows:

$$\:log{K}_{corr}=\frac{{-E}_{a}^{*}}{2.303\:RT}+log\:A$$
(2)
$$\:log\frac{{K}_{corr}}{T}=log\frac{R}{N.h}+\frac{{\varDelta\:S}^{*}}{2.303\:R}-\frac{{\varDelta\:H}^{*}}{2.303\:RT}$$
(3)

\(\:{E}_{a}^{*}\) is the activation energy, A is the Arrhenius constant, R is the universal gas constant, T is the absolute temperature, h is Planck’s constant, N is the Avogadro’s number, \(\:{\varDelta\:S}^{*}\) is the entropy of activation and \(\:{\varDelta\:H}^{*}\)is the enthalpy of activation. By determining the slope of the relationship between \(\:log{(K}_{corr})\) and \(\:(1/T)\), activation energy (\(\:{E}_{a}^{*}\)) can be calculated as shown in Fig. 4. By plotting the relation between \(\:\text{l}\text{o}\text{g}{(K}_{corr}/T)\) and \(\:(1/T)\), the enthalpy of activation (\(\:{\varDelta\:H}^{*}\)) can be calculated from their slope, and the entropy of activation (\(\:{\varDelta\:S}^{*}\)) can be detected from the intercepts as shown in Fig. 5. The activation parameters are summarized in Table 2.

The higher value of activation energy (\(\:{E}_{a}^{*}\)) in the case of the presence of inhibitors is indicated by confirming the adsorption on the steel surface and decreasing the corrosion rate. The positive magnitude of enthalpy (\(\:{\varDelta\:H}^{*}\)) describes the corrosion process as an endothermic reaction. The high enthalpy values in the presence of different concentrations of TAC 6 and TAC 18 confirm the need for more energy to overcome the activation energy of the corrosion reaction. The fluctuations of entropy values indicate that the orderliness decreases during transitioning from reactant to activated complex, while at high concentrations, it tends to order in association more than dissociation59,60.

Fig. 4
figure 4

The Arrhenius relationship of carbon steel in 1 M HCl in the absence and presence of different concentrations (5 to 50 ppm) TAC 6.

Fig. 5
figure 5

\(\:log{(K}_{corr}/T)\:\) was plotted against \(\:1000/T\) of C-steel in 1 M HCl in the absence and presence of different concentration (5 to 50 ppm) TAC 6.

Table 2 Activation parameters of carbon steel corrosion in 1 M HCl without and with different concentrations at different temperatures.

Adsorption isotherms

Adsorption isotherms describe the adsorption of the TAC 6 onto the surface of carbon steel during the corrosion inhibition process, which provides insights into the nature and strength of interactions between the inhibitor molecules and the steel surface. Various adsorption isotherms were employed to indicate the best-fitting isotherm that explains the best mechanism of adsorption of TAC on the surface61,62. The relationship between concentrations of inhibitors and surface coverage on steel surfaces at different temperatures was plotted to determine the best straight-line fitting for the examined inhibitors. The adsorption isotherm relations are summarized in Table 3. The best fitting obeys the Langmuir isotherm (R2 = 1) as shown in Fig. 6 and given by Eq. 4.

$$\:\frac{{C}_{\text{i}\text{n}\text{h}}}{\theta\:}=\frac{1}{{K}_{\text{a}\text{d}\text{s}}}+{C}_{\text{i}\text{n}\text{h}}$$
(4)

θ is the surface coverage of the steel surface, \(\:{C}_{\text{i}\text{n}\text{h}}\) is the concentration of surfactants (mol L− 1), and \(\:{K}_{\text{a}\text{d}\text{s}}\) is the adsorption constant M− 1 which is used to calculate Gibbs free energy of adsorption (\(\:{\varDelta\:G}_{ads}^{^\circ\:}\)) according to Eq. 5

$$\:{K}_{ads}=\frac{1}{55.5}\:\text{e}\text{x}\text{p}\:\left[\frac{{-\varDelta\:G}_{ads}^{^\circ\:}}{RT}\right]$$
(5)

The value 55.5 is considered the water concentration in an acid solution63. The negativity of Gibbs’s free energy of adsorption (\(\:{\varDelta\:G}_{ads}^{^\circ\:}\)) confirms the spontaneous formation of an adsorbed layer of both examined surfactants on the steel surface64. The value of Gibbs free energy of adsorption is considered an indication of the adsorption kind formed on the surface, which up to -20 kJ/mol indicates the physical adsorption, while higher than − 40 kJ/mol indicates the formation of chemical adsorption65. The calculated Gibbs free energy of adsorption (\(\:{\varDelta\:G}_{ads}^{^\circ\:}\)) confirms the mixed physical and chemical adsorption of both examined inhibitors, TAC 6 and TAC 18 on the steel surface, as summarized in Table 366.

Table 3 The square correlation values of different adsorption isotherms at different temperatures.
Fig. 6
figure 6

Langmuir adsorption isotherm model for carbon steel surface with TAC 6 inhibitor at different temperatures.

The variation in the thermodynamic parameters, including enthalpy (\(\:{\varDelta\:\varvec{H}}_{\varvec{a}\varvec{d}\varvec{s}}^{^\circ\:}\)) and entropy (\(\:{\varDelta\:\varvec{S}}_{\varvec{a}\varvec{d}\varvec{s}}^{^\circ\:}\)) for adsorption of both examined inhibitors on the steel surface was calculated from integrated Van’t Hoff Eq. 667 or Gibbs-Helmholtz Eq. 768.

$$\:{\varDelta\:G}_{ads}^{^\circ\:}={\varDelta\:H}_{ads}^{^\circ\:}-T{\varDelta\:S}_{ads}^{^\circ\:}$$
(6)
$$\:\text{l}\text{o}\text{g}{K}_{ads}=\frac{{-\varDelta\:H}_{ads}^{^\circ\:}}{2.303\:RT}+constant$$
(7)

By plotting the relationship between \(\:\text{l}\text{o}\text{g}{K}_{ads}\) and \(\:1/T\), Enthalpy (\(\:{\varDelta\:\varvec{H}}_{\varvec{a}\varvec{d}\varvec{s}}^{^\circ\:}\)) can be calculated as shown in Fig. 7. The negative values of enthalpy of adsorption indicate that the reaction is exothermic69. The enthalpy of adsorption is indicated to be in the range of 48.5–58.4 which confirms the formation of both physical and chemical adsorptions70. The values of entropy (\(\:{\varDelta\:\varvec{S}}_{\varvec{a}\varvec{d}\varvec{s}}^{^\circ\:}\)) are decreased up to 313 K, indicating the desorption of water molecules from the surface and exchange with inhibitor molecules. The entropy values confirm the formation of physical and chemical adsorption on steel surfaces71. The values of adsorption constant \(\:{K}_{ads}\), Gibbs free energy of adsorption \(\:\varDelta\:{G}_{ads}^{^\circ\:}\), enthalpy of adsorption \(\:\varDelta\:{H}_{ads}^{^\circ\:}\) and entropy of adsorption \(\:\varDelta\:{S}_{ads}^{^\circ\:}\) of both inhibitors TAC 6 and TAC 18 were summarized in Table 4.

Fig. 7
figure 7

log \(\:{K}_{ads}\) was plotted against 1000/T (K) for both inhibitors

Table 4 Values of thermodynamic adsorption parameters for the inhibitors on steel in 1 M HCl from the mass loss technique at different temperatures.

Electrochemical techniques

Open circuit potential

Open Circuit Potential (EOCP) measurements provide fundamental insights into the electrochemical processes occurring at the steel-electrolyte interface, serving as a preliminary diagnostic tool for evaluating corrosion behavior and inhibition efficiency for both TAC 6 and TAC 18 inhibitors. Figure 8 illustrates the time-dependent evolution of EOCP for a steel electrode immersed in an aerated 1 M HCl solution, both in the absence and presence of TAC 6 cationic Gemini surfactant at 303 K. In the blank solution, the EOCP stabilizes at a relatively less negative potential (− 0.360 V), which can be attributed to the dissolution of steel in the acidic medium and the subsequent deposition of corrosion products on the metal surface72. However, upon adding the TAC 6 inhibitor, the EOCP shifts toward more negative values (from − 0.390 to − 0.450 V), indicating significant adsorption of the TAC 6 inhibitor on the anodic sites of the steel/solution interface73. This adsorption hinders metal dissolution, altering the electrochemical dynamics of corrosion. Notably, as the concentration of the extract increases, the EOCP exhibits a progressive shift toward cathodic values, suggesting a dominant cathodic inhibition mechanism74. Based on this behavior, TAC 6 and TAC 18 inhibitors can be classified as a cathodic-type corrosion inhibitor75.

Fig. 8
figure 8

OCP vs. time for TAC cationic Gemini surfactant in 1 M HCl solution at different concentration.

Polarization test

Tafel polarization curves were used to visualize the corrosion behavior in the steel specimens in a 1 M HCl without and with various concentrations of TAC 6 and TAC 18 as shown in Fig. 9. The parameters of Tafel polarization, including anodic slope (\(\:{\beta\:}_{a}\)), cathodic slope (\(\:{\beta\:}_{c}\)), and corrosion current densities (\(\:{I}_{corr}\)) were detected by extrapolating the curves to the corrosion potential (\(\:{E}_{corr}\)). The inhibition efficiencies of both inhibitors and other parameters are presented in Table 5. It is noticed that the inhibitors influenced the cathodic reaction more than the anodic reaction76. The inhibition efficiencies (\(\:\varvec{I}\varvec{E}\:\varvec{\%}\)) and surface coverage (\(\:\varvec{\theta\:}\)) of TAC 6 and TAC 18 are calculated according to Eq. 8.

\(\:{\varvec{I}}_{\varvec{i}\varvec{n}\varvec{h}.}\) and \(\:{\varvec{I}}_{\varvec{b}}\) are corrosion current densities of inhibited and uninhibited solutions, respectively

$$\:IE\:\%=\:\theta\:\times\:100=\left[1-\frac{{I}_{inh.}}{{I}_{b}}\right]\times\:100$$
(8)

The displacement of corrosion potential (\(\:{E}_{corr}\)) can be used to detect the type of inhibitor action. The corrosion potential is larger than 85 mV on more positive or negative sides, indicating that the inhibitors can be anodic or cathodic77,78. The displacement of corrosion potential in the presence of both examined inhibitors is indicated to be higher than 85 mV in the cathodic direction79,80. This indication revealed that both examined inhibitors are categorized as cathodic inhibitors, affecting the evaluation of hydrogen gas in the cathodic reaction81,82. The displacement in the cathodic slope shifts (\(\:{\beta\:}_{c}\)) is indicated as summarized in Table 5.

Table 5 Potentiodynamic polarization parameters for TAC inhibitors in 1 M HCl solution at 303 K.
Fig. 9
figure 9

Potentiodynamic polarization curves of carbon steel in 1 M HCl without and with different concentrations of TAC 6 inhibitor.

Electrochemical impedance spectroscopy (EIS)

Figure 10 displays the Nyquist plots of carbon steel immersed in a 1 M HCl solution both before and after the addition of various doses of the investigated inhibitors at 303 K. Due to variations in frequency dispersion or the heterogeneity of the electrochemical system, the impedance in some graphs does not form complete semicircles83. The capacitive loop diameter changes with the concentration of the inhibitors; that is, as the concentration increases, the diameter increases84. The adsorption of inhibitor molecules on the surface of carbon steel indicates that inhibitor molecules will help establish a stable protective layer85,86,87.

By analogy, EIS spectra might be understood in terms of electrical impedance. The electrode/electrolyte interface involves distinct processes that may be represented using an analogous electrical circuit, as seen in Fig. 11. This circuit features a constant phase element of double layers (CPE), charge transfer resistance (Rct), solution resistance (Rs), a constant phase element of pores resulting from a defect into the adsorbed layer (CPo) and resistance of pores-filled with a conductive corrosive solution (RPo). Since the double layer at the interface does not function as a perfect capacitor, the constant phase element is displayed in the circuit in place of the double-layer capacitor to provide a more exact fit88,89. Table 6 lists the electrochemical parameters that were ascertained from the impedance plots.

The findings shown in Table 6 demonstrate that when both inhibitors are present, the resistance of charge transfer (Rct) values are greater than when the blank solution is used90,91. The creation of an insulating protective film at the interface between the solution and carbon steel is attributed to the increase in polarization resistance (Rct) values. As the concentration of each inhibitor rises, the value of the constant phase element (CPE) falls, suggesting that there is adsorption on the surface of the carbon steel92. Table 6 presents the values of inhibition efficiencies (IE %) and surface coverage (\(\:\varvec{\theta\:}\)), which were calculated using Eq. 9. Where \(R_{{ct}}^{^\circ }\) and \(R_{ct}\) are the resistance of charge transfer of uninhibited and inhibited solutions.

$$IE~\% = ~\theta \times 100 = \left[ {1 - \frac{{R_{{ct}}^{^\circ } }}{{R_{{ct}} }}} \right] \times 100$$
(9)

Through time water molecules and other chloride ions from the aggressive medium can penetrate the film that was adsorbed on a steel surface and formed pores. These pores are filled with the conductive aggressive solution that can produce resistance equal to (Rpo) which indicates to slight increase. The values of Rct > Rpo for both inhibitors indicate a lesser amount of water molecules substitute inhibitor molecules on the steel surface93.

Figure 12 displays the carbon steel Bode impedance curves in 1 M HCl both without and with inhibitors at 303 K. The equivalent circuit that was utilized to modify the impedance spectra is established by the appearance of a single peak in the Bode diagrams for both inhibitors and the blank solution94. This demonstrates an improvement in the inhibition performance due to the thiazole inhibitors’ measured adsorption on the surface of carbon steel95. It is not surprising that the electrochemical experiments and the mass loss approach disagree. It may be understood that in contrast to electrochemical measures, which are reliant on the operating potential, mass loss measurements estimate the corrosion rate irrespective of the electrode potential96,97.

Table 6 EIS parameter values of C-steel corrosion in 1 M HCl without and with different concentrations at 303 K.
Fig. 10
figure 10

Nyquist plot for carbon steel in 1 M HCl without and with different concentrations of TAC 6 inhibitor.

Fig. 11
figure 11

Double CPE equivalent circuit compatible with experimental impedance data.

Fig. 12
figure 12

Bode plot for carbon steel in 1 M HCl without and with different concentrations of TAC 6 inhibitor.

Surface examination

SEM analysis

The surface morphology of carbon steel specimens was investigated using scanning electron micrographs before and after dipping in HCl for 24 h without and with TAC 6 at two different temperatures (303 and 323 K). Figure 13 depicts the SEM images. The carbon steel surface that was not exposed to a 1 M HCl had a smoother surface than the surface that had been submerged in a 1 M HCl solution. The 1 M acid solution aggressively attacked the exposed surface at 303 K and 323 K, causing significant damage to the steel surface and a multitude of black blotches to cover it. Also, the damage increases as the temperature rises. In contrast, at 303 K and 323 K with the addition of TAC 6 to 1 M HCl, a smoother surface is observed; this is because the inhibitor in the solution forms a shielding film on the surface, slowing down the rate of corrosion. However, carbon steel’s smoothness seemed to diminish as the temperature rose98.

Fig. 13
figure 13

SEM analysis of carbon steel surface before and after immersion in HCl solution without and with the addition of 50 ppm of TAC 6 inhibitor.

EDX analysis

The carbon steel specimen surface was examined utilizing energy dispersive X-rays before and after sinking in HCl for 24 h without and with TAC 6 at 303 and 323 K. Figure 14 depicts the EDX analysis. As summarized in Table 7. The weight% of iron in steel specimens decreased more in blank solution at 323 K compared to 303 K. TAC 6 inhibitor was indicated to be adsorbed on the surface with the increase of the weight% of nitrogen, carbon, and sulfur present in the hydrophilic functional group in the Gemini cationic surfactant. The chloride ions indicated to appear again on the steel surface as the temperature increases to 323 K, which can be related to a decrease in adsorption of TAC 6 on the surface. The weight% of nitrogen and oxygen disappears on the steel surface while the iron percentage increases, which refers to the appearance of an uncovered steel surface99.

Fig. 14
figure 14

EDX analysis of carbon steel surface before and after immersion in HCl solution without and with the addition of 50 ppm of TAC 6 inhibitor.

Table 7 Weight% of different elements indicated on the surface of steel.

FTIR analysis

FT-IR spectra accurately depict the efficient groups of TAC 6 adsorbed on the steel surface. The FTIR findings may be interpreted as shown in Table 8; Fig. 15, which show the layer that develops on carbon steel specimens and the pure solid inhibitor after the samples are soaked in 1 M HCl solution for six hours at two temperatures (303 and 323 K) with 50 ppm of TAC 6 inhibitor present. Following immersion, the spectra of the surface in the presence of the TAC 6 inhibitor are compared to those of the solid inhibitor.

All bands support the theory of forming a monolayer of TAC 6 Gemini cationic surfactant on the steel surface. The band N+-CH = indicates the hydrophilic interaction between head groups and steel surfaces. Other compositions of the thiazole ring confirmed the hydrophilic interaction, including -N-CH=, -CH = N-, and = C-CH of the benzene ring or thiazole ring and steel surface. The indication of the –CH2 band confirmed the interaction between an aliphatic chain of TAC 6 surfactant. This indicates the hydrophobic attraction between the inhibitors’ hydrocarbon chains and the steel surface’s increased surface coverage. The transmittance of all adsorbed bands was indicated to decrease with increasing temperature. This decrease supports the decrease in adsorption of TAC 6 Gemini cationic surfactants on the steel surface at 323 K than at 303 K100.

Fig. 15
figure 15

FTIR spectra for TAC 6 inhibitor at 303 K and 323 K.

Table 8 FTIR analysis of adsorbed layer of TAC 6 inhibitor on a steel surface at different temperatures 303 and 323 K.

Quantum chemical calculation

The inhibitors under investigation underwent density-functional theory (DFT) quantum chemical analysis to assess each inhibitor’s effectiveness101. Indeed, an inhibitor’s chemical structure determines how effective it is. The inhibitor compounds’ adsorption sites, where they interact with Fe atoms, are predicted by frontier orbital theory. According to reports, the most effective corrosion inhibitors give electrons to vacant orbitals in steel. The adsorption step in the chemical reaction is driven by the contact of the inhibitor’s HOMO and LUMO with the steel surface102. Therefore, to understand the inhibitory mechanism, it is crucial to evaluate the existence of HOMO and LUMO orbitals of the compounds under investigation. ELUMO represents a molecule’s ability to accept an electron, whereas EHOMO represents a molecule’s ability to donate electrons.

Figure 16 depicts the inhibitors’ geometrical structures, which include multiple HOMO and LUMO locations. Lower ΔE values result in higher inhibition efficiency due to the low energy required to separate electrons from the highest occupied molecular orbital (HOMO). Table 9 demonstrates that low values of ΔE were found for both inhibitors, increasing in the following order: TAC 18 > TAC 6. The quantum chemical calculations were consistent with the experimental results in this configuration, which may be attributed to inhibitor adsorption occurring through a mix of physical and chemical adsorption.

The geometries of the inhibitors TAC 6 and TAC 18 with different HOMO and LUMO values are shown in Fig. 16. This study has demonstrated that better inhibition efficiencies are associated with lower values of ΔE since this indicates a reduced energy need to remove an electron from the highest occupied molecular orbital (HOMO)103. Table 9 demonstrates that the three inhibitors had modest values of ΔE, which rose in the following order: TAC 18 > TAC 6. The experimental results in this configuration matched the results of quantum chemical simulations; this confirms that the inhibitors are adsorbed by a mix of chemical and physical adsorption processes104. This is because aromatic rings and lone pairs of heteroatoms including sulfur and nitrogen, have greater electron densities.

Furthermore, softness (σ) is a vital factor that can reveal the adsorption capability of the molecules. A higher softness value and a lower hardness value are associated with good contact with the metal and excellent inhibitory effectiveness105.

The softness values for both inhibitors indicated the good affinity of the inhibitor molecules for adsorption, which is consistent with the investigational methods. The positive values of energy gaps indicate that the molecules possess a stronger tendency to give electrons to the vacant orbitals in steel106. The electrophilic and nucleophilic portions of the molecule are defined by the ESP, which is produced by electron density on the surface. According to distinct colors, the ESP of the molecules TAC inhibitors is determined, as shown in Fig. 16. The blue zone symbolizes a partial positive charge and a strong attraction; the light blue region displays electron deficiency, the yellow region specifies that this area is slightly electron-rich, and the green region is neutral. The red color characterizes the negative potential and designates a strong repulsion. The two thiazole rings have a large concentration of negative charge, making them prime targets for nucleophilic assault. This demonstrates that TAC 6 and TAC18 are primarily resistant to electrophilic attack and have a high ability to adhere to the surface. The calculated quantum parameters are shown in Table 9.

The concept of atomic charge is a useful tool for understanding molecular properties. One of the most widely used computational methods for determining atomic charges is the Mulliken population analysis, which distributes the total electronic charge across the atoms within a molecule107. The Mulliken charge distribution for the synthesized compounds is shown in Table 10. Notably, heteroatoms such as oxygen (O), nitrogen (N), and sulfur (S) exhibit the highest charge densities. These regions of elevated electron density are typically the primary sites for electrophilic attack, making O, N, and S the most reactive centers in these molecules. Based on this analysis, it can be inferred that the compounds, in addition to existing in a cationic form that allows electrostatic interaction with the carbon steel surface, may also engage with the carbon steel surface through multiple active sites. This interaction facilitates the formation of a protective layer on the mild steel, effectively slowing down further corrosion in HCl solution.

Table 9 Calculated parameters for both inhibitors obtained using the DFT method at the B3LYP/6–31G(d, p) basis set.
Fig. 16
figure 16

Optimized structure HOMO, LUMO, and ESP of ligand TAC series inhibitors given by the B3LYP/6–31G (d, p) method.

Table 10 Mulliken total atomic charges distribution for TAC 6 and TAC 18.

Synergistic effect of salts using electrochemical methods

Potentiodynamic polarization

Figures 17, 18 and 19 illustrate the polarization curves of steel in HCl in the presence of TAC 6 and TAC 18, as well as the addition of various amounts of salts CoCl2, MnCl2, and CuCl2. The polarization parameters were estimated. Table 11 summarizes the corrosion potential (Ecorr), current density (Icorr), and cathodic and anodic Tafel slopes (βc, βa).

When seen in Figs. 17, 18 and 19, both anodic and cathodic curves change toward falling current density (Icorr) when the addition of different salts increases108, and the pattern is more noticeable in the following arrangement: CuCl2 > MnCl2 > CoCl2 109,110. This could be related to how all of the inhibitors adsorb synergistically when salts are present on carbon steel surfaces111. Thorough research reveals that, as shown in Table 11, the addition of various salts adds to an increase in the inhibitory efficacy of both inhibitors under consideration.

The results imply that different salts change the mechanism of inhibitors’ works from affecting the cathodic reaction to affecting both anodic and cathodic slopes (βc) and (βa). Moreover, the moderate change in the corrosion potential (Ecorr) indicated to be mixed-type inhibitors112. The synergistic action of salts showed a reduction in steel dissolving and hydrogen evaluation corrosion rate113. The salts impacted the rise in shield layers adsorbed on the surface, indicating an increase in surface coverage and inhibition efficiency114. Salts can influence Gemini cationic surfactant adsorption on the steel by one of two mechanisms: cooperative adsorption or competitive adsorption115. According to the synergistic effect, cooperative adsorption is recommended to raise the inhibitions of all surfactants. Inhibitors are adsorbed on the layer that the chloride ions produce when chloride anions in salts first chemisorb on the steel surface. In competitive adsorption inhibitors, and salts engage in an antagonistic competition for adsorption on steel surfaces, which lowers the inhibitors’ efficiency. The cation components of the Gemini cationic surfactants are adsorbed on a layer of the chloride ions that forms when the chloride ions from various salts, such as CoCl2, MnCl2, and CuCl2, are adsorbed on the surface116. The synergistic inhibitory effect is caused by the significant adsorption of bromide ions from inhibitors and chloride ions of various salts, such as CoCl2, MnCl2, and CuCl2. These ions are on the surface of carbon steel. Columbic attraction then adsorbs the cationic portion of the Gemini cationic surfactant onto the carbon steel surface. The whole adsorption of inhibitor molecules, bromide ions, and chloride ions causes the surface covering of carbon steel to rise, which in turn raises the inhibition efficiencies117.

Fig. 17
figure 17

Potentiodynamic polarization curves (\(\:\text{log}I\:\) plotted against \(\:E\:vs.\:SCE\)) Of C-steel in 1 M HCl for TAC 6 surfactant at 50 ppm with the addition of different concentrations of CoCl2.

Fig. 18
figure 18

Potentiodynamic polarization curves (\(\:\text{log}I\:\) plotted against \(\:E\:vs.\:SCE\)) Of C-steel in 1 M HCl for TAC 6 surfactant at 50 ppm with the addition of different concentrations of CuCl2.

Fig. 19
figure 19

Potentiodynamic polarization curves (\(\:\text{log}I\:\) plotted against \(\:E\:vs.\:SCE\)) of C-steel in 1 M HCl for TAC 6 surfactant at 50 ppm with the addition of different concentrations of MnCl2.

Table 11 Data from PP test for corrosion of C-Steel in 1 M HCl at 50 Ppm of the inhibitors in the presence of different concentrations of all salt at 303 K.

Electrochemical impedance spectroscopy

The impedance experiments were achieved to explain the synergic interactions between the inhibitor and different concentrations of salts, including CoCl2, MnCl2, and CuCl2 as summarized in Table 12. The Nyquist plots for steel in the presence of TAC 6 and TAC 18 inhibitors in combination with different salts CoCl2, MnCl2, and CuCl2 are shown in Figs. 20, 21 and 22. The increase of the salt concentrations in combination with the examined inhibitors leads to an increase in the diameter of the semicircle, indicating the inhibition of the corrosion reaction118. The impedance data were fitted to the equivalent circuit model mentioned in Fig. 23, which proved more accurate119. The polarization resistance was indicated to increase while constant phase electrode CPE was diminished with a rise of the concentrations of the salts. The decrease in CPE can be related to the decrease in the dielectric constant and increasing the double-layer thickness with the adsorption of both salts and inhibitors on the surface of carbon steel120. As summarized in Table 12. CPE decreases as a result of halide ions, including chloride from salts and bromide from inhibitors, replacing water molecules adsorbed on steel surfaces. The efficiencies of inhibition are indicated to be as follows: CuCl2 < MnCl2 < CoCl2121. This confirms the inhibition increases with increasing the size of ions that lead to more surface coverages of salts on steel surfaces122. The bode plots for both inhibitors in the presence of different salts are shown in Figs. 24, 25 and 26.

The inhibition efficiency trend CuCl₂ > MnCl₂ > CoCl₂ observed in the study deviates from the expected, revealing complex electrochemical interactions between metal cations, surfactant inhibitors, and the steel surface. As anticipated, Cu²⁺ exhibited the highest inhibition efficiency due to its strong adsorption affinity, smaller ionic radius (0.73 Å)123, and ability to form a stable CuCl₂ protective layer, leading to increased charge transfer resistance (Rct) and reduced corrosion current (Icorr)124. However, Mn²⁺ unexpectedly outperformed Co²⁺, likely due to stronger electrostatic interactions with chloride (Cl⁻) and bromide (Br⁻) ions from the Gemini surfactants (TAC 6 and TAC 18), which enhanced inhibitor adsorption and surface coverage. Mn²⁺ may have facilitated ionic bridging, allowing for better cooperative adsorption with the inhibitors, resulting in a thicker and more protective layer on the steel surface125. In contrast, Co²⁺, despite having a slightly smaller ionic radius than Mn²⁺ (0.79 Å vs. 0.83 Å)126, may not have formed as stable surface complexes or contributed as effectively to surfactant adsorption, leading to lower inhibition efficiency.

Cu²⁺ has a higher charge density than Mn²⁺ and Co²⁺, allowing it to interact more effectively with electron-rich functional groups in the inhibitors (e.g., nitrogen and sulfur atoms in the thiazole ring)127. This leads to stronger complexation, enhancing the stability of the inhibitor-metal interaction128. Additionally, Mn²⁺ unexpectedly exhibited higher Rct and lower Icorr than Co²⁺, further suggesting its superior adsorption behavior. The overall trend indicates that while Cu²⁺ remains the most effective due to its strong surface affinity and protective complex formation, Mn²⁺ surpassed Co²⁺ due to its enhanced synergistic interactions with the inhibitor molecules and the steel surface, highlighting the importance of electrochemical adsorption mechanisms beyond simple charge density and ionic size considerations.

Fig. 20
figure 20

Nyquist plot of carbon steel in 1 M HCl with 50 ppm of TAC 6 inhibitor in the presence of different concentrations of CoCl2 salt (10–90 ppm).

Fig. 21
figure 21

Nyquist plot of carbon steel in 1 M HCl with 50 ppm of TAC 6 inhibitor in the presence of different concentrations of CuCl2 salt (10–90 ppm).

Fig. 22
figure 22

Nyquist plot of carbon steel in 1 M HCl with 50 ppm of TAC 6 inhibitor in the presence of different concentrations of MnCl2 salt (10–90 ppm).

Fig. 23
figure 23

CPE equivalent circuit compatible with the experimental impedance data.

Fig. 24
figure 24

Bode plot of carbon steel in 1 M HCl with 50 ppm of TAC 6 inhibitor in the presence of different concentrations of CoCl2 salt (10–90 ppm).

Fig. 25
figure 25

Bode plot of carbon steel in 1 M HCl with 50 ppm of TAC 6 inhibitor in the presence of different concentrations of CuCl2 salt (10–90 ppm).

Fig. 26
figure 26

Bode plot of carbon steel in 1 M HCl with 50 ppm of TAC 6 inhibitor in the presence of different concentrations of MnCl2 salt (10–90 ppm).

Table 12 EIS parameter values of C-steel corrosion in 1 M HCl at 50 Ppm of the inhibitors with the addition of different concentrations of salts at 303 K.

Mechanism of corrosion inhibitors

The inhibition inertia of Gemini cationic surfactants is created by forming a protective layer that is absorbed on the steel surface, which obeys the Langmuir adsorption isotherm as shown in Fig. 27. By utilizing the π-electrons in the benzene ring and the vacant d-orbital of the iron atoms, as well as the donor-acceptor interactions between the atoms on the steel surface and the lone electron pairs in heteroatoms like nitrogen and sulfur, the inhibitor molecules can interact with the surface of the steel.

The adsorption on steel surfaces includes mainly electrostatic interactions with the addition of the formation of a chemical bond. All measurements, including chemical, electrochemical, surface examination, and computational, confirmed the mechanism of steel corrosion in 1 M HCl solution reduced with the addition of various concentrations of both Gemini cationic surfactants. Impedance measurement indicates the formation of a film on the steel surface with the creation of small defects in these layers over time. An increase in the inhibition efficiencies is indicated as follows \(\:\text{T}\text{A}\text{C}\:18\:>\text{T}\text{A}\text{C}\:6\). The addition of inorganic salts changes the mechanism of inhibitors’ work to act as mixed-type inhibitors. Where cooperative adsorption of chloride ions from examined salts and bromide ions from inhibitors on the steel surface, then the cationic portion of inhibitors is attracted to them while cations of salts cover the surface of steel according to their sizes to form a more uniform protective film on steel surface as follows CuCl₂ > MnCl₂ > CoCl₂.

The mechanism of corrosion of carbon steel in hydrochloric acid solution is through the adsorption of chloride ions, hydrogen ions, and water molecules on the steel surface. The adsorption molecules lead to steel dissolution as an anodic reaction and hydrogen evaluation through cathodic reaction129.

Water adsorption on a steel surface

$$\:\text{F}\text{e}+{\text{H}}_{2}\text{O}\iff\:{\left[\text{F}\text{e}\text{O}\text{H}\right]}_{\text{a}\text{d}\text{s}}+{\text{H}}^{+}+{\text{e}}^{-}$$
$$\:{\left[\text{F}\text{e}\text{O}\text{H}\right]}_{\text{a}\text{d}\text{s}}\iff\:{{\left[\text{F}\text{e}\text{O}\text{H}\right]}_{\text{a}\text{d}\text{s}}}^{+}+{\text{e}}^{-}$$
$$\:{{\left[\text{F}\text{e}\text{O}\text{H}\right]}_{\text{a}\text{d}\text{s}}}^{+}+{\text{H}}^{+}\iff\:{\text{F}\text{e}}^{2+}+{\text{H}}_{2}\text{O}$$

Chloride ions adsorption on steel surface

$$\:\text{F}\text{e}+{\text{H}}_{2}\text{O}+{\text{C}\text{l}}^{-}\iff\:{\left[\text{F}\text{e}\text{C}\text{l}\text{O}\text{H}\right]}_{\text{a}\text{d}\text{s}}^{-}+{\text{H}}^{+}+{\text{e}}^{-}$$
$$\:{\left[\text{F}\text{e}\text{C}\text{l}\text{O}\text{H}\right]}_{\text{a}\text{d}\text{s}}^{-}\iff\:{\left[\text{F}\text{e}\text{C}\text{l}\text{O}\text{H}\right]}_{\text{a}\text{d}\text{s}}+{\text{e}}^{-}$$
$$\:\left[\text{F}\text{e}\text{C}\text{l}\text{O}\text{H}\right]+{\text{H}}^{+}\iff\:{\text{F}\text{e}}^{2+}+{\text{C}\text{l}}^{-}+{\text{H}}_{2}\text{O}$$

Hydrogen evaluation

$$\:\text{F}\text{e}+\:{\text{H}}^{+}\:\to\:{\left[FeH\right]}_{ads}^{+}\:$$
$$\:{\left[FeH\right]}_{ads}^{+}+{\:\text{e}}^{-}\:\to\:\:{\left[FeH\right]}_{ads}$$
$$\:{\left[FeH\right]}_{ads}+\:{\text{H}}^{+}+{\:\text{e}}^{-}\to\:\text{F}\text{e}+\:{\text{H}}_{2}$$

Overall reaction

$$\:{\text{F}\text{e}}_{\left(\text{s}\text{o}\text{l}\text{i}\text{d}\right)}+{2\text{H}}^{+}\to\:{\text{F}\text{e}}^{2+}+{{\text{H}}_{2}}_{\left(\text{g}\text{a}\text{s}\right)}$$

The following equation represents the influence of both inhibitors on the mechanism of corrosion of steel in hydrochloric acid130.

Adsorption on a steel surface

$$\:\text{F}\text{e}+TAC\iff\:{[\text{F}\text{e}.\text{T}\text{A}\text{C}]}_{\text{a}\text{d}\text{s}}$$

Formation of protective film

$$\:{\text{F}\text{e}}^{2+}+TAC\iff\:{[{\text{F}\text{e}}^{2+}.\text{T}\text{A}\text{C}]}_{\text{a}\text{d}\text{s}}$$

Reducing the rate of anodic reaction

$$\:{\text{F}\text{e}}^{2+}+TAC\:+\:{\text{C}\text{l}}^{-}\iff\:{[FeCl.\text{T}\text{A}\text{C}]}_{\text{a}\text{d}\text{s}}$$

Reducing the rate of cathodic reaction

$$\:{[FeH.TAC]}_{ads}+\:{\:\text{e}}^{-}\to\:\text{F}\text{e}+\:{\text{H}}_{2}+{TAC}_{dersorbed}$$

Overall corrosion inhibition reaction

$$\:{\text{F}\text{e}}_{\left(\text{s}\text{o}\text{l}\text{i}\text{d}\right)}+{2\text{H}}^{+}+{\text{T}\text{A}\text{C}}_{ads.}\to\:{\text{F}\text{e}}^{2+}+{{\text{H}}_{2}}_{\left(\text{g}\text{a}\text{s}\right)}+{\text{T}\text{A}\text{C}}_{desorbed}$$

By the addition of different inorganic salts, the corrosion inhibition efficiencies increased through the addition of cooperative adsorption which is represented in the following equations for the addition of copper chloride salt.

Cu2+ Reduction and Deposition on the Steel Surface

$$\:{\text{C}\text{u}}^{2+}+{2\text{e}}^{-}\to\:{\text{C}\text{u}}_{\text{a}\text{d}\text{s}\text{}}$$

Complex Formation with the Inhibitor

$$\:{\text{C}\text{u}}_{\text{a}\text{d}\text{s}\text{}}+\text{T}\text{A}\text{C}\rightleftharpoons\:{[\text{C}\text{u}.\text{T}\text{A}\text{C}]}_{\text{a}\text{d}\text{s}}\text{}$$

Anodic Reaction (Blocking Active Sites)

$$\:{\text{F}\text{e}}^{2+}+{\text{C}\text{u}\text{C}\text{l}}_{2}\text{}+\text{T}\text{A}\text{C}\rightleftharpoons\:{[\text{F}\text{e}\text{C}\text{u}\text{C}\text{l}.\text{T}\text{A}\text{C}]}_{\text{a}\text{d}\text{s}}\text{}$$

Cathodic Reaction (Interference with Hydrogen Evolution)

$$\:{[\text{F}\text{e}\text{H}.\text{T}\text{A}\text{C}]}_{\text{a}\text{d}\text{s}}\text{}+{\text{C}\text{u}}^{2+}\to\:\text{F}\text{e}+{\text{C}\text{u}}_{\text{a}\text{d}\text{s}}\text{}+{\text{H}}_{2}\text{}+{\text{T}\text{A}\text{C}}_{\text{d}\text{e}\text{s}\text{o}\text{r}\text{b}\text{e}\text{d}}\text{}$$
Fig. 27
figure 27

The process by which a steel surface is protected against corrosion in a 1 M HCl solution.

Conclusions

From the results, we can conclude:

  1. 1.

    The examined cationic Gemini surfactants (TAC 6 and TAC 18) demonstrated high efficiency in protecting carbon steel from corrosion in 1 M HCl.

  2. 2.

    The inhibition efficiency increases with inhibitor concentration, reaching its maximum at 50 ppm.

  3. 3.

    The inhibition efficiency follows the order TAC 18 > TAC 6, highlighting the greater protective effect of longer hydrocarbon chains.

  4. 4.

    Higher temperatures (303 K to 323 K) reduce inhibition efficiency, suggesting a weaker inhibitor-surface interaction at elevated temperatures.

  5. 5.

    The inhibitors TAC 6 and TAC 18 adsorbed onto the steel surface following Langmuir’s isotherm, indicating monolayer adsorption.

  6. 6.

    Kinetic and thermodynamic parameters confirm the presence of both physisorption and chemisorption, contributing to the protective film formation.

  7. 7.

    The shift in corrosion potential confirms that TAC 6 and TAC 18 act as cathodic inhibitors, primarily reducing hydrogen evolution.

  8. 8.

    Over time, pores form in the protective layer on the steel surface. Still, their occurrence decreases with higher inhibitor concentration, leading to a denser, more uniform film and improved corrosion resistance.

  9. 9.

    The theoretical calculation using quantum DFT confirms the same conclusions indicated by chemical and electrochemical techniques.

  10. 10.

    The addition of inorganic salts enhances inhibition efficiency, following the order: CuCl₂ > MnCl₂ > CoCl₂.

  11. 11.

    The cationic portion of the salts co-adsorbs alongside the inhibitor molecules, forming a more stable and uniform protective layer in the order: Cu²⁺ > Mn²⁺ > Co²⁺.

  12. 12.

    In the presence of salts, TAC 6 and TAC 18 shift from dominant cathodic inhibitors to mixed-type inhibitors, effectively suppressing both anodic and cathodic corrosion reactions.