Introduction

One of the most important elements that man has employed from the beginning of time is iron. Despite its susceptibility for corrosion, mild steel is one of the most significant substances ever created and has been used in a wide range of industries and machines. Mild steel is utilized to create structural forms and sheets, used automobiles, furniture, pipelines, bridges, decorations, and wire1,2. Certainly, the utilization of crude oil and natural gas stands as one of the most crucial energy sources, involving a cycle from extraction in wells to the refining process. Subsequently, transportation occurs through pipelines constructed from steel, as well as storage in tanks and the infrastructure of refining facilities3. The investigation of the corrosion behavior of steel in different aqueous media have been received a great attention. Acidic environments, which are typically present in industrial and chemical processes, cause M-Steel to corrode quickly4,5,6. Acid solutions, especially H2SO4 and HCl are widely used in different industrial applications, such as petroleum industry, pickling of iron, chemical cleaning and descaling of boilers. Inhibitors are a frequent and effective way to protect metals in corrosive conditions7,8,9.

It is well recognized that organic compounds, particularly those with heteroatoms like nitrogen, sulfur, and oxygen, are efficient corrosion inhibitors10. The effectiveness of these chemical inhibitors is related to their capacity to bind to the metallic surface11,12. Recent research has focused on thiosemicarbazones, which have been found to provide good inhibition because of structure contains heteroatoms with free electron pairs in addition to a conjugated double bond that can promote adsorption on M-Steel13,14,15. Thiosemicarbazones have been a target of research in recent years owing to their potential utilization in chemistry and related industries13,16,17. Compounds comprising such motifs emerged as a prominent class of N, S-donor ligands over time because of diverse donor behaviors, molecular variety, and biological uses. Such compounds perform as proper ligands since they have superior coordination capability, selectivity, and stability when utilized with a broad range of metal ions13,17,18,19. Further, they can coordinate with several metal ions as keto form (neutral) or enol form (anionic) ligands, and they could adopt a range of distinct coordination patterns. In some cases, the formation of a single complex possessing both deprotonated and neutral thiosemicarbazone species is conceivable20. The chelating efficiency of the thiosemicarbazone moiety could be improved by introducing appropriate donor atoms in its framework, thereby making the ligand polydentate21. Furthermore, thiosemicarbazones and their metal were exhibited promises in the therapy of a variety of ailments13,16,18,19. Additionally, thiosemicarbazones and their metal complexes have a considerable spectrum of biological and therapeutic applications, particularly, antimalarial, antiviral, antifungal, and anticancer activities22,23. Thiosemicarbazones derivatives are widely applied as inhibitors for steel in sulfuric acid environment. Zhang et al. synthesized and investigated the corrosion inhibitory effects of various benzaldehyde thiosemicarbazone derivatives (BST, PBST, and OCT) on the corrosion of mild steel in a 0.5 M H2SO4 solution24. They found a significant positive relationship between concentration and inhibition efficiency. Qusay A. Jawad and collaborators explored how a new thiosemicarbazone, specifically 2-(2,4-di methoxy benzylidene) hydrazinecarbothioamide (DMBHC), affects the corrosion inhibition of mild steel in a sulfuric acid environment. The concentration of 0.5 × 10–3 M demonstrated the highest inhibitory efficiency, reaching 94.3%25. Furthermore, Honghong Zhang and colleagues synthesized novel halogen-substituted benzaldehyde thiosemicarbazone derivatives and assessed their efficacy as corrosion inhibitors for mild steel in 1 M HCl. The research demonstrated a direct relationship between concentration and inhibitory effectiveness, reaching a peak of 94.3% at a concentration of 400 × 10–6 M26. Some publications primarily focus on electrochemical assessments, offering only a superficial examination of structural elements. This study aims to provide a comprehensive overview of structural constituents and establish connections with electrochemical performance within a single publication. To conduct an integrated structural analysis, we applied FMO and NBO methodologies to investigate corrosion effectiveness at the molecular level. Our utilization of NBO analysis allowed us to prioritize functional groups and specific molecular sites for facilitating electron transfer with the metal surface. The purpose of this study is to assess the inhibitory effect of some novel tris-thiosemicarbazones compounds on mild steel (MS) corrosion in 0.5 M H2SO4. Open circuit potential, potentiodynamic polarization, and electrochemical impedance spectroscopy (EIS) measurements were used in this study. Theoretical calculations were also used to validate the experimental results.

Materials and methods

Materials

The chemical composition of the relevant MS was (weight%). Fe = 99.77, C = 0.06495 which were chosen for the present study and exposed to the hostile medium. The MS working electrode was polished to a mirror shine using emery sheets of varying grits (200–2000), cleaned, and washed with bi-distilled water and acetone to get rid of grease. All of the chemicals used to generate the test solutions were of Sigma-Aldrich Co., and all experiments were performed at 30 °C.

