Introduction

Conducting polymers (CPs) have a significant importance in numerous applications such as corrosion resistance, light-emitting diodes, and sensors [1]. The infusibility and insolubility of CPs as a result of the strong intermolecular and/or intramolecular interactions act as the major obstacle to their widespread application. One of the preferred methods to overcome these obstacles is fabricating CP nanoparticles, because nanostructures exhibit unique physicochemical characteristics [2].

Polymers were incorporated with inorganic metals to make inexpensive materials, where these metals can improve the polymer properties, such as toughness, stiffness, chemical resistance, and thermal stability. Clays are known to be inexpensive, environment friendly, and among the most abundant natural filler materials [3]. Furthermore, nanocomposites based on clay may enrich chemical or physical performances [4]. The contents of sodium bentonite are the mineral and sodium montmorillonite. Montmorillonites consist of two tetrahedral layers sandwiched around a central octahedral layer, as shown in Fig. 1a. A single bentonite lamina is a sheet of three layers with a 1 nm thickness and a 0.2–2 µ diameter [5]. Layered nanocomposites result in materials with advanced performances in properties such as mechanical resistance, electric and thermal conductivity, and optical translucence [6].

Fig. 1
figure 1

a Molecular structure of montmorillonite (MMT) containing exchangeable sodium ions. b Representation of the cation exchange in clay

One of the techniques to fabricate polymer nanocomposites is in situ polymerization, where the clay is scattered into the monomer, giving the monomer a chance to penetrate the clay lamellas, and then, the polymerization reaction occurs through the clay layers [7]. The attractiveness through the layers is poor (van der Waals forces), and thus, the polymer molecules can be inserted through galleries of the clay [8]. Since the prevalence of the clay in the hydrophilic polymer is likely, hydrated cations on the clay surface are exchanged by cationic surfactants (alkyl ammonium or alkyl phosphonium) to minimize the surface energy and produce an organophilic surface. Accordingly, the modified clay eases the incorporation of the polymer chain among the clay layers [9].

Organic conjugated molecules have been the subject of active research in advanced materials due to their wide variety of applications in fluorescent probes and organic light-emitting diodes. Since high-performance optoelectronic materials are commonly used as thin films in their real-world applications, materials with strong luminescence in the solid state are highly desirable [10]. However, classic organic dyes emit strongly in dilute solutions, but their luminescence is quenched clearly in the solid state. This aggregation-caused quenching acts as a barrier to the development of organic compounds as light-emitters and biosensors [11]. Prof. Tang discovered some materials that are non-luminescent in dilute solutions but become highly emissive in solid films or concentrated solutions. Tang called this interesting phenomenon “aggregation-induced emission” (AIE) [12]. Polymers as luminescent materials have many advantages, such as elasticity and easy fabrication as solid films [13]. One of the methods to improve their stability is by using nanocomposites of conjugated polymer/layered silicate for the luminescent device to promote the luminescence efficiency and the stability against oxygen and moisture [14].

Corrosion is a chemical or electrochemical interaction of a metal with its environment, causing problems by this corrosion; researchers have approached this problem by using inhibitors. Inhibitors are substances that are used in low concentrations to retard the corrosion rate of metal dissolution [15]. CPs have been recorded as operative erosion inhibitors because of their high molecular weight and considerable bulk [16]. The polymers have large repeating units that may cover a larger area on the metal surface, which should lead to high inhibition efficiency [17]. However, the spongy construction of CPs caused some restrictions in their use as anticorrosive coatings because the exhaustion of the CP charge can rust the principal metal and form a passive oxide layer by anion-exchange, giving a poor adhesion to the metal. These disadvantages can be eliminated by using nanocomposite CP-based coatings, as they combine the properties of CPs and organic polymers, along with those of the inorganic materials [18].

In this study, CPs were synthesized via in situ polymerization, using nanoclay bentonite sodium and its modified form. The polymer nanoclay modified form showed enhanced solubility compared to the original polymers and improved thermal stability, along with higher corrosion inhibition efficiency and aggregation-induced emission with luminescence dependent on the aggregate structure.

