Introduction

Due to its widespread availability, high efficiency, cost-effectiveness, and diverse mechanical properties, C-steel is extensively utilized across various industrial sectors. Broadly, C-steel is considered an inexpensive alloy that offers better corrosion resistance compared to others. As it is used in multiple fields, such as power plants, petroleum industries, and pharmaceutical mixers, it tends to corrode when exposed to acidic media. C-steel loses its integrity due to the progressive deterioration resulting from corrosion when interacting with aggressive environments. Corrosion has harmful effects that extend to natural and historic monuments as well as infrastructure1,2. The cost of conservation and substitution of corroded materials alone is predicted to account for between 3 and 4% of the national growth product (GNP)3.

Hence, a groundbreaking technique in the field of corrosion research is the corrosion of C-steel in an acidic solution, particularly in relation to the use of organic inhibitors. As a result, surface modification is substantial to cope with aggressive conditions in different fields. In recent decades, numerous research studies have focused on surface treatment techniques interacting with surrounding biological environments. Electropolishing (EP) has been recommended as a feasible method for enhancing embedded corrosion resistance in physiological settings4.

A while ago, researchers affirmed that EP is much more influential for the C-steel smoothing process rather than mechanical polishing, which develops cold contortion and remnant stresses, where EP dissolves more nonmetallic involvements, such as manganese sulphides and chromium to a large extent5. The produced crystal structure of the smoothened C-steel surface after EP ensures its sterility for usage in crucial industries such as food processing and pharmaceutical fields, since metal components that directly contact food cannot contaminate it or alter its flavor or appearance. These benefits of EP encourage the use of this technique for completing surgical tools6.

During electropolishing, burrs and rough surfaces erode faster due to higher current densities. That comes from the difference in dissolution rates of the estimated metal or alloy surface, which is dependent on the current division or mass-transportation provisions. This is termed anodic levelling7. Organic additives in the EP bath include (i) brighteners, (ii) carriers, and (iii) levelers. Levelers improve the surface finish on carbon steel, act as grain refiners, widen the electropolishing window, and enhance the solubility of wetting agents8,9.

Most levelers are nitrogen-containing organic compounds that stabilize Fe ions during EP, preventing decomposition and improving current density and hole-filling rates by inhibiting Fe dissolution10,11. However, existing levelers are often costly and environmentally harmful. There is a need to develop affordable, eco-friendly, and easily synthesized alternatives to facilitate commercialization12,13,14.

Bountiful contexts have validated the efficacy of heteroatom compounds in inhibiting EP. This affinity is for possessing a π-bond system or aromatic rings with functional groups with different structures and electron densities. Nevertheless, N, O, and S are heteroatoms with accessible electron pairs that are prominently important in inhibition due to their unique interaction with the c-steel surface. Combining these two characteristics results in enhanced EP inhibition15.

Due to their remarkable anti-corrosion properties, eco-friendliness, and application in various fields as catalysts and optical properties, Quinazoline Schiff-base hybrid has gained more and more attention as a levelling agent or as a film-forming corrosion inhibitor across different metals and environments, underscoring their pivotal role in developing novel inhibitors16,17,18. Quinazolinones and their Schiff’s bases constitute an important class of heterocyclic compounds. They occupy an essential position in medicinal and pesticide chemistry, presenting a wide range of bioactivities. These are frequently encountered heterocycles in medical chemistry, with broad applications, having antitumor properties19,20, antimicrobial21,22,23, anticonvulsant24, antidepressant and antihistaminic25, anti-inflammatory26,27, antimalarial28,29, diuretic and hypertensive agents30, and dihydrofolate reductase (DHFR) inhibition31.

Based on the low cost of starting materials and the ease of synthesis, a new strategy for preparing highly pure, low-toxicity, and eco-friendly corrosion inhibitors using an innovative Quinazolin Schiff-base hybrid compound with high interfacial compatibility was developed in the present work. These compounds contain some molecular features that are regarded as a leveler agent for the first time and are designed to reduce internal surface roughness. On the other hand, to elucidate and correlate the different molecular structures of Quinazolin derivatives QA with their leveler efficiency, we apply the DFT theory here to understand the surface interaction required to achieve the beneficial electrochemical characteristics.

Experimental approach

Recognition of leveler agents (QA)

Fourier-transform infrared (FTIR) spectra were acquired on a Bruker Tensor 37 spectrometer (Central Laboratory, Faculty of Science, Alexandria University) to analyze the QA structure. 1HNMR and 13CNMR spectra were reported on a Jeol-500 MHz, ECA-500 II spectrometer (field strength of 11.74 T, Japan, in DMSO-d6; Faculty of Science, Mansoura University). The Micro Analytical Unit at Cairo University’s Faculty of Science performed elemental analyses.

Leveler agents’ synthesis

Synthesis of N'-(arylidene)-2-(4-oxoquinazoline-3(4H)-yl)acetohydrazide (QA)

A mixture of 2-(4-oxoquinazolin-3(4H)-yl)acetohydrazide 2 (2.18 g, 0.01 mol) and substituted benzaldehyde (0.01 mol) (Namely, 2-chlorobenzaldehyde, 3-methylbenzaldehyde, and 4-(dimethylamino)benzaldehyde) in ethanol (30 mL) was refluxed for 5–8 h. The reaction was monitored with Thin Layer Chromatography (TLC). The products (QA) were filtered and washed with ethanol, and no further purification was required (Scheme 1).

Scheme 1
scheme 1

Schematic pathway for synthesis of N'-(arylidene)-2-(4-oxoquinazoline-3(4H)-yl)acetohydrazide QA.

Leveler agents’ characterization

N'-(2-Chlorobenzylidene)-2-(4-oxoquinazolin-3(4H)-yl)acetohydrazide o-Cl-QA

Colorless crystals, 88% yield; m.p. 260 °C. IR (KBr): 3239 (N–H), 3059 (sp2 = C–H), 1685 (C=O), 1607 (C=O), and 1560 (C=N) cm−1 Fig. (S1). 1H NMR (400 MHz: DMSO-d6): 11.99 (Br.s. 1H, NH, D2O exchangeable), 8.45 (s, 1H, N=CH), 8.36 (s, 1H, H-2), 8.17 (d, J = 7.8 Hz, 1H, H-5), 8.05 (d, J = 7.1 Hz, 1H, H-6/), 7.88 (t, J = 7.6 Hz, 1H, H-7), 7.73 (d, J = 8.1, 1H, H-8), 7.60 (t, J = 7.4 Hz, 1H, H-6), 7.54 (d, J = 7.2 Hz, 1H, H-3/), 7.45 (m, 2H, H-4/ and H-5/) and 5.24 (s, 2H, N-CH2) ppm Fig. (S2-S4). 13C APT NMR (101 MHz: DMSO-d6): δ 168.96 (C = O, hydrazide), 160.88 (C = O, lactam), 148.36 (C), 141.08 (CH), 135.19 (CH), 133.54 (C), 132.12 (CH), 131.48 (C), 130.46 (CH), 128.16 (CH), 127.83 (CH), 127.63 (CH), 127.50 (CH), 127.42 (CH), 126.52 (CH), 121.74 (C) and 47.56 (CH2) ppm Fig. (S5). C17H13ClN4O2 requires: C: 59.92; H: 3.85; N: 16.44% found: C: 60.13; H: 4.07; N: 16.28%.

