1 Introduction

Metals corrosion can be regarded as one of the most serious problems in the petroleum sector, including the chemical cleaning of heat exchangers to dissolve inorganic scales and the acidization of old oil and gas wells. Such an acidization process includes pumping acid solution into the wellbore to increase the produced oil or gas flow rate [1]. Generally, the hydrochloric acid solution is used in this method [2]. The problem now is the corrosive nature of this kind of inorganic acids, which depends on various factors such as pH, temperature, and dissolved gases [3,4,5]. From the economic point of view, one of the most effective tools for mitigating metal corrosion is injecting the corrosive fluid with a sufficient dose of a suitable type of effective corrosion inhibitor [4,5,6,7]. Numerous reviews about different types of organic inhibitors have already been reported [8,9,10,11,12]. It was reported that the organic additives containing heteroatoms such as N, O, S, and P displayed significant inhibition efficiency toward the corrosion process due to their ability to supply lone pair electrons to such metal surfaces. Other factors include the type of aromatic ring and unsaturated bonds [13, 14]. The greatest manufactured organic molecules, practically those containing pyridone derivatives, are less expensive, environmentally sustainable, and suitable for use as corrosion inhibitors in acidic environments [15,16,17]. Also, it is a useful method to use an eco-friendly catalyst in the synthetic pathways of organic pyridinone Schiff base derivatives (green chemistry), such as ceric ammonium nitrate that can be applied as Lewis’s acid or oxidizing substance [18,19,20,21,22]. The corrosion inhibition mechanism of such organic additives works by adsorption of these organic additives on the surface of metals. Also, it depends on the nature of the zero-charge potential of the steel surface [23]. Carbon steel alloys are regarded as the most widely used materials in all industrial processes. This can be attributed to their excellent mechanical properties and low production cost [24]. Generally, acidic solutions have many uses in various industrial applications such as acidizing of old oil wells, removal of inorganic hard scales in heat exchangers, and pickling of metal surface [25]. Hydrochloric acid is regarded as one of the most important inorganic acids used in such processes, which can cause serious metallic corrosion [26]. Normally, chemical inhibition using specific types of organic compounds acts through a film-forming mechanism [27]. In addition, pyridinone derivatives are the most active component used as anti-inflammatory and antimicrobial drugs and possess unique biological capabilities while posing no considerable environmental dangers [28,29,30]. In the present work, the target is aimed to design and synthesize two novel N-amino pyridinone derivatives linked to pyrazole or quinoline moieties via Schiff’s base, TAP-TPP, and TAP-CEQ (as shown in Scheme 1) and confirm their chemical structures using various spectroscopic techniques. Furthermore, the investigation of the pyridinone derivatives an anticorrosive agent for CS in a hydrochloric acid medium was assessed using chemical and electrochemical (EIS and PDP) methods. Also, SEM and EDX studies were used to examine the CS morphology without and with inhibitor molecules.

Scheme 1
scheme 1

Synthetic pathway for the preparation of two novel inhibitors TAP-TPP, TAP-CEQ and their Schiff’s base mechanism using cerium ammonium nitrate (CAN)

2 Experimental Section

2.1 Synthesis of the Target Organic Compounds

The melting values of the novel prepared pyridinone derivatives TAP-TPP and TAP-CEQ were determined and reported on the digital Gallen Kamp MFB-595 instrument. Also, their FTIR spectra were analyzed using the Shimadzu 440 spectrophotometer at the range 400–4000 cm−1. A Bruker (400 and 101 MHz) spectrometer is used to evaluate the 1H and 13C signals in the NMR spectra and is recorded relative to deuterated solvent signals only in dimethyl sulfoxide (DMSO-d6).

2.1.1 Synthesis of 1,6-Diamino-2-oxo-4-(Thiophen-2-yl)-1,2-Dihydropyridine-3,5-Dicarbonitrile (TAP)

The starting material TAP was prepared as stated in the literature method [31]. To a solution of cyan acetic hydrazide (5 mmol) and 2-(thiophen-2-ylmethylene) malononitrile (5 mmol) in ethanolic solution (20 mL) catalyzed with a mixture of CH3COONH4 (2 mmol)/CAN (1 mmol), the solution was refluxed for 1 h until the precipitated formed on hot. The obtained solid product was collected by filtration, then dried, and recrystallized by dioxane. The relevant synthetic reaction is shown in Scheme 1.

2.1.2 Synthesis of Organic Schiff’s Bases Derivatives (TAP-TPP and TAP-CEQ)

2.1.2.1 Method (i): Using Acetic Acid as a Catalyst

