1 Introduction

There are thousands of various chemicals and toxic substances in effluents discharged by industries. These include organic and inorganic pollutants, which can cause deoxygenation by promoting microbial activity, or substances that are directly toxic to the life-forms in the aquatic system. Therefore, treating such wastewaters is of utmost importance. Colored dyes are among such pollutants that—in addition to toxic consequences—render the water aesthetically unpleasant as well [1].

The textile industry discharges a large amount of colored effluents annually. Approximately 2% of the dyes used worldwide are discharged in wastewater leading to hundreds of thousands of tons of colored wastewaters. Because of the increase in cellulosic fibers, reactive acidic dyes are widely used. Various technologies can be used to treat textile wastewaters, including but not limited to, adsorption, advanced oxidation, electrocoagulation, conventional coagulation–flocculation, and biological treatment. Among them, treating effluents using adsorption has proven to be effective and is commonplace [2].

Adsorption is an attractive process mainly because of its efficiency, efficacy, and simplicity [3,4,5]. The availability and cost of selected adsorbents are of prime importance in any adsorption system [6, 7]. Therefore, the selection of the adsorbent is critical since it can significantly influence the effectiveness and operational cost of the treatment process [8, 9]. An ideal adsorbent should be of low cost and locally available and have a high adsorption capacity, fast adsorption kinetics, and the possibility of regeneration and reuse [10, 11].

Adsorption isotherms and kinetic studies have been routinely used to characterize adsorption processes [12, 13]. These tools are important for understanding the applicability of adsorption, as well as the mechanisms involved [13]. This is necessary for the proper design of adsorption unit operations [14].

Oladipo and Ifebajo [15] have investigated the adsorptive performance of Magnetic Chicken Bone Biochar (MCBB) for removal of tetracycline (TC) and rhodamine B dye (RB) in a single- and two-stage stirred adsorption design. The adsorption process was suitably modeled with the Freundlich isotherm. The results demonstrated that in a single-stage design, MCBB is able to efficiently remove 93.2% of TC (at pH 8.0) and also 85% of RB (at pH 10). Also, 33.2 g of MCBB is required to reach 96% TC removal and 22.2 g for RB removal (100 mg/L solutions) within 180 min in the two-stage stirred adsorption design.

Oladipo and Gazi [16] studied the application of multistage adsorption for the removal of acid red 25 (AR25) onto biomagnetic material. The experimental data fit the Freundlich and Sips isotherms. Based on laboratory results, optimum AR25 removal was observed at pH 5.0. The contact time decreases with the application of the two-stage process by more than 50% such that the contact time is 400.8 min for removal of 96% AR25 in the two-stage adsorber design, while in the single-stage adsorber design, it is 895 min.

Li et al. [17] have also studied the removal of disperse (Disperse yellow brown S-2RFL) and reactive (Reactive Yellow K-4G) dye onto poly-epicholorohydrin–dimethylamine (EPIDMA) cationic polymer modified bentonite with a two-stage adsorption process. The equilibrium data revealed that the reactive and disperse dye adsorption fit the Freundlich and Langmuir isotherms, respectively. Also, the obtained results revealed that the two-stage adsorber design is able to reduce adsorbent usage at a fixed dye removal rate when compared to a single-stage adsorber.

Markandeya et al. [18] investigated the adsorptive capacity of sawdust for removal of methylene blue (MB) dye via a two-stage batch adsorption system. The experimental data followed the Langmuir isotherm (R2 of 0.996) with maximum adsorption capacity of 76.92 mg/g. Moreover, the results showed that the studied adsorption process can be modeled with the pseudo-second-order kinetic model. For initial MB dye concentration of 300 mg/L, the minimum contact time in each stage of the two-stage batch adsorption system (with an adsorbent loading of 4 g/L) to reach a removal rate of 99% was found at approximately 38 min.

Özacar and Şengil [19] have also studied adsorption of MB onto bentonite (at pH 7.9, concentration range of 100–1000 mg/L and 298 K) through a two-stage batch adsorption design in order to minimize the contact time. The kinetics of MB adsorption on bentonite was investigated through the application of three models, and pseudo-first- and pseudo-second-order kinetics. The derived results demonstrated that the studied adsorption process was best modeled with the Langmuir isotherm. The experimental data best fit the pseudo-second-order equation.

