Introduction

Synthetic dyes represent one of the major water contaminants in industry (Adegoke and Bello 2015). More than 7 × 105 tons of dyes are produced worldwide annually (Ayhan 2009; Ibrahim et al. 2010; Raval et al. 2016). About 12% of produced synthetic dyes are lost during manufacturing and processing operations (Hashem et al. 2007; Hema and Arivoli 2007). Textile, food, and paper industries generate considerable amounts of colored wastewaters which are toxic and even carcinogenic and mutagenic (Das et al. 2015; Ardejani et al. 2007).

Several physical, chemical, and biological techniques were applied to the treatment of wastewater (Ferrero 2007). Among all these methods, adsorption is one of the most attractive techniques owing to its simplicity, flexibility, cost, and suitability for batch and continuous processes (Kesraoui et al. 2017; Limousy et al. 2017; Miraboutalebi et al. 2017; Rozumová et al. 2016; Muthanna 2016).

Low cost, quite abundance, and renewability of agricultural biomass make them promising adsorbent for large variety of pollutants (Muthanna 2016; Amor and Ismail 2015; Ahmed and Theydan 2014; Briones et al. 2011; El-Naas et al. 2010). One can cite orange peel (Emanuele Lessa et al. 2017), date pits (Muthanna 2016), cashew nut shell (Subramaniam and Ponnusamy 2015), olive pomace (Banat et al. 2007), and almond peel (Benaissa 2010). In Tunisia, date production has moved from 103,000 to 225,000 tons between 2000 and 2015 (interprofessional grouping of fruits 2015). Yet, apart from its use as animal feedstock or its transformation into bioethanol or biomethane in few small units, no other recovery method is applied in the Tunisian context.

In adsorption process, the chemistry of the sorbent surface is as important as its textural properties particularly when the sorption process involves electrostatic interaction between the solute molecules and some active sites on the sorbent available surface. Thus, determining pore size, surface area, and functional groups allows to explain the possible mechanisms of dyestuff removal from multiphase or homogenous systems by adsorption process (Ashour 2010).

In order to ensure an efficient removal of pollutants from water and to maximize the adsorption yield, an optimization study should be conducted (Garbaa et al. 2015). The improvement and the optimization of the processes can be carried out by response surface methodology (RSM) which is defined as a combination between mathematical and statistical approaches (Wang 2013). In fact, RSM can be considered as an efficient tool to study the effect of process variables in the defined response as well as the interactions between all the factors (Das et al. 2015). The strong point of this tool in process optimization is to lower the experiment number and thus the time and the cost of the adsorption process (Lee et al. 2000; Alam et al. 2007).

The novelty of this work consists in using date pits as an adsorbent of two basic dyes, namely basic red 2 and methyl violet, which never underwent adsorption operation by this agro-industrial waste. In fact, according to the literature, BR2 and MV were removed by some other adsorbents such as soybean hull (Chandane and Sing 2014), local clay (Miyah et al. 2017), and soil composites (Das et al. 2015). At the same time, date stones were reported as efficient adsorbent materials to remove several dyes such as methylene blue and methyl orange (Mahmoudi et al. 2015). But to our knowledge, the combinations (date pits, BR2 and date pits, MV) were never tested. Our interest toward these two dyes is justified by their extensive and wide use in different industrial applications (textile, paper...) (Aljeboree et al. 2017) and their mitotic and mutagen effect on aquatic life (Körbahti and Rauf 2008).

Thus, the main objective of the present work is to examine the effectiveness of date pits for the removal of BR2 and MV from aqueous solution on batch system. Firstly, textural and chemical properties of date pits particles were described by the use of scanning electron microscopy, BET analysis, X-ray diffraction, and FTIR analysis. Secondly, sensitive operating parameters such as temperature, contact time, pH, and initial dye concentration have been tested. A central composite design (CCD) helped to determine the major factors and the mathematical model that predict the response as function of factor variations. Then, the optimum conditions were determined using the model and its relative response surfaces. Equilibrium isotherms and kinetics were determined using different models, the fitting of which was consolidated by three error functions.

Material and methods

Adsorbate

Basic red 2 (BR2), 3,7-diamino-2,8-dimethyl-5-phenylphenazinium chloride, and methyl violet (MV), hexamethylpararosaniline chloride, were supplied by Sigma-Aldrich, USA. Chemical structures of RB2 and MV are shown in Fig. 1 and their chemical properties are summarized in Table 1.

Fig. 1
figure 1

Chemical structure of a basic red 2 and b methyl violet dyes

Table 1 Chemical properties of BR2 and MV

Dye stock solutions were prepared by dissolving 1 g of dye in 1 L distilled water and the desired dye concentrations were obtained by the dilution of the stock solution. Sodium hydroxide and hydrochloric acid solutions were used to adjust the pH.

Adsorbent

The date pits were collected from a date transformation industry located in Tunisia. After being washed by distilled water, the collected materials spent 24 h in an oven at 40 °C. Grinding and sieving steps followed to obtain particle sizes ranging from 125 to 250 μm. The final product was stored in an air-tight container.

Adsorbent characterization

The nitrogen adsorption/desorption isotherm was carried out to calculate the BET specific surface area (SBET) of the date pits. To achieve these calculations, the sample was degassed at 120 °C for 4 h. BET analysis was carried out by N2-physisorption at 77 K using the surface area analyzer model Autosorb-1C (Quantachrome, USA) and the equation is applied on the adsorption isotherm for P/P0 ranging from 0.05 to 0.35.

The surface texture of date pits was studied by a FEI QUANTA 200 scanning electron microscope (SEM). The substrate was placed on the aluminum tube, coated with gold for electron reflection, and vacuumed during 5 to 10 min.