To a solution of the starting material TAP (1 mmol, 0.25 g) and the formyl derivatives (1 mmol) (namely, 1-phenyl-3-(p-tolyl)-1H-pyrazole-4-carbaldehyde and 2-chloro-7-ethoxyquinoline-3-carbaldehyde) in (20 mL) dioxane solution catalyzed with glacial AcOH (1 mL) and then refluxed for 3 h (TLC monitoring), the mixture was allowed to cool and treated with ethyl alcohol, and then the precipitate was filtered, washed by ethyl alcohol, dried, and recrystallized from CH3CN to give the required pure pyridinone derivatives TAP-TPP and TAP-CEQ. The structure of the product is shown in Scheme 1.

2.1.2.2 Method (ii): Using Ceric Ammonium Nitrate as a Catalyst

A solution of organic compound TAP (1 mmol, 0.25 g) and the appropriate 1-phenyl-3-(p-tolyl)-1H-pyrazole-4-carbaldehyde and 2-chloro-7-ethoxyquinoline-3-carbaldehyde (1 mmol) in (10 mL) acetonitrile solution catalyzed by adding cerium ammonium nitrate (5 mmol%), the solution was stirred at room for 0.5 h until the solution becomes clear time and then formed a color solid precipitated. The solid was washed with ethyl alcohol and recrystallized from CH3CN to give the required pure pyridinone derivatives TAP-TPP and TAP-CEQ.

2.1.3 6-Amino-2-Oxo-1-(((1-Phenyl-3-(p-tolyl)-1H-Pyrazol-4-yl)methylene)amino)-4-(Thiophen-2-yl)-1,2-Dihydropyridine-3,5-Dicarbonitrile (TAP-TPP)

Pale gray powder; yield = 82%; M.p. = 340–342 °C; IR (KBr): νmax = 3421, 3315 (NH2), 3040 (CH-arom.), 2920 (CH-aliph.), 2211 (2CN), 1654 (C=O), 1610 (CH=N) (Fig. 1); 1H NMR (δ, ppm) 2.39 (3H, s, CH3.tolyl), 7.28 (1H, t, J = 8.8 Hz, CHarom), 7.36 (d, J = 8.0 Hz, CHarom), 7.46 (t, J = 7.4 Hz, 1H, CHarom), 7.61 (t, J = 7.9 Hz, 2H, CHarom), 7.57 (2H, d, J = 6.4 Hz, 1H, CHarom), 7.65 (2H, d, J = 8.0 Hz, CHarom), 7.95 (1H, d, J = 6.4 Hz, CHarom), 8.00 (2H, d, J = 7.7 Hz, CHarom), 8.44 (2H, s, br.NH2; D2O exchangeable), 8.97 (1H, s, CHarom), 9.44 (1H, s, methylinic-CH); (Fig. 2) 13C NMR (δ, ppm) 21.36 (CH3), 90.70 (C–CN), 115.09, 115.36 (2CN), 116.53, 116.68, 117.07, 117.12, 117.26, 119.07, 119.28, 119.66, 127.37, 128.36, 128.73, 128.94, 129.07, 129.13, 130.02, 130.30, 130.91, 131.09, 133.61, 133.82, 135.39, 138.34, 139.19, 139.55, 151.15, 151.98, 152.52, 154.54 (Ar.Cs), 154.69 (CH=N), 157.22 (C-NH2), 165.38 (C=O) (Fig. 2).

Fig. 1
figure 1

FTIR spectrum of compound (TAP-TPP)

Fig. 2
figure 2

1H NMR and 13C NMR spectrum of compound (TAP-TPP)

2.1.4 6-Amino-1-(((2-Chloro-7-Ethoxyquinnolin-3-yl) Methylene) Amino)-2-Oxo-4-(Thiophen-2-yl)-1,2-Dihydropyridine-3,5-Dicarbonitrile (TAP-CEQ)

yellow powder; yield = 84%; M.p. = 351–353 °C; IR (KBr): νmax = 3464, 3283 (NH2), 2984 (CH-aliph.), 2215 (2CN), 1677 (C=O), 1614 (CH=N); (Figure S1) 1H NMR (δ, ppm) 1.44 (3H, t, CH3CH2O), 4.27 (2H, q, CH3CH2O), 7.29 (1H, t, J = 8.4 Hz, CH-thiophene), 7.39 (1H, s, CHarom), 7.42 (1H, d, J = 9.5 Hz, CHarom), 7.56 (1H, d, J = 9.4 Hz, CHarom), 7.69 (2H, d, J = 8.9 Hz, CH-thiophene), 8.16 (1H, s, -CH-Q4), 8.58 (2H, s, br.NH2; D2O exchangeable), 9.36 (IH, s, methylinic-CH); (Figure S2) 13C NMR (δ, ppm) 14.89 (CH3CH2O), 64.34 (CH3CH2O), 90.93 (C–CN), 107.30, 107.64, 115.40, 116.12 (2CN), 116.51, 121.09, 122.15, 127.04, 128.33, 130.23, 131.02, 131.19, 131.52, 133.46, 138.67, 148.88, 149.59, 152.70, 153.61 (Ar-Cs), 154.66 (CH = N), 161.70 (C-NH2), 163.19 (C-OEt), 168.58 (C=O) (Figure S3).

