1 Introduction

Corrosion is an adverse event that causes huge economic and safety losses particularly during industrial acidic cleanings of the metallic materials. According to the most recent study conducted by NACE on corrosion cost, it has been estimated that recent annular cost of corrosion is nearly US $2.5 trillion which is equal to 3.4% of the global GDP [1, 2]. The heteroatoms predominantly sulfur (S), nitrogen (N), phosphorus (P), and oxygen (O) containing compounds those are associated with extensive conjugation in form of non-bonding and π-electrons have been used as most effective and economic corrosion inhibitors because of their ease of application and synthesis as well as high effectiveness [3,4,5]. The polar functional groups like –OH, >C=O, –CN, –NH2, –CONH2, –NO2 offer strong metal-inhibitor bonding that comes out in form of their high protection ability [5]. However, the synthetic inhibitors are non-environmental benign in nature as they have been synthesized employing toxic and volatile starting materials (chemicals) and solvents using conventional (hot plates) heating methods. Nowadays, microwave-assisted organic synthesis is in excellent demand because the microwave irradiation supplies heat under controlled condition that helps to reduce the reaction time commonly from days to hours, hours to minutes, and from minutes to seconds [5,6,7]. Recently, microwave irradiations are being utilized for the synthesis of organic compounds and nano-particles responsible for several industrial and biological activities [8, 9]. Generally, microwave-catalyzed reactions are completed in one step and associated with operational effortlessness, simplistic automation, and high reaction yield (or high atom economic) because of the lessening in the quantity of workup and decontamination steps. Water is a non-toxic, non-hazardous, non-inflammable, inexpensive high redox-stability and freely available solvent. MW irradiation in the combination of water as reaction medium satisfies both economically as well as environmentally aspects of the “Green Chemistry” [10,11,12].

Literature survey suggests that quinoxaline, 1,4-oxazine and 1,4-thiazine and 1,4-dioxin moieties show remarkable biological activities and are important precursor for the synthesis of important organic molecules (moieties) [13,14,15]. Conventionally, 10a-hydroxybenzo[b]indeno [1,2-e][1,4] oxazin-11(10aH)-one (CINH-1) has been synthesized by refluxing a mixture of ninhydrin and o-aminothiophenol using acetic acid [16] and 2-propanol [17] as solvents, whereas 11H-indeno[1,2-b]quinoxalin-11-one (CINH-2) was synthesized by the reaction of ninhydrin and o-phenylenediamine using ball milling method [18]. There is only one report available for the synthesis of 10a-hydroxybenzo[b]indeno[1,2-e][1,4]thiazin-11(10aH)-one (CINH-5) in acetic acid [16] and up to our literature search there was no report available for the synthesis of compounds CINH-3 and CINH-4. Moreover, the earlier reports available on the synthesis of investigated compounds are associated with lots of disadvantages such as implementation of toxic solvents, larger reaction time, huge energy consumption, tedious workup, and poor reaction yield (low atom economy).

In view of above, we herein reported the microwave-assisted aqueous phase synthesis of five heterocyclic compounds having nitrogen and oxygen (CINH-1 to CINH-4) as well as sulfur (CINH-5) atoms. Because of their association with homo- and hetero-aromatic as well as aliphatic rings along with several heteroatoms, the synthesized compounds (CINHs) can show strong bonding with metallic surfaces; therefore, they have been undertaken for their corrosion inhibition tendency towards mild steel acidic (1 M HCl) dissolution. Various experimental and computational methods were employed to manifest the adsorption and corrosion inhibition behavior of synthesized organic compounds on mild steel surface in 1 M HCl acidic solution.

2 Experimental

2.1 Synthesis and Characterization of CINH Molecules

The starting materials were obtained from commercial providers and were employed deprived of additional sanitizations. A generalized synthetic scheme for the reaction of ninhydrin and o-aminophenol is shown in Fig. 1. The reaction was previously reported by conventional heating method using isopropanol as solvent. In order to minimize the reaction time, we had attempted this reaction under microwave irradiation condition in same solvent at 300 W powers for 10 min. Figure 1 shows the testing at different microwave power starting from 300 to 800 W but no noteworthy alteration in the reaction time and yield was detected. Growth of reaction was supervised by TLC. After accomplishment of the reaction solid mass was precipitated and shows around 60% conversion of product and selectively only one isomer was obtained. The reaction was carried out in several solvents in order to select best one (listed in Table S1) and it was found that water represents the best solvent in which reaction was completed only in 1 min with around 95% yield. The melting points and spectral characterizations such as 1H NMR (500 MHz) and 13C NMR (126 MHz), FT-IR and elemental analysis were carried out as described in our previous article [19]. The NMR (1H and 13C) study was carried out in DMSO-d6 with tetramethylsilane as internal standard at 298 K. The 1H NMR spectra for CINH molecules are given in Fig. 2 while 13C NMR spectra are given in Fig. S1. Further informations about the CINH molecules are given in Table 1. The structures of reactants and products along with reaction time and percentage yield are listed in Table S2.

