How Heat Transfer Indirectly Affects Performance of Algae-Bacteria Raceways

Oxygenation in wastewater treatment leads to a high energy demand. High-rate algal-bacterial ponds (HRABP) have often been considered an interesting solution to reduce this energy cost, as the oxygen is provided by microalgae during photosynthesis. These complex dynamic processes are subject to solar fluxes and consequently permanent fluctuations in light and temperature. The process efficiency therefore highly depends on the location and the period of the year. In addition, the temperature response can be strongly affected by the process configuration (set-up, water depth). Raised pilot-scale raceways are typically used in experimental campaigns, while raceways lying on the ground are the standard reactor configuration for industrial-scale applications. It is therefore important to assess what the consequences are for the temperature patterns of the different reactor configurations and the water levels. The long-term validated algae-bacteria (ALBA) model was used to represent algae-bacteria dynamics in HRABPs. The model was previously validated over 600 days of outdoor measurements, at two different locations and for the four seasons. However, the first version of the model, like all the existing algae-bacteria models, was not fully predictive, since, to be run, it required the measurement of water temperature. The ALBA model was therefore updated, coupling it with a physical model that predicts the temperature evolution in the HRABP. A heat transfer model was developed, and it was able to accurately predict the temperature during the year (with a standard error of 1.5 °C). The full predictive model, using the temperature predictions, degraded the model’s predictive performances by less than 3%. N2O predictions were affected by ±7%, highlighting the sensitivity of nitrification to temperature The temperature response for two different process configurations were then compared. The biological process can be subjected to different temperature dynamics, with more extreme temperature events when the raceway does not lie on the ground and for thinner depths. Such a situation is more likely to lead to culture crashes.


Introduction
In the last decades, microalgae have appeared as a new promising biological resource and received much attention. The market for valuable products derived from microalgae is growing rapidly [1], with applications in fish farming, bio-plastics, the food industry, and cosmetics [2]. Biomass production is mainly carried out in open raceways [3]. These outdoor paddle-wheel-agitated tanks are cheap production systems, and there has been an intense ongoing debate as to whether their actual productivity compared to closed photobioreactors is significantly lower [4]. Microalgae cultivated in raceways in association with bacteria are also considered as an interesting solution to reduce the energy demand for oxygenation in wastewater treatment, since oxygen can be provided by the microalgae during photosynthesis.
The performance of these systems is first determined by the amount of photons received by the microalgae, which triggers the photosynthetic reactions. Temperature is the second factor affecting the growth rate of microalgae [5], and it has received much less attention. In fact, temperature strongly affects system performance, especially in outdoor systems, where it is subject to large fluctuations both during the day and seasonally. Predicting the productivity that a raceway can achieve at a given location and for a certain period of the year is becoming a key issue for retrofitting current wastewater treatment plants, and for including microalgae in the process. For this, on top of a biological model, a model predicting the water temperature is necessary.
It turns out that the process configuration (set-up, water depth) can strongly drive the temperature response. Since many studies at pilot scale consider raised raceways, the question that we target is how far will an up-scaled process made of concrete raceways lying on the ground differ from this behaviour due to a different temperature pattern.
Several models were developed to represent the dynamics of algal-bacterial processes, in particular in the field of wastewater treatment using high-rate algal-bacterial ponds (HRABP) [6][7][8][9][10][11]. Among these models, the originality of the ALBA model [10,12] is that it relies on an unprecedented validation of more than 623 days, carried out under outdoor conditions at two different locations and for the four seasons. However, until now, none of these HRABP models were fully predictive, as they require knowledge of the water temperature (or of the temperature below the raceway).
The first objective of this work is to propose a heat transfer model to represent the temperature evolution in one of the outdoor pilot raceways used for validating the ALBA model. This pilot scale experimental raceway (3.8 m 2 ), located in northern Italy, was used to process digestate, and six months of records were used to validate the biological model. The raceway was typical of pilot set-ups for investigating and assessing the process performances in realistic conditions. Several heat transfer models have been proposed for algal raceways. The most popular one was developed by Béchet et al. [13,14]. A simplified model was proposed by Slegers et al. [15]. A combination of these two approaches was then used in Rodríguez-Miranda et al. [16] for a raceway pond. In this paper, we are focusing on a different configuration, where the raceway is not directly in contact with the ground. For this specific configuration, there is no heat transfer model available.
The heat transfer temperature model that we propose was modified from the work of Béchet et al. [13], by adapting it to the specific material and configuration of the reactor. In particular, the temperature dynamics for the raceway material were added, including the exchange with the liquid medium and the environment. This fully predictive version of the ALBA model is therefore able to predict the temperature and the variable volume of the raceway, as well as the dynamics of the process, including microalgae, heterotrophic bacteria, and nitrifying bacteria.
It is important to stress that there are many pilot-scale raceways that are not in direct contact with the ground; thus, their thermal inertia and the associated temperature dynamics differ from the ones at industrial scale. In fact, different reactor configurations are subjected to different heat-transfer contributions and balances, resulting in a different temperature inside the reactor. For instance, when the raceway is lying on the ground, the conduction from the ground mitigates its temperature, while when the reactor is raised up from the ground, the radiation from the ground heats the pond bottom.
With this new fully predictive model version, it became possible to compare the performances of a raised raceway with those of an industrial configuration, where the raceway is made of concrete and lies on the ground. Different water depths were also tested, and they corresponded to different levels of thermal inertia. Algae productivity, nutrient removal rates, and the amount of water lost by evaporation were assessed for these conditions. We show and quantify how the specific reactor design leads to different temperature dynamics, focusing on the extreme temperature values that can be reached in each configuration, especially in the warmest seasons, given their potential strong impact on the biological activity.