For the purpose of analyzing the functional groups of date pits, a Fourier transform infrared spectroscopy (FTIR) analysis using potassium bromide (KBr, Merck) disks has been performed (Miraboutalebi et al. 2017). An amount of 1.5 mg of the dried substance were mixed with 250 mg KBr in agate mortar and the obtained mixture was pressed at 10 atm during 10 min. The FTIR spectra of the prepared disks were collected using a Perkin-Elmer Spectrum 2000 FTIR spectrometer. Recording was set from 4000 to 400 cm−1.

The X-ray diffraction (XRD) analysis was conducted to study the crystallographic structure of date pits. A mass of 0.5 g of finely ground fruit stones is placed between the blade and the slide and introduced into the diffractometer. X-ray powder diffraction data were obtained on PHILIPS PW 3040 diffractometer. The wavelength of X-radiation was adjusted to 1.789 A° and scanning was done between 0° < 2θ < 80°.

The electrical neutrality of the date pits adsorbent can be specified by the point of zero charge (pHpzc) at a value of pH under solution conditions (Saleh 2015). A batch equilibrium technique was carried out to determine the (pHpzc) (Banat et al. 2007): 50 mL of NaCl solution (0.01 M) were placed in Erlenmeyer flasks. HCl (1 N) and NaOH (1 N) solutions were used to adjust the pH of NaCl solution between 2 and 12. The final pH was measured after adding 0.05 g of date pits and keeping solution under agitation during 6 h at room temperature (25 °C). The pHpzc value was determined from the intersection of the curve [(pHfinal) vs. (pHinitial)] and the bissector (Saleh 2015; Bohli et al. 2015).

Experimental design and analysis

CCD is a good tool to evaluate how far the response (percentages of BR2 and MV adsorption) is affected by independent variables and to optimize the relevant conditions in order to predict the best value of the response.

The four independent variables considered here are initial concentration (X1), pH (X2), temperature (X3), and contact time (X4). Based on some preliminary experiments (Table 2), these four variables undergo five different levels.

Table 2 Process control variables and their coded levels for the central composite design of dye adsorption

For a design of (n = 4) independent variables, total number (N) of experiments is given by (Lee et al. 2000; Myers and Montgomery 2001; Alam et al. 2007):

$$ N=\left({2}^n+2n+{n}_{\mathrm{c}}\right)=30 $$
(1)

The range of each variable is firstly fixed, then a code is affected as follows:

  • 0: For the center points

  • ±1: For factorial points

  • ±α: For the axial points

where

$$ \propto =\sqrt[4]{n}=2 $$
(2)

The uncoded ith independent variable Xi is transformed into a dimensionless coded value xi as (Zhu et al. 2016; Adinarayana and Ellaiah 2002):

$$ {x}_i=\frac{\left({X}_i-{X}_{i0}\right)}{\Delta {X}_i} $$
(3)

where Xi0 is the uncoded ith independent variable at the center point and ∆Xi is the step change value.

The coded and uncoded values corresponding to the four studied variables are summarized in Table 2.

The response variable named Y which is the percentage of adsorption by the date pits can be expressed as the following:

$$ Y=f\ \left({X}_1,{X}_2,{X}_3,\dots, {X}_{\mathrm{n}}\right)+e $$
(4)

In which, f is the response function and e is the experimental error (Singhb et al. 2012b).

A higher-order polynomial, such as quadratic model may express the predicted response Y as (Lee et al. 2000; Alam et al. 2007; Bhaumik and Mondal 2016):

$$ Y=\mathrm{a}0{\sum}_{i=1}^n aiXi+{\sum}_{i=1}^n aii\ Xi2+{\sum}_{i=1}^{n-1}{\sum}_{j=1}^n aij\ Xi Xj+e $$
(5)

where a0, ai, aii, and aij are, respectively, the constant, the linear, the quadratic, and the interaction coefficients.

The student’s t test and the analysis of variance (ANOVA) were carried out to verify the signification of the regression coefficients and the adequacy of the selected model. Predicted and measured values of the response variable allowed us to calculate the correlation coefficient (R2) (Lee et al. 2000; Alam et al. 2007; Garbaa et al. 2015).

The graphical and regression analysis as well as statistical significance were achieved using STAISTICA (trial version 9.0, StatSoft Inc., USA) software package to yield regression equations, regression coefficients, and analysis of variance (ANOVA). Contours were plotted to visualize the relationship between the variables and the response and to find an optimum parameters combination.

Sorption procedure

Optimization, kinetic, and isotherm studies have been carried out to assess the adsorbent capacity and the sorption rate of basic red 2 and methyl violet removal from aqueous solution. In optimization study, adsorption tests were performed in 30 sets of 250-ml Erlenmeyer flasks filled with 100 mL of dye solution. Kinetic tests were performed at a fixed initial concentration of 60 mg/L for a period of time ranging from 5 to 240 min. In equilibrium study, different initial concentration (25–400 mg L−1) were prepared and the adsorption reaction time was fixed to 120 min as this latter was proved to be long enough for the process to reach equilibrium according to kinetic results, on the one hand and according to some previous studies on the other hand.

Kinetic and equilibrium sorption tests were conducted according the same procedure. The pH of BR2 and MV solutions were fixed respectively on 7.7 and 7.28. A mass of 100 mg of date pits (size from 125 to 250 μm) was added to each flask and shaked at 125 rpm at 35 °C. After centrifugation (4000 rpm, 15 min), samples were taken from the solutions. The concentrations of basic red 2 and methyl violet in the supernatant liquids were determined using a double beam UV–vis spectrophotometer (UV-1601 Shimadzu, Japan) at their maximum wavelength of 518 and 584 nm, respectively.

The removal rate of BR2 and MV from the water was calculated using Eq. (6):

$$ \mathrm{Removal}\ \mathrm{percentage}=\frac{\left(C0-C\mathrm{e}\right)}{C0}\ \mathrm{x}\ 100 $$
(6)

where Co (mg L−1) is the initial liquid-phase concentration of dye and Ce (mg L−1) is the equilibrium liquid-phase concentration of dye.