N'-(3-Methylbenzylidene)-2-(4-oxoquinazolin-3(4H)-yl)acetohydrazide m-CH 3 -QA

Colorless crystals, 91% yield; m.p. 260 °C. IR (KBr): 3282 (N–H), 3056 (sp2 = C–H), 2924 (sp3 -C-H), 1677 (C=O), 1612 (C=O), and 1551 (C=N) cm−1 Fig. (S6). 1H NMR (400 MHz: DMSO-d6): 11.73 (Br.s. 1H, NH, D2O exchangeable), 8.35 (s, 1H, N=CH), 8.16 (d, J = 7.8 Hz, 1H, H-5), 8.03 (s, 1H, H-2), 7.87 (t, J = 7.6 Hz, 1H, H-7), 7.73 (d, J = 8.2 Hz, 1H, H-8), 7.54 (m, 3H, H-6, H-2/ and H-6/), 7.35 (t, J = 7.3 Hz, 1H, H-5/), 7.25 (d, J = 7.3 Hz, 1H, H-4/), 5.22 (s, 2H, N-CH2) and 2.34 (2, 3H, CH3) ppm Figs. (S7, S8). 13C APT NMR (101 MHz: DMSO-d6): δ 168.73 (C=O, hydrazide), 160.93 (C=O, lactam), 149.00 (CH), 148.31 (C), 145.29 (CH), 138.71 (C), 135.19 (CH), 134.17 (C), 131.43 (CH), 129.30 (CH), 127.83 (CH), 127.69 (CH), 127.57 (CH), 126.50 (CH), 124.80 (CH), 121.67 (C), 47.59 (CH2) and 21.30 (CH3) ppm Fig. (S9, S10). C18H16N4O2 requires: C: 67.49; H: 5.03; N: 17.49% found: C: 67.24; H: 5.31; N: 17.61%.

N'-(4-(Dimethylamino)benzylidene)-2-(4-oxoquinazolin-3(4H)-yl)acetohydrazide p-(CH 3 ) 2 N-QA

Yellow crystals, 87% yield; m.p. 260 °C. IR (KBr): 3294 (N–H), 3066 (sp2 = C–H), 2912 (sp3 -C-H), 1698 (C=O), 1643 (C=O), and 1565 (C=N) cm-1 Fig. (S11). 1H NMR (400 MHz: DMSO-d6): 11.52 (Br.s. 1H, NH, D2O exchangeable), 8.37 (s, 1H, N=CH), 8.17 (d, J = 8.0 Hz, 1H, H-5), 7.93 (s, 1H, H-2), 7.88 (t, J = 7.5 Hz, 1H, H-7), 7.73 (d, J = 8.2 Hz, 1H, H-8), 7.54 (m, 3H, H-6, H-2/ and H-6/), 6.76 (d, J = 8.3 Hz, 2H, H-3/ and H-5/), 5.19 (s, 2H, N-CH2) and 2.98 (s, 6H, 2CH3) ppm Fig. (S12, S13). 13C APT NMR (101 MHz: DMSO-d6): δ 168.08 (C = O, hydrazide), 160.77 (C = O, lactam), 151.98 (C), 148.63 (CH), 148.53 (C), 145.67 (CH), 135.00 (CH), 129.01 (CH), 128.72 (CH), 127.63 (CH), 126.52 (CH), 121.87 (C), 121.61 (C), 112.27 (CH), 47.49 (CH2) and 40.22 (2CH3) ppm Figs. (S14, S15). C19H19N5O2 requires: C: 65.32; H: 5.48; N: 20.04% found: C: 65.19; H: 5.65; N: 19.89%.

Elaboration of electropolishing electrolytes

Annular grade H3PO4 (85%W/W), supplied by BDH Chemicals Ltd., was diluted with double-distilled H2O to compose 8M H3PO4 as an acidic EP solution. The preselected organic compounds for EP retardation were N’–(arylidene)-2-(4 oxoquinazoline-3(4H)-yl) acetohydrazide (QA) derivatives. The QA concentrations varied between 0.33 × 10−3 and 3.43 × 10−3 mol/L. A relevant quantity of inhibitors was dissolved in 8 M H3PO4 and warmed to produce inhibition solutions, as illustrated in Table 1. The experiments were reliably triplicated to guarantee the measurements with less than 2% variation. The mentioned corrosion results are obtained by averaging the three measurements. All experiments were conducted with and without varying quantities of QA.

Table 1 Properties of synthesized QA compounds.

Substrate elaboration

In our current research, the scoped-out C-steel has the following chemical composition: 0.285% C, 0.012% S, 0.221% Mn, 0.012% P, 0.13% Si, and balance Fe. Two electrodes, an anode and a cathode, are arranged in a diagonal configuration, measuring 10 cm in height, 5 cm in width, and 1 cm in breadth. Before each test, electrodes are manually polished using multiple kinds of sandpaper until they have a glossy surface, rinsed several times with deionized water, and decontaminated with acetone to remove undesirable film from the C-steel substrate. The epoxy adhesive was applied to cover the anode and cathode backs and surfaces, except for a C-steel specimen (4 × 5 cm2) used for Galvanostatic tests.

Galvanostatic electrochemical assessment

The Galvanostatic approach was uncomplicated and dedicated, offering a viable standard for evaluating inhibitor effectiveness. The polarization experiments were conducted following previously described protocols4,32. Inhibition efficiency can be determined from polarization plots, which define the limiting current (EP rate) by gradually increasing the applied current and calculating the resulting stable-state voltage. The Inhibition efficiency (%IE) could be estimated from the following Equation:

$$\%IE=\frac{{I}_{l\left(B\right)}-{I}_{l(QA)}}{{I}_{l(B)}}\times 100$$
(1)

where \({I}_{l(B)}\) is the rate of EP in a QA-free solution, and \({I}_{l(QA)}\) is the rate of EP during the existence of QA.

