1 Introduction

Due to the excellent electronic, mechanical, thermal, and optical properties, carbon nanotubes (CNTs) have attracted great attention in physics, chemistry, material science, nanotechnology, and nanoscience, which can be useful for many technologically important purposes [1]. One of their applications seeming to be rather promising in the near future is the protection of metals from corrosion. Protection of metals from corrosion is a basic concern for many industries [2,3,4,5]. One of the most effective methods for protection of metals is the employment of inhibitors [6, 7]. There are a range of organic inhibitors such dyes, ionic liquids, glycine derivative, bis-thiadiazole derivatives, n-alkyl-quaternary ammonium salts, pyridine derivatives, amino acids, and surfactants which tend to decrease the corrosion rate in acidic solutions [6, 8,9,10,11,12,13]. Recently, a few conflicting theories have been offered to define the role of CNTs in corrosion inhibition mechanism of polymer coatings [14,15,16]. Kumar and Gasem [14] investigated the use of functionalized CNTs as reinforcement to enhance the mechanical and corrosion performances of polyaniline (PANI) coatings for the protection of mild steel. Images of the fabricated PANI/CNTs composites proposed superior dispersion of CNTs in PANI matrix. Polarization curves, and electrochemical impedance showed that PANI/CNTs nanocomposite coatings are potentially employed as anti-corrosive coatings for mild steel against corrosive environment. In a similar work, Birbilis and colleagues [17] reported the electrochemical corrosion behavior of graphene coatings upon Ni and Cu. Based on their results, graphene-coated samples can supply a barrier to metal dissolution and enhance corrosion protection of metals [17]. However, the usage of CNTs in solid/liquid interface studies is prevented by a major problem. CNTs are naturally hydrophobic, and due to their large specific surface area and considerable van der Waals attractions between the tubes, CNTs tend to self-aggregate spontaneously, and it is very difficult to disperse homogeneously in aqueous solution. In recognition of this problem, chemical modification and functionalization have been explored to disperse CNTs and use them in aqueous media. Using surfactant to stabilize CNT suspension is one of the efficient approaches [18]. The hydrophobic tail adsorbs onto the nanotube surface via π–π stacking, van der Waals, and charge-transfer interactions, while the hydrophilic part of the molecules imparts aqueous solubility [19]. Such interactions essentially lead to noncovalent adsorption of surfactants onto CNTs, providing some net negative or positive charges on the tube surface and resulting in an increased solubility of the CNTs in aqueous solution [19]. Most of the surfactants used in the industries are composed of some compounds that are toxic and have been presently facing a lot of criticisms due to their threat to human and their environments [20]. The objective of the present investigation is to explore the dispersing and inhibitory properties of CNTs using ester-containing gemini surfactants as a nontoxic and biodegradable corrosion inhibitor on mild steel in hydrochloric acid. Most cationic surfactants have higher aquatic toxicity, but gemini surfactants with ester bonds inserted between the positively charged head groups and the hydrocarbon tails cause more hydrolysis and biodegradation properties and less toxicity [6, 17]. The inhibitory effect of some the new sensitized ester-quat surfactant on the corrosion behavior of metal in HCl solution was studied by El Achouri and colleagues [21]. It has been shown in their work that these compounds are good corrosion inhibitors, and the high inhibition efficiencies were reported around their critical micellar concentrations [21]. Surfactants can modify the particles–suspending medium interface and prevent aggregation over long time periods [22]. Reasonable amount of research work has been reported on the fabrication of surfactant–nanotube complexes for various applications because of their good mechanical and electrorheological properties [19, 23, 24]. To the best of our knowledge, there has been no detail on the utilization of surfactant–nanotube complexes as anticorrosive materials to date. The effect of CNTs on the corrosion behavior is not well understood, and it is not clear whether the CNTs could improve the corrosion resistance due to the formation of stable film [25, 26]. However, CNTs may lead to adverse electrochemical effects, coupled with conductive metal structures and further corrosion [25]. Our results verify that dispersion of CNTs using surfactants not only controls the corrosion rate but also increases the inhibition efficiency. The effect of ester-containing surfactants as dispersing agents for multiwalled CNTs (MWCNTs) in aqueous solution is studied. The purpose of this research is to investigate the inhibition efficiencies of monomeric betainate surfactant and two types of ester gemini surfactants— dodecyl esterquat gemini (ET) and dodecyl betainate gemini (BT)—in detail, and then noncovalent functionalizations of CNTs with ester-containing surfactants are investigated as corrosion inhibitors, and the related results are compared to those of the pure surfactants.