Fig. 1
figure 1

Synthetic scheme of investigated inhibitor molecules (CINHs)

Fig. 2
figure 2figure 2

1H NMR spectra of studied inhibitor molecules

Table 1 Chemical structures, IUPAC names, abbreviations, and analytical data of the investigated inhibitor molecules

2.2 Materials and Electrolyte

The protection abilities of the CINH molecules were tested for corrosive dissolution of mild steel that had the composition of (percentage) Al (0.023%), Si (0.026%), Cr (0.050%), Mn (0.192%), P (0.012%), C (0.076), and Fe (remaining). The metallic specimens were cleaned with the aid of SiC emery papers (600–1200 mesh size), washed with twofold deionized water and acetone and finally stored in desiccators before the application. Analytical grade HCl manufactured by MERCK India (37%) was diluted in water to formulate 1 M HCl solution. The 100 ml volume of the electrolyte was taken for weight loss, electrochemical, and surface investigation.

2.3 Methods

2.3.1 Weight Loss Experiments

The inhibition efficiency of the investigated heterocyclic compounds first of all determined using weight loss experiment method because of its high reliability, high reproducibility of the data and ease to perform. During the experiment, cleaned and weighted specimens of size 2.5 cm × 2.5 × 0.025 cm were dipped into 100 ml electrolytic with and without CINH molecules. Thereafter, the specimens were taken out and weighted accurately again in order to derive resultant weight loss at each studied concentration. The weight loss experiment at each studied concentration was triply performed in order to indemnify the reproducibility of the results. For each set of experiments, inhibition efficiency (η%) was calculated employing the following equation [19,20,21]:

$$\eta \% =\frac{{{w_o} - {w_{{\text{inh}}}}}}{{{w_o}}} \times 100,$$
(1)

where wo and winh denote the weight losses of the specimens dipped in 1 M HCl with and without CINH molecules, respectively.

2.3.2 Electrochemical Studies

In order to support the trend of inhibition efficiencies derived for investigated inhibitor molecules, electrochemical experimental was performed at the highest concentration of each CINH molecules. Galvanostat/Potentiostat with Model G-300 containing Gamry Echem Analyst 5.0 software for understanding of electrochemical data was employed for electrochemical studies. The instrument consists of three-electrode assembly similar to our previous reported papers. Exposed area of 1 cm2 of working electrode was selected for electrochemical measurements. Epoxy resin was used to cover remaining surface of the dipped specimen. The working electrodes (mild steel) were indorsed to disintegrate spontaneously in the test solution (1 M HCl) in the absence and presence of CINH molecules and their OCP versus time curves were recorded. The polarization curves were recorded for mild steel by automatically changing the working electrode potential from − 250 to + 250 mV with respect to the stable open circuit potential. The extrapolation of the linear segments of the polarization curves gives the values of corrosion current densities (icorr). The η% was calculated as follows [19,20,21]:

$$\eta \% =\frac{{i_{{{\text{corr}}}}^{0} - i_{{{\text{corr}}}}^{{{\text{inh}}}}}}{{i_{{{\text{corr}}}}^{0}}} \times 100,$$
(2)

where \(i_{{{\text{corr}}}}^{0}\) and \(i_{{{\text{corr}}}}^{{{\text{inh}}}}\) represent corrosion current densities derived for uninhibited and inhibited mild steel specimens, respectively, by extrapolation method. The protection efficiency of CINH molecules was also tested commissioning EIS study that employed an AC signal consuming frequency range of 0.01 Hz to 100 kHz and amplitude of 10 mV. The value of polarization resistance (Rp) was derived by fitting Nyquist plots derived for mild steel dissolution in 1 M HCl into an equivalent circuit. The percentage of inhibition efficiencies for CINH molecules at their optimum concentration was derived using following equation [19,20,21]:

$$\eta \% =\frac{{R_{{\text{p}}}^{{\text{i}}} - R_{{\text{p}}}^{0}}}{{{R^{\text{i}}}}} \times 100,$$
(3)

where R0p and Rip are the polarization resistances for mild steel corrosive dissolution in 1 M HCl in the absence and presence of CINH molecules, respectively.

2.3.3 Surface Studies