2.2 Corrosion Measurements

2.2.1 Weight Loss Measurements

Corrosion experiments were conducted on CS alloy (density = 7.86 g cm−3) with the following chemical composition (wt. %): C, 0.025; S, 0.03; Si, 0.15; N, 0.27; Mn, 1.52; Ni, 0.16; Cr, 0.26; Al, 0.38; Cu, 0.24; Ti, 0.13; Nb, 0.92; and the rest is Fe. The aggressive medium of 2 M HCl solution was newly prepared by dilution of analytical grade concentrated hydrochloric acid using bi-distilled water. The dose of the two inhibitors (TAP-TPP and TAP-CEQ) in the aggressive medium ranged from 30 to 150 ppm, respectively. The carbon steel alloy with dimension 3 cm × 2 cm × 0.2 cm was abraded with several sandpapers with different grades ranging from 360 to 3000. The grasses present on the surface were removed by acetone, washed with deionized water and dried with an air drier, and immersed in an aggressive medium. After weighing exactly, samples were submerged in a glass container containing 200 ml of the corrosive medium with and without various doses of the pyridinone inhibitors. After immersion time (24 h), the test specimens were detached from the beaker, washed with bi-distilled water, dried, and finally weighed. The percentage inhibition effectiveness obtained from the weight loss technique (IEw %) and the rate of corrosion (CR) in (mg cm−2 h−1) had been estimated via Eqs. 1 and 2 [32, 33]:

$$ {\text{IE}}_{{\text{w}}} \left( \% \right) = \theta \times 100 = \left( {\frac{{{\text{CR}} - {\text{CR}}_{i} }}{{{\text{CR}}}}} \right) \times 100 $$
(1)
$$ {\text{CR}} = \frac{\Delta W}{{St}} $$
(2)

where CR and CRi are the values of the rate of corrosion in an aggressive medium without and with various doses of the used inhibitors, respectively. The value of average weight loss expressed in (mg) for three parallel CS specimens is represented in ΔW, S is the average area of the sample expressed cm2, and t is referred to the duration time expressed h.

2.2.2 Electrochemical Studies

All EIS and PDP experiments were accomplished via Volta lab 80 potentiostat (model PGZ − 402). A conventional electrochemical with three electrodes was used in all electrochemical tests. Carbon steel alloy was used as a working specimen, Pt wire was used as a counter electrode, and SCE was used as a reference electrode [34, 35]. For EIS tests, an AC signal with 10 mV peak to peak was applied in a potentiostat mode at OCP, in the range of frequencies between 105 Hz and 0.5 Hz [24]. PDP experiments were performed at a scan rate of 1 mV s−1 and sweeping the applied potential in the average of ± 250 mV with respect to OCP [36,37,38]. For consistency and accuracy, all tests were carried out three times and the average results were recorded.

2.3 Surface Analysis

Surface morphology of carbon steel alloys, with dimensions 12 × 12 × 2 mm, without and after immersion of 150 ppm of the synthesized pyridinone derivatives for 24 h in 2 M HCl, was investigated by SEM. The nature of the adherent protective layer on CS alloy was tested by a Zeiss Evo 10 device attached to the EDX system [38]. The power beam accelerating voltage was 25 kV. The micrographs of the carbon steel alloys were taken at a magnification power of (×1500).

2.4 Computational Study (DFT Calculation)

The DFT calculation for organic dye TAP-TPP and TAP-CEQ was performed by using Gaussian 09 and Gaussian view 6.0 software [39, 40]. The calculations, including frontier molecular orbital and MEPs, were carried out using popular hybrid functional B3LYP functional with the double zeta basis set 6–31 g (d) for optimization of the molecule according to the previously reported methods [41, 42].

3 Result and Discussion

3.1 Chemistry (Synthesis, Structure Elucidation, and Physical Properties of Inhibitors)

3.1.1 Synthesis and Structure Elucidation of Inhibitors

