Assessment of energy ef ﬁ ciency and performance in a two-phase anaerobic process for organic matter removal

Energy ef ﬁ ciency (EE) depends mainly on the lower heating values (LHVs) of hydrogen and methane selected from the thermodynamics tables under ideal conditions. However, for practical applications, the heating value should be calculated by considering some environmental factors under real conditions. Accordingly, this study compared EE using the ideal LHV with the EE using the real LHV in a two-phase anaerobic digestion reactor treating synthetic wastewater. Additionally, the process performance and the stability were studied. The results showed that the EE value calculated using LHV ideal was, on average, 35% higher than that evaluated using LHV real ; these differences are relevant to the estimation of real energy and also for practical applications. At the same time, the index buffer intermediate alkalinity/partial alkalinity was shown to be more accurate than the pH value to analyze the stability of the process. With regards to chemical oxygen demand, the removal ef ﬁ ciency in the methanogenic phase decreased drastically when utilizing 100% of the acidogenic phase. Future considerations for the optimization of each phase are highlighted.


INTRODUCTION
Energy and wastewater management forms a crucial part of sustainable development goals, which are challenging to realize for developing countries. This has significantly hindered the achievement of sustainable development goals, thereby affecting the well-being and development of rural and urban communities in the long term. A sustainable economic model called the circular economy has highlighted the opportunities to use the anaerobic digestion (AD) process as a tool for efficiently treating wastewater with the potential to produce bioenergy and value-added bio-products. Urbinati et al. (2017), Kalmykova et al. (2018), and Korhonen et al. (2018) recognized the correlation between a circular economy and AD, which has emerged as a sustainable industrial strategy focused on the recovery of products that can replace fossil fuels.
According to Intanoo et al. (2016), AD will very shortly be the critical piece to obtain products with a high energy value (i.e., food waste, wastewater, municipal solid waste, and lignocellulosic biomass). Other authors like Vergine et al. (2015) have ratified this vision and add that, despite this technology having been developed to stabilize the organic matter present in wastewater, in recent years, this process has been adopted for the production of bioenergy. They cite, for example, that in Europe about 14,000 plants, 8,000 of them in Germany, already use the biogas they produce to generate heat and power (combined heat and power -CHP).
Compared with anaerobic digestion, acidogenic phase/dark fermentation does not allow the complete degradation of organic matter, which would lead to effluent rich in AGVs and with a high presence of carbon residues, approximately 70%, making it necessary to complete the conversion to CO 2 . This residue must be taken to a second treatment in a methanogenic phase to close the cycle. Perera et al. (2010) (Kong et al. 2019), in a comprehensive review on the production of methane and hydrogen through anaerobic processes, indicated the significant advantages that systems have in two sequential phases, once the adjustment of control parameters in each of the reactors is facilitated, so such that H 2 production is optimized and degradation of the substrate to methane is promoted. These authors present the results of various studies, including on a real scale, being that in most cases, methane generation values greater than 70% and hydrogen values between 15 to 60% have been reached. It is worth mentioning that one of the most significant advantages of two-phase systems is the possibility of producing energy and other intermediaries with a high energy value with wastewater whose substrate is complicated, that is, with low pH or high content of lignocellulosic compounds. Fuess & Garcia (2015) showed how the phase separation in an anaerobic process could increase bioenergy recovery in a sugar cane industry. Additionally, they emphasized the significant benefits of improving the biodegradability of specific substrate types that are recalcitrant to some compounds in the methanogenic phase. Perera et al. (2012) recommend anaerobic reactors in two phases to achieve the maximum efficiency of the treatment for every phase process: the acidogenic step offers Water Science & Technology Vol 84 No 3,668 operative benefits for the system, such as the increment of hydrolysis rate, the efficiency of volatile fatty acids (VFA) production, and biohydrogen production.
Subsequently, the energy efficiency (EE) assessment of unconventional renewable sources is fundamental to identifying the true potential of producing biomass energy using wastewater as a raw material. EE denotes the relationship between the useful output power and input power of the system (i.e., efficiency ¼ useful power output/power input) estimated basically with the heating value of the gases.
The lower heating value (LHV) is the net calorific value calculated by subtracting the heat of vaporization of water (generated during fuel combustion) from the higher heating value (Meriçboyu et al. 1998). Because in AD, different types of fuel gases (i.e., hydrogen, methane, and biohythane) are released as by-products, the adequate estimation of LHV becomes critical to determining the actual energy potential of the AD process.
The BS ISO 6976:2016 (BSI 2016) details the methodology of calculating the gross and net calorific values of any natural gas or other gaseous fuel of known molar composition. The calculation mainly includes the compressibility factor (Z) in LHV estimation. The compressibility factor considers many aspects, including gas pressure and temperature. This type of evaluation allows a realistic assessment of the calorific value of biogas, as it is not an ideal gas.
Accordingly, to enhance the knowledge of the energy assessment in a two-phase AD, this study compares the EE calculated using the LHV estimated according to BSI (2016) with the EE calculated using the LHV taken directly from thermodynamics tables. Additionally, we evaluated the process stability and removal efficiency of the organic matter in the acidogenic and methanogenic phases. Our main finding is that the EE calculated using LHV real is lower than that estimated using LHVi deal , thereby indicating that the heating value taken directly from thermodynamics tables can overestimate the calculated EE value.

