A plant-wide modelling framework to describe
microalgae growth on liquid digestate in
agro-zootechnical biomethane plants

D. Carecci, A. Catenacci, S. Rossi, Francesca Casagli, G. Ferretti, A. Leva, E. Ficara

► To cite this version:

D. Carecci, A. Catenacci, S. Rossi, Francesca Casagli, G. Ferretti, et al.. A plant-wide modelling framework to describe microalgae growth on liquid digestate in agro-zootechnical biomethane plants. Chemical Engineering Journal, 2024, 485, pp.149981. 10.1016/j.cej.2024.149981. hal-04908856

HAL Id: hal-04908856

https://inria.hal.science/hal-04908856v1

Submitted on 23 Jan 2025

**HAL** is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# A plant-wide modelling framework to describe microalgae growth on liquid digestate in agro-zootechnical biomethane plants

D. Carecci<sup>a</sup>, A. Catenacci<sup>b</sup>, S. Rossi<sup>b</sup>, F. Casagli<sup>c</sup>, G. Ferretti<sup>a</sup>, A. Leva<sup>a</sup>, E. Ficara<sup>b,*</sup>

<figure><img src="image_2.png" /></figure>

## ARTICLE INFO

### Keywords:

- ADM1 extensions

- Anaerobic co-digestion

- Microalgae bioremediation

- Digestate nutrient recovery

- Physico-chemical modelling

- Model interface

## ABSTRACT

Microalgae cultivation on liquid digestate from the anaerobic co-digestion of agricultural feedstocks is an interesting option for digestate nutrient removal and resource recovery coupled to biomass generation. Both the reactors considered in such a biorefinery system involve complex bioprocesses. Although different pilot-scale systems coupling anaerobic digestion and algae-based bioremediation processes have been described, no previous attempts to model the entire system are available to date. In this work, a plant-wide model, named ADAB (anaerobic digestion algae-bacteria), is presented, coupling two well-established models for anaerobic digestion (IWA – ADM1) and algae-based bioremediation processes (ALBA). The models were modified with necessary equations and extensions to develop a dedicated model interface. Phosphorous dynamics were integrated, including activity corrections and precipitation processes. The ALBA model was also integrated with thermal modelling to simulate outdoor raceway ponds and greenhouse-covered systems. Solid/liquid separation units for digestate pre-treatment were also included. The prediction consistency of the adopted physicochemical sub-model (PCM) was verified with results from both reference literature and Visual MINTEQ. The reduced complexity of the PCM limits the model field of application, but it results in better computational performance and seems to be particularly suitable to simulate agro-zootechnical digesters. A scenario analysis including different co-digester design and operating conditions was carried out to assess the impacts on microalgae cultivation. It highlighted the importance of a proper biorefinery design and yet a noteworthy robustness of the system performance. The use of the ADAB model can facilitate a more realistic assessment of the technical, environmental, and economic feasibility of full-scale microalgal biorefineries based on digestate.

## 1. Introduction

According to the Statistical Report by the European Biogas Association (EBA), renewable biogas and biomethane could cover 35-62% of the gas demand in Europe by 2050, thus helping the transition to an integrated net zero energy system by shaping the next energy mix [1]. Furthermore, anaerobic digestion (AD) plants are of paramount relevance in reducing methane emissions in the agricultural and waste sectors, as the methane naturally emitted from organic wastes is captured in a controlled environment, instead of being released into the atmosphere [2].

A direct consequence of the ongoing growth in the biomethane and biogas sector is the generation of huge amounts of digestate (up to 90-95% of the volume fed to the digester), that need to be properly

treated and disposed to avoid further adverse environmental impacts [3]. The methanogenesis process generates two final products of interest in terms of environmental impacts. The first is biogas, that still contains a significant amount of CO2. The second is a stabilized digestate with high content of nutrients, including total nitrogen (TN), total phosphorus (TP) and residual organics, mostly associated to unbiodegradable/recalcitrant compounds [4,5]. The implementation of circular economy principles in the field of AD requires the integration of technologies capable of valorising both the gaseous and the liquid effluent streams, by converting dissolved and particulate components into value-added chemicals and biofuels [6]. For these reasons, the development of strategies for the sustainable management of digestate is required [7].

Digestate processing typically starts with solid-liquid (S/L) separation, producing two fractions (solid and liquid) that can be managed separately, with lower costs and environmental impacts, mainly

<footnote><sup>a</sup> Politecnico di Milano, DEIB – Department of Electronics, Information and Bioengineering, Information Technology Section, P.zza L. da Vinci, 3, 20133 Milan, Italy</footnote>

<footnote><sup>b</sup> Politecnico di Milano, DICA – Department of Civil and Environmental Engineering, Environmental Section, P.zza L. da Vinci, 3, 20133 Milan, Italy</footnote>

<footnote><sup>c</sup> INRIA – Institut National de Recherche en Informatique et en Automatique – Biocore team, Route des Lucioles, 2004 – BP 93, 06902 Sophia-Antipolis, France</footnote>

<footnote>* Corresponding author.</footnote>

<footnote>E-mail address: elena.ficara@polimi.it (E. Ficara).</footnote>
<table><thead><tr><th>Nomenclature</th><th>S/L</th><th>Solid-Liquid</th></tr></thead><tbody><tr><td>AcoD Anaerobic co-digestion</td><td>S<sub>ac</sub></td><td>Dissolved total volatile fatty acids (ALBA, g COD·m<sup>-3</sup>)</td></tr><tr><td>AD Anaerobic digestion</td><td>S<sub>an</sub></td><td>Dissolved anions (ADM, kmol·m<sup>-3</sup>) (ALBA, mol·m<sup>-3</sup>)</td></tr><tr><td>ADAB Anaerobic Digestion Algae-Bacteria</td><td>S<sub>ca</sub></td><td>Dissolved calcium (ADM, kmol·m<sup>-3</sup>) (ALBA, mol·m<sup>-3</sup>)</td></tr><tr><td>ADM Anaerobic Digestion Model</td><td>S<sub>cat</sub></td><td>Dissolved cations (ADM, kmol·m<sup>-3</sup>) (ALBA, mol·m<sup>-3</sup>)</td></tr><tr><td>ALBA Algae-Bacteria</td><td>S<sub>ch4</sub></td><td>Dissolved methane (ADM, kg COD·m<sup>-3</sup>)</td></tr><tr><td>AOB Ammonia Oxidizing Bacteria</td><td>S<sub>co2</sub></td><td>Dissolved carbon dioxide (ADM, kmol·m<sup>-3</sup>) (ALBA, mol·m<sup>-3</sup>)</td></tr><tr><td>ASM Activated Sludge Models</td><td>S<sub>co3</sub></td><td>Dissolved carbonate ion (ADM, kmol·m<sup>-3</sup>) (ALBA, mol·m<sup>-3</sup>)</td></tr><tr><td>BSM Benchmark Simulation Model</td><td>S<sub>h2</sub></td><td>Dissolved hydrogen (ADM, kg COD·m<sup>-3</sup>)</td></tr><tr><td>C Carbon</td><td>S<sub>hco3</sub></td><td>Dissolved bicarbonate ion (ADM, kmol·m<sup>-3</sup>) (ALBA, mol·m<sup>-3</sup>)</td></tr><tr><td>COD Chemical Oxygen Demand</td><td>SI</td><td>Saturation Index</td></tr><tr><td>DAE Differential Algebraic Equations</td><td>S<sub>i</sub></td><td>Inert dissolved organics (ADM, kg COD·m<sup>-3</sup>) (ALBA, g COD·m<sup>-3</sup>)</td></tr><tr><td>DASSL Differential/Algebraic System Solver</td><td>S<sub>ic</sub></td><td>Dissolved inorganic carbon (ADM, kmol·m<sup>-3</sup>)</td></tr><tr><td>DCPD Dicalcium phosphate dihydrate</td><td>S<sub>in</sub></td><td>Dissolved inorganic nitrogen (ADM, kmol·m<sup>-3</sup>)</td></tr><tr><td>DO Dissolved Oxygen</td><td>S<sub>ip</sub></td><td>Dissolved inorganic phosphorus (ADM, kmol·m<sup>-3</sup>)</td></tr><tr><td>EBA European Biogas Association</td><td>S<sub>mg</sub></td><td>Dissolved magnesium (ADM, kmol·m<sup>-3</sup>) (ALBA, mol·m<sup>-3</sup>)</td></tr><tr><td>f<sub>aob,xaut</sub> Fraction of AOB from autotrophic bacteria</td><td>S<sub>nd</sub></td><td>Dissolved degradable organic nitrogen (ALBA, mol·m<sup>-3</sup>)</td></tr><tr><td>f<sub>nob,xaut</sub> Fraction of NOB from autotrophic bacteria</td><td>S<sub>s</sub></td><td>Dissolved biodegradable organic matter (ALBA, g COD·m<sup>-3</sup>)</td></tr><tr><td>f<sub>xaut,xb</sub> Fraction of autotrophic bacteria from facultative bacteria</td><td>TAN</td><td>Total Ammoniacal Nitrogen</td></tr><tr><td>f<sub>xc,Xch</sub> Fraction of particulate carbohydrates from complex particulate</td><td>TC</td><td>Total Carbon</td></tr><tr><td>f<sub>xhet,xb</sub> Fraction of heterotrophic bacteria from facultative bacteria</td><td>TN</td><td>Total Nitrogen</td></tr><tr><td>HAP Hydroxyapatite</td><td>TP</td><td>Total Phosphorus</td></tr><tr><td>HRT Hydraulic Retention Time</td><td>TS</td><td>Total Solids</td></tr><tr><td>I Ionic strength (kmol eq·m<sup>-3</sup>)</td><td>VFAs</td><td>Volatile Fatty Acids</td></tr><tr><td>IWA International Water Association</td><td>V<sub>gas</sub></td><td>Digester gas (headspace) volume (ADM, m<sup>3</sup>)</td></tr><tr><td>k<sub>cryst</sub> Crystallization kinetic rate coefficient (min<sup>-1</sup>)</td><td>V<sub>liq</sub></td><td>Digester liquid (working) volume (ADM, m<sup>3</sup>)</td></tr><tr><td>k<sub>hyd,Xch</sub> First order hydrolysis constant of particulate carbohydrates (d<sup>-1</sup>)</td><td>VS</td><td>Volatile Solids</td></tr><tr><td>k<sub>m,aa</sub> Maximum uptake rate for amino acids degrading organisms (d<sup>-1</sup>)</td><td>X<sub>acp</sub></td><td>Amorphous calcium phosphate, Ca<sub>3</sub>(PO<sub>4</sub>)<sub>2</sub> (ADM, kmol·m<sup>-3</sup>) (ALBA, mol·m<sup>-3</sup>)</td></tr><tr><td>k<sub>m,ac</sub> Maximum uptake rate for acetate degrading organisms (d<sup>-1</sup>)</td><td>X<sub>c</sub></td><td>Complex particulate (ADM, kg COD·m<sup>-3</sup>)</td></tr><tr><td>k<sub>m,su</sub> Maximum uptake rate for sugar degrading organisms (d<sup>-1</sup>)</td><td>X<sub>ccm</sub></td><td>Calcium carbonate, CaCO<sub>3</sub> (ADM, kmol·m<sup>-3</sup>) (ALBA, mol·m<sup>-3</sup>)</td></tr><tr><td>N Nitrogen</td><td>X<sub>ch</sub></td><td>Biodegradable particulate carbohydrates (ADM, kg COD·m<sup>-3</sup>)</td></tr><tr><td>Nc Number of total components (as for the PCM nomenclature)</td><td>X<sub>fac</sub></td><td>Facultative aerobic biomass (ADAB, kg COD·m<sup>-3</sup>)</td></tr><tr><td>NOB Nitrite Oxidizing Bacteria</td><td>X<sub>dec</sub></td><td>Anaerobic decayed biomass (ADAB, kg COD·m<sup>-3</sup>)</td></tr><tr><td>NRM Nutrient Recovery Model</td><td>X<sub>i</sub></td><td>Inert particulate organics (ADM, kg COD·m<sup>-3</sup>)</td></tr><tr><td>OCP Octacalcium phosphate</td><td>X<sub>li</sub></td><td>Biodegradable particulate lipids (ADM, kg COD·m<sup>-3</sup>)</td></tr><tr><td>ODE Ordinary Differential Equations</td><td>X<sub>mag</sub></td><td>Magnesite, MgCO<sub>3</sub> (ADM, kmol·m<sup>-3</sup>) (ALBA, mol·m<sup>-3</sup>)</td></tr><tr><td>OLR Organic Loading Rate</td><td>X<sub>pr</sub></td><td>Biodegradable particulate proteins (ADM, kg COD·m<sup>-3</sup>)</td></tr><tr><td>P Phosphorus</td><td>X<sub>s</sub></td><td>Biodegradable particulate organics (ALBA, g COD·m<sup>-3</sup>)</td></tr><tr><td>PCM Physico-Chemical Model</td><td>X<sub>stru</sub></td><td>Magnesium struvite, MgNH<sub>4</sub>PO<sub>4</sub> (ADM, kmol·m<sup>-3</sup>) (ALBA, mol·m<sup>-3</sup>)</td></tr><tr><td>PI Proportional-Integral controller</td><td></td><td></td></tr><tr><td>PWM Plant-Wide Model</td><td></td><td></td></tr><tr><td>RME Relative Mean Error</td><td></td><td></td></tr></tbody></table>