In this manuscript, we have employed a clean and rapid ceric ammonium nitrate CAN-catalyzed synthesis of novel organic Schiff base inhibitors TAP-TPP and TAP-CEQ which are displayed in Schemes 1. Firstly, the N-amino pyridinone derivatives TAP is employed as the starting material formed according to the literature method [31] via cyclo-condensation by reaction of 2-(thiophen-2-ylmethylene) malononitrile with cyanoacetohydrazide in ethyl alcohol solution catalyzed with a mixture of ammonium acetate and cerium ammonium nitrate CAN (Scheme 1). Furthermore, the nucleophilic substitution reaction between the starting material TAP and two specified heterocyclic aldehydes was investigated using two different methods. The first method was known as the classical and hazard method, and it is employed by the refluxing of the N-amino pyridinone derivatives TAP and the appropriate aldehydes in a dioxane solution catalyzed with glacial acetic acid for about 3 h. The yield of the Schiff base produced ranged from 65 to 68% while the second method was employed by the stirring of the N-amino pyridinone derivatives TAP and the appropriate aldehydes in acetonitrile solution catalyzed with ceric ammonium nitrate CAN (5 mmol %) for only 0.5 h at room temperature, and the yield of two organic inhibitors TAP-TPP and TAP-CEQ was increased into 87% and 91%, respectively (Scheme 1). Generally, the advantage of this reaction in the case of using CAN as a catalyst is that the reaction occurred at room temperature for a short time and without hazardous catalyst (green chemistry) with excellent yield, compared with the classical method that completed through refluxing the reaction in the presence of acetic acid as catalyst (hazards catalyst) for a long time with a moderate yield.

Continuously, the spectroscopic data, IR, 1H NMR, 13C NMR, and elemental analysis are in accordance with the suggested structure. The IR spectra of the organic compound TAP-TPP exhibited sharp bands at ν 3421, 3315, 2211, 1654, 1610 cm−1 revealed to NH2, CN, C=O, and new CH=N groups, respectively [43,44,45,46]. Their 1H NMR spectra exhibited three singlet signals appearing at δ 2.39, 8.47, and 9.44 ppm significant to CH3, NH2, and methylinic-CH groups, respectively.13C NMR spectra of the same compound presented new signals that appeared at δ 21.36, 15.09, 115.36, 154.69, and 165.38 ppm assigned to the CH3, 2CN, methylinic-CH and C=O functions, respectively. Also, IR analysis of the compound (TAP-CEQ) showed significant stretching absorption bands at ν 3464, 3283 2215 cm−1, which referred to NH2 and cyano groups, respectively. Moreover, bands linked to carbonyl and CH-methylinic groups looked at ν 1677, and 1614 cm−1, respectively. 1H NMR spectra of compound (TAP-CEQ) exhibited two signals appeared at δ 1.44 ppm due to CH3 protons, quartet signal at δ 4.27 ppm related to OCH2 protons, and two singlet signals at δ 8.58 and 9.36 ppm associated to the amino group that canceled with D2O and CH-methylinic group, respectively.

3.1.2 Physical Properties of Inhibitors

The physical properties of both organic inhibitors TAP-TPP and TAP-CEQ are listed in Table 1. Generally speaking, the color of organic dyes is slightly different (deep brown and light brown) compared with the intermediate TAP (orange crystal), which proves an elementary successful organic dyes formation. Next, both organic inhibitors TAP-TPP and TAP-CEQ recorded melting point 340–342 °C and 351–353 °C, respectively, higher than those of the intermediate TAP (285–287 °C).

Table 1 Physical properties and analytical data of organic inhibitors TAP-TPP and TAP-CEQ

3.2 Weight Loss Studies

The weight loss method was a common practical method for determination of the percentage corrosion inhibition efficacy of the newly synthesized organic compounds. The dissolution behavior of CS in 2 M HCl solution in the absence and presence of different doses of pyridinone derivatives (TAP-TPP and TAP-CEQ) was considered via the weight loss technique, as shown in Fig. 3. The figure displays the rate of corrosion (CR) and inhibition effectiveness (IEw %) of the synthesized pyridinone inhibitors. Figure 3 reveals that the values of corrosion rate are clearly reduced, and the values of percentage inhibition efficiency (IEw %) are increased after adding various doses of pyridinone derivatives. Also, the maximum IEw % values of TAP-TPP and TAP-CEQ are 89.4% and 91.8%, respectively. The behavior of the corrosion mitigation process by the pyridinone derivatives can be clarified on the basis of the adsorption of their particles on the CS surface, as stated by their stereochemistry.

Fig. 3
figure 3

Correlations between the corrosion rate and inhibition efficiency with various doses of compounds (TAP-TPP and TAP-CEQ)

3.3 Electrochemical Results

3.3.1 Potentiodynamic Polarization (PDP) Studies