At optimum conditions, the amount of the adsorbed dye qt (mg g−1) in t-time was calculated by the following mass balance equation:

$$ {q}_t=\frac{\left({C}_0-{C}_t\right)v}{w} $$
(7)

where v (L) is the volume of the solution, w (g) is the mass of dry sorbent and Ct (mg L−1) is liquid-phase concentration of dye at any time t.

Moreover, the amount of dye uptake by the adsorbent at equilibrium, qe (mg g−1) was determined as follows:

$$ q\mathrm{e}=\frac{\left(C0- Ce\right)\bullet v}{w}\kern1.25em $$
(8)

Results and discussions

Adsorbent characterization

Scanning electron microscopy analysis

As adsorption process is a surface phenomenon, it is mainly depending on the surface characteristics such as the number of pores present on the surface of the adsorbent material. The surface morphology and structure (textural and porous) of the adsorbent material was analyzed by scanning electron microscopy (SEM). SEM micrographs obtained at ×1000 and ×2000 magnification were shown in Fig. 2. SEM analysis revealed that date pits exhibited a rough surface with the presence of some macropores.

Fig. 2
figure 2

SEM micrographs of date pits particles on a ×1000 and b ×2000 magnification

X-ray diffraction analysis

The powder X-ray diffraction of date pits data is shown in Fig. 3. The diffractogram did not exhibit a horizontal basic line and highlighted the presence of few diffraction peaks. This result indicates that the main structure of raw date pits is amorphous and its crystalline matter content is low.

Fig. 3
figure 3

X-ray diffraction patterns of raw date pits

BET analysis

The BET method was also carried out in order to determine the specific surface area (SBET) of date pits particles, which was found 0.27 m2 g−1. Similarly to our results, Arami et al. (2006) showed low specific surface magnitude (0.76 m2 g−1) of the soy meal hull with high capacity of adsorption of direct red 80 (178.57 mg g−1).

FTIR analysis

Since the adsorption capacity is strongly influenced by the surface chemistry of the adsorbent (Mane et al. 2007; Al-Ghouti et al. 2013), chemical structure is important to explore. Fourier transform infrared (FTIR) technique is an important tool to identify the characteristic functional groups and to study the interaction between an adsorbate and the active groups on the surface of the adsorbent.

The possible involvement of some functional groups of date pits was determined by using FTIR analysis. The FTIR spectrum has been analyzed by attenuated total reflectance within the range of 400–4000 cm−1 and was shown in Fig. 4.

Fig. 4
figure 4

FTIR spectra of raw date pits

As shown in the FTIR spectrum of date pits, a broad band of the O-H stretching vibration appears at 3396 cm−1. It corresponds to both free and bonded hydroxyl groups (alcohols, phenols, and carboxylic acids) as in cellulose, pectin and lignin (Gnanasambandam and Protor 2000; Saeed et al. 2010).

Two adjacent bands located at 2922 and 2852 cm−1 can be attributed to C–H stretching of aldehyde molecules.

The band observed at 1745 cm−1 is the stretching vibration of C=O related to carbonyl groups (–COOH, –COOCH3) and may be assigned to carboxylic acids or their esters (Farinella et al. 2007; Iqbal et al. 2009). The unconjugated C=O is abundant in xylans (hemicellulose). The band value at 1616 cm−1 relates to the bending mode of alkene group C=C.

The two bands observed at 1437 and 1375 cm−1 are attributed respectively to C-H deformation in lignin/carbohydrates and in cellulose/hemicellulose.

Adsorption band at 1240 cm−1 corresponds to the syringyl ring and C-O stretch in lignin and xylan. Bands located at 1156 and 1055 cm−1 are assigned respectively to C-O-C vibration and C-O stretch of alcoholic, ester, and carboxylic acids groups present in cellulose and hemicellulose (Al-Ghouti et al. 2013; Guibaud et al. 2003; Pandey and Pitman 2003).

Carbonyl and hydroxyl groups were also present in abundance which are essential for dye attraction from solution if the electrostatic mechanism is involved. Similarly to our results, it has been reported by Al-Ghouti et al. (2017) that the main functional groups in the raw date pits surface are (alcohol O–H), (alkane C–H), (aldehyde, ketone, ester C=O), and (alcohol, ester C–O), contributing directly to the adsorption mechanisms.

pHPZC determination

Besides to FTIR analysis, the zero point of charge (pHpzc) is an important parameter which characterize the chemistry of the adsorbent. The pHPZC is the point where positive and negative charges are equal on the substrate surface, which helps describing the properties of the resulting electrical double-layer interfaces. It determines the range of pH sensibility of an adsorbent and allows the prediction of the adsorbent charge in a specific pH solution (Guibaud et al. 2003; Saleh 2015).

The pHpzc of raw date pits was determined according to the procedure described above and was found equal to 6.8 (Fig. 5).

Fig. 5
figure 5

Date pits pHpzc determination

At pH values lower than 6.8, the adsorbent will have a net positive charge on the surface due to protonation (Saleh 2015). However, at pH values higher than 6.8, the surface has a net negative charge due to ionization since the amino groups of sorbent are deprotonated (Subramani and Thinakaran 2017). Thus, resulting attractive or repulsive forces depend on the pHpzc of the adsorbent, the pH of the solution, and on the nature of the adsorbate (anionic or cationic).

Response surface methodology

Central composite design was used to develop correlations (linear, quadratic, and interactive) between the four variables (X1, X2, X3, X4) and the response (Y). Thirty (30) runs of the CCD experimental design were conducted of which 6 runs were carried out at the center point to determine the experimental error “e.” The complete design matrix of the batch experiments and the results obtained are shown in Table 3.

Table 3 Central composite design matrix for BR2 and MV removal

The observed percentage adsorption efficiencies varied from 20 to 94.36% for BR2 and from 18 to 96.13% for MV. Results indicated clearly that the BR2 and MV removal efficiencies were deadly sensitive to the selected variables in the present study.