2 Experimental Section

2.1 Materials and Sample Preparation

The ester-containing gemini and monomeric surfactants (Scheme 1) were prepared according to the previous reports [27].

Scheme 1
scheme 1

The structure of ester-containing surfactants [27]

Tetradecyltrimethylammonium bromide (TTAB) and hydrochloric acid (HCl) were purchased from Merck Company. The mild steel sheets (its composition: 0.081 wt% C, 0.020 wt% Si, 0.40 wt% Mn, 0.0098 wt% P, 0.0094 wt% S, 0.056 wt% Al, 0.031 wt% Ni, 0.0061 wt% Co, 0.028 wt% Cu, and remainder iron) of 1 × 1 cm2 were abraded with a series of emery paper (220–600–800–1000–1200–2000 grades) and then washed with acetone and deionized water. MWCNTs were obtained from Neutrino Company. Afterward, the working electrode was immersed in electrochemical cell containing aggressive solutions with different concentrations of the studied inhibitors. All electrochemical tests were done after immersion time of 90 min. Dispersions of MWCNTs were prepared by adding 5 mL of aqueous dispersant solutions at different surfactant concentration to 1 mg of pristine MWCNTs. The samples were first stirred for 6 h and then sonicated for 100 min (25% of 670 W), and finally were centrifuged at 3000 rpm for 10 min to remove large bundles of MWNTs. Based on the studied literatures [28, 29], applying sonication for a long time does not only consume too much power, but it will also introduce defects which undermine CNT properties. Therefore, it is critical to find the sonication conditions which maximize the MWCNT dispersion with the minimum amount of damage. Based on the obtained results (supporting file, S1), more nanotubes are dispersed by increasing the sonication time. The optimal time is 100 min and the amount of dispersion will be decreased after reaching the optimal time.

2.2 Methods

2.2.1 Dispersed MWCNTs’ Analyses (UV–Visible, TGA, Z-Potential, and Raman Analyses)

The UV–vis absorption spectra of various concentrations of surfactants in the presence of MWCNTs were recorded on a Shimadzu model UV-160A spectrophotometer using a matched pair of glass cuvettes with 1-cm optical path length. Thermal stability of noncovalent functionalization of CNTs with ester-containing surfactants was analyzed by thermogravimetric analysis (TGA) using Dupont, 951TA. Measurement of Z potential was also employed by means of Malvern, MRK825-02, UK. The Raman characterization was carried out on an Almega Thermo Nicolet Dispersive Raman Spectrometer, using Nd-YLF laser 532 nm. Laser power is 100 mW, but 30 mW was used in order to keep the samples in safe condition.

2.2.2 Electrochemical Measurements (EIS and PDP)

A typical three-electrode cell—with platinum as counter electrode and an Ag/AgCl as reference electrode—was employed for electrochemical experiments. Electrochemical impedance measurements (EIS) were carried out at the open-circuit potential (Eocp) with the AC voltage amplitude of 10 mV in the frequency range from 100 kHz to 10 mHz. All electrochemical tests were performed using potentiostat/galvanostat EG & G model 273 connected to a personal computer. The potential of potentiodynamic polarization (PDP) curves was scanned from − 250 mV versus OCP to 250 mV versus OCP at a sweep rate of 0.5 mV s−1. The OCP time was 60 min for our experimentation.

2.2.3 Surface Observation (SEM, EDX, XRD, and ATR–FTIR)

Immersion corrosion analysis of mild steel samples in acidic solutions with and without inhibitor was performed using scanning electron microscopy (SEM) with energy dispersive X-ray spectroscopy (EDX) analysis (Veeco, CP-Research). X-ray powder diffraction (XRD) measurements were performed using a Philips Xpert diffractometer with Co Kα radiation (1.78897 Å), over the 2θ range 10°–90°. Fourier transform infrared (FTIR) measurements were carried out on a Nicolet iS10 FTIR spectrometer at room temperature. FTIR was applied to investigate the surface after immersion in solution for a specific time using the attenuated total reflectance (ATR) technique.