associated to transportation [8]. Centrifuge, screw press, belt press and rotary drum are common technologies used for digestate S/L separation [9]. The solid phase is typically valorised as fertilizer, possibly after aerobic stabilization. Nevertheless, due to liquid fraction relevant contamination (in terms of nutrients and solids concentration), its safe release into the environment is not always guaranteed. In addition, when land availability is limited and/or in nitrate vulnerable zones, the treatment of the liquid fraction can be particularly challenging and costly.

Since the liquid fraction of digestate still contains the majority of TN and TP [5], microalgae cultivation is viewed as a valuable technological solution for nutrients recovery from digestate [10]. Indeed, the significant amount of water and nutrient required for conventional microalgal cultivation is provided by digestate [11,12]; moreover, the peculiar

metabolism of microalgae, including rapid growth rate and high adaptability to extreme environments, results in attractive performances in terms of pollutant removal, nutrient recovery, and production of microalgae biomass to be valorised into marketable end products [13–15].

Recent scientific literature illustrates the successful implementation of the 'waste biorefinery' approach when using the liquid fraction of anaerobic digestate to support microalgal growth, in terms of process efficiency [16–19], environmental impact [20,21], and economic feasibility [22,23]. However, the assessment of economic and environmental benefits deserves more research effort, since techno-economic disadvantages (such as land request and energy-expensive microalgae harvesting), as well as key knowledge gaps related to algae-bacteria interactions and their species-specific dependence on local climatic
conditions, may hamper a broad application of this combined technology. Moreover, pre-treatments might be necessary to mitigate the limiting or inhibiting effects of some physical (e.g., light transmittance) and chemical (e.g., ammonia toxicity, unbalanced nutrients ratio, pH, salinity) properties of liquid digestate on microalgae growth [9,24,25].

Since the feedstock type affects the characteristics of anaerobic digestates, an effective tool is required to predict and control liquid digestate properties and to understand the flows of nitrogen and phosphorus in the integrated system. In this perspective, reliable mathematical models would be of paramount usefulness for scenario analysis, process control and optimization, as already demonstrated with the Activated Sludge Models (ASM) [26], the Anaerobic Digestion Model no.1 (ADM1) [27], the Nutrient Recovery Model (NRM) [28], and the most recent algae-bacteria model (ALBA) [29]. However, mathematical models for different applications can strongly vary in terms of state variables. To this aim, ad-hoc model interfaces have been developed over the last decades [30–32], and plant-wide modelling has been applied to biological wastewater treatment processes [33,34]. In particular, the coupling of ASM and ADM with a dedicated two-way model interface showed to be a relevant advancement for benchmarking and integrated assessment of wastewater resource recovery facilities [35,36]. Nevertheless, plant-wide models for coupling the process of AD with microalgae-based digestate treatment are still missing.

The aim of this work is to provide a comprehensive plant-wide modelling and simulation framework, integrating all the relevant processes to accurately describe microalgae cultivation within biogas plants. To this purpose, based on existing and well-established mathematical models and on previous model integration efforts, an interface is here proposed between extended versions of the ADM1 and of the ALBA model, with the inclusion of greenhouse pond thermal models for temperature dynamics. This novel attempt to couple the two mechanistic models in a plant-wide approach has a potentially relevant application in the industrial development and optimization of microalgae-based digestate treatment processes.

## 2. Materials and methods

### 2.1. Model development

The plant-wide biorefinery model proposed in this work and named ADAB (anaerobic digestion algae-bacteria) was developed by coupling existing published models for anaerobic digestion (ADM1) and microalgae cultivation (ALBA). Both models have been extended with all the processes and state variables required to properly describe microalgae-based digestate treatment, as reported in the plant layout of Fig. 1 (further detailed in section 2.2.3). Models' extensions are described in sections 2.1.1 and 2.1.2, whereas the physicochemical model adopted and the dedicated ADM1-ALBA interface are introduced in sections 2.1.3 and 2.1.4, respectively. Digestate pre-treatment and final harvesting were also included in the model, using a simplified approach as described in section 2.1.5. Modified Gujer matrixes are reported in Tables S1 to S4 (Supplementary Material).

#### 2.1.1. ADM1 extensions

Despite the ADM1 was originally developed to simulate the AD of waste sludge, its effectiveness to also model anaerobic co-digestion (AcoD) has been widely proven [37]. Modifications to ADM1 are commonly applied to enhance its ability to accurately predict the anaerobic degradation of feeding substrates different from waste sludge [38] by including new intermediate products [39], new compounds [40], or by using dedicated kinetic models to properly describe the disintegration/hydrolysis step [41,42]. In the ADAB model, such modifications were not introduced to keep the approach to different feeding substrates as broad as possible, but general extensions and changes to the ADM1 were implemented.

#### 2.1.1.1. AcoD feedstock model.
To adapt the ADM1 to different agricultural feedstocks, the original complex particulate variable $X_c$ was removed, and decay products were directly re-allocated among particulate degradable ($X_{ch}$, $X_{pr}$ and $X_{li}$) and undegradable ($X_{b}$, $S_i$) organic matter [31,43]. Accordingly, disintegration was neglected and, for each waste, the hydrolysis of carbohydrates, proteins and lipids was modelled

<figure><img src="image_3.png" /><figcaption>**Fig. 1.** Layout of the agro-zootechnical case-study for microalgae cultivation on digestate (modelled units are shown with a light-grey filled label).</figcaption></figure>
without any differentiation among co-substrates, thus preventing the implementation of a two-step approach as proposed by the GISCOD model approach [37], where the enzymatic hydrolysis and the subsequent metabolic reactions are kept separated. A “conversion block” converts typical analytical determinations of influent feedstocks into input variables in their “model state form”, according to the COD fractioning proposed by Lübken et al. [44]. Downstream, ideal mixing is applied to feeding co-substrates.

### 2.1.1.2. Phosphorus (P) implementation.
Beyond COD, the ADM1 only describes carbon (C) and nitrogen (N) transformations. Since a proper prediction of macro-nutrient concentrations in the liquid fraction of digestate used as microalgae growth medium is crucial, phosphorus (P) transformations were added in the biokinetic model, as previously proposed by Flores-Alsina et al. [45]. Accordingly, the state variable $S_{ip}$ (dissolved inorganic phosphorus) was introduced using a source-sink approach (biological assimilation/release), considering the elemental composition (C, H, O, N, and P) of each component and allowing to include phosphorus limitation [45]. Storage processes related to the presence of phosphorus accumulating organisms, such as the release of phosphates and the accumulation of volatile fatty acids under anaerobic conditions, were neglected, but should be included if activated sludge is fed as co-substrate.

### 2.1.2. ALBA extensions

The model used to describe the microalgae cultivation section is the ALBA model, proposed by Casagli et al. [29], to simulate the growth of algae-bacteria consortia that treat wastewaters. This comprehensive mechanistic model has been previously used to describe and optimize microalgae cultivation systems fed with municipal wastewater or digestate, and has been validated using long-term datasets, including winter periods, and catching both nychthemeral and seasonal dynamics. The original model includes dynamic processes for the growth of microalgae and aerobic bacteria (heterotrophic, ammonia-oxidizing, and nitrite-oxidizing bacteria). Biological processes are modelled based on reaction stoichiometries, while kinetics account for the specific dependence on substrate and nutrient limitation/inhibition, as well as on the main environmental conditions, i.e., light, temperature, pH, and dissolved oxygen (DO). The modifications applied to the original ALBA model are detailed below.

**Implementation of volatile fatty acids (VFAs).** An additional heterotrophic bacterial metabolic pathway on VFAs was included introducing a new state variable ($S_{ac}$). The bacterial growth on VFA is modelled as the original processes on $S_s$ (i.e., with the same kinetics and stoichiometry), but the elemental composition of the new state variable was set to the algebraic average of single VFAs contents.

**Thermal modelling.** Thermal sub-models describing heat exchanges among the pond and the surrounding environment were implemented in the ALBA model. More precisely, three cases of microalgae cultivation systems were considered: i) conventional outdoor open-air ponds, ii) ponds covered by a single-cover greenhouse, and iii) pond covered by a double-covers air-inflated greenhouse. Greenhouse covers are of interest for limiting biomass contamination from the external environment, thus improving the algal biomass purity, and favouring its valorisation.

The thermal model for the open-air configuration was implemented as done by Casagli and Bernard [46,47]. Thermal models for the cultivation under greenhouses (either one or two covers) were implemented according to Rossi et al. [48], based on the greenhouse-pond model derived by Li et al. [49]. All the described thermal sub-models have been previously calibrated and validated in similar climatic conditions and treating similar wastewaters. As the cultivation performance is strongly sensitive to temperature and depends on the strain-specific thermal response [48,50–52], a simple conditional proportional–integral controller (PI) was implemented to allow for the possible control of the pond temperature within specific temperature bounds.

### 2.1.3. Physicochemical sub-model

The Generalized Physicochemical Model (PCM) [53] was taken as reference for an accurate prediction of dissolved inorganic nutrients availability (with particular focus on the inorganic P). Compared to the original ADM1, more inorganic components and acid/base equilibria were included to account for carbonate and phosphate precipitation: three liquid phase inorganic carbon species (dissolved carbon dioxide $S_{co2}$, bicarbonate $S_{hco3}$, and carbonate $S_{co3}$) and four inorganic phosphorus species (phosphate $S_{po4}$, hydrogen phosphate $S_{hpo4}$, dihydrogen phosphate $S_{h2po4}$, and phosphoric acid $S_{h3po4}$). Furthermore, three cationic total components (potassium, calcium, and magnesium) were added, taking part only to chemical transformations, thus neglecting biological assimilation/release and metabolic limitations. Potassium was included given its high concentration in AcoD digestates [4] and due to its agronomic relevance. Total quantities of components and ionic species involved in the physicochemical model were expressed as molar concentrations.