Experimental procedure

Measurements

Infrared spectra from 4000 to 600 cm−1 of the solid samples of the modified clays and polymers were obtained by the KBr method using a Shimadzu 2110 PC Scanning Spectrophotometer at Assiut University, Egypt. Ni-filtered Cu Kα radiation and a Philips X-ray PW 1710 diffractometer were used to obtain the X-ray diffractograms of the studied polymers. Thermogravimetric analysis (TGA) and differential thermal gravimetry were carried out in air with a TA 2000 thermal analyzer at a heating rate of 10 °C/min. The morphologies of the polymers were examined by scanning electron microscopy (SEM), using a Jeol JSM-5400 LV instrument and transmission electron microscope (JEM 100 CXII). Steady-state photoluminescence spectra of the studied polymers were recorded on a Hitachi F-7000 fluorescence spectrometer with an R928 photomultiplier (Hamamatsu) detector. Photoluminescence quantum yields were determined using a calibrated integrating sphere (Hitachi).

Reagents and solvents

Cyclopentanone, cyclohexanone, and cycloheptanone (Merck) were used without further purification. Terephthaldehyde (Alfa Aesar) was used without crystallization. Sodium bentonite was used as it is. Hexadecyl trimethyl ammonium bromide (Aldrich) was used without purification. H2SO4 (Sigma-Aldrich Laborchemikalien, German) was used. All solvents and other reagents were of high purity and were further purified by standard methods.

Preparation of the modified nano-bentonite

The great cationic exchange capacity (CEC) of sodium bentonite makes it a perfect material for surface modulation. In this process, Na+ ion is substituted with an organic cation, resulting in a hydrophobic medium that does not swell in water but has a high affinity for low soluble organic materials, as expressed in Fig. 1b [19]. The modified form of bentonite was prepared by an ion exchange reaction between Na-bentonite and hexadecyl trimethyl ammonium bromide (HTAB), CH3(CH2)15N+(CH3)3Br, as a surfactant using the following equation for calculating the intercalating agent:

$${{120}}/{{100}} \times {\mathrm{grams}}\,{\mathrm{of}}\,{\mathrm{clay}} \times {\mathrm{1}}.{\mathbf{5}} \\ = \left( {{{X}}/{\mathrm{Mw}}\,{\mathrm{of}}\,{\mathrm{intercalating}}\,{\mathrm{agent}}} \right) \times {\mathrm{1}} \times {\mathrm{1000}},$$

where X represents the amount of the intercalating agent, 120/100 represents a CEC of 120 mEq/100 g of the clay, and 1.5 (>1) is an excess of the used intercalating agent (ratio of the alkylamine/clay). An aqueous suspension of 0.5 wt% of Na-bentonite was prepared and heated to 80 °C. The solution of the surfactant was protonated by HCl (alkyl amine/HCl ratio was 1/1) and heated at 80 °C for 5 min before being added dropwise to the Na-bentonite suspension; the mixture was maintained at 80 °C for 12 h under vigorous stirring. The suspension was cooled to room temperature, collected by centrifugation and then washed with deionized water several times to remove the residual halide or cations until no halides were detected in the filtrate by the AgNO3 test. Finally, washing was accomplished using an ethanol/water (50/50) mixture. The filter cake was then placed in a vacuum oven at 80 °C for 24 h. The dried cake was ground to obtain the inorganic-organophilic material HTAB-B [20]. The structure was elucidated by FT-IR.

Synthesis of polyarylidenes cycloalkanones

The polymerization process was carried out as reported in previous literature regarding terephthaldehyde with a series of different cycloalkanones (cyclopentanone and cyclohexanone) and a novel prepared polymer containing the cycloheptanone moiety; see Scheme 1 [21,22,23,24,25,26,27,28].

Scheme 1
scheme 1

Synthesis and in situ polymerization of polyarylidenes cycloalkanones (CPs) with nanoclay and their modified forms

Polymer nanocomposite formation

