Biochar and Energy Production: Valorizing Swine Manure through Coupling Co-Digestion and Pyrolysis

Anaerobic digestion is an established technological option for the treatment of agricultural residues and livestock wastes beneficially producing renewable energy and digestate as biofertilizer. This technology also has significant potential for becoming an essential component of biorefineries for valorizing lignocellulosic biomass due to its great versatility in assimilating a wide spectrum of carbonaceous materials. The integration of anaerobic digestion and pyrolysis of its digestates for enhanced waste treatment was studied. A theoretical analysis was performed for three scenarios based on the thermal needs of the process: The treatment of swine manure (scenario 1), co-digestion with crop wastes (scenario 2), and addition of residual glycerine (scenario 3). The selected plant design basis was to produce biochar and electricity via combined heat and power units. For electricity production, the best performing scenario was scenario 3 (producing three times more electricity than scenario 1), with scenario 2 resulting in the highest production of biochar (double the biochar production and 1.7 times more electricity than scenario 1), but being highly penalized by the great thermal demand associated with digestate dewatering. Sensitivity analysis was performed using a central composite design, predominantly to evaluate the bio-oil yield and its high heating value, as well as digestate dewatering. Results demonstrated the effect of these parameters on electricity production and on the global thermal demand of the plant. The main significant factor was the solid content attained in the dewatering process, which excessively penalized the global process for values lower than 25% TS.


Introduction
The production of biogas by anaerobic digestion and its subsequent valorization either into electricity or up-grading, via gas clean-up technologies followed by injection into the natural gas grid, makes this process a key biological conversion technology. Anaerobic digestion is a process by which microorganisms biodegrade organic matter in the absence of oxygen through four key steps: Hydrolysis, acidification, acetogenesis, and the final conversion of acetic and hydrogen gas into methane and carbon dioxide.
The versatility of this process makes it a good candidate for integration into different types of waste treatment scenarios, whereby co-digestion of locally available substrates lends itself to effective waste treatment on a proximity basis, i.e., as close to the point of origin as possible. Anaerobic digestion is a mature technology for treating a wide variety of organic wastes, such as agricultural biowastes and animal manures [1]. The process can act as a full circular economy technology in bioproduction, has a key role in residual waste valorization and production of energy, and can be easily incorporated into the biorefinery concept [2]. It can drastically reduce greenhouse gas (GHG) emissions compared to fossil fuels by the use of locally available resources and the substitution of mineral fertilizers when nutrients are recovered from the process [3].
The utilization of biomass for obtaining valuable products in the form of chemicals or energy has led to the development of biorefineries. In particular, the conversion of lignocellulosic biomass into this type of new refinery process seems to be the most promising because of their lack of competition with food supplies and animal feedstuffs [4]. The complexity of many processes dedicated to the transformation of organics results, in many cases, in higher demand of energy, which should be supplied by collateral streams coming from the process itself, or from additional units that can become part of this valorization chain. Therefore, energy production from biogas valorization plays a driving role when considering its inclusion into the biorefinery scheme.
Digestion is a conventional technology widely applied for treating animal manure. However, biogas yields tend to be low when treating only manures. Nutrient imbalances are also a recurrent problem due to an excessive content of N [5]. There is also an extensive land area requirement for the final disposal of digestates along with the spreading of the ammonia-rich liquid fraction, which may pose a barrier to further implementation of this technology. Uncertainty regarding the market availability for utilizing digestates can sometimes prevent technology implementation. Despite these challenging aspects, anaerobic digestion is still considered a promising technology, particularly in the agricultural sector [6]. Several alternatives for boosting biogas production are currently available, with options including co-digestion with a high organic content stream, integration into a biorefinery scheme using side-streams as co-substrates, pre-treatment of substrates for improving degradation rates, and the development of high loading reactors, amongst others [7][8][9].
Biogas is frequently valorized in combined heat and power (CHP) units for the production of electricity and heat. The profitability of these plants is usually associated with the market price of electricity, the potential of using the extra heat produced to improve overall efficiency, the quality and availability of local organic resources [10], and the accessibility of fiscal subsidies when all these previous factors are insufficient for attaining economic feasibility on their own [11].
Co-digestion with agricultural residues has been studied with successful results, reporting a significant increase in biogas production and improved stability of the process attributable to preventing the accumulation of volatile fatty acids (VFAs) and ammonia inhibition [12,13]. The utilization of wastes for producing bioenergy seems an ideal sustainable option if biodiversity and social safeguards are also put in place. Thus, their development and wide implementation as part of the waste technology landscape should receive priority [14]. However, the presence of lignocellulosic material in agricultural wastes poses challenges to this process due to the recalcitrant nature of lignin, which can result in lower biogas yields than expected when evaluated in terms of the organic loading rate of the feed, and the need of operating at a higher solid content. This requires novel process configurations as is the case for a high solid content and solid-state digestion [15,16]. The high availability of lignocellulosic biomass, combined with the fact that it does not ethically compete for land dedicated to food production, makes this organic material an ideal candidate for enhancing and optimizing digestion performance.
The use of lignocellulosic biomass as a co-substrate may lead to a significant increase in the volume of digestate needing final disposal, since a substantial amount of fibrous materials may not be converted during this process. As a result, the already critical problem of finding enough cropland available for spreading this organic amendment could be exacerbated by higher bulk production. Additional difficulties can arise from ammonia volatilization, nutrient runoff, and nitrous oxide emissions, which all require active management, because digestates pose a higher NH 3 emission potential than animal manures and slurries [17]. Transport costs can also be a burden, which should be added to GHG emissions during storage. Consequently, further research on alternative valorization is needed to identify a feasible solution. Amongst these valorization options are the recovery of nutrients from digestates by using this liquid effluent as nutrient media for microalgae cultivation or as culture media for plant growth-promoting microorganisms [18][19][20]. Another promising alternative that is less well established is the thermal post-treatment of the solid fraction for producing charred materials [21,22].
Carbon materials present a wide applicability, with much literature published that demonstrated their performance as adsorbents for a great variety of compounds [23,24]. Biochar is produced from the pyrolysis (300-900 • C) of biomass, in which moisture, volatiles, and most of the non-carbon hetero-elements are removed, resulting in a carbon-rich material [25]. This material can find direct application in several processes as support media for biomass growth and enhancing microbial performance [26,27]. This carbon material can be further transformed through an activation process to improve the adsorption properties, leading to the conversion of char into activated carbon [28]. The properties of the activated carbon thus produced are greatly influenced by the conditions of the activation process [29].
The integration of anaerobic digestion and pyrolysis is a type of cascade biomass valorization scheme that would solve the challenge of digestate management whilst increasing the sustainability of the whole integrated process by producing a higher amount of biofuels (pyro-gas and bio-oil) [30]. Pyrolysis products are a supplementary energy source that can be further converted into heat and electricity using cogeneration units. This extra generation of heat and power through the thermal conversion of waste materials can contribute to economic sustainability in the agro-industrial sector [31] whilst enhancing the overall process efficiency.
The production of char and its different applications has been extensively studied in recent years based on its great potential to sequester carbon and improve fertility following soil application [32]. There are also several agronomic benefits, including improved cation exchange capacity, water retention, mitigation of N 2 O emissions, and leaching of nutrients [33][34][35]. However, biochar application to soils is not free of controversy due to potential adverse effects related to the presence of polycyclic aromatic hydrocarbons (PAHs) and volatile organic compounds (VOCs), which can exert a negative effect on plant productivity and soil community [36,37].
Several innovative applications have also been studied for the use of activated carbon, and the development of new carbon materials with biomedical and industrial applications [38][39][40]. Recent interest has been focused on the effect of carbon-conductive materials on digestion performance, where it has been proven to increase biogas yields and enhance the activity of methanogenic microbial communities [41][42][43].
In this manuscript, the performance of anaerobic digestion followed by pyrolysis of digestates was evaluated for three different scenarios conceived to produce char and biofuels for electricity production once the on-site thermal demand is fully met. An energy balance was carried out for evaluating three process configurations, considering the digestion of swine manure as the main substrate and crop wastes and residual glycerine as co-substrates. Energy performance was evaluated under the premise that the full thermal needs of the plant are covered by the process itself, i.e., without having to import any additional energy. The effect on the global process of bio-oil yields and its energy content was estimated considering the valorization of digestion gas and pyrolysis fuel products by means of a combined heat and power (CHP) unit.

