Introduction

Recently, water pollution has raised drastic concerns, because large amounts of water are evacuated into the environment. Therefore, removal of different contaminants from industrial effluents has got a judgmental subject [1]. Synthetic dyes, as main pollutants in industrial sewage, are vastly applied in textile, leather, tanning, paper, food processing, plastic, cosmetics, rubber, and printing. The dyes result in great dangers and toxicity to the human environment as well as severe health problems if they release into the environment [2, 3] because they are steady, uncooperative, coloring agent, and even possibly carcinogenic and toxic [4].

Congo red (CR) named as the sodium salt of benzidinediazo-bi’s-1-naphtylamine-4-sulfonic acid (Fig. 1) belongs to anionic dyes that cause health problems including difficulties in breathing, vomiting, diarrhea, and nausea. It is not biodegradable and easily metabolized to benzidine that is known human carcinogen. CR leads to the allergic reaction when it is exposed to organism. It looks to be a pretty toxic agent in terms of its resistance to heat, chemical reagent, and capability of producing cancer and mutagens owing to the existence of different reactive center and charge nature [5].

Fig. 1
figure 1

Chemical structure of Congo red

Removing dyes from aquatic solution has got a significant and stimulating issue in wastewater treatment [6]. A variety of techniques has been utilized for removal of dyes [7] such as adsorption [8,9,10], flocculation [11], oxidation [12], and electrolysis [13]. While among them the adsorption, as a better and superior candidate, has attracted more attention due to its high efficiency, ease of application, simplicity of design, vast fitness for different kinds of dyes and large-scale capacity, economy, low chemicals, and energy consumption, as well as no production of mud [14,15,16]. Green, non-toxic, and low-cost adsorbents benefit from a high surface area and reactive sites are desirable features for any adsorbents to eliminate large amounts of dyes in a short time in the recyclable process [17]. To date, different materials have been explored as the adsorbent for removal of hazardous contaminants such as activated carbon, graphene nanosheets, multi-walled carbon nanotubes, cedar sawdust, and crushed brick, magnetic Chitosan/graphene oxide composite, rice husk, and other reasonable cost adsorbents [1].

Zein, the prolamin from corn, is a heterogeneous combination of disulfide-linked polypeptides with 44 kDa molecular weight and includes 21–26% glutamic acid, 20% leucine, 10% proline, and 10% alanine. It has large availability and is not soluble in water only if alcohol exists, as well as is a top secondary product from bioethanol industry. Zein has been discovered to be biodegradable, biocompatible and has high adsorption capacity for removal of reactive dyes as an effective adsorbent [18].

Nowadays, the application of nanostructured adsorbents such as nanoscale zero-valent iron, carbon nanotubes, nanosized hydroxyapatite (nHAp), and nanocomposite have been expanded [19]. Because nanoparticles have a large surface area with a large number of empty reactive sites that provides high adsorption capacity and increases adsorption efficiency [20].

Nanosized hydroxyapatite [(HAp), Ca10 (PO4)6 (OH)2], a main inorganic constituent of the hard tissues (bones and teeth) in the human body, is biodegradable, biocompatible, and is not toxic. nHAp is able to make a bond with organic molecules. Hence it is employed to modify surface properties of many substrates [6, 21]. Anchoring nHAp with Zein to obtain Zein/nanohydroxyapatite, as an efficient adsorbent, can significantly enhance the removal percentage, adsorption capacity, and removal rate due to increase in surface area and a number of reactive sites.

Various methods are applied for process optimization. In order to obtain precise processes, choosing suitable techniques to model and optimize of variables is a critical stage. Experimental design methodologies and chemometric methods are helpful to optimize the impressive parameters with the lowest number of experiments [22]. Central composite design (CCD) under response surface methodology (RSM) and artificial neural network based on genetic algorithm (ANN-GA) are the most successful techniques for modeling and optimization studies. Because they enhance process efficiency, decrease the number of variables in the process by considering just the most important parameters, and also decrease operation cost and experimental time [23].

Response surface of methodology is a set of experimental design methods which employs statistical and mathematical techniques for modeling the experiments, rating the impact of some factors, and acquiring the optimum conditions for favorable response with a minimum number of planned experiments. RSM describes the relationship between several independent variables and one or more responses. The aim of RSM technique is to achieve the optimum response and discover how the response varies in a given direction by regulating the design variables [24].

The most famous artificial neural network (ANN) layout is accompanied with multi-layered perceptron consist of input, hidden and output layers and various number of neurons in each layer [24]. This method is able to tackle incomplete data and sort out nonlinear problems. ANN can accomplish predictions and generalizations at high speed, once trained. Nevertheless, it has some restrictions. For example, it is not possible to guarantee the smoothness of ANN models in optimizations phase. The optimization of ANN parameters can get better by applying genetic algorithm (GA), a stochastic global search algorithm, to get qualified performance. GA associated with ANN is an impressive means for prediction and optimization of any complex process parameters [25].

In continuation of our previous works in removal [26, 27], in the current project, Zein modified with nanohydroxyapatite as an efficient adsorbent was prepared and characterized by Field emission scanning electron microscopy (FE-SEM), Fourier transform infrared spectroscopy (FT-IR), X-ray diffraction (XRD), and BET. Afterward, it was used for the adsorption of Congo red dye from aqueous solution. The influence of some significant variables such as pH, temperature, contact time, initial dye concentration, and adsorbent dosage on the determination of CR was explored and optimized by central composite design (CCD) under response surface methodology (RSM) and artificial neural network-genetic algorithm (ANN-GA). The coefficient of determination (R2) and mean absolute percentage error (MAPE) of CCD and ANN-GA were compared. The kinetic, isotherm and thermodynamic parameters were computed to assess rate constants and adsorption mechanism. Applicability of the adsorbent in real samples and recyclability of Zein/nHAp were also studied.