Polymer nanoclay was prepared by in situ polymerization. In this method, the clay is dispersed into the monomer to enable the penetration of the monomer inside the clay galleries. First, the monomer penetrates inside the clay galleries, followed by the polymerization reaction among the clay layers. The method of preparation is similar to that of their parent polymers with the addition of nanoclay (before and after modification) to the used monomers (25% of wt. of monomer) in the solution with stirring. The reaction was performed in a silicon oil bath maintained at a constant temperature of 70 °C, allowing the monomers to mix with each other before the polymerization process. Polymer nanocomposites were precipitated during reflux, filtered off, washed with hot ethanol and acetone, and then dried under reduced pressure (1 mm/Hg) at 60 °C for 24 h as illustrated in Scheme 1.

Iodine doping

In Erlenmeyer flasks with 100 mL of ethanol, 2.0 g of iodine was added to 1.5 g of the polymers, and their nanocomposites were also added to the mixture and stirred for 48 h at room temperature. The iodine-doped polymers were filtrated, washed with 150 mL ethanol three times and excess water and then dried at 80 °C.

Preparation of test specimens

The mild steel specimens were tested at the Tabbin Institute for Metallurgical Studies in Cairo. The designation and analysis of the specimens showed that they contain 0.17% C, 0.022% Si, 0.71% Mn, 0.010% P, 0.045% Cr, 0.072% Ni, 0.0017% Al, 0.182% Cu, 0.011% Sn, 0.022% F, 0.011% Mo, and 98.74% iron; these were used as the working electrodes for all experiments. First, the surfaces of all electrodes were treated by polishing with emery-paper from 1000 to 1400 grade to obtain a smooth surface, then washing with distilled water and degreasing with acetone for approximately 5 min. Finally, they were washed again with distilled water and dried with filter papers.

Preparation of corrosive solution

A solution of 1.0 M H2SO4 was prepared with an analytical method from concentrated H2SO4 with a 95–97% purity and used as corrosive media in this study.

Preparation of inhibitor solutions

All polymers tested as corrosion inhibitors were prepared by dissolving 0.01 g in 50 mL of chloroform. The prepared mild steel electrode was then pickled in the prepared solutions of the polymers for ten minutes, then dried and immersed in 25 mL of 1.0 M H2SO4 to run the potentiodynamic tests.

Electrochemical techniques

Experiments that include open circuit {E (mV) vs. time (s)} and potentiodynamic polarization (linear and Tafel plots polarizations) were carried out with a model 352/252 corrosion measurement system, which consists of an EG & G potentiostat/galvanostat model 273A driven by software from IBM. Measurements of the polarization curves were started after immersion of the working electrode (mild-steel) in the prepared solutions immediately to determine the values of the steady state potential (Es.s). The linear polarization (LP) was measured from +20 mV up to −20 mV vs. Ecorr, while the Tafel polarization (TP) was measured from −250 mV to +250 mV vs. Ecorr. The scan rate for LP and TP were 0.166 and 0.4 mV/S, respectively. The corrosion rate (CR) and the percentage inhibition efficiencies (IE%) for the studied inhibitors were calculated from the corrosion current densities according to the following Eqs. 1 and 2, respectively [29]:

$${\mathrm{C}{.}\,{R}}\,\left( {{\mathrm{mpy}}} \right)\, = \,0.13\,\times\,I_{\mathrm{corr}}\frac{{({\mathrm{Eq}}.{\mathrm{Wt}}.)}}{{{\mathrm{A}}.{\mathrm{d}}}},$$
(1)

where C.R (mpy) is the corrosion rate (millimeters per year), Icorr is the corrosion current density (μA/Cm 2), Eq.Wt. is the equivalent weight of the metal (g/eq), A is the area (cm2), d is the density (g/cm3), and 0.13 is the metric and time conversion factor.

$${\mathrm{IE\% }}\, = \frac{{{\mathrm{C}{.}\,{R}}\,{\mathrm{uninh}}. - {\mathrm{C}{.}\,{R}}\,{\mathrm{inh}}.}}{{{\mathrm{C}{.}\,{R}}\,{\mathrm{uninh}}.}} \times 100,$$
(2)