Description of Studied Scenarios
Scenarios considered the valorizations of swine manure using lignocellulosic biomass and residual glycerine as co-substrates. The focus was set on the improvement in energy performance when pyrolysis products-gas and oil-are used for covering thermal needs for drying digestate. Scenario 1 considers the digestion of swine manure as a single substrate. The biogas obtained is valorized by means of a CHP unit. Digested material is dewatered and dried prior to its introduction into the pyrolysis reactor. Pyrolysis gas is assumed to be valorized in combination with digester biogas. Bio-oils are intended for use as diesel fuel substitutes, but when thermal needs are not completely fulfilled, then its use for producing heat is assumed to divert to meet the thermal needs for drying digestates. Char is produced as a marketable product.
Scenario 2 considers co-digestion with crop residues as lignocellulosic biomass (maize, rapeseed, and sunflower wastes) and the subsequent pyrolysis unit is dedicated to the thermal conversion of digestate containing this recalcitrant lignocellulosic material. The final use of pyrolysis by-products is kept the same as in scenario 1. Scenario 3 considers the addition of residual glycerine derived from biodiesel production as a co-substrate for increasing the organic load of the digester and boosting biogas production. The subsequent pyrolysis stage is dedicated to the treatment of digestate and production of pyrolysis products. A schematic representation of the different scenarios is shown in Figure 1. biogas. Bio-oils are intended for use as diesel fuel substitutes, but when thermal needs are not completely fulfilled, then its use for producing heat is assumed to divert to meet the thermal needs for drying digestates. Char is produced as a marketable product. Scenario 2 considers co-digestion with crop residues as lignocellulosic biomass (maize, rapeseed, and sunflower wastes) and the subsequent pyrolysis unit is dedicated to the thermal conversion of digestate containing this recalcitrant lignocellulosic material. The final use of pyrolysis by-products is kept the same as in scenario 1. Scenario 3 considers the addition of residual glycerine derived from biodiesel production as a co-substrate for increasing the organic load of the digester and boosting biogas production. The subsequent pyrolysis stage is dedicated to the treatment of digestate and production of pyrolysis products. A schematic representation of the different scenarios is shown in Figure 1.

