1 Introduction

Because orange is one of the world’s most abundant fruit crops, it generates large amounts of peel wastes annually [1]. Orange peel occupies almost 50% of the fruit’s fresh weight, and it is rich in essential oils, free sugars, and polyphenols [2]. The uncontrolled disposal of orange peel waste is considered an improper management strategy, affecting the environmental and socio-economic dimensions of sustainability. For instance, the incineration of this waste has been associated with releasing substantial amounts of greenhouse gas emissions [2]. These emissions tend to deteriorate the air quality, causing asthma, lung cancer, and respiratory mortality [3]. Moreover, the open dumping of fruit peels requires a large land area, and its leachate could contaminate groundwater [4]. However, orange peel contains polysaccharides and associated polymers, making it a viable source for green biorefinery–industrial implementation [1]. Hence, more studies are required to manage this fruit peel in a wholesome manner, valorizing agricultural wastes while avoiding undesirable environmental and health concerns.

Recently, several agricultural wastes have been recycled to generate adsorbent materials used for wastewater treatment [5]. The adsorption process tends to uptake various organic and inorganic pollutants, including chemical oxygen demand (COD) [6], dyes [7], dissolved ions, pesticides, and solids [8]. These contaminant species are eliminated from the aqueous solution via multiple adsorption mechanisms such as complexation, ion exchange, pore filling, and electrostatic attraction [9]. For instance, biodegradable natural adsorbents were used to remove toxic anionic dye (methyl orange) via hydrogen and covalent bonding, and the adsorbent reusability scenario was performed for five successive cycles [10]. Because several complex compounds occupy the adsorbent pores and voids, the unmanaged disposal of such adsorbents could impose severe human health risks and environmental damages. Although the adsorption process by biomass wastes has been extensively implemented to treat dye-laden wastewater [7], the safe disposal, reusing, and recycling of exhausted adsorbent are still required.

A proper management of spent adsorbent is strongly connected to the “Zero-waste and sustainability” concept [11]. As such, the spent sorbent could be recycled as agricultural soil amender, biofuel producer, and manufacturing building material (blocks, adhesives, and cement) [12]. Adsorbents synthesized from agricultural wastes, mainly plant residues, include high fractions of cellulose and hemicellulose [13]. These portions could be degraded by anaerobic digestion and converted to biogas [11]. Bioenergy production from biowaste is one of the cheapest, simplest, and most efficient and economic pathways for alternative fuel generation [14]. Under this digestion process, the biosorbent is subjected to anaerobic degradation to hydrolyze the complex organic compounds into simple mono substrates, followed by acetogenesis, and methanogenesis [15]. Brewers' spent grains were anaerobically digested with mesophilic inoculum to generate 26.13 m3 of biogas, which was used as bioenergy to operate the brewing industry [16]. Their study demonstrated that microorganisms in the digester could hydrolysis the organic content of exhausted grains into soluble substrates, acting as an intermediate to accomplish the methane production pathway [16]. Moreover, the anaerobic co-digestion of exhausted sugar beet pulp and animal manure generated 9.16 L bio-CH4, where most of the substrate’s organic matter was converted into methane [17]. Exhausted water hyacinth was also recycled with cow dung in an anaerobic co-digestion process to produce 226 mL CH4/g volatile solids (VS) [18]. Their study showed that the spent biowaste should be regenerated and cleaned to desorb any chemical toxicants or inhibitory compounds that could inactivate the microorganism’s activity used for biogas generation [18]. These previous studies demonstrated that microbial accessibility to the organic substances of spent agricultural wastes could be a promising route for biogas production. However, the digester containing a sole substrate might suffer from unbalanced nutrient composition and volatile fatty acids (VFAs) accumulation [19]. Hence, adding an inoculum such as animal manure to the anaerobic digester would be a reliable route for enhancing the methanogenic activity [20]. Applying anaerobic co-digestion of animal manure with different feedstocks (e.g., lignocellulosic residues) to elevate the bio-CH4 yields has been verified [21, 22].

The resultant digestate after the anaerobic digestion phase includes high concentrations of nutrients, minerals, and partially degraded organics, which should be recycled to obtain valuable products [18]. The utilization of digestate-based products in land fertilization (e.g., enriching the soil with organic carbon), composting (e.g., bio-stabilization), and biochar/hydrochar production has been reported [4]. For instance, a thermal treatment (300–900°C) of anaerobic digestate under an oxygen-limited environment generates a C-rich material known as biochar [23]. Biochar production through digestate pyrolysis could be an attractive and beneficial pathway for industrial, municipal, and agricultural activities. For example, the digestate-derived biochar is characterized by a porous structure (mesopores and macropores), P, K, and other micronutrient enrichment, and a large specific surface area [24, 25]. These features indicate that digestate-based biochar can have many successful applications in biofertilization, energy production, and wastewater treatment.