Materials and Methods
The HRABP was a pilot-scale polypropylene tank with an operating volume of 0.88 m 3 and a total surface of approximately 3.8 m 2 (see Figure 1). It was installed in the dedicated treatment plant of an intensive piggery farm, located in the north of Italy (Casaletto di Sopra, Cremona, Italy). The monitoring campaign was performed from May to December 2016. The HRABP had two main channels and semi-circular edges. The influent was prepared from the liquid fraction of the digestate from the biogas plant, and by dilution with tap water in order to reduce the influent TAN (total ammoniacal nitrogen) concentration. The influent characteristics were checked once per week, measuring the total suspended solids (TSS), the organic matter (COD total and soluble), phosphates (P − PO 3− 4 ), total ammoniacal nitrogen (TAN), total Kjeldahl nitrogen (TKN), and nitrate (NO − 3 ). The effluent characteristics and therefore the reactor remediation efficiency were quantified by measuring: (i) once per week, the total (TSS) and volatile (VSS) suspended solids and the optical density at 680 nm; and (ii) twice per week with spectrophotometric test kits, the total and soluble organic matter (COD T and COD S , respectively), the phosphates (P − PO 3− 4 ), and the inorganic nitrogen content (NH + 4 , NO − 2 and NO − 3 ). The HRABP was equipped with pH, temperature, and dissolved oxygen concentration probes. The reactor was also equipped with a contact cylinder (height 0.8 m, diameter 0.44 m, volume 0.12 m 3 ) for bubbling pure CO 2 gas to regulate pH at 7.5. The open pond mixing was ensured by a paddle wheel, which was operated at 20 rpm to obtain an average liquid velocity of 0.2 m s −1 . The outflow was from a gravity overflow, setting a maximum liquid depth of 0.2 m and resulting in a variable volume according to the evaporation and rain contribution. An average hydraulic retention time (HRT) of 10 days was set until 11 October 2016; then, the HRT was set to 20 days. Increasing the HRT is a typical operational strategy applied in outdoor bio-processes for wastewater remediation, to compensate for the lower temperature reducing microbial growth rates (typically in the coldest seasons, autumn and winter). This adaptation is necessary to match the limitations imposed by the national normative standards concerning nutrient discharge in water bodies. More details about the experimental campaign and the influent characteristics can be found in Casagli et al. [12], in Pizzera et al. [17], and in Supporting Information (SI.8).

Methodology for Computing the System Key Performance Indicators
In order to assess the HRABP performances according to the two reactor configurations and the different liquid depths, the algal biomass productivity (ALG prod ), the total ammoniacal nitrogen removal rate (TAN RR ), and the nitrogen-to-algae yield (ALG N,yield ) were used as key performance indicators and computed as follows: where X ALG is the algae concentration in the reactor (gCOD m −3 ); S is the reactor surface (m −2 ); φ is the conversion factor from COD to algal dry weight (0.64 gDW gCOD −1 ); TAN in and TAN out are the ammoniacal nitrogen concentration entering and leaving the system, respectively (gN m −3 ); and Q in and Q out are the inflow and outflow rate, respectively (m 3 d −1 ). The biological ALBA model considers a mixed culture of algae (X ALG ), heterotrophic bacteria (X H ), ammonium oxidizing bacteria (X AOB ), and nitrite oxidizing bacteria (X NOB ).