The chemical and electrochemical findings were further supported by scanning electron microscopy (SEM) and atomic force microscopy (AFM) surface study techniques. The metallic specimens were dipped into 1 M HCl for three hours in the absence and presence of CINH molecules. After that the specimens were removed and washed using water and acetone and finally analyzed by SEM and AFM methods. The Ziess Evo 50 XVP model was employed for the SEM analysis. The SEM micrographs were recorded at ×2000 magnification. NT-MDT multimode AFM (Russia model) was undertaken for AFM analysis. The 5 µm × 5 µm metallic surface area was scanned during AFM study.

2.3.4 DFT Studies

The DFT calculations were carried out for neutral as well as protonated from of CINH molecules in order to substantiate the results derived from weight loss, electrochemical (OCP, PDP, EIS), and surface (AFM, SEM) studies. The DFT study was carried out using Gaussian 09 at B3LYP/6–31+G(d,p) functional and few commonly employed basis sets. The values frontier molecular energies (ELUMO and EHOMO) were obtained from software while rest other DFT parameters were calculated using following equations as described in our earlier reports [19,20,21]:

$$\Delta E={E_{{\text{LUMO}}}} - {E_{{\text{HOMO}}}}$$
(4)
$$\chi = - \left( {\frac{{{E_{{\text{LUMO}}}}+{E_{{\text{HOMO}}}}}}{2}} \right)$$
(5)
$$\eta ={\left( {\frac{{{E_{LUMO}}+{E_{HOMO}}}}{2}} \right)_{}}$$
(6)
$$\sigma =\frac{1}{\eta }$$
(7)
$$\Delta {N_{110}}=\frac{{{\chi _M} - {\chi _{{\text{inh}}}}}}{{\left[ {2\left( {{\eta _M}+{\eta _{{\text{inh}}}}} \right)} \right]}}$$
(8)

where ∆E, χ, η, σ, and ∆N denote the energy band gap, global electronegativity, global hardness, global softness and fraction of electron transfer, respectively. Although most of the researcher utilized electronegativity of the iron (χFe = 7.0 eV) for the evaluation of fraction of electron transfer as per Eq. (8), however, most recently utilization of work function of iron is more common.

2.3.5 MD Studies

In this study, the Fe(110) surface with a slab of 5 Å was chosen for MD simulation in the present study as this iron surface is associated with high stabilization energy with highly packed structure. In order to provide larger surface area for metal-inhibitor interactions, the simulations were done under the simulation box of 24.82 × 24.82 × 35.69 Å3 that had 9Cl, 491H2O, 9H3O+ and inhibitor molecules. The simulations were constructed with the help of the Visualizer, Amorphous Cell and Discover modules implemented in BIOVIA Materials Studio® commercial software [22]. To reach a stable state, the simulation was performed at 303 K with a time step of 0.1 fs, NVT (fixed atomic number, system size, and temperature) ensemble, and a simulation time of 2000 ps until all the related dynamic variables exhibited no secular variation. The MD studies were performed using COMPASS force field. The extent of the interactions of the inhibitor molecules adsorbed on Fe(110) surface can be demonstrated by their interaction (Einteraction) and binding (Ebinding) energies derived using Eqs. (1) and (2) [23, 24].

$${E_{{\text{interaction}}}}={E_{{\text{total}}}} - \left( {{E_{{\text{surface+solution}}}}+{E_{{\text{inhibitor}}}}} \right)$$
(9)
$${E_{{\text{binding}}}}= - {E_{{\text{interaction}}}}$$
(10)

where \({E_{{\text{total}}}}\) signifies the energy of the total system; the \({E_{{\text{surface+solution}}}}\)denotes the entire energy of Fe(110) and electrolytic in the absence of CINH molecules, and \({E_{{\text{inhibitor}}}}\) denotes the whole energy of CINH molecules.

3 Results and Discussions

3.1 Weight Loss Studies