The orange peel ability to eliminate crystal violet dye from synthetically contaminated solutions, owing to its promising adsorption characteristics, has been demonstrated [2]. Moreover, the recycling and reprocessing of fruit peel to support the 2nd generation biorefinery framework have attracted widespread research interest over the past two decades [12, 26]. According to the aforementioned hypotheses, this study focuses on using agricultural wastes to treat dye-rich wastewater by adsorption, followed by regeneration and recycling of exhausted adsorbent for dual biogas and biochar production. The study’s specific objectives are (i) use orange peel waste to generate plant-based adsorbent applicable for textile wastewater (TWW) treatment, (ii) regenerate the spent biosorbent and use it with cow-manure for biogas production, (iii) convert the digestate into biochar by thermal treatment, and (iv) estimate the economic feasibility of the proposed adsorption/digestion/pyrolysis integrated process.

2 Materials and methods

2.1 Textile wastewater characteristics

The effluents of a textile manufacturing industry were initially diluted at the site and stored in tanks before final disposal. Wastewater was collected from five locations in the tank at different timings and then mixed to form composite samples. The samples were kept in an ice box and transferred to the laboratory for further analysis. The textile wastewater samples mainly contained dyes, dissolved salts, and turbidity (Table 1), which could be appropriately removed via a physico-chemical treatment process.

Table 1 Characteristics of textile wastewater and cow dung inoculum

2.2 Adsorbent preparation from agricultural waste

After juice extraction, plant residues of orange (Citrus sinensis L. Osbeck) peel were collected from the university restaurant. The orange peel represented about 20% (w/w) of the whole fruit. Moreover, it had moisture, volatile, and ash contents of 24.8%, 50.3%, and 6.2%, respectively. This waste was washed and cleaned to remove any dust or particles adhering to the surface. The cleaned samples were inserted in an oven at 100°C for 24 h to obtain dry material, followed by a mechanical grinding process. The orange peel powder (OPP) was then obtained after passing the peels through British standard (BS) sieve No. 200. Biochar adsorbent was prepared by thermally treating agricultural waste under an oxygen-limited environment at 550 °C for 2 h, following the slow pyrolysis process reported previously [27]. An adsorbent was prepared by adding OPP to biochar using a 1:1 (w/w) mixing ratio. Another two adsorbents were prepared from OPP and biochar, respectively, and used to perform control experiments. Similar procedures have been executed to prepare adsorbents from biomass and biochar [11, 28].

2.3 Inoculum preparation from animal waste

Cow dung was collected in 25-L plastic containers from agricultural farming residues and transferred to the laboratory. This livestock waste was kept under an anaerobic environment and fed by substrate (glucose) to reduce the lag phase during experimentation. Before inoculation, cow dung was analyzed for total solids (TS) in an oven at 105 °C for 24 h, followed by burning the sample in a furnace at 550 °C for 1 h to determine the volatile solids (VS) (Table 1) [29].

2.4 Experimental setup

In this study, the orange peel (biomass) conversion strategy was performed in three steps (Fig. 1):

Fig. 1
figure 1

Schematic diagram of the proposed adsorption/co-digestion/pyrolysis system for treating textile wastewater with dual biogas and biochar production

The 1st experiment was conducted to determine the removals of COD, total dissolved solids (TDS), turbidity, and color from textile wastewater. Batch adsorption experiments were performed in Erlenmeyer flasks of 250 mL capacity and operated in an orbital shaker (100 rpm) at 25°C. The adsorbent dosage and treatment time were selected as 1.2 g/L and 30 min, respectively, obtained from primary studies (data not shown). The pollutant removal efficiency was estimated by Eq. 1:

$$R\left(\%\right)=\frac{C_o-{C}_t}{C_o}$$
(1)

where, R(%) is pollutant removal efficiency, and Co and Ct are pollutant concentrations initially and at time (t), respectively

The exhausted adsorbent was investigated for regeneration using different desorbing agents (HCL, H2SO4, and NaOH) at varying concentrations (0.5, 1.0, and 2.0 M). Further, adsorbent reusability was assessed for multiple adsorption/desorption cycles.

In the 2nd experiment, the spent adsorbent material (5 g) was mixed with cow dung (5 g), and inserted in a series of 250-mL serum bottles for biogas production. Additionally, two individual experiments were operated as the control groups using spent adsorbent (10 g) and cow dung (10 g), respectively. The solid phase was completed with distilled water to reach 200 mL, and the bottles were sealed with Teflon-coated butyl rubber septa and crimped with aluminum caps [30]. The headspace (50 mL) was purged using nitrogen gas for 8 min, and the bottles were operated at 35°C and 40 rpm for 28 d as anaerobic digesters. The evolved biogas passed through a NaOH solution (1 M) to remove CO2 and H2S impurities and then quantified using the water displacement method [31]. The bio-CH4 was fitted by the Gompertz model (Eq. 2) for the kinetic study of biogas [32]. The biogas productivity performance of the co-digestion process was compared with mono-digestions using adsorbent and cow dung individually.