Assumptions for Materials and Scenarios
Swine manure was assumed to be the main feedstock for anaerobic digestion. A total solid (TS) content of 63.4 g/L and volatile solid (VS) content of 41.5 g/L were selected from reported values by Cuetos et al. [44] and Fierro et al. [45], and an average methane yield of 330 L CH4/kg VS.
For lignocellulosic biomass, different authors have reported biogas yields obtained from codigestion with manures. Fujita et al. reported a value of 210 L CH4/kg VS when treating swine manure and corn-stover [46]. Co-digestion of manure and wheat straw was studied by Fischer et al. [47] and Lehtomäki et al. [48], who reported values in the range of 210-240 L CH4/kg VS. In the same order of magnitude, Comino et al. [49] reported values for the co-digestion of crop silage and manures in the range of 237-249 L CH4/kg VS. Using these data, a mean value of 227 L CH4/kg VS was assumed with a solid content of 652 g TS/kg and 593 g VS/kg [44].
The characteristics of residual glycerine to be used as co-substrate in scenario 3 were based on those reported by Fierro et al. [45], with a TS content of 787.6 g/kg and VS content of 761.4 g/kg. These

Assumptions for Materials and Scenarios
Swine manure was assumed to be the main feedstock for anaerobic digestion. A total solid (TS) content of 63.4 g/L and volatile solid (VS) content of 41.5 g/L were selected from reported values by Cuetos et al. [44] and Fierro et al. [45], and an average methane yield of 330 L CH 4 /kg VS.
For lignocellulosic biomass, different authors have reported biogas yields obtained from co-digestion with manures. Fujita et al. reported a value of 210 L CH 4 /kg VS when treating swine manure and corn-stover [46]. Co-digestion of manure and wheat straw was studied by Fischer et al. [47] and Lehtomäki et al. [48], who reported values in the range of 210-240 L CH 4 /kg VS. In the same order of magnitude, Comino et al. [49] reported values for the co-digestion of crop silage and manures in the range of 237-249 L CH 4 /kg VS. Using these data, a mean value of 227 L CH 4 /kg VS was assumed with a solid content of 652 g TS/kg and 593 g VS/kg [44].
The characteristics of residual glycerine to be used as co-substrate in scenario 3 were based on those reported by Fierro et al. [45], with a TS content of 787.6 g/kg and VS content of 761.4 g/kg. These authors also reported the volumetric productivity of the reactor at 1.2 L CH 4 /L d associated with a specific methane production of 423 L CH 4 /kg VS when feeding a mixture of glycerine and swine manure of 6% (v/v) [45].
The waste treatment facility had an annual capacity of 14,000 m 3 of swine manure. This value was estimated based on 5000 units of live animals with an average weight of 120 kg per unit. Manure production was 19.2 kg/d for 454 kg of live animal with a content of 95 g TS/L [50]. The volume of swine manure thus produced was then adjusted to the solid content assumed for the calculations. Reducing the solid content of the influent stream was justified due to the cleaning operations in livestock farms, which dilute the available solid concentration of the final influent. When assuming the co-substrate addition, the maximum concentration of solids of the feeding influent to the reactor was assumed to be 14% to adjust to the technical requirements for low to medium solid content reactors. The basic assumptions regarding the digestion reactor are presented in Table 1 where the main characteristics of the feeding substrate in scenarios 2 and 3 are indicated. The available material as crop-residue was estimated based on the average yields of maize, rapeseed, and sunflower cultures. A yield of 9 t/h was determined for maize, with corresponding values of 2.2 for rapeseed and 1.5 for sunflower assuming medium agricultural yields [51]. The average residue to crop ratio was assumed as 1.0 for maize crops and 1.5 for rapeseed and sunflower cultures. To keep within sustainability guidelines, only 60% of the total residue amount was assumed to be available for co-digestion, leaving the remaining 40% to be incorporated into the field as a measure for returning organic matter back into soils. Furthermore, 27% was considered as the proportion between cultivated area to total area in Europe. A tortuosity factor of 1.6 was used for estimating the transport distance.