Shukla et al. [20] studied adsorption of MB on used tea leaves with a two-stage batch adsorption design in order to minimize the contact time. The adsorption process was investigated through three different kinetic models based on the pseudo-first- and pseudo-second-order equations as well as the intraparticle diffusion equations. Results revealed that experimental data followed the Langmuir isotherm (with maximum adsorption capacity of 166.67 mg/g) and could best be described by the pseudo-second-order equation. The minimum contact time for reaching 99% removal of MB by using a fixed mass of used tea leaves was found at 28.1 min [18 min (stage 1) and 10.1 min (stage 2)].

In this project, experimental equilibrium data will be used to test four equilibrium isotherm models to find out which model fits best for Allura direct red dye on treated peanut hulls. Next, the best-fitting model is used to minimize the mass of adsorbent used in order to reduce costs in industrial applications. The kinetic modeling of the batch contact time data is also important to predict the optimum design of batch processes to remove pollutants from effluents. The experimental contact time data will be used to test a set of kinetic models to establish which model fits the data and mechanistic system the best. The contact time will be optimized as well.

1.1 Allura direct red dye

Allura red, also named FD&C Red No. 40 or CI Food Red 17, is an azo dye. This means that it is formed from arenediazonium ions reacting with highly reactive aromatic compounds as in all azo compounds. This is referred to as a diazo coupling reaction. Since there are azo linkages bringing aromatic rings into conjugation, the resulting colors are generally deep. Often, azo dyes rings are substituted with sulfonic acid substituents as well as having extended conjugation. This fact considerably increases their polarity and solubility in water [21]. Allura red’s solubility in water is approximately 180,000 mg/L at 20 °C, 220,000 mg/L at 25 °C, and 260,000 mg/L at 60 °C [22].

FD&C Red No. 40 has no functional groups such as epoxides, lactones, esters, amides, and acetals that hydrolyze in water. Desulfonation of the aromatic sulfonic acid or its corresponding sulfonic acid salt is the only reaction that may be expected in aqueous solutions. In acids such as sulfuric acid, desulfonation takes place at 100–175 °C. Since these temperatures are not present in the natural environment, the dye and the corresponding salts are more or less stable in water [22, 23].

2 Materials and methods

Peanut hulls waste is an inexpensive and abundant agricultural by-product. The ready availability and low cost of peanut hulls make them potential adsorbent candidates for dye removal [24,25,26]. The production of the adsorbent (referred to as PH-857-H2O) from peanut hulls has been explained elsewhere [27]. For the sorption tests, analytical grade Allura red (≥ 98.0%) was purchased from Sigma-Aldrich (now Merck). For experiments, a precisely weighed amount of the adsorbent was used in 0.5 L of dye solutions. The containers were subjected to stirring at 150 rpm. Small samples were taken from the container, and the concentration of the aqueous phase was measured using a UV–Vis spectrophotometer (Cary 1E, Varian) after filtration through syringe filters (0.22 μm, Millex GP, Millipore) and dilution with deionized water. For long-term data points, measurements were made up to 1200 h. A completely randomized design was used for experimental design with which each experiment was assigned a random order having the same odds of being carried out. Readings were made in triplicate and averages used in order to decrease error.

2.1 Equilibrium isotherm models

When the desorption and adsorption rates are equal, i.e., when the amount of solute being adsorbed is equal to the amount being desorbed, equilibrium has been reached. At equilibrium, as the name implies, the concentration of the solution remains constant. Generally, equilibrium isotherms can be shown graphically by plotting the concentration of the sorbate on the adsorbent against the concentration of the sorbate in the liquid phase. This is the most expedient and practical method of investigating the adsorption capacity of an adsorbent [14]. Popular adsorption isotherm models are shown in Table 1. A 200 mL solution of Allura red dye with a concentration range of 2–80 mg/L was contacted with 0.2 g of the adsorbent for 5 h for isotherm studies. Subsequently, the phases were separated and the dyes were quantified by UV–Vis spectrometry.

Table 1 Popular adsorption isotherms and their corresponding equations

There are many more equilibrium isotherms and their variations reported in the literature. For example, the Redlich–Peterson isotherm is defined as [31]:

$$q_{\text{e}} = \frac{{q_{\text{m}} K_{\text{R}} C_{\text{e}} }}{{1 + K_{\text{L}} C_{\text{e}}^{\beta } }}.$$
(1)