Experimental setup
The scheme of the experimental setup is shown in Figure 1. The reactors were constructed in rigid polyvinyl chloride (PVC) with an internal diameter of 74 mm and a net volume of 4.10 L at a laboratory scale. The reactor configuration is Figure 1 | Schematic diagram of the two-phase anaerobic reactors: acidogenic reactor (R 1 ) and methanogenic reactor (R 2 ).
Water Science & Technology Vol 84 No 3,669 characterized by the addition of a 200-mm-thick suspended bed composed of high-density polyethylene rings (Ø ¼ 19 mm and height ¼ 10 mm); the bed contains a polyurethane foam core to avoid washing of the biomass and improve the biogas-production stability (Karadag et al. 2015). The specific surface area of each ring was 950 m 2 m À3 . The reactors were named: Reactor 1 (R 1 ) for the acidogenic phase and Reactor 2 (R 2 ) for the methanogenic phase.

Experimental procedures
In both reactors, HRT of 8 h was controlled by a Masterflex L/S brand peristaltic pump with the capacity to regulate flow rates from 0.0006 to 3,400 ml/min. This condition was chosen based on previous results (Mendez-Revollo et al. 2017). The reactors were kept in an acclimatized chamber set at 30 +5°C.
Reactor R 1 was supplied with synthetic wastewater (SWW) with a pH of 5.5 and organic loading rate (OLR) of 11.26 kgCOD m À3 d À1 as proposed by Hernández et al. (2018). Reactor R 2 was operated in five steps to avoid acid shock.
As suggested by Buzzini & Pires (2007), the first phase comprised feeding the reactor with SWW (yeast extract: 120 mg L À1 , ammonium chloride: 70 mg L À1 , monobasic sodium phosphate: 35 mg L À1 , and ethanol: 0.025% v/v) with an initial OLR of 4.23 kgCOD m À3 d À1 . During steps, 2, 3, 4, and 5, the feed was set as a mixture of SWW and the effluent from Reactor R 1 (i.e., Ef R1 ) in the '(SWW: Ef R1 ) ratio' of 75:25, 50:50, 25:75, and 0:100, with the OLR values of 7. 75, 9.40, 10.7, and 11.2 kgCOD m À3 d À1 , respectively. The pH of the effluent from R 1 was adjusted to be between 7.2 and 7.4 before the operation of Reactor R 2 . During the operation of Reactor R 2 , the alkalinity was maintained above 1,500 mg L À1 by keeping the concentration of sodium bicarbonate (NaHCO 3 ) in the mixture inside the reactor between 2 and 22 g L À1 .
For reactor R 1 , the inoculum was obtained via the natural fermentation mechanism. The advantage of this kind of inoculation is that no pretreatment is required to enrich the acidogenic biomass. This method involved setting the temperature of the wastewater under study to ambient temperature for three days and then recirculating it for 72 h to guarantee satisfactory adherence to the support medium. Fernandes et al. (2013) demonstrated that natural fermentation, caused by the combination of the microorganisms in the air and tap water, is beneficial in maintaining acidogenic conditions. The methanogenic reactor (R 2 ) was inoculated with granulated sludge from a UASB (Up-flow Anaerobic Sludge Blanket) reactor treating effluent from a beverage industry (Bogotá, Colombia). The sludge volume was a third of a useful volume (i.e., 0.883 L), and the TVS was 4,140.29 mgTVS/L.