Table 2 and Fig. S2 represent the variation in the effectiveness of the investigated CINH molecules towards mild steel acidic dissolution with their concentrations. From the results, it can be seen that protection efficiencies of tested CINH molecules are increasing on increase in their concentrations and maximum increase was derived at 39.8 × 10−5 M concentration. At tested concentrations, the inhibition efficiencies of the tested CINH molecules obeyed the order: CINH-1 (82.38%) < CINH-2 (85.79%) < CINH-3 (88.63%) < CINH-4 (92.61%) < CINH-5 (95.45%). Careful observation of the results presented in Table 2 showed that minor rise in the efficiency of CINH molecules was detected on growing their concentration from 31.8 × 10−5 M to 39.8 × 10−5 M from which suggests that 31.8 × 10−5 M can be considered as the optimum concentration. It is important to mention that increase in the CINHs concentration beyond optimum concentration (31.8 × 10−5 M) did not result into any momentous variation in the protection ability of these molecules. The intermolecular force of repulsion and limited solubility of the inhibitor molecules come into the play for the negligible increase in the protection ability of the inhibitor molecules beyond optimum concentration [21, 25, 26]. Despite the presence of hydroxyl (–OH) group, CINH-1 molecule showed higher inhibition efficiency of CINH-1 molecule as compared to the CINH-2 molecule which is because of the presence of less electronegative second nitrogen atom and additional π-bond those can strengthen the adsorption ability of the CINH-2 molecule on metallic surface. On the other hand, the higher protection ability of CINH-3 as compared to CINH-1 and CINH-2 is because of the presence of two hydroxyl groups in the chemical structure of CINH-3 molecule. The CINH-4 and CINH-5 molecules are structurally similar and the higher protection ability of the CINH-5 molecule over CINH4 is attributed to the presence of relatively less electronegative sulfur atom in the chemical structure of CINH-5 molecule.

Table 2 Weight loss parameters derived for studied inhibitor (CINH) molecules at 308 K

The effect of temperature on the protection ability of the CINH-5 molecule is presented in Table 3. It can be understood that corrosion inhibition effectiveness of the CINH-5 molecule has significantly decreased on increased in temperature from 308 to 338 K. This reduction in the corrosion inhibition efficiency of CINH-5 molecule on raising temperature is because of the decreased intermolecular force of attraction between surface (metallic) and CINH molecules at higher temperature. Further, increase in solution temperature can also result into acid catalyzed inter- or intramolecular rearrangement, molecular etching, and molecular fragmentation that can further reduce the protection capability of the CINH molecules. The consequence of temperature on the protection ability of the inhibitor (CINH-5) molecule can be best represented by the Arrhenius equation [19,20,21]:

$$\log ({C_R})=\frac{{ - {E_a}}}{{2.303RT}}+\log A,$$
(11)

where CR is the corrosion rate in mg cm−2 h−1; Ea is the apparent activation energy for corrosion process; R and T are the gas constant and absolute temperature, respectively. The “A” represents the Arrhenius pre-exponential factor. The values of Ea for mild steel corrosion under inhibited and protected by CINH-5 molecule cases were intended from the slope of the Arrhenius plots plotted between log CR versus 1/T (Fig. 3). The calculated values of Ea were 30.51 and 83.44 kJ mol−1 in the absence and presence of CINH-5 molecule. The increased value of Ea in the inhibited case indicates that metallic dissolution has become difficult due to the formation of inhibitive film by CINH-5 molecule [27, 28]. Adsorption isotherm is perhaps the most important aspect of metallic corrosion inhibition in electrolytic solution which gives information about mechanism and mode of inhibitors adsorption (interaction) at the metal-electrolyte interfaces. In our present case, Temkin, Freundlich, and Langmuir adsorption isotherm models were tested in order to describe the CINH molecules adsorption at the interfaces (Table S3). The Temkin adsorption isotherm was best fitted with our weight loss experimental data that give relatively more linear plots for all investigated inhibitors. The value of Kads (adsorption constant) was calculated for all studied inhibitor molecules at different temperatures using the following equation [19,20,21]:

$${K_{{\text{ads}}}}C=~\frac{\theta }{{1 - \theta }}.$$
(12)

In the above equation, C is the concentration (in mole) of CINH-5 molecule and θ is the surface coverage. Based on the values of Kads, values of Gibb’s free energy (\(\Delta G{^\circ _{ads}}\)) were calculated at each studied temperatures using the following equation [19,20,21]:

$$\Delta G{^\circ _{{\text{ads}}}}=~ - RT~{\text{ln}}\left( {55.5{K_{{\text{ads}}}}} \right).$$
(13)
Table 3 Variation of CR, η%, Kads, and ∆G°ads values with temperature in with and without CINH-5 in 1 M HCl at 308–338 K temperatures
Fig. 3
figure 3

Arrhenius plots for the corrosion of mild steel with and without CINH-5 molecule

