Assessment of alkaline stabilization processes in industrial waste streams using a model-based approach

Chemical conditioning prior to disposal is a common practice in biotech companies to stabilize the biological waste generated during production. Nevertheless, the state of the art models used to analyze management strategies in water treatment systems (WTS) do not include the effect of high alkaline conditions during bio-solids processing. In this paper, the prediction capabilities of a novel model-based approach describing the effect of quicklime addition (CaO) on the waste streams of an industrial WTS is assessed. Two measuring campaigns were carried out taking samples of TSS, VSS and total/soluble COD, N, P, S and multiple metals before and after chemical stabilization, and dewatering under and overflow. Mass balances were set up and Sankey diagrams were generated to represent the occurrence, transformation and fate of the major compounds within the studied facility. A simulation model was used to predict plant at different locations. Next, a scenario analysis was carried out in order to assess potential alternatives to the current operational practice. The resulting mass balances show a mismatch between the system’s input and output up to 17%. It was also possible to identify different types of compound-behavior depending on the effect that high pH induced on the soluble and particulate fractions: hydrolysis, precipitation and unaltered. Model predictions and measurements differed 9.6% (steady state) and 12.4% (dynamic state) respectively. Finally, in the scenario analysis, the model suggested that the change from quicklime to sodium hydroxide (NaOH) would increase the quantity of organics in the dewatered cake (+23%), but with a considerable increase in chemical consumption (+50%). The selective stabilization of the incoming streams has the lowest use of chemicals (− 30%) and reduces the load of CODsol (− 13%) and TNsol (− 14%) recirculated to the water line of the WWTP.