Since the ionic strength ($I$) of agro-zootechnical digestates is typically higher than 0.2 mol·L⁻¹ and most inorganic components involve multiple deprotonations [54], $I$ correction with activity coefficients was implemented for an accurate modelling of pH, and of its effect on gas transfer and bioprocess rates [55,56]. For this purpose, the Davies approximation was used, this being suitable for ionic strengths up to 0.5–0.7 mol·L⁻¹; other correlations describing the relationship between activity coefficients and the ionic strength are available in the literature [53,54] and may be alternatively adopted. The charge balance was used for pH calculation.

Both Visual MINTEQ (as suggested by Vaneeckhaute et al. [28]) and the results by Flores-Alsina et al. [45] and Zhang et al. [57] were used to guide modelling choices. Four salts were selected, namely: amorphous calcium phosphate, Ca₃(PO₄)₂ ($X_{acp}$), magnesium struvite, MgNH₄PO₄ ($X_{stru}$), calcium carbonate, CaCO₃ ($X_{ccm}$) and magnesite, MgCO₃ ($X_{mag}$). The precipitation model assumes that once the saturation index ($SI$) is exceeded, the solid is quickly formed [58]: the effect of seed material concentration was incorporated in the rate equation considering a first-order kinetics [59]. Precipitation and dissolution processes were implemented considering the sign of $SI$ [60,61]. To reduce the model dimension and complexity, while preserving an adequate accuracy and computation time, ion pairing and precipitation of potassium struvite and other calcium/magnesium salts were neglected, consistently with literature outcomes. Indeed, low concentrations of calcium and magnesium measured in co-digestion digestates [4], together with the findings by Solon et al. [62], suggest that ion pairing corrections are less important than ion activity corrections, especially when the concentrations of divalent ions is low. As for potassium struvite, it has been reported that its precipitation is commonly hindered in anaerobic digesters, given its relatively high $pK_a$ and low crystallization rate [45]. Hence, influent potassium concentration carries over unmodified to the effluent, since it is not subject to any transformation process. All the hypotheses concerning model dimension reduction were verified as illustrated in Section 2.2.1. Further details are reported in the Section SM.2 of Supplementary Material (Tableau matrix in Table S8).

### 2.1.4. ADM1-ALBA interface

A set of algebraic transformation equations for the C, N, P and COD mass continuity was developed, as depicted in Fig. 2, according to the approaches by Flores-Alsina et al. [45] and Nopens et al. (2009) [31]. The main assumptions are listed hereafter, while equations are reported in Supplementary Material (Tables S9 and S10).

(i) Hydrogen ($S_{h2}$) and methane ($S_{ch4}$) are transferred to the gas phase and their COD contribution is removed. VFAs are transferred to the new ALBA state variable ($S_{ac}$). All the other degradable soluble organics except for VFA are transferred to $S_s$.

(ii) All degradable particulate variables from ADM1 are mapped as biodegradable particulate organics ($X_s$) in the ALBA model.
<figure><img src="image_4.png" /><figcaption>Fig. 2. Approach of the ADM1-ALBA interface for COD, C, N and P balances.</figcaption></figure>

(iii) The fate of active microorganisms in digestate depends on their ability to adapt to aerobic conditions. While acetoclastic and hydrogenotrophic methanogens instantaneously decay, a fraction of the remaining fermentative microorganisms ($X_{fac}$) is supposed to use a facultative metabolism: a fraction is transferred to heterotrophic bacteria ($f_{xaut,xb}$), a fraction to autotrophic bacteria ($f_{xaob,xaut}$), and the remaining by Nitrite Oxidizing Bacteria ($f_{xaob,xaut}$), and the remaining by Nitrite Oxidizing Bacteria ($f_{xnob,xaut}$) (Table S10, Supplementary Material). The decayed biomass ($X_{dec}$) is either mapped into biodegradable ($X_s$) or non-biodegradable organic particulates ($X_i$), as in Flores-Alsina et al. [45].

(iv) The nitrogen content of amino acids is transferred to the soluble degradable organic nitrogen variable ($S_{nd}$).

(v) As in Flores-Alsina et al. [45], $S_{ic}$, $S_{in}$, and $S_{ip}$ are set as source-sinks to cover for minor differences in the elemental composition between the two model state variables, while guaranteeing the elemental (C, N, P) and COD mass continuity. To avoid excessive exploitation of source-sinks during the lumping at the interface, the P content coefficients were modified in the ALBA model as follows: the same value as in the ADM1 is used for $X_i$; no P is associated with $S_s$ (as there are no soluble degradable organics containing P in the ADM1); a weighted average of the particulates ($X_{ch}$, $X_{pr}$, $X_{li}$ and inactive biomass) lumped within $X_s$ is used to dynamically update its P content.

(vi) No modifications were applied to inert components (i.e., calcium, magnesium, potassium, cations, and anions), as well as for precipitated salts that, in principle, act as seed material in the pond.

### 2.1.5. Solid/liquid separation units

S/L separation units were implemented based on removal efficiencies values from literature [63,64] or from preliminary dedicated lab tests (data not shown), as reported in Table S11 (Supplementary Material).

After a primary S/L separation performed by low-efficiency mechanical separators (e.g. screw presses), a secondary, chemically-enhanced process, is required when dealing with manure and fibre-based digestates, due to the relevant presence of residual solids and recalcitrant soluble COD [4,65]. When external reagents must be dosed in the S/L separation unit, the dilution ratio is considered as additional model parameter.

The two S/L units between the anaerobic digester and the microalgae cultivation pond receive output variables from the ADM1-ALBA interface, and not directly from the ADM1, to better cope with literature separation performance values, usually expressed as total element concentrations (e.g., TN, TP, soluble COD, total COD, etc.).

### 2.1.6. Model implementation

The model was implemented using Modelica, an open-source, high-level, declarative and object-oriented modelling language, and employing the free OpenModelica environment [66]. The DASSL solver [67], an implicit, gradient-based, integration algorithm with variable step size (suitable for stiff systems) was selected for the numerical solving/integration of the system of differential algebraic equations (DAE), with a relative tolerance of $10^{-6}$. It should be emphasized that both differential and algebraic equations can be implicit and appear in arbitrary order, so that equation rearrangements are not required, resulting in a transparent formulation for modellers. More details on the
model structure are available in Supplementary Material (section SM.5). Total components are computed by solving ordinary differential equations (ODE) separately from the nonlinear algebraic system. Then, at each simulation time step, an iterative solver (Newton-Raphson method) resolves the nonlinear algebraic loop on residual variables from the tearing algorithm [68], calculating the concentrations of chemical species, pH, and ionic strength. Indeed, to reduce the model stiffness, chemical speciation is implemented as algebraic equations using the mass action laws and the molar contribution balances [53]. The algebraic system is closed by the charge balance and the ionic strength definition equations.

Note that, expressing chemical species activities as a function of total components ($N_c$) and hydrogen ion activity [56], and neglecting ion-pairing equations [53], reduces the nonlinear system dimension from $N_c + 1$ to 2 equations (meaning that a lower number of initial conditions has to be provided).

## 2.2. Model analysis, applications, and datasets

Two case-studies were selected: a reference case-study (section 2.2.1) and a full-scale agro-zootechnical case-study (section 2.2.3). The first case-study was used to verify the adequacy of the proposed assumptions for the PCM complexity reduction, the second one to prove the overall ADAB model capability and to further analyse the reduced PCM. Both were employed to test the appropriateness of the ADM1-ALBA interface (section 2.2.2). As for the agro-zootechnical case-study, different scenarios were selected (section 2.2.4) for preliminary feasibility analyses on the integrated system. The adopted datasets are detailed in Section 2.2.5. To limit the influence of the values selected for model initialization, the simulation time ranges were set to two years, focusing on the second year for the discussion.

### 2.2.1. Verification of the physicochemical sub-model dimension reduction

The “AO” model version reported in Flores-Alsina et al. [45], consisting in the anaerobic digestion of waste sludge, was considered as reference case-study for sub-model verification. The same influent composition was considered. The digester size ($V_{liq} = 3'400 m^3$, $V_{gas} = 300 m^3$) and its operating conditions (HRT = 19 days) were set to the default values of the Benchmark Simulation Model no.2 [69]. Therefore, the obtained phosphorus fractioning was compared with the results reported in the reference manuscript. The appropriateness of the simplifications adopted for the physicochemical model was also verified by comparing the model estimates of $I$, pH, chemical speciation and amounts of precipitates in the effluent digestate with those obtained with Visual MINTEQ simulations. For this purpose, OpenModelica steady-state values of total components involved in the physicochemical sub-model were set as MINTEQ input variables. $S_{cat}$ and $S_{an}$ were mapped as non-reactive cations ($Rb^+$) and anions ($Br^-$) in the component list.

### 2.2.2. ADM1-ALBA interface verification

Both case-studies were used to verify the ADM1-ALBA interface, with particular focus on interface source-sink (INORG_S) exploitation and TC, TN, and TP speciation across the interface. Effluent ADAB-ADM state variables were compared to the influent ADAB-ALBA state variables,

considering four major categories (excluding the stripped components): salt precipitates (PREC) including $X_{acp}$, $X_{stru}$ and $X_{ccm}$; particulate organics (ORG_X) including $X_i$, $X_{li}$, $X_{ch}$ and $X_{pr}$; soluble organics (ORG_S) including $S_{su}$, $S_{fa}$, $S_{aa}$, VFAs and $S_{i}$; and biomasses (ORG_BAC) including all the seven ADAB-ADM biomasses.

### 2.2.3. Plant-wide model application in an agro-zootechnical case-study

A second case-study was used to highlight the key features of the plant-wide model in a biorefinery approach. As shown in Fig. 1 and further described below, the layout of the system includes: an AcoD section with biogas upgrading to biomethane, a digestate S/L separation unit, a set of microalgae cultivation ponds continuously fed on digestate, and a final section for microalgae harvesting. Of these sections, AcoD and primary digestate S/L separation are physically available in the considered plant, while the secondary digestate S/L separation and microalgae cultivation units have been designed as described below, and simulated with the plant-wide model.

**Anaerobic co-digestion.** The AcoD plant mimics a full-scale installation in Northen Italy. It is composed by two parallel fermenters and a post-fermenter (total volume: $2'1350 m^3 + 3'179 m^3$; operational temperature: 43 °C, overall HRT: 33 d; OLR referred to VS: $3-4 kg.m^{-3}.d^{-1}$), fed with a mixture of liquid dairy cattle slurry ($130 m^3.d^{-1}$), solid cattle manure mixed with maize straw ($12.8 m^3.d^{-1}$) and, according to the season, maize silage (October-June, $37 m^3.d^{-1}$) or tomato peels (July-September, $37 m^3.d^{-1}$). An average biogas flowrate of approximately $11'000 m^3@0^{\circ}C,1Atm \cdot d^{-1}$ (CH4: 51.5 % v/v, CO2: 48.5 % v/v) is generated. The full-scale plant generates an average raw digestate flowrate of $180 m^3.d^{-1}$ with 8 % TS and 6 % VS, on a fresh matter basis.

**S/L separation units.** The digestate liquid fraction is first separated with a screw press (due to the large content of fibres) and further centrifuged with high-charge and high-weight cationic polyacrylamide, thus reaching suitable conditions of turbidity and light penetration, yet still containing sufficient concentrations of N and P despite stripping and precipitation. To further decrease the solids concentrations and the colour, resulting in increased light transmittance, additional S/L separation steps can be integrated in the separation unit.

**Microalgae cultivation ponds.** A full-scale microalgae cultivation system was designed and modelled, based on local constraints such as land availability and digestate composition (i.e., solids and ammoniacal nitrogen concentrations). As suggested by a previous model-based optimization study [70]: i) the overall HRT of the cultivation ponds was fixed to 5 days, to optimize both nutrient removal and algal biomass productivity; ii) a conditional proportional control was applied to control the pH value below 7.5, relying on the large $CO_2$ availability from biogas upgrading. A liquid depth of 0.2 m was assumed for microalgae cultivation in the raceway system, then resulting in a raceways surface of $7'650 m^2$ (divided into 10 pond units operated in parallel).