Modelling Approach
The model includes 19 biological processes and involves 17 state variables. The general model structure follows the general mass balance structure [18]: where Q out = Q in + Q rain − Q evap . ξ is the state variable vector (g m −3 ); ξ in is the vector of influent concentrations (g m −3 ); ρ(ξ) is the vector containing the reaction rates (g m −3 d −1 ); Q in , Q rain , and Q evap are the inflow rate, rain rate, and evaporation rate, respectively (m 3 d −1 ); K is the stoichiometric matrix (the transpose of the Peterson matrix); and V is the liquid volume (m 3 ). The flux of gases dissolving or stripping from the liquid medium is denoted as ∆ g (ξ) (g m −3 d −1 ). Hereafter, we recall the main structure of the ALBA model, but we refer the reader to the work of Casagli et al. [10,12] for more details.

General Kinetic Model
The biokinetic rates are based on Liebig's minimum law [19] for limiting substrates (carbon, nitrogen, and phosphorus), meaning that the most limiting nutrient drives the overall kinetics. The general expression describing the structure of the bioprocesses' rates is given by: where X BM,i is the biomass associated to the process ρ j . The associated maximum specific growth rate is µ max j (d −1 ); f pH and f I are the functions describing pH and light dependence, respectively. The function f T represents the effect of temperature (T p being the pond temperature). The inhibition constant for the inhibiting substrate S n is K n , and K S i is the half-saturation constant for the limiting substrate S i .

Light Impact
Light is a crucial factor for algal growth, driving a large fraction of the energy and carbon fluxes in the system. The photosynthesis response to irradiance at depth z accounts for the photoinhibition phenomena at high irradiance with the Haldane-type function [20]: Light extinction is described by the Lambert-Beer equation: Finally, the average growth rate for a given incident light and liquid depth is obtained, integrating the growth rate along the depth:

Temperature Impact
The temperature T p in the HRABP is generally not controlled, so it fluctuates within large ranges, driven by the solar heat flux, according to daily and seasonal dynamics. In the full predictive model, temperature is computed with a dedicated model as explained in the next paragraph.
The temperature dependence for algae and bacteria growth is modeled through the cardinal temperature model with inflection (CTMI), which requires three parameters, that is, the cardinal temperatures: T max , T min , and T opt [21]. The CTMI is zero for T p / ∈ [T min , T max ], where T min is the temperature below which no growth occurs and T max is the maximum temperature above which no growth occurs. T opt is the temperature at which the growth rate is maximum. For T p ∈ [T min , T max ], the temperature effect is given by the function f 1 T p : The Arrhenius function was chosen for the decay rates: where the parameter θ describes the decay rate change with temperature.

pH Impact
The pH strongly influences system dynamics, since it directly affects the dissociation of the majority of soluble compounds (S IC , S NH , S NO 2 , S NO 3 , S PO 4 ). The influence of pH on algae and bacteria bio-process rates is included through the function proposed by Rosso et al. [21], that is, the cardinal pH model (CPM). The CPM is zero for pH / ∈ (pH min , pH max ), where pH min and pH max are the minimum and the maximum pH thresholds, respectively. pH opt is the pH value at which the growth rate is maximum. For pH ∈ (pH min , pH max ), the pH effect is described by f pH : The pH is estimated by the model, resulting from the dynamical balance between the chemical, physical, and biological process interactions, as explained later on.

Model Validation with Measured Medium Temperature
The model prediction capability was assessed on two case studies. A 56 m 2 HRABP located in the south of France, with 1.5 year monitoring of pH, S O 2 , S NH , S NO 3 , S NO 2 , X ALG , TSS, and soluble COD, was used to calibrate the model [10].
It was then successfully validated [12] on the case study presented in Section 2, where measured temperature was taken as input. Here, the objective is to predict temperature and to assess the prediction accuracy of the model coupling thermal and biological representations.