where C.Rinh and C.Runinh are the corrosion rates with and without inhibitors, respectively.

Results and discussion

The general idea of the nanocomposites is that as the polymerization process occurs into the inner space of lamellar bentonite, the polymer chains grow inside the spaces of the silicate layer, resulting in expansion of the inner lamella space. This expansion separates the ordered layers into layers dispersed in the polymer matrix. The cationic exchange of Na+ cations with an organic moiety is a key factor to enhance the compatibility of the layered clay and the polymer structure. The high surface energy of these layers attracts the monomers, as polar materials, during the swelling process, and consequently, they are distributed between lamella. Thus, the major driving force of the “in situ-emulsion polymerization” technique is the polarity of the monomer molecules. When the equilibrium is reached after a certain time, the diffusion stops, and the clay is swollen in the monomer to a certain extent, as shown in Scheme 1. The various characteristics of the resulting polymer nanoclay, including solubility, FT-IR, X-ray diffraction analysis, TGA, transmission electron microscopy (TEM), and SEM were also determined, and the data are discussed below.

Solubility

The polymers are partially soluble in concentrated sulfuric acid, NMP, dimethylacetamide, DMF, and DMSO, as well as in less polar solvents, including chloroform and methylene chloride. The cycloheptanone polymer showed greater relative solubility in halogenated solvents than cyclohexanone and cyclopentanone, which can be attributed to the effect of the ring size. Nanocomposites of the modified nanoclay showed better solubility than their original polymers without nanoclay and gave steady colloidal solutions in CHCl3, in the order of cycloheptanone > cyclohexanone > cyclopentanone, and this dispersion helped in measuring the applications of these polymers.

Fourier transform infrared spectroscopy (FTIR)

FTIR spectra of sodium bentonite and the modified form are shown in Fig. 2, where they were similar in all bands attributed to the basic structure of the bentonite, such as 1038 cm−1 for Si–O stretching vibration, 522 cm−1 for Si–O–Al, and 467 cm−1 for Si–O–Si bending vibrations. Peaks at 3448 and 1639 cm−1 were assigned to OH in molecular water in the sodium bentonite spectrum. However, the modified bentonite only showed peaks at 2918 and 2849 cm−1 for CH2 and CH3 stretching vibrations, respectively, indicating the presence of long alkyl chains in the bentonite layers [20].

Fig. 2
figure 2

FT-IR spectra of a Na-bentonite (red) and the organic modified bentonite form (black). b Cyclopentanone polymer and its nanocomposites (black: CP5, red: CP5-nano, blue: CP5-modified-nano). c Cyclohexanone polymer and its nanocomposites (black: CP6, red: CP6-nano, blue: CP6-modified-nano). d Cycloheptanone polymer and its nanocomposites (black: CP7, red: CP7-nano, blue: CP7-modified-nano)

Information from FTIR spectroscopy pertains to the functional groups and possible interactions between the organic and inorganic parts of the nanocomposites. Identification of the in situ polymerization of monomers intercalated into layered clays is difficult by this technique, as there are several overlapping spectral bands. There is no change in the profile of FTIR spectra of all polymers and their nanocomposites. Figure 2 shows a strong absorption band near 1690 cm−1 that can be assigned to the C=O of the cycloalkanone moiety, a strong band at approximately 1600 cm−1 for C=C stretching, vibrations near 1600 and 1500 cm−1 due to the absorption of the phenyl ring, and bands below 700 cm−1 owing to the metal-oxygen-metal in the matrix of the clay [21, 23,24,25].

X-ray analysis