Effects of model components on BR2 and MV removal efficiency

In order to study the variable effect on the dye adsorption, the values of the regressions coefficients were evaluated by STASTICA 9.0. Student’s t test and p values were used to determine the significance of each regression coefficient. The larger is t and the smaller is p, the more significant is the corresponding parameter in the regression model (Yetilmezsoy and Saral 2007; Singha et al. 2012a).

Regression coefficients, standard effects, standard errors (SE), t values, and probabilities of significance for the different model parameters were summarized in Table 4 for both dyes.

Table 4 Estimated regression coefficient and corresponding t and p value for BR2 and MV

Results showed that for both dyes, the most influential components were the initial dye concentration X1 (t = −7.18 for BR2; t = −15.65 for MV, p = 0) and initial pH of solution X2 (t = 28.85 for BR2, t = 38.05 for MV, p = 0) since their t values are superior to the tabulated t value (2.776) for an error risk of 5%.

The quadratic terms of X12 and X22 were also considerably respectively important for BR2 (t = − 6.29, p = 0 and t = − 18.08, p = 0) and for MV (t = − 14.06, p = 0 and t = − 31.47, p = 0).

As seen in Table 4, the quadratic effects of the initial concentration of BR2 and MV (C0, X12) and the initial pH solution (pH, X22) of BR2 and MV were found to be less significant than their respective linear effects (X1 and X2). However, the quadratic effect of temperature (X32) was more significant than his first-order main (X3) which shows the no-linear influence of the temperature on BR2 and MV adsorption.

It was suggested from the statistical results (Table 4) that the initial dye concentration, the initial pH solution, and the temperature exhibited the most significant effects on the adsorption yield of BR2 and MV on raw date pits.

In order to evaluate the influence of the variable on the response, the magnitude and the sign of the regression coefficients were investigated. A synergistic effect can be highlighted by a positive sign while an antagonistic effect can be indicated by a negative sign.

A pareto chart diagram was used to investigate the standardized effects of the independent variables and their interactions on the dependent variable (Fig. 6). The standardized effects of factors on the response were evaluated by the length of each bar in the Pareto chart which is proportional to the importance of each corresponding factor (Solanki et al. 2007).

Fig. 6
figure 6

Pareto chart showing the standardized effect of independent variables and their interaction on a BR2 and b MV removal efficiency

X1, X12, X2, X22, and X32 are the significant terms which contributed the most in the prediction of BR2 and MV removal since the corresponding bars remained outside the reference line. An antagonistic effect of X1, X12, X22, and X32 model components on the BR2 and MV removal efficiency was highlighted from the corresponding negative coefficients. However, a synergistic effect of X2 (pH) on the dyes removal efficiency was shown from its positive coefficients.

The removal of BR2 and MV was greater in basic pH range and decreased with acid pH. The low BR2 and MV adsorption at acid pH is due to the competition between excess H+ ions and dye cations for the adsorption sites. In fact, BR2 and MV contains positive charge on the nitrogen atom which will strongly repels the positively charged adsorbent molecules at low pH since date pits are positively charged for pH < pHPZC (6.8). At alkaline pH, the positively charged amine groups of date pits are diminished and the adsorption of BR2 and MV on date pits surface may be due to electrostatic attraction between the negatively charged surface of the adsorbent (COO, OH) and the cationic dyes which favors their adsorption.

The increase of the initial dye concentration leads to the reduction of the adsorption percentage. In fact, at high concentrations, the active sites of the adsorbent surface are occupied by dye molecules and the dyes removal from solution will be reduced. Moreover, the low adsorbent surface (SBET) determined earlier can explain in part the saturation of adsorbent surface on high dye concentrations. On the other hand, the steric repulsion between dye molecules can slow down the adsorption process.

The significant quadratic coefficient of temperature contrary to his linear coefficient shows a non-linear variation of this factor. In fact, dye adsorption onto date pits increased up to about 94.36 and 96.13%, respectively, for BR2 and MV when the temperature was increased from 25 to 50 °C. Starting from this latter point until 62.5 °C, the increase is no longer as relevant. In fact, this result can be explained by the increase of the dye molecules mobility and the reduction of the retarding forces of dyes diffusion upon the increase of temperature. However, at the temperature of 62.5 °C, the attractive forces between dyes and adsorbent surface are weakened and a decrease of the dyes removal was highlighted.

In the studied range, contact time (t) showed little effect with maximum removal efficiency obtained at t = 150 min. The rapid adsorption observed during the first 15 min is probably due to the abundant availability of the negatively charged surface (OH, COO) on the date pits surface, and with the gradual filling of these sites, the sorption becomes less efficient. This is the reason why an insignificant enhancement in BR2 adsorption is effected in 150 min (89.86 and 62%, respectively, for BR2 and MV) as compared to that in 30 min (83.67 and 89.99%, respectively, for BR2 and MV).

Determination of the regression model and statistical evaluation

A polynomial regression modeling was performed between the response variable, Y (adsorption percentage) and the coded values (X1, X2, X3, X4) corresponding to the four different process variables.

The fitted model equation for BR2 was given as below:

$$ {Y}_{\mathrm{BR}2}=86.09-4.05{X}_1-3.32{X_1}^2+16.27{X}_2-9.53{X_2}^2+0.42{X}_3-1.99{X_3}^2+{X}_4-0.27{X_4}^2+0.12{\mathrm{X}}_{12}-0.18{X}_{13}+0.02{X}_{14}-0.27{X}_{23}+0.08{X}_{24}-0.24{X}_{34}+2.36 $$
(9)

The fitted model equation for MV was obtained as follows:

$$ \mathrm{For}\ \mathrm{MV}:{Y}_{\mathrm{MV}}=93.10-6.34{X}_1-5.32{X_1}^2+15.41{X}_2-11.92{X_2}^2+0.18{X}_3-2.5{X_3}^2+0.35{X}_4-0.45{X_4}^2+1.04{X}_{12}+0.11{X}_{13}-0.39{X}_{14}+0.77{X}_{23}-0.37{X}_{24}+0.05{X}_{34}+1.70 $$
(10)