2.2.4 Computational Approaches

All calculations were carried out by means of the electronic structure package GAMESS, using density functional theory (DFT) method in B3LYP level of theory and a 6-31G* basis set. The optimized geometries have been used to calculate the parameters reported in this study. CNT model which consists of 340 atoms (saturated with hydrogen atoms) has been used.

3 Results and Discussion

3.1 Colloidal Stability and Characterization of the MWCNTs Dispersions

Ester-gemini surfactants have high capability to disperse MWCNTs due to the long and more flexible chains. The use of ionic surfactants stabilizes electrostatic repulsions between them and the nanotube colloids. UV–vis absorption results at 500 nm are shown in Fig. 1. As the results show, the optimal concentrations of both BT and ET are 1.5 mM; however, BT has more dispersing ability compared to ET at aqueous solutions. The position and direction of ester bonds toward the cationic head group of the surfactants have significant effects on the amount of MWCNTs’ dispersion.

Fig. 1
figure 1

UV–visible absorption versus MWCNTs suspended at different surfactant concentrations

The ester bonds were either with the ester carbonyl group away from the positive charge for ET structure while facing the positive charge for BT type. In BT arrangement, vicinity of the partially negative carbonyl groups and positive quaternary ammonium causes the positive charge to depart from the quaternary ammonium leaving less repulsive electrostatic interaction between the head groups. Consequently, it causes more molecules put on the tubes surface and less aggregation between CNTs is archived. The results are in agreement with our previous work which indicated that the position of ester bonds in alkyl tail plays an important role in aggregation behavior of pure ester-containing gemini surfactants, physicochemical properties, and their binary mixed system with anionic surfactant in the presence of KCl [30]. As shown in Fig. 1, there is a minimum point at low concentrations. This behavior relates to the different direction of surfactants on CNTs surface. At low concentrations, ester-containing surfactants place randomly on the surface, while by increasing the concentrations, a compact film of surfactants is occurred on the surface and causes to increase the amount of absorption. According to our pervious papers; the presence of CNT gives rise to surfactant molecules stability in the solution, which means the surfactant molecules have a low tendency for the presence in the air/solution interface and prefer to attach to the CNT surface randomly. When the CNT surface has been saturated, the additional surfactant molecules migrate to the air/solution interface. With the increasing concentration of the surfactants and when the air/solution interface has been saturated, any further addition just results in the formation of more and more micelles. The same behavior is also reported for sodium dodecyl sulfate (SDS) by some other researchers [31]. They showed that SDS amount has a key role on CNTs dispersion so that the molecules orientation was changed from accidental to ordered (hemimicelles and admicelles) by further surfactant concentration. It is also shown that monomeric surfactants were quite good MWNT dispersants at room temperature although gemini surfactants can disperse nanotubes at much lower concentrations than monomeric surfactants. A comparable conclusion has been already highlighted in another study where gemini surfactant hexyl-α,β-bis(dodecyldimethylammonium) bromide disperses CNTs at concentrations well below its CMC compared to its single-tailed analog [19]. The authors attributed this CNT dispersing ability to the stronger adsorption ability, higher charge capacity and compact alignment on the nanotube surface of the gemini than the single tailed surfactant [19]. This hypothesis is also supported by other research groups [1, 19, 32] who described the superior ability of gemini surfactants to disperse CNTs as a result of much stronger hydrophobic interactions between the two hydrocarbon chains and the hydrophobic surface of nanotubes. The interactions among nanotubes and surfactants are physical, and there is no chemical reaction between them. FTIR results (supporting file, S2) verified that no relocation is accorded at the position of the related peaks before and after surfactant addition to the nanotubes. The strong peak at about 2900 cm−1 is largely devoted to the symmetric stretching vibration mode of –CH–. The asymmetric bending vibration of –CH3 was found at 1400 cm−1. The peak around 1640 cm−1 correspond to –C=O– stretching vibration. A wide band near 3400 cm−1 is probably attributed to the –OH stretching from water. The damage of the CNTs was also monitored by Raman spectroscopy. Both pure CNTs and dispersed nanotubes with surfactants has two peaks at 1350 cm−1 (D-band) and 1580 cm−1 (G-band) which belongs to sp2 vibration of C atoms and surface defects in CNT structure, respectively. According to our consequences, IG/ID intensity of both nondispersed and dispersed CNTs didn’t change noticeably (supporting file, S3) that confirmed the physical adsorption occurs between CNTs and surfactants. Z-potential is also used to investigate the stability of dispersed CNTs. CNTs surface was charged due to the adsorption of surfactants. Based on the literatures [22, 33, 34], the high values achieved from Z-potential verified that the solutions are almost stable. The attained values of ester-containing surfactants are summarized in Table 1.

