1 Introduction

The use of corrosion inhibitors is very important in the industrial process. Corrosion inhibitors play an important role in metal corrosion protection by preventing the metal from undergoing corrosion in aggressive media such as hydrochloric acid, phosphoric acid, and sulfuric acid [1]. 1,3,4-thiadiazole is a five-membered heterocyclic scaffold which has diverse physicochemical properties and exhibits different biological activities. Thiadiazoles have significant roles as corrosion inhibitor scaffold due to the presence of functional CN, CS, amine, and N–N groups. Moreover, Thiadiazole possesses π electrons and can be easily bonded to the surface of MS and thus decrease the corrosion rate [2]. Thiadiazole moiety demonstrates inhibition efficiencies for mild steel in 1 M HCl [3]. A non-cytotoxic substance of 1,3,4-thiadiazole was synthesized, which showed potential of corrosion inhibition for mild steel in 1 M HCl and 0.5 M H2SO4 at 30 °C [4]. Substituted thiadiazoles were found to have considerable corrosion inhibition efficiency for N80 Steel in HCl Solution [5]. Corrosion inhibition efficiency of the newly synthesized inhibitor DBTA solution as shown in Scheme 1 has been studied previously [6, 7].

Scheme 1
scheme 1

Structure of DBTA

DBTA improved the corrosion-resistant effectiveness compared with reported heterocyclic scaffolds at lower concentrations due to effect of the functionalized 1,3,4-thiadiazole scaffold in an acidic environment. DFT was utilized to see the corrosion inhibitory effectiveness of the studied inhibitors. These strategies are modest, efficient, and provide itemized data about the system of corrosion inhibition in correlation with traditional techniques, and help simulate the acquired experimental results with EHOMO (high occupied molecular orbital energy), ELUMO (low unoccupied molecular energy), ΔE (energy gap), I (Ionization potential), X (Electron affinity), s (chemical softness), η (global hardness), χ (electronegativity index), and ω (electrophilicity index) from DBTA to mild steel [8,9,10]. The aim of the present study is to investigate the corrosion inhibitory effectiveness of DBTA for mild steels in corrosive solution by means of electrochemical measurement (electrochemical impedance spectroscopy) and gravimetric technique (weight loss). Surface analyses of MS coupons in the presence of DBTA were carried out to analyze the protective inhibitor film. DFT calculations were additionally performed to investigate the correlations between methodological observations and theoretical calculated values.

2 Experimental Work

2.1 Materials and Methods

Chemicals were acquired from SigmaAldrich Malaysia. FTIR spectra were acquired by Shimadzu 8300 spectrometer. CHN investigations were performed utilizing Carlo Erba 5500 CHN elemental analyzer. NMR (Nuclear magnetic resonance) was performed using Bruker Spectrospin instrument equipped with 300 MHz UltraShield using d6-DMSO and TMS (as a solvent and internal standard, respectively).

2.2 Synthesis of DBTA

A mixture of 1,3,4-thiadiazol-2-amine (0.01 mol) and 4-(dimethylamino)benzaldehyde (0.01 mol) in ethanol (100 mL) was refluxed in water bath for 30 min. After completion of the reaction, ice-water was added, and the precipitate formed was washed with hydrochloric acid (2%) after filtration. Ethanol was used as recrystallization solvent to yield 56.3% of DBTA; m.p. 255–259 °C. FT-IR cm−1; 3050 (C–H aromatic), 1565 (C=N), and 2920. 1H NMR in d6-DMSO; d: 9.16 ppm (1H, CH), d: 8.55 ppm (1H, CH), m: 6.83–7.46 (C–H, Ar) and s: 3.07 (6H, C–H, aliphatic). 13C NMR in d6-DMSO: 43.1, 113.7, 126.9, 127.7, 128.7, 150.9, 151.3, and 162.12. CHN Analysis for CS; Found (Calculated): C, 57.16% (56.87); H, 5.44% (5.21); N, 24.98% (24.12).

2.3 Samples’ Preparation