Tafel polarization plots of carbon steel electrodes in aggressive solution without and with several doses of pyridinone derivatives (TAP-TPP and TAP-CEQ) were presented in Fig. 4. Electrochemical data were calculated by extrapolating Tafel curves and recorded in Table 2. As shown in Fig. 5, it is clear that by raising the dose of the used pyridinone derivatives, the recorded corrosion current density (icorr) for the carbon steel alloy in the aggressive acidic solution displays a declining trend (i.e., strongly decrease). The addition of maximum concentration (i.e., 150 ppm) of the selected compounds produces a lowering of icorr from 0.516 mA/cm2 to 0.031 and 0.026 mA/cm2 for both TAP-TPP and TAP-CEQ, respectively. This behavior proves the affinity of the synthesized pyridinone derivatives to reduce the corrosion rate and consequently increasing the percentage inhibition efficacy (IE %) [47]. By carefully investigating of Tafel curves, it is clear that both the anodic and cathodic Tafel lines were moved to more positive and negative directions about relation to the blank line. This behavior indicates that the adsorption of pyridinone compounds on CS surface decreases the cathodic hydrogen evolution and the iron anodic dissolution rate [48]. It had been seen that the values of cathodic and anodic Tafel slopes (βa and βc) remain almost unchanged without and with pyridinone derivatives and independent of the dose of inhibitor injected, indicating that the adsorption of the undertaken compounds on the CS alloy surface decreased value of corrosion rate without affecting on the corrosion mechanism. The distribution of the synthesized pyridinone derivatives on the CS alloy surface can be ascribed because of the interaction between the vacant d-orbital of the CS alloy surface and the lone pair electrons of O, N, and S atoms present in the pyridinone derivatives through electron type bonds. The corrosion inhibition occurs by forming a barrier layer that prevents metal dissolution. The percentage of inhibition effectiveness (IEp) was estimated according to Eq. 3 [49,50,51].

$$ {\text{IE}}_{{\text{p}}} = \left[ {\frac{{i_{{{\text{corr}}}}^{0} - i_{{{\text{corr}}}} }}{{i_{{{\text{corr}}}}^{0} }}} \right] \times 100 $$
(3)

where \(i_{{{\text{corr}}}}^{0}\) and \(i_{{{\text{corr}}}}\) are the values of corrosion current density without and with the studied pyridinone derivatives.

Fig. 4
figure 4

Log I–E relationship for CS alloy in 2 M HCl without and with various doses of compounds: a TAP-TPP and b TAP-CEQ at 25 °C

Table 2 Electrochemical parameters obtained from the Tafel polarization tests on carbon steel alloy in 2 M HCl acidic solution without and with various inhibitors TAP-TPP and TAP-CEQ
Fig. 5
figure 5

Nyquist plots for CS alloy in 2 M HCl without and with various doses of compounds: a TAP-TPP and b TAP-CEQ at 25 °C

The results in Table 2 confirmed that the change in the Ecorr values was less than 85 mV/SCE, so that the nature of the absorption of the studied pyridinone derivatives (TAP-TPP and TAP-CEQ) was mixed-type inhibitors [52]. On the other hand, the inhibition action of pyridinone derivatives is enhanced by the existence of azo moiety, thiophene moiety, and lone pairs of electrons in the pyridinone inhibitors. Now, the values of percentage inhibition efficiency of the newly synthesized pyridinone derivatives can be ordered as follows: TAP-CEQ > TAP-TPP.

3.3.2 EIS Data and Their Explanations

For sure, the effectiveness of certain inhibitors can be established through AC impedance measurements. Accordingly, the EIS technique was applied in corrosion studies on various types of steel alloys [53]. In this work, the electrochemical behavior of CS alloy in an aggressive medium without and with several doses of the synthesized pyridinone derivatives was revealed via impedance experiments. Figures 5 and 6 display the Nyquist and Bode plots of immersed CS electrodes in an acidic medium without and with several doses of these pyridinone derivatives at 25 °C. The EIS factors are recognized in Table 3. Nyquist plots in Fig. 5 showed single capacitive circles, donating that the dissolution method of CS alloy electrode in the undertaken aggressive solution without and with pyridinone derivatives undertakes by charge transfer on the surface of CS alloy/aggressive medium. Figures 5 and 6 reveals that both Nyquist and Bode plots display the unchanged style, indicating that the presence of the amino pyridinone derivatives did not change the iron dissolution mechanism while the diameter semicircles formed become greatly enhanced with increasing the concentration of pyridinone derivatives in an acidic medium [54,55,56,57]. Furthermore, the Bode plots for pyridinone derivatives in Fig. 6 indicated that the values of phase angle and the absolute impedance plots turned greater and broader with rising dose concentration of pyridinone derivatives; such changes confirm the strong ability of pyridinone particles to mitigate the dissolution of carbon steel in the acidic medium [58, 59].

Table 3 Electrochemical parameters obtained from EIS equivalent circuit fitting of the carbon steel alloy immersed in 2 M HCl without and with various doses of inhibitors TAP-TPP and TAP-CEQ
Fig. 6
figure 6

Bode plots for CS alloy in 2 M HCl without and with various concentrations doses of compounds: a TAP-TPP and b TAP-CEQ at 25 °C

