Introduction

Biological degradation of plant fibers or bacterial residues allows the formation of humic substances in the aquatic ecosystems [13]. The phenolic and carboxylic groups constitute the major fraction of functional groups present in aquatic humic substances [4]. Hence, the oxidative degradation of these substances would generally produce the benzene-carboxylic acids, poly-hydroxy-benzoic acids, and their derivates [57]. Also, the aromatic carboxylic acids were widely used as intermediate reagents or by-products in various industrial fields such as pharmaceuticals, textile, paints, agro-industrial and petrochemical [8]. The multi-sources (naturals and industrials) of these compounds show their massive presence in the natural waters and industrial effluents. The presence of aromatic carboxylic acids in aquatic ecosystems is a serious environmental problem, because of their toxicity and persistence to the natural biodegradation [9]. Therefore, the removal of these pollutants from aquatic ecosystems is a major challenge for environmental remediation.

In this context, several methods such as photocatalytic degradation, chemical precipitation, ion exchange, membrane filtration and adsorption were used for removal of organic compounds from water [1018]. Among these processes, the adsorption is one of the most extensively used methods in wastewater treatment field [1922]. The advantages of the adsorption process is the simplicity and easy to operate, flexibility, economical technique and effectiveness to remove the organic and inorganic pollutants from water [23, 24]. The activated carbon has been widely used as effective adsorbent for treatment of wastewater, but the high cost of regeneration limits its applicability [25]. In this regard, several studies have been focused on the organic polymer materials as alternative adsorbents [26, 27].

Recently, the conducting polymers including polyaniline (PANi), polypyrrole (PPy), polytheophene (PTh) and their derivatives were attracted much attention in various research areas including gas sensors, rechargeable batteries, solar cells, corrosion protection of metals, wastewater treatment, etc. [13, 28, 29]. This potential applicability of the conjugated polymers is due to their high electrical conductivity, good environmental stability, ease of preparation by chemical and electrochemical polymerization, and redox reversibility [30]. Because of their non toxicity, the conducting polymers have been widely used as powder adsorbent for removal of organic and inorganic pollutants from water [3134]. Nevertheless, the recovery of the solid powder from the solution after adsorption imposes additional costs for wastewater treatment. For this reason, the use of an adsorbent film (easily separable) may be beneficial for the adsorption process.

In the present work, the polyaniline (PANi) film was electrochemically synthesized on stainless steel working electrode in sulfuric acid for removal of benzene-polycarboxylic compounds from aqueous solution. The use of PANi film as adsorbent present the advantage of the high quality (doping ratio) of polymer compared to the PANi powder synthesized by chemical polymerization, and also the separation of the adsorbent after the adsorption experiments without filtration. The effects of various operating parameters such as pH, contact time, initial concentration, and temperature on the adsorption process were systematically investigated. Therefore, the adsorbate-adsorbent interactions were characterized by quantum chemical calculation using density functional theory (DFT) method.

Materials and Methods

Materials

The aniline monomer (Aldrich) was distilled before use. The sulfuric acid (98 %) and NaCl (>99 %) were purchased from Merck and used as received. The electrochemical experiments were performed in a one compartment cell with three electrodes connected to voltalab PGZ301 potentiostat/galvanostat with pilot integration controlled by VoltaMaster 4. The working electrode was a stainless steel SUS316L (8 cm2 sheet) specimen with mass composition: C: 0.01 %, Si: 0.51 %, Mn: 0.63 %, P: 0.026 %, S: 0.001 %, Cr: 17.37 %, Ni: 12.04 %, Mo: 2.07 %, Fe: balanced. The electrodes were mechanically polished with 400, 600 and 1200 successively, rinsed in water and acetone before use. A stainless steel plate was used as auxiliary electrode. All potentials were measured versus an Ag/AgCl (0.1 M KCl) reference electrode. A solution of sulfuric acid (0.5 M) was used as supporting electrolyte. After dissolution of aniline monomer into the electrolyte solution, the electropolymerization reaction was carried out on the stainless steel working electrode during at 5 mA/cm2 during 10 min at room temperature.