In Eq. (11), mathematical magnitude of 55.5 represents the aqueous concentration in acidic medium and all remaining symbols have their usual meaning. The calculated values of Kads and \(\Delta G{^\circ _{{\text{ads}}}}~\) for CINH-5 are presented in Table 3. The Freundlich, Langmuir, and Temkin adsorption isotherms are presented in Fig. 4. It is important to mention that a high value of Kads is reliable with high adsorption tendency of the inhibitor molecule at metal-electrolyte interfaces [29]. In our present study, values of Kads at different temperatures are in the range of 104 M−1 which indicate that the investigated inhibitor molecules have strong ability to adsorb at the interfaces. More so, it is also clear that Kads values are decreasing on increasing temperature which indicate that adsorption tendency of the CINH-5 molecule is decreasing along with the increase in temperature. The values of \(\Delta G{^\circ _{{\text{ads}}}}\) are related with their usual meaning i.e., from the nature of the metal-inhibitor interactions. The negative sign for the values of \(\Delta G{^\circ _{ads}}\) designates that adsorption of CINH-5 at the interface is spontaneous [30,31,32]. The values of \(\Delta G{^\circ _{{\text{ads}}}}\) are also related with the mode of metal-inhibitor interactions. According to the literature, the value of \(\Delta G{^\circ _{{\text{ads}}}}\) − 20 kJ mol−1 or more positive causes electrostatic or physical interactions between CINH molecules and the surface where as its value equal to − 40 kJ mol−1 or more negative is consistent with chemical interactions between them [30,31,32]. The values of \(\Delta G{^\circ _{{\text{ads}}}}\) for CINH-5 derived at several studied temperatures (Table 3) showed that adsorption of CINH-5 molecule at metal-1 M HCl interface involves physiochemisorption mechanism [33].

Fig. 4
figure 4

Langmuir, Freundlich, and Temkin adsorption isotherms for the adsorption of investigated inhibitors (CINH) molecules

3.2 Electrochemical Studies

The OCP versus time (for 50 min) curves for mild steel corrosion after 30-min immersion time are presented in Fig. 5. It can be seen that the curves were straight lines under both protected and non-protected conditions. This finding revealed that after 30-min immersion time steady state has been established and surface oxide has been completely removed. Careful inspection of Fig. 5 reveals that OCP versus time curves for inhibited metallic specimens are shifted towards more negative direction (towards cathode) as compared to the uninhibited OCP versus time curve without making any significant change in the nature of the curves. This observation reveals that CINH molecules predominantly act as cathodic-type inhibitors, i.e., they have relatively more sound effect on the cathodic reactions as compared to the anodic reactions [34, 35].

Fig. 5
figure 5

EOCP versus time (min) curves for mild steel dissolution under inhibited and uninhibited by CINH molecules

The potentiodynamic polarization (cathodic and anodic) curves are shown in Fig. 6 and common polarization parameters are given in Table 4. Results showed that the presence of CINH molecules in the test solution (1 M HCl) causes substantial alteration in the values of anodic and cathodic Tafel slope values and substantial decrease in the values of corrosion current density. The nature of CINH molecules can also be explained on the basis of shift in the value of Ecorr of inhibited mild steel specimens with respect to the Ecorr value of uninhibited mild steel specimen. Literature study suggests that the shift in Ecorr value less than − 85 mV is consistent with mixed type behavior of the inhibitor molecule without any selective effect on anodic and/or cathodic reactions. If the shift is more than − 85 mV then CINH molecules can be classified as anodic or cathodic type depending upon the direction of shift in the value of Ecorr. From Table 4, it can be seen that the shift in Ecorr values was − 81, − 100, − 98, − 97 a,nd − 96 mV for CINH-1, CNIH-2, CINH-3, CINH-4, and CINH-5, respectively [36, 37]. The very high negative (toward cathodic direction) shift of corrosion potential values of inhibited metallic specimens indicates that all studied compounds acted as cathodic inhibitors [38, 39].

Fig. 6
figure 6

Polarization curves for mild steel dissolution in 1 M HCl with and without CINH molecules

Table 4 Polarization parameters derived for studied inhibitor (CINH) molecules at their optimum concentration at 308 K temperature

Nyquist and Bode plots for corrosion of mild steel are presented in Fig. 7a, b. It can be seen that diameters of the inhibited Nyquist curves are much higher as compared to the uninhibited Nyquist curve which is an indication that in the presence of CINH molecules corrosion of metallic specimens becomes difficult owing the protective film formation by them [40]. Further, the Nyquist curves under inhibited and uninhibited conditions show single capacitive loop that designates that corrosion under both conditions involves the single charge transfer mechanism [40]. The single charge transfer mechanism of mild steel corrosion is also supported by single maxima of the inhibited and uninhibited Bode plots. In the present study, polarization resistance (Rp) was employed instead of charge transfer resistance (Rct) because the Rp is linked with several types of resistances such as pore resistance (Rpr), film resistance (Rf), and diffusion resistance (Rd) along with Rct that is Rp = Rpr + Rf + Rd + Rct [19]. Therefore, the use of Rp gives more information about the meta-inhibitor interactions as compared to the Rct. The Rp values for inhibited and uninhibited mild steel species were derived by fitting the Nyquist curves in an appropriate equivalent circuit as shown in Fig. 7c. From the evaluated Rp values, percentage of inhibition efficiencies for CINH molecules is evaluated and listed in Table 5 along with other EIS parameters. It can be seen that values of Rp are much higher for inhibited cases as compared to the Rp value of uninhibited case which indicates that CINH molecules adsorb at the metal–electrolyte interfaces and imposed strong barrier for polarization resistance. At the place of pure capacitor, the use of CPE (constant phase element) is highly anticipated because CPE is relatively much informative as compared to the pure capacitor. The impedance of the CPE (ZCPE) can be evaluated as follows [19,20,21]:

$${Z_{{\text{CPE}}}}=\frac{1}{{{Y_0}}}{\left[ {{{(j\omega )}^n}} \right]^{ - 1}}.$$
(14)
Fig. 7
figure 7

Nyquist (a), Bode (b) plots for mild steel corrosion in 1 M HCl. c Equivalent circuit used for interpretation of EIS data

Table 5 EIS parameters derived for studied inhibitor (CINH) molecules at their optimum concentration at 308 K temperature

In the above equation, Y0 represents the CPE constant; j and ω represent the imaginary number and angular frequency, respectively. The n denotes the phase shift value that is connected to the surface (metallic) morphology and nature of the CPE. A higher value of the n is connected with high surface smoothness and vice versa. From Table 5, it can be understood that values of n for inhibited cases are relatively higher than that of the uninhibited case which indicates that the surfaces corroded in the presence of CINH molecules are relatively smoother than that of the surface corrode without CINH molecules. The higher smoothness of the mild steel surfaces protected by CINH molecules was also supported by higher value of phase angle for the Bode plots (Fig. 7b) of inhibited mild steel specimens as compared to the uninhabited mild steel specimen. Further, the values of phase shift (n) close to unity for inhibited and uninhibited cases indicate that CPE in the present study acts as pseudo-capacitor as its (n) value equal to 1, 0, 0.5, and − 1 represents the capacitor (Y0 = C), resistor (Y0 = R), Warburg impedance (Y0 = W), and inductor (Y0 = 1/L), respectively [21, 41, 42]. The adsorption of CINH molecules at the metal/electrolyte interface resulted into the creation of electric double layer. The double layer capacitance (Cdl) was evaluated using the following relationship [21, 41,42,43]:

$${C_{{\text{dl}}}}~={Y_0}{\left( {{\omega _{\hbox{max} }}} \right)^n}^{{ - 1}},$$
(15)

where ωmax represents the frequency where imaginary segment of the impedance spectra acquired the highest magnitude (rad s−1). The calculated values of Cdl for inhibited and non-inhibited metallic specimens are listed in Table 5. It can be seen that Cdl value for protected metallic specimens by CINH molecules is relatively lower as compared to the non-protected mild steel specimen. This decrease in the Cdl values for inhibited metallic specimens is because of the increased thickness of the electric double layer owing to the adsorption of the CINH molecules at the interface of mild steel and electrolyte (1 M HCl).

3.3 Surface Morphological Studies

SEM and AFM images corroded for mild steel specimens are shown in Figs. 8 and 9. It can be seen from the same image of the mild steel specimen corroded in the absence of CINH molecules (Fig. 8a) that it is extremely corroded and damaged by the aggressive attack of the components of the acidic (1 M HCl) solution. However, it can observed that surface morphologies of the mild steel specimens corroded in the presence of CINH molecules (Fig. 8b–f) showed significant improvement in their surface smoothness. The improvement in the surface smoothness of the inhibited metallic specimens is attributed to the adsorption and formation of the protective surface film by CINH molecules which prevent and protect corrosive dissolution of the metallic surface. Further, careful observation of morphologies of the inhibited metallic surfaces revealed that order of the effectiveness of CINH molecules is consistent with the smoothness of the metallic surfaces. Similar to the SEM image, the AFM image of the uninhibited mild steel specimen is highly corroded and damaged with some mountain like appearance. The average surface roughness of uninhibited metallic surface was 390 nm. The high surface roughness (390 nm) of the uninhibited mild steel specimen is resulted due to the free acid attack or corrosion of the surface in the absence of the CINH molecules. Whereas in the presence of CINH molecules the surface morphologies of the mild steel specimens have been significantly improved because of the formation of protective film by CINH-1, CINH-2, CINH-3, CINH-4, and CINH-5 molecules. The average surface roughness of the protected metallic surfaces was 212, 184, 168, 146, and 132 nm for CINH-1, CINH-2, CINH-3, CINH-4, and CINH-5 inhibitor molecules, respectively.