Basic Plant Description
Model evaluation was carried out for a standard mesophilic (37 • C) digestion plant comprising a waste reception area for storing manure deposits, anaerobic reactors with ancillary equipment, and the addition of a pyrolysis unit to this installation for thermal treatment of digestates. The addition of co-substrate implies the availability of this material (lignocellulosic biomass or residual glycerine) in close proximity to the treatment plant. The anaerobic digester produces biogas that accumulates at the head of the reactor. A basic cleaning system is usually available in these reactors to remove condensates and sulfide previous to the valorizations in CHP units. The thermal requirements of the digester are met by heat recovery from the engine.
The digester effluent contains microbial biomass and a recalcitrant fraction of organic material that is resistant to anaerobic degradation. The solid content in this effluent was calculated considering that biogas was exclusively derived from the conversion of incoming VS. Inorganic solids were assumed constant during biological transformation. The digestate stream is dehydrated by the use of a rotary press attaining a solid content of 25% after water removal. Digestate drying occurs prior to introduction into the pyrolysis reactor, which transforms the solid material into three main products: Pyrolysis gas, bio-oil, and biochar.
The production of biogas reported at a standard temperature and pressure (STP, 0 • C, 100 kPa) was calculated as: where B is the biogas production expressed in m 3 /d, F v is the volumetric flow of the feeding stream to the digester (m 3 /d) with a volatile solid content denoted as VS inlet (g/L), SMP is the specific methane production (L CH 4 /kg) of the substrate, and %CH 4 is the content of methane in biogas assumed in this case to be 60%. The daily electricity production (kWh) was calculated using: where F represents the fuel volumetric flow, which corresponds to the sum of gaseous fuels (biogas from the anaerobic digester and pyrolysis gases from the thermal pyrolysis unit) and bio-oil as liquid fuel, thus considering the use of a dual-diesel engine capable of operating on gas and liquid fuels. The low heating value (LHV) of methane was 35.8 MJ/m 3 and η E represents the electrical efficiency for the CHP unit. The total efficiency of this unit was assumed as 85% [52], with the efficiency of electricity generation being set at 34% to take into account the small scale of the plant. The thermal energy needs for maintaining the digestion temperature were estimated by using the monthly average temperature of a local area characterized by continental weather. The average temperature of the influent feeding stream was assumed to be 6 • C in winter and 18 • C in summer. The heating needs of the digester were calculated based on: where Th dig is the thermal energy needed for increasing the slurry temperature (T slurry ) to 37 • C (temperature of the mesophilic digester, T dig ). The mass of the slurry to be heated was m, and for simplicity, the heat capacity was assumed to be that of water (c p , 4.2176 kJ/kg K). To account for thermal losses, this value was increased by 4% in summer and 12% in winter periods. The theoretical calculation of the energy demand for drying digested sludge was estimated by assuming dehydration at a 75% water content and continuing drying until a value of 10% was achieved. The energy demand for drying was calculated applying a thermal efficiency of 75%. The heat of vaporization of water was 2345.4 kJ/kg at 65 • C. To take into account that the binding energy of bound water (sum of surface and extracellular water) is much higher than that of free water [53], the energy demand for drying was increased to 20%. The energy associated with transporting materials was calculated for a 40-t truck with fuel consumption set at 0.02 L/km t at 80% load [54].
The integration of anaerobic digestion and pyrolysis has as a major weakness regarding the energy demand associated with digestate drying. In this methodology, this was considered the key point in deriving necessary energy from exhaust gases and the primary cooling system from the dual-fuel engine. When additional thermal energy was to be supplied, then this energy was provided by the exhaust gases of an auxiliary burner using bio-oil as the main fuel, and pyrolysis gases as auxiliary fuel.
The amount of energy consumed by the burner was obtained by an iterative procedure equating the energy demand of the rotary dryer and that available from the engine and the burner. The efficiency of the burner was established at 98%. When the total amount of energy supplied from bio-oil and pyrolysis gases was insufficient for the drying process, biogas consumption in the burner was assumed to supply additional heat.
The pyrolysis yields were 34.2% of char, 55.7% of bio-oil, and 10.1% of pyrolysis gas. These values were based on data reported by Monlau et al. [10] and Titiladunayo et al. [55]. It was also considered that the water content of bio-oils was 52% based on the study performed by Abnisa et al. [56] and Mullen et al. [57]. The energy requirements for maintaining the thermal demands of the pyrolysis process were assumed to be 1.8 MJ/kg feed [58].
The high heating values (HHVs) of pyrolysis combustible products were obtained as mean values from those reported in the literature, 34 MJ/kg [31,59,60]. The low heating value (LHV) used for calculation was estimated assuming a 5.5% content of H in bio-oil [10]. The LHV of pyrolysis gas used for estimating energy production was based also on the value reported by Monlau et al. [10] with 15.7 MJ/m 3 used as the molecular weight from this gas the one reported by (16.1 g/mol) Özbay and coworkers [61].

Sensitivity Analysis
Results regarding the main energy thermal needs and production of electricity were obtained for the three scenarios. Sensitivity analysis was performed for winter conditions for those scenarios having higher thermal needs and being unable to cover the thermal energy by exclusive use of the CHP unit, needing a supplementary auxiliary burner. Parameters evaluated were the yield and HHV of bio-oil and water content of dewatered digestate. The energy performance of these scenarios was evaluated using a central composite design, where factors selected were evaluated at 5 levels and codified using the maximum axial value of 1.682 (−1.682, −1, 0, 1, 1.682). The central point for the bio-oil yield was 37% and axial points were placed at a real distance of 8 units. HHV of bio-oil was 34 MJ/kg for the central point and real values corresponding to the axial point distance were 3 units apart. For the third factor, the solid content of dewatered digestate, the central point was 25%, having as the distance to the axial point a value of 5 units. Multiple regression analysis was performed (using OriginPro 2015) to evaluate the response for the quadratic polynomial function. The responses selected were the daily electricity production and energy demand of the burner and that associated with sludge drying: Y = β 0 + β 1 X 1 + β 2 X 2 + β 3 X 3 + β 12 X 1 X 2 + β 13 X 1 X 3 + β 23 X 2 X 3 + β 11 X 1 2 + β 22 X 2 2 + β 33 X 3 2 . (4)