The adequacy of the model was justified through analysis of variance (ANOVA) that tests the fitting of the second-order polynomial equation with the experimental data as given in Table 5. According to the Fisher’s F-test, the large value of F indicates that most of the variation in the response can be explained by the regression model equation.

Table 5 ANOVA for the fitted model

The calculated F value (F-ratio R/r equal to 398.98 and 109.1, respectively, for BR2 and MV) was found to be greater than the tabulated F (Ftab (0.05, 5, 24) = 2.62 for BR2 and Ftab (0.05, 14, 15) = 2.46 for MV) at the 5% level which indicate that the second-order polynomial model equations (Eqs. 8 and 9) were highly significant and adequate to represent the actual relationship between the response (percentage of adsorption) and the studied variables.

Moreover, ANOVA made the case that the model fits well the experimental data, since the calculated F-ratio LOF/PE are lower than the tabulated F value, respectively, for BR2 (F-ratioLOF/PE = 0.82; F0.05,19,5 = 4.60) and MV (F-ratioLOF/PE = 3.48; F0.05,19,5 = 4.75) at 95% of confidence.

The goodness of fit of the model was checked also by the analysis of residue which allows the determination of the coefficient (R2).

Figure 7 reveals the distribution of the calculated values versus experimental values for the two responses corresponding to BR2 and MV adsorption. The points are almost randomly distributed about the line providing good agreements between experimental and calculated values using the quadratic model.

Fig. 7
figure 7

Calculated versus experimental values plot for a BR2 and b MV removal

The value of determination coefficient (R2) (0.988 and 0.994, respectively, for BR2 and MV) indicated that only 1.2% for BR2 and 0.5% for MV of the total variations do not stick with the regression model. Besides, a high significance of the model was highlighted by the high value of the adjusted coefficient R2a (0.976 and 0.989 for BR2 and MV, respectively).

Optimization removal efficiency

A quadratic regression model was implemented so as to optimize the leading variables by maximizing the BR2 and MV removal by date pits. Considering the results of p values (Table 4) and the pareto chart (Fig. 6), the empirical regression models of BR2 and MV could be simplified as follows:

$$ {Y}_{\mathrm{BR}2}=88.44-4.05{X}_1-3.32{X_1}^2+16.27{X}_2-9.53{X_2}^2-1.99{X_3}^2 $$
(11)
$$ {Y}_{\mathrm{MV}}=94.80-6.34{X}_1-5.32{X_1}^2+15.41{X}_2-11.92{X_2}^2-2.50{X_3}^2 $$
(12)

Solving these two latter equations and plotting the response surface contour allowed us to get the optimum values of the major effect variables.

The optimal values of the test variables in coded units were calculated by an algorithm, and the natural values were then determined by replacing the respective coded values in Eq. (3). Coded and natural values of the significant variables influencing the BR2 and MV adsorption and their maximum removal percentage (Y) were summarized in Table 6.

Table 6 Optimum coded and uncoded values of significant variables for BR2 and MV

Response surface contour plots were carried out also to determine the optimal conditions for a maximal BR2 and MV adsorption using STASTICA (Trial version 9.0, StatSoft Inc., USA) software package. The 3D response surface diagrams were presented for the most influencing variables (pH and concentration) (Fig. 8).

Fig. 8
figure 8

3D response surface diagrams showing the effects of the mutual interactions between two independent variables on a BR2 and b MV adsorption

The stationary point also called central point corresponds to the point where the slope of the contour is nil in all directions. Its coordinates within the highest contour levels allows to get the optimum values of the respective constituents (Ravikumar et al. 2005) (Fig. 8).

The maximum predicted yield is indicated by the surface confined in the smallest curve of the contour diagram (Gopal et al. 2002).

Kinetic adsorption of BR2 and MV on date pits under optimum conditions

Adsorption kinetics are performed and the results are presented in Fig. 9, where the dye concentration on adsorbent (qt) was plotted against time.

Fig. 9
figure 9

Experimental and theoretical kinetic data of BR2 and MV adsorption on date pits

It is clear from experimental kinetic results that the sorption capacity increases with an increase in contact time and reaches a plateau almost at 60 and 30 min for BR2 and MV, respectively. Additionally, the high sorption rate on the first stage of dyes uptake especially for MV can be explained by the high availability of the free functional groups on adsorbent surface which decline with time. Similar trends have been reported by Aljeboree et al. (2017) who studied the adsorption of maxilon blue and direct yellow by activated carbon derived from coconut shell. Moreover, Mohanty et al. (2006) studied the effect of contact time on MV uptake by activated carbon prepared from rice husk and it was noticed that the sorption rate was rapid on the first stage and became constant after a period of 120 min for the different studied concentrations (50, 150, and 250 mg L−1). Similarly, it was highlighted by Miyah et al. (2017) that 80% of MV was adsorbed by clay after a contact time of 10 min and the overall reaction time was fixed to 120 min.

Similar contact times (2 h) were used Mohanty et al. (2006), who studied MV adsorption onto activated carbon prepared from Rice husk, as the sorption remained constant after a period of 120 min for concentrations ranging between 50 and 250 mg/L. A contact time of 1 h was applied by Mahmoudi et al. (2015) who studied the uptake of methylene blue and methyl orange by raw Tunisian date pits. The authors demonstrated that the contact time necessary to reach equilibrium on the removal of both dyes with initial concentrations of 500 mg/L was 1 h for raw date pits contrarily to activated carbon which needs longer equilibrium time of 10 h.

In order to estimate the sorption rate of BR2 and MV uptake onto date pits, pseudo-first- and pseudo-second-order models were applied as these are the most used models to fit kinetic data. Pseudo-first- (Lagergren 1898) and pseudo-second-order (Ho and McKay 1999) models were represented by Eqs. (13) and (14), respectively.