The stock solutions (1000 mg/L) of trimellitic and pyromellitic acids (Merck, 99 %) were prepared in distilled water. The resulting solutions used in the analysis were obtained by successive dilutions to the desired concentrations. The wavelengths of maximum absorption, molecular weights and chemical formulas of the adsorbates are summarized in Table 1.

Table 1 Physicochemical characteristics of trimellitic and pyromellitic acids

Preparation of Adsorbent

PANi films were prepared by electropolymerization of aniline (0.2 M) in H2SO4 (0.5 M) using galvanostatic method by applying 5 mA/cm2 current density [35]. It was observed that the synthesis of PANi film takes place in two successive steps. After 50 s, the potential reaches the value of 1 V versus Ag/AgCl, in a section characterized by the induction time where the electrode dissolves, then decreases with the time. In the second step, the potential decreases slowly to a plateau of 0.65 V versus Ag/AgCl. The electropolymerization reaction was continued for 10 min. Then, the obtained PANi film was washed several times with distilled water and ethanol in order to remove any remaining monomer and oligomer residues. Lastly, the film was dried in an oven at 65 °C for 3 h.

Analyses and Adsorption Experiments

Scanning electron microscopy (SEM) images were obtained using a FEI Quanta 200 ESEM instrument. Fourier transforms infrared (FT-IR) analysis of the electrodeposited films on the working electrode was performed with IRTF Vertex 70 spectrometer (400, 4000 cm−1).

The adsorption experiments of trimellitic (Tri) and pyromellitic (Pyro) acids on the PANi film were carried out in a batch system by varying initial pH of solution (2–10), solid/liquid contact time(10–300 min), initial concentration (20–200 mg/L), and temperature (25–55 °C). The adsorption equilibrium tests were carried out using a series of glass flasks (150 mL) containing 50 mL of adsorbate solutions. Then, the PANi film was immersed in each flask with a fixed agitation speed of 150 rpm. The adjustment of solution pH is achieved by addition a few drops of HCl (0.1 M) and NaOH (0.1 M). The solution concentrations before and after adsorption tests were determined using a double beam spectrophotometer (UV 2300 spectrophotometer) at λmax of each adsorbate. The adsorbed amount and adsorption efficiency were calculated using the Eqs. (1) and (2), respectively.

$${\text{Q}}_{\text{e}} = \frac{{\left( {{\text{C}}_{0} {-} {\text{C}}_{\text{e}} } \right) \times {\text{V}}}}{\text{m}}({\text{in}}\;{\text{mg/g}})$$
(1)
$${\text{R}}({\text{\% }}) = \frac{{({\text{C}}_{0} {-} {\text{C}}_{\text{e}} )}}{{{\text{C}}_{0} }} \times 100$$
(2)

Here C0 and Ce are the initial and equilibrium concentrations (in mg/L), respectively. V (L) is the volume of solution and m (g) is the weight of the PANi film.

Regeneration tests

Desorption tests were carried out to investigate the reusability of PANi film. For this, the PANi film was immersed in 50 mL of Tri and Pyro acids (20 mg/L) at pH 6 and 25 °C for 2 h. Then, the loaded PANi film was regenerated using 20 mL of NaOH (0.1 M) as desorption medium for 2 h. The regenerated PANi film was washed several times with distilled water and redoped by 20 mL of 0.1 M HCl solution for 2 h. The concentrations of Tri and Pyro acids after adsorption tests on the regenerated PANi film were measured with spectrophotometer. This procedure was been repeated for 4 cycles.

Computational Methodology

The DFT calculations were performed to investigate the adsorption mechanism of Tri and Pyro acids on the PANi. All quantum chemical calculations have been carried out using GAUSSIAN 09 suite of program [36]. In order to include the electron correlations in DFT calculation, the B3LYP/6-31G(d) basis set was used to perform electronic structure calculation [37]. All geometries of the PANi, Tri acid, Pyro acid, PANi/Tri complex, and PANi/Pyro complex were optimized without any symmetry constraint [38]. The Complete geometry optimizations were confirmed by frequency analysis (absence of imaginary frequencies). For a good approach of the adsorption experimental results obtained in water, the conductor-like polarizable continuum model (CPCM) was used to take into account the effect of solvent (water) in computational study [39].