Analytical determinations
The organic matter content (COD) and volatile suspended solids concentration were analyzed according to the standard methods provided in APHA (2012). The phenol method (Herbert et al. 1971) was used to analyze the total concentration of carbohydrates. To assess the stability and the buffer capacity of the methanogenic phase, the partial and intermediate alkalinities, total volatile acids (TVA) concentration, pH, and the ratio IA/P were evaluated according to the recommendations of Ripley et al. (1986) and Lahav & Morgan (2004). With regard to the acidogenic phase, the concentration of VFA and the TVAs was monitored.
All the parameters were measured twice per week, at least during ca. 167 days of work, and the results were reported with the mean and the standard deviation using the ORIGIN PRO 8.5 software. The yield and volumetric production of the biogas (i.e., H 2 and CH 4 ) were calculated according to Moureira et al. (2013).
The composition of the biogas (H 2 , CO 2 , and CH 4 ) was measured by the gas chromatography (Agilent Technologies) 7890A GC system, which was equipped with a thermal conductivity detector and capillary column Carboxen 1010 plot (30 m Â 0.25 mm Â 25 μm). Nitrogen was used as the carrier gas, and the injection volume was 0.6 mL. The average values were calculated as the result of three measurements per sample.
The analysis of volatile fatty acids was carried out by a gas chromatograph Agilent 7890ª GC, using an FID detector and capillary column HP-INNOWAX (30 mm Â 0,25 mm Â 0,025 μm). The oven temperature was maintained at 210°C and the flow rate at 15 ml/min, the system was coupled to a Headspace brand HS 7694E for automatic injection. Nitrogen was used as the carrier gas.
The measurement of biogas's flow was conducted through the CaudalisG flowmeter, equipment of local fabrication. This device was coupled and placed at the biogas exit of each reactor. The datasets generated were sent via Bluetooth and stored in a desktop computer through the LabVIEW ® software.

Energy assessment
The energy assessment was performed using the equations proposed by Xie et al. (2008), Das & Veziroä (2001), and Fuess & Garcia (2015). These equations used the ideal heating values of hydrogen and methane, i.e., 242 and 801 kJmol À1 , respectively. We proposed to correct these heating values using Equations (1) and (2). These two equations define the thermodynamic factors of the biogas mixture. One has the following: (1) • Lower heating value In Equation (1), the terms P 2 , P 0 , x j , and s j denote the local atmospheric pressure (kPa), standard pressure (101.325 kPa), mole fractions of the components (i.e., H 2 , CO 2, and CH 4 ) in the biogas, and summation factor for a combustion temperature at ambient conditions (15°C).
In Equation (2), the terms LHV c , LHV ideal j , R, and T 2 denote the calculated heating value of the biogas mixture, heating value of each component at a combustion temperature of 15°C (kJ mol À1 ), gas constant (J mol À1 K À1 ), and absolute temperature of operation (K), respectively. The terms b j and H denote the number of hydrogen atoms in the molecule of each component (H 2 , CO 2 , and CH 4 ) of the biogas mixture, and vaporization enthalpy of water at a combustion temperature of 15°C, respectively. Table 1 presents the equations used to estimate the energy efficiency in this study. The energy assessment was performed using the ideal heating value (LHV ideal ) and calculated heating value (LHVc) for each case .
The organic mass balance was calculated according to Algapani et al. (2018) as the Equation (3): where COD C H4 and COD H2 correspond to the COD converted to produce gas, and they are calculated using the theoretical values of 0.35 L CH 4 g À1 COD and 1.4 L H 2 g À1 COD, respectively.

RESULTS AND DISCUSSION
3.1. Bioreactor's performance