Table 1 Z-potential values of dispersed MWCNTs by ester-containing surfactants

As is shown, the high potential values verified the stability of the solutions. Carbonyl group is placed near to nitrogen in BT molecules. The interaction between negative charge on carbonyl group and positive charge on nitrogen decreases the resonance intensity in the whole molecule compared to ET arrangement. So, C=O bond strength of BT is weaker than ET. As explained above, the potential value of ET is a little bite more than BT because of their structures and different resonance ability. To study more on surfactant/MWCNTs mixed behavior, thermal gravimetric analysis (TGA) is applied (supporting file, S4). As the results showed, nanotubes were stable near to 550 °C and being decompose upper it [35]. But, ester-containing surfactants disintegrated between 150 and 300 °C. In agreement with the previous results, it is an evidence of surfactants adsorption on nanotubes.

3.2 Application of Surfactant-Suspended Nanotubes as Corrosion Inhibitor in Corrosive Medium

3.2.1 Electrochemical Impedance Spectroscopy and Tafel Polarization Measurements

As mentioned, organic molecules are widely applied as corrosion inhibitor. In the present study, solid/liquid interface behaviors of three cationic-sensitized surfactants are studied, and the results have been compared with the efficiency of noncovalent functionalization of CNTs with ester-containing surfactants. Electrochemical impedance spectroscopy (EIS) and Tafel polarization measurements are carried out to investigate the inhibition efficiencies of BT and ET at different concentrations. The Nyquist and Bode plots of mild steel in inhibited acidic solutions of the inhibitors are shown in Fig. 2 (and supporting file, S5).

Fig. 2
figure 2

Nyquist plots for mild steel in 2 M HCl solution containing different concentrations of a dodecyl esterquat gemini, b dodecyl betainate gemini, and c dodecyl betainate monomer

As the results showed, both gemini surfactants decreased the steel corrosion rate, and there is no noticeable difference between their inhibition performances especially at low concentrations. However, direction of ester bond in ester-containing cationic gemini surfactants influences the inhibition properties at high concentrations. The ester bond is closer to the quaternary ammonium in BT structure and results in better interaction with the steel surface and also leads to higher efficiency. Also, less repulsion occurred among the head groups due to the interaction between negative charge on carbonyl group and positive charge on nitrogen, and consequently, more molecules are dispersed to cover the steel surface. According to Fig. 2, gemini surfactant has higher efficiency compared to the monomer due to the stronger interaction through their head groups and more hydrophobic interaction within their hydrocarbon chains. The diameter of semicircles increased more with the increasing inhibitor concentration till reaching an optimal concentration, which indicates the adsorption of the molecule onto the metal surface. The impedance spectra are investigated by fitting the experimental data to the one- or two-time constants as shown in Fig. 3. With regard to the Nyquist and Bode plots, the impedance curves were fitted to the one-time constant at lower surfactant concentrations (Fig. 3a). At high concentrations, deviation from the semicircular may suggest formation of a more compact surface film (Fig. 3b) corresponding to the two-time constants in Bode plots (supporting file, S5) [3, 6].

Fig. 3
figure 3

Electrical equivalent circuit diagrams used for modeling steel/solution interface in 2 M HCl solution in a one-time constant and b two-time constants