X-ray diffraction is a useful, simple, inexpensive, and powerful technique used to characterize the change in the crystal structure of the polymer and the clay; interpolation of the polymer chains into the clay layers leads to a change in the d-spacing, and results in moving the diffraction peak to lower angles, in contrast to exfoliation of the layers, which results in the disappearing and widening of the diffraction peaks [30]. Figure 3 shows the X-ray patterns of the different cycloalkanone polymers and their nanocomposites. Single peaks were obtained from the nanocomposites containing quaternary ammonium salt (CPm-modified-nano). In the cases of the parent polymer (CPm) and its nanocomposite containing sodium bentonite without modification (CPm-nano), there is a random order in the chains, and there is a peak in the nanocomposite (CPm-nano) (2ϴ = 5.3°, d = 16.426 in CP5-nano, compared to 2ϴ = 6.8°, d = 12.96 in sodium bentonite) that did not exist in the parent polymer and its modified nanocomposite CPm-modified-nano. From this result, we can deduce that the expansion of the layers and intercalation of the monomers into the clay layers with organophilic exchange facilitated the exfoliation and dispersion of the layers into the polymers, retaining the order between them.

Fig. 3
figure 3

X-ray diffractograms of a Sodium bentonite. b Conducting cyclopentanone polymer and its nanocomposites (black: CP5, red: CP5-nano, blue: CP5-modified-nano). c Conducting cyclohexanone polymer and its nanocomposites (black: CP6, red: CP6-nano, blue: CP6-modified-nano). d Conducting cycloheptanone polymer and its nanocomposites (black: CP7, red: CP7-nano, blue: CP7-modified-nano)

Scanning Electron Microscope (SEM) and Transmission Electron Microscope (TEM)

The structures and morphology of the prepared nanocomposites were examined by SEM and TEM using a low dose technique. Figure 4 shows SEM images of the selected cyclopentanone polymer (CP5), its nanocomposite with sodium bentonite (CP5-nano), and the modified form with the long alkyl ammonium salt (CP5-modified-nano). It is clear that the polymer CP5 possessed an amorphous and grainy structure. In contrast to this, the structure of its nanocomposites with clay before and after modification were changed. In CP5-nano, the polymer intercalated the clay without exfoliation as they were well interconnected, changing the structure from the prevailing grain to a more globular one. Meanwhile, CP5-modified-nano is completely intercalated and exfoliated the clay structure covering the plates of the clay, due to the interaction between the positive charge of the nitrogen atoms on the surface of the clay and the negative charge of the oxygens of the cycloalkanone in the polymer backbone, leading to the increased crystallinity of the polymer [31, 32].

Fig. 4
figure 4

SEM images at different magnifications of the conducting cyclopentanone polymer and its nanocomposites: ac CP5; df CP5-nano; and gi CP5-modified-nano

The individual silicate layers are approximately 1 nm in thickness, and their interactions can lead to different types of materials, such as the intercalated nanocomposite, in which the polymer chains enter into the space between the thin platelets of nanometer dimensions [31, 32]. SEM characterization of our work showed these interactions before and after modification of the clay; after modification, the long chains make the polymer intercalation easier, and thus, a plate structure appeared due to the spacing between the layers. In the TEM images, the clay platelets appeared as dark stripes and the polymer matrix is a gray area, as shown in Fig. 5.

Fig. 5
figure 5

TEM images of cyclohexanone nanocomposites a CP6-nano and b CP6-modified-nano

Thermogravimetric analysis and differential thermogravimetric analysis (TGA-DTA)

The thermal properties of the studied CP nanocomposites were characterized by TGA, as displayed in Figure S1 and Table S1 in the supporting information. Nanocomposites containing clay increased the thermal stability of the virgin polymer, as these nanocomposites act as barriers to prevent the diffusion of volatile products during decomposition. Table S1 shows the decomposition temperature of the polymers, comparing the start temperature of decomposition at 10% wt. loss (T10%) of each polymer and its nanocomposites. It was found that the degradation T10% for CP5-modified-nano, CP6-modified-nano, and CP7-modified-nano are 345, 365, and 336 °C, respectively, which show better thermal stability and an increase in the temperature of degradation by approximately 40–50 °C compared to the pure polymers. On the other hand, with nanocomposites the non-modified nanoclay, only CP5-nano is more stable than the original polymer, while CP6-nano and CP7-nano exhibited a decrease in T10%. This outcome may be attributed to the unfavorable interface of the Na-clay. The curve of pure polymer is more stable at elevated T, at approximately 450 and 550 °C for CP6-nano and CP7-nano, respectively, which can be due to the lower stability of polymers in nanocomposites [33] or because of the inhomogeneity of the nanocomposites, as there are some polymer chains residing outside and inside the clay layers, resulting from the long alkyl chains of the modifier as exfoliated particles; these are far away from each other and do not promote the thermal stability through carbonaceous formation.