### 2.2.4. Scenario selection

With the aim of assessing the impact of AcoD operating conditions on the productivity of the subsequent microalgae cultivation unit, different scenarios were considered for the agro-zootechnical case-study (Table 1). In detail, the HRT of the AD unit was varied from 33 to 66 days, and different feeding strategies were tested by changing the ratios

<caption>**Table 1**</caption>

Scenarios studied for the agro-zootechnical case-study: in the ID Scenario label, the first number after “S” refers to the co-digester HRT, the second to silage/tomato loads, the third to cow slurry loads. Following to the hyphen, the letter “O”, “1C” and “2C” refer the raceway configuration.

<table><thead><tr><td>Scenario ID</td><td>Scope</td><td>HRT (d)</td><td>Silage or tomato load (ton·d<sup>-1</sup>)</td><td>Cow slurry load (ton·d<sup>-1</sup>)</td><td>Greenhouse cover</td></tr></thead><tbody><tr><td>S.1.1.1-0</td><td>Baseline</td><td>33</td><td>37</td><td>130</td><td>Open</td></tr><tr><td>S.2.1.1-0</td><td rowspan="3">Effect of AD operative conditions</td><td>66</td><td>37</td><td>130</td><td>Open</td></tr><tr><td>S.1.2.2-0</td><td>33</td><td>67</td><td>100</td><td>Open</td></tr><tr><td>S.2.2.2-0</td><td>66</td><td>67</td><td>100</td><td>Open</td></tr><tr><td>S.1.1.1-1C</td><td rowspan="2">Effect of raceway configuration</td><td>33</td><td>37</td><td>130</td><td>One-cover</td></tr><tr><td>S.1.1.1-2C</td><td>33</td><td>37</td><td>130</td><td>Two-covers</td></tr></tbody></table>
<table><caption>**Table 2**
Feeding co-substrates characterization.</caption><thead><tr><th>Parameter</th><th>Unit</th><th>Cow Manure</th><th>Cow Slurry</th><th>Maize Silage</th><th>Tomato peels</th></tr></thead><tbody><tr><td>Total Solids</td><td>g TS·kg<sup>-1</sup></td><td>230</td><td>73</td><td>346</td><td>250</td></tr><tr><td>Volatile Solids</td><td>%TS</td><td>60</td><td>79.9</td><td>96.5</td><td>97</td></tr><tr><td>Carbohydrates content</td><td>%TS</td><td>46.9</td><td>57.7</td><td>87.3</td><td>67.5</td></tr><tr><td>Proteins content</td><td>%TS</td><td>8.6</td><td>16.9</td><td>6.9</td><td>19.5</td></tr><tr><td>Lipids content</td><td>%TS</td><td>2.6</td><td>5.3</td><td>2.6</td><td>10</td></tr><tr><td>Biodegradability of carbohydrates</td><td>%VS</td><td>47</td><td>31</td><td>82.5</td><td>50</td></tr><tr><td>Biodegradability of proteins</td><td>%VS</td><td>50</td><td>73</td><td>77</td><td>50</td></tr><tr><td>Biodegradability of lipids</td><td>%VS</td><td>85</td><td>50</td><td>100</td><td>50</td></tr><tr><td>Biodegradability of volatile solids</td><td>%VS</td><td>47</td><td>44.8</td><td>82.8</td><td>47.5</td></tr><tr><td>BMP</td><td>NL CH<sub>4</sub>·kg VS<sup>-1</sup></td><td>204</td><td>174</td><td>351</td><td>230</td></tr><tr><td>Alkalinity</td><td>g CaCO<sub>3</sub>·m<sup>-3</sup></td><td>–</td><td>12'400</td><td>–</td><td>–</td></tr><tr><td>pH</td><td>–</td><td>–</td><td>7.2</td><td>–</td><td>–</td></tr><tr><td>Total Ammoniacal Nitrogen</td><td>g N·m<sup>-3</sup></td><td>500</td><td>1'400</td><td>756</td><td>168</td></tr><tr><td>Total Soluble Phosphorus</td><td>g P·m<sup>-3</sup></td><td>400</td><td>650</td><td>–</td><td>–</td></tr></tbody></table>

between pumpable feedstocks (cow slurry) and stock-piled feedstocks (silage/tomato peels). Particularly, silage and tomato peel loads were increased from 37 to 67 ton·d<sup>-1</sup>, and the cow slurry load was decreased from 130 to 100 ton·d<sup>-1</sup> (OLR increased by 35 %). In addition to open-air ponds (O), the effect of installing a greenhouse to cover the microalgae raceway was assessed by considering two additional scenarios, i.e., the use of a single-cover (1C) or two-covers (2C) greenhouses.

### 2.2.5. Datasets

The datasets used for model analysis and verification include process data, weather data, and model parameters. Available data on AcoD described in section 2.2.3 were directly obtained from the plant owner. The characterization of feeding co-substrates is reported in Table 2, resulting in the set of input state variables listed in Table S12 (Supplementary Material) as computed via the “conversion blocks”. Total solid contents and compositions (based on NIR analyses) of maize silage and tomato peels were provided by the plant owner, as well as the inorganic nutrient contents of cattle slurry. Total solid contents of cattle slurry and cattle manure were taken from Lübken et al. [44] and Kafle and Chen [71] respectively. The VFA content, the macromolecule biodegradability of cattle slurry, and the COD/VS conversion coefficients were taken from Weinrich et al. [72,73]. Unknown biodegradability coefficients were estimated or calibrated using experimental biomethane potential test results (BMP) provided by the plant owner (particularly for carbohydrates in tomato peels, cow slurry and cow manure), and by an internal database on BMP tests [74–76]. Data related to digestate (pH, VS, VFA, TAC, TAN, P-PO₄³⁻) and biogas (percentage of CH₄ in biogas, x<sub>CH4</sub>, and electrical power generated, W<sub>el</sub>) were collected during 2022 and provided by the plant owner.

Weather data for running the thermal sub-models were obtained from the regional environmental protection agency repository (ARPA Lombardia) and included local hourly data for air temperature (T<sub>e</sub>, °C), incident solar radiation (I<sub>0</sub>, W·m<sup>-2</sup>), wind speed (W<sub>w</sub>, m·s<sup>-1</sup>), and relative humidity (RH, %) for the weather station of Cremona (Italy), located at less than 10 km from the AcoD plant. Weather data are reported in Fig. S2 (Supplementary Material).

## 3. Results and discussion

### 3.1. The reference case-study

#### 3.1.1. Physicochemical model assessment

First assessments were made running Visual MINTEQ under the “possible solid” option (the chemical equilibrium, that includes ion-pairing, is not affected by precipitates). The implementation of the sole I corrections (i.e., non-ideal conditions) within the ADAB-PCM was validated against Visual MINTEQ outputs assuming an absolute error for pH below 0.01 as acceptable. By further including dissolved calcium (S<sub>ca</sub>) and magnesium (S<sub>mg</sub>), still neglecting ion-pairing and precipitation

processes in the sub-model, significant underestimations of pH were obtained (absolute errors of 0.19 and 0.05 for ideal and non-ideal conditions, respectively). Indeed, although inorganic S<sub>ip</sub> and S<sub>ic</sub> are mainly present as free acid-base species (96 % and 99 %, respectively), the relative amounts of S<sub>ca</sub> and S<sub>mg</sub> cations involved in ion-pairing is not negligible (approximately 40 % for both cations), with presence of CaHCO<sub>3</sub><sup>2-</sup>, CaHPO<sub>4(aq)</sub>, MgHCO<sub>3</sub><sup>2-</sup> and MgHPO<sub>4(aq)</sub>. In addition, it was observed that, at fixed water hardness, the higher the ionic strength, the lower the influence of ion pairing (Section 3.2.1).

Based on the SI value computed by MINTEQ under the reference case-study conditions (i.e., pH = 7.0, I = 0.0901 mol·L<sup>-1</sup>, hardness = 20 mol eq·m<sup>-3</sup>), relevant salts to be included in the sub-model were selected (paragraph 2.1.3). The reaction kinetic (crystallization kinetic coefficient, k<sub>cryst</sub>) was also accounted for: salts with slow precipitation rates were omitted as model components. Accordingly, some oversaturated precipitates featuring k<sub>cryst</sub> ≤ 0.001 min<sup>-1</sup> were not included in the model, those being hydroxyapatite (HAP, SI ~ 18), huntite, (SI ~ 4), aragonite (SI ~ 4), and dolomite (SI ~ 2). The main salts involving hydrogen ions (octacalcium phosphate (OCP, SI ~ 9), and dicalcium phosphate dihydrate (DCPD, SI ~ 2)) were neglected for simplicity, since the inclusion of salt state variables introduces additional stiffness to the model, and because the introduction of total hydrogen ion as additional total component would be required [53]. In addition, literature references does not report their relevant formation [45,57].

Steady-state results of the ADAB-ADM, including now both biological and precipitation processes, were compared with those reported in the reference manuscript [45] and with MINTEQ results. The pH obtained by the ADAB-PCM under ideal and non-ideal conditions were 7.20 and 6.84, with a pH drop of 0.36 consistent with results from Solon et al. [62]. Compared with MINTEQ, ADAB-PCM led to pH overestimation and S<sub>ip</sub> underestimation, with absolute errors of 0.02 and 6 mg P·L<sup>-1</sup> (2.5 % Relative Mean Error, RME), respectively. This error is primarily due to neglected ion-pairing, that decreases the pH and thus hinders precipitation, increasing the available S<sub>ip</sub>. Limited differences with the reference manuscript results were observed for both S<sub>ip</sub> (25 % vs. 27 % reported by the reference) and pH (6.84 vs. 6.9 declared by the reference).

MINTEQ allowed to check model performances over a wide range of S<sub>ca</sub> and S<sub>mg</sub> influent concentrations (up to 8 times the reference manuscript baseline value). Relative errors on pH and I were always below 2.6 % and 25 %, respectively. The model error on the prediction of S<sub>ip</sub> was below 2 % at water hardness lower than 20 mol eq·m<sup>-3</sup>. Of particular importance, especially when calcium concentration is above 21 mol·m<sup>-3</sup>, was the inclusion of X<sub>ccm</sub> to properly predict the P precipitation as Ca<sub>3</sub>PO<sub>4</sub>, that was less pronounced due to competition with the precipitation of CaCO<sub>3</sub>. The decreased model performance at high water hardness, with errors up to 2.6 % and 15 % in pH and S<sub>ip</sub>, respectively, is also due to the enhanced relevance of ion-pairing [54]; for example, at high S<sub>mg</sub> (104 mol·L<sup>-1</sup>), MgHPO<sub>4</sub> accounts for approximately 70 % of the
remaining $S_{ip}$. This, in turn, leads to overestimation of pH values and precipitation rates.