$$G(t)=P\bullet \mathit{\exp}\left\{-\mathit{\exp}\left[\frac{R_m\bullet e}{P}\left(\uplambda -\textrm{t}\right)+1\right]\right\}$$
(2)

where, G(t) gives cumulative bio-CH4 (mL) at each time (t in days), the maximum bio-CH4 potential and production rate were expressed by P (mL) and Rm (mL/d), respectively, λ is the lag phase required for microorganism's acclimation (d), and e is Euler’s number constant (2.71828)

The mass balance equation (Eq. 3) was used to determine the fractions of end-products obtained from COD bio-conversion, as previously reported [15, 33]:

$${COD}_{balance}=\frac{COD_{CH_4}+{COD}_{biomass}+{COD}_{soluble}}{COD_{total}}\times 100$$
(3)

where, CODbalance (%), CODtotal (mg/L), \({\textrm{COD}}_{{\textrm{CH}}_4}\) (mg/L), CODbiomass (mg/L), and CODsoluble (mg/L) are the mass balance, initial concentration, bio-CH4 equivalent (1 g COD = 350 mL CH4 or 4 g COD/g CH4, at 55 °C), sludge yield (1.42 g COD = 1 g volatile suspended solids, VSS), and final COD in the soluble form, respectively

The 3rd experiment was performed to ensure the waste management concept by recycling the residues (digestate) of the anaerobic digestion process. The digestate biomass was thermally treated in a furnace under an oxygen-free environment at 600°C for 2 h to obtain biochar [34]. The pyrolysis-inert environment was provided by circulating N2 inside the reactor (2 L/min) at a 100°C/min heating rate.

2.5 Economic indicators

Economic evaluation of the adsorption/co-digestion/pyrolysis combined system was performed to investigate the sustainability and feasibility of the proposed waste management scheme. Capital expenses for the material and equipment were collected from a combination of public sources, companies, and expert opinions [15]. Electricity, chemical, and water consumptions were the main factors used for estimating the operating costs (Eq. 4-6), as previously demonstrated [35].

$${OC}_{elec}= ELEC\times {\textrm{tariff}}_{elec}$$
(4)
$${OC}_{chem}= CHEM\times {\textrm{price}}_{chem}$$
(5)
$${OC}_{wat}= WAT\times {\textrm{tariff}}_{wat}$$
(6)

where, OCelec, OCchem, and OCwat are the operating costs (USD/month) related to the utilization of electricity (ELEC, in kWh per month), chemical (CHEM, in kg/month), and water (WAT, in m3/month), respectively

The profits were obtained from biogas and biochar selling, in addition to pollutants removal from wastewater [18]. The criteria adopted in the economic feasibility investigation were net profit (Eq. 7) and payback period (Eq. 8):

$$\textrm{NP}=\textrm{P}-\textrm{OC}$$
(7)
$$\textrm{PB}=\frac{IC}{NP}$$
(8)

where, NP is net profit (USD/yr), OC is operating cost (USD/yr), P is profit (USD/yr), PB is the time required to recoup the initial cash investment (payback period; yr), and IC is an initial investment (USD)

2.6 Analytical analysis

Wastewater samples were analyzed for COD and other pollutants using a Colorimeter (HACH DR 900 Multiparameter, USA), following previous studies [13, 18, 30] and APHA standard methods [29]. For the solid phase characterization, the adsorbent and biochar (and their related mixes) substances were dried at 105°C for 24 h and then ground into a fine powder. The samples’ surface morphology and main elemental composition were determined by a scanning electron microscope (SEM) (JCM-6000PLUS NeoScope Benchtop, Japan) and energy dispersive X-ray (EDX) spectroscopy (JEOL JSM-6510LV, Japan). Energy-dispersive X-ray fluorescence (XRF) spectrometer (Rigaku NEX CG, Japan) was used for element analysis, with RX9 and copper as secondary targets. The variation of surface functional groups in the 4000–500 cm−1 wavenumber range was examined by Fourier transform infrared (FTIR) spectroscopy (Bruker Optics, ALPHA, Germany). The samples’ minerals and the related crystallinity index (CrI) were analyzed by an X-ray diffraction (XRD) instrument (XRD-7000, Shimadzu, Japan) operated at 40 kV and 30 mA.

3 Results and discussion

3.1 Adsorption for textile wastewater treatment (1st benefit)