Synthesis of inhibitors derivatives

A solution of 2-hydroxybenzene-1,3,5-tricarbaldehyde (1, 3.0 mmol, 0.534 g) and an appropriate N-substituted hydrazine carbothioamides (2a,b, 3.0 mmol) in EtOH (15.0 mL) was sonicated at 65°C for 25 min (TLC). The isolated solid was filtered off, washed with EtOH (3 × 3.0 mL), dried under vacuo, and crystallized from dioxane/DMF. The molecular structure of 3a and 3b are given in Fig. 1.

Figure 1
figure 1

An ultrasound-assisted protocol for the synthesis of the (HAC and HBC).

2,2',2''-((2-Hydroxybenzene-1,3,5-triyl) tris (methanylylidene)) tris (N-benzylhydrazine-1-carbothioamide) (3a, HBC)

Yellow crystals; 98%; mp322-325°C. IR (KBr) (Fig. 2a): 3343, 3155 (broad bands, NH&OH), 1589 (C=N&C=C), 1452 (C=S). 1H NMR (400 MHz, DMSO-d6) (Fig. 2b): δ = 13.21 (br, 1H, OH), 11.89 (br, 3H, NH-N=CH), 8.88 (s, 2H, CH=N), 8.56 (s, 1H, CH=N), 8.38 (s, 2H, Ar–H), 8.05 (br, 3H, NH-CH2), 7.38–7.29 (m, 15H, Ar–H), 4.81 ppm (s, 6H, CH2). HRMSm/z: [M]+ calcd for C33H33N9OS3:667.1973, found:667.1972. Anal. Calcd for C33H33N9OS3: C, 59.35; H, 4.98; N, 18.88%. Found: C, 59.31; H, 4.99; N, 18.80%.

Figure 2
figure 2

The FTIR spectrum (a), and 1H NMR spectrum spectra of HBC compound.

2,2',2''-((2-Hydroxybenzene-1,3,5-triyl) tris (methanylylidene)) tris (N-allylhydrazine-1-carbothioamide) (3b, HAC)

Yellow crystals; yield 96%; mp 303–304 °C. IR (KBr) (Fig. 3a): 3346, 3147 (broad bands, NH&OH), 1611 (C=N & C=C), 1462 (C=S). 1H NMR (400 MHz, DMSO-d6) (Fig. 3b): δ = 13.25 (s, 1H, OH), 11.21 (br,3H, NH-N=CH), 8.80 (s, 2H, CH=N), 8.63 (s, 1H, CH=N), 8.40 (s, 2H, Ar–H), 8.00 (br, 3H, NH-CH2), 5.86–5.76 (m, 3H, CH2=CH-CH2), 5.21–5.01 (m, 6H, CH2=CH-CH2), 4.54–4.50 ppm (m, 6H, CH2=CH-CH2). HRMSm/z: [M]+ calcd for C21H27N9OS3:517.1505, found:517.102. Anal. Calcd for C21H27N9OS3: C, 48.72; H, 5.26; N, 24.35%. Found: C, 48.85; H, 5.19; N, 24.31%.

Figure 3
figure 3

The FTIR spectrum (a), and 1H NMR spectrum spectra of HAC compound.

Electrochemical measurements

All electrochemical measurements were achieved with Versa STAT 4 and the Versa Studio electrochemistry software suite. The working electrode was rubbed with emery sheets of various grades up to 2000 grit. As counter and reference electrodes, platinum wire and saturated calomel electrodes were used. Before beginning any experiment, the steel electrode was allowed to reach steady-state potential. The scan rate for the potentiodynamic polarization technique is 5 mV/sec. In electrochemical impedance spectroscopy (EIS) studies, the frequency ranges 100 kHz to 100 MHz are used.

Computational details

The geometries of the HAC and HBC molecules were constructed using the sketching tools in Gaussview 6 software27. Their structural parameters (bond length, bond angle and dihedral angle) in the gas and aqueous forms were optimized to the minimum energy using Gaussian 09 software package28. The optimization methods used the Lee–Yang–Parr correlation functional and Becke-style 3-Parameter density Functional Theory (DFT-B3LYP) at 6–31G(d,p) basis set, which had a tolerable processing cost, less time and high accuracy29,30. The optimization processes were also done using DMol3 module implemented in Materials studio software31 at local spin density approximation using the Perdew–Wang correlation function (LDA and PWC), (DND 4.4) Basis Set and COSMO control for water as solvent32. The occurrence of HAC and HBC molecules on steel surface was simulated by Molecular dynamics (MD) and Monte Carlo (MC) simulations using Forcite dynamic and adsorption locator modules in absence and presence of the corrosive environment (200 H2O/20 H3O+/10 SO4--). For this purpose, Fe (110) slab with a dimension of 24.82Å × 24.82Å × 48.24 Å was used to simulate steel. Molecular dynamics (MD) was done by using Nose thermostat where the temperature was set at 298 K. A NVT ensemble with simulation time of 50 ps is chosen where the time step of 1 fs. The energy was performed using COMPASS II as the force field.