To analyze the EIS outputs, a simulated equivalent circuit model was fitted to the EIS plots and is presented in Fig. 7. The values EIS parameters such as charge transfer resistance (Rct), electrolyte resistance (Rs), and constant phase element (CPE) are listed in Table 3. Also, Cdl indicates the values of double-layer capacitance. CPE represents impedance (ZCPE) and was estimated as follows [37, 60]:

$$ Z_{{{\text{CPE}}}} = \frac{1}{{Y_{0} \left( {j\omega } \right)^{n} }}, $$
(4)
$$ C_{{{\text{dl}}}} = Y_{0} \left( {\omega_{\max } } \right)^{n - 1} $$
(5)

where j represents the imaginary unit, Y0 is the value of admittance, ω represents the angular frequency, and n is the deviation index. The values of \({\text{IE}}_{{{\text{EIS}}}} \left( \% \right)\) from EIS parameters of the pyridinone inhibitors can be calculated by the next formula [61, 62]:

$$ {\text{IE}}_{{{\text{EIS}}}} = \left[ {\frac{{R_{{{\text{ct}}}} - R_{{{\text{ct}}}}^{0} }}{{R_{{{\text{ct}}}} }}} \right] \times 100 $$
(6)

where \(R_{{{\text{ct}}}}\) and \(R_{{{\text{ct}}}}^{0}\) represent the values of charge transfer resistances for carbon steel without and with inhibitor doses, respectively. Results in Table 3 exposed that Rct values are increased when the concentration of the pyridinone additives rises in the acidic medium. At the same time, we notice a decrease in Cdl values by increasing the dose of these pyridinone derivatives in an aggressive solution. This behavior was associated with the adsorption of these pyridinone derivatives on the carbon steel/solution interface, and this could lead to block corrosion interactions on CS alloy and shield the CS from other corrosive acidic attacks [63]. EIS data exposed that the values of Rct rise steadily by gradually increasing the dose of these prepared compounds and this revealed a rise in the percentage inhibition effectiveness (IE %) compatible with the previously calculated PDP data. It is clear from the data obtained from various techniques used that the values of corrosion inhibition efficiency for the two compounds are increased with increasing until the optimum injection dose was reached at 150 ppm. Also, it is obvious that there is a good agreement in the order of the obtained efficiency calculated from the three techniques used in this work.

Fig. 7
figure 7

Equivalent circuit used to model metal/solution interface of CS alloy in 2 M HCl without and with pyridinone derivatives

3.3.3 Adsorption Isotherm Model

For understanding the kind of adsorption interaction achieved by these synthesized pyridinone derivatives (TAP-TPP & TAP-CEQ) on CS alloy surface, various adsorption isotherms had been cheeked. In this work, Langmuir isotherm exhibited the greatest fit for these pyridinone inhibitors that is calculated by the next formula [64]:

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