Acidogenic reactor
The biogas volumetric flow (Q g ), percentage of H 2 in the biogas mixture, and concentrations of TVAs in the influent and effluent of the acidogenic reactor are shown in Figure 2. The results show a continuous hydrogen production despite the low pH values of 3.30 + 0.33. Notably, the initial pH in Reactor R 1 was adjusted to 5.5, as the literature recommended the optimum pH to be between 4.5 and 6.5 (Castelló et al. 2020) and (Rao & Basak 2021). The results of  indicated that hydrogen gas could be produced in highly acidic conditions. This finding is advantageous because most industrial wastewater types, including vinasse, non-alcoholic beverage wastewater, and coffee wastewater, have low pH values. Additionally, the experimental results of  showed that a volumetric OLR of 25 gCOD L À1 d À1 , coupled with an HRT of 4.6 h and pH of 2.7, achieved a volumetric hydrogen production of 175 mLH 2 L À1 h À1 and hydrogen yield of 3.4 molH 2 mol sac À1 .
In this study, the acidic conditions with an HRT of 8 h did not promote lactate accumulation. Therefore, hydrogen production increased. This behavior can be deemed similar to that of the gastrointestinal tract due to the acidic conditions, which seem to be the critical factor in regulating lactate accumulation (Belenguer et al. 2011). Furthermore, these authors reported that the pH values depended on HRT and OLR, thereby indicating that high values of OLR promote lactate accumulation. This excess lactate resulted in a decrease in the pH value and, consequently, a decrease in hydrogen production.
Das and Veziroä (2001) Final efficiency of hydrogen conversion into energy (1 phase)  (2015) Total amount of electricity-EEL (two phases)   Guo et al. (2010) established that pH values below 4.5 facilitated change in the metabolic routes. However, these changes could not promote hydrogen production. Recently, Castelló et al. (2020) extensively reviewed the causes, effects, and solutions for hydrogen production via dark fermentation; also presented the operational parameters used in various other studies. Accordingly, it can be seen that the most studied pH range has been between 4.0 and 6.5.
The volumetric hydrogen-production rate (VHPR) was between 20.05 and 493.46 mLH 2 L À1 d À1 . Remarkable VHPR results were achieved on the 41 st and 66 th operation days, and they were 493 and 311 mLH 2 L À1 d À1 , respectively, both of which corresponded to a 100% hydrogen production in the biogas.
Between the 20th and 40th days of the operation, the concentration of TVAs gradually increased until reaching the maximum value of 751.8 mgHAc L À1 , which matched the 100% H 2 production in the biogas and values close to 500 mLH 2 L À1 d À1 of VHPR. Additionally, the %H 2 and VHPR production values significantly decreased by the end of the operation, obtaining 18.6% and 20.05 mLH 2. L À1 d À1 , respectively.
In Figure 2, the temporal variation of the biogas flow is shown. The Q g when the hydrogen percentage was 100% varied between 84.3-and 29.7-mL h À1 . A possible explanation for this observation can be that the flow of biogas was directly affected by the bed setup because the bubbles were trapped in the medium, thereby preventing the measurement of the gas flow in the CaudalisG.
Authors including Sikora et al. (2013) indicated that reactors with fixed beds have advantages and disadvantages. One of the main benefits of a fixed bed in a UASB is the reduction in the washing of the biomass. For instance, the accumulation of excess biomass could become a significant disadvantage. The biomass is agglutinated, either in the form of long flocs, granules, or biofilm, and it adheres to the rings (support medium), thereby decreasing the H 2 production. In this case, the main mechanisms to inhibit biomass accumulation could be homoacetogenesis or the presence of propionate-producing microorganisms. Although our study did not analyze the microbial community, the presence of both propionate and homoacetogenic microorganisms might have imbalanced the process.
Bundhoo & Mohee (2016) mentioned several inhibitors from the microbial consortium that promoted the decrease or cessation of hydrogen production, i.e., methanogenic hydrogenation-promoting bacteria, homoacetogenic bacteria, propionate producer bacteria, sulfate-reducing bacteria, nitro-reducing bacteria, and lactic acid bacteria (LAB). Some authors, namely, Hung et al. (2007), Noike et al. (2002), Sreela-or et al. (2011), andYang et al. (2007), agreed that the presence of LAB resulted in the total cessation of hydrogen production. However, this situation did not occur in our study.
From the concentration results of VFAs (see Figure 3), it can be observed that the predominant volatile acids were propionic acid, followed by butyric acid and acetic acid. The highest production of propionic acid indicated that the inhibition in the  H 2 production was primarily caused by propionate-producing organisms, followed by the toxicity due to butyric acid (Bundhoo & Mohee 2016). Concerning acetate, the values ranged between 61.17 and 10.33 mg L À1 . Wong et al. (2014) and Baghchehsaraee et al. (2008) stated that the molar ratio between acetate and butyrate was also an indicator of the hydrogen-production efficiency; accordingly, high values of this ratio were associated with increased production of bioH 2 . In this study, the acetate: butyrate ratio was 1.29 + 0.74, and, at the end of the operation process, when the H 2 production decreased to 18%, the ratio was 0.40, thereby verifying the claims made by these authors. Figure 4 shows the results of the biomass-concentration profile for different sampling points in the acidogenic reactor. Markedly, in this profile, the highest concentration of biomass was achieved in the support medium. During the operation, the highest concentration value was 1,104 mg SSV L À1 , which corresponded to the 100th day of the observation.