Optical properties

The photophysical properties of the studied polymers and their nanocomposites were observed for their powders at room temperature; their photoluminescence and excitation spectra are shown in Figs. 6 and 7, as well as Figure S2 in the supporting information. The polymer with cyclopentanone rings, CP5, and its nanocomposites showed similar excitation and emission spectra. These polymers gave emission spectra with maximum intensities approximately 560 nm, as shown in Fig. 6a. The photoluminescence colors of CP5, CP5-nano, and CP5-modified-nano were evaluated quantitatively with the Commission Internationale de l’Eclairage (CIE) chromaticity diagram, providing CIE coordinates of (x, y) = (0.47, 0.53), (0.45, 0.54), and (0.45, 0.54), respectively; see Figure S2a and Table S2. These coordinates confirm the production of reddish-green emission. The polymer CP6 with a cyclohexanone ring also showed excitation and emission behavior similar to its modified forms, CP6-nano and CP6-modified-nano, where they exhibited maximum emission bands approximately 540 nm with CIE coordinates of (x, y) = (0.42, 0.57), (0.40, 0.57), and (0.41, 0.57), respectively, as in Fig. 6b and S2b. CP7 and its nanocomposite forms, CP7-nano and CP7-nano-modified, expressed maximum luminescence bands at approximately 525 nm, giving a green color with CIE coordinates of (x, y) = (0.38, 0.59), (0.39, 0.58), and (0.43, 0.55), respectively, as in Fig. 6c and S2c. Moreover, all polymers showed quantum yields at approximately 0.4–1.4%, as in Table S2. This similarity in the excitation and emission behavior of these three groups of polymers indicates that the modification done on the polymers did not affect their excited states, and thus each polymer emitted similarly to its modified forms.

Fig. 6
figure 6

a Normalized excitation (dashed lines) and emission (solid lines) spectra of powders of CP5 (black, λem = 562 nm, λex = 480 nm), CP5-nano (red, λem = 555 nm, λex = 480 nm), and CP5-modified-nano (blue, λem = 555 nm, λex = 480 nm). b Normalized excitation (dashed lines) and emission (solid lines) spectra of powders of CP6 (black, λem = 540 nm, λex = 480 nm), CP6-nano (red, λem = 540 nm, λex = 480 nm), and CP6-modified-nano (blue, λem = 540 nm, λex = 480 nm). c Normalized excitation (dashed lines) and emission (solid lines) spectra of powders of CP7 (black, λem = 525 nm, λex = 465 nm), CP7-nano (red, λem = 525 nm, λex = 465 nm), and CP7-modified-nano (blue, λem = 504 nm, λex = 440 nm)

Fig. 7
figure 7

a Normalized emission spectra of powders of CP5 (red, λem = 562 nm, λex = 480 nm), CP6 (green, λem = 540 nm, λex = 480 nm), and CP7 (blue, λem = 525 nm, λex = 465 nm). b CIE chromaticity diagram of the emission colors in a. c Emission spectra of CP6 at λex = 480 nm (red: powder, blue: 1 × 10−6 M chloroform solution). d Normalized emission spectra of CP6 at λex = 480 nm (red: powder, green: 1 × 10−4 M chloroform solution, and blue: 1 × 10−6 M chloroform solution); insets are photographs taken under UV irradiation at 365 nm of 1 × 10−6 M chloroform solution (left), 1 × 10−4 M chloroform solution (middle), and powder (right)