The interaction energy (ΔEint) between adsorbate molecules (Tri and Pyro acids) and PANi was calculated by the following equation:

$$\Delta E_{int} = E(PANi/Adsorbate) - E\left( {PANi} \right) - E(Adsorbate)$$
(3)

where Adsorbate is Tri or Pyro acid, E(PANi/Adsorbate) is the energy of PANi/Adsorbate complex, E(PANi) is the energy of PANi, and E(Adsorbate) is the energy of adsorbate molecule.

The electronic charge transfer at solid/liquid interface during adsorption process was evaluated by charge difference of the PANi molecule before and after adsorption of Tri and Pyro acids. The charge transfer (Δq) was calculated by Eq. (4):

$$\Delta q = q_{{{\text{PANi before adsorption}} }} - q_{{{\text{PANi after adsorption}} }}$$
(4)

where qPANi before adsorption and qPANi after adsorption are the mulliken charge of PANi molecule before and after adsorption.

Results and Discussion

Microscopy and Spectroscopy Experiments

In order to obtain information concerning the morphology of the polymer coating, PANi film electrosynthesized on stainless steel electrode in sulfuric acid medium electrolyte using galvanostatic technique, was investigated by SEM measurement. The thick PANi film obtained at 5 mA/cm2 current density during 10 min has a short fibrillar agglomerate and rougher surface structure with high porosity. Similar structure was found by Zhang et al. [40]. This open morphology is a better platform for adsorption.

PANi film electrodeposited on stainless steel plate have been analyzed by infrared (TFIR) spectroscopy. The absorption band located at 725 cm−1 is assigned to ring C–C bending vibration and the band at 582 cm−1 due to ring in plane deformation [41]. The peak at 855 cm−1 was caused by C–H out-of-plane bending. In the region of 1058–1198 cm−1, aromatic C–H in-plane-bending modes are generally observed. Absorption band at 1484 cm−1 is attributed to C=N stretching in aromatic compounds. The absorption peak situated at 1637 cm−1 is assigned to C=C stretching in aromatic nuclei. The band observed at 3426 cm−1 is due to N–H stretching an aromatic amine of PANi. The presence of a peak at 3226 cm−1 assigned to NH2 +, confirms that the obtained PANi film is a doped form (emeraldine salt) [42]. This reflects that the PANi film surface is positively charged. Therefore, the PANi film is may be a probable effective adsorbent for removal of anionic pollutants from aqueous solutions.

Adsorption Study

Effect of Solution pH

The solution pH has an important influence on the adsorption behavior of organic compounds onto adsorbent surfaces [43, 44]. The effect of initial pH on the adsorption of Tri and Pyro acids by PANi film were investigated over a pH range ranging from 2 to 10. As shown in Fig. 1, the adsorption quantities increased with increasing pH values at acidic medium; this could be attributed to the deprotonation of carboxylic groups of Tri and Pyro acids according to pKa values (Table 1). Consequently, facilitate the adsorption of Tri and Pyro acids via electrostatic interactions between deprotonated carboxylic groups of each adsorbate (negatively charged) and positively charged surface of doped PANi film. The optimal adsorption was obtained at pH 6. In alkaline medium, the adsorption decreased significantly with increasing pH of solution. This adsorption inhibition may be due to the undoping process of PANi film by hydroxyl ions under alkaline conditions. Similar behavior was found for removal of sulfonated dyes (anionic) by doped PANi [45]. The adsorption process is probably governed by the electrostatic attractions between the carboxylic groups of adsorbate molecules and amine groups of the PANi emeraldine salt form.

Fig. 1
figure 1

The effect of initial pH on the adsorption efficiency of Tri and Pyro acids onto PANi film (conditions: C0 = 20 mg/L, R = 0.27 g/L, t = 120 min and T = 20 ± 1 °C), and schematic illustration of the adsorption mechanism