Fig. 8
figure 8

SEM images of mild steel surfaces corroded for 3 h in 1 M HCl a in the absence and presence of b CINH-1, c CINH-2, d CINH-3, e CINH-4, and f CINH-5 inhibitor molecules

Fig. 9
figure 9

AFM images of mild steel surfaces corroded for three hours in 1 M HCl a in the absence and presence of b CINH-1, c CINH-2, d CINH-3, e CINH-4, and f CINH-5 inhibitor molecules

3.4 Computational Studies

The DFT parameters derived for CINH molecules in their neutral gaseous form using 6-31G and 6-311G basis sets and for their protonated forms using 6-31G basis set are itemized in Table 6. The frontier molecular orbital pictures (FMOs) of the neutral as well as protonated form of the CINH molecules derived using 6-31G basis set are given in Figs. 10 and 11, while those derived using 6-311G basis set for neutral CINH molecules are shown in Fig. S3. The molecular electrostatic potential (MEP) computed for CINH molecules is also presented alongside of their FMOs. From the FMOs electron distribution pictures, it is clear that HOMO and LUMO distributed practically over whole CINH molecules representing that almost whole molecules involve in the charge sharing. It is documented that an inhibitor with high value of EHOMO is a better electron/charge donor as compared to the inhibitor having lower value of EHOMO. Although the values of EHOMO did not show any regular trend, however the highest value of EHOMO for CINH-5 (6-311G; − 3.5279 eV) among the tested inhibitor molecules suggests that it has most electron donating ability that comes out in form of its highest inhibition efficiency [21, 41,42,43]. The value of ELUMO is allied with the electron-accepting ability of the inhibitor molecule. A lower value of ELUMO is unswerving with high electron accepting capability of the CINH (inhibitor) molecules. Using both the tested basic sets, values of ELUMO did not show any predicted trends. Energy band gap (∆E) which is a reactivity parameter can be used to correlate with the protection ability of the inhibitor molecule. A higher magnitude of ∆E (higher ELUMO and EHOMO gap) is connected with low chemical reactivity and low inhibition efficiency and vice versa [41,42,43]. In our case, the lowest value of ∆E for CINH-5 indicates that it is most reactive molecules among the tested inhibitor molecules and showed highest efficiency towards metallic corrosion inhibition in acidic medium. Lowest global hardness (η) and highest softness (σ) values for CINH-5 molecule further suggest that it is most reactive among the tested CINH molecules and therefore showed the highest protection ability. It can be seen that no regular trend was observed in the values of ∆N. However, maximum value of ∆N for CINH-5 indicates that it has highest ability to transfer its electron and act as best corrosion inhibitor [41,42,43]. Lastly, the magnitude of dipole moments has also been derived for five tested compounds and presented in the Table. It can be seen that using 6-31G basis set the values of dipole moment are increasing on going CINH-1 to CINH-5 while 6-311G basis set did not showed any predicted trend. Obviously, a high value of dipole moment indicates its high polarizability and thereby high molecular area that comes in the form of its high protection ability. The increased values of dipole moment on moving from CINH-1 to CINH-5 indicate polarizability of CINH molecules and thereby their protection abilities are increasing in the same order. It is recommendable that in aggressive acidic medium heteroatoms of the organic inhibitors may undergo protonation [44]; therefore, in present investigation we also performed DFT study on CINH molecules in their protonated form. The FMOs of protonated CINH molecules derived from 6 to 311G basis set are given in Fig. 11. The sites for protonation was derived using Mulliken charges of each atoms. Table S4 presents the Mulliken charges on CINH molecules.

Table 6 DFT parameters obtained for different studied inhibitor (CINH) molecules using 6-31G and 6-311G basis sets
Fig. 10
figure 10

Optimized, HOMO, LUMO, and MEP pictures of neutral form of the investigated inhibitor (CINH) molecules derived using B3LYP functional and 6-31G basis set

Fig. 11
figure 11

Optimized, HOMO, LUMO, and MEP pictures of cationic (protonated) form of the investigated inhibitor (CINH) molecules derived using B3LYP functional and 6-31G basis set