On the other hand, by studying the effect of the ring size on the photophysical properties, we can observe that the emission maximum band was blueshifted from 560 to 525 nm with increases in the ring size from cyclopentanone to cycloheptanone; see Fig. 7a, b. It has been reported that the photophysical properties are sensitive to the structure of the molecular aggregates, and slight changes on the molecular structure can drastically alter the aggregation structure, resulting in large changes in the emission behavior of the material, even when the molecules have the same luminescent center structure [34,35,36]. Although the ring size does not affect the structure of the core unit, it can be speculated that it affected the structure of the molecular aggregates, causing a change in the photoluminescence and excitation spectra.

The photoluminescence spectra in concentrated (10−4 M) and highly diluted (10−6 M) chloroform solutions of CP6, as an example, were measured. Figure 7c compares the absolute intensity of the powder luminescence spectra with that in solution. A very strong luminescence was observed in the solid state, but a very weak photoluminescence was detected by the spectrophotometer in the diluted solution (10−6 M). However, in Fig. 7d, we can see that in the higher concentrated solution (10−4 M), stronger luminescence bands appeared. The inset of Fig. 7d confirms that the emission color of CP6 powder and concentrated solution (10−4 M) could be seen by the naked eye under UV irradiation. Oppositely, its diluted solution (10−6 M) was mostly transparent and no emission color was observed. The slight difference in the emission spectral shape between the powder and its concentrated solution (10−4 M) is due to the emission from different aggregated species. From these results, it can be concluded that the luminescence observed in the powder and in the concentrated solution were emitted from the aggregates of the polymer molecules. This stronger luminescence in the polymer powder than in solution encouraged us to speculate that our materials have the AIE characteristics.

Electrochemical studies

Open circuit potential measurements (OCP)

Figure 8 shows the relation between the potential E (mV vs. saturated calomel electrode (SCE)) of mild steel (MS) and the time t (s) of 1.0 M H2SO4 with the CPs composites in the absence and presence of doped iodine as inhibitors at 200 ppm. Table 1 presents the values of immersion potential (Eim) and steady-state potential (Ess) of the blank solution in the absence and presence of the studied inhibitors. It is clear that the values of Ess for the blank solutions were shifted to a slightly more positive potential than Eim, verifying the adsorption of the oxide film on the surface of the MS electrode. By adding different polymers in the absence of doped iodine as inhibitors to the aggressive medium, values of Ess were shifted toward a positive or negative direction of the potential compared to the Ess of the blank. This shift can be attributed to adsorbing a layer of the inhibitor molecules on the surface of MS, which may affect directly the anodic or the cathodic corrosion reaction depending on the tested polymer. On the other hand, using different polymers after doping with iodine, the Ess of all polymers were shifted toward a more positive potential direction than that of the blank solution. This result suggests the occurrence of blocking of the anodic and cathodic sites presented on the MS surface by the inhibitor molecules.

Fig. 8
figure 8

Potential-time curves for mild steel exposed to different inhibitors at 200 ppm without (ac) and with (df) iodine in acidic media: a, d cyclopentanone CPs, b, e cyclohexanone CPs, and c, f cycloheptanone CPs. Green: 1.0 M H2SO4, black: CPm, red: CPm-nano, blue: CPm-modified-nano (m = 5, 6, and 7)

Table 1 Values of Eim and Ess (mV) for mild steel exposed to different inhibitors in acidic media

Polarization measurements

The Tafel polarization profiles of the MS corrosion with and without polymer nanocomposites at 200 ppm in 1.0 M H2SO4 solution are shown in Fig. 9. The numerical values of corrosion potential (Ecorr), corrosion current density (Icorr), CR, resistance polarization (RP), inhibition efficiency (IE%), and surface coverage (θ) for various polymers composites without and with doped iodine are listed in Table S3.

Fig. 9
figure 9

Tafel plot polarization curves of mild steel exposed to different inhibitors at 200 ppm without (ac) and with (df) iodine in acidic media: a, d cyclopentanone CPs, b, e cyclohexanone CPs, and c, f cycloheptanone CPs. Green: 1.0 M H2SO4, black: CPm, red: CPm-nano, blue: CPm-modified-nano (m = 5, 6, and 7)