Kinetics Studies

Fig 2 shows the effect of the contact time on the adsorption of Tri and Pyro acids onto PANi film. The experimental results indicate that the adsorption process takes place in two stages: (1) the first rapid stage is due to the availability of all adsorption sites on the surface of PANi film and the high concentration gradient of adsorbate molecules between liquid phase and solid phase [46]; and (2) the second slower stage at the long times can be due to the saturation of active sites and low diffusion of adsorbates into the internal pores of the adsorbent. The adsorption equilibrium was achieved at 120 min of solid/liquid contact. The comparison of adsorbed amounts of the Tri and Pyro acids indicates that the Pyro acid adsorbs better than Tri acid. This is may be due to the increase in the number of carboxylic groups substituted on the aromatic rings.

Fig. 2
figure 2

The effect of contact time on the adsorption efficiency of Tri and Pyro acids onto PANi film (conditions: C0 = 20 mg/L, R = 0.27 g/L, T = 20 ± 1 °C and pH = 6)

In order to investigate the adsorption kinetic mechanism, the pseudo-first-order [47], pseudo-second-order [48] and intraparticle diffusion [49] models were used to fit experimental data.

The linear form of the pseudo-first-order model is expressed as:

$${\text{ln }}\left( {{\text{Q}}_{\text{e}} - {\text{Q}}_{\text{t}} } \right) = {\text{lnQ}}_{\text{e}} - {\text{k}}_{1} {\text{t}}$$
(5)

The linear form of the pseudo-second-order model is given by the relationship:

$$\frac{\text{t}}{{{\text{Q}}_{\text{t}} }} = \frac{1}{{{\text{k}}_{2} {\text{Q}}_{\text{e}}^{2} }} + \frac{\text{t}}{{{\text{Q}}_{\text{e}} }}$$
(6)

The intraparticle diffusion model is given in the following expression:

$${\text{Q}}_{\text{t}} = {\text{k}}_{\text{int}} {\text{t}}^{1/2} + {\text{C}} .$$
(7)

Here Qe and Qt are the adsorbed amounts (in mg/g) at equilibrium and any time t, respectively. k1 (min−1), k2 (g/mg min), and kint (mg/g min1/2) are the pseudo-first-order, pseudo-second-order, and intraparticle diffusion rate constants, respectively.

The linear plots of pseudo-first-order, pseudo-second-order, and intraparticle diffusion models are shown in Fig. 3. Table 2 summarizes the parameters of the three kinetic models with their regression coefficients (R2). The values of correlation coefficients indicated that the adsorption kinetics of Tri and Pyro acids were well obeyed the pseudo-second-order (R2 = 0.999) than that pseudo-first-order kinetic model. In addition, the calculated values of the equilibrium adsorbed amounts by pseudo-second-order model are closer to those obtained experimentally.

Fig. 3
figure 3

Adsorption kinetics of Tri and Pyro acids onto PANi film: a pseudo-first order, b pseudo-second order and c intraparticle diffusion

Table 2 Kinetic model data for adsorption of Tri and Pyro acids on the PANi film

The intra-particle diffusion model was applied to understand the solute transfer mechanism of Tri and Pyro acids on the PANi film. Fig 3c indicates that the plots of intraparticle diffusion have two distinct linear portions, indicating that the adsorption process takes place in two successive stages. The first linear portion represents rapid adsorption in the external surface of adsorbent. The second portion reflects the intraparticle diffusion of Tri and Pyro acids followed by gradual adsorption on the inner surface of PANi film. The high values of kint1, compared with kint2, indicate that the removal of Tri and Pyro acids is rapid attribute to the large number of available adsorption active sites at the beginning process. The reduction of kint values in the second stage can be explained by decrease of adsorbate concentration gradients between the solution and adsorbent surface. Also, the linear plot does not pass through the zero point, which indicates that the intraparticle diffusion was not the sole rate-limiting step. Similar mass transfer mechanism was found by Saleh [46, 50] in the adsorption of Hg(II) on the silica/carbon nanotubes, silica/activated carbon and silica–multiwall carbon nanotubes.