Introduction
Industrial and municipal wastewater treatment plants generate considerable quantities of bio-solids as main by-product. Independently of its origin, sludge stabilization is a critical task that must be performed to ensure pathogen destruction, odor control and environment protection (Gantzer et al., 2001;Arthurson, 2008, European Parliament, 2009Alanya et al., 2015;Zhao et al., 2019). In today's society we can find a broad range of industrial activities that require treatment of their effluents for adequate disposal; some of the most common examples are mining, agriculture, food, fuels, chemicals or pharma production. Likewise other industries, biotechnological processes generate liquid effluents which should also be treated in a WWTP for contaminant removal (COD, N, P, etc.), and consequently generating sludge streams (Pervaiz and Sain, 2015;Virmond et al., 2021). Unlike other industries, biotech processes often depend on microorganisms for product formation, which implies the production of large quantities of biomass (Heijnen and Verheijen, 2011) that is to be inactivated and stabilized. This study is to the best of our knowledge, the first industrial case in which the management of organic material from biotech production and biotech-dedicated WWTP sudge is discussed and analized using a modeling approach.
The strategies used for sludge inactivation are determined by its nature, concentration and quantity, the ability of the production organisms (if any) to survive in nature and the viability of these cells after processing. Methods to inactivate waste streams can include: 1) heat treatment, 2) chemical treatment, 3) physical disruption of cells, 4) filtration and/or radiation (gamma or UV) (Wang and Wang, 2007). Amongst these technologies, the use of chemical reagents promoting high alkaline conditions is a widely spread method within the biotech industry (Vlyssides and Karlis, 2004;Li et al., 2012;Masihi and Golikandi, 2021) even though the potential impact that may have on the environment (Gomes et al., 2016). High pH conditions induce cell lysis and subsequently release of the intracellular content to the outer media, causing a decrease in the apparent particulate fraction in favor of the soluble one (Park et al., 2012;Yu et al., 2013;Cho et al., 2013, Khan et al., 2016Xu et al., 2020;Wang et al., 2021). A positive consequence of newly available soluble organics is the increased methane yield and production rate when bio-solids are further treated anaerobically and consequently more energy is recovered in shorter time (Xiao et al., 2015;Maryam et al., 2021).
The state of the art procedure to evaluate treatment alternatives in water engineering is to use different mathematical models to assess the suitability of technologies prior to full-scale implementation (Gernaey et al., 2004). Indeed, the use of mathematical models has become a common practice with multiple applications in control (Jimenez et al., 2015), design (Flores-Alsina et al., 2012), benchmarking (Jeppsson et al., 2007), diagnosing (Rodriguez-Roda et al., 2002;Sole-Mauri et al., 2007), and optimization (Rivas et al., 2008;Feldman et al., 2018;Muoio et al., 2019). Nevertheless, these models have thus far not been used to: 1) describe the effect of organic material hydrolysis in highly alkaline conditions during bio-solids processing (Henze et al., 2000;Batstone et al., 2002) and 2) easily link these units with plant-wide approaches to conduct integrated assessments i.e. how these sludge treatment units will affect other units comprising the flow diagram (Grau et al., 2009;Barat et al., 2013;Solon et al., 2017;Fernández-Arévalo et al., 2017;Hauduc et al., 2019;Seco et al., 2020). Previous works have been focused on elucidating kinetics (degradation), but have not used as a decision making tool (Li et al., 2008(Li et al., , 2010Zhang et al., 2015;Wang et al., 2017;Lin and Li, 2018;He et al., 2018). Indeed, to predict important process variables such as organic/inorganic distribution, buffer capacity, cation mobilization and/or use of chemicals there is a need for more complex modelling approaches.
In order to circumvent these limitations, the objective of this paper is to develop a mathematical modelling approach predicting the effects of chemical stabilization in bio-solids treatment systems. Using as a test case the industrial site formed by the biotech and pharma companies Novozymes and Novo Nordisk, which comprises the largest biotechnological production cluster and industrial WWTP of northern Europe. This study presents the results of the measuring campaign, mass balance calculations and how the proposed mathematical structure describes the experimental data. Special emphasis is placed on describing occurrence, transformation and fate of both soluble and particulate fractions for a selected set of process variables i.e. TSS, VSS, COD, TN, TP, TS and multiple metals. Hydrolysis, precipitation and centrifugation model parameters are adjusted to account for all relevant phenomena taking place within the factory. The proposed modelling approach is conceived to be easily linkable with the industrial plant-wide model in order to conduct holistic evaluations. In addition, alternative scenarios for process operation comprising different use of chemicals and selective stabilization of process streams are investigated in silico.

Plant layout and process description
The plant under study is located in the Kalundborg industrial cluster in the North Western part of Zeeland, Denmark (Kalundborg Symbiosis, 2020). Fig. 1  production biomass generated during the industrial (biotech) process. The layout is comprised of 1 buffer tank (BUFF influent ), 2 stabilization tanks (ST) and a dewatering station (DW) with 12 decanter centrifuges. Furthermore, there is also a storage for solid quicklime (LS), and equipment for preparation and storage of the quicklime/water suspension (MT and BUFF lime ). Finally, there is also polymer dosage prior to dewatering. The process works as follows: Firstly, production biomass and wastewater sludge (primary, secondary, flotation) are received and stored in the influent buffer tank (BUFF influent ). Secondly, the combined sludge stream (Biomass In) is pumped into the stabilization tanks where a quicklime suspension (CaO In) prepared in the lime mixing tanks (MT) and buffers (BUFF lime ) and subsequently dosed to increase the pH to a value of 12. As a result, it is possible to control odors, neutralize charges prior to flocculation and inactivation of the production strains. The stabilization tanks (ST) are equipped with on-line pH sensors to ensure that the alkaline conditions are sufficiently high for a successful stabilization. Finally, the effluent stream is mixed with polyacrylamide (Polymer In) for enhanced flocculation before solid-liquid separation in the dewatering units (DW). The dewatering overflow (Reject Water) is sent back to the water line of the WWTP and is treated an activated sludge reactor. The underflow (Dewatered Cake) contains all the retained particulate material and it is further processed in an external biogas facility within the same Kalundborg industrial cluster.
It is important to highlight that reject water stream should contain the lowest content of organics and nitrogen compounds in order to reduce the aeration costs during wastewater treatment; besides that a low TSS content is desirable to reduce the processing duty of the clarifiers downstream of the aerated bioreactors. On the other hand, the content of VSS/TSS in the sludge cake should be maximized since it supposes a source of financial income for the factory.i.e. the external biogas plant pays based on the content of organics that potentially will be transformed to methane. A scheme of the presented stabilization plant within the context of the entire wastewater treatment system can be found in Supplemental Information ( Figure S1).

Measuring campaign
A first measuring campaign (MC#1) conducted from February 14, 2020 till March 23, 2020 (5 weeks, 3 samples per week) in order to characterize the process under study. Flow proportional samples were collected continuously with a frequency of 10-20 min; the resulting composite samples representing periods of 2 or 3 days were analyzed on Mondays, Wednesdays and Fridays. Sampling was performed in three plant locations: Influent waste biomass (Biomass In), dewatering overflow (Reject Water), and dewatering underflow (Dewatered Cake), respectively located in positions 1 (Biomass In), 7 (Reject Water) and 8 (Dewatered cake) in Fig. 1. One grab sample in location 2 (Cao In) and 3 (Polymer In) was also collected and analyzed. Mass balances were carried out to estimate stream characteristics in points 4 (Stabilization Out), 5 (Stabilization Liquor) and 6 (Dewatering In).
The second one-day measuring campaign (MC#2) took place on July the 7th. In this particular case, the influent to the inactivation system consisted solely of WWTP-generated sludge (production biomass was not present). The system was operated in semi-batch conditions, meaning that sludge was pumped inside the stabilization tanks (ST) for 6 h at a rate of 100 m 3 /h, left inside the tank for 1 h, and pumped out towards the dewatering centrifuges at 100 m 3 /h. Samples were taken in positions 1 (Biomass In), 7 (Reject Water) and 8 (Dewatered cake) at 1-h frequency, when corresponding (i.e. from the influent sampling port during the tank filling phase, and from the Reject Water and Dewatered Cake during the tank emptying phase).

Analytical measurements
TSS and VSS were determined using standard methods (APHA et al., 2012). COD and TN were measured by the Hach methods 114 and 338 (Hach Company, Loveland, Colorado). The concentration of several chemical elements (Al, Ba, Ca, Cu, Fe, K, Mg, Mn, Na, P, Zn and S) was quantified by inductively coupled plasma (ICP) spectroscopy (Varian vista 720-ES, Agilent Technologies, Palo Alto, California) equipped with an Agilent Axial ICP torch. Dilutions with demineralized water were made when necessary to match the useable range of the analytical method. Unfiltered samples were gently shaken prior to manipulation, filtered samples were obtained by filtration of unfiltered samples with a 0.45 nm hydrophobic PTFE syringe filter. On-line flow measurements were available for all 8 plant locations listed in Fig. 1. On-line pH measurements (EXAxt450, Yokogawa, Japan), were only available in the stabilization tanks and were calibrated daily.

Mass balances
Mass balances in all 8 locations for all compounds described in section 3.3 were set up. The dewatering process was assumed to behave as an ideal, non-reactive solid-liquid separator (retention time <15 min), thus allowing to reconstruct the composition of the effluent of the ST. Results were represented by means of Sankey diagrams, where arrow width is proportional to the material load of the considered compound. Sankey diagrams were used to investigate occurrence, transport and fate of key compounds within the stabilization plant (see Fig. 1).

. Influent fractionation
Organic matter fractionation was based on the principles described in (Batstone et al., 2002). The bio-degradable fraction was sub-divided between soluble (S) and particulate (X) compounds. Soluble organic compounds accounted for sugars (S su ), amino acids (S aa ) and long chain/volatile fatty acids (S fa and S ac ). Particulate organic compounds include carbohydrates (X ch ), proteins (X pr ) and lipids (X li ). Non-biodegradable compounds could also be soluble and particulate (S I and X I ). Inorganic compounds could be both soluble and particulate. Soluble inorganic compounds included Na, K, NH x , Cl, Ca, Mg, SO x , from the list found in Flores-Alsina et al. (2015). The list of particulates were mainly precipitates and can be found in (Kazadi Mbamba et al., 2015a, b). The VSS and ISS fractions were calculated following the principles stated in Ekama et al. (2006).

Biochemical and physico-chemical modelling
The stoichiometry of hydrolysis (and other conversion processes) in the stabilization tank was the same as in Batstone et al. (2002). Mass balances for C, N, and P were closed assuming the compositional analysis reported in de Gracia et al. (2006) and Flores-Alsina et al. (2015). The hydrolysis constants of lipids and proteins in the ADM1 were adjusted to reproduce the alkaline hydrolysis of particulate organic material in the stabilization tanks. A physico-chemical framework was also implemented in the entire plant. The model simulated the acid-base system and was thereby able to predict the pH (Batstone et al., 2012;Solon et al., 2015). It also corrected for ionic strength via the Davies approach to consider chemical activities instead of molar concentrations and hence performed all the calculations under non-ideal conditions . The multiple mineral precipitation potential was described in the model based on saturation index calculations (Kazadi Mbamba et al., 2015a,b). Equilibrium constants are temperature corrected. Temperature in all simulations (as within the factory) is assumed to be at 35 Celsius.

Dynamic influent generator
High frequency on-line flow rate data was taken from the SCADA system and set to 1-h resolution time. For each analyzed compound, load profiles were calculated using the sampling period average flow (2 or 3 days depending on the sample) and the concentration of the compound in this flow-proportional sample (see section 3.2). The next step was to convert load into concentrations by dividing the load corresponding to the sampling period (2/3 days) by the high frequency flow rate (1 h). Finally, both generated and measured profiles were compared. More information about influent profiling can be found in Gernaey et al. (2011) andFeldman et al. (2017).

Additional elements
Dewatering units were modelled as ideal splitters (Jeppsson et al., 2007). This model was adjusted to reflect the experiments carried out by Ekama et al. (2006) where organic and inorganic compounds showed different settling velocities/separation efficiencies. TSS removal was around 90% and sludge in the underflow concentrated up to 23%. Operational pH in the ST was maintained to the desired set-point of ≈12 (in agreement with existing on-line pH sensors) with a PI controller manipulating the quicklime flow rate (Gernaey et al., 2014).

Scenario evaluation
The calibrated steady state model is used to assess the feasibility of process alternatives according to several criteria. The current practice (S1: Baseline scenario), considers the use of quicklime as alkaline agent, and precipitation processes are assumed to take place. In scenario 2 (S2: NaOH), sodium hydroxide is used instead of quicklime to provide the high pH required. The last scenario (S3: Refluxing) consists of by-passing the stream of WWTP waste sludge directly to the dewatering units, without performing the stabilization step. In this way, only the production biomass stream undergoes the stabilization operation before being in contact with the environment, as required by the European regulations (European Parliament and the Council, 2009). Waste activated sludge is considered to be partially stabilized due to the long retention time in the aerobic biological reactor that depletes this stream from soluble COD and TN. Similar to scenario S1, in S3 the stabilization of the production biomass is performed by adding quicklime, assuming the same retention time in the stabilization tanks. . The quicklime stream was the second major contributor to the total load. In this case, and even though this stream is a slurry (mix of dissolved and suspended material), all metals were assumed to enter the system in soluble form due to the high dilution resulting of mixing the quicklime stream (170 m 3 /d) with the primary stream (3800 m 3 /d) (See Fig. 2 e, f, g and h, left).

Flow and mass balancing
With respect to transformations, one may identify three types of behavior. Firstly, COD, N, P and S were hydrolyzed in the ST. This was caused by the cellular membrane destabilization created by the high alkaline conditions (pH ≈ 12). As a result, the particulate fraction of COD, N, P and S was reduced by − 12%, − 23%, − 13% and − 17% respectively (See Fig. 2 b, c, d, and e, center). Secondly, the amount of particulate calcium increased after ST, from representing 35%, to compose 88%. This observation indicates the potential formation of calcium carbonates (See Fig. 2 f, center) (Kazadi-Mbamba et al., 2015a and b). Thirdly, Na and K were not affected during chemical stabilization and went through the plant unaltered (See Fig. 2 g and h, center).
Following up on the stabilization step, the effluent of this unit undergoes a centrifugation step, in which the aggregation state, particulate or soluble, determined the effect of dewatering on the fate of the studied compounds. On one hand, N (52%), S (72%), Na (100%) and K (100%) were mainly in soluble form after the stabilization step, and exited the plant in the reject water stream (see Fig. 2 c, e, g and h, right). A relatively smaller fraction of soluble N and S still in form of non-hydrolyzed proteins could be found in the dewatered cake. On the other hand, COD (60%), P (77%) and Ca (76%) were in particulate form and exited the dewatering units in the cake stream (See Fig. 2b, d and f, right). In the same way, a small fraction of particulates ends, which were not captured by the dewatering units up in the reject water stream and recycled upstream. Overall mass balances 17% between input and output mass flows (See Table S1 for further details).
Data collected during the second measuring campaign (MC#2) allowed to differentiate the main characteristics between the two streams (see Table 1). Indeed, production biomass stream supposes more than 70% of the incoming load for flow-rate, COD, N and P compared to the waste sludge stream collected from different parts of the plant. Additionally, the different nature of both waste streams is also reflected in the N/COD and P/COD ratios as well as the soluble fraction versus total amount for both N and P. Hence, waste activated sludge is mainly associated with high particulates since most of the soluble are already consumed during biological treatment (soluble to total ratio for COD and TN in this stream is around 1), On the other hand, production biomass has a comparatively higher amount of dissolved material since it contains the sub-products of manufacturing enzymes and other pharmaceutical compounds (soluble to total ratio for COD and TN in this stream is up to 5).

Influent characterization and fractionation
The influent fractionation rationale was based on COD, supported by TN, TP, TS and TCa measurements. A small fraction of both particulate and soluble COD was considered non-biodegradable (X I and S I ). A corresponding fraction was taken from TN and TP (both soluble and particulate). The biodegradable particulate COD (COD part ) fraction was distributed into proteins (X pr ) & lipids (X li ) depending on the quantity of available particulate N and P (TN part and TP part ). Similarly, biodegradable soluble COD (COD sol ) was distributed into several forms: A fraction of the COD sol was allocated to amino acids (S aa ), long chain (S fa ) and volatile fatty acids (S ac ). Biodegradable TN sol was evenly distributed into S aa and ammonium/ammonia (S NHX ). The remaining TP sol was considered to be in the form of phosphates (S HxPO4 ). TS part was fully included in (X pr ) and TS sol in free sulfates (S SOx ). Finally, the VSS/TSS ratio was used to estimate the quantity of inorganics coming with the influent (ISS). Those were distributed between influent inorganics (X ISS0 ), calcium hydroxide (X Ca(OH)2 ) and calcium phosphate (X Ca-P ). The ratio between the two latter was arranged to close the TCa part and TP part balances. Soluble metal measurements (TNa sol , TK sol , TCa sol , TMg sol and TAl sol ) were used to define the weak acid-base conditions (S Na , S K , S Ca , S Mg , and S Al ). It should be pointed out that influent wastewater was coming from the fermentation industry, therefore sugars (S su ) and carbohydrates (X ch ) were assumed to be zero in the incoming influent biomass since they are fully consumed upstream (Feldman et al., 2018). No specific active degraders in the influent were assumed to be present either (Batstone et al., 2002). Fig. 3 shows how both soluble and particulate fractions of the different available measurements are allocated to be defined as state variables. For example, X pr and X li together were the main contributors of COD part (98%), TN part (98%), TP part (45%) and TS part (100%) (Fig. 3a, b, c and d, left). Inorganic precipitates, X Ca(OH)2 and X Ca-P had an important role in the TP part (55%) and TCa part (100%) fractionation ( Fig. 3c and e, left). Organic inerts, X I and S I , represented less than 2% in the particulate and soluble COD, TN and TP. For the other accounted metals (i.e. Na, K, Mg and Al), the difference between the soluble and the total form was very low and the particulate fraction was disregarded from the model (Fig. 3f, left). With respect to organic soluble compounds, S aa , S fa and S ac represented COD sol (98%), TN sol (49%) and TS sol (8%). The other important fraction of TN sol and TS sol was occupied by S NHX and S SOx (50% and 92% respectively) (Fig. 3a, b and d, right). 99% of the TP sol was assumed to be in form of S HxPO4 (Fig. 3c, right). The remaining fraction (>1%) was associated to S I . All TCa sol and TNa sol was assumed to be 100% in ionic form (S Ca and S Na ) ( Fig. 3e and f, right). The influent fractionation code to covert measurements to state variables is included in the software implementation resulting from this study, and will be provided upon request (see section 7).

Steady state simulations
In Fig. 4 the averaged campaign measurements and the steady state model simulation results are depicted for a selected number of compounds, across different plant locations (see Fig. 1 for details). Blue crosses represent computer predictions, black circles are the measurements average and black error bars represent the calculated standard deviation for all days. 78% of predictions fell within the standard  Table 2). The results showed how the developed mathematical approach was capable to reproduce the three types of behavior identified when conducting mass balances and generating the Sankey diagrams (section 4.1): Hydrolyzed particulate organics (COD, TN, TP, TS), precipitated ions (Ca), and unaltered soluble ions (Na, K).
More specifically, COD part and COD sol values reflected how alkaline conditions may affect organics hydrolysis and their subsequent distribution after dewatering, in either the reject water or the cake streams (see Fig. 4 a and b). The model predictions also matched TN, TP and TS values, which corresponded to the predicted X pr and X li breakage into S aa , S SOx and S HXPO4 (see Fig. 4 c, d, e, f, g and h). It was also possible to capture the trend for organic and inorganic particulates as shown in the plots for concentration of TSS and VSS/TSS ratio (Fig. 4 i and j). The DW effluents present different VSS/TSS ratio, indicating that more inorganic particulate material accumulated in the dewatered cake respect to the reject water stream, possibly due to the higher relative density and higher degree of compactness of precipitated minerals respect to organic solids. (Fig. 4 i and j). The model could also describe Ca precipitation under the stabilization (ST) alkaline conditions and its subsequent separation in the centrifuges (Fig. 4 k and l). It should be pointed out that calcium carbonate was the only compound assumed to be formed even though calcium phosphate, aluminum phosphate or magnesium carbonate gave positive saturation values, too (Kazadi Mbamba et al., 2015b). It is well known that these compounds may bring some trouble when dealing with lime treated streams. Nevertheless, the good match between TP part , TP sol , TAl sol and TMg sol (Fig. 4 e, f, m and n) indicates that if this precipitation process takes place, it only happens in small quantities and it was decided to disregard it for the sake of model simplicity. Finally, the proposed approach predicted the behavior of different soluble ions such as Na and K (see Fig. 4 o and p).
Besides the fate of traditional contaminants, the proposed model succeeded in predicting buffer capacity caused by soluble ions as pH and flow rate values at different locations (see Fig. 4 q and r). It is especially relevant in the case of quicklime dosing for pH control in the stabilization tanks, where model predictions accurately matched the real life chemical consumption. In that way, we can confirm that the weak-acid base chemistry is described properly (including ion pairing and assumed precipitation reactions) and it would be possible to evaluate how other chemicals would perform given that high pH conditions are achieved. This possibility is further explored in the scenario analysis section. More information about model parameters is reported in the Supplemental Information section (Table S2 and S3). Fig. 5 shows that it has also been possible to dynamically reproduce influent profiles (Fig. 5, left column). Influent loads were dynamically fractionated following the same principles as stated in section 3.4.1. Measurements were mapped into model states following the same rationale as explained in section 4.2., which makes the dynamic profiles on the influent biomass stream align with the experimental measurements obtained in flow proportional samples. In general, model-based results nicely fell within the range of the performed measurements, where the deviation between measurements and predicted process variables from the model states was 12.4% (see detailed values in Table 2). The rationale for these potential deviations between model and data is critically analyzed in the discussion section. No substantial daily/ weekly variation was observed in flow rate for the five week experimental campaign although some high and low peaks could be observed (Fig. 5, first row), the high hourly variation was attributed to the fast dynamics of the production biomass stream (data not shown).

Dynamic simulations
Firstly, one can notice the smoothing effect that the stabilization tanks (16 h retention time) had on their downstream effluent concentrations (Figs. 5, 2 and 3 column, 2 to 10 row). Secondly, as occurring in steady state simulations, the highly alkaline conditions induced hydrolysis of compounds containing COD, N, P and S; simultaneously with Ca precipitation and subsequent separation in the centrifuges. It is clearly observable that an increase in particulate material concentration in the influent translates into a similar pattern in the dewatered cake particulates concentration. For the soluble fractions, one can observe the solubilization effect and realize that for both reject water and cake the plots are exactly the same. The reason behind this is that a similar composition of the liquid phase was assumed in the influent stream to the dewatering units, even though the load of solubles is completely different. Table 3 summarizes the simulation results after performing the scenario analysis. Steady state computer simulations revealed differences in terms of raw material consumption, and properties of the reject water and dewatered cake streams. The scenario with the highest chemical consumption was S2 (+50%), which corresponds to the chemical stabilization with sodium hydroxide. In terms of alkali units, quicklime is 1.43 times stronger than sodium hydroxide per weight unit (National Lime Association, 2007), thus stabilization with sodium hydroxide would require more chemical to achieve the same pH. It is important not to mixed up strength of the base and the neutralization capacity. This variation was successfully captured by the physico-chemical model used in this study. In addition, using sodium hydroxide instead of quicklime avoids precipitation of calcium carbonates downstream, increasing VSS content by 23%, which substantially decreases the cost of bio-solids transportation as they are sent to the off-site biogas plant (20%). Foremost, a higher proportion of VSS in the dewatered cake opens the possibility of an increased organic loading rate in the anaerobic digesters (see section 3.1). In order to generate the results of S3 (Refluxing) was necessary to use the data collected in MC#2 and clearly differentiate the production biomass stream from the waste activated sludge (see Table 2). A similar procedure as was presented in section 4.1 was adopted to run the mass balances (see results in Figure S2 in supplemental information). Simulation results clearly indicated that by-passing the WWTP sludge stream directly to the dewatering step, would substantially decrease the amount of quicklime (30%) to stabilize production biomass (see chemical consumption values). In addition, this strategy would prevent the solubilization of a significant amount of VSS. As a result, S3 would lead to the lowest COD sol and TN sol loads (13% and 14%) in the reject water stream. This would also positively impact the system by decreasing the solubles load to the activated sludge units, implying lower energy usage in aeration, less sludge handling and liberating capacity in the water line. As a result, it would be possible to achieve higher VSS and TN in the dewatered cake (+13% both), which could be used for biogas production and for agricultural land fertilization. This strategy is in process to be implemented full-scale. .

DISCUSSION
The study summarized in this manuscript, presents for the first time, the results of applying thorough mass balances, Sankey diagrams, and mechanistic model simulations when analyzing chemical stabilization data from the bio solids treatment plant. Both waste activated sludge and production biomass from a biotech industry has been used a representative case study. Nevertheless, the reader must be aware that industrial biosolids management differs from the municipal sludge treatment where harsh stabilization methods are not required and the focus lies on nutrient removal and energy recovery (Alanya et al., 2015;Zhao et al., 2019). Moreover industrial cases have a strong case-by-case character since the quality and the quantity of these streams may change substantially from industry to industry and model parameter might have to be adapted. Still, the authors believe that the general model structure and the tools presented (and also available on request) will be useful for process assessment.
Compared to the existing literature, this study goes a step further by being able to mathematically describe the main processes (hydrolysis, weak acid-base chemistry, precipitation, solid-liquid separation) taking place in an industrial stabilization wastewater treatment facility by estimating suitable model parameters. The model predictions in steady state offer satisfactory results and provide a solid starting point for accurate evaluation of operation changes or retrofitting scenarios. The steady state model has been used for the evaluation of three different process alternatives, which show the potential of developing this type of engineering tools.
It is important to highlight that the ultimate goal of this study is to develop a model that can be used (and compatible) with plant wide approaches in order to run integrated studies. Hence, the developed models are set-up in a way that can be easily linked to well-established plant-wide approaches (Solon et al., 2017;Kazadi-Mbamba et al., 2016 in order to conduct integrated assessments. Perhaps, simpler approaches would have been possible to predict partly the effect of stabilization (Abudi et al., 2016), but some of the aspects we were interested to assess: precipitation potential, use of chemicals, VSS/TSS ratio would not have been possible without a fairly complex model physicochemical model (Paton et al., 2018) such as the one presented in this manuscript.

Mass balances and influent fractionation
Even though the presented study is a big step forward in model development & applicability in industrial systems, it also has some limitations. For example, the assumptions made during influent fractionation are based on default model parameters (Henze et al., 2000;Batstone et al., 2002). No experimental determination of proteins, lipids and fats was carried out in this study, for which predictions of the influent fractionation could otherwise have been compared with (Raunkjaer et al., 1994;Jimenez et al., 2013;Loosdrecht et al., 2016).
The same applies to the pool of inorganic particulates, where assumptions were made trying to close Ca and P balances. No specific analysis of precipitates has been done in order to determine specific salts or complexes (Serpone, 1996). Only information taken from the mass balances was used to determine what precipitates were being formed. When the mass balances for reject water and dewatered cake are set up, an apparent decrease in the particulate fraction in favor of the soluble fraction is observed. The exact mechanism behind the solubilization effect taking place inside the stabilization tanks remains unclear. A plausible explanation can be that high pH induces cell wall and membrane disruption with the subsequent lysis and release of the intracellular content to the outer media (Vlyssides and Karlis, 2004). This genuinely soluble cellular content that was enclosed inside the cells before stabilization, could not be measured by filtering and was therefore detected as part of the particulate fraction.

Steady state and dynamic simulations
The presented mathematical approach is able to predict well the concentration of a broad variety of compounds, for which concentration sometimes varies several orders of magnitude depending on the plant location. For instance, the fate of non-reactive soluble ions, such as Na, were correctly allocated in both of the dewatering effluent streams (see values in Table 2). The case of particulates in the dewatered cake stream is an exception, due to several reasons. The first one is attributed to the experimental methodology, where the high solids concentration of this stream makes sample handling and analysis more complex than for liquid streams, leading to potential biases and error. The second reason could be on the modeling side, since only two settling speeds for particulate material are considered here; one for particulate organics and another one for particulate inorganics. (see values in Table 2). The modeling results could be refined by assigning different settling speeds to different types of compounds, as proposed by Maruéjouls et al. (2014).
As expected, predictions from dynamic simulations were able to match the magnitude of the flow-proportional samples as occurred in steady state simulations. However, the approach of using 2 and 3 days composite samples for predicting plant dynamics seems to be an inadequate strategy. The hourly variation in flow rate through the plant, makes it impossible to capture fast dynamics in this treatment line. It would therefore be better to use a shorter sampling interval and to perform a shorter sampling campaign as seen in other studies (Insel et al., 2006;Sin et al., 2008). As mentioned in the previous paragraph, the weakest dynamic predictions were those trying to predict particulate compounds, which are challenging to measure since its concentration is calculated from the total and soluble analysis results. As a result, the single measurements add to the uncertainty of the analysis causing a larger analytical error. In practice, this flaw could be alleviated by performing measurements in triplicate. However, this solution will considerably increase both the time required and the economic cost of conducting such a detailed sampling campaign. To conclude, it is clear that having a highly dynamic flow rate can be addressed by installing buffer tanks that provide some retention time to the process which is critical to a steady operation of the dewatering units (decanter centrifuges) and control of flocculation (polymer dosage).

Scenario analysis
This work presents a comparison between a widely used chemical stabilization procedure and two potential alternatives in terms of raw material requirement, quality of the reject water and dewatered cake. The results of the scenario analysis seem to indicate that S3 (refluxing) is the best option, and not only from the process performance point of view. Indeed, in addition it is a technically feasible option. The WWTP sludge is a controllable stream since it is mainly originated in the activate sludge units, and can be regulated on demand by manipulating the split between waste and recirculated activated sludge. Moreover, it is also a stable stream because COD sol and TN sol have been consumed in the conventional activates sludge reactors. When looking at the production biomass stream there is not such a degree of flexibility, since the high content of biodegradable organics will cause odor problems already after a short retention time (see section 4.1). This stream contains production strains, some of them genetically modified, that should be inactivated before leaving the system for both intellectual property and environmental reasons (European Parliament, 2009). As an ultimate goal, this scenario will substantially increase the capacity to treat production biomass given the available equipment within the factory (=capacity liberation). Since the studied system is framed within an mass-energy integrated industrial cluster (Kalundborg Symbiosis, 2020), the significant increase in cake production and higher VSS/TSS ratio would positively impact the off-site biogas production. Similar propositions have been formulated in other geographical locations and are a strong drive in the current sustainability context (Kapsalis et al., 2019;Kyriakopoulos et al., 2019).
Another important factor to be accounted for when interpreting the results is that we have assumed the same biodegradability for both streams, which may well not be true (Jimenez et al., 2020). Indeed, further experimental validation to determine hydrolysis rates under high alkaline conditions must be conducted in order to have a better estimate of the potential COD sol and TN sol returned to the water line as well as the VSS/TSS ratio of the dewatered cake . All in all, we firmly believe that the proposed set of modelling tools provide us with valuable information about what directions must be further explored before implementation of new sludge treatment strategies.

Future work
The results reported in this manuscript are focused on the solids line of the whole waste treatment system. Further studies will follow where the stabilization plant presented herein will be framed and interconnected with the water line of the largest industrial wastewater treatment plant in Northern Europe (Feldman et al., 2017(Feldman et al., , 2018. On this way, it should be possible to perform a holistic evaluation of the impact that retrofitting alternatives in the sludge line would have in the context of the whole wastewater treatment plant, and also the consequences on the other industrial symbiosis partners can be investigated. Further experimental testing with posterior data analysis and model development and calibration would also be necessary in case different retrofitting scenarios are to be implemented at full-scale. For example, a change of inactivating alkaline agent must be further tested to ensure the same process effectiveness (microorganisms death, odor control, etc.) but also on the rest of units of the WTS (Xiong et al., 1999;Davies-Colley et al., 1999;Lambert, 2003;Carrère et al., 2010). In the case of the dewatering step, flock formation and superficial charge neutralization must be assured by the new chemical employed (Lee et al., 2014;Nasser and James, 2006).
Another possibility being explored is to complement the assessment   of traditional evaluation criteria such as effluent quality and cost, with more sophisticated evaluation methods such as life cycle assessment (LCA). Hence, the initial ranking could be reversed when looking at the entire life cycle (Corominas et al., 2013). These types of evaluation methods have proven to point out the risks of local optimization, i.e. when there is a single unit process that one wants to optimize, which might lead to an increase of the overall impact elsewhere (Laurent et al., 2014 a and b). Unless a life cycle perspective is taken, it is not possible to overlook such burden shifting (Thompson et al., 2016). This is why LCA aims to cover the entire life cycle and all relevant environmental impacts (Lundin et al., 2000).

Conclusions
The main findings of the study can be summarized in the following points: 1) The flow and mass balances show a disagreement in the data up to 17%. Sankey diagramsa graphical toolallow to identify occurrence, transport and fate of COD, N, P, S, Ca, Na and K within the units comprising the flow diagram of the WWTP under study. 2) Compounds arrive at the inlet of the WWTP mainly as particulates (COD, N & P) or mainly as solubles (S, Ca, Na & K). High alkaline conditions within the stabilization tanks favor the hydrolysis of COD, N, P and S. It also promotes the precipitation of Ca. Na and K pass through the system unaltered. Decanter centrifuges concentrate soluble COD, N, S and soluble metals in the reject water stream, while particulates COD, P and especially inorganics are retained in the dewatered cake as expected. 3) Model-based influent fractionation indicates that most of the particulate COD, N and P is allocated into proteins and lipids. The soluble fraction is distributed into amino-acids, long-chain, volatile fatty acids and inorganic compounds (ammonium/ammonia, phosphates and sulfates). Inorganic particulates are mainly comprised of calcium hydroxide and phosphates. 4) Simulation results show that the model developed within the study is able to reproduce soluble, particulate and total fractions of selected compounds at different plant locations. The main processes included are high pH induced hydrolysis, precipitation and solid-liquid separation. The deviation between measurements and predictions is 9.6 and 12.4% for steady state and dynamic conditions, respectively. 5) The outcome of the scenario analysis reveals an increase of 23% in the VSS/TSS ratio of the dewatered cake when NaOH is used as inactivating agent instead of CaO, but with a 50% increase in chemical consumption. The selective stabilization of the production biomass stream and by-passing the WWTP waste activated sludge stream has the lowest use of chemicals and reduces the load of COD sol (13%) and TN sol (14%) returned to the water line via the reject water. It also increases the VSS content in the dewatered cake which contributes to a better economy of the current mode of operation. This is in process to be implemented full-scale. 6) The set of models presented in this paper, will help the company involved in this study, to make a strategic decision about the best way to stabilize production biomass and WWTP sludge. This work is integrated in a bigger project, where a plant-wide approach is being developed to assess holistic operational strategies.

Software availability
Influent fractionation code + Matlab/Simulink implementation of the WWTP is available on request. Interested readers would be able to reproduce the results presented in the manuscript. To express interest, please contact Prof. Krist V. Gernaey (kvg@kt.dtu.dk) and/or Dr. Xavier Flores-Alsina (xfa@kt.dtu.dk) at the Department of Chemical and Biochemical Engineering at the Technical University of Denmark (DTU).

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.