Economic Analysis
Economic analysis was performed for the results obtained from scenario 2 and scenario 3 regarding the conditions associated with the central point. To evaluate the economic feasibility of the integrated approach, the net present value (NPV) and internal rate of the return concepts were used as evaluation criteria. NPV was calculated as the sum of expected cash flows measured in today's currency considering a discount rate (r) of 3%: where TCC is the total capital cost of the investment for the digestion and pyrolysis plant. The capital investment for the digestion plant was estimated based on Gebrezgabher et al. [62] and Naqi et al. [63]. The six-tenth rule was applied to estimate costs at an average treatment capacity of 15,000 t/year. Capital investment for the pyrolysis plant was estimated using data provided by Carrasco et al. [64] for an average treatment capacity of 900 t/year (dry matter). CF is the cash flow expected at time t and was calculated as the difference between revenues and all quantities representing expenditures.
A construction period of the plant of 2.5 years was assumed. The straight line depreciation method was used for a 15-year period with a salvage value of 5%. The average lifespan of the plant was 30 years. Money disbursement was distributed in three years, with 20% the first year, 60% the second, and the remaining quantity the third year. The working capital was considered to account for 5% of TCC and the operating capacity of the plant was assumed to be 40% in the first year of operation, increasing to 70% the following, and reaching 100% operability in the fifth year after construction was initiated.
Operating and maintenance costs were estimated as 1.5% of TCC. Labor costs were estimated as 2.5% of TCC. Feedstock price in the case of scenario 2 using crop wastes was assumed to be 10 US$/t. For residual glycerine, a price of 13.5 cUS$/L was considered. Transport costs were assigned a price of 25 cUS$/t km.

Digester Performance
One of the main disadvantages of valorizing swine manure by anaerobic technology is the low productivity of the reactor, which has a close relationship with the organic loading rate. Based on assumptions, a theoretical biogas production of 872 m 3 /day was obtained for the digestion of manure using the specific methane production assumed for this substrate. In this case, an average farm of large dimensions was assessed to reflect the technical feasibility of a centralized waste treatment installation. However, the economic benefit of these types of facilities depends essentially on the distance between the centralized biogas plant's location and multiple waste stream sources [65].
Increasing the organic load to the digester increases its productivity thanks to a greater availability of material. The addition of an agronomic co-substrate, like those considered in the present evaluation, results in a lower biogas yield than that of the single substrate. However, operating at a higher solid content (14%) in the feed compensates for a decrease in gas productivity. The expected biogas production with the addition of co-substrate was 1500 m 3 /day in spite of the lower degradability of the feed thus prepared. This increment compares favorably when considering scenarios 1 and 2. The use of a lignocellulosic substrate, which is characterized by an important fraction of material not being accessible to the anaerobic microflora, causes a decrease in the global efficiency of the system, although a significant increase in the organic loading rate (OLR) to the reactor compensates this effect.
In scenario 1, the digestion of swine manure was evaluated at an OLR of 1.5 kg VS/m 3 day, whereas this value increased to 2.4 kg VS/m 3 day when the addition of agronomic waste was assumed. The selection of co-substrates is crucial when considering the productivity of digestion facilities. It is evident that the use of different co-substrates with higher biogas potential would lead to better results. However, the availability of these materials is not always possible based on plant location. Maize silage has a methane yield of 327 L CH 4 /kg VS [66]. If this value is taken for comparison, then using the same assumptions, the expected gas yield would be as high as 328 L CH 4 /kg VS for the feeding mixture. Therefore, the daily production of biogas expected (assuming an 80% conversion of the organic material into biogas) would be 1700 m 3 biogas/day. This result highlights the relevance of selecting a readily degradable co-substrate for favoring biogas production. Table 2 shows the main parameters estimated from the expected reactor performance.
Due to a higher organic loading being introduced into the reactor, a greater amount of solid was expected to accumulate in the digester and thus in the effluent stream. This particularity causes an incremental change in the energy needed for mixing reactor liqueur and in the amount of sludge requiring final disposal. In the present study, this first aspect was not evaluated and is a recommended subject for future research.
There is a great need for recovering nutrients from organic materials. The use of sludge or digestates as an organic amendment presents several challenges associated with the amount of available land for controlled sludge spreading. During winter months, when soil activity is low and rainy periods are frequent, a surplus of digestate accumulates, without a route for final disposal.
The removal of solids from the effluent digestate stream allows for the separation of these materials into two valuable fractions. When separation is performed using a rotary press, a 25% content of solids is to be expected in the dewatered fraction. However, the liquid stream still needs a disposal outlet as it may be in cropland irrigation or final treatment using artificial wetlands. The addition of a co-substrate in scenario 2 considers agronomic wastes. Due to their low biodegradability under anaerobic conditions, the increase in organic loading causes a greater amount of sludge. In this case, sludge production more than doubled compared to digesting swine manure as the sole carbon source. Another relevant factor that should be considered in the case of co-digestion with crop residues is seasonality to maintain an all year-round supply. To cover a supply of 1250 t/year, an average territory of 18 km 2 is necessary considering a mixture of co-substrate composed of 50% of maize residues and 50% of rapeseed and sunflower. The high productivity of maize crops positively affects the plant balance, reducing the distance required for supplying biomass waste. However, if a lower proportion of maize is used, this impacts on transportation costs and therefore the distance necessary to cover for collecting the needed amount of agricultural wastes. Thus, a proportion of 25% of maize residue in the co-substrate mixture would account for a 27% increase in the area necessary for covering the supply of raw material, resulting in an increased maximum collection distance by 12.8%.
If residual glycerine is used as co-substrate, the productivity of the digester is effectively increased without significantly affecting the amount of sludge requiring disposal. Due to its high specific methane production, when evaluating co-digestion with glycerine at 6% (v/v) content in the mixture, the expected production of biogas rises to a value of 3270 m 3 /day (1960 m 3 CH 4 /day) for similar values of OLR applied to the digester. Another significant advantage is that the volume of residual glycerine needed is much lower than the amount of crop residues needing transport to the treatment facility. Thus, an approximated mass of 2875 kg/day of residual glycerine would be necessary to supply plant needs, which translates into 1050 t per annum. However, in the case of crop residues, where plant supply was based on reaching a maximum value of 14% of solid content in the feed stream, the amount of material to be supplied to the plant is 1250 t per annum. Therefore, the transportation needs will be affected because, in addition to the greater amount of sludge needing final disposal in scenario 2, a greater amount of crop material needs to be collected. This material has a lower packing density, so the number of transport journeys is significantly increased. The energy associated with the use of diesel fuel for transportation would account for 1600 MJ/day, for a crop density of 400 kg/m 3 and covering an annual distance of 500 km for collecting this material.
Using residual glycerine to enhance biogas production can affect the quality of digestate. Reports by Fierro et al. [45] and González el at. [67] suggest that organic stability is negatively affected. Alburquerque et al. [68] evaluated the agronomic characteristics of different digestates, indicating that the use of this material exerted negative effects on soil properties when their organic content is characterized by high biodegradability. If digestates are to be obtained from reactors with short retention times, as would be the present case, its use as an organic amendment is inadvisable, unless an extended period of stabilization is applied [45]. Therefore, the need for alternative management options for valorizing this material, such as coupling with a pyrolysis unit, is highly desirable.