Effect of Initial Concentration and Adsorption Isotherms

The effect of initial concentration on the adsorption of Tri and Pyro acids by PANi film was investigated and the experimental results were shown in Fig. 4. It was observed that the adsorbed amount increased with increase initial concentration of Tri and Pyro acids. This can be explained by increase of driving force for mass transfer from aqueous solution to adsorbent surface at high initial adsorbate concentration.

Fig. 4
figure 4

The effect of initial concentration on the adsorption efficiency of Tri and Pyro acids onto PANi film (conditions: t = 120 min, R = 0.27 g/L, T = 20 ± 1 °C and pH = 6)

Based on the equilibrium experimental data, the adsorption isotherms are used to explain the mechanism by which the Tri and Pyro acids are adsorbed on the PANi film surface. The Langmuir [51], Freundlich [52] and Temkin [53] isotherm models were applied to investigate the adsorption behavior of Tri and Pyro acids on the PANi film.

The linear form of the Langmuir isotherm model is shown by:

$$\frac{{C_{e} }}{{Q_{e} }} = \frac{1}{{{\text{K}}_{\text{L}} {\text{Q}}_{\text{m}} }} + \frac{{C_{e} }}{{{\text{Q}}_{\text{m}} }}$$
(8)

Where KL (L/mg) is Langmuir binding constant; Ce (mg/L) is equilibrium concentration; Qe (mg/g) is adsorbed amount at equilibrium; Qm (mg/g) is maximum monolayer adsorption capacity.

The separation factor, rL, is dimensionless equilibrium parameter for determining the feasibility of the Langmuir isotherm model. rL is calculated by equation below:

$${\text{r}}_{\text{L}} = 1/\left( {1 + {\text{K}}_{\text{L}} {\text{C}}_{\text{m}} } \right)$$
(9)

where Cm and KL are the maximum initial concentration and Langmuir binding constant, respectively. The rL values indicate that the type of isotherm to be irreversible (rL = 0), favorable (0 < rL < 1), linear (rL = 1) or unfavorable (rL > 1) [54].

The linear form of the Freundlich isotherm model is given as:

$${ \ln }Q_{e} = {\text{lnK}}_{\text{f}} + \frac{1}{{{\text{n}}_{\text{f}} { \ln }C_{e} }}$$
(10)

where Kf and nf are empirical constants of Freundlich isotherm.

The linear equation of Temkin isotherm model can be expressed as:

$$Q_{e} = {\text{BlnK}}_{\text{T}} + {\text{Bln}}C_{e}$$
(11)

where KT and B are the Temkin constants.

Table 3 summarizes the adsorption isotherm parameters calculated from the slope and y-intercept of each isotherm linear plot (Fig. 5). As shown in Fig. 5a, it was observed that the adsorption equilibrium data of Tri and Pyro acids were best fitted to the Langmuir isotherm model with high values of correlation coefficients (0.999). Hence, the maximum adsorption capacities obtained by the Langmuir model were close to those obtained experimentally. In addition, the values of rL (between zero and 1) suggest that the adsorption of the Tri and Pyro acids on the PANi film is favorable in nature. This indicates that the Tri and Pyro acids were distributed homogenously over a monolayer surface of the PANi film (Table 4).

Table 3 The values of parameters and correlation coefficients of Langmuir, Freundlich and Temkin equations
Fig. 5
figure 5

Linear isotherm plots for the adsorption of Tri and Pyro acids onto PANi film: a Langmuir isotherm, b Freundlich isotherm and c Temkin isotherm

Table 4 Thermodynamic parameters for the adsorption of Tri and Pyro acids on the PANi film

Comparison of maximum adsorbed amounts of the PANi film for the removal of aromatic acids with some reported adsorbent materials is presented in Table 5. It was observed that the adsorption capacities of the PANi film are higher than most of the other adsorbents. Also, the ease of separation of the adsorbent after adsorption experiments is an additional benefit of the PANi film compared with conventional adsorbents in powder form. The recovery of adsorbent powder after use by separation techniques such as filtration, centrifugation and magnetic separation imposes the additional costs of water treatment. This step was avoided for our adsorbent (PANi film). These indicate that the PANi film can be used as an effective and easily separable adsorbent for the removal of aromatic acids from aqueous solutions.