$$ {q}_t={q}_{\mathrm{e}}\left[\mathrm{Exp}\left(\ln {q}_{\mathrm{e}}-{k}_1t\right)\right] $$
(13)
$$ {q}_t=\frac{q_{\mathrm{e}}^2{k}_2t}{q_{\mathrm{e}}{k}_2t+1} $$
(14)

where qt is the amount of dye adsorbed (mg/g) at time t (min), qe is the amount of dye adsorbed at equilibrium (mg/g), k1 (min−1) is the pseudo-first-order rate constant and k2 (mg g−1 min−1) is the pseudo-second-order rate constant.

The pseudo-first-order and the pseudo-second-order models were are displayed in Fig. 9.

The linear form of pseudo-first- and pseudo-second-order models were used to determine the kinetic constants.

Rate constants (k1 and k2), predicted equilibrium uptakes, and correlation coefficients R2 were summarized in Table 7.

Table 7 Rate parameters of pseudo-first-order, pseudo-second-order, and intraparticle diffusion models for BR2 and MV uptake on date pits

According to Table 7, the low values of R2 (0.298 and 0.285 for BR2 and MV, respectively) for pseudo-first-order model indicated that this model failed to describe the kinetic uptake of BR2 and MV onto date pits. However, pseudo-second-order model was found to be able to predict experimental data since R2 values were close to unity for both dyes (0.999 and 1 for BR2 and MV, respectively). This finding was further confirmed by the predicted equilibrium sorption capacities qe,2 (57.14 and 59.52 mg g−1, respectively, for BR2 an MV) which were found similar to experimental values qe,exp (56 and 59.35 mg g−1 for BR2 and MV, respectively).

Similar results were reported in the works of Chandane and Sing (2014) and Miyah et al. (2017) who studied the uptake of BR2 and MV onto soybean hull and clay, respectively. They showed that pseudo-second-order model was the best fitted model compared to the pseudo-first-order model.

Since the pseudo-first- and the pseudo-second-order models do not allow to understand the adsorption mechanism, intraparticle diffusion model, known as Weber and Morris model, was investigated to determine the controlling step in adsorption process. Intraparticle diffusion model is expressed as follows (Weber and Morris 1963):

$$ {q}_t={k}_{\mathrm{in}}{t}^{1/2}+C $$
(15)

where qt (mg g−1) is the amount adsorbed at time t, kin is the intraparticle rate constant (mg min0.5 g−1), and C is the intercept (mg g−1).

The kinetic parameters of the intraparticle diffusion model were generally determined by plotting (qt) vs. time (min0.5). The intraparticle rate constant (Kin) as well as the intercept C were determined respectively from the slope and the intercept of the curve according to Weber and Morris equation (Eq. 15).

As shown in Table 7, C values were not equal to zero, suggesting that intraparticle diffusion of BR2 and MV was not the sole rate controlling step and it can be associated with other transfer resistance.

The comparison of intercept values corresponding to BR2 (37.36 mg/g) and MV (53.75) showed that the latter dye exhibited higher resistance to transfer in the film surrounding particles.

On the other hand, as seen in Table 7, the intraparticle rate constant was higher for BR2 (2.42 mg min0.5 g−1) than for MV (0.61 mg min0.5 g−1) indicating that MV was more hindered to diffuse inside particles compared to BR2.

Thus, it can be concluded from kinetic results that pseudo-second order was able to describe successfully the kinetic data of BR2 and MV. Moreover, it was suggested from Weber and Morris model that intraparticle diffusion mechanism is not the sole limiting mechanism and it was associated with other controlling step such as film diffusion. Additionally, the transfer resistance onto date pits adsorbent was higher for MV compared to BR2.

Adsorption isotherm of BR2 and MV on date pits under optimum conditions

Experimental results

Equilibrium isotherm is a plot of the quantity of the sorbate removed per unit sorbent (qe) versus the concentration of the sorbate in the liquid phase (Ce) (Fig. 10).

Fig. 10
figure 10

Experimental adsorption isotherm of BR2 and MV by date pits (C0 = 25–400 mg L−1, contact time = 2 h, temperature = 35 °C, pHBR2 = 7.7; pHMV = 7.28)

The amount of dye adsorbed per unit mass of the pits goes up with the dye initial concentration to reach the plateau values indicating thus a saturation of the active sites. For both dyes, experimental isotherms showed an L-shape adsorption according to the classification of Giles et al. (1974). This means that there is no strong competition between the solvent and dyes for date pits surface sites (Muruganaadham and Swaminathan 2004; Bouberka et al. 2009).

Moreover, one can see that adsorption rate was higher for MV (136 mg g−1) than for BR2 (92 mg g−1).

The difference in maximum adsorption capacity between the studied dyes can be explained by the higher affinity of MV for date pits particles. In fact, this affinity can be attributed to the low solubility of MV (16 g L−1) in comparison to BR2 (50 g L−1).

On the other hand, adsorption capacities of BR2 and MV on date pits were compared to other low-cost adsorbents (Table 8).

Table 8 Adsorption capacities of different adsorption systems

It can be clearly seen that adsorption capacities of MV and BR2 on date pits were superior to most natural adsorbents recently tested in the literature (skin almond waste, maize silk,..). This can be attributed to its physicochemical properties (functional groups..).

Adsorption isotherm models and error analysis

Modeling isotherms is important to predict and compare adsorption performance. Five two-parameter isotherm models are used to fit the experimental results of BR2 and MV adsorption on date pits (Langmuir, Freundlich, Temkin, Dubinin–Radushkevich, and Halsay models). The main purpose of this section is to recommend the best descriptive isotherm equation by error analysis.

  • Langmuir model

