1. Introduction
In recent decades, the amount of urban solid waste has increased due to population growth, rapid industrialization and urbanization, increased standards of living, and the consumer-based nature of society. Therefore, it is necessary to manage this growing amount of waste, as poor solid waste management is responsible for approximately 5% of greenhouse gas emissions worldwide and the incidence of several diseases [
1,
2]. Traditional waste treatment methods, such as landfills, dumps, and waste incineration, are still the most used worldwide. According to ABREMA (2024) [
3], in 2023, 58.5% of Brazilian municipal solid waste was sent to sanitary landfills, while 35.5% was disposed of in dumps. At the same time, the need for land availability close to cities continues to grow, and so does the demand for electrical energy.
Access to electrical energy is related to access to services and consumer goods and is fundamental to eradicating poverty [
1] (SDG—01). As a consequence, the use of waste for energy production has become an increasingly popular alternative through various technologies, including pyrolysis, gasification, incineration, and anaerobic digestion [
4]. The infrastructure for collecting and disposing of MSW (municipal solid waste) is significantly lacking in poorer countries due to the high costs of the local administration exploring better disposal methods [
5,
6].
In particular, anaerobic digestion is an alternative that presents relatively low initial investment and space requirements [
7]. Anaerobic digestion has several advantages for biogas production. It is considered one of the most efficient processes for bioenergy production (SDG-06), has the potential to reduce greenhouse gas emissions (SDG 11 and 13), and the byproduct digestate has potential as a biofertilizer [
8] (SDG-02), decreasing regional demand for mineral fertilizers with a high amount of GHG emissions in its production. Compared to thermochemical technologies, e.g., pyrolysis, incineration, and gasification, anaerobic digestion presents an advantage as it simultaneously recovers energy in the biogas form and recycles nutrients through the production of digestate, which is a biofertilizer used after pre-treatment that does not involve considerable energy consumption, such as the drying process required for other waste treatment options [
4]. Furthermore, biogas also offers the advantage of decentralizing energy supply, as waste is available domestically and often locally. Thus, biogas can also reduce emissions throughout the supply chain, both from the point of view of energy supply and waste treatment [
9]. According to D’Aquino [
1], a decentralized approach to producing biogas from the Organic Fraction of Municipal Solid Waste (OFMSW) is an affordable initiative to reduce costs and GHG emissions of landfills and dumps. The purpose is to maximize the integration of the produced energy into the regional matrix, which is considerable and usually treated as waste. In terms of exergy efficiency, it recovers more exergy than other types of bio-energy paths, and supports the rational use of energy and waste, aiming at a circular economy with minimal losses [
1].
Anaerobic digestion can be carried out with different substrates, such as agricultural and urban waste. Urban solid waste has a high carbon, nitrogen, phosphorus, and potassium content, demonstrating its potential for producing bioenergy and biofertilizer [
10]. Biogas is composed of CH
4, CO
2, and other gases in smaller quantities. After the process of biogas purification, which produces biomethane, it is equivalent to natural gas. Compounds removed include (H
2O), carbon dioxide (CO
2), hydrogen sulfide (H
2S), nitrogen (N
2), oxygen (O
2), carbon monoxide (CO), ammonia (NH
3), volatile organic compounds (VOCs), siloxanes, hydrocarbons and aromatic compounds, and halogenated compounds [
11].
The composition of biogas depends mainly on the substrate used; the amount of methane is higher for a higher fat content [
12]. Furthermore, anaerobic digestion is influenced by several parameters such as temperature, pH value, carbon/nitrogen ratio (C/N), hydraulic retention time (HRT), particle size, organic loading rate, inoculum, agitation, ammonia, and water content [
13]. The treatment of biogas, usually to obtain biomethane, allows this new byproduct to be used in other applications in producing electrical energy as raw material for producing other chemical compounds [
14]. Therefore, it stabilizes the energy supply, balances fluctuations caused by intermittent renewable networks, and reduces the carbon footprint [
15].
Due to its great potential for energy generation, several studies in the literature address anaerobic digestion as an alternative for energy generation. For example, the article by [
16] provides an energy and economic analysis comparing the use of natural gas and biogas as fuel in a cogeneration system for Brazil and Italy. The results showed that the energy efficiency of the natural gas system is practically the same as that of the biogas system, but economically, using biogas is cheaper than using natural gas from the distribution network. The work of [
17] also compares biogas and natural gas use for energy generation. In turn, the work by [
18] analyzes a system of cogeneration of electrical and thermal energy using biogas as fuel.
These studies, however, carry out analyses that consider only the first law of thermodynamics. A problem with this approach is that it does not consider the difference between different types of energy and does not consider quality losses in energy conversion processes since the first law is conservative. The need arises to use a method that also considers the second law of thermodynamics and, therefore, considers the present irreversibilities. An alternative is exergy analysis, which quantifies the quality of the different energy transfers involved and evaluates different energy transformations. The quantification of the quality of energy becomes even more important in more complex processes, as exergy analysis can help identify inefficiencies and, consequently, facilitate the optimization of processes [
7].
According to Soltanian et al. [
2], in waste treatment methods, exergy analysis has been used more for thermochemical processes (such as gasification and incineration) than for analyzing biological processes. Some studies use the exergy analysis method with biogas as fuel, such as Xydis et al. [
19] and Mudasar et al. [
20], who calculated the exergy efficiency of a biogas and heat cogeneration system in a landfill and evaluated a biogas-powered Rankine cycle, respectively. Other studies, such as those by Gao et al. [
21] and Yagil et al. [
22], focus on optimizing energy generation using biogas. Barati et al. [
23] present an exergy analysis of a digestion plant whose products were electrical energy and biofertilizer. Ref. [
17] also focuses on a cogeneration plant but from the perspective of energy, exergy, and exergoeconomic analysis of scenarios with different proportions of natural gas and biogas.
There is a prominent trend in the literature toward energy generation, with little detail on anaerobic digestion itself. Thus, this work aims to analyze thermodynamically, through the second law of thermodynamics, an operating bioenergy and biofertilizer plant whose products include biogas (and/or biomethane and carbon dioxide), electrical energy, heat, and biofertilizer. A distinct feature of this article compared to the literature is that exergy analysis shows each energy stream on the same thermodynamic basis and capability to perform work, hence being a more precise tool in cogeneration systems with different qualities of energy, e.g., the exergy of heat, the exergy of electrical energy, and chemical exergy of biogas.
2. Methods
The plant studied is the Bioenergy and Biofertilizer Plant, installed at the Institute of Energy and Environment (IEE) of the University of São Paulo, Capital Campus. The plant consists of 3430 m
3 tanks, with a capacity to process 20 tons of waste per day. The plant processes food waste from the Capital Campus and also receives waste generated outside the university campus; in addition to the available electrical power of up to 75 kW (one ICE), it also features a power system based on food waste and pruning, with a cogeneration unit. The flow chart of the main processes present in the plant is given in
Figure 1.
Furthermore, the hypotheses considered for this work are as follows:
The anaerobic digestion reactions are considered in only one step (we did not model the kinetics of the reactions);
The electric energy consumption by the pumps was not considered;
Permanent processes;
The kinetic and gravitational energy terms were considered negligible;
The environment has a temperature of 298.15 K and a pressure of 101.325 kPa;
The substrate and digestate are at room temperature and pressure and, therefore, do not have physical exergy;
Biogas is basically composed of methane (CH4), carbon dioxide (CO2), ammonia (NH3), hydrogen sulfide (H2S), and water (H2O) and behaves like a mixture of perfect gases;
The digester and heat exchanger are adiabatic;
The internal combustion engine (ICE) temperature is 220 °C [
24];
The ICE efficiency for electric energy generation was 33.5%, and for the heat in the exhaustion gases, it was 32.7% [
25];
A limiting factor of 80% was considered for the production of biogas [
26].
The generation data and operation conditions are available in
Table 1. It is possible to assess the amount of water in the residue, the power input of the agitators (each tank has one), the dehumidification process, and the desulfurization technique; finally, the pump’s power was considered negligible compared to the agitators.
Data on waste composition were obtained by elemental analysis using the Perkin Elmer 2400 Series II. The data of
Table 2 are based on the waste of the University of São Paulo restaurants that serve breakfast, lunch, and dinner to the community. The plant team was taught how to separate organic and non-organic waste to feed the biodigester. The samples were collected weekly for 8 months (between November 2016 and June 2017). The analyses occurred every 5 weeks, and the accumulated waste samples (a total of 5 L) were analyzed. Further information on the method and procedure to obtain these parameters can be found in [
27].
The composition of the fertilizer compounds based on nitrogen, phosphate, and potassium (NPK) present in the digestate was obtained based on the average operation conditions of the plant in 2023; it is given in
Table 3. The sampling procedure consisted in the collection of 5 L of digestate from three different sampling points in the same biodigestor tank. The three samples were then combined for analysis. In total, nineteen samples were analysed in the period. Further information on the method and procedure to obtain these parameters can be found in [
28]. There are no data regarding the composition of these compounds in the residues (substrate); for simplicity, the assumption is that there are no changes between the number of moles of these compounds in the substrate and the digestate since these compounds are relatively stable in the anaerobic digestion process. Data on the waste composition obtained by elemental analysis of the waste used can be viewed in
Table 2.
The potential for biogas production can be calculated using the method given in [
29], where the overall reaction is available in Equation (
1), where the transformation of the organic compound into biogas (methane and carbon dioxide) is indicated. Since the objective of this work was to quantify the biogas exergy, it was considered that the specifics of the reaction were not necessary and, thus, the kinetics of the reactions were not modelled.
This reaction was later modified by [
30], who added sulfur and nitrogen content. In this study, the biogas produced was estimated based on the biogas production potential of the substrate used according to Equation (
2) and considering a limiting factor of substrate biodregadation of 80%.
Exergy analysis evaluates the quality of an energy conversion process. It gives real irreversibilities when one or more products are available (cogeneration) since it compares the energy (chemical, mechanical, internal) on the same thermodynamic basis, which is the capacity to perform work. Equation (
3) shows the exergy analysis with heat transfer rate (from the control volume at
to the environment at
) and performed power (
). The exergy flow rate is obtainable from the combination of the first and the second laws of thermodynamics
, where
, according to Equation (
4), where the physical content of a stream at
P and
T is compared to the properties of the substance in the environment (
and
).
The last term of the exergy of a flow (
) is the chemical share. The standardized chemical exergies of the compounds were obtained according to the tabulated exergies calculated using the methodology given in [
31]. These values are presented in
Table 4.
The chemical exergy of solid waste was calculated based on Equation (
5) developed by [
32] to estimate the chemical exergy of mixed waste based on its chemical composition.
Thus, the calculation of the chemical exergy of the substrate (Equation (
7)) and digestate (Equation (
8)) produced is the sum of the chemical exergies of the compounds weighted by the number of moles of each compound, according to Equation (
6), where
is the mol fraction of the substance in the liquid solution and
is the coefficient of activity. Because the digestate has low exergy content compared with the rest of the exergy streams, this last term is negligible, representing only 0.0026% of the total exergy of the digestate.
Similarly, the chemical exergy of the biogas produced can be calculated using Equation (
9), where
is the mole fraction in the gas phase.
Since C, H, O, N, and S correspond to carbon, hydrogen, oxygen, nitrogen, and sulfur, respectively, in % by mass. The total exergy of a stream (B in kJ) can be calculated as the sum of physical ( in kJ) and chemical exergy ( in kJ): .
The adopted model is a simplification of the anaerobic digestion process with urban solid waste from the Bioenergy and Biofertilizer Plant in IEE/USP. As can be seen in
Figure 2, the biogas produced generates electrical energy and enthalpy of the flue gases in an internal combustion engine. The cogeneration system maintains the tanks in mesophilic (35 to 40 °C) and thermophilic (50 to 70 °C) conditions to improve the production rate of biogas depending on the type of organic matter in the digestate. This cogeneration may make the bacterial culture viable in certain climate conditions or winter. Moreover, another generator for future expansion is to reduce the amount of water in the digestate by using the thermal exergy of the exhaust gases. EES software [
33] was used to calculate and obtain thermodynamic properties and to solve the system of equations. Moreover, it was possible to conduct an analysis of sensitivity using the function parametric table to vary the input/output parameters.
The calculation of the electrical energy and enthalpy produced considered the lower heating value (LHV) and mass of methane produced within the biogas mixture, which is not separated to feed the engine. This can be seen in Equations (
10) and (
11). The
considered was 50 MJ/kg. The efficiency of the engine
was obtained based on the results of [
25], where it was possible to simulate the work produced (
). The amount of energy and the temperature of the exhaust gas were obtained via [
25] and the experiments of [
24]. For simplicity,
is determinable based on literature data, in comparison with the biogas LHV, and
is the enthalpy variation in the exhaust gas of combustion compared to the environmental one as concerns temperature.
In this model, the energy consumed by the agitators and the purification system was considered (
). The energy consumed by the pumps is smaller than the energy consumed by the other systems and was considered negligible. Thus, the power output energy can be calculated as in Equation (
12):
Finally, the exergy of the electrical energy (which is considered pure exergy) and the exergy associated with the heat produced for the cogeneration system (
) are demonstrated by Equations (
13) and (
14), where
(kJ) is the exergy related to a heat transfer.
The exergy loss or destroyed (
) in each process can be calculated by a simplification of the exergy analysis in Equation (
3) using the hypotheses of steady-state operation, according to the equation
.
The exergy efficiency was calculated according to the definition of Equation (
15), where in the denominator there is the exergy content of the expected products (
) and the exergy content of the inputs is the required exergy for the process to occur (
).
The exergy efficiency of the digestion process is indicated in Equation (
16), taking into consideration the reactors’ borders in
Figure 2, where the outputs are biogas (
) and digestate (
).
Taking into consideration only the biogas, the exergy efficiency of the production of biogas is given in Equation (
17).
Now, considering only the digestate, Equation (
18) gives the share of the exergy input in
.
The exergy efficiency of the digestion process, taking into consideration only the electrical energy, is given in Equation (
19). The result is the percentage of the exergy input that becomes electrical energy on a second-law basis. Since chemical exergy is around the lower heating value, and electrical energy is pure exergy, this value is comparable to the first-law efficiency.
As for the maximum work that is possible to obtain from the heat transfer from the exhaust gases (
), the exergy of the exhaust gases (
) gives the maximum share of the heat transfer energy that is possible to use, as in Equation (
20). This leads to a discussion concerning the choice of process. Depending on the use of the exhaust gases,
has an exergy
, higher than
; nevertheless, for this cogeneration, the input is the heat transfer to the digestate.
The logic of the exergy analysis is to compare all energy streams on the same thermodynamic basis; therefore, for the cogeneration using electrical energy, heat, and digestate, Equation (
21) was calculated following the logic of Equation (
15).
3. Results and Discussion
The plant has a capacity of up to 20 tons of MSW per day. However, it can also operate with smaller amounts of MSW. To understand the operating range, the simulations in EES show the breakeven point of the electrical energy of the plant in
Figure 3. The breakeven point is close to 7500 kg/day. This means that to produce more energy than it consumes, the amount of MSW consumed per day must be at least 7.5 tons/day. It is important to highlight that the energy consumed in the pumps and the pre-treatment system was not considered. However, this should not alter the results significantly, because the energy consumed is far smaller when compared to the other systems in the plant. For the following results, the plant was considered to be at full capacity (20 tons/day).
The exergies of the substrate and products (biogas, digestate, heat, and electrical energy) were calculated using the methodology presented. From the results obtained, a Grassmann diagram was constructed for the anaerobic digestion plant, which can be seen in
Figure 4.
The digestate exergy (1455 MJ/day) is very small compared to the biogas exergy (44,488 MJ/day). Although the exergy of fertilizer compounds (N-NH4, P2O5, and K2O) is high, the amount in moles of these compounds is small, which results in low exergy. The loss of exergy in the digestion process is relatively large. This is inherent to the process, since the chemical reactions are highly irreversible.
The exergy loss in the purification process is low,
Figure 5, which can be explained by the low amounts of hydrogen sulfide in biogas and the relatively small energy required for the dehumidification process. The electrical energy produced exergy and the heat exergy are small. This can be explained by the low efficiency of the internal combustion engines (approximately 30% for each process) and the large amounts of electrical energy consumed by the plant (for the agitators and the purification process).
In the processes considered in this study, the purification process has the smallest losses. The exergy destroyed in the anaerobic digestion process is relatively high (21,377 MJ/day). However, considering that it is a highly irreversible process due to the speed of the chemical reactions that occur in the process, it is acceptable since the total efficiency of the digestion process is high (around 68.25%), considering also that the exergy present in the substrate would mostly be lost in landfills.
In the case of the production of electrical energy and heat, the exergy destroyed (27,302 MJ/day) is greater than that of the digestion process. In addition to the irreversibilities intrinsic to the combustion process, it is also necessary to consider that the heat present in the refrigeration oil is not being used, as is the case in [
24], and therefore results in losses (destroyed exergy in the environment). The utilization of the exergy of the refrigeration oil can decrease this loss of exergy and improve the efficiency of the process. It is important to note that there were simplifications made in this model (e.g., not modeling the kinetics of the reaction and the pumps) and the exergy destruction can be underestimated as a consequence.
Although there are not many articles in the literature on this subject, an article on exergy analysis of an anaerobic digestion plant with residues from dairy cattle farming was found [
34]. Thus, the calculated exergy efficiencies were compared with the exergy efficiencies calculated by [
34] in
Figure 6.
Comparing the results of the two studies, it is observed that the calculated efficiency of the digestion process (68.25%) is close to the efficiency value calculated in the literature. However, the production efficiencies of biogas (66.08%) and digestate (2.16%) differ significantly from the values found in the article by [
34]. This may have occurred due to the uncertainties in the methodology adopted to obtain the concentrations of the fertilizer compounds, since the concentration data in the residues were estimated based on the experimental values obtained for the digestate. Furthermore, divergences in methodologies for calculating the exergy of waste and biogas can also explain the differences. Despite this, it is important to highlight that the efficiency for digestate production calculated by [
34] appears to be very high considering the amount of fertilizer compounds present in the digestate.
In the case of electrical energy production efficiency (16.32%), the value obtained in this work was higher than the value found in the literature. This is possibly due to higher values in the ICE efficiency, which result in higher values for exergy efficiency. The exergy efficiencies of heat production (7.75%) and cogeneration (26.23%) were also calculated, and the values obtained make sense considering the efficiency of internal combustion engines and the electrical energy consumed in the plant.
The efficiencies calculated can be increased if the limiting factor considered increases. A limiting factor of 90%, for example, results in an electric energy efficiency of 18.77%. The real limiting factor of the plant is not known. Considering the importance of this variable, future studies should focus on calculating the real limiting factor of the plant and studying alternatives to improve it. Despite the low values of exergetic efficiency of the digestate, the importance of this product should not be underrated. The study of treatments of this subproduct that allow its commercialization is vital for the technical and economic feasibility of biodigestion plants, and consequently is also a possibility for future research. The 80% limiting factor of substrate biodegradation indicates that there will be some exergy content of hydrocarbons in the biodigestor; nevertheless, this is considered internal irreversibility and/or is destroyed in the environment when the digestate is pretreated to be used as fertilizer. Therefore, their exergy content is not considered in the streams since it is destroyed because it has not become biomethane. Reference [
35] discusses the digestate destinations.
In contrast to the increasing non-dispatchable sources (intermittent behavior), like solar and wind, we can store biogas easily in production tanks at production pressure, which may expand renewable sources and reduce costs to the final consumer, since it is dispatchable and complements the cycle of wind and solar electrical energy production. The pure application of exergy by measuring the amount of lost work capability with reference to several destinations and processes, as well as its application as a decentralized and flexible source that can be operated based on demand, is discussed in [
1]. Suppose we replicate this pilot plant in a city of the magnitude of São Paulo. In that case, it may become a model for other cities worldwide and prove to policymakers that simple solutions such as landfills or even other incineration processes are complementary on smaller scales. The higher the country’s poverty, the higher the necessity for such solutions; according to D’Aquino et al. [
1], what we have discussed can be a solution for slums.
4. Concluding Remarks
This study conducted a thermodynamic analysis of an existing biogas plant that uses urban solid waste (MSW) with the following products (thus operating in cogeneration): electrical energy, biogas, and agricultural waste (digestate). From the simulation process in EES, it was possible to obtain a sensitivity analysis as well as the other figures found in this work.
Thus, it was obtained that the exergy of the substrate is 67,320 MJ/day. The exergies of the products were also calculated. The biogas exergy is 44,488 MJ/day, the digestate exergy is 1455 MJ/day, the heat exergy is 5215 MJ/day, and the electrical energy exergy is 10,987 MJ/day. Thus, the exergy efficiency of the digestion process is 68.25%, while that of cogeneration is 26.23% (2.16% for digestate, 7.75% for heat, and 16.23% for electrical energy). The exergy efficiencies of biogas and digestate production were, respectively, 66.08% and 2.16%.
The distinguishing feature of this work is its filling the research gap regarding research on actual plants (Institute of Energy and Environment at the University of São Paulo). Future studies may be dedicated to studying the production of pure CH6 and pure CO2 in the construction process. The plant features another generator, and the use of thermal exergy to decrease the amount of water in the digestate is unavoidable, since it would decrease the necessity of fuel consumption in transportation. More tanks will be constructed, and we already have spaces to plant urban gardens using the digestate.