Table 5 Comparison of adsorption capacities of aromatic carboxylic acids on various adsorbents

Effect of Temperature and Adsorption Thermodynamics

It is interesting to study the effect of temperature on the adsorption efficiency, because increasing of the temperature promotes intergranular diffusion of adsorbate molecules [58]. In addition, increasing the temperature involves a decrease of the solution viscosity and therefore increasing the mobility of adsorbate molecules. The influence of temperature on the removal of Tri and Pyro acids by PANi film was investigated in the temperature range of 20–50 °C. From the obtained results (Fig. not shown), it was observed that the heating slightly favors the binding capacities of Tri and Pyro acids on the PANi film. This can be justified by increase of the penetration of adsorbate molecules through adsorbent pores.

In order to evaluate the thermodynamic behavior of adsorption process, the standard free enthalpy change (ΔG°), standard enthalpy change (ΔH°), and standard entropy change (ΔS°) were calculated by Eqs. (12), (13) and (14) [59].

$${ \ln }K_{d} = \frac{{\Delta S^{^\circ } }}{\text{R}} - \frac{{\Delta H^{^\circ } }}{{{\text{R}}T}}$$
(12)
$$\Delta G^{^\circ } = - {\text{R}}T{ \ln }K_{d}$$
(13)

The distribution coefficient is defined as follows:

$$K_{d} = \frac{{Q_{e} }}{{C_{e} }} \left( {{\text{in}}\;{\text{L/g}}} \right)$$
(14)

where R is the universal gas constant (8.314 J.mol/°K) and T is solution temperature in °K. The enthalpy and entropy values were obtained from the slope and y-intercept of lnKd versus 1/T linear plots (Fig. 6).

Fig. 6
figure 6

Plots of LnKd versus 1/T for adsorption of Tri and Pyro acids onto PANi film

The values of the thermodynamic parameters were calculated and are summarized in Table 4. The negative values of ΔG° suggest that the adsorption Tri and Pyro acids on PANi film is spontaneous. The decrease of ΔG° values with increasing temperature indicates that the adsorption process is more favorable at higher temperature. Also, the values of ΔG° (−20 < ΔG° < 0 kJ/mol) showed that the adsorption is a physisorption process [60]. The positive values of ΔH° indicate that the adsorption is endothermic process in nature. The positive values of entropy (ΔS°) showed the affinity of Tri and Pyro acids on surface of PANi film and increase in the randomness at the solid-solute interface [50].

Desorption Study

To evaluate the reusability of PANi film, regeneration experiments were carried out using NaOH solution as desorbent agent. The adsorption efficiency of regenerated PANi film was investigated and illustrated in Fig. 7. It is observed that the reduction of adsorption efficiencies of Tri and Pyro acids on the PANi film was not considerable (<1.3 %) for first two cycles. For the third and fourth cycles, it is found that the removal efficiencies decrease by 6.0 and 7.2 % for Tri and Pyro acids, respectively. This reduction can be explained by the breakdown of polymer chains by repetition of NaOH/HCl treatment during regeneration process. These results indicate that the PANi film can be considered as recyclable adsorbent for removal of Tri and Pyro acids from aqueous solution. Hence, it can be concluded that the electrochemically synthesized PANi film is a practical adsorbent for wastewater treatment on industrial scale.

Fig. 7
figure 7

Desorption studies of Tri and Pyro acids from the PANi film

DFT Investigation