It should be mentioned that \(\beta\) has a value between 0 and 1 and reflects the heterogeneity of the adsorbent. When the site energy distribution function is based on the Redlich–Peterson isotherm, it will have various advantages such as converging to the Langmuir isotherm and Henry’s law when values for \(\beta\) are equal to 1 and 0, respectively. Also, when the isotherm parameters \(q_{\text{m}} K_{\text{R}}\) and \(K_{\text{R}}\) are more than 1 and \(\beta\) is less than 1 the Redlich–Peterson isotherm will approach the Freundlich isotherm. However, in this study, only the three main models in Table 1 (Langmuir, Freundlich, and Langmuir–Freundlich) are considered.

2.2 Batch adsorption kinetics models

Kinetic models are generally employed to investigate the mechanism of adsorption. These models can also help discern the rate-controlling steps such as the chemical reaction, or mass transport and diffusion processes. Two general categories exist for kinetic models for batch adsorption: (1) pseudo-kinetic chemical reaction controlled models such as the pseudo-first-order and pseudo-second-order, and (2) mass transfer controlled models.

2.2.1 Pseudo-first-order kinetic model

More than 100 years ago, Lagergren [32] proposed a rate equation to model the sorption of solutes in a liquid solution. To date, the Lagergren equation is still one of the most widely used rate equations, if not the most widely used rate equation:

$$\frac{{{\text{d}}q_{\text{t}} }}{{{\text{d}}t}} = K_{1} \left( {q_{\text{e}} - q_{\text{t}} } \right).$$
(2)

Integrating the above equation from \(t = 0 \;{\text{to}}\; t\) gives:

$$\ln \left( {q_{\text{e}} - q_{\text{t}} } \right) = \ln q_{\text{e}} - K_{1} t.$$
(3)

The kinetic constant \(K_{1}\) is found when a plot is drawn in which \(\ln \left( {q_{\text{e}} - q_{\text{t}} } \right)\) is displayed on the vertical axis and \(t\) is used for the horizontal axis. Alternatively, the plot can show \(\ln \left( {q_{\text{e}} - q_{\text{t}} } \right)/q_{\text{e}}\) versus \(t\).

2.2.2 Pseudo-second-order kinetic model

Ho and McKay [33] more recently developed a second-order equation which can be written as:

$$\frac{{{\text{d}}q_{\text{t}} }}{{{\text{d}}t}} = K_{2} \left( {q_{\text{e}} - q_{\text{t}} } \right)^{2} .$$
(4)

Integrating the above equation gives:

$$\frac{1}{{q_{\text{e}} - q_{\text{t}} }} = \frac{1}{{q_{\text{e}} }}K_{2} t.$$
(5)

If the above equation is linearized, it can be written as follows:

$$\frac{t}{{q_{\text{t}} }} = \frac{1}{{K_{2} q_{\text{e}}^{2} }} + \frac{1}{{q_{\text{e}} }}t.$$
(6)

One way to know whether the pseudo-second-order model is applicable or not is to plot \(t/q_{\text{t}}\) against \(t\); if the plot yields a straight line, not only can one say that the pseudo-second-order equation is appropriate, but also, the equilibrium adsorption capacity, \(q_{\text{e}}\), can be directly found from the slope of the linear plot. That is one of the reasons why this model has been extremely popular and widely used in fitting kinetic data [33].

2.3 Optimization of adsorbent mass

Due to limitations in time, a single-stage adsorption operation seldom fully achieves the target level of adsorbate removal. Nonetheless, a single-stage operation has high operating flexibility. A setup using small separate batches of adsorbent with filtration between each stage is known as a multistage process. Such a process can increase efficiency, decrease the amount of adsorbent used, and improve the economic feasibility of the process. It should be noted that filtration and handling costs are limiting factors, resulting in processes that are rarely more than two stages [34].

Figure 1 shows a schematic of what the flow would look like in a two-stage process. Each stage treats the same amount of solution, \(L_{\text{s}}\), but employs different amounts of sorbents denoted as \(S_{\text{s1}}\) and \(S_{\text{s2}}\). The concentration of the solution is reduced from \(C_{0}\) to \(C_{1}\) in the first stage, and then from \(C_{1}\) to \(C_{2}\) in the second stage.

Fig. 1
figure 1

Schematics of a two-stage adsorption operation

So the material balance for the first stage can be written as [35]:

$$L_{\text{s}} \left( {C_{0} - C_{1} } \right) = S_{\text{s1}} \left( {q_{1} - q_{0} } \right),$$
(7)

and for the second stage, the balance becomes [35]:

$$L_{\text{s}} \left( {C_{1} - C_{2} } \right) = S_{\text{s2}} \left( {q_{2} - q_{0} } \right).$$
(8)

Since \(q_{0}\) is the concentration of the target species on the sorbent at the beginning of the stage, and since fresh sorbent is used, it is always equal to zero.

As will be shown in the Results and Discussion section, for isotherm modeling, the Langmuir–Freundlich isotherm was selected. This is because it displayed the least summation of the squares of errors. The Langmuir–Freundlich isotherm is:

$$q_{\text{e}}=\frac{q_{\text{m}}K_{\text{LF}}{C_{\text{e}}^{1/{n_{\text{LF}}}}}}{1+K_{\text{LF}}{C_{\text{e}}^{1/{1n_{\text{LF}}}}}}.$$
(9)

The material balance for stage 1 can be rewritten as:

$$\frac{{S_{\text{s1}} }}{{L_{\text{s}} }} = \frac{{C_{0} - C_{1} }}{{q_{1} - q_{0} }},$$
(10)
$$\frac{{S_{\text{s1}} }}{{L_{\text{s}} }} = \frac{{(C_{0} - C_{1} )\left( {1 + K_{\text{LF}} C_{1}^{{n_{\text{LF}} }} } \right)}}{{K_{\text{LF}} C_{1}^{{n_{\text{LF}} }} }},$$
(11)

and for stage 2, it becomes:

$$\frac{{S_{\text{s2}} }}{{L_{\text{s}} }} = \frac{{C_{1} - C_{2} }}{{q_{2} - q_{0} }},$$
(12)
$$\frac{{S_{\text{s2}} }}{{L_{\text{s}} }} = \frac{{(C_{1} - C_{2} )\left( {1 + K_{\text{LF}} C_{2}^{{n_{\text{LF}} }} } \right)}}{{K_{\text{LF}} C_{2}^{{n_{\text{LF}} }} }}.$$
(13)

The total amount of adsorbent can then be calculated from:

$$\frac{{S_{\text{s1}} + S_{\text{s2}} }}{{L_{\text{s}} }} = \frac{1}{{K_{\text{LF}} }}\left( {\frac{{(C_{0} - C_{1} )\left( {1 + K_{\text{LF}} C_{1}^{{n_{\text{LF}} }} } \right)}}{{K_{\text{LF}} C_{1}^{{n_{\text{LF}} }} }} + \frac{{(C_{1} - C_{2} )\left( {1 + K_{\text{LF}} C_{2}^{{n_{\text{LF}} }} } \right)}}{{C_{2}^{{n_{\text{LF}} }} }}} \right).$$
(14)

If \(\frac{{{\text{d}}\left[ {\left( {S_{\text{s1}} + S_{\text{s2}} } \right)/L_{\text{s}} } \right]}}{{{\text{d}}C_{1} }}\) is set equal to zero, the minimum total adsorbent required can be calculated. Thus, the equation becomes:

$$\frac{1}{{K_{\text{LF}} }}\left( {n_{\text{LF}} \frac{1}{{C_{1}^{{n_{\text{LF}} }} }}\left( {\frac{{C_{0} }}{{C_{1} }} + 1} \right) + \frac{1}{{C_{1}^{{n_{\text{LF}} }} }}} \right) = \frac{1}{{K_{\text{LF}} C_{2}^{{n_{\text{LF}} }} }}.$$
(15)

Since all parameters other than C1 are known/chosen by us, the Microsoft Excel solver add-in can be used to find \(C_{1}\). Thus, the determined concentration of \(C_{1}\) can be used to find the amount of sorbent required for each stage using Eqs. (11) and (13).

In this study, the required amount of sorbent for bringing the concentration of the final effluent to 1%, 5%, and 10% of the original concentrations was investigated.

2.4 Optimization for contact time minimization

In this method, the time needed for adsorption is optimized. Obviously, longer sorption times would result in better adsorption, while shorter times, although economically cheaper, would be unfavorable in terms of adsorption. It should be noted that previous studies generally examined the application of pseudo-first- and pseudo-second-order kinetic models for optimization of two-stage batch adsorber design [18,19,20, 35]. The results revealed that the pseudo-second-order kinetic model provides better correlations for the experimental data in comparison with the first order for all of the systems studied [18,19,20, 35].