Surface spectroscopy/microscopy methods

  • Microstructure analysis: The surface of all samples, measuring 1.5 cm × 1.5 cm, was extensively examined for morphological modification and chemical composition using a scanning electron microscope (SEM, JEOL JSM-5300) and an X-ray spectrometer (EDX), respectively. This phenomenon had been observed before, and subsequent involvement in 8M H3PO4 solution with and without varying concentrations of formulated QA at different temperatures.

  • UV–visible reflectance spectroscopy: (Jasco V-570) was used to evaluate the reflection bands and surface illumination of C-steel specimens in the 200–800 nm range.

  • Wettability: The concept of “surface wettability” is commonly measured using the apparent static water contact angle (WCA). This angle was described as the angle created where the liquid–vapor boundary of a droplet meets the solid–liquid interface. As a result, the adhesion of QA compounds affects surface properties, enabling a deeper study of hydrophilicity/hydrophobicity. Thus, contact angle analysis is necessary before and after EP. Measurements were taken using an OCA15 goniometer (DataPhysics Instruments, Filderstadt, Germany), placing a 0.2 µL water droplet on the surface. The wettability angle was determined between the surface and the droplet’s tangent. Results were averaged from three measurements per sample, with dynamic changes tracked over time. Accuracy is ± 0.01.

  • Roughness exploration and estimating method: An atomic force microscope (AFM) (thermos-microscope, auto probe CP-head, MLTC by Bruker, IP 2.1 software) was used to assess the average surface roughness factor (Ra) at two distinct locations in the central portion of a 25 × 25 μm2 region under various conditions. The measurements were conducted for three different areas in the samples. The average values are reported, and the standard deviations were included to reflect the precision and reproducibility of the measurements.SD values reflect < 5% relative erro.

  • Spectroscopic techniques

    Atomic absorption spectroscopy measurements (AAS): The amount of iron ions Fe2+ released into solution due to corrosion and after Galvanostatic analysis in the absence and presence of the QA, was quantitatively analyzed using an atomic absorption spectrometer (ANALYTIK JENA CONTRAA 300). The experiment involved immersing C-Steel sheets in 8M H₃PO₄ as a corrosive medium, both with and without varying concentrations of QA derivatives at temperatures (298–313 K) for 10 minutes. The experiments were reliably triplicated with a variation of less than 2%.

  • Quantum chemical calculations: using DFT carried out by the Gaussian 09W program package created by Frisch and collaborators, were used to perform all computational calculations on a personal computer. All computations were performed using “Becke’s three-parameter hybrid functional” employing the “LYP correlation functional B3LYP”, one of the most robust of the hybrid family, with a 6.31G (d,p) basis set33,34.

Results and discussion

QA synthesis and structure characterization

The new N'–(arylidene)-2-(4-oxoquinazolin-3(4H)-yl)acetohydrazide derivatives (QA) were synthesized as outlined in Scheme 1. The starting material, 2-(4-oxoquinazolin-3(4H)-yl)acetohydrazide 2, was obtained by stirring ethyl 2-(4-oxoquinazolin-3(4H)-yl)acetate 1 with hydrazine hydrate in ethanol. The acetohydrazide derivative 2 was then condensed with variously substituted aromatic aldehydes (2-chlorobenzaldehyde, 3-methylbenzaldehyde, and 4-(dimethylamino)benzaldehyde) under reflux in ethanol to obtain the target acetohydrazides QA in a high yield.

The structures of quinazoline derivatives QA were elucidated using FT-IR, 1H NMR, 13C NMR spectroscopy, and elemental analysis. The FT-IR spectra of product QA displayed N–H stretching vibration in regions 3294–3239 cm−1 and weak absorption bands at 3066–3056 cm−1, which were attributed to the vibration of the aromatic C-H bond. Moreover, compounds QA showed strong absorption bands in the regions 1698–1677 and 1643–1607 cm−1 for the lactam and carbohydrazide carbonyl groups, respectively35,36. Furthermore, the medium absorption bands at 1612–1565 cm−1 were assigned to the vibration of the C=N group37. Additionally, compounds m-CH3-QA and p-(CH3)2N-QA have absorption bands at 2924 and 2912 cm−1 ascribed to the stretching vibration of the aliphatic C-H bond.

Proton NMR (DMSO-d6) of compounds QA showed three singlet signals corresponding to the exchangeable NH (at δ 11.99, 11.73, and 11.52 ppm), azomethine CH=N (at δ 8.45, 8.35, and 8.37 ppm) and methylene protons (at δ 5.24, 5.22, and 5.19 ppm) for compounds o-Cl-QA, m-CH3-QA and p-(CH3)2N-QA, respectively. Furthermore, the 1H NMR spectra of QA showed multiple signals in the range of 8.36–6.76 ppm associated with the aromatic rings’ protons derived from quinazolineyl and phenyl moieties. Additionally, the methyl substituents in the benzylidene moiety exhibited a singlet at 2.34 and 2.98 ppm in 1H NMR and at 21.30 and 40.22 ppm in 13C NMR spectra for m-CH3-QA and p-(CH3)2N-QA, respectively.

Determination of EP Action of QA

To provide a clue about EP kinetic reactions, the Galvanostatic technique is utilized to establish polarization procedures. For example, the polarization plots of C-steel before and after adding various concentrations of m-CH3-QA to 8 M H3PO4 are shown in Fig. 1. Examination of the polarization plots revealed that the plateau area represented the limiting current (IL) values at a specific temperature (T). Clearly, the values of IL, which are collected in Table 2, diminish as increasing QA derivative concentrations increase. This can be attributed to the large-scale mass transfer and the inferiority of double-layer fullness. The role of mass transfer is evident in altering the C-steel surface structure, leading to the levelling process, as protrusions on the C-steel surface diffuse more readily than indentations during EP. However, the amount of anodic dissolution propagates by mounting (T) from 298 to 313K, as exhibited in Table 238.

Fig. 1
figure 1

Current–potential curves for the electropolishing process of C-steel surfaces in the absence and presence of m-CH3-QA different concentrations at 298 K.

Table 2 Magnitudes of \({I}_{l}\) and %IE for EP of C-steel in 8M H3PO4 and various concentrations of QA at temperatures varied from 298 to 313 K.

The tabulated data disclosed that higher concentrations of QA resulted in larger magnitudes of % IE at an analogous temperature. This referred to the extensive adsorption of the extreme QA concentrations on C-steel and their protective behavior efficiency. Furthermore, a decrease in %IE values with increasing temperature, at a similar QA concentration, would clarify that the growing temperature promotes the desorption of QA molecules from C-steel anode39,40 Fig. 2 and Table 2.

Fig. 2
figure 2

An analysis for %IE and concentration of QA derivatives at different temperatures ranges.

The efficiency of the retardation process can be ordered as follows: m-CH3 \(>\) o-Cl > p-N, N. This sequence is attributed to the molecule size, substituent groups, and adsorbed atoms from the functional group during the inhibition process32.