Mild steel specimens were obtained from Gamry Instruments Inc. and were utilized as base substrates for the gravimetric corrosion tests each with an active surface area of 4.5 cm2 and having following elemental configuration: “Fe, 99.21; C, 0.21; Si, 0.38; P, 0.09; S, 0.05; Mn, 0.05; and Al, 0.01 (wt%)”. The ASTM standard procedure G1-03 was employed to clean the tested coupons [11]. The diluted hydrochloric acid has been prepared employing 37% HCl in water and utilized for all the tests. Hydrochloric acid with 1.0 M and with various DBTA concentrations: 0.1, 0.2, 0.3, 0.4, and 0.5 mM have been used as testing solutions. For comparison, blank solution was used in the absence of the DBTA.

2.4 Gravimetric Measurements

The gravimetric measurements for the mild steel samples in 1.0 M HCl in the absence of corrosion inhibitor DBTA, or in the presence of various concentrations (starting from zero concentration) of corrosion inhibitor at 303, 313, 323, and 333 K for 6 h., were performed for the analysis. After specific exposure period, the MS coupons were separated. The losses in weights were evaluated by the variation in weights of the MS coupons before and after exposure. Various parameters such as CR, η%, and θ (corrosion rate, corrosion inhibition efficiency, and MS surface coverage, respectively) were calculated using Eqs. 1–3, [12, 13].

$$C_{\text{R}} = \frac{W}{At}$$
(1)
$$\eta \% = \frac{{C_{\text{R}} - C_{\text{R(i)}} }}{{C_{\text{R}} }} \times 100$$
(2)
$$\theta = \frac{{C_{\text{R}} - C_{\text{R(i)}} }}{{C_{\text{R}} }},$$
(3)

where W  is the loss in weight in mg, A  is the coupon area in cm2, t  is the exposure time in hours, CR is the corrosion rate.

2.5 Electrochemical Measurement

Electrochemical impedance spectroscopy (EIS) was performed at the steady-state corrosion potential using a Gamry water-jacketed glass cell. The cell contained three electrodes, working, counter and reference electrodes, which were composed of mild steel, a graphite bar and a saturated calomel electrode (SCE), respectively. The measurements were performed using the Gamry Instrument Potentiostat/Galvanostat/ZRA (REF 600) model (Gamry, Warminster, PA, USA). DC105 and EIS300 software by Gamry were used to perform the corrosion potential, electrochemical impedance spectroscopy (EIS) measurements. EIS measurements were performed using the AC signals of the 5 mV peak-to-peak amplitude at the corrosion potential in the frequency range of 100 kHz to 0.1 Hz. All impedance data were fit to appropriate equivalent circuits (ECs) using the Gamry Echem Analyst software. The electrochemical measurement results were collected approximately 30 min after the working electrode was immersed in the solution to allow the steady-state potential to stabilize. Each measurement was repeated three times, and only the average values were reported to verify reproducibility of the experiments.

2.6 Surface Characterization

Scanning electron microscopic (SEM) examination was utilized to characterize the surface modifications of MS before/after DBTA. The MS coupons were initially immersed for 5 h at 303 K in blank solution, and the solution with the highest studied concentration of DBTA. The coupons were isolated, washed, and then allowed to dry to characterize the surface.

2.7 Theoretical Calculations

Theoretical calculations for DBTA as corrosion inhibitor were carried out through the DFT method along with “Becke three-parameter hybrid functional along with the Lee–Yang–Paar correlation functional (B3LYP)” [11]. All estimations were done using Gaussian 03 software with the 6-31G(d,p) basis set [12]. The obtained frontier molecular orbital energies including EHOMO and ELUMO help to evaluate other significant functions, such as ΔE, η, σ, χ, and ΔN using [13, 14] Eqs. (4-8).

$$\Delta E = E_{\text{HOMO}} - E_{\text{LUMO}}$$
(4)
$$\eta = - \frac{1}{2}\left( {E_{\text{HOMO}} - E_{\text{LUMO}} } \right)$$
(5)
$$\sigma = \frac{1}{\eta }$$
(6)
$$\chi = - \frac{1}{2}\left( {E_{\text{HOMO}} + E_{\text{LUMO}} } \right)$$
(7)
$$\Delta N = - \frac{{\chi_{\text{Fe}} - \chi_{\text{inh}} }}{{2(\eta_{\text{Fe}} + \eta_{\text{inh}} )}}$$
(8)