A mass balance equation can be used alongside the kinetic model, in order to determine the amounts of Allura red removed in each stage. The two-stage batch adsorption process is shown in Fig. 1. The wastewater first enters stage 1 where it comes into contact with \(S_{1}\) grams of the adsorbent. Due to adsorption, the concentration of the adsorbate in the liquid phase is reduced from \(C_{0}\) to \(C_{1}\). Then the wastewater is treated in stage 2 with \(S_{2}\) grams of the adsorbate, further reducing the concentration of the adsorbate to \(C_{2}\). Generally, the mass balance gives:

$$L\left( {C_{n - 1} - C_{n} } \right) = S\left( {q_{n} - q_{0} } \right).$$
(16)

As shown before, the pseudo-second-order equation is:

$$\frac{t}{{q_{\text{t}} }} = \frac{1}{{Kq_{\text{e}}^{2} }} + \frac{1}{{q_{\text{e}} }}t.$$
(17)

By combining Eqs. (16) and (17), the mass balance equation becomes:

$$C_{n} = C_{n - 1} - \frac{{SKq_{n}^{2} t}}{{L\left( {1 + Kq_{n} t} \right)}},$$
(18)
$$\mathop \sum \limits_{n = 1}^{n} \left( {C_{n} - C_{n - 1} } \right) = \mathop \sum \limits_{n = 1}^{n} \frac{{SKq_{n}^{2} t}}{{L\left( {1 + Kq_{n} t} \right)}}.$$
(19)

The removal of adsorbate in each stage, \(R_{n}\), can be calculated using the following equation:

$$R_{n} = \frac{{C_{n - 1} - C_{n} }}{{C_{0} }} = \frac{{SKq_{n}^{2} t}}{{LC_{0} \left( {1 + Kq_{n} t} \right)}}.$$
(20)

The total removal is:

$$\mathop \sum \limits_{n = 1}^{n} R_{n} = \frac{{S_{\text{t}} }}{{LC_{0} }} = \mathop \sum \limits_{n = 1}^{n} \frac{{Kq_{n}^{2} t}}{{1 + Kq_{n} t}}.$$
(21)

If \(q_{\text{e}}\) and \(K\) could be articulated as functions of \(C_{0} ,\) then the calculations would be easier and more convenient. Thankfully, there are such relations as follows:

$$q_{\text{e}} = A_{\text{q}} C_{0}^{{B_{\text{q}} }} ,$$
(22)
$$k = A_{\text{k}} C_{0}^{{B_{\text{k}} }} .$$
(23)

In which the constants \(A_{\text{q}}\), \(B_{\text{q}}\), \(A_{\text{k}}\), and \(B_{\text{k}}\) could be found by fitting the data to Eqs. (22) and (23). Substituting the equations into Eq. (21) gives:

$$\mathop \sum \limits_{n = 1}^{n} R_{n} = \frac{{S_{\text{t}} }}{{LC_{0} }}\mathop \sum \limits_{n = 1}^{n} \frac{{\left( {A_{\text{k}} C_{n - 1}^{{B_{\text{k}} }} } \right)\left( {A_{q} C_{n - 1}^{{B_{\text{q}} }} } \right)^{2} }}{{1 + \left( {A_{\text{k}} C_{n - 1}^{{B_{\text{k}} }} } \right)\left( {A_{\text{q}} C_{n - 1}^{{B_{\text{q}} }} } \right)t}}.$$
(24)

By using Eq. (24), the total time for the removal of the sorbate to the extent required can be calculated. The minimum contact time can then be found by plotting the total time of the process against the time required in stage 1.

3 Results and discussion

3.1 Equilibrium studies

Table 2 shows the constants of the equilibrium isotherms which have resulted from fitting isotherm equilibrium experiment data to the previously discussed models. The sum of squares of errors (SSE) values were obtained with the aim of minimizing the errors and obtaining the best-fitting curve.

Table 2 Summary of equilibrium isotherm constants for Allura red dye adsorption on the prepared PH-857-H2O

As we can see from Table 2, the SSE of the Langmuir–Freundlich isotherm is the lowest which means it is the best-fitting model. The Langmuir isotherm is also very close. This result is visually shown in from Fig. 2, in which the Langmuir and the Langmuir–Freundlich isotherm curves exhibit suitable fits with data collected from the experiments.