where Kads represents the adsorption equilibrium constant, C is the inhibitor dose, and θ is the degree of coverage for the surface. In Fig. 8, the change of C/θ versus C for the undertaken compounds (TAP-TPP & TAP-CEQ provided straight lines. The obtained parameters are tabulated and listed in Table 4. The correlation coefficient (R2) and the slope of straight lines had been found nearly 1, clarifying that the adsorption process of the pyridinone derivatives on metal surface in hydrochloric solution follows the Langmuir isotherm. The standard free energy \(\left( {\Delta G_{{{\text{ads}}}}^{o} } \right)\) that was the useful parameter might be calculated by the next formula [65, 66]:

$$ \Delta G_{{{\text{ads}}}}^{o} = - RT\ln \left( {55.5 K_{{{\text{ads}}}} } \right) $$
(8)

where R is the universal gas constant, T is the values of absolute temperature, and \(K_{{{\text{ads}}}}\) represents the adsorption equilibrium constant, which is estimated from the interception of the obtained straight line with the C/θ axis. The calculated values of Kads and \(\Delta G_{{{\text{ads}}}}^{o}\) are recorded in Table 4. Increasing the values of Kads confirms the strong adsorption capacity of the pyridinone derivatives on metal surface in aggressive medium and improving mitigation of corrosion process. The obtained data in Table 4 revealed that the values of \(\Delta G_{{{\text{ads}}}}^{o}\) are negative and the distribution of these derivatives on carbon steel surface takes place spontaneously. Also, data in Table 4 exposed that \(\Delta G_{{{\text{ads}}}}^{o}\) values of these pyridinone derivatives ranged from − 34.29 to − 34.63 kJ Mol−1, which showed that distribution of these pyridinone derivatives on CS alloy surface in the aggressive acidic medium was physicochemical adsorption (i.e., mixed physical and chemical adsorption type) [67,68,69].

Fig. 8
figure 8

Langmuir adsorption plots for the pyridinone derivatives TAP-TPP and TAP-CEQ on CS alloy in 2 M HCl

Table 4 The values of adsorption parameters obtained from adsorption isotherm of pyridinone derivatives (TAP-TPP and TAP-CEQ) for carbon steel in 2 M HCl solution

3.4 Surface Characterization

Both SEM and EDX analyzed the images of CS alloy samples. Figure 9a–c displays the SEM images of CS alloy surfaces before and after being immersed in an acidic solution for 24 h without and with an inhibitor (TAP-CEQ) at 150 ppm. It is shown in Fig. 10a that the SEM micrograph of CS alloys displays a homogeneous, relatively smooth scratch that happened during the polishing of the CS alloy surface and at the same time without pits. Figure 10b represents the obtained SEM micrograph of the CS alloy surface in 2 M HCl solution for 24 h [70, 71]. It was found that the surface was strictly damaged and full of pits, and the surface is very rough. SEM image of carbon steel was immersed in 2 M HCl for 24 h with 150 ppm of inhibitor TAP-CEQ. Fig. 9c displays smooth, much less aggressive, and the surface morphology is enhanced. These results confirm the adsorption of this inhibitor TAP-CEQ and forming a good protective film resulting from the distribution of heteroatom (O, S, and N) on the CS surface [72].

Fig. 9
figure 9

SEM & EDX images for the carbon steel alloy samples in 2 M HCl; a, d = before immersion; b, e = in 2 M HCl (Blank); c, f = in 2 M HCl containing 150 ppm of inhibitor TAP-CEQ

Fig. 10
figure 10

Possible adsorption mechanism of inhibitor (TAP-CEQ) on carbon steel alloy surface in acidic medium

EDX spectra of CS alloy before and after being immersed in an acidic solution for 24 h without and with 150 ppm of inhibitor TAP-CEQ represent in Fig. 9d–f. EDX spectrum of the abraded CS alloy specimen in Fig. 9d displays a very good surface morphology and a prominent Fe peak while the EDX spectrum of the CS alloy specimen in an acidic solution without inhibitor in Fig. 9e shows that the surface was highly damaged via external corrosion, oxygen signal appeared, and Fe peaks. This strongly indicates the presence of Fe2O3 on CS surface while the EDX spectrum of the CS alloy in 2 M HCl aggressive medium for 24 h in the presence of dose 150 ppm of compound TAP-CEQ in Fig. 9f shows a decrease in the strength of oxygen signal, and the Fe strength peak is significantly suppressed compared to peak appeared in the absence of inhibitor TAP-CEQ and the presence of N, S, and C peaks, showing the adsorption of inhibitor TAP-CEQ particles on CS surface and the creation of a good adhesive layer that prevents the surrounding aggressive medium from the attack of the metal surface [73]. These surface analyses support the data obtained from weight loss technique and electrochemical techniques.

3.5 The Assumed Corrosion Inhibition Mechanism

The pyridinone derivatives showed good corrosion inhibition properties ascribed to their affinity to be adsorbed on carbon steel alloy surface in the aggressive solution by mutual physisorption and chemisorption, as shown in Fig. 10. Pyridinone ring, thiophene group, and N atoms are strong, active binding sites in adsorption. The synthesized pyridinone derivatives can adsorb physically at the negative charge on the Cl ions and prevent corrosive ions from attacking the CS alloy surface, limiting CS alloy dissolution. Furthermore, the synthesized pyridinone derivatives can undergo adsorption chemically on the CS surface by their high electron density cloud. So, the structural factors found from the presence of S, O, N heteroatoms, π-electrons, cyano group (CN–), and (–C=N–) group helped to extend the double bond conjugation on the whole structure, causing better electron distribution and a more planar conformation on CS alloy [74]. So, the chemisorption is possible by forming of coordinate bonds between the lone pairs present in the pyridinone derivatives and the empty d-orbitals of Fe atoms in the carbon steel alloy surface [75, 76]. The difference between the two pyridinone particles (TAP-TPP) and (TAP-CEQ) from their chemical structure feature was responsible for their different corrosion inhibition performance, as confirmed by all techniques used in this work. Therefore, the pyridinone derivatives can lead to a strong adhesive adsorbed layer on the CS alloy surface by both physical and chemical interactions, isolating the surface of the CS alloy from an aggressive environment and then protecting it from further dissolution.

3.6 DFT Computational Study

The physical properties and calculated electron density distribution of novel prepared organic inhibitors TAP-TPP and TAP-CEQ were obtained at obtained at B3LYP/6-31G(d) level and are displayed in Fig. 11, and the values are listed in Table 5. By the specified theoretical items, the optimized geometrical structure and the frontier molecule orbitals FMOs such as HOMO, LUMO, and energy band gap for the organic inhibitors were evaluated.

Fig. 11
figure 11

Electron distributions in the HOMOs and LUMOs of the organic inhibitors TAP-TPP & TAP-CEQ and their optimized structure

Table 5 Calculated global reactivity parameters at DFT for both inhibitors (TAP-TPP and TAP-CEQ)

Firstly, every molecule possesses HOMO and LUMO levels. The HOMO level indicates the capability of molecules to release electrons, while the LUMO level reveals the capability of molecules to accept electrons. Furthermore, the organic inhibitors TAP-TPP and TAP-CEQ LUMO values were − 2.24 and − 2.53 eV, respectively. The LUMO value of TAP-CEQ inhibitors is more negative than the other inhibitors TAP-TPP. Besides, the energy gap ΔE for inhibitors TAP-TPP and TAP-CEQ was 3.89 and 3.68 eV, respectively. For clarity, the low values of energy gap for any molecule proved the easily transferred the electron from the HOMO level to the LUMO level of the same molecule. Also, this value indicates that the TAP-CEQ molecule is more applicable than TAP-TPP as an anticorrosive agent because the first is more stable and more active in accepting electrons from occupied metallic orbitals. Similarly, Table 5 represents that the TAP-CEQ inhibitor has dipole moment µ = 13.49 Debye, which is higher than those of TAP-TPP µ = 11.03 Debye and that may be due to the polar function (ethoxy CH3CH2O- and carbon attached to chloride atom C–Cl) in the TAP-CEQ inhibitor. This result indicates that the organic molecule with a higher dipole moment is favorable to deposit on the metal’s surface area and then has greater corrosion efficiency. Moreover, the electrophilicity index ω for organic inhibitors TAP-TPP and TAP-CEQ were determined as 4.50 and 5.20 eV, respectively. This result refers to the TAP-CEQ inhibitor being accepted electron easier than TAP-TPP and more readily undergoes nucleophilic attack. Generally, all DFT computational parameters deduced that the TAP-CEQ inhibitor is more applicable than TAP-TPP as an anticorrosion inhibitor.

3.7 Comparison with Other Similar Inhibitors

In terms of structure, concentration, and inhibition efficiency values, here we compare the TAP-TPP and TAP-CEQ with other reported inhibitors. Also, Table 6 shows the values of the reported inhibitors that have similarities in their structures with TAP-TPP and TAP-CEQ, their inhibition efficiencies, and the concentrations used. The inhibition efficiency of the TAP-TPP and TAP-CEQ for carbon steel corrosion was comparative to, and even better than, many other inhibitors [26, 77,78,79,80,81,82,83,84,85].

Table 6 Comparison of corrosion inhibition efficiency of the synthesized inhibitors (TAP-TPP and TAP-CEQ) with other reported studies

4 Conclusion

Two novel organic inhibitors, TAP-TPP and TAP-CEQ, were synthesized, characterized, and evaluated as corrosion inhibitors in the corrosion of carbon steel in acidic medium. On the results, the following conclusions were drawn:

  • The two novel organic inhibitors (TAP-TPP and TAP-CEQ) were laboratory prepared as a green chemistry synthesis using CAN as an eco-friendly catalyst with high yield (87% and 91%).

  • The highest inhibition efficiency values at 150 ppm (optimum concentration) are 89.4% and 91.8% for TAP-TPP and TAP-CEQ, respectively.

  • PDP data displayed that the two organic inhibitors could be classified as mixed-type inhibitors.

  • EIS studies revealed the adsorption of TAP-TPP and TAP-CEQ molecules and are confirmed by increase in Rct and decrease in Cdl values, respectively.

  • The adsorption of the TAP-TPP and TAP-CEQ on MS in 2 M HCl solution follows the Langmuir isotherm, and the distribution of these organic inhibitors on the CS alloy surface in the aggressive acidic medium was physicochemical adsorption (i.e., mixed physical and chemical adsorption type) which SEM and EDX examination affirm.

  • Very high negative magnitude of the ΔGads (− 34.29 to − 34.63 kJ Mol−1) values showed that TAP-TPP and TAP-CEQ interact spontaneously and strongly with the metallic surface.

  • The results obtained from DFT computational studies such as EHOMO, ELUMO, diploe moment (µ), and electrophilicity index (ω) stated that the TAP-CEQ inhibitor is more applicable than TAP-TPP as an anticorrosion inhibitor and are in full agreement with the experimental ones.

  • Finally, both novel organic inhibitors TAP-TPP and TAP-CEQ were considered excellent organic inhibitors compared to the previously reported pyridone derivatives due to the highest inhibition efficiency values at 150 ppm are 89.4% and 91.8%, respectively. The little solubility of these organic inhibitors was only the defect; it is easier in future works when papered novel ionic pyridone inhibitors.