where χFe  is the  electronegativity; ηinh  is the hardness of Fe.

For χFe, a reported magnitude of 7 eV/mol was utilized, whereas in case of Fe, ηFe= 0 eV/mol was used [15]. Recent articles demonstrate that the calculated value of χFe = 7 eV is not reasonable due to omission of the interaction of electron–electron and only free electron gas Fermi energy of iron is taken into account. Therefore, to avert this anomaly, \(\phi\) (work function) of the MS surface is utilized instead of χFe, and Eq. (9) should be rewritten as

$$\Delta N = - \frac{{\emptyset - \chi_{\text{inh}} }}{{2(\eta_{\text{Fe}} + \eta_{\text{inh}} }}$$
(9)

3 Results and Discussion

3.1 Gravimetric Measurements

The gravimetric estimation results for MS coupons in investigated corrosive solution in blank solution and DBTA solution are demonstrated in Fig. 1. It is a reliable way to estimate best concentrations of the DBTA for achieving optimal inhibitory activities [16]. The acquired results demonstrated that addition of DBTA block the MS surface against corrosion. The highest inhibition efficiency comes with maximum DBTA concentration as shown in Fig. 2. The DBTA molecules demonstrate inhibitive productivity equal to (91.0%) at the concentration of 0.5 mM. The maximum inhibitive productivity was due to the presence of heteroatoms (N, S) in DBTA molecules with a huge molecular structure of DBTA. Furthermore, the presence of aromatic groups increases the electron density at the active center, which facilitates more interaction of DBTA with the surface of alloy [17].

Fig. 1
figure 1

Effects of different concentrations of DBTA on corrosion rate and surface coverage (a) and surface coverage (b) for MS in 1 M HCl

Fig. 2
figure 2

Effects of different concentrations of DBTA on the inhibitory activity for MS in 1 M HCl

3.2 Effect of Temperature

Comparable inhibition efficiencies of DBTA on MS in corrosive solution at various temperatures including 303, 313, 323, and 333 K and at different concentrations of DBTA indicated that corrosion efficiency increased with the increasing concentration and decreased with the increasing temperature (Fig. 3). Heat of adsorption can be negative in case of absorption of organic compounds, and this resulted in exothermic process, and therefore, increase of the temperature leads to reduction of inhibition efficiencies.

Fig. 3
figure 3

Influences of concentrations vs temperatures for DBTA on corrosion efficiencies

3.3 Electrochemical Impedance Spectroscopy (EIS) Results

The experimental results obtained from EIS measurements for the corrosion of mild steel in the absence and the presence of the inhibitor at 30 °C are summarized in Table 1.

Table 1 CPE data for mild steel in 1.0 M HCl with different corrosion inhibitor concentrations at 30 °C

The impedance spectra for the mild steel samples in 1.0 M HCl in the absence of corrosion inhibitor DBTA or in the presence of various concentrations of corrosion inhibitor at 30 °C are presented as Nyquist plots in Fig. 4. Considerable increase in the total impedance is observed on the addition of corrosion inhibitor. As shown in Fig. 4, the impedance response of mild steel is significantly altered after the addition of inhibitor to the corrosive solution. This result can be attributed to an increase in the substrate impedance with the increasing inhibitor concentration. The EIS results were analyzed using the equivalent circuit mentioned elsewhere [18], and are shown in Fig. 5. The inhibition efficiencies (IE%) were calculated from the charge-transfer resistance using Eq. 10:

Fig. 4
figure 4

Nyquist plots for mild steel in 1.0 M HCl with various concentrations of DBTA at 30 °C

Fig. 5
figure 5

Equivalent model used to fit impedance data for mild steel in 1.0 M HCl in the absence and the presence of DBTA

$$({\text{IE}}\% ) = \frac{{R({\text{inh}}) - R({\text{uninh}})}}{{R({\text{inh}})}} \times 100,$$
(10)

where \(R_{\text{ct}}^{0}\) and Rct indicate the charge-transfer resistances in the presence and the absence of corrosion inhibitor, respectively.

By means of the software Gamry Analyst, EIS experimental data can be analyzed which were the data matching CPEs for mild steel/sample calculation solution resistance R, and constant phase element, CPE, calculation of charge-transfer resistance Rct, and double-layer charge, Cdl [19]. Table 1 shows the EIS data for 1.0 M HCl with different corrosion inhibitor concentrations at 30 °C, where the Cdl value decreases and the Rct value increases with the increasing inhibitor concentrations. This is due to the gradual replacement of water molecules by the adsorption of the inhibitor molecules on the metal surface, and the decrease in the extent of dissolution reaction. The high Rct values are generally associated with slower corroding system [20, 21]. The decrease in Cdl value resulted from the decreasing local dielectric constant and/or from the increasing thickness of the electrical double layer [22]. This proves that the corrosion inhibitor molecules absorbed on the surface of mild steel samples thus form a protective layer on the mild steel. Greater charge-transfer resistances are commensurate with systems that corrode slowly [23]. With the increasing value of Rct, the efficiency and capacity of inhibition (IE) also increased to 90.11% at a concentration of 0.5 mM.

3.4 Adsorption Isotherms

The acquired values of θ through gravimetric calculations of DBTA were utilized to locate the best-fitted adsorption isotherms. Adsorption isotherms help to realize the nature of interactions between the molecules of inhibitor and the surface of MS. DBTA molecules adsorb onto the MS surface either physically or chemically. To realize this phenomenon, various adsorption isotherms (Temkin, Freundlich, and Langmuir isotherms) were applied to the methodogical results. It was noted that the Langmuir fitted well, with the R2 (regression coefficient) value DBTA, promoting good favorable fitting. The acquired slope and intercept values were in the order: Langmuir > Freundlich > Temkin. The Langmuir adsorption isotherm plots between C/θ and Ci are demonstrated in Fig. 6 and Eq. 11.

Fig. 6
figure 6

Langmuir adsorption isotherm for MS in the presence of DBTA

$$\frac{C}{\theta } = \frac{1}{{K_{\text{ads}} }} + C,$$
(11)

where C is the concentration of inhibitor, θ  is the surface area, and Kads  is the adsorption equilibrium constant.

Values of Kads were acquired through a linear straight fitted plot between C/θ and C to obtain free energy of adsorption ΔGadsKads is related to ΔGads through Eq. 12.

$$\Delta G_{\text{ads}} = - RT { \ln }(55.5K_{\text{ads}} ),$$
(12)

where R is the gas constant, T  is the  absolute temperature, 55.5  is the  concentration of water in solution in mol/L.

By substituting Kads in the above equation, the ΔGads values were obtained.

It is notified that ΔGads values were differ between − 40 kJ/mol and more negative values indicating that the adsorption is chemisorption, while the value of ΔGads equal − 20 kJ/mol or less negative revel that the adsorption is physisorption [24, 25]. The ΔGads values for DBTA is − 35.74 kJ/mol, suggesting a chemisorption type of adsorption. In hydrochloric acid solution, the following mechanism is proposed for the corrosion of mild steel. Equations 13–15 show the anodic dissolution mechanism of mild steel.

$${\text{Fe + Cl}}^{ - } \leftrightarrow ({\text{FeCl}}^{ - } )_{\text{ads}}$$
(13)
$$({\text{FeCl}}^{ - } )_{\text{ads}} \leftrightarrow ({\text{FeCl}}^{ + } )_{\text{ads}} + {\text{e}}^{ - }$$
(14)
$$({\text{FeCl}}^{ + } )_{\text{ads}} \leftrightarrow {\text{Fe}}^{ + + } + {\text{Cl}}^{ - }$$
(15)

Equations 1618 show the cathodic hydrogen evolution mechanism.

$${\text{Fe}} + {\text{H}}^{ + } \leftrightarrow ({\text{FeH}}^{ + } )_{\text{ads}}$$
(16)
$$({\text{FeH}}^{ + } )_{\text{ads}} + {\text{e}}^{ - } \leftrightarrow ({\text{FeH}})_{\text{ads}}$$
(17)
$$({\text{FeH}})_{\text{ads}} + {\text{H}}^{ + } + {\text{H}}^{ - } \leftrightarrow {\text{Fe}} + {\text{H}}_{2}$$
(18)

Various factors like nature and charge of the surface of alloy and also the chemical structure of the inhibitor and the type of electrolyte play an important role in the process of adsorption.

3.5 Surface Characterization After Immersion

Scanning electron microscopy (SEM) was used to investigate the surface morphological observation for the steel samples in an acidic solution with and without 0.5 mM DBTA molecules for 6 h at 303 K. The MS coupons exposed to hydrochloric acid were subjected to undergo severe corrosion as demonstrated in Fig. 7a. On the other hand, a soft surface with minimum damages have been observed in the case of the MS surface with the addition of DBTA (Fig. 7b), which demonstrate that the MS surface was adequately protected from corrosion in the presence of DBTA [26, 27].

Fig. 7
figure 7

SEM micrographs of mild steel in 1.0 M HCl solution at 30 °C

3.6 Quantum Chemical Studies

Theoretical calculations are exceptionally useful in obtaining more data on inhibition phenomenon. Inhibitory activation of an inhibitor is related with theoretical factors, for example: HOMO, LUMO, ΔE, η, σ, χ, and ΔN as shown in Eq. 8, and Mulliken charges on the atoms. These parameters could be observed through the optimization of the investigated inhibitor molecules [28, 29]. These parameters provide insight into to understanding the nature of interactions between metal and inhibitor. In the present study, all the quantum parameters were calculated for DBTA molecules. The quantitative values of the parameters are summarized in Table 2.

Table 2 Theoretical parameters for DBTA utilizing DFT-B3LYP/6-31G
$$\Delta N = \frac{{\emptyset - \chi_{\text{inh}} }}{{2(\eta_{\text{Fe}} + \eta_{\text{inh}} )}}$$

The optimized geometry of DBTA is shown in Fig. 8. The inhibitor efficiency can be recognized by HOMO and LUMO energies. The appropriate data of the frontier molecule orbital density for DBTA are displayed in Fig. 8.

Fig. 8
figure 8

Optimized structure, total electron density, EHOMO, ELUMO, and Fukui functions of DBTA molecules

The HOMO energy value exhibits the electron-donating capability of the inhibitor. The high-energy values of HOMO confirm that the inhibitor molecules have high affinity that can offer electrons to suitable acceptor molecules. The energy values of LUMO elucidate the electron-accepting ability from the alloy to inhibitor molecule. LUMO with the lower energy values expose that the inhibitor can accept electrons from the surface of alloy through back-donation. The energy gaps, ΔEE = ELUMO − EHOMO), with lower values demonstrate excellent inhibitive effectiveness of the molecules [30, 31]. According to the hardness and softness principle, a hard molecule is associated with low basicity and low electron-donating ability, and a soft molecule is associated with high basicity and high electron-donating tendency [32, 33]. This finding suggests that the inhibition efficiency increases with the increasing softness and decreases with the increasing hardness of the inhibitor molecules. η (hardness) and σ (softness) are also significant factors which provide information about the stability and reactivity [34]. ΔE for hard molecule is large, but for a soft one, it is low. Hence, the low value of η suggests a higher corrosion inhibition efficiency [35, 36]. As for inhibitor molecules (Fig. 8), Table 2 shows that the ΔE values for DBTA (6.798 eV) and the values of global softness (σ) with global hardness (η) in addition to the number fraction of electrons transferred (ΔN) for DBTA are in agreement with experimental results.