Additionally, two main features could control the effect of our compounds on the EP manner of C-steel in 8M H3PO4, which are:

  1. 1.

    The stability of the metal complex, which is adsorbed on the anode during the process of EP retardation.

  2. 2.

    Solubility of the metal complex, which has a catalytic effect.

Taking into account that QA contains aromatic rings with functional groups as –CH3 and -N, N, and Cl atoms, the scope of the two complexes to be formed could exist. In advance, adsorption of the metal complex for the retardation effect has the leading role till the optimum concentration, where the retardation impact is extreme. After a while, the growing influence is suppressed by increasing the QA concentration41,42.

Parameters for thermodynamic and activation

Activated parameters lead to more investigation of EP suppression to confirm the spontaneity of the C-steel’s EP process when exposed to different environmental conditions. The Arrhenius equation (Eq. 2) was employed to investigate the temperature dependence of the EP rate:

$$\text{ln}{I}_{l}=-\left(\frac{{E}_{a}}{RT}\right)+\text{ln}A$$
(2)

Whereas the rate of EP is symbolized by \({I}_{l}\), R is the gas constant, T is the temperature, A refers to the pre-exponential factor that emulates the capacity of QA adsorption on C-steel, and \({E}_{a}\) is the activation energy for the EP reaction. Ea can be determined by plotting \(\text{ln}{I}_{l}\) against 1/T, as shown in Fig. 3.

Fig. 3
figure 3

Arrhenius graphs for EP of C-steel specimen at various concentrations of QA derivatives.

According to the findings observed in Table 3, higher QA concentrations led to elevated Ea​ values (e.g., 60.58 kJ/mol for m-CH₃-QA at 3.43 × 10⁻3 mol/L vs. 15.22 kJ/mol for the blank), demonstrating that QA adsorption creates an energy barrier, hindering mass transfer and anodic dissolution by occupying a more significant proportion of inhibitor molecules at the interface as the concentration increases. It is worth noting that the Arrhenius constant (A) exhibits a direct correlation with Ea, and its values also rise in tandem with the concentration of QA derivatives, a pattern consistent with prior research43.

Table 3 Activation parameters as a function of QA derivatives concentration at 298 K.

Table 3 clarifies the activation parameters (ΔH*, ΔS*, ΔG*) for our elaborated work, which are temperature-dependent for the metal dissolution process, corresponding to \({I}_{l}\) according to the perspective transition state theory, Eq. (3) is computed as follows:

$${I}_{l}= \frac{RT}{Nh}\text{exp}\left(\frac{{ \Delta S}^{*}}{R}\right)\text{exp}\left(-\frac{{\Delta H}^{*}}{RT}\right)$$
(3)

whereas the activation enthalpy is ΔH*, the activation entropy is symbolized by ΔS*, Planck’s constant is denoted by h, and N stands for Avogadro’s number. Identification of ΔH* is represented by Ea and ΔH* verifications as follows:

$$\Delta {\text{H}}^{*} = {\text{ E}}_{{\text{a}}} - {\text{RT}}$$
(4)

The enthalpy change is positive, as shown by the Table’s values, showing endothermic activity during the C-steel dissolution process with and without adding QA derivatives in 8M H3PO444. Moreover, the calculated ΔS* displayed negative values, which are a good reference for the rate-determining step. According to the data, an active complex is produced via a process that involves association rather than separation. The substantially bigger negative entropy shift for each inhibitor proves this. As a result, disorder (randomness) decreases as the process progresses45.

In addition to the mentioned activation criteria, one more main activation parameter is estimated from the Arrhenius plot, which is the change in energy of activation ΔG* from the ensuing relation:

$$\Delta {\text{G}}^{*} = \, \Delta {\text{H}}^{*} - {\text{T }}\Delta {\text{S}}^{*}$$
(5)

Table 3 shows that the limitation in increasing ΔG* magnitudes is detected. In other words, after adding inhibitors, the protected systems possess more positive ΔG* than those in 8M H3PO4 only. This demonstrated that the activated complex is less stable under the influence of QA compounds than in its absence46,47.

Isokinetic relationship (IKR)

The dissolution of C-steel in different QA concentrations showed an enthalpy-entropy compensation (EEC) and IKR that are related to the variation in the enthalpy of activation ΔH* or the entropy of activation ΔS*, or even both, which could be the source of rate inconstancy in a reaction series. The activation enthalpies (ΔH*) and entropies (∆S*) for the EP of QA through dissolution are linearly related, as clarified in Eq. (6):

$$\Delta {\text{H}}^{*} = \beta \Delta {\text{S}}^{*} + {\text{ constant}}$$
(6)

Experimentally, β can be determined as the slope of ΔH* vs. ΔS*, which is found to be linear (Fig. 4) and can respectively be described by ΔH* = − 0.3183 ΔS* + 76.513 with R2 = 1. Such behavior indicates that the EP reaction follows a common rate-determining step for both the free and the inhibited systems. The evaluated isokinetic temperature β was 318.3 K, i.e., higher than the experimental temperature, Texp = 298 K. When β > Texp, the controlling factor is ΔS*, which confirms that the EP reaction is an assertion on the entropy-controlled reaction. Conjointly, the considerable linearity of the isokinetic relationship for QA asserts that their involvement plays an indispensable role in the rate of EP reactions. In other words, all QA undergo the same mechanism during EP.

Fig. 4
figure 4

The isokinetic relationship for QA.

Modeling adsorption

Adsorption isotherm models (Langmuir, Flory–Huggins, and kinetic) are a pivotal tool for comprehending the inhibition mechanism in EP. They were used to fit the Galvanostatic data and analyze the QA derivative adsorption on the C-steel/medium interface in H₃PO₄. The data confirmed that QA forms a compact protective layer, suppressing EP by blocking active sites. Surface coverage (θ) was calculated at equilibrium, showing concentration-dependent adsorption at a uniform temperature48.

Figure 5 displays the fitting results. The following lists the pertinent expressions:

  • Langmuir isotherm:

    $$\frac{C}{\uptheta }=C+\frac{1}{{K}_{ads}}$$
    (7)
  • Flory–Huggins isotherm:

    $$log \frac{\theta }{c}=\text{log xK}+\text{ x log}(1-\theta )$$
    (8)
  • Kinetic adsorption isotherm:

    $${\varvec{l}}{\varvec{o}}{\varvec{g}}\frac{ \theta }{1-\theta }=logK{\prime}+y logc$$
    (9)
Fig. 5
figure 5

Adsorption models for QA derivatives on C-steel surface at 298K.