The first time constant at high frequencies is related to the charge-transfer resistance (Rct), which can be attributed to the electron-transfer reactions occurring in the mild steel–solution interface, and the other time constant at low frequencies can be characterized by the film resistance (RF), which corresponds to the adsorption of inhibitor. The corresponding corrosion resistance is equivalent to the sum of charge-transfer and layer resistances, R = Rct + RF. As shown in Fig. 2, an increase in resistance values was found by increasing the surfactant concentration. The monomer forms of surfactant are individually adsorbed with a low coverage percentage on the steel surface.

Increasing surfactant concentration leads to higher degree of coverage and consequently higher corrosion inhibition. According to Fig. 3b, constant-phase element (CPE) was used instead of double-layer capacitance (Cdl) in the equivalent circuits in order to fit the data more accurately. CPE is the capacitance of the electric double-layer at the electrode/electrolyte interface. CPEs have been used extensively to account for deviations brought about by surface roughness. The impedance of CPE is given by following equation:

$$Z_{\text{CPE}} = \frac{1}{{Y_{0} }} \times \frac{1}{{(j\omega )^{n} }},$$
(1)

where Y0 is the magnitude of the CPE; n is the CPE exponent (phase shift); ω is the angular frequency (ω = 2πf, where f is the AC frequency); and j here is the imaginary unit. The correction of capacity to its real values is calculated from Eq. (2):

$$C_{\text{dl}} = Y_{0} (\omega_{\hbox{max} } )^{n - 1} ,$$
(2)

where ωmax is the frequency at which the imaginary part of impedance (Zim) has a maximum value.

According to Table 2, double-layer capacitance values are decreased with the increasing inhibitor concentration indicating the interaction between surfactants and the solid surface. The resistances were used to calculate the inhibition efficiency (IEE %) and surface converge (θ) from the following equations [6, 36]:

$${\text{IE}}_{\text{E}} \;(\% ) = \theta \times 100,$$
(3)
$$\theta = \frac{{R - R^{0} }}{R},$$
(4)

where R0 and R are total resistances in the absence and presence of the inhibitor, respectively. As seen from Table 2, the inhibition efficiency increased with the increasing surfactant concentration. The increase in inhibition efficiency can be attributed to the reduction in local dielectric constant and the growth in the thickness of the electrical double layer, signifying that the molecule acts by adsorption at the metal/solution interface. The carbonyl group’s effect on the inhibition behavior of ester-containing surfactants is analyzed by comparing the results with the conventional surfactant, TTAB, with the same hydrocarbon chain but without carbonyl group. Based on Table 2, no obvious difference is observed between ester-containing surfactants and TTAB. The inhibition mechanism can be ascribed to the adsorption of inhibitor on the steel surface. The surfactants exist as the anion inorganic part (Br) and the cation organic part in aqueous acidic solutions. The anions of Br could be specifically adsorbed onto the surface, and the ammonium groups (N+) could be adsorbed onto the negatively charged species through electrostatic and chemisorption attractions. Tafel polarization measurements were also made to supplement and confirm the data obtained from EIS measurements. The PDP curves for mild steel in 2 M HCl solution are shown in Fig. 4.

Table 2 Electrochemical parameters of impedance, potentiodynamic polarization results, and the corrosion inhibition efficiencies of inhibitors in 2 M HCl
Fig. 4
figure 4

Potentiodynamic polarization curves for mild steel in 2 M HCl solution with different concentrations of a dodecyl esterquat gemini, b dodecyl betainate gemini, and c dodecyl betainate monomer

From the present responses recorded and using the electron-transfer kinetic theory (Tafel theory), kinetic parameters associated with the rate(s) of the corrosion reaction(s) were found in the presence and the absence of surfactants. The values of associated electrochemical parameters, i.e., corrosion current density (icorr), corrosion potential (Ecorr), cathodic Tafel slopes (bc), anodic Tafel slopes (ba), and percentage of inhibition efficiency (IEP %) values were calculated from the polarization curves and are listed in Table 2. The inhibition efficiencies (IEP) at different inhibitor concentrations were calculated from the following equations [6]:

$${\text{IE}}_{\text{P}} \;(\% ) = \theta \times 100,$$
(5)
$$\theta = \frac{{i_{\text{corr}} - i^{\prime}_{\text{corr}} }}{{i_{\text{corr}} }},$$
(6)

where icorr and \(i^{\prime}_{\text{corr}}\) are uninhibited and inhibited corrosion current densities, respectively.

It can be observed from Table 2 that IEP % increased with the increasing inhibitor concentration, and more inhibition efficiency is achieved for gemini surfactants compared to monomeric one. These results also confirm the findings obtained from EIS measurements. The studied inhibitors cause change in the anodic and cathodic Tafel slopes and no definite trend was observed in Tafel slope values in the presence of different inhibitor concentrations, suggesting that these compounds behave as mixed-type inhibitors. It is concluded that the reactions of anodic and cathodic were both inhibited by the inhibitor through entirely occupying the reaction sites of mild steel surface. The change in Ecorr values with the addition of the inhibitor is often a useful indication of which the reaction is more affected. Based on literature reviews [37, 38], an inhibitor can be classified as an anodic or cathodic type when the change in Ecorr value is larger than 85 mV. Anodic reaction of corrosion is the passage of metal ions from the metal surface into the solution, and the cathodic reaction is the discharge of hydrogen ions to produce hydrogen gas or to reduce oxygen. In the present study, most displacements are lower than the value which can be concluded that the studied inhibitors act as a mixed type inhibitor. In some cases, Ecorr was shifted toward more negative potentials. This indicates that the compounds involve cathodic reaction more than anodic reaction.

After studying the inhibition performance of pure ester-containing surfactants, noncovalent functionalization of CNTs with ester-containing surfactants were also considered as inhibitors and very promising results were reported. According to Holmberg findings [27], this type of ester bond is extremely stable against acid solutions. The UV–vis absorption spectra of surfactant–nanotube complexes are taken before and after adding acid solution (supporting file, S6). As the results showed, the overall process of absorption was not changed which verified the stability of the studied solutions. In the case of gemini surfactants, the dispersion is ensured at lower concentration, by stronger hydrophobic interactions between the two alkyl chains and the CNT backbone and the higher charge capacity per single molecule of surfactant. As a result, surfactants prefer to more adsorb at the CNTs/solution interface and less tendency to be positioned at the solution/air interface. In this way, the studied molecules increase the dispersing amount of MWCNTs. EIS and Tafel measurements (Fig. 5 and supporting file, S7) displayed that surfactant–nanotube complexes can absorb onto the steel surface and decrease the corrosion rate. The metal and CNTs were covered by Br species and cationic part of surfactants, respectively. At low concentrations, surfactants prefer to adsorb onto CNTs and less metal surface areas are covered by the inhibitor which corresponds to higher corrosion rate. At high concentrations, both surfactants and surfactant–nanotube complexes have high tendency to be positioned at solution/metal interface and decrease the corrosion rate.

Fig. 5
figure 5

Nyquist plots for mild steel in 2 M HCl solution containing a dispersed MWCNTs by dodecyl betainate monomer, and b dispersed MWCNTs by dodecyl betainate gemini

The net result is that the surfactants can more cover the metal surface and increase further inhibition efficiency by dispersing MWCNTs and producing surfactant–nanotube complexes. Since pure CNTs can accelerate corrosion rate [25], then the addition of surfactants improves inhibition efficiency. Based on the other researches [39, 40] and as Scheme 2 presents, the arrangement of surfactants on MWCNTs surface is accidental at low concentrations, and more steel surface areas are exposed to the corrosive protection.

Scheme 2
scheme 2

Schematic diagram of surfactant orientations on nanotubes