The resulting value of χ = 4.713,, as reported in Table 2, shows the high number of electron transfer, which also confirms that DBTA has the highest inhibition performance.

The number of transferred electrons (ΔN) gives information about the number of electrons a molecule can transfer to the acceptor molecule [37].

The following quantum chemical parameters were evaluated from the optimized molecular structure: the dipole moment (µ), the energy of the highest occupied molecular orbital (EHOMO), the energy of the lowest unoccupied molecular orbital (ELUMO), the energy band gap (ΔEgap = EHOMO ELUMO), the electron affinity (A), the ionization potential (I), and the number of transferred electrons (ΔN). According to the density functional theory, the energy of HOMO (EHOMO) is regarded as the ionization potential, and the higher magnitude indicates the greater donating ability of molecules to provide metal electrons. On the other hand, the energy of LUMO (ELUMO) is closely correlative with the electron affinity, and the lower value suggests the easier transfer of electrons from metal surface to inhibitor. The energy gap between HOMO and LUMO (ΔE) represents the stability of transition complex which determines the interaction between the adsorbed inhibitor and the metallic substrate [38].

EHOMO, ELUMO, Fukui functions, and the total electron density of DBTA values are displayed in Fig. 8. The quantum parameters EHOMO, EHOMO, and dipole moment are displayed in Table 2. The HOMO values symbolize the active centers that possess the interaction ability with surface of metal. This inhibitor has three active centers that are methanimine, 1,3,4-thiadiazole ring, and dimethylamine. LUMO has the ability to accept electrons from the metal through antibonding orbitals and form saturated bonds [39]. HOMO of high values imply the tendency to donate the electrons to an empty orbital [40]. ΔEs with low values indicate improved inhibitory activities [41]. As seen from Table 2, the energy value of HOMO has not differed significantly for DBTA, which means any observed variation in the adsorption strength could result from the molecular size parameters. The high-energy values of ΔE are in accordance with the nonspecific nature of the interactions of the inhibitor molecule with the surface of alloy. A relationship between inhibition efficiency for DBTA, and HOMO, LUMO, and μ are presented in Table 2. IE (inhibition efficiency) increases as HOMO energy increases and LUMO energy decreases. The increasing HOMO energy reveal higher tendency for the donation of electrons to the molecule with an unoccupied orbital [42]. As for the dipole moment (μ), inhibitor with high dipole moment tends to form strong dipole–dipole interactions with the metal, resulting in strong adsorption onto the surface of the metal and therefore leading to greater inhibition efficiency. Inhibition process may be elucidated according to the value of μ. It is a measure of polarity for bond. Adsorption of polar molecules with high value of μ on the metal surface ought to improve inhibition efficiency. DBTA molecule has μ equal to 4.591 and IE equal to 91%. The μ is another predictor for the distribution of electrons on the molecule. Some researchers reported that IE increases with the increasing values of the μ, which relies on the nature of molecules. There are a few studies in the literature describing the relation between μ and IE%, and in some cases, no significant relationship between these values has been identified [43, 44]. The adsorption orientations in this study were flat-lying because charge distribution was saturated all around the molecule [45]. In order to evaluate the reactive regions in terms of f + (nucleophilic) and f − (electrophilic) behaviors for the molecule, local reactivities have been analyzed by means of the FI (Fukui Indices). Figure 8 demonstrates that f − related with the HOMO locations, indicating the sites where the inhibitor molecules were adsorbed onto the surface of MS and the high values of f − are due to the presence of nitrogen atoms in the inhibitor molecules. Moreover f + related with LUMO locations, showing sites where the inhibitor molecules interact with nonbonding electrons of MS.