Methanogenic reactor
The successful operations of anaerobic treatment depend on the ability to neutralize the organic volatile acids produced and adequate bicarbonate buffering. Ripley et al. (1986) and Martín-González et al. (2013) suggested that one strategy for this control was monitoring the intermediate alkalinity/partial alkalinity (IA/PA) ratio, the concentration of total volatile acids, and the pH value.
As shown in Figure 5, the volatile acid concentration in the influent varied from 323 + 284 to 908 + 498 mg L À1 , resulting in a variation in the volumetric organic load from 4.22 to 11.23 kg m À3 d À1 . The pH was adjusted during the entire operation period, as well as the alkalinity, by adding NaHCO 3 in the range of 0.028 to 0.057 gNaHCO 3 g À1 COD.
Although sodium bicarbonate would be more expensive for full-scale applications than sodium hydroxide, it offers the dual advantage of adjusting the pH and providing alkalinity, thereby resulting in pH self-balancing during the process. Ye et al. (2018) discussed the influence of different neutralizers on the stability of AD that treats food waste, and they indicated that both NaOH and NaHCO 3 offered advantages and disadvantages during the operation of anaerobic reactors. Additionally, they stated that the use of either NaOH or NaHCO 3 depends on each particular case. However, they also indicated that the addition of alkalinizers was an unavoidable strategy for engineering applications. Fuess et al. (2017) studied several alkalization strategies to optimize the operation and energy recovery of two-phase anaerobic reactors that treat vinasse. They concluded that the best approach was associated with the addition of sodium hydroxide. However, this approach did not offer the same buffer effect as the one provided by sodium bicarbonate, and sodium hydroxide was more technically and economically favorable for AD systems on a real scale.
The IA/PA ratio (see Figure 5) showed more sensitive responses than the value of the pH in the effluent of the R 2. During operation, several drops and oscillations were observed in the IA/PA ratio. For instance, on day 78, the IA/PA reached a value of 1.16, while five days before, it was a mean of 0.51. In contrast, the pH value did not change and remained stable at ca. 7.71. According to this observation, an IA/PA ratio can be a better indicator of stability than only the pH value. Similar recommendations were found in Boe et al. (2010), who also indicate that suitable indicators are necessary for proper monitoring of the anaerobic digestion.
During phase 5, the concentration of total volatile acids reached 2,339.8 mgHAc L À1 that corresponds to the maximum value observed during the experiment. However, during this phase, a median value of 0.29 was observed in the IA/PA ratio. Such facts can be explained because, in this period, not only was the R 2 better adapted to the substrate but also the change in the OLR was not abrupt (10.7 to 11.2 kgCOD m À3 d À1 ) if compared with phase 2, in which the value increased from 4.23 to 7.75 kgCOD m À3 d À1 . Despite all these responses, the reactor did not show accumulation of acids and acidic shock was not observed.
Additionally, our results reflect slight variations between the median and the mean value of the IA/PA ratio and concentration of TVAs, indicating that these data are homogeneous and their distribution is symmetrical. Here the median of IA/PA was 0.51, and the median for TVA was 863.76 mgHAc L À1 . The decrease in alkalinity was significantly low, and the partial alkalinities in the influent and effluent were 9,775 and 10,700 mgCaCO 3 L À1 , respectively.
The organic matter removal (COD removal) in the acidogenic reactor reached 6.19 + 3.96%. While, in the whole treatment (R 1 þ R 2 ), removal was 26.6% +8.78%. This is a useful result because compared with one phase (R1), a two-phase AD not only allows the recovery of by-products with added energy value but also improves the organic matter removal.  Figure 6 shows the COD removal in R 2 . The median value was 20.44%, reflecting that in the methanogenic phase more than 75% of the total organic matter removal of the two-phase AD process occurs. Regarding the percentage of the methane content in the biogas, it did not exceed 10% when the substrate was 100% of the acidogenic reactor effluent (Phase 5); and the maximum methane production occurred in phase 2, where it reached 39.15%.