where θ denotes the coverage of the metal surface, which is obtained from the electrochemical fitting data, C is the QA inhibitor contain (mol/L); Kads is the adsorption equilibrium constant, x is the number of organic molecules replacing water molecules during the adsorption process, K is binding constant indicates the binding force between QA derivatives and steel surface, 1/y represents the number of active sites which can be occupied by one inhibitor molecule, and K is the binding constant relating to constant Kˋ utilizing the relation K = Kˋ1/y.

Figure 5a and Table 4 indicate that while all compounds showed good linear correlation (R2), only m-CH3-QA and o-Cl-QA had slopes of 1, fitting the Langmuir model by forming a monolayer on the C-steel surface. In contrast, p-(CH3)2N-QA deviated with a slope > 1, suggesting non-compliance with Langmuir adsorption behavior49,50.

Table 4 Fitting parameters of adsorption isotherm models for QA derivatives at 298 K.

Investigating Fig. 5b, a good straight line is produced for m-CH3-QA and o-Cl-QA with high correlation coefficient values (R2), as recorded in Table 4. As well, values of x are close to unity, suggesting that one molecule of m-CH3-QA and o-Cl-QA displaces a water molecule at a definite temperature. Conversely, p-(CH3)2N-QA compounds don’t fit the model as in Fig. 5b51,52.

Equation (9) has been schemed as shown in Fig. 5c, which yields a straight line with a high R2 value. The slope y and the values of K and K’ are assembled in Table 4, affirmed that:

  1. I.

    Values of 1/y for m-CH3-QA and o-Cl-QA show uniformity so that an inhibitor molecule can occupy one active site. Meanwhile, the compound p-(CH3)2N-QA can reside at more than one active site on the metal surface as the value of 1/y exceeds unity.

  2. II.

    The considerable values of the binding constant Kads reveal the interaction intensity between inhibitor molecules and the carbon steel surface.

To achieve a comprehensive understanding of the adsorption mechanism of QA derivatives on C-steel, the mathematical relationship between Kads and the adsorption-free energy ΔGoads can be utilized to calculate ΔGoads, as outlined in the corresponding Eq. (10) for QA derivatives:

$${K}_{ads.}=\frac{1}{55.5}\text{exp}\left(-\frac{{\Delta G}_{ads.}^{o}}{RT}\right)$$
(10)

Knowing that T is the absolute temperature, and 55.5 is the water concentration (mol/L) in solution53. By inspecting Table 4, the values of \({\Delta G}_{ads}^{^\circ }\) range from − 27.07 to − 25.91 kJ/mol, elucidating that the QA compounds are adherent to hybrid physisorption-chemisorption mechanism. In addition, the large negative values are indication for the spontaneity of the adsorption reaction. This ensures the congestion of the active sites on carbon steel surface has been built up by QA coating preventing EP43. Remarkably, the predominant value of \({\Delta G}_{ads}^{^\circ }\) for m-CH3-QA notarizes formation of protective layer on C-steel and hence, more excessive inhibition efficiency than o-Cl-QA and p-(CH3)2N-QA, respectively, as exhibited in Table 454.

Dubinin-Radushkevich isotherm model

An adscititious model that is well known to diagnose the adsorption process is the Dubinin-Radushkevich model55, which the following Eq. can identify:

$$\text{ln}\theta =\text{ln}{\theta }_{max}-a{\delta }^{2}$$
(11)

Where the maximum surface coverage is symbolized by \({\varvec{\theta}}\) and the Polanyi potential \({\varvec{\delta}}\) given by:

$$\delta =RT\text{ln}\left(1+\frac{1}{{C}_{inh}}\right)$$
(12)

In the previous Equation, \({C}_{inh}\) is the concentration of QA compound in g/L. Parameter a can be identified from plots of \(\mathit{ln}\theta\) against \(\delta\)2 as cleared in Fig. 6.

Fig. 6
figure 6

Dubinin-Radushkevich plots for EP of C-steel in the presence of QA derivatives.

Consequently, the mean adsorption energy Em, which is defined as the transfer energy of 1 mol of adsorbate from infinity (bulk solution) to the surface of the adsorbent for the related temperature, can be introduced as:

$${E}_{m}=\frac{1}{\sqrt{2a}}$$
(13)

The manner of adsorption can be inferred from the magnitude of Em56: inferior to 8 kJmol-1 is an indication for physiosorption, while that superior to 8 kJ mol−1 is a suggestion for chemisorption. Observing Table 5, values of Em are affirmations for the physical type.

Table 5 Parameters of the Dubinin-Radushkevich isotherm.

Free energy of adsorption (Qads), which is attained from the kinetic thermodynamics model, is utilized to focus more on the adsorption process, and can be introduced by Eq. (14)

$${Q}_{ads}=2.303\text{R }\left[\left(\frac{{\theta }_{2}}{1-{\theta }_{2}}\right)-\text{log}\left(\frac{{\theta }_{1}}{1-{\theta }_{1 }}\right)\right]\frac{{T}_{2 }{T}_{1}}{{T}_{2}-{T}_{1}}$$
(14)

whereas, \({\theta }_{1}\) and \({\theta }_{2}\) are the grades of surface coverage at temperatures \({T}_{1}\) and \({T}_{2}\) 298 and 308 sequentially. By analyzing Table 6, the negative magnitudes of Qads further confirm the exothermic nature of the adsorption process of QA on the C-steel surface, with higher temperatures leading to weaker adsorption and lower inhibition performance. However, QA derivatives performs efficiently as protective organic compounds throughout a hybrid physisorption-chemisorption mechanism57.

Table 6 Heat of adsorption from Kinetic-thermodynamic adsorption isotherm on C-steel surface in 8M H3PO4 at various concentrations of QA.

Surface study

Atomic force microscope (AFM)

Acquiring quantitative details about surface topography at µm scales to assess qualitative outcomes from SEM requires the use of AFM (Sharma and Kumar, 2021), which is considered a prolific technique to recognize the consequences of absence and attendance for QA derivatives during EP8,43,49,58,59. As illustrated in Fig. 7a–g, three-dimensional (3D) and two-dimensional (2D) AFM images show the surface structure of 3 kinds of C-steel, which are raw samples, electropolished samples in 8M H3PO4, and protected specimens after treatment with QA derivatives under different conditions. In accordance with Table 7, average roughness (Ra), peak-to-valley ratio (PV), and mean square roughness (Rq) were stated and trended similarly.

Fig. 7
figure 7figure 7

3D, 2D AFM images (ag), SEM images (hn), EDX analysis (ou), contact angle (v), and reflectance for C-steel specimens without and with QA derivatives (w).

Table 7 Surface roughness parameters of C-steel surfaces before and after EP in 8 M H3PO4 solutions without and with QA derivatives.