3.7 Mulliken Charges

Charges of Mulliken are important to evaluate the adsorption centers of the studied molecules. High negative charge explains the ability of the studied molecules to be adsorbed onto the surface of MS [46]. Nitrogen, sulfur, and some carbon atoms in the DBTA molecules have higher negative charges that indicate coordinating bonds with the metal as shown in Table 3 and Fig. 9. Therefore, nitrogen and sulfur atoms were the active centers, which have the ability to coordinate with the surface of MS. DBTA molecules may accept electrons from metal due to positive charges from carbon atoms which are often sites where nucleophiles could get attached to. Recently, some researchers reported that superior inhibitors have the ability to share (donate and accept) electrons with the metal [47,48,49].

Table 3 Mulliken charges of heteroatoms present in DBTA
Fig. 9
figure 9

The optimized chemical structure of DBTA molecules with atom numbers

4 Conclusions

The organic inhibitors of 4-Dimethylamino-benzylidene)-[1, 3, 4]thiadiazol-2-yl-amine (DBTA) with high efficiency showed excellent inhibition efficiency of 91% at 0.5 mM. The increase of inhibition efficiency can be attributed to the presence of 1,3,4-thiadiazole ring which plays an important role in enhancing the inhibition efficiency. A protective layer formed by new corrosion inhibitor of DBTA on the mild steel is proved by SEM measurements. The quantum chemical values and experimental results were observed to be working in harmony. The newly synthesized DBTA showed significantly improved mild steel corrosion resistance, which gives opportunities to determine the inhibitive activity of structurally similar compounds.