Predicting Pond Temperature and Water Level
The universal temperature model for shallow ponds developed by Béchet et al. [13] was adapted to predict the water temperature and the water level of the raceway. The existing radiative transfer model was modified, to deal with the fact that this raceway was suspended above the ground. A heat balance of the raceway material was thus also considered, involving additional heat fluxes (see Figure 2). The temperature dynamics in the algal pond results from the following heat balance: where T p is the pond temperature (K); ρ w is the density of pond water (kg m −3 ); C p,w is the specific heat capacity of the pond water (J kg −1 K −1 ); and V is the pond volume (m 3 ). Q ra,p is the radiation from the pond surface (W); Q ra,s is the total (direct + diffuse) solar radiation (W); and Q ra,a is the radiation from the air of the pond (W). Q h,evap is the evaporation flux (W), Q conv is the convective flux at the pond surface (W); Q h,in is the heat flux associated with the influent water (W); Q h,out is the heat flux associated to the effluent water (W); and Q h,rain is the heat flux related to rain (W). The additional term, compared to the original model [13], is Q conv,cond w ,pp , the conductive/convective expressions related to the heat exchange between the water in the pond and the material of the HRABP (here, polypropylene (pp)): where S is the pond surface (m 2 ).
The parameter h w,pp (W m −2 K −1 ) is the heat transfer coefficient between the water in the pond (w) and the polypropylene, while T pp (K) is the temperature of the polypropylene.
The HRABP was raised from the ground, as shown in Figure 1. A heat balance on the polypropylene mass of the pond is therefore also carried out: where Q ra,pp is the pond radiation at the bottom of the reactor: and Q ra,a,pp is the expression describing the air radiation at the bottom of the pond (T a (K) is the air temperature), on the polypropylene surface: The conductive/convective flux between air and the material of the pond is Q conv,cond a ,pp : The parameter h a,pp (W m −2 K −1 ) is the heat transfer coefficient between the air (a). Finally, Q rad,g is the radiation from the ground to the pond bottom: The temperature of the ground was computed from the air temperature, according to the work of Tsilingiridis et al. [22]: The parameters ground , pp , and a are the emissivity of the ground, polypropylene, and air, respectively (-); σ is the Stefan-Boltzmann constant (W m −2 K −4 ).
The evaporative and convective heat flux in the liquid medium have a marked effect on the pond temperature prediction, and they were implemented according to the Buckingham theorem, depending on the dimensionless numbers of Sherwood, Schmidt, and Reynolds. The Sherwood and Nusselt numbers were linearly interpolated for Reynolds numbers between 3 × 10 5 and 5 × 10 5 to ensure model calculations for Reynolds numbers in the transition from laminar to turbulent flow. For the calculation of the evaporative heat flux, a minimum wind speed (4 m s −1 ) was considered, as the equation for evaporative heat flux does not account for evaporation when there is no wind.

Exchanges with the Atmosphere
The CO 2 , O 2 stripping/dissolution and NH 3 stripping are also included, quantifying their rates through the k L a and their diffusion coefficients: From the evaporation and rain heat fluxes, it is possible to evaluate the water level variation in the pond: where m e is the evaporation rate (Kg s −1 m −2 ); ρ w is the water density (Kg m −3 ); q r is the rain rate (m 3 m −2 s −1 ); and q i is the inflow rate (m 3 s −1 ).

Chemical Submodel
The chemical submodel consists of predicting pH ((H + ) ions concentration), but also computing the fraction of the different dissociated compounds that are in equilibrium, depending on the pH. In Appendix B, we recall the principle of the implementation to highlight the temperature dependence of this sub-model, by detailing the set of algebraic equations to be solved.
The strategy for resolving the pH subsystem was inspired by the work of Rosén et al. [23]. The idea is to transform the initial problem of resolution of a set of algebraic equations resulting from mass balance and chemical dissociation into the solution of a differential system (see Appendix B).

Validating the Temperature Model
The heat transfer model was simulated using the nearby meteorological data provided by ARPA Lombardia regional meteo database. The temperature predictions are accurate, as can be seen in Figure 3 and in Table 1. The model tends to slightly overestimate the temperature in the warmest periods and to underestimate it in the coldest ones. The temperature predictions stay precise, with an error standard deviation of 1.6 • C, computed on the difference between the measured and the simulated temperature vectors, and a p-value below 10 −6 .  Model predictions could be further improved by tuning some of the heat transfer model parameters, or by using a dedicated meteorological station providing a more accurate estimation of the environmental conditions at the pond location. In fact, the weather dataset used for running simulations (i.e., air temperature, relative humidity, wind speed, and rain rate) were coming from the meteorological station at a distance of 10 km from where the reactor was located.