In the presence of polymer nanocomposites, Rp increased, and Icorr decreased when compared with that obtained from the blank 1.0 M sulfuric acid medium, indicating that these compounds act as good inhibitors due to adsorption of the polymer molecules on the surface of MS. In a comparison to the blank, the values of Icorr decreased in the presence of all polymer nanocomposites, whether doped with iodine or not. The lowest value of Icorr (110 µA/Cm2) was observed for the inhibitor solution of CP7-modified-nano doped with iodine at 200 ppm, exhibiting the maximum IE% (95.92%). The data shown in Table S3 confirm that the addition of 200 ppm of all inhibitors to the acidic media affected both the cathodic and anodic slopes of the curves. Moreover, Ecorr of the tested inhibitors was shifted to the positive direction of the potential against Ecorr of the blank solution. This outcome indicates the adsorption of the inhibitor molecules on the active sites on the surface of MS electrodes. Generally, if the shift of Ecorr > 85 mV with respect to Ecorr of the blank solution, the inhibitor can be viewed as either the cathodic or anodic type depending on the net charge of Ecorr. On the other hand, if the Ecorr shift is less than 85 mV, the inhibitor behaves as a mixed inhibitor [37]. In the present study, Ecorr was shifted to values less than 85 mV, suggesting that the all tested inhibitors act as mixed type inhibitors for MS in 1.0 M H2SO4. Figure 10 and Table S3 show the Rp, CR, and IE% with the tested polymer nanocomposites with and without doped iodine in the 1.0 M H2SO4 solution. By increasing the molecular weight of the monomer of the CP from CP5 to CP6 and CP7, both Rp and IE% increased, while CR decreased. The addition of the nanoclay (modified nanoclay or sodium nanoclay) for each parent polymer (CPm) decreased CR and increased IE% for the modified nanoclay (CPm-modified-nano) more than Na nanocomposites (CPm-nano). Finally, by doping each polymer with iodine in the absence and presence of nanoclay (modified nanoclay or Na nanoclay), the highest Rp and IE% and lowest CR were observed for polymer nanocomposites with the modified nanoclay (CPm-modified-nano). From all the above results of Tafel polarization, it can be concluded that CP7-modified-nano doped with iodine is the best inhibitor among the studied CPs. This result can be due to the larger size of CP7 molecules compared with those of the CP5 and CP6 CPs, allowing CP7 to cover more surface area of the metal [38]. This result can also explain why the mild steel treated in the presence of CPm-modified-nano showed an improved barrier protection compared with using the original CP only, as a result of the large surface area of the nano particles [39]. Moreover, doping our CPs and their nanocomposites with iodine enhanced the effect because the strong adsorption of the halide ions on the metal surface has an important role in the corrosion inhibition mechanism of organic species [40]. Thus, it seems that a high molecular weight monomer, the presence of modified nanoclay, and doping with iodine can enhance the ability of the CP to retard the corrosion of MS in acidic media.

Fig. 10
figure 10

Inhibitor type dependence of Rp (blue), CR (red), and IE% (green) for exposed MS in acidic media

Conclusion

We succeeded in preparing new nanoclay composites by the in situ polymerization of the reported CPs based on cycloalkanones in the main chain. CP nanocomposites showed enhanced solubility and higher thermal stability than their original CPs. Studying the photoluminescence behavior exhibited that the polymers and their nanocomposites are emissive in the solid state, showing a luminescence dependence on the aggregate structure that was affected by the ring size. The anticorrosive study confirmed that the CP nanocomposites have higher corrosion inhibition efficiency than their original CPs. The cycloheptanone modified nanocomposite showed improved barrier protection and higher inhibition efficiency (95.92%) compared with its original polymer without nanoclay, confirming that the higher molecular weight monomer and the presence of modified nanoclay can enhance the ability of the CP to retard the corrosion, as the large molecular size allows the covering of more surface area of the metal.