With the increasing mole fraction of surfactants and through van der Waals forces, the molecules stand more compacted, forming hemimicelles and admicelles upon the nanotubes which improved the interaction between the surfactants and the steel surface. More metal surface might be covered by both surfactants and surfactant–nanotube complexes at this region. Further increase in surfactant concentrations contributes to the aggregates’ formation in solution, force on MWCNTs, and enabling them get closer to each other. At higher concentrations and after reaching to the optimal concentration, the amount of dispersion would be constant due to the repulsive forces between adjacent molecules. The same behavior of surfactant addition on CNTs dispersion has been achieved by some other groups [39, 40]. Time effect is as well studied to have a better approach on the stability of surfactant and surfactant–nanotube complexes at the optimal concentration for the best inhibitor. The steel samples were first placed in surfactant and surfactant/MWCNTs suspensions separately for 90 min and after washing with distilled water, were dipped in 2 M HCl solution at various exposure times (t = 0, 2 h, 6 h and 18 h). Then, EIS was applied to study the corrosion behavior. According to the Nyquist plots (supporting file, S8), corrosion inhibition efficiency has an appropriate procedure by increasing the immersion time which verify the steady absorption of inhibitors on the steel surface. It can be observed that the resistance results have acceptable values at different times. It is obvious that at lower immersion times the Nyquist diagrams are not perfect semi-circles; deviations of this kind are often related to the change on the morphology of the electrode surface arising from interfacial phenomena or surface roughness. In these cases, Nyquist plots are composed of two-time constant. The first time constant at high frequencies can be described to the charge-transfer resistance, which corresponds to the electron-transfer reactions occurring in the mild steel/solution interface, and the other one at low frequencies is related to the film resistance, which can be ascribed to the adsorptions of inhibitor and other accumulated kinds. At higher immersion times, the film resistance can overcome the other resistance due to the stronger adsorption. Higher immersion time offers better conditions for forming the protective films with higher protection behavior due to the growth of much thicker and less defective films. The results of immersion time effect are in agreement with the same other works [41, 42].

3.2.2 Surface Characterizations (ATIR, EDX, and SEM Studies)

ATR–IR is used to have a better approach in corrosion inhibition procedure (Fig. 6a). The related peaks are observed for pure surfactants. It is found that the peak intensity is decreased after they are immersed in MWCNTs’ suspensions.

Fig. 6
figure 6

a ATR–FTIR spectra of mild steel in the presence of surfactants with and without MWCNTs, b solid-state UV–vis spectra of mild steel surface without and with the studied compounds, and c XRD patterns of the steel surface without and with the dispersed CNTs after 12 h

This indicates that there is an interaction between the steel surface and dispersed MWCNTs by surfactants. Adsorption of surfactant–MWCNTs suspensions on the steel surface occurred through the missing bond and bond strength reduction. The same results are achieved by other groups [8, 10]. These research groups used FTIR to verify the adsorption of nonionic surfactant [10] and protein–surfactant aggregate [8] as corrosion inhibitors on different surfaces. Solid-state UV–vis spectroscopy and XRD methods were also used for structural analyses of metal surface and species involved in inhibition process. The absorption spectrum of the steel surface without any compounds (bare electrode), with pure surfactants, and with surfactant–MWCNTs suspensions are shown in Fig. 6b. Since the surfactants have no signal on UV–vis spectrum, the related peak corresponds to the dispersed CNTs which absorb onto the steel surface. A similar peak is also reported for CNTs in interaction with biological systems by Falahati and colleagues [43]. Based on Fig. 6c (and supporting file, S9), XRD was used to analyze the material composition of the steel surface without and with the dispersed nanotubes. The iron is only detected on the surface for the blank steel sample, while the related peaks are observed in the presence of surfactant–MWCNTs complexes. The EDX spectra of uninhibited and inhibited steels are shown in Fig. 7a and b, c, respectively. The EDX spectra of the inhibited steel contains more “O” which corresponds to the element present in the inhibitor molecules. Reduced intensity of “Fe” peak in inhibited steel also verified the adsorption of gemini surfactant onto the surface.

Fig. 7
figure 7

EDX spectra of mild steel specimens after immersion a with MWCNTs, b dodecyl betainate gemini, and c dispersed MWCNTs by dodecyl betainate gemini

In order to further characterize the influence of the studied compounds, the morphologies of mild steel surface immersed in the corrosion solution, in the presence of ester-containing surfactant and surfactant-suspended nanotubes at the optimal concentration are displayed in Fig. 8.

Fig. 8
figure 8

SEM images for the mild steel surface in 2 M HCl a without surfactant, b with dodecyl betainate gemini, c dispersed MWCNTs by dodecyl betainate gemini, and d dispersed MWCNTs by dodecyl betainate monomer