Institutional review board statement

All procedures were performed in accordance with the Guidelines for Care and Use of Laboratory of Benha University and approved by the Ethics Committee of faculty of science (BUFS-REC-2024-132 chm).

Results and discussion

Synthesis and characterization

We began our investigation by synthesizing 2-hydroxybenzene-1,3,5-tricarbaldehyde (1) employing the published method33 with some modifications. The sonication of the commercially available phenol (1.0 equiv) and 1,3,5-trioxane (5.0 equiv) in trifluoroacetic acid (TFA) was demonstrated to be capable of introducing three aldehydic groups into the phenol molecule in a one-step procedure. In comparison with the published methods33, the present protocol afforded the desired tricarbaldehyde (1) quantitatively in a short reaction period. Subsequently, the trialdehyde derivative (1) has been then subject to condensation reactions with thiosemicarbazde derivatives (2a,b) under different conditions. After several trials, the optimum conditions for this condensation reaction were specified as follows: a mixture of 3.0 mmol of tricarbaldehyde (1) and 3.0 mmol of thiosemicarbazides (2a,b) in 20.0 mL EtOH was sonicated (80%) at 65 °C for 30 min. The targeted derivatives (3a,b) were obtained in quantitative yields (95 and 98%, Fig. 1). The proposed structures of the targeted derivatives were confirmed via several spectroscopic methods (NMR, and FT-IR,) (cf. Figs. 2, 3). For example, Fourier transform infrared (FT-IR) spectra of the four condensed derivatives approved the disappearance of distinctive signals belonging to the aldehydic carbonyl groups. The broadness of OH bands between 3346 cm and 3001 cm−1indicates the stretching mode of hydroxyl and NH groups. Furthermore, the typical sharp band at 1611 cm−1 is assigned to the stretching vibration of the allylic double bond of derivative 3b. Further, the bands recorded around 1500 cm−1 is due to the vibrational mode of the aromatic C=C bonds and the newly formed C=N bonds. Moreover, the 1H NMR of these derivatives (3a,b) revealed characteristic singlets around δ 8.7 ppm attributed to the methine proton. Interestingly, these relatively high values of methine protons indicating the stereoselectivity of the present reaction; the thermodynamically stable E-isomers were obtained while the less stable Z-isomers were not detected34. The mass spectra of the designed compounds displayed molecular ion peaks at the appropriate m/z values.

Electrochemical measurements

Open circuit potential (OCP)

In the absence and presence of various concentrations of tri-thiosemicarbazone derivatives (HBC and HAC), the open circuit potential vs. time curves for MS in 0.5 M H2SO4 are shown in Fig. 4. A thorough examination of OCP vs. time curves indicates that the steady-state potential shifts negatively in the presence of HBC and HAC. As the concentration of HBC and HAC increases, the OCP becomes more negative. The contradicting variations of the curves in proportion to uninhibited MS revealed that the cathodic reaction was dominant. The properties of the curled sample are markedly different from those of the unrestricted sample. For MS electrode, the OCP curves were practically straight, indicating that steady-state potential had been reached35,36.

Figure 4
figure 4

Open-circuit potential of mild steel in 0.5 M H2SO4 in absence and presence of different concentration of HBC (a) and HAC (b).

Potentiodynamic polarization (PDP)

The potentiodynamic polarization (PDP) curves of MS were carried out after holding the alloys at the open-circuit potential in stagnant naturally aerated 0.5 M H2SO4 in inhibitors free and inhibitors containing solutions (100–800 ppm). Figure 5 presents the results of the effect of tri-thiosemicarbazones derivatives concentrations on cathodic and anodic polarization curves of MS in 0.5 M H2SO4 at 303 K. The corrosion current density, icorr, corrosion potential, Ecorr, surface coverage, θ, inhibition efficiency, η, anodic Tafel slopes, βa, and cathodic Tafel slopes, βc, were calculated using PDP data and presented in Table 1. The curves showed that the synthesized tri-thiosemicarbazone derivatives (HBC and HAC) are very effective inhibitors for the MS corrosion. When the effect of the two inhibitors compared to each other at 800 ppm, it was noticed that HBC is more effective on the MS surface than HAC inhibitor (Fig. 5). The polarization curves shift directly to lower current densities as HBC and HAC concentrations are increased, dramatically slowing the rate at which MS corrodes. The fact that each curve in Fig. 5 is parallel to the others shows that the addition of the HBC and HAC has no effect on the mechanism of reactions, and that the corrosion processes can be controlled simply by limiting the rates of reactions37,38. The values displayed in Table 1 indicated that icorr decreases sharply from 2326 μA cm−2 (for the uninhibited tested media) to 34.39 μA cm−2 (with 800 ppm of HAC) and 28.26 μA cm−2 (with 800 ppm of HBC). The values also suggest that HAC and HBC adsorb on the metal surface, which suppresses the dissolution of metals as well as reduction processes39. Additionally, it has been noted that the addition of HAC and HBC to the corrosive solution has altered the Ecorr values of the non-inhibitor systems. At 100 ppm, the attained efficiency ranged from 63.16% (HAC) and 75.86% (HBC) to its maximum value of 98.5% (HAC) and 98.8% (HBC) at 800 ppm within the concentration range of our research. The high inhibition efficacy of the HAC and HBC molecules can be explained by the existence of benzene rings, double bonds, and hydroxyl group in addition to the presence of N, O and S atoms40. The provided inhibitor's structure and concentration affect the values of the corrosion inhibition efficiency, and surface coverage. Using the following equations, the percentage inhibition efficiency (η %) and the degree of surface covering (θ) were calculated41,42:

$$\theta = \frac{{i}_{corr}^{o} - {i}_{corr}}{{i}_{corr}^{o}}$$
(1)
$$\eta \text{\% }= \frac{{i}_{corr}^{o} - {i}_{corr}}{{i}_{corr}^{o}}\times 100$$
(2)

where iocorr and icorr are the corrosion current densities in the absence and presence of the inhibitor, respectively. It can be seen that the values of the inhibition efficiencies calculated from icorr rise with rising concentration of HBC and HAC. The η % values of HAC and HBC, at each concentration are extremely high, and the maximum values of the efficiencies are 98.5% with HAC and 98.8% with HBC at the 800 ppm within the concentration range of our research.

Figure 5
figure 5

Potentiodynamic polarization curves for the corrosion of Steel in 0.5 M H2SO4 in absence and presence of different concentrations of HAC and HBC compound at 303 K.

Table 1 Electrochemical parameters for steel dissolution in 0.5 M H2SO4 solution containing different concentrations of the (HAC and HBC) inhibitors obtained from polarization measurements at 303 K.

Several papers have demonstrated that the ΔEcorr value can also be used to determine the corrosion inhibition effect. If the change in Ecorr is > 85 mV or <  − 85 mV with regard to the Ecorr of the blank solution, the inhibitor compounds can be categorized as anodic or cathodic type inhibitors respectively. When the change in Ecorr is < 85 mV, the chemical inhibitor can be classified as a mixed type43,44. The largest displacement displayed by HBC or HAC in the current investigation is ~ 16 mV (see Table 1), leading to conclude that these compounds performed as mixed-type inhibitors. As a result, the anodic dissolution of MS was reduced and the cathodic reaction of H2 evolution was delayed when HBC or HAC were added to the 0.5 M H2SO4 electrolyte. These substances can also serve as a physical barrier to stop the diffusion of corrosive species to the mild steel electrode's surface. Also, the shift of βa and βc indicate that the metal dissolution processes (Fe → Fe++ + 2e) as well as the hydrogen evolution (2H+ + 2e → H2) is suppressed by the adsorption of HBC and HAC. Therefore, it confirms that HBC and HAC act as mixed-type corrosion inhibitors which suppress both anodic and cathodic reaction by adsorbing on the MS surface45. Tri-thiosemicarbazone derivatives (HBC and HAC) may interact with the d-orbitals of Fe atoms through the interaction of hetero atoms in the HBC and HAC structure that have unshared electron pairs with the steel surface in 0.5M H2SO4 solution. Since the electron configuration of Fe was [Ar] 4s23d6, it is obvious that the electrons in the third orbit were not completely filled. While the filled 4s orbital might interact with the lowest unoccupied molecular orbital of the HBC and HAC, this unfilled iron orbital may bond with the highest occupied molecular orbital of the thiosemicarbazone molecule46.

Electrochemical impedance measurements, EIS