Full Predictive ALBA Model
In order to evaluate the overall model prediction capability when the physical and the biological models are coupled, the predicted temperature, instead of the one measured with the probe, was used to simulate the dynamics of the biological process over the 6-month period. The most relevant model state variables are reported in Figures 4-7, and compared with the experimental measurements, their standard deviations, and the error bounds for model predictions.
The accuracy of the heat transfer model results in predictions that are almost unchanged compared to the ones using the measured temperature (see Table 1). When comparing the predicted measurements of the initial model with measured temperature and the new one with predicted temperature, the r 2 is always larger than 0.98 for 2000 simulated points, and the predicted variables stay within an interval of 3% compared to the values simulated using the measured temperature.

Process Configuration and Depth
The model was then used to evaluate the consequence on two configurations on the process productivity, in terms of algae production or on TAN removal rate.
An alternative HRABP process was considered for comparison purpose. It consisted in a more classic set up of the raceway, with a contact on the ground (see Figure 8). Another heat transfer model (see details in Appendix C) was developed for this configuration [24], also extending the one of Béchet et al. [13]. The full predictive model was adapted to this particular case, and was also validated over more than one year with a HRABP lying on the ground (see details in Appendix A). Water temperature was also accurately forecast [24] (see Appendix D). The connection with the ground strongly increases the thermal inertia, and the objective of the study is to determine how much it impacts the process efficiency.
The study was also carried out considering three different water depths (h L ): 0.232 m, 0.116 m and 0.077 m, respectively. The first value is the nominal liquid depth that was applied during the experimental campaign described in Section 2, and for which the model was validated. The two other depth values, which are also typical of industrial scale raceways, result from the scenario where 2 raceways (respectively 3) are used to treat the same inflow rate. The total volume and HRT for each scenario are the same, but depending on the scenarios (i) one raceway of depth 0.232 m is used, (ii) 2 raceways of the same area but with depth 0.116 m are used and (iii) 3 raceways of depth 0.077 m are operated.
It must be stressed that depth values represent the maximum liquid level reachable in the reactor. In fact, since the liquid depth is an output of the thermal balance, its level profile always oscillates because of the evaporation and rain rate contributions. Looking at the medium temperature ranges in each situation , it turns out that the temperature oscillations when the pond is not connected to the ground is of much larger amplitude. The average number of hours per day when the temperature is higher than 35 • C was computed, according to season (Table 2). This temperature was identified by Bechét et al. [25] as a lethal temperature for many species, with dramatic consequences in terms of viability [26]. In summer, on average 4 h per day a temperature higher than 35 • C can be reached, for the thinnest process raised above the ground. This daily average is reduced to 2 h for the raceway on the ground. It is lower for liquid depth of 0.2 m, but it is still larger than 1 h per day. A closer look at extreme events (see Figure 9) shows that, for the hottest days, the medium stays more than 7 h above the critical threshold, which is likely to lead to the culture crash. A side effect of these high temperature is that evaporation losses are much higher in the raised HRABP, with an average increase by 20%. Table 2. Average number of hours per day where the medium temperature is larger than the critical temperature (35 • C), for the two configurations (RG: raceway lying on the ground, RR: raceway raised above the ground) and for three water depths (h L ). Although our biological model cannot predict the impact of these high-temperature events, it is very likely that the ecosystem is degraded during these periods. This type of pilot therefore imposes unfavorable conditions for algal growth during the hottest months, at least under Mediterranean climates.