Valorization of Digestates by Pyrolysis
The agronomic valorization of digestates can be a sustainable option when sufficient agricultural land is available near the treatment facility. The organic quality of this material must also be adequate so as to avoid uncontrollable degradation of organics on soil and negatively effects on indigenous microflora. If these conditions are not met, valorizing digestates may become highly problematic due to the limited possibilities of using it as raw material for other processes. Thermal conversion by pyrolysis offers the advantage of energy recovery along with the production of biochar, a by-product experiencing an increased demand in recent years. Conventionally, implementation of pyrolysis technology for treating waste has been cost prohibitive in most situations.
The integration of a pyrolysis unit for the valorization of digestates sets additional energy requirements associated with dewatering and drying. Thus, the addition of crop wastes as a co-substrate increases the amount of solids that remain undegraded by the anaerobic microflora affecting the consumption of energy necessary for the removal of water. This energy demand more than doubles in scenario 2, having the greatest amount of digestate production.
The coupling of two processes when one of them is based on wet conditions and the subsequent one on dry conditions negatively affects the energy balance. The amount of thermal energy available from the valorization of biogas may be far lower than the value needed for operating the drying unit. As an example, when treating swine manure as a single substrate (scenario 1), the available thermal energy accounts for 9560 MJ/day whereas the energy demand of the drying drum is set as 15,900 MJ/day. Scenarios 2 and 3 follow a similar trend, but the results show a higher thermal demand in the drying process. If the thermal energy demand for digestate drying is met by the use of greenhouse solar dryers (GSDs), then a significant increase in energy output could be attained since pyrolysis products would be completely dedicated to electricity production. However, GSD need a large area to be available in the vicinity of the plant, and performance of these installations is highly affected by climatic conditions [69]. An average time of 7-12 days is needed for drying sludge in the summer period, increasing to 9-33 days in autumn [70]. The greenhouse area needed for achieving the drying of sludge may be estimated using an average factor of 0.6 m 2 /t year, based on the size and treatment capacity of GSD located in Marrakech, Morocco (drying surface of 40,320 m 2 and treatment capacity of 75,000 t/year) and Palma de Mallorca, Spain (drying surface of 20,000 m 2 and treatment capacity of 30,000 t/year) [71]. Therefore, scenario 1 would need 1340 m 2 for the installation of a GSD system, whereas this value increases approximately to 3000 m 2 for scenario 2. In addition to the excessive amount of land needed for this type of drying system, special consideration should be given to possible concerns raised by the population regarding odor problems. GSD should be considered an ideal technology for sludge drying, allowing significant reductions of the energy demand of the treatment plant for locations with favorable climatic conditions and suitable land availability. Table 3 shows the yields obtained from the different pyrolysis products in each scenario evaluated. The amount of solids available for subsequent treatment in the pyrolysis unit will directly impact on the volumetric production of pyrolytic products. Scenario 2, having the greatest production of digestate, provides the greatest amount of energetic products and this is also true for the amount of biochar obtained, therefore being the most favorable case if char production is to be optimized. The available energy associated with gas and oil products is also presented in Table 3. The data take into account the meeting of the thermal energy demand of the digester and that for digestate drying. The energy requirement in the summer period for scenario 1 can be supplied from a dual burner using bio-oil and pyrolysis gas as the main fuels. This energy is obtained from the use of the total amount of bio-oil produced and, whenever necessary, from the use of a fraction of pyrolysis gases. In this scenario, in the case of the summer period, pyrolysis oils have enough energy to compensate for the thermal demand of the plant. Thus, only 50% of the bio-oil is consumed in this burner.
The electricity produced by the CHP unit considering the additional supply of pyrolysis gas and bio-oil as fuel would be 44% higher when compared with the single valorization of digestion gas. Table 4 shows the energy demands and electricity production of the different scenarios under different seasonal conditions. When evaluating winter conditions, the thermal balance presents a worse performance, but even in this case, the bio-oil available from pyrolysis is capable of supplying the extra amount of energy needed. Therefore, in this case, the whole valorization of pyrolysis gas can be carried out using a CHP unit and 17% of the energy in oil. Table 4. Energy demand and electricity production from biofuel valorization by the use of a CHP unit. Scenario 2 presents the advantage of producing more energetic products but also has a penalty associated with the thermal needs of the plant. Thus, to meet the energy demand of the drier, the total amount of bio-oil needs to be supplied to the burner along with an additional amount from pyrolysis gases during the winter period. For summer conditions, the energy in boi-oil was sufficient to cover the energy demand for operating the burner, whereas, for the lower temperature conditions, 17% of the pyrolysis gas needs to be diverted to cover thermal needs, thus reducing the amount of electricity produced. However, under these conditions, the amount of energy associated with the transport of crop residues was not covered by pyrolysis products. Scenario 3, on the contrary, largely due to the higher methane yield of the co-substrate fed into the digester, reports a much better performance. The CHP unit produces enough thermal energy to meet the drying requirements. In addition, most of the residual glycerine is transformed into biogas, leading to an insignificant amount of solid remaining in the digester liqueur (inorganic solids). Some of this residual glycerine may be adsorbed onto biosolids or remain on the centrate, but for simplicity, the remaining solids were assumed to be derived from digested sludge and inorganic material.