EIS is a highly effective method for determining rate of corrosion, due to utilization of a modest ac signal without substantially altering the attributes being recorded or the electrode surface morphology. Additionally, it is feasible to replicate the experimental impedance data using pure electronic models, which can be used to test or validate mechanistic models and to calculate numerical values corresponding to the physical and/or chemical properties of the electrochemical system47,48. The results of the EIS measurements obtained with the MS electrode immersed in 0.5 M H2SO4 in absence and presence of (100–800 ppm) of HAC and HBC inhibitors are presented in Fig. 6 in the form of Bode and Nyquist plots. The presence of a depressed capacitive loop at intermediate frequencies and a single semicircle are the main characteristics of the Nyquist plot. This behavior shows that the corrosion process is under charge transfer control and is related to a single time constant that includes relaxation effects from adsorption events49,50. Relaxation processes take place at certain frequencies in the interfacial phenomena governed by diffusion. In an electrochemical system, the characteristic constant of a relaxation process within the time domain is called the relaxation time (τdl), which is defined as the time required for the charge distribution to return to its equilibrium state. This term is frequently used to differentiate between polarization effects that can be attributed to physical processes that underlie the frequency domain overlap51. With a rising inhibitor concentrations, the τdl values increased in the presence of HAC and HBC (Table 2), indicating a slower process of electric charge and discharge at the metal-solution interface because there are more macromolecules adsorbed on the metallic surface52. The relaxation of the double layer capacitance is typically connected with the semicircle at high frequencies, and the diameter of this semicircle denotes the charge-transfer resistance.53,54. The diameter of the capacitive loop increases after the addition of the investigated inhibitor (HAC and HBC) to the corrosive medium, indicating that the addition of HAC and HBC in the corrosive solution suppresses the corrosion process by blocking the active corrosion centers and flawed or fragile regions by the adsorption of its molecules on the metal surface. The dispersion formula was used to examine the entire set of impedance data using software that came with the electrochemical workstation. On the MS surface, it was discovered that HBC is more efficient than HBC. The data are well-aligned with those from potentiodynamic polarization measurements. Several impedance parameters were calculated using equivalent circuit shown in Fig. 6 and listed in Table 2. The values of Rct were given by subtracting the high frequency impedance from the low frequency one as follows55: Rct = Zre(at low frequency) − Zre(at high frequency). Increasing the value of Rct from (184.6 Ω cm2) to (4582 and 4930 Ω cm2 for HAC and HBC, respectively) and decreasing the value of double layer capacitance (Cdl) by increasing the inhibitor concentration indicate that HAC and HBC inhibit corrosion rate of MS in 0.5 M H2SO4 by adsorption mechanism56. At Low-frequency regions (0.01 Hz), as those in the bode plots (Fig. 6), were linked to polarization resistance or charge transfer, and the impedance (|Z|0.01) might be an indicator of inhibitory strength57. With every increase in HAC and HBC concentrations, the corrosion reaction is slowed down by an increase in |Z|0.0158. The insertion of HAC and HBC molecules causes the slopes of bode lines in the middle-frequency band to shift near -1 (pure capacitor), which suggests that the corrosion system's capacitive behavior is becoming more pronounced59. Additionally, the height of the peak grew with increasing HAC and HBC concentrations, and all Bode-phase angle curves exhibited a single time constant, indicating a stronger response from HAC and HBC adsorption in the steel/H2SO4 interface60. The data obtained from EIS are in a good agreement with aforementioned results of potentiodynamic polarization measurements.

Figure 6
figure 6

Nyquist, Bode plots and equivalent circuit for steel dissolution in 0.5 M H2SO4 in the absence and presence of different concentrations of the HAC and HBC inhibitors at 303 K.

Table 2 Electrochemical parameters calculated from EIS measurements on mild steel electrode in 0.5 H2SO4 solutions without and with various concentrations of (HAC, HBC) at 303K.

Adsorption isotherm

By locating an appropriate isotherm, the adsorption performance of tri-thiosemicarbazone derivatives (HAC and HBC) on the MS surface may be understood. Numerous numerical relations (Freundlich, Langmuir, Temkin, and kinetic-thermodynamic) for the adsorption isotherms were devised and displayed in Fig. 7 to fit the exploratory results of EIS and PDP tests. The data collected in Table 3 show that Langmuir isotherm equation fits our results according to R2 values. In Langmuir isotherm equation, the equilibrium constant (K) of the adsorption process and the adsorbate concentration (C) are related as C/θ = 1/K + C61. Also, K is linked to the standard free energy of adsorption, ∆Goads, by the equation62: K = 1/106 exp (− ∆Goads/RT), where T stands for the absolute temperature and R for the ideal gas constant while the value 106 is the concentration of water in ppm. Using EIS data, the standard adsorption free energies are equal to −28.56 and −29.45 kJ mol−1 for HAC and HBC respectively. The negative sign of ∆Goads indicates the spontaneous nature of the adsorption process of HAC and HBC on MS surface63. The obtained value of ∆Goads suggests a physical adsorption process.

Figure 7
figure 7

The different adsorption models for HAC and HBC compounds on the steel surface in 0.5 M H2SO4 using electrochemical impedance spectroscopy data at 303 K.

Table 3 Adsorption isotherms models of the inhibitors with values of R2, slopes, intercepts, and thermodynamic parameters (Kads and ΔGoads,) by using data obtained from EIS measurements.

Reactivity descriptors

After DFT-631G(d,p) and DMol3 computations for HAC and HBC molecules, snapshots for the optimized structures, HOMO, LUMO, MEP and Mulliken charges were extracted as shown in Fig. 8 and the extracted quantum parameter are collected in Table 4. The two molecules have a similar skeleton except the terminal groups as –CH=CH2 for HAC and benzene moieties for HBC. HAC and HBC structures are roughly planner with a slight difference for the terminal aromatic moieties in case of HBC molecule. This approximate planner geometry with severally distributed active sites may guarantee large surface coverage of steel and enhanced protection. Based on Mulliken atomic charges (MAC), The highly negatively charged atoms are expected to adsorb on steel surface via electron donation and/or electrostatic attraction64,65.