In summary, the implemented physicochemical model simplifications determine two effects that balance each other out, resulting in low prediction errors. These effects are (i) higher precipitation because of neglected ion-pairing, joined however to (ii) slight underestimation of pH due to neglected salts involving hydrogen ions, which limits precipitation itself. Hence, the simplified physicochemical approach used for the development of the plant-wide biorefinery model proved to be a reasonable compromise between model complexity and accuracy in the prediction of pH and nutrients dynamics, especially considering systems with high I (0.2-0.7 mol eq·L⁻¹) and low water hardness (0-80 mol eq·m⁻³) (section 3.3), as it is usually the case for agro-zootechnical digesters [4]. However, it should be noted that this approach is not suitable to model crystallization units as in Vaneeckhaute et al. [28].

As for the computation time, that must be carefully considered when dealing with sensitivity analysis, parameter identification and control problems (by entailing a huge number of simulation runs), the ADAB-ADM developed in OpenModelica was compared with the “AI” version of the AD model developed in Matlab-Simulink by Flores-Alsina et al. [45], as available on GitHub. Although the field of application of the proposed model is narrower, the reduced complexity resulted in a lower runtime (1.14 vs 8.04 s) and a lower CPU peak usage (62 % vs 78

<figure><img src="image_5.png" /><figcaption>Fig. 3. TC, TN and TP fractionation at steady state across the ADM1-ALBA interface in relation to the reference case-study.</figcaption></figure>

‰), using an Intel Core i5-10210U processor with 12.0 GB RAM.

### 3.1.2. Interface verification

Fig. 3 reports the fractioning of TC, TN and TP across the interface. As clearly emerges, the interface source-sink exploitation for C, N and P was always below 9 %. The most critical aspect was the positive difference in carbon contents between the ADAB-ADM and ADAB-ALBA bacteria. Still, the use of $S_{ic}$ as a source-sink is limited by the fact that dead bacteria from ADAB-ADM are partly transferred to the ALBA variable $X_s$, characterised by a lower carbon content, compared to all the components that are lumped in it. Values of state variables in relevant sections of the biorefinery for the reference case-study are reported in Table S13 (Supplementary Material).

## 3.2. Plant-wide model application: The agro-zootechnical case-study

### 3.2.1. Physicochemical model assessment

The average influent loads were 29.4 t COD·d⁻¹, 1'095 kg N·d⁻¹ and 187 kg P·d⁻¹. The blend of feedstocks to the digester had N/P ratios of 5.8 and 5.6 (w/w), in winter and summer feeding conditions, respectively. Under these feeding conditions, the digestate pH and I predicted by the ADAB-PCM were 7.5 (7.78 without activity corrections) and 0.25 mol eq·L⁻¹, respectively. Therefore, compared to the reference case-study, both I and the N/P ratio were higher, strongly influencing the amount and type of precipitates.

When using MINTEQ for the physicochemical sub-model verification of the model performances for the agro-zootechnical case-study, pH and I were slightly underestimated and overestimated, respectively, with RMEs of 0.04 % and 0.4 %. The underestimation of $S_{ip}$ was lower (1.79 mg P·L⁻¹, 1.4 % RME) compared to the reference case-study. The lower RME values obtained in this case were likely due to the absence of precipitated $X_{acp}$ at equilibrium, and to the reduced contribution of water hardness ($S_{ca}$ and $S_{mg}$) to the I, that was mainly composed by $S_{ic}$, $S_{in}$, $S_{ip}$, and other cations ($S_{cat}$). Indeed, as noted by Solon et al. [62], when the contribution to the ionic strength of ion-paring involved components ($S_{ca}$ and $S_{mg}$) is reduced, ion-pairing is less relevant, and the ADAB-PCM performed better (the percentage of two ion pairing species, i.e., MgHPO₄(aq) and CaHPO₄(aq), over total $S_{ca}$ and $S_{mg}$ concentrations dropped by 27 % and 36 % respectively). Besides, according to MINTEQ results, only two relevant over-saturated precipitates were neglected in the sub-model, namely dolomite (SI ~ 1) and HAP (SI ~ 3). Still, compared to the reference case-study characterized by lower $S_{ic}$ and $S_{in}$ and higher $S_{ip}$, the inclusion of $X_{ccm}$ in this case-study was essential to avoid overestimation of P precipitation; indeed, around 8 mol·m⁻³ of $X_{stru}$ and 4 mol·m⁻³ of $X_{ccm}$ precipitated, whereas the higher N/P ratio and high inorganic C availability hindered $X_{acp}$ from precipitating.

### 3.2.2. ADAB predictive ability

Table S14 (Supplementary Material) reports the results of steady-state simulations under winter conditions as compared to data provided by the plant operator for the digester unit during the year 2022. Following to a preliminary calibration phase of $k_{m,ac}$ (5.6 d⁻¹), $k_{m,su}$ (11 d⁻¹) and $k_{m,aa}$ (8 d⁻¹) from default values by Rosen and Jeppsson [69], the RMEs dropped from 15 to 40 % to less than 10 % for pH, VFAs, Total Ammoniacal Nitrogen (TAN), CH₄ content in biogas and electrical power produced. Conversely, the fitting for phosphates, Total Alkalinity Content (TAC) and volatile solids (VS) was less accurate with RMEs between 11 and 18 %. Various strategies could be used to improve model accuracy, including: (i) a more accurate substrate characterization and parameter identification and (ii) the adoption of different model structures. As regards parameter identification, one example could be the ammonia inhibition parameter for acetogens. Indeed, the default value (0.0018 mol·L⁻¹) inherited from ADM1 suggests a relevant impact of ammonia inhibition which may prove false for microbial communities adapted to high free ammonia concentration; however, due to its poor identifiability on full-scale data, its determination
<figure><img src="image_6.png" /><figcaption>**Fig. 4.** TC, TN and TP fractionation at steady state across the ADM1-ALBA interface in relation to the agro-zootechnical case-study.</figcaption></figure>

through specific activity tests would be advisable [72]. As for the second strategy, the bio-accessibility of feedstock components (particularly, carbohydrates and proteins) could be better integrated [77] considering lignin as a separate inert variable with its own COD content [78].

Some noteworthy considerations about the ADAB-ADM predictions are: i) during summer, the feeding of tomato peels to the AcoD unit, featuring higher lipid content as compared to maize silage, increased the effluent $S_{ip}$ up to 70 % (35 % on average, considering the long transient period required to reach steady state), ii) the biogas methane content was increased by 6 % and iii) the predicted biogas flowrate was 12 % lower, mainly due to lower TS contents (at similar VS/TS ratios) of to-mato peels (Table 2).

Concerning the ADM1-ALBA interface, the elemental fractionation is shown in Fig. 4. In this case, the source-sink exploitation was always below 12 % for all components, $S_{ip}$ being the most critical aspect. Using the original ALBA elemental compositions, the concentration of $S_{ip}$ across the interface was increased by 5 %, since the P content in dead biomass from the ADAB-ADM is partially mapped into $X_s$, this $S_{ip}$ over-estimation could be particularly relevant when the influent inorganic soluble P is low, and the amount of biomass is high. It is worth noting that the bias was significantly reduced thanks to the dynamic update of the elemental P content of ADAB-ALBA organic component ($X_s$) pro-posed in this study, depending on the ADAB-ADM organic component

effluent: this allowed the C, N and P loads of bacterial and organic particulate components to balance each other.

**Fig. 5** reports the main characteristics of the influent liquid digestate to the pond, at varying digester operational and feeding conditions. Considering the baseline scenario (S1.1.1-O), the influent total COD is likely to be underestimated. Indeed, literature reports examples of highly recalcitrant soluble COD concentrations measured in digestates from full-scale anaerobic co-digesters fed on agro-zootechnical wastes [4]. The recalcitrant COD in the AD model is primarily mapped as $X_i$ and thus removed by the two S/L separation units, hindering the prediction of higher soluble inert COD concentrations. Modelling approaches to reproduce the formation of $S_i$ in the anaerobic digester may include the possibility to increase the fractioning coefficient of $S_i$ from particulate decayed biomass ($f_{S_i,X_b}$) or to introduce a process of hydrolysis for $X_i$. Still, should the hypothesis of a recalcitrant nature for the effluent soluble COD (due to the presence of inert soluble organic matter, $S_i$) prove to hold true, the development of efficient process units for the removal of the residual COD to limit the proliferation of heterotrophic bacteria in microalgae ponds could become less significant, thus simplifying digestate pre-treatment layout and relative costs.

Moreover, compared to the results of the preliminary lab tests, the influent TAC was overestimated mainly because of a fictitious addition of $S_{ic}$ at the interface (due to source-sink exploitation): the authors propose to dynamically update the C content of $X_s$ considering the amount of the different components (macromolecules) from ADAB-ADM, as it was similarly done for P. In this way, the carbon content of $X_s$ would be higher, and much similar to that of $X_{ch}$, thus balancing the lower carbon content of the bacterial biomass and preventing $S_{ic}$ to be modified as a source-sink.

The two precipitated salts in digestate, $X_{stru}$ and $X_{ccm}$, redissolved in the pond because of the relatively high presence of seeding material, varying according to temperature dynamics. Results also confirmed the importance of accurately predict P speciation in the pond to further estimate microalgal growth. Indeed, simulations made without pH control (therefore leading to a higher average pH, increased precipita-tion and lower redissolution in the pond) and/or excluding the precipita-tion of $X_{ccm}$ (leading to relevant $X_{acp}$ precipitation in the digester, reducing the overall $S_{ip}$) resulted in severe P limitation of microalgae growth.

Overall, the yearly average of the algal productivity was 10.7 g VSS·m⁻²·d⁻¹ for the baseline scenario (S1.1.1-O). The productivities ob-tained through simulations are well in line with previous experimental reports obtained with agro-zootechnical digestates, that has been re-ported to vary in the range 4.2-22 g VSS·m⁻²·d⁻¹ [18,70,79,80]. More-over, similar productivities (3.8-9.5 g VSS·m⁻²·d⁻¹) have been previously obtained in pilot-scale studies carried out under similar weather con-ditions [23,81].

The concentration of heterotrophic bacteria in the baseline scenario accounted for 15 % of the total biomass concentration. Results from other algae-bacteria models reported in the literature confirm that the obtained proportion of heterotrophic bacteria over the total biomass concentration is reasonable. Maximum values around 10 % were often obtained in similar case studies, i.e., using digestate with high concen-trations of recalcitrant COD and with conventional pond operations (e. g., HRT and liquid depth) [46,70,82]. On the other hand, previous model-based analyses showed that, when using municipal wastewaters or streams in which the available COD is mostly available for hetero-trophic bacteria, or when strongly reducing the HRT of the system, their concentration can strongly increase, representing more than 50 % of the total biomass concentration [70,82–84].

In terms of nutrient removal, the TAN removal efficiency obtained in the baseline scenario was 50.3 %, which is low compared to other literature reports performed on similar types of digestate. For example, average removal efficiencies higher than 80 %, reaching almost com-plete removal, were reported using anaerobic digestate from piggery wastewaters in similar climatic conditions [18,79]. However, a high
<figure><img src="image_7.png" /><figcaption>**Fig. 5.** Input digestate liquid fraction properties to the ALBA model for the different scenarios tested: effect of AD operative conditions.</figcaption></figure>