Scenario
The amount of electricity that can be produced in this scenario is 7142 kWh/day, with this value being 33% higher when compared with the case of exclusive valorization of digestion gas. In this case, for summer and winter periods, having different thermal needs, the energy requirements are fully covered by the CHP unit, with no need for any additional equipment to supply extra heat. This feature makes the results for both temperature conditions equivalent in terms of electricity production. In fact, there is an exceedance in the amount of thermal energy form valorizing all energetic products (digestion gas and pyrolysis products) in a CHP unit. This excess of heat accounts, on average, for 41,000 MJ/day. When considering the amount of energy associated with the transport of residual glycerine to the plant, this value accounts for 5160 MJ/day assuming a 50-km distance to the collection point. This energy demand can be easily met by bio-oil produced from the pyrolysis unit.

Sensitivity Analysis
Based on previous results, scenario 3 produces enough energy derived from the single valorization of biogas to cover thermal needs during summer and winter periods. However, in the case of the other two scenarios, the performance was conditioned to the exterior temperature, needing the use of an additional burner to supply extra heat. Therefore, some of the energetic products should be used exclusively for supplying heat and were not available for producing electricity. Table 5 shows the responses obtained for the different combinations when evaluating the three factors considering the worse external temperature conditions (winter period).  Table 6 shows the parameters obtained for the two responses selected in scenario 1. The response representing electricity production showed an acceptable value of R2 but the data are too dispersed, thus R 2 adj has a value lower than 0.7. However, what is inferred from the model is that the main factor affecting plant performance was the operating conditions of the dewatering unit, having a high value for the principal effect and a p-value lower than 0.05. Conversely, the response representing the heat supplied to the burner also has, as significant factors, quadratic terms associated with the three factors evaluated. Table 7 shows the results from scenario 2. In this case, the data showed a worse fit to the proposed model but kept the trend of having as a significant factor the amount of water to be removed prior to digestate drying. Both cases studied have similar trends for the two responses evaluated, thus in Figure 2, just the surfaces obtained for scenario 1 are represented. Given the high dispersion of data, these curves represent the surface obtained from the matrix interpolation to facilitate visualization. Table 6. Parameters of the polynomial model from multiple regression fitting for scenario 1. Electricity production and energy supplied to the burner to cover the thermal needs for sludge drying are the responses represented.  Given that the energy demand for drying digestates is the main factor having significance on the response, the representation of the single effect of this parameter is shown in Figure 3. The dispersion of the data was high; however, the polynomic trend can be clearly observed when the solid content of dewatered digestate is evaluated. In this case, the graph shows the behavior obtained for scenario 1 and the polynomic curve representing this trend. Obtaining a dewatered digestate with solid contents higher than 25% is a relevant aspect that highly impacts on the global performance of the treatment plant.

Economic Analysis
Anaerobic digestion has been demonstrated to be a robust technology for the treatment of different organic wastes. However, this technology is still expensive when global valorization of all side-streams is intended. Thus, the conversion of digestate into valuable pyrolysis products seems a reasonable choice, as shown by different authors when evaluating the feasibility of pyrolysis as the final treatment option of microbial processes [72,73], but the costs of implementing this technology either as a stand-alone configuration or along with other technical options is still too high. Piñas et al. [74] demonstrated that biogas plants presented viability for electrical power higher than 740 kWe The penalizing effect of diverting pyrolysis products and using a portion of digestion gas to supply energy to cover the heat demand of the global process is easily observed from the inverse trend shown on these two graphics. Electricity production impacts the thermal balance, since the energy contained in the fuel being consumed by the engines is partially recovered as heat. However, when thermal energy needs to be mainly supplied by the burner, electricity production is significantly affected. For this reason, the curves present an opposite trend but do not quite have an inverted shape, due to the effect of heat recovered from the engines.
Given that the energy demand for drying digestates is the main factor having significance on the response, the representation of the single effect of this parameter is shown in Figure 3. The dispersion of the data was high; however, the polynomic trend can be clearly observed when the solid content of dewatered digestate is evaluated. In this case, the graph shows the behavior obtained for scenario 1 and the polynomic curve representing this trend. Obtaining a dewatered digestate with solid contents higher than 25% is a relevant aspect that highly impacts on the global performance of the treatment plant. Given that the energy demand for drying digestates is the main factor having significance on the response, the representation of the single effect of this parameter is shown in Figure 3. The dispersion of the data was high; however, the polynomic trend can be clearly observed when the solid content of dewatered digestate is evaluated. In this case, the graph shows the behavior obtained for scenario 1 and the polynomic curve representing this trend. Obtaining a dewatered digestate with solid contents higher than 25% is a relevant aspect that highly impacts on the global performance of the treatment plant.