Figure 8
figure 8

Graphical representation of the optimized molecular structures, highest occupied molecular orbitals (HOMO), lowest unoccupied molecular orbitals (LUMO), molecular electrostatic potential map (MEP), and Mulliken atomic charges (MAC) of HAC and HBC molecules from B3LYP calculations.

Table 4 The calculated quantum chemical parameters in eV for the neutral and protonated inhibitors at DFT-631G(d,p) and DMol3 in gas phase and in aqueous phase.

MAC diagrams in Fig. 8 show several negatively charged atoms like N, O, S and C atoms. The three azomethane nitrogen atoms (C=N) C16, C19 and C22 showed the highest negative charges with values ranged from −0.5468 to −0.5505 e followed by the phenolic oxygens of the central aromatic moieties by the value of −0.5214 e followed by the diazines nitrogen’s (N–N) with the values ranged from −0.3627 e to −0.4087 e and the sulfur atoms of C=S groups (S23, S24 and S25) by values ranged from −0.2972 e to −0.3089 e at the 631-G(d,p) basis set. The summation of MAC (TNC) is higher for MBC molecule than HAC molecule to confirm the priority of HBC molecule in electron donation and/or electrostatic attraction and so steel surface protection. Figure 8 also, showed the molecular electrostatic potential (MEP) map which divide the HAC and HBC molecules into through main regions; low potential (red spots), moderate potential (yellow or green spots) and high potential sections (blue spots), which correspond to electron-rich (where the steel prefers to bind), electron-moderate and electron-poor regions, respectively66. It is important to keep in mind that the quantity of electrophile and nucleophile sites is not always a good indicator of the molecule's overall reactivity, but it does point to potential places of enhanced steel interactions67. MEP of HAC and HAB molecules showed extremely electron-rich region around the central aromatic moiety and phenolic oxygen then the sulfur atoms and the nitrogen atoms while the blue region are around the hydrogens attached to the nitrogen atoms of the diazene’s and the moderate-electrons regions (green) are around the terminal groups either benzene moieties or –CH=CH2 groups. The graphical representations of the frontiers molecular orbitals (FMO) either the electron donating orbitals (HOMO) or the electron accepting orbitals (LUMO) for HAC and HBC molecules are shown in Fig. 8. Chemical reactivity and so the adsorption ability between the HAC or HBC molecules and steel is a function of the donating power of HOMO orbitals to the empty d-orbitals in steel68. HOMO orbitals are mostly distributed on large areas of HAC and HBC molecules including the central aromatic moieties, phenolic oxygen, sulfur atoms and the nitrogen atoms. These active sites can share their electrons with steel forming a stable and coherent protective layer from corrosion69. A quantitative analysis of EHOMO values in Table 4, revealed that HBC possesses higher EHOMO values than HAC molecule either in DFT-631-G data or DMol3 data. This suggests that the electron donating power of HBC molecule is higher than HAC molecule70. Also, the calculated molecular volume of HBC molecule is higher than HAC molecule which guarantee that a single HBC molecule will occupy more surface area on steel surface and higher corrosion protection71.