variability was reported in the literature, and the TAN removal efficiency obtained in other studies was similarly low. For example, in Raeisossadati et al. [80], an average TAN removal efficiency of 69% was reported, mainly due to the high TAN concentration in the influent digestate [80]. In the model-based study by Casagli et al. [70], it was demonstrated that the TAN removal efficiency could easily drop below the levels reported in this study, as a combination of the main operational conditions of the pond (i.e., the HRT, pH control setpoint, and volumetric mass transfer rates). It should be also stressed that the operational condition maintained in the algal pond described in this study are not aimed at maximizing the nutrient removal efficiency, as the main objective of the process is the production of algal biomass for digestate nutrients valorisation. Indeed, the two objectives of reaching high removal efficiencies and high productivities cannot be always obtained at the same time [85].

### 3.2.3. Scenario analysis

The yearly average values of the state variables in the relevant sections of the biorefinery for all the scenario of the agro-zootechnical case-study are reported in Supplementary Material (Tables S15-S20). The

boxplots of raceway influent TAN, phosphate, TAC and COD<sub>tot</sub> concentrations predicted over one year of simulation are shown in Fig. 5 for the four different scenarios. The analysis of variance (ANOVA) proved statistically relevant differences (p < 0.05) only for COD<sub>tot</sub> and for soluble inorganic phosphorous in the scenario S.1.2.2-O. It is worth mentioning that when the feeding regime was characterized by higher maize silage to cow slurry ratios and relatively low HRTs (such as in the scenario S.1.2.2-O), small changes within the uncertainty region associated with kinetic parameters and influent characterization lead to the acidification of the digester, with dramatic reduction of biogas and algal production (if the pH control is not active in the pond).

Fig. 6 depicts the trend of algal growth for the four different scenarios. The best performance in terms of algal biomass production was observed during spring for the baseline scenario (S.1.1.1-O) and for the scenario with an increased digester HRT and unchanged feeding strategy (S.2.1.1-O). Indeed, the high flowrate of cow slurry resulted in increased influent P amounts to the digester and thus in higher S<sub>ip</sub> concentrations in the liquid digestate, allowing for a lower microalgal P limitation. Still, influent P from tomato peels fed during summer provided sufficient S<sub>ip</sub> availability in autumn due to the digester inertia, resulting in limited
<figure><img src="image_8.png" /><figcaption>**Fig. 6.** Effect of the different tested AcoD operative conditions. Yearly dynamics of: (a) microalgae ($X_{alg}$) and (b) heterotrophic bacteria ($X_h$) concentrations. The description of scenario labels is reported in Table 1. The plot line of scenario S.1.1.1-O line always hides behind others.</figcaption></figure>

differences between scenarios.

The concentration of heterotrophic bacteria was higher for scenarios S.1.2.2-O and S.2.2.2-O, mostly due to the increased undegraded organic matter load coming from the digester. This, in turn, would determine lower CO₂ injection rates to perform pH control.

The effect of including a greenhouse cover in the raceway configuration is shown in Fig. 7. Although a greenhouse cover ensured higher productivities during winter as compared to the “Open” scenario, excessive covering (i.e., the “Two-covers” scenario) can lead to strong pond overheating during summer, resulting in the culture breakdown. The summer productivity was more sensitive to temperature variations, while the productivity in winter was mainly limited by light availability. On a yearly average, the algal productivity of the baseline scenario was comparable to the "One-cover" scenario (10.6 g VSS·m⁻²·d⁻¹), while a much lower productivity was computed with two covers (6.2 g VSS·m⁻²·d⁻¹, -44 % with respect to open pond). Clearly, these results are specific to the plant latitude (climatic conditions) and the algal thermal response that were assumed.

The presented scenario analysis proved the importance of properly setting and operating the AcoD unit to maximise the biogas and microalgae production. Both the selection of proper co-substrates (i.e., considering seasonal changes in the feed, according to the availability of different feedstocks), and of the digester operational parameters must be carefully considered to optimize the effluent inorganic nutrient concentrations. An accurate mathematical description of both the AcoD and microalgae sections is therefore essential, but care should also be taken in modelling of S/L separation units, whose performances are typically feedstock-specific and remain an interesting open point for further research. On the other hand, the analysis revealed the potential robustness of microalgae cultivation to different AcoD design and

operations.

### 3.3. Recommendations and future developments

The main scope of this work was the development of an interface to connect anaerobic digestion and microalgae cultivation models. Of particular importance were, on one hand, the identification of the most adequate complexity for the physicochemical model and, on the other hand, the incorporation of significant components and biological processes with proper kinetic modelling.

A thorough validation of the proposed plant-wide model is deemed essential to assess its predictive ability, and to verify the need for more detailed modelling, with particular focus on topics listed below.

- Refinement of the ADAB-ADM input COD fractioning, depending on the type of feeding substrate: a monitoring plan of the digester influent and effluent streams should be defined accordingly, also including a proper estimation of component degradability based on information drawn from batch lab-scale tests and on the measurement of total and soluble organics.

- Improvement in the description of hydrolysis processes in AcoD systems, to distinguish between the kinetic rates of different types of carbohydrates, proteins, and lipids. In addition, hydrolysis kinetic models different from the first order (e.g., Contois model, surface-based kinetic model [86,87]) may further improve the prediction capability of the AD model.

- Development and testing of modelling approaches to reproduce the formation of inert soluble COD in the anaerobic digester: for instance, by increasing the fraction of $S_i$ generated from particulate decayed biomass, or by introducing the hydrolysis process of $X_i$.
<figure><img src="image_9.png" /><figcaption>**Fig. 7.** Effect of the different tested RWP thermal configuration. Yearly dynamics of: (a) RWP water temperature and (b) microalgae ($X_{alg}$) concentration. The description of scenario labels is reported in Table 1.</figcaption></figure>

- The inclusion of ion-pairing and other precipitates (i.e., OCP, DCPD) in the ADAB-PCM, also depending on feeding feedstocks, to widen the applicability scope of the model.

- Development/extension of the ADAB-ALBA model with microalgal heterotrophic growth processes.

- Development and modelling of respirometry tests to validate hypothesis on anaerobic bacterial biomass fractioning at the interface.

- De-lumping of the ADAB-ALBA organic state variables to guarantee low source-sink exploitation: this would require the knowledge of the metabolism of $X_h$ and heterotrophic microalgae on the different macromolecules included in the model.

- Extension of the ADAB-ALBA model to consider the effects of residual turbidity, colour, salinity, and toxicity of the treated liquid digestate on the light penetration and microalgal growth.

- Improved modelling of S/L separation units, exploiting the available knowledge on the process physics and chemistry, as well as defining statistical correlations between digestate physicochemical characteristics and its dewatering properties [88].

- Implementation of a pond downstream S/L unit for algae harvesting and the recirculation of the supernatant stream, thus allowing for the pond operation with decoupled HRT and biomass retention time (BRT).

## 4. Conclusions

A novel interface between the ADM1 and the ALBA models is proposed to allow for plant-wide modelling of a biorefinery including anaerobic digestion and microalgae-bacteria cultivation on digestate (ADAB). Within this context, accurate prediction of nutrients fate, particularly of P, is essential to ensure process performances. To this

aim, a simplified PCM was adopted to reduce model complexity and computation time, while ensuring model accuracy (P fractioning error below 2 %). A verification using MINTEQ highlighted the increased appropriateness of the simplified PCM in modelling case-studies featured by high *I* and low water hardness, such as agro-zootechnical digesters (prediction errors of pH and $S_{ip}$ below 0.04 % and 1.4 %). Despite the different lumping degree of the two model structures, the proposed interface resulted in limited source-sink exploitation (below 12 %), thanks to the adjustment of some P content coefficients of the ADAB-ALBA model state variables.

A scenario analysis was used to preliminary assess the impact of digester design and feeding strategy on digestate properties and microalgae production, with particular focus on the risk of algal P limitations due to precipitation. Results highlighted the importance of properly designing the whole biorefinery and yet, a noteworthy robustness to scenario variability of the microalgae cultivation performance. Microalgal productivity was found to be strongly affected by the presence of a double-cover greenhouse on the raceway pond (e.g., -44 % yearly average productivity).

Further validation with monitoring data collected at pilot- to full-scale plants is still required to quantify the actual ADAB model predictive ability and field of application, as well as to identify further model extensions or modifications. The proposed model is intended to be used in support of technology scale-up and optimization.

## CRediT authorship contribution statement

D. Carecci: Conceptualization, Data curation, Formal analysis, Investigation, Methodology, Resources, Software, Validation, Writing – original draft, Writing – review & editing. A. Catenacci: Data curation,
Formal analysis, Investigation, Methodology, Resources, Software, Supervision, Visualization, Writing – original draft, Writing – review & editing. **S. Rossi:** Data curation, Formal analysis, Investigation, Methodology, Resources, Software, Supervision, Visualization, Writing – original draft, Writing – review & editing. **F. Casagli:** Resources, Software, Writing – review & editing. **G. Ferretti:** Funding acquisition, Project administration, Resources, Supervision, Writing – review & editing. **A. Leva:** Project administration, Resources, Supervision, Writing – review & editing. **E. Ficara:** Conceptualization, Funding acquisition, Methodology, Project administration, Resources, Supervision, Writing – review & editing.

## Declaration of competing interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

## Data availability

Data will be made available on request.

## Acknowledgments

This research was co-funded by A2A S.p.a. (Agripower group), the Italian Ministry of University and Research (MUR) under the National Recovery and Resilience Plan (NRRP), and the European Union (EU) under the NextGenerationEU project (National Agritech center). The authors are thankful to BTS S.r.l. for providing data of feedstock characterization and co-digester operation.

## Appendix A. Supplementary data

Supplementary data to this article can be found online at https://doi.org/10.1016/j.cej.2024.149981.

## References

[1] EBA statistical report 2022 - Tracking biogas and biomethane deployment across Europe, European Biogas Association (2022). https://www.europeanbiogas.eu/wp-content/uploads/2022/12/EBA-Statistical-Report-2022-Short-version.pdf.

[2] T. Abbasi, S.M. Tauseef, S.A. Abbasi, Anaerobic digestion for global warming control and energy generation—An overview, Renewable and Sustainable Energy Reviews 16 (5) (2012) 3228–3242, https://doi.org/10.1016/j.rser.2012.02.046.

[3] Y.K. Leong, J.-S. Chang, Integrated role of algae in the closed-loop circular economy of anaerobic digestion, Bioresource Technology 360 (2022) 127618, https://doi.org/10.1016/j.biortech.2022.127618.

[4] A. Akhiar, A. Battimelli, M. Torrijos, H. Carrere, Comprehensive characterization of the liquid fraction of digestates from full-scale anaerobic co-digestion, Waste Management 59 (2017) 118–128, https://doi.org/10.1016/j.wasman.2016.11.005.

[5] F. Tambone, V. Orzi, G. D’Imporzano, F. Adani, Solid and liquid fractionation of digestate: Mass balance, chemical characterization, and agronomic and environmental value, Bioresource Technology 243 (2017) 1251–1256, https://doi.org/10.1016/j.biortech.2017.07.130.