Energy analysis and COD balance
The mass balance was based on gas production and COD balance per day during phase 3 of the methanogenic reactor (50 SWW-50 Ef R 1 ). Figure 7 shows that 0,22 g d À1 of COD was converted into hydrogen gas in Reactor R 1 and that 5.13 g d À1 of  COD was turned into methane gas in Reactor R 2 , with the final COD effluent of 28.83 g d À1 . Accordingly, only 0.4% and 13.5% of the COD fed to the R 2 reactor were transformed into hydrogen and methane gases, respectively. The unbalanced COD from R 2 was 10.8%, a higher percentage compared with 4.85% of the unbalanced COD from R 1 . These COD losses could be attributed to unmeasured biomass, undetected metabolites, or to the fact that during the period of the acidogenic phase, approximately 10% of the biodegradable organic matter was used for bacterial growth cells (Nualsri et al. 2016;Seengenyoung et al. 2019).
Regarding the energy yield, from Figure 7, it can be observed that Reactor R 1 produced 17 J g À1 COD added, and Reactor R 2 produced 960 J g À1 COD added . These results were obtained by adjusting the net calorific values. The overall energy recovery of the system was 0.98 kJ g À1 COD added ; this was a low value compared with 15.34 kJ g À1 COD and 5.64 kJ g À1 COD total energy yield observed in previous laboratory studies by Nualsri et al. (2016) and Kongjan et al. (2013). However, these authors used POME and desugared molasses as feedstock. Figures 8-10 show the analyses of the EE achieved from the biogas generated in the two-phase AD reactors. Figure 8 shows the results of the EE values of hydrogen and methane production and the EE of cogeneration, as suggested by Xie et al. (2008). The EE was calculated by dividing the heat value of the yields of hydrogen and methane by the heat value of the sucrose. Compared with the EE values calculated using LHV that does not include environmental factors, the EE values calculated using the LHV values of H 2 and CH 4 with the parameters indicated in the ISO 6976:2016 (BSI 2016) were lower. The EE of cogeneration calculated using the LHV taken from the thermodynamics tables was 13.74%, and the EE calculated using the adjusted LHV was 4.91%, which is 35% lower than the EE calculated with the typical value of LHV.
Also from Figure 8, it can be observed that compared with a single-phase the operation of the reactors in two phases is a better strategy to improve energy recovery. For example, the unitary energetic efficiencies of Reactors R 1 and R 2 were 2.61% and 2.29%, respectively. Figure 9 shows the final energy conversion assuming that the fuel cell used in Reactor R 2 has an efficiency of 60% (Wang et al. 2018). For this study, the theoretical maximum value was 16%. However, this value could not be achieved during the operation of the system. The maximum value reached was 8.2% on day 41. The average value was 3.3%, and the minimum value was 0.2%. Despite these results, this measurement showed that continuous voltage changes could be achieved from hydrogen gas without gas storage, thereby making the technology significantly attractive from the viewpoint of practical usage. Das & Veziroä (2001) stated that the H 2 gas must be purified before use, due to the unavoidable presence of other gases such as CO 2 . Notably, in this study, the gas mixture was not purified. However, this did not directly affect the results because the fuel cell only works with the produced hydrogen gas. Humidity in the gas mixture should also be considered, as it influences the decrease in the heat value.   Figure 10 plots the total amount of electrical energy measured based on the efficiency of the converters. Evidently, the amount of electrical energy decreases in any of the cases in which the low heat value (LHVc) is corrected. In the methanogenic reactor (R 2 ), the maximum EEL value with the heating value adjusted was 1.50 W·h on the 50th operation day. While, for the same day, the EEL value with the heating value taken from the literature (LHV idealCH4 ) was 3.21 W·h. Additionally, in the acidogenic reactor, the maximum EEL value with LHV idealH2 was 16.72 W·h on day 56; in comparison, the maximum EEL value with the heating value adjusted was 5.83 W·h.
In Table 2, the energy yields from different two-phase AD processes depending on the HV calculated are compared. The terms HHV c and LHV c correspond to the higher and lower heating values of the biogases, respectively, and they have been corrected according to the British Standards Institute (BSI 2016). Furthermore, an energy yield comparison was conducted by considering the calorific-value type chosen by different authors and the biogas composition. For example, Mamimin et al.  From Table 2, it is evident that the percentage difference in the methane energy yield ranged between 5.9% and 13.8%, whereas that for the hydrogen energy yield ranged higher between 11.3% and 19.3%. These differences are relevant for estimating the real energy yield and also performing evaluations to use this kind of system in real-life applications.
Notably, the fuel is selected according to its calorific value. Hence, fuels with higher calorific values should be selected to produce high power in the ignition engine. Fuels with less calorific value burn inefficiently, causing unwanted exhaust and air contamination. Thus, variations in heating values not only affect the energy balance but also allow reconsidering the quality and use of biofuel.