3.1.1 Removals of COD, color, TDS, and turbidity by OPP, biochar, and OPP:biochar

Biochar showed the highest COD removal efficiency of 50.22±2.96%, followed by 38.56±1.73% for OPP:biochar, and 35.70±1.65% for OPP (Fig. 2a). An adsorbent with more amino and carboxyl functional groups could form efficient Van der Waals forces and hydrogen bonds with organic compounds in wastewater [36]. Moreover, biochar might contain more positively charged sites that created electrostatic interactions with the negatively charged organic compounds [27]. This value was approximately similar to the COD removal efficiency of 42.06% obtained from treating textile effluents using sugarcane bagasse-based adsorbent at pH 3 within 60 min [28]. Their study demonstrated that the sorbent’s functional groups could adsorb organic molecules through various mechanisms, such as hydrogen bonding, electrostatic attraction, and chelation [28]. However, because of this insufficient COD removal performance, an additional treatment process could be used to meet the environmental discharge regulations. For example, dissolved air floatation was used as a pre-treatment step before adsorption by granular activated carbon, improving COD reduction from landfill leachate by more than 40% compared with the standalone adsorption process [37]. Hence, implementing the proposed adsorption system for tertiary treatment of dye-laden wastewater is further required to satisfy discharge limits. TDS, which is composed of multiple dissolved ions and salts, is another important factor used to evaluate the adsorbent performance [38]. The initial TDS value of TWW was 159 mg/L, which was reduced to 126.4±4.6 mg/L by adsorption onto OPP. The TDS removal efficiencies improved by using the biochar and OPP:biochar adsorbents, giving values of 42.58±2.64% and 29.31±3.15%, respectively (Fig. 2a). Higher TDS adsorption by biochar could be ascribed to its cation exchange ability and hydrophilic surface; i.e., a phenomenon described earlier [39]. In addition to TDS removal, the three adsorbents showed a high turbidity reduction in the 89–95% range (Fig. 2a). The improved turbidity removal could be ascribed to the chemisorption pathway with multilayer adsorption, as expressed earlier [8]. The adsorbents’ ability to remove turbidity is essential for avoiding the development of pathogens in water bodies and the spreading of diseases. The biochar and OPP:biochar adsorbents showed high decolorization efficiencies of 82.96±4.47% and 74.81±3.96%, respectively (Fig. 2a). The adsorbent potentiality to remove the color from wastewater is essential for large-scale applications because various dyes are not readily amenable to biological treatment. Some dyes are removed by adsorption via π−π dispersive force, electrostatic interaction, and hydrogen bridging [11, 40]. Based on the aforementioned observations and due to the biochar porous structure and heterogeneous physicochemical characteristics, biochar maintained the highest treatment performance compared with OPP and OPP:biochar. It is suggested that some physical and thermochemical methods could be employed to enhance the adsorption performance of OPP.

Fig. 2
figure 2