The molecular electrostatic potential (MEP) of Tri acid, Pyro acid and PANi (dianiline) was calculated in order to investigate the electrophilic and nucleophilic sites (Fig. 8) [61]. It was observed that the carboxylic functional groups of Tri and Pyro acids present a highest negative charge density (red color). This suggests that the –COOH groups are considered as the nucleophilic sites for Tri and Pyro acids. On the other hand, the amino groups of PANi possess highest positive diffusion region (blue color), which indicates that –NH– groups are the electrophilic sites of PANi. These results indicate that the Tri and Pyro acids may be adsorbed on the PANi by interactions between –COOH and –NH– groups. Also, the intermolecular electronic charge transfer phenomena at solute/adsorbent interface were estimated by difference of electron density before and after adsorption of Tri and Pyro acids on the PANi. The redistribution of electronic charge during complexes (PANi/Tri and PANi/Pyro) formation shows that the Tri and Pyro acids lose 0.070 and 0.096 e charge, respectively. The electron loss of adsorbates molecules was transferred to the PANi [62]. These low charge transferring values reveal that the adsorption of Tri and Pyro acids on the PANi is a physisorption type [63]. This is in perfect agreement with obtained experimental results.

Fig. 8
figure 8

Molecular electrostatic potential plots of Tri acid, Pyro acid and PANi computed by DFT at the B3LYP/6-31G(d) level

From the Fig. 9, the optimized geometries of PANi/Tri and PANi/Pyro complexes show that the amine hydrogen atom (24H) of the PANi surface is situated at distances of 1.98 and 1.95 Å from the oxygen atoms of Tri (41O) and Pyro acids (43O), respectively. The low interactions (large intermolecular distances) were also observed between hydrogen atoms substituted on the aromatic ring of PANi and oxygen atoms of Tri and Pyro acids. This demonstrates that the mechanism involved in the adsorption was mainly governed by the hydrogen bonding interactions between the polar functional groups (–COOH via carbonyl oxygen atoms) of adsorbates molecules and amine groups (–NH–) of the PANi film [64, 65]. In addition, the intermolecular distances present in the PANi/Pyro complex are shorter than those found in the PANi/Tri complex; this shows that the affinity force between PANi and Pyro acid is higher compare to Tri.

Fig. 9
figure 9

Optimized structures of PANi–Tri and PANi–Pyro complexes calculated using DFT at the B3LYP/6-31G(d) basis set

The interaction energy (ΔEint) during the formation of PANi/Tri and PANi/Pyro complexes is an important key in the comparison of their stability [66, 67], and consequently the affinity of each adsorbate molecule on the PANi film. The change in energy during the formation of PANi/Tri and PANi/Pyro complexes are 0.103 and 0.927 a.u., respectively. Based on these results, the interactions between PANi and Pyro acid are higher than those between PANi and Tri acid. This suggested that the PANi has a considerable adsorption capability to Pyro acid compared with Tri acid, which is in accordance with adsorption capacities (Qe) obtained experimentally. In addition, this result is in total agreement with intermolecular distances; because of the interaction energy is inversely proportional to intermolecular distances [68]. The low values of ΔEint confirm that the Tri and Pyro acids were adsorbed physically on the PANi film with a low charge transfer.

Conclusion

The adsorption of Tri and Pyro acids was carried out using PANi film synthesized by in situ electrochemical polymerization on stainless steel electrode in sulfuric acid medium. The optimum experimental conditions for adsorption of Tri and Pyro acids on the PANi film were systematically investigated and are found as: pH = 6, t = 120 min, initial concentration = 20 mg/L and temperature = 25 °C. The adsorption kinetic data were best described by pseudo-second-order kinetic model (R2 = 0.999). The equilibrium data were well fitted to Langmuir isotherm model (R2 = 0.999) with maximum monolayer adsorbed amounts of 190.17 and 204.18 mg/g for Tri and Pyro acids, respectively. The values of thermodynamic parameters (ΔG°, ΔH° and ΔS°) show that the adsorption is spontaneous and endothermic process. The regeneration studies showed that the PANi film is reusable adsorbent. The DFT calculations showed the physical interactions between adsorbate molecules and adsorbent surface were the dominant mechanism of the adsorption. Finally, the obtained results suggest that the PANi film can be used as cost-effective, eco-friendly, reusable and easily separable adsorbent for the treatment of wastewater containing aromatic acids and eventually other pollutants.