The main assumptions in Langmuir sorption model are (a) maximum adsorption capacity consists of a monolayer adsorption, (b) there are no interactions between adsorbed molecules, and (c) the adsorption energy is equally distributed over the entire coverage surface (Santhi et al. 2010; Subramani and Thinakaran 2017; Madrakian et al. 2015). The Langmuir isotherm is expressed as follows (Langmuir 1918):

$$ {q}_{\mathrm{e}}=\frac{q_{\mathrm{max}}\bullet {K}_L\bullet {C}_{\mathrm{e}}}{1+{K}_L\bullet {C}_{\mathrm{e}}} $$
(16)

where qe (mg g−1) and qmax (mg g−1) are respectively the amount and the maximum amount of dye adsorbed per unit mass of adsorbent, Ce (mg L−1) is the concentration of the adsorbate at equilibrium, and KL (L mg−1) is Langmuir constant related to the affinity of the binding sites (Ahmad et al. 2009).

The linear form of Langmuir isotherm equation allows to get qmax and KL.

Webi and Chakravort (1974) expressed the Langmuir isotherm in term of dimensionless constant separation factor or equilibrium parameter (RL) defined by:

$$ {R}_{\mathrm{L}}=\frac{1}{1+{K}_L\bullet {C}_0} $$
(17)

where C0 is still the initial dye concentration (mg L−1).

RL coefficient assumes the nature and the feasibility of adsorption process and indicates the type of isotherm to be irreversible (RL = 0), favorable (0 < RL < 1), linear (RL = 1), or unfavorable (RL > 1).

  • Freundlich model

The Freundlich isotherm model is an empirical expression which describes the non-ideal and reversible adsorption (Freundlich 1906) and that can be applied to multilayer adsorption, with non-uniform distribution of adsorption heat and affinities over the heterogeneous surface (Foo and Hameed 2012). The Freundlich equation is given by the following:

$$ {q}_{\mathrm{e}}={K}_{\mathrm{F}}\bullet {C}_{\mathrm{e}}^{1/n} $$
(18)

where KF (L g−1) and n are the Freundlich constants, indicating respectively the adsorption capacity and the adsorption intensity.

The plot of log qe versus log Ce helps getting the intercept KF and the slope 1/n.

  • Temkin model

Temkin isotherm considers that the heat of adsorption is reduced linearly with the coverage due to adsorbate-adsorbent interactions (Vijayaraghavan et al. 2006; Wang 2013). The corresponding equation is given below (Tempkin and Pyzhev 1940):

$$ {q}_{\mathrm{e}}=\frac{RT}{b_T}\ln\ \left({K}_T\bullet {C}_{\mathrm{e}}\right) $$
(19)

where KT (L mg−1) is the Temkin isotherm constant, bT (J mol−1) is a constant related to heat of sorption, R is the ideal gas constant (8.314 J/mol K), and T is absolute temperature (308.15 K).

A plot of qe against ln Ce enables having bT and KT.

  • Dubinin–Radushkevich model

Dubinin–Radushkevich isotherm assumes that the sorption curves are related to the adsorbent porous structure and its equation is given by (Dubinin 1960; Abdelwahab 2007; Mohamed and Ouki 2011):

$$ {q}_{\mathrm{e}}={q}_{\mathrm{m}}\ \mathrm{Exp}\ \left(-\beta {\varepsilon}^2\right) $$
(20)

where qm is the maximum sorption capacity (mg g−1), and β is the Dubinin–Radushkevich constant (mol2 KJ−2).

$$ \varepsilon = RT\ln\ \left(1+\frac{1}{C_{\mathrm{e}}}\right) $$
(21)

β is related to the mean free energy of sorption per mole E of adsorbate during its transfer and can be determined by the above equation (Hasany and Chaudhary 1996; Samarghandi et al. 2009):

$$ E=\frac{1}{\sqrt{2\beta }} $$
(22)

The magnitude of mean free energy of adsorption give an information about whether the adsorption mechanism is physical or chemical (Erdem et al. 2004). In fact, if the mean free energy is more than 8 KJ mol−1, the adsorption process is governed by chemisorption, whereas if it is lower, physical phenomena occur (Lodeiro et al. 2006; Kilislioglu and Bilgin 2003).

  • Halsay model

As Halsay isotherm reveals the heterosporous nature of the adsorbent, it is more suitable for multilayer adsorption (Halsey 1952; Sampranpiboon et al. 2014). The relevant equation is (Halsey 1952):

$$ {q}_{\mathrm{e}}=\mathrm{Exp}\left(\frac{\ln {K}_{\mathrm{Ha}}-\ln {C}_{\mathrm{e}}}{n_{\mathrm{Ha}}}\right) $$
(23)

where KHa (mg L−1) and nHa are the Halsay isotherm constant and exponent, respectively.

For the five isotherms defined in this section, model parameters were determined (Table 9) and qe values were calculated and plotted against Ce.

Table 9 Names and equations of the applied error functions

Figure 11a, b compare the theoretical isotherm curves of Langmuir, Freundlich, Temkin, Dubinin–Radushkevich, and Halsay models with the experimental data of BR2 and MV adsorption onto date pits.

Fig. 11
figure 11

Experimental data and predicted isotherms of BR2 (a) and MV (b) adsorption on date pits according to Langmuir, Freundlich, Temkin, Dubinin–Radushkevich, and Halsay models

Figure 11a shows an excellent fit of Langmuir model with experimental data for the removal of BR2 for all the range of studied concentrations. It should be mentioned that Dubinin–Radushkevich model describes well experimental results namely on the low concentrations. Temkin, Freundlich, and Halsey models did not match experimental data as far as BR2 removal is concerned.

As seen in Fig. 11b, Temkin, Freundlich, and Halsey models predict better MV adsorption when compared to Langmuir and Dubinin–Radushkevich models. In fact, this latter model underestimates the adsorption capacity (qe) in the range of high concentrations contrarily to Langmuir model which overestimates qe on the range of lower concentrations.

To check the consistency of the adsorption isotherm models, an error analysis study should be conducted.

  • Error analysis