Fig. 2
figure 2

Equilibrium isotherms for Allura red dye adsorption on the prepared PH-857-H2O

It is good to note that the Langmuir isotherm has been derived from the following four assumptions and, at low concentrations, can effectively be reduced to Henry’s Law: (1) Adsorption is localized and occurs at a definite and fixed number of sites; (2) adsorption is monolayer, meaning that each site can hold no more than one adsorbate molecule; (3) all of the adsorption sites are identical and equivalent to each other; and (4) when molecules are adsorbed, they no longer interact, even if they are located on adjacent sites [9]. If the third assumption is not correct and the adsorption sites were not identical/equivalent, then the total adsorbed amount would have to be summed over all the sites. Alternatively, the Freundlich isotherm could be used when an exponentially decaying energy distribution is assumed. As the name implies, the Langmuir–Freundlich isotherm is a hybrid, which assumes the fragmentation of each molecule so that each molecule occupies \(1/t\) sites. It can be reduced to the Freundlich isotherm at low adsorbate concentrations. From the results of the modeling and the visual assessment of the graphs, it is safe to say that the Langmuir isotherm assumptions are relatively true, but since the Langmuir–Freundlich isotherm has displayed the best fit, it will be used for the mass optimization.

The concentration after the first stage, \(C_{1}\), was determined by solving Eq. (14). This can also be referred to as the intermediate concentration. So, the amount of activated carbon required for each stage can be found by using Eqs. (10) and (12). The required amount of activated carbon to reduce the final effluent concentration to 1%, 5%, and 10% of the original concentrations as well as reducing the final concentration to 0.5 ppm, 1 ppm, 2 ppm, 5 ppm, and 10 ppm was investigated. Table 3(a)–(h) shows the summary of the optimized amount of activated carbon required.

Table 3 Minimum total adsorbent mass Ss1 + Ss2 for removal of Allura direct red dye using Langmuir–Freundlich isotherm (a to h)

From the above tables, if we plot the figures of \((S_{1} + S_{2} )\) versus \(C_{0}\), \((S_{1} + S_{2} )\) versus \(C_{1}\), and \(C_{1}\) versus \(C_{0}\) for the adsorption of Allura direct red dye on the activated carbon, we can conclude that the total amount of sorbent needed increases as the value of \(C_{0}\) goes up, and that the relationship is linear. \(C_{1}\) also has a linear relationship with \(C_{0}\). Since the first stage has a larger load in terms of the concentration of the sorbate, and a larger decrease in concentration occurs, it is logical for it to use/require more sorbent than the second stage.

3.2 Kinetic studies

For the kinetic studies, the variables shown in Table 4 are used. Table 5 shows the results of the pseudo-second-order kinetic modeling, and the variation of k and \(q_{\text{e}}\) against \(C_{0}\) is shown in Figs. 3 and 4. As can be seen, with the increase in \(C_{0}\), a decrease in \(K\) and an increase in \(q_{\text{e}}\) is observed. Table 6 depicts the fitting constants as explained in Eqs. 22 and 23.

Table 4 The variables used in contact time optimization analysis for Allura direct red dye
Table 5 Values of \(K\), \(q_{\text{e}}\) and n in the pseudo-second-order kinetic model equation
Fig. 3
figure 3

Variation of \(K\) value versus \(C_{0}\)

Fig. 4
figure 4

Variation of \(q_{e}\) value versus \(C_{0}\)

Table 6 Values used in calculation of contact time optimization with the pseudo-second-order kinetic model

When using the second-order model, the time needed to reach a target adsorption level, \(q_{\text{t}}\), can be derived by rearranging the formula to isolate t on one side:

$$t = \frac{1}{{Kq_{n}^{2} (1/q_{\text{t}} - 1/q_{\text{e}} )}} = \frac{{q_{\text{t}} }}{{Kq_{\text{e}} \left( {q_{\text{e}} - q_{\text{t}} } \right)}}$$
(25)

In this study, eight different scenarios are considered [scenario (a)–(h)] and the time required for each of those scenarios is visually shown in Figs. 5, 6, 7, 8, 9, 10, 11, and 12.

Fig. 5
figure 5