Ecosystem Composition
Experimental measurement of the various algal and bacterial biomasses is challenging. In the work of Ibekwe et al. [27], DNA extracts were used to assess the microbial community structure from bacterial 16S rRNA gene analysis (or 18S rRNA for algae) in an algae-bacteria raceway pond. These approaches are intensive and can only be carried out on a very limited number of samples. Above all, they provide an estimate of the number of operational taxonomic units (OTUs), but do not give a picture in terms of biomasses. A validated model such as the ALBA model can estimate the ecosystem composition over time. Figure 10 presents the ecosystem composition estimated by the model, according to seasons and to the various tested conditions. Microalgae dominate the system in all the seasons and raceway configurations. The average proportion of heterotrophic and nitrifying bacteria on the total biomass increases in autumn (7.6-8.8% for heterotrophs and 11.9-13.3% for nitrifiers), for both raceways layouts, but remains marginal compared to algae concentration. The fraction of nitrifiers stays marginal along the various scenarios (1-1.4% in spring, 1.1-2.7 in summer, and 5.3-13.3% in autumn); however, it is worth noting that they are processing more than 70% of the influent ammoniacal nitrogen. Heterotrophic bacteria are higher in concentration in spring and summer (17.8-22.1 and 20.2-37.3 gCOD m −3 , respectively) for both raceway layouts compared to nitrifiers, while in autumn, these two populations are more balanced. As expected, for lower depths, algae concentration increases, resulting from the fact that algae are favored in light absorption. In general, the bacterial concentration is only marginally affected by depth. Nitrifying bacteria are indirectly affected by the competition with microalgae for inorganic carbon, and their concentration is thus higher for the higher liquid depths, associated to lower microalgal concentrations. The two raceway configurations do not massively affect the biomass distribution. A model that would more accurately account for the consequences of the extreme temperature events on mortality, according to the different populations, might modify these conclusions. For this, additional experiments to quantify how the high-temperature periods affect bacterial mortality are necessary.

Algal Productivity and Ammonium Removal Rate
Looking at the biological performances for the two different configurations, it turns out that rather similar values for the daily average are obtained (see Figure 11), and the results are first of all influenced by water depth.
Algae productivity ranges between 3.6 and 9.3 (gDW m −2 d −1 ), in line with the values recorded in other raceways pond applications [28,29], with a maximum productivity in summer. The rather low considered HRT explains these modest performances, which would have been higher for lower HRT. Algae concentration increases when operating with lower depth, but not in the same order of magnitude: when depth is divided by a factor of 2, algae concentration is increased by 30% in spring and by 110% in summer, explaining why the algal productivity is not eventually enhanced. This is mainly due to: (i) a stronger influence of the evaporation rate at lower water levels; and (ii) a much stronger competition for CO 2 with nitrifiers at higher algal density, reducing the algal growth rate [10]. The competition for inorganic carbon appears, even if pH is regulated at 7.5, due to a strong alkalinity consumption from nitrifying activity. Adding alkalinity in the influent has been shown to be an effective strategy to reduce and avoid this competition. In fact, with this approach, algae have the possibility to grow at their maximum rate, avoiding limiting conditions on inorganic carbon and thus increasing productivity. This is even beneficial for the environment, since inorganic carbon shortage has been shown to be associated with N 2 O emission by nitrifiers [30]. Figure 11. Seasonal average and the associated standard deviation for algal productivity, algae concentration, TAN removal rate, and nitrogen conversion rate, for the two raceway configurations (RG: raceway on the ground, RR: raceway raised) and according to the three water depths.
The TAN removal rate follows a similar trend, also driven by the inorganic carbon competition in the HRABP. In this case, since most of the ammonium is removed by the nitrifiers, reducing depth decreases the nitrogen flux treated by nitrifiers in similar proportion (the volumetric TAN removal rate being much less affected). The consequence is that the influent nitrogen to algae conversion rate considerably increases when reducing the liquid depth, since a higher proportion of nitrogen is processed by algae.
The similarity between the process on the ground and the one that is raised shows that mainly average temperature matters, and the daily average values do not significantly differ. However, looking closer at the standard deviation, it turns out that the predicted productivity varies widely. Temperature with thinner systems fluctuates strongly, leading to both variation in growth rate and in algal concentration. The large changes in concentration are also due to evaporation for the lowest depth. This explains why the standard deviation of algae concentration is more than 4 times higher at lower depth compared to its nominal value in summer. This is much less marked for the other seasons, when a factor only 2 is involved.
Keeping in mind that thinner system, and the raised process experiment with higher temperature ranges, with frequent excursions above the critical temperature, it is clear that reducing depth at constant HRT does not improve the process efficiency, and there is a risk of process crash due to high cell mortality.
A model to better represent the mortality at high temperature must be included in the biological model to propose a more accurate vision of the underlying processes.