Recently, molecular dynamics (MD) simulations have demonstrated the maturity of computational strategies in teasing out interesting insights into mechanisms underlying interactions between inhibitor molecules and metal surface [45,46,47,48]. Though experimental studies provided highly significant information about the corrosion inhibition process, several publications have previously shown that a better theoretical understanding of the corrosion mechanism plays a relevant role in designing effective corrosion inhibitors directed against metal dissolution [49]. With advances in computation technologies, the ability to effectively simulate complex phenomenon and therefore provide a complete understanding of corrosion inhibitor function is now possible [50]. These goals can be achieved best at present via the use of Molecular Dynamics (MD) simulations which are used recently as a promising tool to generate a molecular understanding of processes related to the corrosion inhibition mechanism [51]. In the current study, MD simulations were performed for all used inhibitors using Discover module implemented in Materials studio software. The temperature and energy fluctuation curves are represented in Fig. 12. From the data in Fig. 12, it is ostensible that the system tends to equilibrium by the end of the simulation process. Figures 13 and 14 show the top and side views of the equilibrium configurations of the surface-adsorbed CINH molecules. When analyzing the equilibrium configuration of the five inhibitors adsorbed on Fe(110) surface, it is important to keep sight of the fact that the degree of coverage is a paramount factor to evaluate the corrosion inhibition performance. According to Fig. 13, it is clear that all inhibitor molecules were able to move gradually to Fe(110) in a parallel manner which can help ensure coverage of a maximum surface area of the corroded metal. Therefore, inhibitor molecules can adsorb more strongly onto the iron surface. Such visual findings propose the inhibitor molecules propensity to bind to the steel surface, which would lead to a more effective inhibition under current condition.

Fig. 12
figure 12

Temperature and energy equilibrium curves of the inhibitor molecules adsorbed on the Fe(110) surface in solution

Fig. 13
figure 13

Side views of the final adsorption of inhibitor molecules on the Fe(110) surface in solution

Fig. 14
figure 14

Top views of the final adsorption of inhibitor molecules on the Fe(110) surface in solution

Table 7 shows the binding (Ebinding) and interaction (Einteraction) energies of all inhibitors obtained under equilibrium conditions. As shown in Table 7, all inhibitor systems have significantly high values of binding energies. These findings are somewhat not surprising given the fact the previous experimental observations. Furthermore, inspection of the table shows that the interaction energy values follow the order of CINH-5 > CINH-4 > CINH-3 > CINH-2 > CINH-1, that is in well agreement with that of inhibition effectiveness. A strong negative value of interaction negative means that the adsorption of CINH molecules is strong, stable and spontaneous on Fe(110) surface [52, 53]. On the other hand, high magnitude of the binding energies for all inhibitor molecules indicates that they adsorbed through their more than one adsorption centers [54, 55].

Table 7 MD simulations indices for the adsorption of CINH inhibitors on Fe(110) surface

These findings broadly support the work of other studies in this area showing that the inhibition effect may have resulted from a combination of effects induced by π-electron and heteroatoms that play a critical role in several corrosion inhibition systems. In reviewing the literature, it appears that the presence of several reactive sites such as nonbonding electrons present on nitrogen and oxygen atoms of the inhibitor molecules along with functional groups enhances the tendency of corrosion inhibitors to donate/accept electrons to/from the iron surface [56]. One important point that emerges from our findings is that sulfur atom can guarantee durable interface interactions in between inhibitor (CINH) molecules and metal surface.

4 Conclusions

The protection ability of five newly synthesized organic compounds (designated as CINHs) towards mild steel acidic dissolution was carried out using chemical, electrochemical, surface, DFT, and MD simulation studies and it is concluded that:

  • All studied CINH molecules act as good inhibitors towards mild steel corrosion and their protection abilities follow the order: CINH-5 > CINH-4 > CINH-3 > CINH-2 > CINH-1. Their protection effectiveness increases with their concentration and acquired optimum concentration of 31.8 × 10−5 M.

  • Their adsorption at the interface of electrolyte and metal surface obeyed the Langmuir adsorption isotherm. Results also showed that their adsorption at the interface is strong and spontaneous.

  • Polarization study showed that CINH molecules block the active corrosive sites and behave as cathodic type of corrosion inhibitors.

  • Increased values of Rp in the presence of CINH molecules support their adsorption at the interfaces.

  • A noteworthy improvement in the surface morphologies of SEM and AFM images of inhibited specimens was observed and the smoothness of the surface morphologies is consistent with the order of inhibition efficiency.

  • Experimental results were supported by DFT studied carried out for protonated and neutral form of the CINH molecules. DFT parameters showed that CINH molecules show strong interactions with metallic surface and consistent with experimental finding.

  • The adsorption and orientation of the CINH molecules on Fe(110) surface was studied using MD simulations method which showed that CINH adsorb by their flat orientations and act as efficient corrosion inhibitors.