Time optimization for Allura direct red dye with 90% removal (\(C_{0}\) = 10 mg/l) (reduction in the required time from more than 300 min to about 70 min)

Fig. 6
figure 6

Time optimization for Allura direct red dye with 95% removal (\(C_{0}\) = 10 mg/L) (reduction in the required time from 350 min to less than 100 min)

Fig. 7
figure 7

Time optimization for Allura direct red dye with 99% removal (\(C_{0}\) = 10 mg/l) (reduction in the required time from about 450 min to about 120 min)

Fig. 8
figure 8

Comparison of contact time needed for different percentage of removal (\(C_{0}\) = 10 mg/L) (99% removal in about 2 h through optimization of two-stage adsorption)

Fig. 9
figure 9

Time optimization for Allura direct red dye with 90% removal (\(C_{0}\) = 15 mg/l) (reduction in the required time from 400 min to just under 100 min)

Fig. 10
figure 10

Time optimization for Allura direct red dye with 95% removal (\(C_{0}\) = 15 mg/L) (reduction in the required time from above 600 min to about 150 min)

Fig. 11
figure 11

Time optimization for Allura direct red dye with 99% removal (\(C_{0}\) = 15 mg/L) (reduction in the required time from 10 h to about 4 h)

Fig. 12
figure 12

Comparison of contact time needed for different percentage of removal (\(C_{0}\) = 15 mg/L) (99% removal in about 4 h through optimization of two-stage adsorption)

When higher amounts of activated carbon are used, the required contact time will understandably be less. The experimental data confirm this fact. This is also the case when there is a lower initial adsorbate concentration. Again, experimental data confirm this fact. This is because more active sites are available on which adsorption can occur, meaning that under such conditions it is more facile for dye molecules to become attached to the adsorption sites. This leads to a shorter contact time for reaching the target effluent concentration. When the number of sites vastly outnumbers the number of ions needed to be removed, shorter contact times are rational.

If the target effluent concentration is lower (i.e., higher dye removal is required) or if the initial concentration of the dye in the incoming influent is higher, it is obvious that longer contact times would be required. Under such conditions, more sorbent could be used in order to provide more active sites for the adsorption reaction. Hence, a reduction in contact time will ensue. If too little adsorbent is used, the number of active sites may be too low, and therefore, higher removal may never occur. Since initially the rate of adsorption, and hence the rate of dye removal, is rapid, the activated carbon will quickly reach equilibrium and will be unable to adsorb any more dye molecules. Therefore, an important parameter that influences the final percentage of dye removed is the dye to activated carbon ratio.

As per the experimental data, the contact time for the first stage is understandably lower than the second stage. It can be reasoned that since the process occurs with a higher rate (higher concentration difference potential) equilibrium can be reached more quickly, and the required time for the first stage is lower. In the second stage, the concentration potential is low (because it has already been reduced), and hence the rate of adsorption becomes limited by the amount of dye remaining in the liquid phase. This lower concentration leads to a lower rate of adsorption and, subsequently, a longer required contact time.

It should be mentioned that reuse, regeneration, recovery, and desorption of adsorbents is an essential need to make the adsorption process cost-effective and also prevent secondary pollution. Several techniques have been proposed/developed in the literature for reuse, regeneration, recovery, and desorption of adsorbents derived from agricultural waste (including peanut hulls) such as thermal, electrochemical, biological, ultrasonic, and chemical techniques, as well as solvent extraction [36, 37]. Further work on the adsorbent end of life could also provide more insight in this regard.

4 Conclusion

In this work, a series of experimental studies have been carried out for the sorption of Allura direct red dye (R40) onto activated carbon produced from peanut hulls with steam at 857 °C. Two batches of adsorption with filtration between the stages were used for examining the adsorption of Allura red dye on peanut hulls. Such a process, known as a multistage batch process, can increase efficiency, decrease the amount of adsorbent used, and improve the economic feasibility of the process. The prepared adsorbent proved to be very effective at removing the Allura dye. It was observed that the Langmuir–Freundlich equilibrium isotherm model was the best fit for the experimental data. Optimization was carried out for various scenarios, and the optimum amount of activated carbon and the required contact times were found. Ultimately, with an adsorbent loading rate of 1 g/L, it is possible to achieve 99% removal of the dye if adequate contact time is provided. Depending on the removal percent required, it is possible to reduce the amount of residence time by more than 75% via the optimized multistage batch adsorption process.