[6] E. Uggetti, B. Sialve, E. Trably, J.-P. Steyer, Integrating microalgae production with anaerobic digestion: a biorefinery approach, Biofuels, Bioproducts and Biorefining 8 (4) (2014) 516–529, https://doi.org/10.1002/bbb.1469.

[7] G. Kaur, et al., Value Addition of Anaerobic Digestate From Biowaste: Thinking Beyond Agriculture, Current Sustainable/Renewable Energy Reports 7 (2) (2020) 48–55, https://doi.org/10.1007/s40518-020-00148-2.

[8] R. Feiz, G. Carraro, C. Brienza, E. Meers, M. Verbeke, K. Tonderski, Systems analysis of digestate primary processing techniques, Waste Management 150 (2022) 352–363, https://doi.org/10.1016/j.wasman.2022.07.013.

[9] L. Bauer, K. Ranglová, J. Masojídek, B. Drosg, K. Meixner, Digestate as Sustainable Nutrient Source for Microalgae—Challenges and Prospects, Applied Sciences 11 (3) (2021) 1056, https://doi.org/10.3390/app11031056.

[10] F. Monlau, C. Sambusiti, E. Ficara, A. Aboulkas, A. Barakat, H. Carrère, New opportunities for agricultural digestate valorization: current situation and perspectives, Energy and Environmental Science 8 (9) (2015) 2600–2621, https://doi.org/10.1039/C5EE01633A.

[11] A. Tawfik, M. Eraky, N.S. Alhajeri, A.I. Osman, D.W. Rooney, Cultivation of microalgae on liquid anaerobic digestate for depollution, biofuels and cosmetics: a review, Environmental Chemistry Letters 20 (6) (2022) 3631–3656, https://doi.org/10.1007/s10311-022-01481-2.

[12] A. Xia, J.D. Murphy, Microalgal Cultivation in Treating Liquid Digestate from Biogas Systems, Trends in Biotechnology 34 (4) (2016) 264–275, https://doi.org/10.1016/j.tibtech.2015.12.010.

[13] C.C. Chong, et al., Anaerobic digestate as a low-cost nutrient source for sustainable microalgae cultivation: A way forward through waste valorization approach, Science of The Total Environment 803 (2022) 150070, https://doi.org/10.1016/j.scitotenv.2021.150070.

[14] R.V. Kapoore, E.E. Wood, C.A. Llewellyn, Algae biostimulants: A critical look at microalgal biostimulants for sustainable agricultural practices, Biotechnology Advances 49 (2021) 107754, https://doi.org/10.1016/j.biotechadv.2021.107754.

[15] A. Morillas-España, T. Lafarga, A. Sánchez-Zurano, F.G. Acién-Fernández, C. González-López, Microalgae based wastewater treatment coupled to the production of high value agricultural products: Current needs and challenges, Chemosphere 291 (2022) 132968, https://doi.org/10.1016/j.chemosphere.2021.132968.

[16] L.M. González-González, et al., Biogas production coupled to repeat microalgae cultivation using a closed nutrient loop, Bioresource Technology 263 (2018) 625–630, https://doi.org/10.1016/j.biortech.2018.05.039.

[17] C. Ledda, A. Schievano, B. Scaglia, M. Rossoni, F.G. Acién Fernández, F. Adani, Integration of microalgae production with anaerobic digestion of dairy cattle manure: an overall mass and energy balance of the process, Journal of Cleaner Production 112 (2016) 103–112, https://doi.org/10.1016/j.jclepro.2015.07.151.

[18] A. Pizzera, et al., Digestate treatment with algae-bacteria consortia: A field pilot-scale experimentation in a sub-optimal climate area, Bioresource Technology 274 (2019) 232–243, https://doi.org/10.1016/j.biortech.2018.11.067.

[19] W.A.V. Stiles, et al., Using microalgae in the circular economy to valorise anaerobic digestate: challenges and opportunities, Bioresource Technology 267 (2018) 732–742, https://doi.org/10.1016/j.biortech.2018.07.100.

[20] L.T. Arashiro, I. Josa, I. Ferrer, S.W.H. Van Hulle, D.P.L. Rousseau, M. Garff, Life cycle assessment of microalgae systems for wastewater treatment and bioproducts recovery: Natural pigments, biofertilizer and biogas, Science of The Total Environment 847 (2022) 157615, https://doi.org/10.1016/j.scitotenv.2022.157615.

[21] C. Tua, E. Ficara, V. Mezzanotte, L. Rigamonti, Integration of a side-stream microalgae process into a municipal wastewater treatment plant: A life cycle analysis, Journal of Environmental Management 279 (2020) 111605, https://doi.org/10.1016/j.jenvman.2020.111605.

[22] S. Chaudry, Integrating Microalgae Cultivation with Wastewater Treatment: a Peek into Economics, Applied Biochemistry and Biotechnology 193 (10) (2021) 3395–3406, https://doi.org/10.1007/s12010-021-03612-x.

[23] S. Rossi, et al., Microalgal cultivation on digestate: Process efficiency and economics, Chemical Engineering Journal 460 (2023) 141753, https://doi.org/10.1016/j.cej.2023.141753.

[24] J. Al-Mallahi, K. Ishii, Attempts to alleviate inhibitory factors of anaerobic digestate for enhanced microalgae cultivation and nutrients removal: A review, Journal of Environmental Management 304 (2022) 114266, https://doi.org/10.1016/j.jenvman.2021.114266.

[25] S. Rossi, et al., Free ammonia inhibition in microalgae and cyanobacteria grown in wastewaters: Photo-respirometric evaluation and modelling, Bioresource Technology 305 (2020) 123046, https://doi.org/10.1016/j.biortech.2020.123046.

[26] M. Henze, W. Gujer, T. Mino, e M. van Loosedrecht, Activated Sludge Models ASM1, ASM2, ASM2d and ASM3, IWA Publishing (2006), https://doi.org/10.2166/9781780402369.

[27] D.J. Batstone, et al., Anaerobic Digestion Model No.1 (ADM1). Scientific and technical report / IWA, in: 13, IWA Publishing, London, 2002.

[28] C. Vaneecckaute, F.H.A. Claey s, F.M.G. Tack, E. Meers, E. Belia, P. A. Vanrolleghem, Development, implementation, and validation of a generic nutrient recovery model (NRM) library, Environmental Modelling & Software 99 (2018) 170–209, https://doi.org/10.1016/j.envsoft.2017.09.002.

[29] F. Casagli, G. Zuccaro, O. Bernard, J.-P. Steyer, e E. Ficara, ALBA: A comprehensive growth model to optimize algae-bacteria wastewater treatment in raceway ponds, Water Research 190 (2021) 116734, https://doi.org/10.1016/j.watres.2020.116734.

[30] J.B. Copp, U. Jeppsson, C. Rosen, Toward an ASM1 – ADM1 state variable interface for plant-wide wastewater treatment modeling, WEFTEC 2003, Water Environment Federation (2003) 498–510, in: https://www.accesswater.org/publications/procdings-/290550/towards-an-asm1—adm1-state-variable-interface-for-plant-wi de-wastewater-treatment-modeling.

[31] I. Nopens, et al., An ASM/ADM model interface for dynamic plant-wide simulation, Water Research 43 (7) (2009) 1913–1923, https://doi.org/10.1016/j.watres.2009.01.012.

[32] E.I.P. Volcke, M.C.M. Van Loosde recht, P.A. Vanrolleghem, Continuity-based model interfacing for plant-wide simulation: A general approach, Water Research 40 (15) (2006) 2817–2828, https://doi.org/10.1016/j.watres.2006.05.011.

[33] B. Solís, A. Guisasola, X. Flores-Alsina, U. Jeppsson, J.A. Baeza, A plant-wide model describing GHG emissions and nutrient recovery options for water resource recovery facilities, Water Research 215 (2022) 118223, https://doi.org/10.1016/j.watres.2022.118223.

[34] E. Zaborowska, K. Czerwionka, J. Maķinia, Integrated plant-wide modelling for evaluation of the energy balance and greenhouse gas footprint in large wastewater treatment plants, Applied Energy 282 (2021) 116126, https://doi.org/10.1016/j.apenergy.2020.116126.
[35] X. Flores-Alsina, et al., Evaluation of anaerobic digestion post-treatment options using an integrated model-based approach, Water Research 156 (2019) 264–276, https://doi.org/10.1016/j.watres.2019.02.035.

[36] U. Jeppsson, et al., Benchmark simulation model no 2: general protocol and exploratory case studies, Water Science and Technology 56 (8) (2007) 67–78, https://doi.org/10.2166/wst.2007.604.

[37] U. Zaher, R. Li, U. Jeppsson, J.-P. Steyer, S. Chen, GISCOD (2009) 2717–2727, https://doi.org/10.1016/j.watres.2009.03.018.

[38] S. Xie, et al., Anaerobic co-digestion: A critical review of mathematical modelling for performance optimization, Bioresource Technology 222 (2016) 498–512, https://doi.org/10.1016/j.biortech.2016.10.015.

[39] S. García-Gen, J.M. Lema, J. Rodríguez, Generalised modelling approach for anaerobic co-digestion of fermentable substrates, Bioresource Technology 147 (2013) 525–533, https://doi.org/10.1016/j.biortech.2013.08.063.

[40] B. Fezzani, R. Ben Cheikh, Extension of the anaerobic digestion model No. 1 (ADM1) to include phenol compounds biodegradation processes for simulating the anaerobic co-digestion of olive mill wastes at mesophilic temperature, Journal of Hazardous Materials 17 (2–3) (2009) 1430–1438, https://doi.org/10.1016/j.jhazmat.2009.08.017.

[41] M. Myint, N. Nirmalakhandan, R.E. Speece, Anaerobic fermentation of cattle manure: Modeling of hydrolysis and acidogenesis, Water Research 41 (2) (2007) 323–332, https://doi.org/10.1016/j.watres.2006.10.026.

[42] S. García-Gen, et al., Kinetic modelling of anaerobic hydrolysis of solid wastes, including disintegration processes, Waste Management 35 (2015) 96–104, https://doi.org/10.1016/j.wasman.2014.10.012.

[43] D.J. Batstone, D. Puyol, X. Flores-Alsina, J. Rodríguez, Mathematical modelling of anaerobic digestion processes: applications and future needs, Reviews in Environmental Science and Bio/Technology 14 (4) (2015) 595–613, https://doi.org/10.1007/s11157-015-9376-4.

[44] M. Lübken, P. Kosse, K. Koch, T. Gehring, M. Wichern, Influent Fractionation for Modeling Continuous Anaerobic Digestion Processes, *Biogas Science and Technology*, G. M. Guebitz, A. Bauer, G. Bochmann, A. Gronauer, S. Weiss, Advances in Biochemical Engineering/Biotechnology, Springer International Publishing, (2015), 137–169. doi: 10.1007/978-3-319-21993-6-6.

[45] X. Flores-Alsina, et al., Modelling phosphorus (P), sulfur (S) and iron (Fe) interactions for dynamic simulations of anaerobic digestion processes, Water Research 95 (2016) 370–382, https://doi.org/10.1016/j.watres.2016.03.012.

[46] F. Casagli, O. Bernard, How Heat Transfer Indirectly Affects Performance of Algae-Bacteria Raceways, Microorganisms 10 (8) (2022) 1515, https://doi.org/10.3390/microorganisms10081515.

[47] F. Casagli, O. Bernard, Simulating biotechnological processes affected by meteorology: Application to algae-bacteria systems, Journal of Cleaner Production (2022) 134190, https://doi.org/10.1016/j.jclepro.2022.134190.