CONTRIBUTIONS
In any industry, EE is a crucial industrial term, which is complex and challenging to quantify. Practically, companies are always seeking strategies to increase productivity not only by reducing energy consumption and inputs but also by becoming increasingly independent concerning the use of fossil fuels. Li & Tao (2017) and Boyd & Pang (2000) emphasized that for the productive sector, EE is strongly linked to trade security, environmental benefits (including greenhouse gas reduction bonuses and business competition), and national government policies. However, Henriques & Catarino (2017) indicated that it was significantly challenging to convince the senior management to implement clean practices in the processes that lead to energy benefits. This challenge is mainly due to the difficulty in quantifying the energy gain. Li & Tao (2017) presented the three main indicators for EE evaluation, namely, thermodynamic, thermophysical, and thermo-economic indicators. The third one, according to the authors, is the most complex to quantify as it depends on time and the national economic development.
Since these three indicators are based on thermodynamics, the calorific value becomes essential for this evaluation. Thus, the proposal of this article significantly affected the industry. However, many challenges and barriers remain to be overcome, and further studies on the subject must be performed.
There is no consensus in the literature on how to evaluate the energy gain in two-phase AD. Some authors proposed to perform such energy gain evaluations based on the produced biogas (Das & Veziroä 2001;Xie et al. 2008), the flow of biogas (Si et al. 2016), moles of the gas produced (Kumari & Das 2015), energy input throughout the process (Perera et al. 2012), or biogas-production rate (Fuess et al. 2017). However, in most of these proposals, the common denominator is LHV. In this regard, the main contribution of our study is not only the revision of different points of view for this analysis but also the demonstration of how the LHV influences the final energy gain.

CONCLUSIONS
A two-phase anaerobic digestion process was studied to evaluate the performance and the energetic efficiency of treating synthetic wastewater. The IA/PA ratio was a suitable indicator of the stability even more than the value only of the pH. Moreover, the biological process did not show accumulation of acids and an acidic shock was not observed. Also, the presence of propionic acid-induced instability in the production of H 2. Considering that the base of the calculation of the energetic efficiency (EE) was the parameter named the calorific heat value, it was observed that this parameter should be corrected by including mainly the compressibility factor. This correction directly influences the EE results of both hydrogen and methane gases, showing that if the calorific heat value is used under ideal conditions, the energy gain is overestimated. This is important for practical engineering, as this overestimation would decrease the importance of the real-life uses of hydrogen and methane. Accordingly, industries or communities that implement two-phase AD would not be able to decrease their energy consumption. Nevertheless, this observation is not conclusive, and further studies are still needed.