Choice of the Most Efficient Solutions
The different system configurations, in terms of overall productivity and TAN removal rate, were compared ( Figure 12). Reducing the depth by a factor 2 or 3 doubles or triples the number of raceways needed to process the same flux. The average TAN removal, installing two or three raceways, increases only by 3.4% in spring, 3.7 and 4.8% in summer, and 2.6 and 4.5% in autumn, respectively, for the raceway lying on the ground. Looking at the raceway configuration that is raised up, comparable low gains in TAN removal rate are reached in all the seasons (3.1 and 3.4% in spring, 3.3 and 4.2% in summer, and 2.7 and 4.8% in autumn, respectively). The moderate increase in total TAN removal rate is most probably not compensated by the higher capital and operational costs.
On the contrary, if the objective is algae production, then using two or three raceways instead of one increases the total biomass production by 21.4 and 30.3% in spring, 64.3 and 94.0% in summer, and 80.7 and 132% in autumn, respectively, for the raceway lying on the ground. For the raceway configuration that is raised up, the percentage of increased algae productivity is in the same range (18.2 and 27.6% in spring, 57.7 and 91.9% in summer, and 69.1 and 113.9% in autumn, respectively). This strong production enhancement probably justifies that three raceways with lower depth are used. Figure 12. Seasonal average total algal production (gDW d −1 ) and total TAN removal rate (gN d −1 ) for the two raceway configurations (RG: raceway on the ground, RR: raceway raised), and depending on the number of raceways to process the same inflow rate (with the same HRT). Scenario with one, two, or three raceways are associated to depths h L of 0.232, 0.116, and 0.077 m, respectively.

Conclusions
The fully predictive model for simulating outdoor algae-bacteria processes includes a biological, a chemical, and a thermal submodel. The biological predictions, when temperature is also forecast, were revealed to be very accurate. Temperature dynamics follow seasonal variability according to reactor configurations and liquid depth, playing an important role in the biological and chemical submodels.
For lower depths or for raceways not directly lying on the ground, the resulting overwarming does not significantly alter productivity, since the daily average temperature is only marginally affected. However, when the model predicts a large deviation of temperatures during the warmest seasons, it means that algae are exposed to lethal conditions, and there is a strong risk of culture crash.
This work definitely motivates a model-based thermal design strategy in order to reduce the duration of extreme-temperature events and their dramatic consequences on the process integrity. Funding: This research was funded by ADEME Biomsa project.
Data Availability Statement: Data supporting the reported results con be found in the Appendices A-I.

Acknowledgments:
The authors acknowledge the support of the ADEME Biomsa project.

Appendix A. Description of the Second Case Study in Narbonne (France)
The HRABP is located at INRAE, Narbonne, southern France (latitude: 43.15656, longitude: 2.994438), with a total surface area of 56 m 2 and a channel length of 15 m (see Figure A1). The pond was realized in concrete and placed on the ground over a base of concrete (thickness 0.2 m). The HRABP was mixed with a paddle wheel, operated to obtain a water linear velocity of 0.2 m s −1 , and an additional mixing pump that was located at the opposite side of the paddle wheel (operated at the flow rate of 182 m 3 d −1 ). The raceway was operated in continuous mode, from 15 May 2018 to 01 August 2019. The influent flow rate was set to obtain a hydraulic retention time (HRT) of 5 days along the whole experimental period, except from one month (29 August-29 September 2018), during which different HRT values (ranging from 2 to 10 days) were tested. The outflow was implemented by gravity overflow, resulting in a variable liquid depth (min 0.257 m, max 0.368 m), measured with an ultrasonic distance sensor (Siemens, SITRANS Probe 7ML5221-1BB11). The HRABP was also equipped with online dissolved oxygen (METTLER TOLEDO, InPro 6850i), and temperature and pH (METTLER TOLEDO, InPro4260(i)/SG/425) probes. The incident light (expressed as photosynthetically active radiation, PAR) was continuously measured at the reactor surface, using a PAR meter (SKYE Instruments, PAR 2625). All the online measurements were collected every five minutes, using the dedicated SILEX-LBE acquisition system (INRAE-LBE, France). The air temperature, wind speed, and relative humidity data, necessary for determining the pond temperature through the model, were acquired from the nearest weather station (Béziers, France, latitude: 43.3235, longitude: 3.3539), located approximately 30 km from the pond. The local rainfall rate was recorded on site.
More details on the experimental protocol can be found in [10].