Adsorption in textile wastewater treatment (a) COD, TDS, turbidity, and color removals, (b) OPP:biochar adsorbent regeneration using different desorbing reagents, and (c) OPP:biochar adsorbent reusability for four successive adsorption/desorption cycles. For statistical analysis, different superscript letters denote significantly different values (p ≤ 0.05 using analysis of variance followed by Tukey's honestly significant difference (HSD) post-hoc test)

3.1.2 OPP:BBC adsorbent regeneration and reusability

The ability of exhausted material for regeneration is an essential step, regarding the economic feasibility of wastewater treatment by adsorption. Increasing the molarity of desorbing reagents was associated with releasing more dye molecules from the OPP:biochar adsorbent (Fig. 2b). Both 1 N and 2 N showed approximate color recoveries of 78–79% by HCL, 74–77% by H2SO4, and 60–69% by NaOH. The reusability investigation demonstrated that HCl was the most efficient desorbing agent to quickly release the physisorbed dye molecules compared with the other chemicals used. Shokry et al. [41] also demonstrated that the spent activated carbon would occupy more H+ from the aqueous medium on its surface during desorption by HCl (as an eluent agent). This surface protonation would trigger the cationic exchange of dye ions; hence, the amount of dye desorbed by HCl was greater than that by NaOH and NaCl.

To ensure that the active sites of the spent OPP:biochar could be reused and acquire more dye molecules, the HCl-regenerated adsorbent was examined for 4 successive adsorption/desorption cycles. Increasing the number of adsorption/regeneration cycles from 1 to 4 was associated with color removal reduction from 78.0 to 57.4%, respectively (Fig. 2c). It is supposed that the OPP:biochar adsorbent was losing a considerable portion of its capacity to uptake molecules after each adsorption-desorption cycle. After these 4 cycles, the final effluent contained 56.7 mg Pt Co/L, which could not alter the original properties of the receiving water bodies (below 75 mg Pt Co/L) [42]. Hence, the regeneration and reusability study revealed that the synthesized OPP:biochar could efficiently remove color for 4 successive cycles of adsorption/desorption.

3.1.3 OPP:biochar adsorption suggested mechanisms

The removal of organic matter, color, and turbidity by the adsorption process was further examined by the change of FTIR functional groups. All peak assignments within the 4000–500 cm−1 wavenumber range indicated that the OPP:biochar adsorbent included –OH, –COOH, and C=C groups on its surface (Fig. 3). The FTIR groups related to carboxyl, phenolic hydroxyl, and ether could be ascribed to lignin and cellulose in the plant-based OPP adsorbent [34]. Some FTIR peaks shifted to near locations due to adsorption, while others remained unchanged. For example, the shift in −OH groups could be ascribed to the formation of hydrogen bonds between the adsorbent surface and the dye molecules [38]. Some functional groups, such as −COOH and −NH2, appeared after adsorption, which could be included in the captured organic compounds [43]. The number of peaks located below 700 cm−1 wavenumber could reflect the presence of Si-O (quartz) bonds and siloxane network (Si-O-Si) from the kaolinite [44]. These adsorption peaks, in addition to the C=C shift from 1625 to 1622 cm−1, signify the π-π interaction with pollutants [23].

Fig. 3
figure 3

OPP:biochar adsorbent characterization by FTIR, SEM, and XRF, with suggested adsorption mechanisms

The negatively charged pollutants tend to form ion exchange with the hydroxyl (OH) and nitrate (NO3) ions. The positively charged elements (e.g., cation Na+ atoms) in TWW could bind with the negatively charged functional groups (e.g., –OH, –COO, and –COH) via strong electrostatic attractions. Removing these ions (cation/anion) could justify the TDS reduction from 159.0 to 112.4 ppm. Musa et al. [45] reported that high wastewater TDS with elevated Na+ would increase the positive charges on the adsorbent surface, forming electrostatic interactions with the hydroxyl group of phenol and negatively charged oxygen-containing groups.

The OPP:biochar adsorbent could maintain the pore-filling removal mechanism, assigning to its heterogeneous and relatively porous matrix (SEM observation; Fig. 3). After TWW treatment, the voids of the micropore structure were occupied by molecules related to the organic/inorganic pollutants. A comparable physical morphology was noticed for treating wastewater laden with textile dyes by Aspergillus niger [46], where the adsorbent surface was expanded after the pore-filling pathway. The elemental analysis results also demonstrated the presence of multiple Ca2+, Mg2+, and K+ ions on the OPP:biochar surface (Fig. 3). The presence of the cationic metal components could assist in forming cation-π with the aromatic rings of TWW’s organic pollutants. The XRF elemental composition demonstrated the presence of Si for silicate minerals, complying with the Si–O bending of quartz (Fig. 3). The existence of Si–O–Si and Al–O–Si stretch on the OPP:biochar surface might justify the detection of silicon and aluminum compounds in the XRF analysis. Also, some elements such as Si and S could form negatively charged compounds such as SO3 and SiO32−.

The point zero charge (pHZPC) of OPP:biochar was detected at around pH= 8 (see Supplementary Fig. S1). Because the adsorption process was operated at a pH of 9.4 (greater than pHZPC), the OPP:biochar net surface charge was almost negative. This finding complies with the presence of negatively charged functional groups, such as carboxylate (R–COO ion), NO3, and sulfonate group (R–SO3). Accordingly, the uptake of cationic-based pollutants would be favorable under the investigated condition.

3.2 Biogas production (2nd benefit)

The suitability of utilizing the organic fraction of the regenerated adsorbent for biogas production under an anaerobic digestion condition was investigated. Hence, the adsorption process was followed by co-digestion of OPP:biochar (substrate) and cow dung (inoculum) compared with adsorbent mono-digestion and cow dung mono-digestion.

3.2.1 Fitting bio-CH4 to Gompertz model

The modified Gompertz model was used to fit the cumulative biogas productivity and determine the kinetic variables of the digestion process. This sigmoidal curve (Fig. 4a) could describe biogas production as a function of microbial growth [18]. Bio-CH4 estimation by the modified Gompertz model showed a strong relationship with the experimental data, representing goodness-of-fit (R2) around 0.97. The results in Fig. 4(a) demonstrated that adsorbent mono-digestion maintained biogas production of 166.87±9.61 mL with an extended λ of 9.30±0.54 d. Adding cow dung to the digestion process improved this cumulative bio-CH4 by 67.8%, reaching 280.06±16.72 mL. Srisowmeya et al. [47] demonstrated that using cow dung for co-digestion with rice wastewater elevated the biogas productivity by 58.69%, probably due to increasing the medium buffering capacity and improving the nutrient balance in the culture medium. The cow dung mono-digestion group maintained the highest total bio-CH4 production of 323.29±18.31 mL with the shortest λ= 8.20±0.49 d (Fig. 4b). Shortening the time taken to produce biogas for this group indicated that anaerobes were able to quickly acclimatize to the cow dung-associated environment. This pattern could be justified by increasing the COD consumption rate (k1) to 0.149±0.007 1/d, compared with 0.113±0.005 1/d for sorbent and 0.130±0.005 1/d for sorbent/cow dung co-digestion. Biogas generation from the co-digestion of vegetable peels with cow dung was also described by the Gompertz relation, giving 2040 mL (cumulated CH4 volume), equivalent to 170.0 mL/g VS [48]. Biogas production from rice wastewater/cow dung slurry co-digestion was properly described by the Gompertz model, giving 24.53 mL CH4/g VS [47]. The kinetic parameters estimated from the Gompertz model could be further used to design an optimal biogas plant.

Fig. 4
figure 4

Anaerobic co-digestion of adsorbent and cow dung for biogas production (a) Gompertz model fitting with bio-CH4 production, and (b) estimated Gompertz model parameters

3.2.2 COD mass balance

The conversion of total CODinitial into bio-CH4 and end-products showed a mass balance between 84% and 87% (Table 2). It is assumed that some fractions of CODinitial, such as substrate stored in biomass cells, CH4 dissolved in the medium, and non-degraded organic matter [49], could not be detected in this COD mass balance formula (see Eq. 3). This COD mass conversion was comparable with 85.7–87.8% [18] and 84.1–94.5% [30] for biogas production from exhausting water hyacinth biomass and petrochemical/domestic wastewater, respectively. The accurate COD mass balance is suitable for efficiently monitoring the anaerobic digestion system. The highest bio-CH4 productivity of 417.9±22.9 mL/g VS was found for the mono-digestion run with only cow dung. This finding could be ascribed to sufficient organic electron donors availability, given by the highest CODinitial of 1275±65 mg. Also, this group contained the highest VSS amount of 658±37 mg, which could be converted into biogas. Similarly, Saleem et al. [14] found that the VSS fraction in microalgae was converted to 47.27–53.10 L CH4 due to the degradation of the solids content. The highest CODsoluble/CODinitial of 31.3±2.1% for the adsorbent group could be attributed to the excessive accumulation of organic acids during anaerobic mono-digestion. In particular, some soluble organic compounds were converted into volatile fatty acids (VFAs), increasing the CODsoluble fraction; i.e., a pathway that was also reported for the anaerobic digestion of sugarcane vinasse [33]. This condition suppresses the methanogenic activity, properly justifying the lowest biogas productivity of 258.2±13.6 mL/g VS (Table 2). The three digesters showed a reasonable COD reduction within the 68.2–71.8% range; however, the adsorbent mono-digestion group might have suffered from medium acidification. Cow dung was also used to maximize the biogas productivity from co-digestion with corn husk, representing a synergistic effect to degrade lignin in the co-substrate content [50]. The CH4/CODinitial percentages were 14.3±1.1% for adsorbent/cow dung co-digestion and 14.0± 0.9% for cow dung mono-digestion (Table 2). This finding suggests that the co-digestion process enhanced the CODinitial conversion into CH4 compared with the mono-digestion systems. Awosusi et al. [21] also found that the synergistic effect of food wastes/cow manure co-digestion reduced the acidification issue, providing a suitable environment for acetogenesis and methanogenesis. Karmee [51] also found that spent coffee grounds contained lipids, carbohydrates, and C- and N-related compounds that could be converted to valuable biofuels (biodiesel, biochar, bioethanol, bio-oil, and biogas). Spent tea waste was anaerobically co-digested with cow manure for obtaining biogas, equivalent to 1.77 mL/g VS [22]. Their work [51, 22] demonstrated that generating biogas by either biogenic wastes or renewables aims at achieving the targets of SDG7 “Affordable and Clean Energy.” Hence, the current study revealed that the co-digestion of the exhausted adsorbent (after TWW treatment) and cow dung would produce bio-CH4 of 258.5±13.7 mL CH4/g CODinitial, equivalent to about 73.9% of the theoretical value (350 mL CH4 /g COD).

Table 2 COD mass balance for anaerobic co-digestion of adsorbent and cow dung

3.3 Digestate biochar characterization and functions (3rd benefit)

To minimize the waste disposal issue, the anaerobic digestate was collected from the digester bottle and subjected to pyrolysis. Biochars obtained from the pyrolysis of the adsorbent, adsorbent:cow dung (mixed), and cow dung digestates were noted as ADB, MDB, and CDB, respectively.

The ADB sample showed the highest BET surface area of 78.8 m2/g and Vtot of 0.99 cm3/g (see Supplementary Fig. S2; Table S1). This BET surface area was slightly larger than 63.5 m2/g for biochar obtained from the pyrolysis of wheat straw, which was used to reduce chlorpyrifos from aqueous solutions [52]. Moreover, the pore structure of digestate biochar was considerably greater than 3.94 m2/g for biochar of poultry litter [53]. Their study suggested that biochar synthesized at a pyrolysis temperature of 500 °C would be suitable for carbon sequestration and various environmental applications [53]. Hence, further investigations are required to determine the optimum pyrolysis temperature and activation strategy for increasing the biochar’s BET surface area. These physical properties corresponded to the smallest pore diameter of 8.1 nm, compared with 9.4 nm for MDB and 10.7 nm for CDB. Parthasarathy et al. [54] also demonstrated that plant wastes would generate biochar with porosity and a surface area greater than the animal manure-based biochar. It’s proposed that animal manures are rich in nutrients susceptible to volatilization by thermal treatment. Plant-based residues primarily comprise cellulose, hemicelluloses, and lignin, forming biochar with a well-organized pore structure [55].

The XRD peaks in Fig. 5(a) were used to estimate the biochars crystallinity index (CrI). The highest CrI of 67.0% was noticed for ADB, followed by MDB (58.2%) and CDB (50.6%). The three biochar samples exhibited two major XRD peaks at ~ 26° and ~ 29°, corresponding to graphite (002) plane and the crystalline structure of calcium carbonate (CaCO3), respectively [56]. However, the intensities of these characteristic peaks for ADB were higher than that for MDB and CDB. As such, ADB could compress greater distinct inorganic elements and their formed crystals. Apparently, pyrolysis of feedstock was responsible for enriching the samples with quartz and calcite as mineral phases.

Fig. 5
figure 5

Characterization of biochar derived from digestates of adsorbent and cow dung (a) XRD, and (b) SEM

The SEM micrograph of ADB showed a well-arranged morphology, compared with the presence of deformation bands, cracks, and cavities in the CDB micro-pores (Fig. 5b). Apparently, the pyrolysis temperature imposed a greater thermal effect on the CDB amorphous pore texture, which could be the reason of the increased pore size and decreased BET surface area (see Supplementary Fig. S2; Table S1). Although the pyrolysis process tended to decompose the lignocellulosic components of digestates and release volatiles, ADB showed a more ordered, intact, and crystalline structure than CDB.

ADB showed the highest SiK and CaK elemental composition (see Fig. 5b), validating that this biochar material comprised the sharpest XRD crystalline peaks at 2θ ~ 26° and ~ 29°. It was previously demonstrated that increasing Ca (in calcite) and Si (in quartz) for biochars could be accompanied by increasing the crystalline mineral phases [57]. Accordingly, the ADB’s cellulose mainly consisted of a crystalline (ordered) region, which could be ascribed to the removal of the amorphous domain under thermal treatment [26]. On the contrary, the CDB’s cellulose was more amorphous. It was also reported that some enzymes, such as cellulase in the cow manure inoculum, could be responsible for degrading the crystalline cellulose portion [20]. This finding could justify the detection of more voids and cracks in the CDB’s SEM image, probably because the solubility of amorphous cellulose is comparatively easier than that of crystalline cellulose.

The digestate-based biochar indicated that ADB had a larger surface area with a greater number of adsorption sites and could resist chemical and biological degradations; whereas, the thermal treatment of CDB mainly transformed the crystalline cellulose to the amorphous. Accordingly, the biochar obtained from the plant feedstocks could have an efficient adsorption capacity towards wastewater treatment (e.g., limiting the migration of pollutants in soil). However, the manure-based biochar could be used as a nutrient-rich fertilizer, encouraging the fulfillment of SDG2 “Zero Hunger” by improving the agricultural practices. This finding could be justified by the presence of more N elements of 12.85% in CDB, compared with only N of 0.85% in ADB (see EDX elemental composition in Fig. 5b). However, the real application of digestate biochar for removing various pollutants from wastewater still needs to be assessed.

3.4 Project profitability

The current study demonstrated that OPP could be mixed with biochar for preparing an adsorbent able to reduce TWW pollution; then, the spent material could be regenerated and utilized for dual biogas and biochar productions. The expenses of this approach (Table 3) cover the capital costs required to install the adsorption tanks (70 USD), anaerobic digester (90 USD), and thermal treatment unit (40 USD). It also included a mixer to dissolve chemicals/reagents in TWW, a heater to adapt the digester temperature, a pump to lift the wastewater, and piping and fitting expenses. Hence, the capital cost of the adsorption/digestion/pyrolysis scheme maintained the maximum value of 1460 USD (Table 3), which was greater than scenario-1 (adsorption) and scenario-2 (adsorption/digestion) by 4.6- and 1.2-times, respectively. The lowest capital cost of scenario-1 (320 USD) was ascribed to the simple installation of eight adsorption tanks (6 L each) with pressure sensors to monitor the fluidization behavior. These tanks were designed to treat about 276 m3/month, using 4 adsorption/regeneration cycles with an adsorption time of 30 min per cycle (see Supplementary Tables S2 and S3). The operating cost of scenario-3 was also maximized to 370 USD/month, assigning to the electricity consumption for raising the digester temperature and thermal treatment of the digestate (i.e., 3100 kWh per month × 0.05 USD/kWh). The chemical utilization cost was included in all scenarios due to the application of desorbing reagents for sorbent regeneration, as well as the nutrient and buffering additives consumptions. This pathway was equivalent to the utilization of 607 kg reagent per month in scenario-3, with a unit price of 0.14 USD/kg, giving a monthly cost of 85 USD. The profitability estimates included pollution reduction, equivalent to revenue of approximately 0.16 USD for removing 1.0 kg COD from the aquatic environment. This shadow price reflects the protection of human health and improved environmental quality and performance [3]. In scenario-1, the adsorption process eliminated a COD mass of about 298 kg/month, corresponding to a monthly income of 48 USD. Another profit was estimated by selling the biogas evolved from the digesters, using the COD mass balance (CH4 as COD/CODinitial= 14.3%; equivalent to 1655 L/month) and biogas price of 0.2 USD per L (see Supplementary Tables S4 and S5). Biogenic CO2 emitted by biogas anaerobic digestion would contribute to carbon footprint reduction and energy supply decarbonization [18]. Hence, the carbon credit was estimated from CO2 emission (kg/d), based on the volume of biogas generated (m3/d), CH4 content in biogas (60%), CH4 density (0.657 kg/m3), and CO2 equivalent (= 25 for CH4). Biochar production of 28.8 kg/month was multiplied by the unit price of 0.9 USD/kg, adding a profit of 26 USD/month to the scenario-3 cash flow. Accordingly, the maximum profit was obtained by scenario-3 (564 USD/month), followed by scenario-2 (452 USD/month) and scenario-1 (48 USD/month). The economic feasibility of the three scenarios was expressed by the project payback period, calculated from a capital cost/net profit. This time reached 7.5 yr in scenario-3 and 8.9 yr in scenario-2; whereas scenario-1 was economically infeasible. By assessing the cash flow of the three scenarios, biochar selling would recover the funds invested in purchasing extra facilities for the project. Moreover, a shorter project payback period would be expected due to recycling the exhausted adsorbent for dual biogas and biochar production.

Table 3 Profitability estimation for the proposed integrated system, Scenario 1 (adsorption); Scenario 2 (adsorption/digestion); Scenario 3 (adsorption/digestion/pyrolysis)

4 Conclusions

The current study successfully represented a sustainable and viable strategy for managing the spent biosorbent after treating dye-laden wastewater. The plant-based adsorbent was synthesized from agricultural waste (orange peel) and used to reduce COD, TDS, turbidity, and color concentrations from aqueous solutions. The exhausted biosorbent was recycled as a substrate in a biological treatment system to generate bioenergy, reducing biogenic waste disposal. The spent biosorbent was added to cow manure in an anaerobic digester to generate bio-CH4 of 411.5±21.7 mL/g VS, equivalent to 73.9±3.6% of the maximum theoretical value. The study also provided a viable option to avoid the disposal of the digested substrate (digestate) from this biogas digester. The digestate was thermally pretreated to prepare biochar, having a 9.4 nm pore diameter and 67.5 m2/g surface area. The proposed adsorption/digestion/pyrolysis combined scheme was economically feasible with a payback period of 7.5 yr to recover the project’s initial investment. Selling the biogas and biochar would recover the funds invested in purchasing the project facilities. Although the current study addressed the sustainability and economic feasibility of the adsorption process in TWW treatment followed by biogas/biochar production, some points should be considered in future studies (i) apply thermal, mechanical, and/or chemical treatments to OPP:biochar for enhancing its adsorption properties, (ii) investigate the applicability of orange peel-related adsorption as post-treatment after bioprocesses, (iii) determine the optimum biosorbent-to-cow dung ratio to maximize biogas productivity with efficient and feasible operating conditions, (iv) investigate the generated biochar for food production in the agricultural fields and explore the biochar-soil interactions, and (v) determine the toxic and heavy metal constituents of generated biochar for selecting the most suitable option for biochar recycling.