Looking over Fig. 7a and Table 7, the blank specimen of the C-steel surface seems distorted with the maximal values of Ra (540.2 µm) and PV ratio (61.20µm). These magnitudes were subtracted to (418.19 µm) and (54.632 µm) respectively, subsequent to EP in an aggressive medium. Surface distortion is reduced relatively compared to blank as in Fig. 7b. Hence, it is noticeable that all are at minimum values for C-steel after treatment with p-(CH3)2N-QA, o-Cl-QA, and m-CH3-QA under various conditions. Remarkably, surface protrusions and unevenness diminish after adding m-CH3-QA in contrast to p-(CH3)2N-QA and o-Cl-QA, as in Fig. 7c,f,g. This authenticated the order of IE% as the following: m-CH3-QA > o-Cl-QA > p-(CH3)2N-QA. Also, the surface will be improved by alternating temperature and concentration in the presence of m-CH3-QA (Fig. 7c–e), which could refurbish surface topography, resulting in diminishing the Ra and PV ratio as shown in Table 7. These results confirm that QA derivatives can hinder the anodic dissolution reaction in acidic media.

Morphological inspection utilizing (SEM)

SEM is a beneficial and stipulated method for C-steel surface inspection to assure the rate of EP results43,44,49. Hence, Fig. 7h–n exhibits images of SEM for C-steel specimens under various conditions. This Figure demonstrates that the surface of the raw sample is extremely damaged, with serious roughness accompanied by pits and cavities (Fig. 7h). This surface roughness decreases gradually after EP in 8M H3PO4 at 298K, and the C-steel surface becomes more homogeneous, as shown in Fig. 7i for the blank sample.

Figure 7j–l shows the typical SEM cross-section image of the C-steel sample under different concentrations of m-CH3-QA. The results reveal that discriminating between images for lessening the concentration of m-CH3-QA from 3.43*10-3mol/L to 0.76*10-3mol/L allowed deformation of the inspected specimen where the surface became less homogeneous and more irregular with a subsequent heterogeneous distribution. Consequently, affirmation of concentration change is prominent in altering surface morphology.

SEM images of C-steel samples after EP in 3.34 × 10-3mol/L m-CH3-QA at different temperatures are displayed in Fig. 7k,l. The surface is extensively impacted by temperature, becoming remarkably smooth and perfectly even with a mirror-like structure, as shown in Fig. 7l. The enhancement of the C-steel surface structure indicates the formation of a protective layer on the surface in a regular way. This could proceed from the adsorption of the –CH3 functional group on a metal surface via electron donation or attributed to the enmeshment of QA derivative molecules with the active sites on C-steel, resulting in diminished interaction between the acidic medium and C-steel, and consecutive an outstanding inhibition effect has been manifested. Nevertheless, elevating the temperature in our study influenced the even morphology as progressive damage was released with teeny peaks and valleys and some cracks. It could arise from the desorption of m-CH3 molecules during EP at elevated temperatures.

Conversely, treating the C-steel surface with 0.76*10-3mol/L o-Cl-QA at 298K modified its morphology (Fig. 7m). In contradistinction to the image belonging to m-CH3-QA under the same conditions, the surface roughness appeared in the form of micrometer-sized holes with a random distribution associated with some irregularities. This could be a consequence of the electron withdrawing feature of the –Cl function group that subsides the protective layer formation during EP. Furthermore, the preceding EP of C-steel in 8M H3PO4 and 0.76*10-3mol/L QA derivative with a bulk functional group as p-N, N-dimethyl has a prominent command in the un-uniform surface morphology (Fig. 7n). Exploring the image of p-(CH3)2N-QA, a grain-like structure arose with unequal size among obvious irregularities and surrounded by them, developing out of the steric hindrance of –N, N-dimethyl functional group. This could diminish its blocking of C-steel active sites and inhibition retardation.

These findings utterly validate the AFM image results and their widespread praise. The sections on reflectance and water contact angle measurements that follow will provide more evidence that scanning electron microscope pictures support roughness measures.

EDX analysis

With the assistance of EDX outcomes, it is possible to identify the chemical composition and structure of the C-steel surface we studied. The spectrum of EDX for the C-steel specimen during EP in 8M H3PO4 before and after treatment with QA has been illustrated in Fig. 7o–u. In our study, the revealed signals for Fe were sizable, while further elements, such as O, C, and P, were also detected. Examining the Tables illustrated in Fig. 7, the mass% of the EP C-steel in 8M H3PO4 under various conditions is contrasted. It is ascertained that the mass percentages of Fe are in escalation after treatment with QA (Fig. 7q–u)rather than that of Fe in aggressive medium only (Fig. 7p). Quite the contrary, the mass% of O and P in de-escalation proposed the limitation in active sites of EP. This is due to the lower formation of iron oxide and the greater protection provided by QA. However, the mass% of C atoms is in growth, which can be assumed from the adsorption of some QA molecules. This was a testimony to the molecular barrier consistency at the interface between the electrode and electrolyte via QA molecules during EP, which restrained the Fe3(PO)4 complex developing57,59,60.

Water contact angle (WCA)approach

One specific method to assess whether an additive exhibits hydrophobic or hydrophilic behavior while protecting the C-steel surface from anodic dissolution is the water contact angle (WCA) measurement61. As reported in the literature58, iron oxides are typically formed during EP under aggressive conditions and exhibit hydrophilic characteristics. As shown in Fig. 7v, the C-steel specimen in the blank solution displayed the lowest WCA value (29.9°), indicating that hydrophilic EP products and rust covered the sample surface.

In contrast, the presence of QA derivatives in the aggressive medium altered the surface’s hydrophilicity. The WCA values increased progressively to 35.4°, 63.7°, 66.2°, and up to 79.2°, corresponding to 0.76 × 10⁻3 mol/L of p-(CH3)2N-QA, 0.76 × 10⁻3 mol/L of o-Cl-QA, and 0.76 × 10⁻3 mol/L to 3.43 × 10⁻3 mol/L of m-CH₃-QA, respectively (Fig. 7v).

Based on FT-IR analysis, the presence of C–C and C=C bonds in all aromatic QA derivatives contributes to their surface adsorption. The aggregation of these adsorbed molecules forms a coherent hydrophobic protective layer on the C-steel surface, effectively blocking the penetration of the EP solution to the metal–electrolyte interface61.

Additionally, changes in EP conditions influence the WCA values. As shown in Fig. 7v, increasing the temperature from 298 to 313 K and raising the concentration of m-CH₃-QA from 0.76 × 10⁻3 to 3.43 × 10⁻3 mol/L enhanced the hydrophobicity of the adsorbed protective layer. This is evident from the plots: higher temperature resulted in a lower WCA (78.7°), indicating reduced inhibition efficiency. Conversely, increasing the concentration led to a higher WCA (79.2°), indicating stronger adsorption and the formation of a more effective protective layer, a finding consistent with the SEM observations.

