## 2 Materials and Methods
### Detailed Plant Description  
The waste treatment plant is assumed to contain a waste reception area for manure and a separate tank for storing the co-substrate. The mass of material to be held was equivalent to 15 days' treatment capacity. Thus, the volume of the storage zone is 382 m\({}^{3}\). The volume of the storage tank for the co-substrate was also estimated from the same assumptions considering the proportion of co-substrate applied in the feeding mixture. A mixture tank is dedicated to homogenizing manure with process water to reach the desired solid content. The tank was furnished with two mixers and chopper pumps for avoiding clogging problems when feeding the anaerobic reactor. The anaerobic digester was considered to run under a hydraulic retention time of 40 days at mesophilic conditions. Storage of biogas is assumed to take place at the head of the reactor, with a headspace of 30%. Table 1 provides the main plant parameters and characteristics. Biogas produced is assumed to be derived exclusively from volatile solids of the feedstock. Inorganic material remains constant during the process, thus accumulating in the digested slurry. Estimations of biogas production and thermal energy needs of the anaerobic reactor were based on [PERSON] et al. [53]. Equation (1) was used to estimate biogas production (m\({}^{3}\)/d) expected from the substrate:  
\[\text{Biogas = (Fv \times VS_{\text{inlet}}\times SMP)/(1000 \times\%CH_{4}),} \tag{1}\]  
The daily amount of biogas produced is estimated from the volumetric flow (Fv, m\({}^{3}\)/d) of the digester feeding stream and the concentration of volatile solid of this stream (VS\({}_{\text{inlet}}\), g/L). The specific methane production (SMP, expressed as (L CH\({}_{4}\)/kg VS)) of each substrate is used for estimating the global amount of gas produced. The composition of methane in biogas is represented by %CH\({}_{4}\) and assumed to be 60%. The lower heating value (LHV, 35.8 MJ/m\({}^{3}\)) of methane was used to estimate biogas energy content. Biogas \begin{table}
\begin{tabular}{c c} \hline \hline
**Plant Characteristics** & **Value** \\ \hline Manure treatment capacity & 6500 t/year \\ TS content of feed & 10\% \\ Hydraulic retention time (HRT) & 40 d \\ Digester volume & 2190 m\({}^{3}\) \\ TS content dewatered sludge & 30\% \\ Co-substrate & Cheese whey \\ Co-substrate addition (\% _v/w_) & 25-50\% \\ TS content cheese whey & 33.1 g/L 1  \\ \hline \hline \end{tabular} \({}^{\dagger}\)[49].  
\end{table} 
Table 1: Characteristics of the digestion treatment plant. produced is assumed to be valorized in a combined heat and power unit (CHP) with an electrical efficiency of 34% [54]. The thermal energy demand of the digestion reactor was estimated for winter conditions to consider the worst-case scenario. The influent stream was assumed to be at 8 \({}^{\circ}\)C, and the temperature of the reactor was set at 37 \({}^{\circ}\)C. The heating needs of the digester were calculated based on Equation (2) considering a 12% increase due to thermal losses [53]:  
\[\text{Thermal}_{\text{dig}}=1.12\times(\text{m}_{\text{water}}\times\text{c} _{\text{p\_water}}+\text{m}_{\text{solid}}\times\text{c}_{\text{p\_solid}}) \times(\text{T}_{\text{digestion}}-\text{T}_{\text{feed}}) \tag{2}\]  
where Thermal\({}_{\text{dig}}\) (kJ/d) is the thermal energy demand of the anaerobic reactor for increasing the temperature of the feeding stream (T\({}_{\text{feed}}\), \({}^{\circ}\)C) to the temperature of the digestion (T\({}_{\text{digestion}}\), \({}^{\circ}\)C). The mass of the feeding stream was assumed to be conformed of water (mwater, kg/d) and solids (msolid, kg/d) derived from the organic waste. The specific heat capacity (c\({}_{\text{p}}\), kJ/kg K) was assumed to be kept constant with changes in temperature, considering a value of 4.2176 kJ/kg K for water (c\({}_{\text{p\_water}}\)) and 1.5 kJ/kg K for solids (c\({}_{\text{p\_solid}}\)) based on data reported by [PERSON] et al. [55] for lignocellulosic material.