Economic Analysis
Anaerobic digestion has been demonstrated to be a robust technology for the treatment of different organic wastes. However, this technology is still expensive when global valorization of all side-streams is intended. Thus, the conversion of digestate into valuable pyrolysis products seems a reasonable choice, as shown by different authors when evaluating the feasibility of pyrolysis as the

Economic Analysis
Anaerobic digestion has been demonstrated to be a robust technology for the treatment of different organic wastes. However, this technology is still expensive when global valorization of all side-streams is intended. Thus, the conversion of digestate into valuable pyrolysis products seems a reasonable choice, as shown by different authors when evaluating the feasibility of pyrolysis as the final treatment option of microbial processes [72,73], but the costs of implementing this technology either as a stand-alone configuration or along with other technical options is still too high. Piñas et al. [74] demonstrated that biogas plants presented viability for electrical power higher than 740 kWe when treating a single substrate, and higher than 1000 kWe for the co-digestion case when analyzing the Brazilian scenario.
In the present evaluation, when considering the integration of anaerobic digestion and pyrolysis, the capital investment costs shown in Table 8 were excessive. The high initial capital investments of these plants act as the main disincentive resulting crucial the application of subsidies [75]. Therefore, a subsidy accounting for 50% of TCC was assumed for calculating NPV. For the performance conditions regarding the central point (with a content of 25% of TS for dewatered sludge), a positive value of NPV was achieved (211,566 US$) when the selling price of electricity was 30 cUS$/kWh for scenario 2. The char selling price was fixed at 200 US$/t, although this product presents high variability in prices based on the quality achieved. Campbell et al. [76] report prices in the range of 100-13,000 US$/t. However, in the present evaluation, a conservative value of 200 US$/t was assumed. When conditions regarding the best operating results are evaluated for this scenario, then a positive value of NPV is obtained at a selling price of electricity of 19 cUS$/kWh, thus making it unfeasible in any case the market of this electricity unless additional fiscal incentives are provided. Scenario 3 is highly penalized by transport costs and the price of residual glycerine. The analysis was initially performed by a distance to the collection point of 50 km as described in the previous section when evaluating the energy demand for fuels. However, under this assumption, transportation costs would make this scenario completely unfeasible. The economic analysis was then evaluated using a distance of 25 km. With this second assumption, a positive NPV was obtained if the selling price of electricity was higher than 26 cUS$/kWh. For all cases evaluated, economic feasibility was not achieved at reasonable electric prices. The constant need for subsidies of this type of technology makes further research regarding process optimization imperative so that the valorization of organic wastes into energy becomes feasible. An acceptable value of about 15% for the internal rate of return was attained if the char selling price was set at 540 US$/t and the electricity selling price was kept at 26 cUS$/kWh in scenario 2, whereas scenario 3 was not capable of reaching this value even if the glycerine price dropped down to 5 cUS$/L under the same assumptions. The integrated scenario of combining the digestion and pyrolysis processes was capable of increasing the yield of electricity production and may represent a feasible technical solution to waste management. However, the economic aspects are clearly discouraging.
The energy produced from renewable sources when analyzing the best case of scenario 2 (dewatered solids with 28% TS content) is equivalent to reducing CO 2 emissions in 670 t CO 2 /year when a factor of 0.296 kg CO 2 /kWh is assumed [77]. Emissions associated with the transport of feedstock, considering just crop wastes, accounts for 39.2 t CO 2 /year when a conversion factor of 3.08 kg CO 2 /L diesel fuel is used for the calculus [78], thus not having a significant penalizing effect on carbon emissions. Conversely, glycerine used as co-substrate results in similar values of daily electricity production (7142 kwh) when compared with the best case of scenario 2. Thus, CO 2 emission substitution accounts for 772 t CO 2 /year but transport emissions decrease this value by 63.6 t CO 2 /year, when a distance to the collection point of 25 km is used. Therefore, if the operating conditions are optimized, the performance of scenario 2 is the best strategy if economic aspects are also considered.

Conclusions
The performance of an integrated approach for valorizing biomass and selected organic wastes was studied considering the thermal needs of the process. Combining digestion and pyrolysis for the production of char as marketable products and electricity was demonstrated to be a feasible option after an evaluation of the technical aspects. The use of agricultural wastes as co-substrate in a digestion reactor increased biogas production and also produced higher char yields when compared with the digestion of swine manure. However, the greater amount of undigested material requiring drying prior to conversion into a pyrolysis unit greatly penalized this scenario. Reducing the water content before the drying operation is crucial to attain a successful global performance. Increasing the solid content in the dewatered digestate to 28% significantly increased the electricity yield, thus making this scenario the best strategy when the economic aspects are also evaluated.
The use of residual glycerine as a co-substrate was demonstrated to be the best option on an electricity production basis. The highly biodegradable nature of this residue and subsequent high methane yields resulted in significant production of biogas. Furthermore, this scenario was not penalized by a high digestate production, which has a negative impact on the energy balance. However, when considering economical aspects, the feedstock price and transport costs negatively affect this scenario, becoming inadequate in terms of recovering the invested value. The combination of processes requires careful evaluation to find the optimal solution regarding the technical and energetic aspects for sustainability and technological decision-making.