Reflectance

The aggressive EP has a drastic influence on brightening and smoothing C-steel surfaces. The brightness and surface roughness are inversely correlated to a considerable extent32,50. As illustrated in Table 7, the gleam of C-steel surfaces with QA grows as the roughness diminishes. This clarifies that the more scattered the light, the less gleaming the surface.

In consonance with this inquiry, submersion of the specimen in 8 M H3PO4 solution elevates reflectance progressively. At the same time, the minimal value is noticed for the raw specimen, as shown in Fig. 7w. The apparition of fragile films on the C-steel surface could result in a distinct variation in luster value. QA-treated specimens showed improved reflectance% relative to the blank. As a consequence, the inherent characteristics of the C-steel surface have been modified.

Two factors could elevate the reflectance%, which are inhibitor concentration and the rate of its adsorption. As the adsorption rate increases, the luster of the surface increases, becoming more pronounced with inflated QA concentrations. Figure 7w depicts reflectance plots for EP surfaces in a blank electrolyte and multiple inhibitor concentrations. Various samples showed a reduction as the inhibitor type changed50.

AAS measurements

In this study, the iron ions (Fe2+) generated by C-steel corrosion in the H3PO4 environment were quantified by atomic absorption spectroscopy. The absorbance percentage inhibition efficiency (%€AAS) of the QA was obtained using Eq. (15). Based on the tabulated data (Table 8), the findings of the AAS showed that Fe2+ concentration was lowered in the corrosive solution by increasing the inhibitor concentration, decreasing the temperature, and using different QA derivatives. As a function of corrosion rate, Fe2+ was modeled in this study, suggesting that a rise in iron ion concentration causes an increase in corrosion rate and vice versa. This reveals that the inhibition efficiency of the various techniques follows the orderm-CH3 \(>\) o-Cl > p-N, N62.

Table 8 Demonstrates the impact of QA concentrations, types, and temperatures on Fe2+ concentrations using the AAS method.
$$\% {\text{AAS = }}\left( {{\text{1}} - \frac{{{\text{C}}_{{{\text{QA}}}} }}{{{\text{C}}_{{{\text{blank}}}} }}} \right) \times {\text{100}}.$$
(15)

DFT studies of QA

Density Functional Theory (DFT) calculations were carried out to obtain the optimized geometrical structures and key thermodynamic descriptors of the QA derivatives (o-Cl-QA, m-CH3-QA, and p-(CH3)2N-QA), using the B3LYP/6-311G(d,p) method. The absence of imaginary frequencies confirmed the stability of all optimized structures, and the results are summarized in Fig. 8 and Table 9.

Fig. 8
figure 8

The optimized geometries of the studied compounds QA.

Table 9 Estimated thermal parameters, polarizability, and dipole moment for the investigated series, QA.

The zero-point energy (ZPE) and other thermodynamic parameters, such as thermal energy, enthalpy, and Gibbs free energy, are known to influence the adsorption behavior of inhibitor molecules on metal surfaces. The compound o-Cl-QA, containing an electron-withdrawing chloro group, exhibited the lowest ZPE and thermal values, indicating reduced thermal reactivity and limited adsorption capability, consistent with its lower experimental inhibition efficiency.

Conversely, p-(CH3)₂N-QA showed the highest ZPE, dipole moment, and polarizability due to the bulky dimethylamino substituent, which may enhance polar interactions. However, its inhibition performance was not the highest, likely because the bulky group causes steric hindrance, reducing its ability to adsorb effectively on the metal surface.

m-CH3-QA demonstrated the most favorable balance between electronic and thermal properties. Its moderate ZPE, relatively low dipole moment, and suitable polarizability, along with the electron-donating methyl group, enhance its ability to interact with the steel surface via electron donation and stable adsorption. This correlates well with its superior inhibition efficiency observed experimentally.

Overall, the DFT-based thermodynamic and electronic descriptors provide a consistent theoretical basis for explaining the experimental performance of the QA derivatives, highlighting m-CH3-QA as the most effective inhibitor in the series63,64.

Frontier molecular orbitals

The analysis of frontier molecular orbitals (FMOs), specifically the highest occupied molecular orbital (HOMO) and the lowest unoccupied molecular orbital (LUMO), offers valuable insights into the electronic properties and reactivity of the QA derivatives. A higher HOMO energy indicates a stronger ability to donate electrons. In comparison, a lower LUMO energy reflects an increased tendency to accept electrons, both of which are favorable for adsorption onto metal surfaces and effective corrosion inhibition.

The calculated orbital energies (Table 10) show that m-CH3-QA possesses the highest HOMO energy (-6.34 eV), suggesting enhanced electron-donating ability toward the metal surface. In contrast, p-(CH3)2N-QA has the lowest HOMO energy and the largest HOMO–LUMO gap, which indicates reduced chemical softness and weaker adsorption interactions. While o-Cl-QA exhibits the lowest LUMO energy (− 1.76 eV), its overall performance is limited by a relatively larger energy gap compared to m-CH3-QA.

Table 10 Various quantum chemical parameters for the optimized structures of the studied molecules at B3LYP/6-311G(d,p) level of theory.

The energy gap (ΔE) reflects molecular reactivity, with smaller gaps corresponding to higher softness and better interaction with the metal surface. The observed trend m-CH3-QA (4.70 eV) < o-Cl-QA (4.80 eV) < p-(CH3)2N-QA (5.18 eV) correlates well with the experimentally observed inhibition efficiencies65,66.

The spatial distribution of HOMO and LUMO, visualized in Fig. 9, further supports these findings. In m-CH3-QA, both orbitals are localized on the benzylidene moiety, which is expected to be the primary adsorption center. In o-Cl-QA, the HOMO is spread over the quinazoline ring, while the LUMO is focused on the benzylidene unit. For p-(CH3)2N-QA, the reversed orbital distribution may contribute to its lower surface reactivity. The FMO analysis supports the superior inhibition performance of m-CH3-QA, in line with experimental results, and confirms that favorable orbital energies and an appropriate electronic distribution are essential for effective molecular adsorption and corrosion inhibition67,68.

Fig. 9
figure 9

The estimated plots of Frontier molecular orbitals (FMOs) for compounds QA.

Chemical reactivity descriptors

Chemical reactivity descriptors derived from Density Functional Theory (DFT) provide crucial information about the stability, reactivity, and adsorption potential of the QA derivatives. Parameters such as electronegativity (χ), ionization potential (IP), hardness (η), softness (σ), and electrophilicity index (ω) are directly related to the HOMO–LUMO energies and can be used to predict inhibition performance. Among the three compounds (Table 10), m-CH3-QA displayed the most favorable values, with the lowest hardness (η = 2.35 eV) and highest softness (σ = 0.43 eV-1), indicating enhanced polarizability and electron-donating ability. These characteristics favor stronger interactions with the metal surface, consistent with its superior experimental inhibition efficiency4,69.