The reactivity of the organic molecules (HAC and HBC) towards the steel metallic surface enhanced by the reduction of the energy gap between HOMO and LUMO (ΔE = ELUMO − EHOMO)72. Low ΔE values of HAC and HBC molecules (Table 4) suggest high reactivity and enhance protection. The binding of HAC and HBC molecule to steel surface can be enhanced by the electron retro donation as indicated from positive values of hardness (η) and negative values of ΔEback-donation73. The relationship between dipole moment (μ) and the efficiency is very favorable since the buildup and accumulation of HAC and HBC on the metallic surface is more advantageous by large μ values74. The μ values of HBC are higher than that of HAC, which confirms the predominance of HBC in protection efficiency. Also, electronegativity (χ) of HBC molecules is lower than HAC molecule which indicate lower electron attracting ability and higher protection for HBC molecule75. The tendency of electrons for following from HAC and HBC molecules to steel surface (∆N) was calculated to confirm the ability of the studied compounds to donate electrons to the steel empty orbitals76. Also, the electron donating power (ω −) values are higher than electron receiving power (ω +) for both HAC and HBC molecules as indication of the electron follow from the organic molecules to the steel surface is the favorable mode. The Natural bond orbitals (NBOs) were done to determine which atoms or groups in HAC or HBC HOMO possess the priority in sharing electrons to the vacant d-orbitals of steel77. The orbital hybridization pattern for the proposed locations of interactions of HAC and HBC molecules are listed in Table 5, accompanied by the appropriate eigenvalues in eV (ordered by the priority of electron donating capacity). The supplementary Tables S1and S2 include the matching surface densities. The hybridizations of HAC in order of donating ability were found as LP (1) C1 > (LP (2) S24 > LP (2) S23 > LP (2) S25 > BD (2) C4-C5 > BD (2) C2-C3 > LP (1) N16 > LP (1) N14 > LP (1) N19 > LP (1) N17 > LP (1) N22 > BD (2) C30-C33 > BD (1) C21-S23 > BD (2) C31-C32 > BD (2) C29-C34 > LP (1) N20 > LP (2) O7 > BD (2) C8-N9 > BD (2) C10-N11 > BD (2) C12-N13 > LP (1) N9 > LP (1) N11 > BD (1) C15-S24 > BD (1) C18-S25. This ranking shows the priority of the central aromatic moiety then the lone pairs of the sulfur hetero atoms followed by the lone pairs of nitrogen atoms (C-NH) then the π bonds of the terminal -CH = CH2 groups in donating ability. Similar trend obtained for HBC molecule as LP (1) C1 > LP (2) S25 > LP (2) S24 > LP (2) S23 > BD (2) C4-C5 > BD (2) C33-C34 > BD (2) C38-C39 > BD (2) C31-C32 > BD (2) C35-C36 > BD (2) C30-C37 > BD (2) C40-C41 > BD (2) C2-C3 > BD (2) C43-C44 > BD (2) C45-C46 > BD (2) C29-C42 > LP (1) N14 > LP (1) N16 > LP (1) N19 > LP (1) N22 > LP (1) N17 > BD (1) C18-S25 > LP (2) O7 > BD (1) C21-S23 > LP (1) N20. It is noted that the donating ability of the terminal aromatic moieties overcomes the donating ability of lone pairs of nitrogen atoms which clarify their valuable role in adsorption and steel protection.

Table 5 NBOs at expected inhibitor-metal interactions ordered according to their energies (highest to lowest).

The reactivity of individual atoms for donating or accepting electrons were estimated from Fukui functions (\({f}^{+}\) and \({f}^{-}\)). It is calculated from finite difference between neutral, cationic and anionic forms78. In case of HAC, the highest values of \({f}^{-}\) (Table 6) were attributed to the hetero atoms firstly sulfur atoms S23, S24 and S25 then the nitrogen atoms and phenolic oxygen atom as the most active sites for electron sharing with the metallic surface. A close situation is obtained for HBC molecule. So, the most effective active sites for HAC and HBC molecules to engage with steel surfaces and create bonds are the lone electron pairs found on most heteroatoms79.

Table 6 condensed Fukui functions for local reactivities in HAC and HBC molecules calculated by DMol3 method.

Molecular dynamics and Monte Carlo simulations

The previously discussed data focused on the HAC and HBC molecules themselves but their adsorption on steel surface was investigated via MC and MD simulations. Details about how HAC and HBC molecules interact with the surface of steel in the aggressive solution can be provided via MC and MD modeling80,81. For MC calculations, the different forms of energies like electrostatic, Van der Waals, intramolecular, average and total energies during the optimization process of (HAC-H+ and HBC-H+/200H2O/19 H3O+/10 SO4--) systems onto the Fe (110) surface were calculated as shown in Figure S1. For MD calculations, the most stable adsorption sites of (HAC-H+ and HBC-H+/Fe (110) were discovered via the examination of T (K) fluctuations Figure S2 shows how little T(K) variation there is, indicating that the MD calculations in our system were done effectively82. Figure 9 displays, by MC modeling, the distribution of the adsorption of the (HAC-H+ and HBC-H+/200 H2O/19 H3O+/10 SO4--)/Fe (110). Eads are distributed differently in the HAC-H+ or HBC-H+ molecules, H3O+ ions, SO4-- ions, and H2O molecules. Compared to the water molecules and dangerous corrosive ions (H3O+ ions, SO4--ions), the HAC-H+ and HBC-H+ molecule have a substantially larger Eads distribution. The Eads distribution in Fig. 9 shows that the HAC-H+ and HBC-H+ molecules may progressively replace the adsorbed H3O+ ions, SO4-- ions, and H2O molecules from the steel surface83.

Figure 9
figure 9

Distribution of the Eads of the (HAC-H+ and HBC-H+/200 H2O/19 H3O+/10 SO4--) system via MC simulation.

The most stable equilibrium configuration for (HAC-H+ and HBC-H+/200 H2O/19 H3O+/10 SO4--) on Fe (1 1 0) surface, side, and top view as obtained from MC and MD simulations are collected in Fig. 10. The HAC-H+ and HBC-H+ orientation during adsorption on the steel surface is obviously flat, which suggests that the steel surface and the active sites in the HAC-H+ and HBC-H+ molecules interact strongly with maximum surface coverage84. The hetero atoms (S, N, O) lone pairs, double bonds (C=S, C=N, C=C) and the aromatic moieties tightly held the HAC-H+ and HBC-H+ molecules to the surface and shield the other corrosive ions from interaction with steel85. The MC adsorption and binding energies are shown in Table 7. For the gas or aqueous phase adsorption, HAC and HBC molecules are listed in order of their effectiveness as inhibitors: HBC (neutral or protonated) > HAC (neutral or protonated). The extra high values of binding energies demonstrates the excellent effectiveness of HAC and HBC molecules in preventing corrosion in steel86. The bond length between the hetero atoms (N, S) of HAC and HBC molecules and steel surface were examined using radial distribution functions (RDF)87,88 as shown in Fig. 11. The type of adsorption mode can be indicated by peaks in the RDF graph that appear at definite distances from steel surface. For physisorption, the RDF peaks are expected to be present at distances higher than 3.5 Å, but the chemisorption process is implicated when the peak is present between 1 and 3.5 Å59,89. RDF peak positions for the S and N atoms are found at values less than 3.5 Å as indication of chemisorption and HBC molecule is slightly close to surface than HAC molecule.

Figure 10
figure 10

MC and MD simulations results for the most favorable modes of adsorption configurations and positions obtained for (HAC-H+ and HBC-H+/200 H2O/19 H3O+/10 SO4--) on Fe (1 1 0) surface, side, and top view.

Table 7 the outputs and descriptors calculated by the Monte Carlo simulations for adsorption of HAC and HBC on Fe (110) (in kcal/ mol).
Figure 11
figure 11

RDF of the O, N and S heteroatoms for HAC and HBC inhibitors/Fe (110), obtained via MD.

Inhibition mechanism

The synthesized organic inhibitors HAC and HBC exhibited promising corrosion inhibition properties. The adsorption process, influenced by various factors such as the chemical structure of inhibitors, plays a crucial role in the inhibitory mechanism of corrosion inhibitors. As illustrated in Fig. 12, the proposed adsorption mechanism of HBC on the mild steel surface involves both donation and back donation. The protonated sites of the organic inhibitors are thought to physically adsorb at negatively charged sites on Cl- ions, preventing corrosive ions from attacking the steel alloy surface and causing dissolution. Key components of Tri-thiosemicarbazone derivatives (HAC and HBC) as corrosion inhibitors include the presence of pi electrons in aromatic rings and other functional groups that interact with the metal surface by donating electrons. These substances can also act as a physical barrier, halting the diffusion of corrosive species to the surface of the mild steel electrode. As a result, back donation from the metal surface to the acceptor sites reduces electron repulsion on the CS surface. Consequently, the study anticipates the occurrence of three different types of adsorptions—physisorption, chemisorption, and back donation—which collectively contribute to enhanced protection. The adsorption of HBC and HAC molecules on active sites and/or the deposition of corrosion products on the alloy surface are the two primary mechanisms for corrosion suppression90. The orientation of HAC-H+ and HBC-H+ during adsorption on the steel surface (as indicated from MD/MC simulations) appears to be flat, indicating strong interaction between the steel surface and the active sites in the HAC-H+ and HBC-H+ molecules, resulting in maximum surface coverage.

Figure 12
figure 12

Possible adsorption mechanism of inhibitor (HBC) on mild steel alloy surface in 0.5 M H2SO4.

The HBC and HAC inhibitors assessed in comparison to other thiosemicarbazones inhibitors in literature, considering their structural features, concentration, and effectiveness in inhibiting a specific process. Furthermore, Table 8 provides data regarding thiosemicarbazones inhibitors reported in literature with structural similarities to HBC and HAC, along with their respective inhibition efficiencies. The inhibition efficiency of HBC and HAC against mild steel alloy corrosion was found to be comparable to, and in some instances even superior to, several other inhibitors24,25,26. The HBC and HAC inhibitors in this study demonstrated higher efficiency (96.26% and 95.97%) compared to the previously listed organic inhibitors (91.8%, 93.2%, 92.8%, 94.3%, 92.5%, 93.7%, 94.1% and 94.3%). These findings suggest that this recent research serves as a logical progression of the study on organic inhibitors.

Table 8 Comparison of the inhibitory effectiveness obtained from EIS of several inhibitors used for different mild steel corrosion in various environments.

Conclusion

The prepared HAC and HBC compounds worked high effectively as inhibitors of MS corrosion in 1 M HCl, with the effectiveness of HAC and HBC inhibition efficiencies rising with increase in their amount in the corrosive solution. They classified as mixed-type, and Langmuir's isotherm is followed during adsorption. The study's negative ΔGads results show that spontaneous adsorption has occurred on the steel surface. The results of the DFT computation demonstrate that they had the ability to transfer electrons to the metal's surface. The MD and MC simulations show that the inhibitors have very flat surface adsorption geometries. This feature causes the adsorption centers of the inhibitor to be brought to the MS surface.