[48] S. Rossi, D. Carecci, E. Ficara, Thermal response analysis and compilation of cardinal temperatures for 424 strains of microalgae, cyanobacteria, diatoms and other species, Science of The Total Environment 873 (2023) 162275, https://doi.org/10.1016/j.scitotenv.2023.162275.

[49] S. Li, D.H. Willits, C.L. Browdy, M.B. Timmons, T.M. Losordo, Thermal modeling of greenhouse aquaculture raceway systems, Aquacultural Engineering 41 (1) (2009) 1–13, https://doi.org/10.1016/j.aquaeng.2009.04.002.

[50] A.M. Åkerström, L.M. Mortensen, B. Rusten, H.R. Gislerød, Biomass production and removal of ammonium and phosphate by Chlorella sp. in sludge liquor at natural light and different levels of temperature control, SpringerPlus 5 (1) (2016) 676, https://doi.org/10.1186/s40064-016-2266-6.

[51] B. Qébetch, A. Shilton, O.B. Fringer, R. Muñoz, B. Guieysse, Mechanistic Modeling of Broth Temperature in Outdoor Photobioreactors, Environmental Science and Technology 44 (6) (2010) 2197–2203, https://doi.org/10.1021/es903214u.

[52] C.M. Knutson, E.M. McLaughlin, B.M. Barney, Effect of temperature control on green algae grown under continuous culture, Algal Research 35 (2018) 301–308, https://doi.org/10.1016/j.algal.2018.08.020.

[53] D. Batstone, X. Flores-Alsina, Generalised Physicochemical Model (PCM) for *Wastewater Processes*, IWA Publishing (2022), https://doi.org/10.2166/9781780409832.

[54] K. Solon, et al., Effects of ionic strength and ion pairing on (plant-wide) modelling of anaerobic digestion, Water Research 70 (2015) 235–245, https://doi.org/10.1016/j.watres.2014.11.035.

[55] D.J. Batstone, et al., Towards a generalized physicochemical framework, Water Science and Technology 66 (6) (2012) 1147–1161, https://doi.org/10.2166/wst.2012.300.

[56] M. Patón, R. González-Cabaleiro, J. Rodríguez, Activity corrections are required for accurate anaerobic digestion modelling, Water Science and Technology 77 (8) (2018) 2057–2067, https://doi.org/10.2166/wst.2018.119.

[57] Y. Zhang, S. Piccard, W. Zhou, Improved ADM1 model for anaerobic digestion process considering physico-chemical reactions, Bioresource Technology 196 (2015) 279–289, https://doi.org/10.1016/j.biortech.2015.07.065.

[58] P. Koutsoukos, Z. Amjad, M.B. Tomson, G.H. Nancollas, Crystallization of calcium phosphates. A constant composition study, Journal of the American Chemical Society 102 (5) (1980) 1553–1557, https://doi.org/10.1021/ja00525a015.

[59] C. Kazadi Mbamba, D.J. Batstone, X. Flores-Alsina, S. Tait, A generalised chemical precipitation modelling approach in wastewater treatment applied to calcite, Water Research 68 (2015) 342–353, https://doi.org/10.1016/j.watres.2014.10.011.

[60] S. Aparicio, J. González-Camejo, A. Seco, L. Borrás, Á. Robles, J. Ferrer, Integrated microalgae-bacteria modelling: application to an outdoor membrane

photobioreactor (MPBR), Science of the Total Environment 884 (2023) 163669, https://doi.org/10.1016/j.scitotenv.2023.163669.

[61] R. Barat, T. Montoya, A. Seco, J. Ferrer, Modelling biological and chemically induced precipitation of calcium phosphate in enhanced biological phosphorus removal systems, Water Research 45(12) (2011) 3744–3752, https://doi.org/10.1016/j.watres.2011.04.028.

[62] K. Solon, et al., Effects of ionic strength and ion pairing on (plant-wide) modelling of anaerobic digestion, Water Research 70 (2015), 235–245, https://doi.org/10.1016/j.watres.2014.11.035.

[63] G. Beggio, W. Peng, F. Lü, A. Cerasaro, T. Bonato, A. Pivato, Chemically enhanced solid-liquid separation of digestate: suspended solids removal and effects on environmental quality of separated fractions, Water and Biomass Valorization 13 (2) (2022) 1029–1041, https://doi.org/10.1007/s12649-021-01591-y.

[64] F. Guilayn, J. Jimenez, M. Rouez, M. Crest, D. Patureau, Digestate mechanical separation: efficiency profiles based on anaerobic digestion feedstock and equipment choice, Bioresource Technology 274 (2019) 180–189, https://doi.org/10.1016/j.biortech.2018.11.090.

[65] A. Akhiar, F. Guilayn, M. Torrijos, A. Battimelli, A.H. Shamsuddin, H. Carrère, Correlations between the Composition of Liquid Fraction of Full-Scale Digestates and Process Conditions, Energies 14 (4) (2021) 971, https://doi.org/10.3390/en14040971.

[66] P. Fritzman, et al., The OpenModelica Integrated Model for Modeling, Simulation, and Model-Based Development, *Modeling, Identification and Control, Norwegian Society of Automatic*, Control 41 (4) (2020) 241–295, https://doi.org/10.4173/mic.2020.4.1.

[67] L.R. Petzold, Description of DASSL: a differential/algebraic system solver, Sandia National Labs, Livermore, CA (USA), 1982. https://www.osti.gov/biblio/5882821.

[68] H. Elmqvist, M. Otter. Methods for Tearing Systems of Equations in Object-Oriented Modeling, Proc. ESM'94 European Simulation Multiconference Barcelona, Spain, 1994, pp. 326–332. https://elib.dlr.de/28159/.

[69] C. Rosen, U. Jeppsson. Aspects on ADM1 implementation within the BSM2 framework«, Department of Industrial Electrical Engineering and Automation, Lund University, Lund, Sweden, 2006, pp. 1–35.

[70] F. Casagli, S. Rossi, J.P. Steyer, O. Bernard, E. Ficara, Balancing microalgae and nitrifiers for wastewater treatment: can inorganic carbon limitation cause an environmental threat? Environmental Science and Technology 55(6) (2021) 3940–3955, https://doi.org/10.1021/acs.est.0c05264.

[71] G.K. Kafle, L. Chen, Comparison on batch anaerobic digestion of five different livestock manures and prediction of biochemical methane potential (BMP) using different statistical models, Waste Management 48 (2016) 492–502, https://doi.org/10.1016/j.wasman.2015.10.021.

[72] S. Weinrich, E. Mauky, T. Schmidt, C. Krebs, J. Liebetrau, M. Nelles, Systematic simplification of the Anaerobic Digestion Model No. 1 (ADM1) – Laboratory experiments and model application, Bioresource Technology 333 (2021) 125104, https://doi.org/10.1016/j.biortech.2021.125104.

[73] S. Weinrich, M. Nelles, Systematic simplification of the Anaerobic Digestion Model No (ADM1) – Model development and stoichiometric analysis, Bioresource Technology 333 (2021) 125124, https://doi.org/10.1016/j.biortech.2021.125124.

[74] A. Catenacci, A. Azzellino, F. Malpei, Development of statistical predictive models for estimating the methane yield of Italian municipal sludges from chemical composition: a preliminary study, Water Science and Technology 79 (3) (2019) 435–447, https://doi.org/10.2166/wst.2019.063.

[75] C. Holliger, S. Astals, H.F. de Laclos, S.D. Hafner, K. Koch, S. Weinrich, Towards a standardization of biomethane potential tests: a commentary, Water Science and Technology 83 (1) (2020) 247–250, https://doi.org/10.2166/wst.2020.569.

[76] A. Catenacci, A. Santus, F. Malpei, G. Ferretti, Early prediction of BMP tests: a step response method for estimating first-order model parameters, Renewable Energy 188 (2022) 184–194, https://doi.org/10.1016/j.renene.2022.02.017.

[77] K. Butkowska, I. Bialobrzewski, E. Klimiuk, T. Pokój, Kinetic parameters of volatile fatty acids uptake in the ADM1 as key factors for modeling co-digestion of silages with pig manure, thin stillage and glycerine phase, Renewable Energy 126 (2018) 163–176, https://doi.org/10.1016/j.renene.2018.03.038.

[78] J.M. Triolo, S.G. Sommer, H.B. Møller, M.R. Weisbjerg, X. Y. Jiang, A new algorithm to characterize biodegradability of biomass during anaerobic digestion: influence of lignin concentration on methane production potential, Bioresource Technology 102(20) (2011) 9395–9402, https://doi.org/10.1016/j.biortech.2011.07.026.

[79] T. Bongiorno, et al., Microalgae from Biorefinery as Potential Protein Source for Siberian Sturgeon (A. baerii) Aquafeed, Sustainability 12 (21) (2020) 8779, https://doi.org/10.3390/su12218779.

[80] M. Raeisossadati, A. Vadiveloo, P.A. Bahri, D. Parlevliet, N.R. Moheimani, Treating anaerobically digested piggery effluent (ADPE) using microalgae in thin layer reactor and raceway pond, Journal of Applied Phycology 31 (4) (2019) 2311–2319, https://doi.org/10.1007/s10811-019-01760-6.

[81] M. Mantovani, F. Marazzi, R. Fornaroli, M. Bellucci, E. Ficara, V. Mezzanotte, Outdoor pilot-scale raceway as a microalgae-bacteria sidestream treatment in a WWTP, Science of the Total Environment 710 (2020) 135583, https://doi.org/10.1016/j.scitotenv.2019.135583.

[82] R. Nordio, E. Rodríguez-Miranda, F. Casagli, A. Sánchez-Zurano, J.L. Guzmán, G. Acién, ABACO-2: a comprehensive model for microalgae-bacteria consortia consortia validated outdoor at pilot-scale, Water Research 248 (2024) 120837, https://doi.org/10.1016/j.watres.2023.120837.

[83] A. Solimeno, L. Parker, T. Lundquist, J. García, Integral microalgae-bacteria model (BIO_ALGAE): application to wastewater high rate algal ponds, Science of the Total Environment 601–602 (2017) 646–657, https://doi.org/10.1016/j.scitotenv.2017.05.215.
[84] S. Rossi, et al., Integrating microalgae growth in biomethane plants: process design, modelling, and cost evaluation, Heliyon 10 (1) (2024) e23240, https://doi.org/10.1016/j.heliyon.2023.e23240.

[85] F. Casagli, F. Beline, E. Ficara, O. Bernard, Optimizing resource recovery from wastewater with algae-bacteria membrane reactors, Chemical Engineering Journal 451 (2023) 138488, https://doi.org/10.1016/j.cej.2022.138488.

[86] W.T.M. Sanders, M. Geerink, G. Zeeman, G. Lettinga, Anaerobic hydrolysis kinetics of particulate substrates, Water Science and Technology 41(3) (2000) 17-24, https://doi.org/10.2166/wst.2000.0051.

[87] V.A. Vavilin, B. Fernandez, J. Palatsi, X. Flotats, Hydrolysis kinetics in anaerobic degradation of particulate organic material: an overview, Waste Management 28 (6) (2008) 939-951, https://doi.org/10.1016/j.wasman.2007.03.028.

[88] O.K. Svennevik, et al., CNash - a novel parameter predicting cake solids of dewatered digestates, Water Research 158 (2019) 350-358, https://doi.org/10.1016/j.watres.2019.04.037.