Additionally, m-CH3-QA showed the lowest electronegativity (χ = 3.99 eV) and lowest ionization potential (IP = 6.34 eV), both of which further support its enhanced reactivity and readiness to donate electrons to the metal surface. In contrast, p-(CH3)2N-QA exhibited the lowest softness and highest IP, indicating a reduced ability to interact electronically with the substrate, which aligns with its relatively poor inhibition performance. The order of the key descriptors aligns well with the experimental inhibition efficiencies: m-CH3-QA > o-Cl-QA > p-(CH3)2N-QA, reaffirming the predictive reliability of these theoretical descriptors in evaluating corrosion inhibitor effectiveness70.

Molecular electrostatic potential (MEP)

The molecular electrostatic potential (MEP) maps offer valuable information about the charge distribution and reactive sites of the QA derivatives, which is critical for understanding their adsorption behavior on metal surfaces. Red regions in the MEP plots represent areas of high electron density (favorable for electrophilic attacks), while blue areas indicate low electron density (favorable for nucleophilic interactions).

As illustrated in Fig. 10, both m-CH3-QA and o-Cl-QA exhibit red zones localized around electronegative atoms within the quinazoline ring, indicating potential adsorption sites. Blue regions are mainly found on the aliphatic parts of the azomethine group, suggesting lower reactivity in those areas. For p-(CH3)2N-QA, the red areas are more pronounced around nitrogen and oxygen atoms, while blue regions dominate the aromatic rings. These electrostatic patterns support the hypothesis that variations in substituent groups significantly influence the interaction of QA molecules with metal surfaces. The more localized and accessible the high electron density regions are, the more favorable the adsorption and, consequently, the inhibition performance, in agreement with experimental observations71.

Fig. 10
figure 10

The molecular electrostatic potentials of the prepared QA.

Fukui indices and local dual descriptors

Fukui indices and local dual descriptors provide detailed insights into the reactive behavior of QA derivatives by identifying potential electrophilic and nucleophilic attack sites at the atomic level. Using Mulliken charges, the condensed Fukui functions (f+, f⁻), local softness (σ+, σ⁻), and local electrophilicity (ω+, ω⁻) were calculated and are reported in the supplementary data. The differences (Δf, Δσ, and Δω) were also determined to pinpoint the preferred attack types on each atom. Atoms with positive Δ values are likely to undergo nucleophilic attacks, indicating regions of high electron deficiency and favorable interactions with electron-rich metal surfaces. Notably, atoms such as N(24), O(21), and C(25) in o-Cl-QA; N(22), N(24), and O(21) in m-CH3-QA; and N(24) in p-(CH3)2N-QA show such reactivity, as visualized in Fig. 11. In contrast, atoms with negative Δ values are susceptible to electrophilic attacks, signifying areas of higher electron density. These include O(16) and C(9) in both o-Cl-QA and m-CH3-QA, and O(16), C(9), and N(15) in p-(CH3)2N-QA. These localized electronic properties offer a deeper understanding of how different substituents modulate the electron distribution in the QA molecules, thus influencing their adsorption orientation and reactivity toward the metal surface. The Fukui analysis supports the experimental inhibition efficiency trend, confirming that the most reactive sites align with the observed inhibitory behavior72.

$${f}_{k}^{+}= {\rho }_{k}\left(N+1\right){\rho }_{K}\left(N\right) (nucleophilic attack)$$
$${f}_{k}^{-}= {\rho }_{k}\left(N\right){\rho }_{K}\left(N-1\right) (electrophilic attack)$$
$$\Delta f=\left({f}_{k}^{+}\right)--{(f}_{k}^{-})$$
(16)
$$\Delta\upomega =\left({\upomega }_{k}^{+}\right)--{(\upomega }_{k}^{-})$$
$$\Delta \sigma =\left({\sigma }_{k}^{+}\right)--{(\sigma }_{k}^{-})$$

where the electronic density site ρ is the number of electrons (N) at site k in a molecule.

Fig. 11
figure 11

Graphical representation of Fukui function of QA derivatives.

Finally, the DFT-derived chemical reactivity descriptors, MEP analysis, and Fukui indices collectively support the experimental findings. For instance, the superior inhibition efficiency observed experimentally for m-CH3-QA is in excellent agreement with its lower hardness (η), higher softness (σ), lower electronegativity (χ), and lower ionization potential (IP), all of which indicate a stronger tendency for electron donation and adsorption onto the metal surface. Furthermore, the Fukui analysis identifies nucleophilic and electrophilic reactive sites that correspond well with the proposed adsorption centers inferred from the electrochemical measurements. This theoretical–experimental alignment strengthens the proposed mechanism of adsorption and inhibition, confirming that m-CH3-QA is the most effective corrosion inhibitor among the studied compounds.

Conclusion

  • A novel series of Quinazolin Schiff-base derivatives (QA) was successfully synthesized and structurally confirmed by FT-IR, 1H NMR, 13C NMR, and elemental analysis.

  • The QA derivatives, particularly m-CH₃-QA, demonstrated significant effectiveness as levelling agents, reducing surface roughness by up to 83.24%.

  • The adsorption of QA on C-steel surfaces involved a hybrid physisorption-chemisorption mechanism, supported by thermodynamic and isotherm analyses (Langmuir, Flory–Huggins, Kinetic, and Dubinin-Radushkevich models).

  • The inhibition efficiency (%IE) followed the order: m-CH₃-QA > o-Cl-QA > p-(CH₃)₂N-QA, attributed to differences in molecular structure and substituent groups.

  • SEM, EDX, AFM, and WCA measurements revealed that QA derivatives formed a protective layer on C-steel, enhancing hydrophobicity and reducing corrosion.

  • AFM results showed a significant decrease in surface roughness (Ra) from 540.2 µm (raw) to 4.67 µm (m-CH₃-QA-treated), corroborating the levelling effect.

  • DFT calculations identified reactive sites and electronic properties (HOMO–LUMO energies, Fukui indices, MEP) that explained the superior performance of m-CH₃-QA.

  • The compound exhibited the highest HOMO energy (− 6.34 eV) and smallest energy gap (4.70 eV), indicating strong electron-donating ability and reactivity.

  • The findings confirm the efficiency, eco-friendliness, and practical applicability of QA derivatives as EP levellers.

Future research could focus on modifying molecular structures to enhance adsorption strength and compatibility with large-scale EP systems.