Experimental

Materials and Instruments

Chemicals including Congo red (CR), Zein, Ca(NO3)2·4H2O, (NH4)2HPO4, C2H6O and NH4OH were purchased from Merck and Acros. The stock solution (500 ppm) of Congo red was obtained by dissolving of 50 mg CR in 100 ml double distilled water, then the appropriate dilution was done to achieve a working solution with desired concentration. The Zein/nHAp was synthesized and characterized by FTIR, XRD, FE-SEM, and BET. The morphology of the Zein/nHAp was studied by field emission scanning electron microscopy (FE-SEM; VEGA//TESCAN-LMU). X-ray diffraction (XRD) pattern was registered by an automated diffractometer with Cu Kα radiation (ASENWARE AW-XDM300, 40 KV). Fourier transform infrared spectroscopy of the adsorbent was recorded using FT-IR spectrophotometer (Model; FT-IR JASCO 680 plus). The BET analysis was done by BEL: PHS 1020. The achieved spectra were analyzed. The pH measurements were performed applying pH/Ion meter model-826 (Metrohm, Switzerland, Swiss) and the CR concentration was determined with UV-2401PC Research-Grade UV–Vis spectrophotometer at wavelength of 497 nm. The design expert software version 7.0.0 Trial was utilized for experimental design analysis and their subsequent regression analysis, also the Matlab R2014a software has been used for ANN and GA processes.

Preparation of Zein/nHAp

The Zein/nHAp composite was synthesized via a co-precipitation method. For the synthesis of Zein/nHAp with contents of 50 wt% of Zein, firstly, a solution of 2.94 g Ca(NO3)2·4H2O in 50 ml water was dropwise poured to a solution of 0.986 g (NH4)2HPO4 in 50 ml water. Subsequently, Zein solution, prepared by dissolving 1.25 g Zein in 15.8 ml ethanol, was added dropwise. The pH of the final solution was kept above 10 using 25% ammonia solution. Then, the solution was stirred for 4 h and maintained for 24 h at room temperature. The obtained Zein/nHAp was filtered from the reaction mixture and rinsed with distilled water until the pH of the filtrate was close to 7. Finally, Zein/nHAp was further rinsed with ethanol and dried at 70 °C for about 12 h. A series of Zein/nHAp composites with Zein contents of 30 and 70 wt% were synthesized too.

Adsorption Experiments

The adsorption of Congo red onto Zein/nHAp were carried out in batch experiments. According to the experimental design pattern, each run was repeated four times and after considered time in each run, Zein/nHAp was regathered by filtration and the concentration of CR in the supernatant was evaluated by UV–Vis spectrophotometer. The concentration of CR was calibrated by the Beer–Lambert law at the maximum wavelength. Removal percentage and equilibrium adsorption of the dye by Zein/nHAp from the aqueous solution were calculated applying the following relationships respectively [28].

$$\% {\text{ Removal }}=\frac{{{{\text{C}}_0} - {{\text{C}}_{\text{e}}}}}{{{{\text{C}}_0}}} \times {\text{1}}00$$
(1)
$${{\text{q}}_{\text{e}}}=\frac{{{{\text{C}}_0} - {{\text{C}}_{\text{e}}}}}{{\text{W}}} \times {\text{V}}$$
(2)

where C0 and Ce are the first and equilibrium concentrations of the dye in mg l−1, respectively. The qe is the adsorbed amount of dye at equilibrium (mg g−1), V is the volume of the solution (in L) and w is the mass of Zein/nHAp (in g). The recyclability studies of the adsorbent for dye adsorption were performed by scattering the CR loaded Zein/nHAp (Zein/nHAp-CR) in ethanol solution. Then the adsorbent was washed with distilled water until the pH of the filtrate reached 7 and dried at 45 °C.

Experimental Design and Statistical Analysis

Response Surface Methodology (RSM) is a statistical method for optimization and studying the relevance between independent variables and response as linear and nonlinear form to assess an improved response. Central Composite Design (CCD) in RSM, as a widely applicable optimization model, utilized for fitting a second order model, particularly in the removal process [29]. In this study, five factors including pH, time, temperature, initial dye concentration and adsorbent dosage were considered in tests with five levels. The extents and levels of the five independent variables with actual and coded amounts of each parameter are revealed in Table 1. The independent variables are coded to two levels; low (− 1) and high (+ 1), whereas the axial points are coded as − 2 and + 2. A five-level-five-factor ½ fraction central composite design was applied to suit a second-order response surface model demanded 32 experiments, consist of 26 factorial and axial points, and 6 replicates at the center points that are employed to assess the experimental error (pure error) and the reproducibility of the data. 32 experiments were managed in random order and the removal percentage was computed. The complete CCD design matrix in terms of the actual independent variable is offered and the related results are presented in Table 2. The experiments were conducted several times to diminish errors. The linear and quadratic model with interactions is observed in the following equation [30].

Table 1 Experimental factors and levels in the central composite design
Table 2 Central composite design and the observed and predicted values for removal efficiency (%) of CR by Zein/nHAp nanocomposite
$${\text{y }}={{{{\upbeta}}}_0}+\mathop \sum \limits_{{{\text{i}}=1}}^{{\text{k}}} {{{{\upbeta}}}_{{\text{i~}}}}{{\text{X}}_{\text{i}}}+~\mathop \sum \limits_{{{\text{i}}=1}}^{{\text{k}}} {{{{\upbeta}}}_{{\text{ii}}}}{\text{X}}_{{\text{i}}}^{2}+\mathop \sum \limits_{{{\text{i}}=1}}^{{\text{k}}} \mathop \sum \limits_{{{\text{j}}=1}}^{{\text{k}}} {{{{\upbeta}}}_{{\text{ij}}}}~{{\text{X}}_{\text{i}}}{{\text{X}}_{\text{j}}}+\varepsilon$$
(3)

where y states response (removal percentage), Xi and Xj show independent variables, β0 represents the intercept constant, βi expresses the coefficients of linear terms, βij indicates the coefficient of quadratic terms, ε represents experimental error, and k expresses the number of independent variables. Analysis Of Variance (ANOVA), regression studies, and plotting of 3D plot were utilized to find the desired conditions for the response [31].

Artificial Neural Network-Genetic Algorithm

The neural network code of MATLAB (R2014a) software was selected to predict the removal percentage of the dye. A three layers ANN with a tangent sigmoid transfer function (tansig) at the hidden layer, a linear transfer function (pure line) at output layer and Levenberg–Marquardt back-propagation algorithm with 1000 iterations were used. The data were randomly divided into three groups (70% data for training set, 15% data for validation set and 15% data for a testing set). In this article, five neurons including pH, time, temperature, initial dye concentration and adsorbent dosage for the input, 9 neurons in the hidden layer, and one neuron (removal percentage) in the output layer were employed. All the data (input and output) for ANN models were standardized between 0.1 and 0.9 to keep away from numeric over fitting owing to pretty large or small weights. The used normalization equation is as follows [32, 33].

$${\text{y}}=\left( {\left( {\frac{{{{\text{X}}_{\text{i}}} - {{\text{X}}_{{\text{min}}}}}}{{{{\text{X}}_{{\text{max}}}} - {{\text{X}}_{{\text{min}}}}}}} \right) \times 0.8{\text{~}}} \right)~+{\text{ }}0.{\text{1}}$$
(4)

where y is the normalized amount of Xi, the Xmax and Xmin are the most and least values of Xi, respectively. The measure for option of the optimum ANN structure is the mean square error (MSE) of the test data and the coefficient of assessment (R2) that is explained as follows [34, 35].

$${\text{MSE }}=~\frac{1}{{\text{P}}}\mathop \sum \limits_{{{\text{P}}=1}}^{{\text{P}}} {({{\text{d}}_{\text{p}}} - {{\text{o}}_{\text{p}}})^{\text{2}}}$$
(5)
$${{\text{R}}^{\text{2}}}={\text{1}} - \frac{{\mathop \sum \nolimits_{{{\text{P}}=1}}^{{\text{P}}} {\text{~}}{{({{\text{d}}_{\text{p}}} - {{\text{O}}_{\text{p}}})}^2}}}{{\mathop \sum \nolimits_{{{\text{P}}=1}}^{{\text{P}}} {{({{\text{O}}_{\text{P}}})}^2}}}$$
(6)

where dp and OP are the desired and computed outputs, respectively. The evaluated results presented here are those that turn into the lowest point on the error.

Optimum Conditions Based on Genetic Algorithm

The genetic algorithm (GA) has been used as a successful technique for working out linear and nonlinear problems made by the process of natural selection and genetic evaluation. GA applies mutation, crossover, and opting operators to a population of encoded variable space. The algorithm investigation varies areas of the variable space and directs the search to the area where a high possibility of global optimum exists. More details about GA brought up elsewhere [17, 36]. In the suggested method, the genetic algorithm can be used after expanding the central composite design and trained ANN to optimize the input variables, with an objective to maximum the removal percentage of dye. GA based optimization on processes was executed by using CCD and the trained ANN model as the fitness functions to give the global optimized solutions.

Results and Discussion

Characterization of Adsorbent

Figure 2 compares the FT-IR characterization of pure Zein (a), pure nHAp (f), and Zein/nHAp composite with different Zein content including 70 wt% (b), 50 wt% (c), and 30 wt% (d). The spectrum of pure Zein, shown in Fig. 2a, has two bands at 1657 and 1526 cm−1 which indicate the stretching vibrations of C–O in amide groups I and II, respectively. The peak at 1271 cm−1 is attributed to bending vibrations of N–H. These peaks confirmed alpha helix secondary protein structure of Zein. 1657 cm−1 is related to the O–H vibrations, 1101 and 1047 cm−1 come from phosphate stretching vibrations. Peaks at 525, 825, 1442, and 1526 cm−1 stand for the presence of amino acids consist of cysteine, tyrosine, glutamine, and lysine, respectively [37, 38]. Also, the spectrum of pure nHAp illustrated in Fig. 2f, indicates that the bands at 632 and 3140 cm−1 are corresponded to the hydroxyl groups and the peaks at 560–610 cm−1 and 1000–1100 cm−1 are due to PO43− stretching vibrations [39]. Compared to Zein, peaks at 970 and 1657 cm−1 appeared in the composite and corresponded to stretching vibrations of phosphate and hydroxyl vibrations [38]. Figure 2b–d also represents the intensity of distinctive bands of HAp in the spectrum of the composite is changeable and depends on the concentration of nHAp in the composite. The intensity of characteristic peaks of nHAp in composites with different wt% is in the order: b < c < d (shown in Fig. 2), respectively. Because the concentration of nHAp increased from b to d [40]. In addition, it can be seen characteristic bands of both nHAp and Zein such as the peaks corresponding to hydroxyl, amino, and amide groups exist in the spectra of Zein/nHAp, except for slight band shifts and peak height reduces possibly due to chemical reaction between Zein and nHAp. FT-IR analysis of adsorbent proved that nHAp introduced into Zein after modification.

Fig. 2
figure 2

FT-IR spectra of pure Zein (a), pure nHAp (f), and Zein/nHAp composite with different Zein content including 70 wt% (b), 50 wt% (c), and 30 wt% (d)

FE-SEM presents helpful information about morphology and particle size of Zein/nHAp. Figure 3 indicates FE-SEM images of Zein/nHAp containing 30, 50, and 70 wt% nHAp, pure Zein, and pure nHAp. About composites, it is seen a porous structure with nanosized dimensions (< 100 nm) having high surface for appropriate adsorption of target dye. The nHAp content in composite influenced the intermediate porosity and the degree of interconnectivity. The increase in nHAp content led to a reduction in porosities owing to reaction junctions between nHAp and Zein [41]. Consequently, porosities of Zein/nHAp with different wt% of nHAp is in the order: 30 wt% nHAp > 50 wt% nHAp > 70 wt% nHAp.

Fig. 3
figure 3

FE-SEM images of Zein/nHAp consist of 30 (a), 50 (b), and 70 (c) wt% nHAp, and SEM images of pure Zein (d), and pure nHAp (e)

Determination of specific surface area using N2 adsorption/desorption measurements at 77 K expanded by Brunner–Emmett–Teller (BET) at equilibrium is applied to present helpful information on the adsorbent properties like surface area, total pore volume, and micropore area. 73.73 m2/g, 0.249 cm3/g, and 2.318 nm were acquired for surface area, total pore volume (Vp), and mean pore diameter, respectively. The BET and porosity values of Zein/nHAp were remarkably higher than that of pure Zein (0.1402 m2/g) owing to the incorporation of nHAp resulting increase in the surface area of the adsorbent and consequently supplying more active sites and enhancement of adsorption efficiency. The nitrogen adsorption/desorption isotherm and the pore size distribution (inset) of Zein/nHAp composite are presented in Fig. 4.

Fig. 4
figure 4

N2 adsorption–desorption isotherm and pore size distribution using BJH method (inset) of Zein/nHAp composite

The X-ray diffraction patterns of pure Zein (a), Zein/nHAp (e), and Zein/nHAp composite (b: 30 wt% nHAp, c: 50 wt% nHAp, d: 70 wt% nHAp) have been exhibited in Fig. 5. In Zein, a significant peak was observed at 2\(\theta\) = 20° (maximum intensity) corresponding to the characteristic peak of Zein showed that the polymer was amorphous [37]. In the composite, we observed both the Zein and n-HAp diffraction peaks. The peaks around 2\(\theta \approx\) 25.9°, 31.8°, 32.2°, 32.9°, 34.1° and 39.8° relate to (002), (211), (112), (300), (202), (310) crystal faces of HAp, respectively [21]. In addition, the peaks of nanocomposite are slightly broader than pure HAp which can be a sign for reducing the HAp size and crystallinity in the presence of Zein matrix [42].

Fig. 5
figure 5

XRD patterns of pure Zein (a), nHAp (e), and Zein/nHAp composite (b 30 wt% nHAp, c 50 wt% nHAp, d 70 wt% nHAp)

Effect of Ratios of nHAp to Zein of Nanocomposites on Removal of Congo Red

Figure 6 shows the influence of ratios of nHAp to Zein on the removal of CR. Removal percent of CR grows with increasing of nHAp to Zein from 70/30 to 30/70, so the optimum ratio is Zein/nHAp composite with ratio of 30/70. Also, the results showed that composite of Zein and nHAp have a synergistic effect on the removal of Congo red from aqueous solutions. In composite, Zein is a bed for nHAp and hydroxyapatite nanoparticles increase surface of Zein. The intermolecular hydrogen bonding between hydroxyl groups of nHAp and the oxygen of Zein can be expected.

Fig. 6
figure 6

Influence of various Zein/nHAp composite ratio on removal of CR. values are mean ± SD (n = 4) for CR. Concentration: 40 mgl−1, adsorbent dosage 0.01 g, natural pH, temprature 25 °C and equilibrium time 30 min

Central Composite Design

As it is obvious from CCD (Table 1) the influence of five independent variables such as pH, adsorbent dosage, CR concentration, contact time, and temperature were explored. Table 2 exhibits thirty-two experiments and their relating responses. Analysis of variance (ANOVA) was done for the removal percentage of the dye applying design expert 7.0.0 Trial (Table 3). The quality of the polynomial model equation was evaluated based on the coefficient of determination R2 and statistical significance of the equation was assessed by F-test. P-values < 0.05 is a criterion for judgment about the significance of each term, and showed significant variables at 95% confidence level. Therefore, the following predictive models illustrating the removal percentage of CR dye was achieved in terms of important variables.

Table 3 ANOVA of the second-order polynomial equation for removal efficiency (%) of CR by Zein/nHAp nanocomposite

Equation (7) illustrates the relation between removal efficiency (R%) and the actual independent variables:

$${\text{R}}{\% _{({\text{CR}})}}~=+102.45+2.00{X_1} - 0.29{X_2} - 0.21{X_3} - 0.06{X_4}+228.89{\text{~}}{X_5}+4.44{\text{E}} - 003{\text{~}}{X_1}{X_2}+0.016{\text{~}}{X_1}{X_3} - 88.89{\text{~}}{X_1}{X_5}+5.37{\text{E}} - 004~{X_2}{X_4} - 15.56~~{X_2}{X_5}+3.89{\text{E}} - 004{\text{~}}{X_3}{X_4}+2.22~{X_3}{X_5}+2.28{X_4}{X_5}~ - 0.18~X_{1}^{2}+2.46{\text{E}} - 003{\text{~}}X_{2}^{2} - 4.28{\text{E}} - 004{\text{~}}X_{3}^{2}+5.41{\text{E}} - 005{\text{~}}X_{4}^{2}+179.57~X_{5}^{2}$$
(7)

Figure 7a shows the correlation between experimental and predicted dye adsorption efficiency. It is seen there is a good fit between the experimental data and the predicted results. According to ANOVA for the R%(CR), the P-value for the lack of fit was indicating the suitability of the predictive model. The closeness of the R2 value to unify represents more accuracy of response predicted by the model. The R2 value of 0.9959 and adjusted R2 value of 0.9884 confirm the goodness of the fit, and the predicted R2 of 0.9360 is in reasonable agreement with the adjusted R2. Figure 7b shows the residual plot versus predicted data and the random pattern of residuals presents adequacy of the model. An adequate precision (signal-to-noise ratio) value higher than 4 is favorable. A value of 55.45 was discovered in the present work. Thus, this model can navigate the design space [43]. The coefficient of variation (C.V.%) denotes the degree of precision and reliability of the model [33]. The C.V. value of 0.10 confirms high precision and reliability of the experimental data (C.V.% < 10 indicates high reproducibility of experimental data) [34]. The normal distribution of data was discovered by plotting the residuals and deviations of the observed data amounts from the predicted amounts (Fig. 7c). Obviously, the figure expressed that the experimental data fall close enough to the straight line for CR adsorption suggesting the fair adequacy of the constructed equation for predicting the adsorption and evaluating individual interactions between the response and process variables.

Fig. 7
figure 7

a The experimental data versus predicted data, b the residuals versus predicted data, and c normal plot for removal of CR

Three-Dimentional Response Surface Plot

The 3D response surface plot is a three-dimensional graphic representation that was portrayed and regarded to optimize important factors such as pH, adsorbent dosage, CR concentration, contact time, and temperature as well as to provide helpful information about the possible interaction on variables [14]. The importance of the standard equation coefficients, the geometric nature of the surface, and the maximum and minimum of the response can be examined by the response surface. Figure 8 shows the most corresponded appropriate response surface for the design and indicates the response surface plots of R% (removal percentage of CR) variables.

Fig. 8
figure 8figure 8

The 3D response surface plots and contour plots for interactive effect of a pH and adsorbent dosage, b Time and adsorbent dosage, c Temprature and adsorbent dosage, and d CR concentration and adsorbent dosage

The curvatures of these plots show the interaction between variables. The effect of pH on the adsorption capacity of the nanocomposite was studied in the range of 3–9. Based on Fig. 8a, as the pH increased, no significant change occurred in the removal percentage of CR. So the pH value of the solution is not an important monitoring parameter. As mentioned in ANOVA table, pH is not a significant factor in the removal of CR by Zein/nHAp adsorbent. This is an advantage because this adsorbent can be applied in real samples in every pH with high removal percent of CR. The maximum removal percentage of 99.4896 was achieved at pH 5.83 which was considered as optimum pH. Seemly, at this area, the electrostatic attraction between negative charge of CR molecules and the positive charge of adsorbent is the main adsorption mechanism. Hydroxide competition with CR molecules for adsorption sites may be the reason of slight decrease in CR removal percentage at higher pH. Although it is thought that the electrostatic bond is not the only mechanism for adsorption. Because pH is not a significant factor in this study, as expressed earlier. In fact, due to the presence of Zein, dye molecules can be captured in pores of the adsorbent which is another reason.

Another factor that severely impresses the percentage of dye removal, is contact time because of reaching the equilibrium between aqueous solution and adsorption process. The influence of contact time on the adsorption efficiency of the nanocomposite was studied in the range of 5–35. As it is seen in Fig. 8b, in the first stage of a adsorption process, the removal efficiency is fast because of the high performance of adsorbent and achieving equilibrium. Therefore, the maximum adsorption performance was obtained within the first 5 min and consequently reached equilibrium at about of 5.20 min of contact time.

Temperature is one of the most important parameters in all separation procedures, particularly adsorption processes. The influence of temperature was investigated in the range of 20–50 °C and the maximum removal efficiency was achieved at 34.32 °C. As shown in Fig. 8c, CR adsorption improves with rising temperature. The increase in removal efficiency with rising temperature results from the movability of the dye molecules which enhances and leads to increment of CR adsorption on the surface of adsorbent.

The initial concentration presents a prominent driving force to overwhelm all mass transfer resistance of CR molecules between the aqueous and solid phases [44, 45]. The effect of initial concentration of CR on the removal efficiency was studied in the range of 40–400 ppm. Based on Fig. 8d, it was found adsorption rate enlarged at both low and high concentration of CR and the maximum removal efficieny was obtained at 392.10 ppm as optimum concentration of CR. At lower concentration of CR increase in removal percentage is due to abundance of vacant sites on the adsorbent surface to the dye which results in enhancement of CR diffusion rate to the sorbent. But at high concentration of CR the unoccupied sites of adsorbents become fewer and mass transfer is dependent on the initial dye concentration. In fact, increase in CR concentration reduces resistance to the adsorption of solute from CR solution and accelerates the diffusion of CR from the solution onto the adsorbent owing to the growth of driving force (concentration gradients).

The influence of adsorbent dosage on the CR removal in the range of 0.001–0.010 g is shown in Fig. 8d. It can be seen by increasing the amount of adsorbent the amount of adsorbed CR remarkably enhanced and reached its maximum at 0.007 g (optimum adsorbent dosage). An increment in adsorption efficiency with enhancement of adsorbent dosage is illustrated by improvement of surface area and reactive sites to dye molecules as well as increasing in concentration gradient which leads to improvement of the rate of CR mass transfer to the adsorbent surface.

Optimization Process

In order to achieve the maximum removal efficiency of CR, RSM is applied to give the optimum combination of variables based on the ridge maximum analysis and the canonical analysis. The experiment with desirability value of 1 was chosen by utilizing the optimization function of the software. The desirability function is defined as:

$${\text{D }}={({{\text{d}}_{\text{1}}}~ \times {{\text{d}}_{\text{2}}}~ \times \ldots {\text{ }}{{\text{d}}_{\text{n}}})^{{\text{1}}/{\text{n}}}}={\left( {\mathop \prod \limits_{{{\text{i}}=1}}^{{\text{n}}} {{\text{d}}_{\text{i}}}} \right)^{{\text{1}}/{\text{n}}}}$$
(8)

where n is the number of responses in the measure and di is the desirable ranges for each response.

The function of desirability was employed to confirm the model. The optimum amounts of regarded parameters were acquired by solving the regression equation and by studying the response surface contour and 3D plots. The changeability independent parameters was interpreted by the multiple coefficients of determination R2. Also, the model equation was exerted to anticipate the optimum value and to clarify the interaction between the factors within the specified range [46, 47]. Optimal conditions of the tested parameters were set as follows in Table 4, and under the optimum conditions, the removal efficiency of 99.48% was obtained.

Table 4 Predicted and experimental value of responses at the optimum condition

Modeling and Optimization by ANN-GA

An artificial neural network has been successfully exerted for prediction of adsorption data achieved at different experimental data [48]. The measures such as maximum value of R2 and the lowest value of MSE for testing set was taken into account for option of the optimum ANN structure. Figure 9a, b indicates the MSE versus the number of epochs for optimal ANN and Fig. 10a, b presents the predicted data versus actual response obtained from the CCD and ANN results.

Fig. 9
figure 9

a The training, validation and test performance (b), and the error histogram of the network

Fig. 10
figure 10

The predicted %RE values by the ANN modeling (a) and CCD (b) versus the experimental %RE values

The Fig. 10a, b demonstrated the goodness of fit between experimental data and predicted data given by ANN model in comparing with the CCD result. Lately, combination ANN-GA has been successfully employed aiming to the optimization of different systems. In this work, GA utilized by equations that obtained from ANN models. The method begins by using optimization variables such as pH, temperature, contact time, initial concentration of CR, and adsorbent dosage. The objective function was that equation obtained from ANN model which connect the inputs with output and can be defined as follows:

$$\left( {AN{N_{output}}} \right)Y=purelin\left( {LW \times tansing(IW \times \left[ {{x_1};{x_2};{x_3};{x_4};{x_5}} \right]+{b_1}} \right)+{b_2}$$
(9)

where (x1), (x2), (x3), (x4), and (x5) symbolize the inputs, LW, IW, b1 and b2 are the weights and bias of hidden and output layers. Table 5 exibits the weight and bias values of each layer aquired from the best ANN model.

Table 5 The weight and bias of trained ANN for predicting the removal efficiency of the Congo red dye

The Matlab genetic algorithm toolbox has been used for GA processes with generation, a population size of with scattered crossover function of based on rank scaling function and stochastic uniform option. Figure 11a, b population size of 20 with scattered crossover probability of 0.8 Rank scaling function and Stochastic uniform option. The maximum removal percentage of the dye at pH of 5.954, temperature of 29.435, contact time of 6.335 min, 0.007 mg of adsorbent, 357.33 ppm initial dye concentration was predicted by ANN-GA (Table 6). The optimum conditions acquired from ANN-GA hybrid and CCD (Table 6) experimental the efficiency of Congo red removal 99.50 that shows agreement between the two methods. The MAPE (%) of 0.0494 and 0.0155 were obtained for RSM (CCD) and ANN, respectively, also Fig. 12 shows the MAPE (%) of RSM (CCD) and ANN versus number of experiments. The MAPE and MSE values of ANN model are obviously least than CCD model for each experiment, so the accuracy of ANN model.

Fig. 11
figure 11

Plots of best fitness and best individual for the removal efficiency of Congo red dye by ANN-GA method

Table 6 The comparison between optimum conditions of CCD and ANN-GA models
Fig. 12
figure 12

MAPE (%) of RSM (CCD) and ANN versus number of experiments

Comparison of CCD and ANN-GA

The CCD and ANN-GA are two powerful prediction techniques able to solve linear and non-linear problems [49]. The CCD and ANN-GA were successfully used for adsorption of CR by Zein/nHAp. Both models were well fitted to experimental response.

Although, the main limitation of CCD is ability to solve only quadratic non-linear correlation but the ANN-GA is capable of solving any form of non-linearity [20, 50]. The suitability of CCD and ANN-GA in the suggested process was determined applying MAPE (%) values and the determination coefficients (R2) of two models ware compared (computed based on Eq. 20) [51].

Where n is the number of points, yi is the forecasted value, ydi is the experimental value, and ym is the average of the experimental values 0.0155 and 0.0494 amounts of MAPE was discovered for CCD and ANN-GA respectively. According to Fig. 12 indicating the MAPE (%) of CCD and ANN-GA against number of experiments, the MAPE amount of CCD was found to be more than ANN-GA model for each experimental test which signifies higher accuracy of ANN-GA than CCD. R2 is an expressive to present the prediction potential of the model for the process. 0.9955 and 0.9983 values of R2 were achieved for CCD and ANN-GA respectively.

The presence of high degree of agreement between experimental data and forecasted data expresses that ANN-GA is more powerful and effective than CCD for prediction and optimization of the influences of independent parameters on the removal performance of CR dye from aqueous solution.

Adsorption Isotherm Study

Adsorption isotherms investigation is very significant to obtain information about properties and mechanism of adsorption. The adsorption isotherms point out the partition of adsorbate molecules between the liquid sample solution and solid sorbent in the adsorption process. In fact, the adsorption studies are ascribed to the chemistry of the adsorbate and adsorbent at a particular temperature. Hence, to appraise the adsorption isotherm of the suggested method, the popular isotherms such as Langmuir and Freundlich were investigated at various concentrations in the range of (40–400) ppm at optimum conditions. Formation of a monolayer adsorbate where there are no any interactions between the adsorbed molecules is hypothesis of the Langmuir isotherm model. According to this assumption, the linearized form of Langmuir isotherm model is as below [52]:

$$\frac{{{{\text{c}}_{\text{e}}}}}{{{{\text{q}}_{\text{e}}}}}=~\frac{1}{{{{\text{k}}_{\text{L}}}{{\text{q}}_{\text{m}}}}}+\frac{{{{\text{c}}_{\text{e}}}}}{{{{\text{q}}_{\text{m}}}}}$$
(10)

where Ce is the equilibrium concentration of the dye solution (ppm), the qm constant is the maximum adsorption capacity (mg/g), and KL is Langmuir constant (l/mg). The plot of Ce/qe versus Ce, leads to a straight line for CR. KL and qm were obtained from the intercept and slope of the plots. The desirability of CR adsorption onto Zein/nHAp composite is determined by a dimensionless constant called separation factor, RL.

$${{\text{R}}_{\text{L}}}=\frac{1}{{1+~{{\text{K}}_{\text{L}}}{{\text{C}}_0}}}$$
(11)

where KL is the Langmuir constant and C0 (mg/l) is the initial concentration of the applied dye. The RL value indicates the unfavorable (RL > 1), linear (RL = 1), favorable (0 < RL < 1), and irreversible (RL = 0) kind of adsorption process [53]. Based on the results given in Table 7, the value of RL for CR dye is 0.022 which signifies the adsorption of Congo red on the Zein/nHAp adsorbent is favorable.

Table 7 Isotherm constant parameters and correlation coefficients calculated for the biosorption of CR by nHAp/Zein nanocomposite

The Freundlich isotherm is widely used for many adsorption processes. In this work, the Freundlich isotherm was also studied for the process. The equation is as below:

$${{\text{q}}_{\text{e}}}={{\text{k}}_{\text{f}}}{{\text{c}}_{\text{e}}}^{{\frac{1}{{\text{n}}}}}$$
(12)

The linearized form of the Freundlich isotherm can be as following:

$${\text{lnqe }}={\text{ ln}}{{\text{K}}_{\text{F}}}+\frac{1}{{\text{n}}}{\text{lnCe}}$$
(13)

where Ce, Kf, and 1/n are the equilibrium concentration of the dye (ppm), the Freundlich constant [(mg/g)(L/mg)1/n], and heterogeneity factor that represents the adsorption intensity [52], respectively. The values of the constant 1/n and Kf were calculated from the slope and the intercept of the linear plot of ln\({\text{q}}_{\text{e}}\) versus ln\({\text{C}}_{\text{e}}\). The value of 1/n (0–1) shows the surface heterogeneity and the closer the value to zero the higher the heterogenity [52, 54,55,56]. As the results shown in Table 7, the value of 1/n was in the range of (0–1) which means the adsorption of CR dye of interest on the adsorbent was occured on a heterogeneous surface.

The heat of the adsorption and the adsorbent-adsorbate interaction were assessed applying Temkin isotherm model. The equation of this model is defined as follows [57]:

$${{\text{q}}_{\text{e}}}={\text{ }}{{\text{B}}_{\text{1}}}{\text{ln}}{{\text{K}}_{\text{T}}}+{{\text{B}}_{\text{1}}}{\text{ln}}{{\text{C}}_{\text{e}}}$$
(14)

where B = (RT)/b (the constant B refers to the heat of adsorption), T is the absolute temperature (Kelvin), R is the universal gas constant (8.314 J/mol K). KT is the equilibrium binding constant (L/mol) related to the maximum binding energy. B1 and KT constants were calculated from the slope and intercept of a linear plot of qe against ln\({\text{C}}_{\text{e}}\). Suitability of this model for fitting and well presentation of the experimental data related to the adsorption of CR on the adsorbent was proved by this model. Values obtained from the equation are exhibited in Table 7.

Dubinin–Radushkevich (D–R) isotherm model was chosen to an understanding of adsorption mechanism and to describe adsorption on both homogenous and heterogeneous surfaces [31]. A linear form of D–R isotherm is:

$${\text{ln}}{{\text{q}}_{\text{e}}}={\text{ln}}{{\text{q}}_{\text{m}}} - {{{\upbeta}}}{\varepsilon ^{\text{2}}}$$
(15)
$$\varepsilon =RTln\left( {1+\frac{1}{{{C_e}}}} \right)$$
(16)
$$E=\frac{1}{{\sqrt {2\beta } }}$$
(17)

where qm is the theoretical saturation capacity (mg g−1), β, a constant of Dubinin-Radushkevich (mol2 J−2); ε, the Polanyi potential; \(E\), related to free energy (kJ mol−1); R, 8.314 gas constant (J mol−1 K−1) and T, 273.15 absolute temperature (K).

Adsorption Kinetics

The adsorption kinetic modeling was carried out utilizing pseudo-first-order and pseudo-second-order models. These initial empirical models have been vastly applied to depict the kinetics of adsorption. The kinetic of CR adsorption on the Zein/nHAp was studied in relation to the pseudo-first-order (Eq. 18) and pseudo-second-order (Eq. 19) models [58], respectively.

$${\text{log}}\left( {{{\text{q}}_{\text{e}}} - {{\text{q}}_{\text{t}}}} \right)={\text{ log}}\left( {{{\text{q}}_{\text{e}}}} \right) - \frac{{{{\text{K}}_1}}}{{2.303}}t$$
(18)
$$\left( {\frac{{\text{t}}}{{{{\text{q}}_{\text{t}}}}}} \right)=\frac{1}{{{{\text{K}}_{2{\text{~~}}}}{\text{q}}_{{\text{e}}}^{{2{\text{~}}}}}}+\frac{1}{{{{\text{q}}_{\text{e}}}}}({\text{t}})$$
(19)

where qe and qt exhibit the precise value of the adsorbed dye at equilibrium and every time (mg/g), K1 (1/min) and K2 (g/mg min) are the adsorption rate constant. K1 and K2 are calculated by the slopes of both lines, while the intercept of lines are used to compute experimental adsorption capacity [59, 60].

The intraparticle diffusion equation is expressed as [31]:

$${{\text{q}}_{\text{t}}}={{\text{k}}_{{\text{dif}}}}{{\text{t}}^{1/2}}+{\text{C}}$$
(20)

where Kdif is the intraparticle diffusion rate constant (mg/(g min1/2)) and C indicates the boundary layer thickness.

The linear form of Elovich model is generally given as [31]:

$${{\text{q}}_{\text{t}}}=\frac{1}{{{{\upbeta}}}}{\text{ln}}\left( {{{{\upalpha}\varvec{\upbeta}}}} \right)+\frac{1}{{{{\upbeta}}}}{\text{ln}}({\text{t}})$$
(21)

The experimental results given in Table 8, indicate the closeness of theoretical and experimental adsorption capacity for pseudo-second-order kinetic model that approved by the higher value of correlation coefficient over whole adsorption step which means the suitability of this model for studying experimental data.

Table 8 Kinetic parameters for the biosorption of CR by Zein/nHAp nanocomposite

Thermodynamic Study

The change in some thermodynamic parameters such as free energy (\(\varDelta G^\circ\)), entropy (\(\varDelta S^\circ\)), and enthalpy (\(\varDelta H^\circ\)) were determined using equations below [20]:

$$ln{K_{eq}}=\frac{{\Delta {H^ \circ }}}{{RT}}+\frac{{\Delta {S^ \circ }}}{R}$$
(22)
$$~{K_{eq}}=\frac{{{q_e}}}{{{C_e}}}$$
(23)
$$\Delta {G^ \circ }= - RTln{K_{eq}}$$
(24)
$$\Delta {G^ \circ }=\Delta {H^ \circ } - {\text{T}}\Delta {S^ \circ }$$
(25)

where Ce (mg/l), qe (mg/g), R (J/mol k), T (k), and ke (l/g) are the equilibrium concentration of CR dye in solution, the value of CR adsorbed onto adsorbent, the gas constant, absolute temperature, and the adsorption equilibrium constant, respectively. \({\varDelta H}^{^\circ }\) and \({\varDelta S}^{^\circ }\)are evaluated from the slope and intercept of plot of \(ln{K}_{eq}\) against 1/T. \(\varDelta {G}^{^\circ }\) can also be determined from true amounts of \({\varDelta H}^{^\circ }\) and \({\varDelta S}^{^\circ }\). According to obtained results shown in Table 9, negative amount of \(\varDelta {G}^{^\circ }\) shows the adsorption process is thermodynamically spontaneous in nature [61]. The endothermic nature of adsorption process was approved by the positive amounts of \(\varDelta H^\circ\). In addition, the positive value of \(\varDelta S^\circ\) mmentions a increase in the randomness at the adsorbent and adsorbate solution interface over the adsorption process.

Table 9 Thermodynamic parameters for the biosorption of CR by Zein/nHAp nanocomposite in concentration of 400 mg l−1

Recyclability of the Adsorbent

The recyclability of the sorbent is one of the most important parameters indicating the potential of the adsorption process. For this purpose, several eluents including acetone, pure methanol, pure ethanol and mixture ethanol and methanol (1:1, v/v) were chosen to desorb of CR dye. In optimized condition, the maximum desorption was obtained in pure ethanol. Figure 13 indicates the regenerated Zein/nHAp nanocomposite that has high removal efficiency after six cycles.

Fig. 13
figure 13

Regenerate of Zein/nHAp nanocomposite of CR dye by pure ethanol solvent. Values are mean ± SD (n = 4)

Removal Performance of Zein/nHAp in Real Sample

To study Zein/nHAp adsorbent efficiency in a real sample, the sorption experiments were performed with industrial wastewater spiked with CR which are fed with different quantities of the dye. The results have been presented in Table 10. For this purpose, various amounts of CR (40, 80 and 120 mg/l) were spiked to the sample. Then, spiked samples were treated under the general procedure. The results demonstrate acceptable and excellent removal percentage confirming the good performance of adsorbent proposed for real sample.

Table 10 Removal percentages of CR from industrial wastewaters using Zein/nHAp adsorbent developed in this work (N = 4)

Comparison with Other Adsorbents for Congo Red

Numerous adsorbents have been reported to apply for removal of CR. Table 11 compares the performance of different adsorbents for removal of CR. Based on obtained results, the performance of Zein/nHAp is superior to some other reported adsorbents in terms of higher adsorption capacity of the adsorbent.

Table 11 Performance of some different adsorbents for removal of CR

Conclusion

In this study, the Zein/nHAp, as an effective sorbent, was successfully prepared and characterized by FT-IR, FE-SEM, XRD, and BET in order to be applied for removal of CR dye from aqueous solution. The optimum conditions for pH, temperature, time, initial concentration of the dye, and sorbent dosage were discovered to be 5.83, 34.32 °\(\text{C}\), 5.20 min, 392.10 ppm, and 0.007 g, respectively. The maximum removal efficiency of 99.49% was obtained experimentally under optimum conditions confirming the high adsorption ability of the adsorbent. The CCD and ANN-GA, as statistical models, were used to optimize significant parameters with MAPE (%) of 0.0494 and 0.0155 and the determination coefficient of R2 values of 0.9955 and 0.9983 respectively. Based on results, the best optimization of experimental data was acquired from the ANN-GA method. The equilibrium and kinetic models were investigated to study adsorption process. Adsorption of CR onto the adsorbent obeyed Langmuir model. The process kinetics were well fitted with Pseudo-second-order model. Thermodynamic studies proved that the adsorption process was spontaneous and endothermic in nature. A regeneration study of the material was also performed and it was discovered that the Zein/nHAp could be regenerated applying a solution of pure ethanol and reutilized with high performance. The data and methodology given in this article would be practical for designing the adsorbent for the removal of actual effluent. Besides, the results of this report motivate researchers to expand advanced and optimized systems, according to adsorption for the impressive treatment of wastewater.