Appendix B. Modelling pH and Dissociation States
The chemical submodel consists in predicting pH ((H + ) ions concentration), but also computing the fraction of the different dissociated compounds that are in equilibrium, depending on the pH. Here, we recall the principle of the implementation to highlight the temperature dependence of this submodel.
This sub-module includes three ingredients: i. The mass balance equations These are the mass balance equations for the state variables corresponding to the total sum of chemicals that dissociate in the water. The set of mass balances is represented in Table A1.
As an example, the total concentration of NH 3 and NH + 4 in the model corresponding to the state variable S NH 14 leads to the following mass balance equation: Note that these equations also account for the change in unit between the state variables and the chemical model (which should be in mol m −3 ).  constant concentration (denoted ∆ CAT,AN ) whose concentrations are not modified by any The differential equation describing the temperature dynamics of the concrete is: ρ co V co C p,co dT co dt = Q conv,cond w ,co + Q cond (A7) The conductive heat flux (Q cond ) has a minor impact on the total heat balance [13]; therefore, a linear soil temperature profile was assumed for the sake of simplicity. It was also assumed that the ground temperature was approximately equal to the annual average air temperature at a depth of 3.5 meters.
The evaporative and convective heat flux have a strong effect on the temperature prediction, and they were implemented according to the Buckingham theorem, depending on the dimensionless numbers of Sherwood, Schmidt, and Reynolds. The Sherwood and Nusselt numbers were linearly interpolated for Reynolds numbers between 3 × 10 5 and 5 × 10 5 to ensure model calculations for Reynolds numbers in the transition from laminar to turbulent flow.
More details can be found on this heat transfer model in [24]. In general, the fully predictive ALBA model was able to simulate the main measured variables in the HRABP with a very good level of accuracy, very close to the ones obtained running the model with the measured temperature [24].

Appendix H. Experimental Campaign on a Pilot-Scale Raceway Located in the Northern Italy
The HRABP was a pilot-scale polypropylene tank with an operating volume of 0.88 m 3 and a total surface of approximately 3.8 m 2 . The raceway pond had two main channels and semi-circular edges. The HRABP was installed in the dedicated WWTP of an intensive piggery farm, breeding more than 20,000 pigs, located in the north of Italy (Casaletto di Sopra, Cremona, Italy). In this farm, the excess sludge from the treatment of the piggery wastewater was co-digested in a biogas plant, together with several other agricultural wastes (chopped corn and barley, poultry manure, and olive pomace) to maximize the energy recovery. The monitoring campaign was performed from May to December 2016. The HRABP influent was prepared starting from the liquid fraction of the digestate, obtained by centrifugation (hereafter indicated as centrate), and by dilution with tap water in order to reduce the influent TAN (total ammoniacal nitrogen) concentration (a dilution factor of 5 was applied until 17 September 2016, then it was reduced to 3 until the end of the experimentation). In the HRABP, the mixing was ensured by a paddle wheel, which was operated at 20 rpm to obtain an average liquid velocity of 0.2 m s −1 . In addition, the reactor was equipped with a contact cylinder (height 0.8 m, diameter 0.44 m, volume 0.12 m 3 ) for bubbling pure CO 2 gas (belonging from a sump connected to it and activated as a function of the pH set-point value imposed). The influent flowrate was set to achieve an average HRT of 10 days until 11 October 2016. Afterwards, the HRT was increased to 20 days (until 06 December 2016), in order to compensate for the marked temperature reduction occurring during the cold season. A polyethylene shading net was applied in the period between 30 July 2016 and 24 August 2016, to decrease the incident radiation and the potential light inhibition. Since it negatively affected algae growth (see Figure A9a), it was eventually removed [17]. The influent characteristics were routinely monitored by measuring the organic matter content (total and soluble COD), the main inorganic nitrogen compounds (TAN and nitrate, N − NO − 3 ), the total Kjeldahl nitrogen (TKN), the orthophosphate (P − PO 3− 4 ), and the TSS concentrations once a week (see also Table A2 for a summary of average values measured during the monitoring campaign). The mixed liquor in the HRABP was monitored twice a week, and the analyses were performed by spectrophotometric test kits on: TAN, nitrite (N − NO − 2 ), nitrate (N − NO − 3 ), phosphate (P − PO 3− 4 ), and COD (total and soluble fractions). Optical density at 680 nm (to provide an estimate of the chlorophyll-a content), TSS, and volatile suspended solids (VSS) were measured once a week, according to standard methods. Algal cell counts were performed through microscopic observations (Optika Microscopes, B350) using a Bürker chamber (HBG, Precicolor). The weather dataset, including irradiance, air temperature, relative humidity, wind speed, and precipitation were retrieved from the ARPA Lombardia regional meteo database.