SEM images show that gemini surfactants cover the steel surface against the corrosive medium, and the same results are archived for the surfactant/nanotubes’ suspensions. Smaller scale pictures verify the adsorption of inhibitors onto the surface; especially Fig. 8d shows CNT on the surface. Same SEM results are reported in some other research papers [44,45,46].

3.2.3 Computational Approaches

Quantum chemical calculations were also done to see the relation between the studied surfactant structures and their tendency to adsorb on the steel surface [47]. DFT method is extensively used to connect some experimental concepts with quantum-mechanical quantities. As shown in Fig. 9, the optimized geometries have been used to calculate all parameters reported in this study.

Fig. 9
figure 9

Optimized structure of studied surfactant–nanotube complexes

Two main quantum chemical parameters; energy of the highest occupied molecular orbital (EHOMO) and energy of the lowest unoccupied molecular orbital (ELUMO) were calculated [48]. As can be seen from Table 3, CNT/surfactant has the highest EHOMO value, also has the best inhibition efficiency.

Table 3 Molecular orbital energy levels of HOMO and LUMO

On the other hand, the LUMO energy (ELUMO) shows the electron-accepting ability of the molecule—the lower values lead to the higher accepting capability of electrons. The optimized species with the corresponding HOMO and the LUMO electron density distributions of surfactant/CNT are also presented in Fig. 10. The positive and negative phases are represented in yellow and blue colors of CNT, respectively. As shown in Fig. 10, π–π* bonds of nanotubes have more effect than sigma bonds of ester-containing surfactants.

Fig. 10
figure 10

Frontier molecule orbital density distributions of a CNT/dodecyl betainate gemini and b CNT/dodecyl betainate monomer

In the same way, low values of the gap energy, ELUMO − EHOMO, provide good adsorption onto the solid surface since the energy to remove an electron from the last occupied orbital will be minimized. Based on these results, CNT/surfactant has lower ELUMO − EHOMO values compared to the pure surfactants. The adsorption energy of surfactant on CNT is also defined as follows [49, 50]:

$$E_{\text{ads}} = E_{\text{S - CNT}} - \left( {E_{\text{CNT}} + E_{\text{S}} } \right).$$
(7)

where ES-CNT, ECNT, and ES are the total energies of the adsorbed system, pure CNT, and surfactant molecule, respectively. The adsorption energies of CNT/dodecyl betainate monomer and CNT/dodecyl betainate gemini are − 130.104 eV and − 137.042 eV, respectively. Based on the obtained values, gemini surfactant has shown higher capability to disperse nanotubes and consequently higher inhibition efficiency compared to its single-tailed analog, which is in agreement with the experimental results.

4 Conclusion

The obtained results in this study illustrated that the ester-containing surfactants are suitable inhibitors for mild steel in HCl solution. Gemini surfactants with ester bonds inserted between the positively charged head groups and the hydrocarbon tails cause more hydrolysis and biodegradation properties and less toxicity. Based on the related data, the inhibition efficiency increased with the increasing surfactant concentration. The increase in inhibition efficiency can be attributed to the reduction in local dielectric constant and the growth in the thickness of the electrical double layer, signifying that the molecule acts by adsorption at the metal/solution interface. In addition, stable aqueous colloidal dispersions of nanotubes are obtained with the aid of ester-containing surfactants. The gemini surfactants can suspend the nanotubes effectively at much lower concentrations than monomer surfactant. The results also showed that the position of ester bonds in alkyl tail can have effect on the amount of dispersion, and which BT had more influence compared to ET. A new facile and effective electrochemical approach has been developed for inhibition of the steel surface against corrosive agent using dispersed nanotubes by monomeric and gemini surfactants. From SEM, EDX, XRD, ATR–IR, and solid-state UV–vis observations, it is observed that well-dispersed nanotubes in ester-containing surfactant enhance the surface coverage and are responsible for the highly desirable anticorrosion properties at high surfactant concentrations that make dispersed-MWCNTs to be much more effective. The analyses of HOMO and LUMO values indicate that adsorption behavior of CNT/surfactants on the solid surface is better than those of the pure ones.