In order to determine the most accurate isotherm constant parameters and to identify the model with the best fit, residual root mean square error (RMSE), chi-square statistic (χ2), and average relative error (ARE) values were calculated using Eqs. (24), (25), and (26), respectively (Ip et al. 2009; Miraboutalebi et al. 2017; Ramteke and Gogate 2016) (Table 9).

The smaller are the RMSE, χ2, and ARE values, the better is the curve fitting. Whereas, the closer correlation coefficient (R2) values to unity, the better is the fitting.

For each studied model and for each dye, the values of isotherm parameters RMSE, χ2, and ARE as well as the (R2) are presented in Table 10.

Table 10 BR2 and MV adsorption onto date pits at equilibrium and their fitting by Langmuir, Freundlich, Temkin, Dubinin–Radushkevich, and Halsay isotherm models

According to the error results of BR2, the Langmuir and Dubinin–Radushkevich models are the most appropriate to describe the adsorption process of BR2, where R2 (0.97 and 0.96) are the highest and RMSE (6.31 and 7.91), chi-square statistic (5.79 and 4.86), and ARE (0.86 and 0.65) are the lowest, respectively. However, Freundlich, Temkin, and Halsay models were ranked the worst isotherms for fitting the adsorption of BR2 on date pits.

Similar findings were reported by Samarghandi et al. (2009) when they studied the removal of methyl orange by pinecone-derived activated carbon. It was shown that Dubinin–Radushkevich and Langmuir models reveal a better agreement with experimental data.

One can also see that RMSE (18.84), χ2 (31.81), and ARE (2.48) in Halsay model are quite high when compared to other models. One can conclude that not only Halsay model is not appropriate to describe BR2 sorption by date pits but also and mainly that the hypothesis of multilayer adsorption cannot be assumed.

For BR2, as Langmuir isotherm fits experimental data, one can affirm that once a dye occupies a site, no further adsorption can take place at that site and that the adsorbent surface is energetically homogeneous.

The values of dimensionless Langmuir separation factor (RL) for BR2 removal were calculated (Eq. 17) for the range of the studied initial concentrations (25–400 mg L−1). The values of RL for BR2 adsorption on the date pits were greater than zero and less than 1, indicating favorable adsorption (0.01 < RL < 0.15). The maximum adsorption capacity determined by Langmuir model (92 mg g−1) was almost close to the experimental adsorption capacity of BR2 onto date pits (95.24 mg g−1) (Table 10).

The Dubinin–Radushkevich model gives an idea about the nature of sorption by calculating the mean free energy (Eq. 22). This latter (0.5 KJ mol−1) was found to be lower than 8 KJ mol−1, making us think BR2 removal as a physisorption mechanism.

Analogous results were reported in the work of Ibrahim and Sani (2014) who investigated Congo red removal by watermelon rinds and neem tree leaves. Dubinin–Radushkevich model reveals a good fit to experimentation and it confirmed a physical adsorption process.

Contrarily to the BR2 fitting results and according to error analysis funding, MV adsorption data fitting shows that Freundlich, Temkin, and Halsey models provide better concordance in comparison with Dubinin–Radushkevich and Langmuir. These latter models exhibited respectively the lower correlation coefficients R2 (0.84 and 0.59) and the higher values of RMSE (25.7 and 29.12), chi-square statistic (211.82 and 66.56), and ARE (2.13 and 2.86) (Table 10).

The values of R2 (0.94 and 0.93), RMSE (13.43 and 13.87), χ2 (21.59 and 21.30), and ARE (1.61 and 1.72) seen in Table 9 for Freundlich and Temkin models are close and all of them are better than those of Halsay.

The poor fitting of Langmuir and Dubinin–Radushkevich models to experimental data could explain that the monolayer adsorption of MV does not occur and probably a multilayer behavior for the sorption of a MV onto adsorbent could be highlighted as in the assumption of Halsay model.

The magnitude of Freundlich constant KF (37.91) showed a high MV adsorptive capacity from aqueous solution. Furthermore, from Table 9, Freundlich constant, n is equal to 4.28, indicating favorable adsorption of MV by date pits, as it is ranged between 1 and 10 (Freundlich 1906). It was reported in earlier studies that a (1/n) value below 1 implies chemisorption process; otherwise, it is rather a cooperative mechanism (Brasquet et al. 1997; Shahbeig et al. 2013). Keeping this in mind, MV sorption is again thought to be chemical, with the establishment of strong bonding between dye molecules and the functional sites of the heterogeneous surface.

Conclusions

A thorough examination of literature revealed that date stones were never used as adsorbent of BR2 and MV, and the present study aimed then to optimize process variables in order to maximize the removal of these cationic dyes from aqueous phase and to measure the adsorption capacity of the date pits in optimum conditions. The RSM-CCD was applied to determine the effect and the interaction between four different operating parameters (temperature, pH, initial dye concentration, and contact time). A second-order quadratic model used in response surface analysis brought that pH and initial dye concentration are the most influent variables. The R2 values of the response parameters showed a good fit of the model with experimental data. The optimum process conditions were determined by solving the quadratic models.

Kinetic results suggested that BR2 and MV adsorption processes obeyed to pseudo-second-order kinetic model and intraparticle diffusion model played significant role on sorption mechanism but was not the sole controlling step.

Equilibrium isotherms were determined in optimum conditions and experimental adsorption capacities were 92 and 136 mg g−1 for BR2 and MV, respectively.

Error analysis did uphold that Langmuir and Dubinin–Radushkevich models offer high accuracy for predicting the adsorption behavior of BR2 adsorption contrarily to Freundlich, Temkin, and Halsay models. However, the equilibrium fitting results of MV suggested Freundlich, Temkin, and Halsay models match.

According to these findings, it appears that MV and BR2 are well removed from water by date pits but with different mechanisms. In fact, it is a monolayer adsorption process controlled by physisorption for BR2, whereas it is rather multilayer-chemisorption for MV.