Expanding the activated sludge model no.1 to describe filamentous bulking : The filamentous model

Several wastewater treatment plants (WWTPs) worldwide have documented the occurrence of filamentous bulking in full-scale systems despite the efforts made for filamentous bulking control. The Activated Sludge Models (ASM) can neither describe nor predict filamentous bulking at WWTPs. This research aims to expand the ASM No. 1 to be able to describe filamentous bulking sludge and to model the effects of incorporating an aerobic selector on filamentous bulking. Four theories (hydrolysis of slowly biodegradable organics theory, kinetic se- lection theory, substrate diffusion limitation theory, and filamentous backbone theory) were combined to expand the ASM1. The results showed that this combination was successful to distinguish between the substrate uptake by filamentous organisms and by floc forming organisms. Moreover, the concentrations of filamentous and floc forming organisms inside the reactor were converted to a “ filamentous score ” that predicted the outcome of filamentous bulking. Filamentous bulking would occur if the filamentous score was higher than 3, in a range of 1 – 6. As a case study, the Fuhais WWTP in Jordan was modelled using the expanded-ASM1 “ filamentous model ” and the filamentous score of 4.2 was in accordance to the visually observed bulking. However, when an aerobic selector with 3 compartments would be added before the aeration tank, the filamentous score decreased to 1.5. The selector changed the hydraulic behaviour from a completely mixed mode to a plug flow mode, which created a substrate gradient in the model, making the floc forming organisms to outcompete the filamentous organisms. Additional experimental results are required to further calibrate and validate the filamentous model.


Introduction
Despite different efforts made at wastewater treatment plants (WWTPs) to control filamentous bulking, still several WWTPs worldwide document the occurrence of filamentous bulking in full-scale systems. A study done by Deepnarain et al. [1] showed that 5 out of 7 WWTPs surveyed in South Africa had a sludge volume index (SVI) larger than 150 mL⋅g −1 , therefore having a poor settling efficiency. In another study, it was observed that 25% of the activated-sludge WWTPs in France are suffering from sludge bulking [2]. Besides, 50% of WWTPs in Northern China are affected by sludge bulking [3]. The persistence of this problem can partly be explained by the fact that filamentous bacteria may cause sludge bulking problems even when they do not represent the dominant metabolic bacterial group in the activated sludge. Even if filamentous bacteria have a volume fraction less than the floc-forming bacteria, they can cause sludge bulking [4][5][6]. As the abundance of filamentous organisms increases, the floc structure becomes open, affecting sludge settleability. However, a minimum presence of filamentous bacteria is also essential in the formation of the floc-forming bacteria because filamentous microorganisms form the backbone of the floc and keep the floc in a good structure and able to easily settle [7][8][9]. Wang et al. [10] showed that as SVI increases from 76 to 275 mL⋅g −1 , the filamentous abundance increased from 'few' (Score 1) to 'abundant' (Score 5). As the filamentous concentration increases, the settling properties become worse leading to the washout of the activated sludge [10,11]. Overall, the uncontrolled growth of filamentous bacteria disrupts the settling properties of the activated-sludge systems, affecting the performance of the WWTPs.
Filamentous bulking can be controlled by adding a selector tank, which can be aerobic, anaerobic, or anoxic. A selector is a small tank, and its volume is usually not larger than 10% of the aeration tank volume, placed before the aeration basin. Commonly, a selector tank receives the return of activated sludge (RAS) and the influent of the WWTP (Q inf ), therefore creating a strong substrate concentration gradient that mimics the hydraulic conditions observed in plug flow reactors. This strong gradient encourages the floc-forming organisms to grow faster than filamentous organisms while degrading the soluble substrate in the system. As a result, the filamentous microorganism growth is hindered, and bulking is prevented [6,12,13].
The kinetic selection theory (KST), substrate diffusion limitation theory (SDL), hydrolysis of slowly biodegradable organics theory (HSBO), and filamentous backbone theory (FBT) are essential for understanding the relation between filamentous and floc-forming organisms. According to the KST, that uses the Monod expression [14], flocforming and filamentous organisms have different maximum growth rates (μ max ) and affinity constants (K S ). Consequently, filamentous organisms have higher growth rates at low substrate concentrations and floc-formers have higher growth rates at high substrate concentrations [6]. In contrast, the SDL assumes that floc-formers and filamentous microorganisms have the same kinetics. However, at low substrate concentration, the diffusion limitation causes a very low substrate concentration inside the flocs for the floc-forming organisms. Therefore, it becomes hard for floc-forming organisms to access the substrate, while the filamentous organisms can readily uptake substrate due to their morphology. So, in the SDL case, bulking occurs due to differences in morphology rather than differences in kinetic rates, as in the KST. Nevertheless, the driving force is the same, which is a low substrate gradient resulting in a low concentration [15]. The HSBO theory proposed by Kappeler & Gujer [4] and experimentally verified by Martins et al. [16] explains that slowly biodegradable substrate is taken up and incorporated inside the sludge floc and then hydrolyzed. The hydrolyzed products are consumed by the floc-forming organisms, therefore giving an advantage for floc-forming organisms over filamentous organisms. Another theory is the FBT that describes the formation of activated sludge flocs by two processes. The first step, which depends on the bioflocculation of floc-forming organisms, is called microstructure floc formation. These flocs are spherical in shape and compact but are weak. Then, the second step is the formation of macrostructure flocs, where the filamentous bacteria form a backbone inside the flocs, and with the help of extracellular polymeric substances, the floc-forming bacteria become firmly attached [8]. Kappleler & Gujer [4] developed a mathematical model for aerobic bulking, however they did not include the FBT theory. Cenens et al. and Lou & Reyes [8,17] incorporated the FBT in their model by defining a parameter called α, which is defined as the rate of incorporation of filamentous bacteria into flocs. One of the limitations of this model is that it does not consider the difference in kinetics between free filaments and incorporated filaments. These theories are important in understanding the kinetics of filamentous organisms and could be combined into one mathematical model to improve the description of filamentous bulking.
In this study, ASM1 is expanded to predict filamentous bulking occurrence. ASM1 was chosen as it is considered a reference model for WWTP modelling in the research and industrial communities and is considered to be state-of-the-art for activated sludge modelling [18]. The objective of this study is therefore to modify and expand the ASM1 to describe the filamentous bulking occurrence by incorporating four important theories. The KST and SDL theories were combined to differentiate between the substrate uptake rate by free-filamentous organisms and by floc-forming organisms. The HSBO theory was used to differentiate between the different substrate uptake rates (readily soluble organics and slowly biodegradable organics). Finally, the FBT was used to describe the amount of filaments that are responsible for the backbone of the floc-forming bacteria. This paper shows that the combination of the four important theories is important in modelling WWTPs that are prone to filamentous bulking, as other ASM models cannot predict the occurrence of filamentous bulking.

Expanding ASM1 to include filamentous bulking
The ASM1 was adjusted to distinguish between free-filamentous (i.e. outside the flocs) organisms and floc-forming organisms. The first step to adjust the model was to split the heterotrophs into two organisms: flocforming organisms (X Floc ) and free-filamentous organisms (X Ffil ). The second step was to differentiate between the growth rates and substrate uptake rates of both organisms by combining the HSBO and the KST and SDL theories. This was done by assigning different values of K S for the free-filamentous and floc-forming organisms, while μ max values were the same for both organisms. Changing K S and keeping μ max constant allows the model to only differentiate between free-filamentous and flocforming bacteria based on the substrate concentration available. It was also important to differentiate between how both organisms take up different substrates. Therefore, another component was defined, which is the soluble substrate produced by the hydrolysis of particulate substrates inside the floc (S S,H ). Free-filamentous organisms have high affinity to uptake the soluble substrate from the influent (S S ) when the substrate concentration is low and floc-forming organisms show higher uptake rates for S S when the substrate concentration is high. This was translated into the model by giving higher K S values to floc-forming organisms than free-filamentous organisms for S S consumption. On the other hand, floc-forming organisms are expected to consume S S.H at a higher rate than free-filamentous organisms since floc-formers are the ones hydrolyzing X S into S S,H . However, free-filamentous bacteria can still consume some of the S S.H but only after the hydrolyzed substrate has diffused out of the floc. This was translated into the model by giving lower K S values for floc-formers for consuming S S,H than for free- Concentration of the total filamentous organisms (free filaments and the filaments responsible for the backbone of the floc) filamentous bacteria (Fig. 1). Finally, according to the literature, filamentous organisms can only perform denitrification till nitrite [6,26] and therefore it was considered that free-filamentous organisms do not contribute to the denitrification process. Therefore, anoxic growth in the filamentous model was only performed by floc-forming organisms.

COD
To incorporate the FBT into the model, the fraction of filamentous bacteria that are incorporated inside the floc in relation to the total floc forming organisms was estimated using the microscopic picture from Jenkins et al. [19] (Fig. 2). QGIS software [20] was used to measure the area of filamentous bacteria inside the flocs of each picture and relate this area to the total area of floc-forming organisms. Then, the model was further developed to check if filamentous bulking occurs or not. This was also done using the microscopic pictures from Jenkins et al. [19] and the QGIS software to develop a relationship between the ratio of total filamentous organisms (both inside and outside the flocs) to total non-filamentous organisms and the filamentous score table. The distinguishing between free filaments, filaments incorporated inside the flocs, and the flocs are presented in detail in Annex A.
All these modifications were implemented in the ASM1 model resulting in the filamentous model (expanded-ASM1) matrix (Table 1) and new stoichiometric and kinetic parameters ( Table 2). The other stoichiometric and kinetic parameters and the Fuhais influent data were kept the same as in ASM1.

ASM1 for modelling the Fuhais WWTP
The software programs used were the computer program for the Identification and Simulation of Aquatic Systems (AQUASIM) [22], QGIS 3.14.0 [20], and Microsoft Excel Worksheets. AQUASIM software was used because it is designed to allow the users to easily build their models, define the compartments and the components, and define the links between compartments. QGIS was used to calculate surface area ratios from some microscopic pictures.
ASM1 was used to model the Fuhais WWTP in AQUASIM (Fig. 3). The Fuhais WWTP is a municipal plant located in Fuhais Town, Balqa Governorate, Jordan, which has an average inflow of 3100 m 3 ⋅d −1 , COD of 770 mg⋅L −1 , and TN of 80 mg⋅L −1 . More information about the operating conditions at the Fuhais WWTP is presented in Annex B. Steady-state conditions are considered sufficient, at this stage, to integrate the model and assess the interactions among the microbial populations. As such, steady-state simulations were conducted using empirical data, and the stoichiometric and kinetic parameters that are recommended by Henze et al. [21] (Annex C). To perform these simulations, TCOD and TN fractionation were done (Table 3) and the calculations are presented in Annex D. Note that the DO in the modelled reactor was maintained to be around 1.0 mg⋅L −1 , and the clarifier is assumed to be 99.99% efficient in removing solids with no biological reactions taking place.

Modelling an aerobic selector to control filamentous bulking sludge
The Fuhais WWTP has a 500 m 3 equalization tank used for temporary storage during peak inflow rates. This tank was converted to an aerobic selector in the AQUASIM (Fig. 4). The matrix of the filamentous model (Table 1) was used while modelling the selector, modelled with a variation in the number of compartments. Each compartment of the selector was added as a new tank in AQUASIM to simulate the plug-flow effect of an aerobic selector.
The aerobic selector was simulated with 1, 2, 3, and 4 compartments for three different sets of input data. The first set of input data was for the 14th of April 2020, when the plant reported the lowest COD concentration (170 mg⋅L −1 ) in the influent for the year 2020. The second set of data was the average plant data. The third set of data was for the 1st June 2020, when the plant reported the highest COD concentration (1550 mg⋅L −1 ) in the influent for the year 2020.

Expanding ASM1 to include filamentous bulking
The filamentous model was further developed to include filamentous bulking. The fraction of filamentous bacteria in between the flocforming organisms (FF) was calculated for each microscopic picture that is shown in Fig. 2 and documented in Table 4. In microscopic picture 2(f), it was not possible to distinguish between filaments that were inside the flocs, as all the filamentous organisms spread out from the floc structure. Therefore, FF was only calculated for microscopic pictures 2 (a) to 2(e). Also, the ratio of total filamentous bacteria to total nonfilamentous bacteria (fil/nfil) in each microscopic picture was calculated ( Table 4). The relation between the fil/nfil and the filamentous score was plotted and the exponential trendline with an R 2 of 0.99 was obtained resulting in Eq. (1).

Filamentous score equation
Furthermore, from the FF values, in Table 4, an average FF value was calculated, which is 0.03. This value was used in the filamentous model to account for the filaments that are inside the flocs, in accordance with the FBT. Two new equations were added to AQUASIM as formula variables to define the real concentrations of the total filamentous organisms and non-filamentous organisms after considering the FF ratio (Eqs. (2) and (3)). X Nfil is the total amount of the non-filamentous organisms, without the filaments that act as the backbone of the floc structure, and the X Tfil is the total amount of filamentous organisms in the modelled reactor including the filaments that serve as the backbone of the flocforming organisms. Then the fil/nfil ratio is calculated based on Eq. (4).
Expression for total non-filamentous organisms concentration in the modelled reactor Expression for total filamentous organisms concentration in the modelled reactor Expression for fil/nfil Finally, the output from the filamentous model is a ratio between filaments and non-filaments. To assess if filamentous bulking occurs or not, the fil/nfil is converted to a numerical value that corresponds to the filamentous score, using Eq. (1). According to Jenkins et al. [19], if the filamentous score is less than 3, filamentous organisms present in the reactor are not sufficient to cause filamentous bulking. Therefore, if the output of the filamentous model has a filamentous score that is higher than 3, it can be concluded that filamentous bulking is most likely to occur at the plant.

The output of ASM1 and filamentous model
The AQUASIM simulation outputs mainly focus on the steady-state results of the model (Table 5). In the ASM1, the concentration of filamentous and non-filamentous heterotrophs is represented as one organism. However, in the filamentous model, it is represented as two organisms (filaments and non-filaments). The sum of the filamentous organisms concentration and the non-filamentous organisms concentration in the filamentous model is approximately equal to the concentration of the heterotrophs in ASM1 because the total influent biodegradable substrate and the yield for both organisms are the same for both models. The nitrate concentration in ASM1 is slightly lower than in the filamentous model, showing that the denitrification (anoxic growth) rate is marginally faster in ASM1 than in the filamentous model. From the filamentous model results, the fil/nfil ratio was 0.55, and the Phase-contrast micrographs of filament abundance categories using the subjective scoring system (original magnification 100×) a) few, b) some, c) common, d) very common, e) abundant, and f) excessive [19].
Aerobic growth of autotrophs Decay of floc forming organisms Ammonification of soluble organic nitrogen Hydrolysis of entrapped organics in the floc Hydrolysis of entrapped organic nitrogen Aerobic growth of floc forming organisms on S S,H Aerobic growth of filamentous organisms on S S,H Anoxic growth of floc forming organisms on S S,H Decay of filamentous organisms filamentous score was 4.2, which is in line with the observation that the Fuhais WWTP is suffering from filamentous bulking.

Effect of an aerobic selector to control filamentous bulking sludge using the filamentous model
A relationship exists between the number of selector compartments and the occurrence of filamentous bulking (Fig. 5). The overall concentration of floc-forming organisms increases and the overall concentration of filamentous organisms decreases as the number of compartments increases in the 500 m 3 aerobic selector. The sludge loading rates for each compartment is presented in Annex E.
For the soluble substrate, the trend observed was a steep decrease from the first compartment to the second compartment, then S S slightly decreases from one compartment to the other until reaching a negligible value in the aeration tank ( Table 6). The X S gradually decreases from one compartment to the other until reaching around 5.5 mg⋅L −1 in the modelled reactor. S S,H produced inside the floc is consumed, therefore leaving the concentration of S S,H in all the selector compartments and the modelled reactor less than 0.5 mg⋅L −1 . The concentration of flocforming organisms and filamentous organisms follow a similar trend of slightly decreasing concentrations from one compartment to the other until reaching the aeration tank. The decrease in biomass concentration is expected since the substrate concentration available for microorganisms also decreases.

ASM1 vs filamentous model
An important limitation of ASM1 is that it is not able to predict the occurrence of bulking [23]. However, with the filamentous model, filamentous bulking can be predicted, because the heterotrophs, as well as the substrate, were changed to account for different organisms (flocformers and free-filaments) and different substrates (S S and S S,H ). The filamentous model can be the first step for modelling WWTPs in the design and/or operational stages to prevent or control problems associated with filamentous bulking. Also, the filamentous model is considered a grey-box model, like the ASM1, and requires the same amount of data needed as the ASM1. Generally, the filamentous model focuses on differences of substrates to model the filamentous bulking sludge. However, the filamentous model can be further developed to take into account how dissolved oxygen (aeration) affects filamentous bulking sludge. The filamentous model presented in this paper is a conceptual model that needs to be further calibrated and validated to be used in practical applications.
Nitrates are present in the modelled reactor for both models: ASM1 and filamentous model, meaning that the denitrification process is slow. This is because the tank is an aerobic reactor with an average DO concentration of 1 mg⋅L −1 . Therefore, with the presence of oxygen, the denitrification process becomes very slow, as mentioned by Skiba [27]. The average TN for January till November 2020 in the Fuhais WWTP's effluent stream is 12 mg⋅L −1 , but it is noticed that the TN in the effluent stream of the Fuhais WWTP is fluctuating between 2.8 mg⋅L −1 and 55 mg⋅L −1 . Likewise, the nitrate concentration at the Fuhais WWTP fluctuates. This large range can be explained by the fact that the DO in the Fuhais WWTP is also fluctuating reaching minimum values of almost 0.1 mg⋅L −1 and maximum values of 5 mg⋅L −1 . Therefore, the nitrification and denitrification processes are unstable in the reactors at the Fuhais WWTP. However, when the DO of the plant is having an average value of 1 mg⋅L −1 , it is expected to have high nitrate concentration as the denitrification process is slow, and this is what the ASM1 and   filamentous model showed.
When the DO in the model is 1 mg⋅L −1 , the denitrification oxygen inhibition factor is 0.20 and the nitrification oxygen inhibition factor is 0.71, showing that at this DO value, the denitrification process is slowed down. The DO in the reactors can be decreased to 0.5 mg⋅L −1 , to have an acceptable rate for nitrification and denitrification at the same time. At DO value of 0.5 mg⋅L −1 , the nitrification oxygen inhibition factor will be 0.56 and the denitrification oxygen inhibition factor will be 0.33. However, maintaining a low oxygen concentration (less than 1.1 mg⋅L −1 ) is associated with increasing the growth of filamentous organisms and therefore it increases the chances that filamentous bulking occurs, as described by Nittami et al. [28]. Therefore, for the filamentous model to assess filamentous bulking under low dissolved oxygen concentration, it should differentiate between the behaviour of floc forming organisms and filamentous organisms under different DO values. This can be further modified in the filamentous model by changing the values of K OHf and K OHfil . Another way to include denitrification is intermittently changing the DO in the tanks to simultaneously have higher rates of nitrification and denitrification. In a study done by Zhao et al. [29], it was shown that complete nitrification can be achieved at very low DO concentrations (0.0-0.8 mg⋅L −1 ) given that the organic loading rate is low and the SRT is long. However, with intermittent aeration, filamentous bulking was reported by Henze et al. [12]. This can be tested when the filamentous model is modified to have different K OHf and K OHfil values, as previously mentioned, to ensure that filamentous bulking will not occur at the times when the DO concentrations are very low in the reactor.
Furthermore, the nitrate concentration of the filamentous model is higher than the nitrate concentration of the ASM1. This is because, in the filamentous model, the distinction between floc-formers and freefilaments resulted in a higher concentration of free-filamentous organisms compared to floc-forming organisms, and the denitrification process is performed only by floc-forming organisms. The denitrification processes in the filamentous model are processes number 2 and 11, which are the anoxic growth of floc-forming organisms by taking up the soluble substrate in the influent and the soluble substrate produced by hydrolysis. The filamentous model is better to predict the nitrate concentrations than ASM1 when filamentous bulking is occurring, as according to literature when a plant is suffering from filamentous bulking the activated sludge can be washed out leading to the loss of denitrifiers and nitrifiers [10,11]. To the authors' knowledge, there is not sufficient evidence in literature of modelling the denitrification process using ASM1 while a plant is suffering from filamentous bulking. Therefore, the

Table 4
Relation between the microscopic picture and fil/nfil and FF.

Evaluation of the filamentous model theories
The filamentous model uses four theories (HSBO, KST, SDL & FBT) to expand the ASM1 in order to describe filamentous bulking. The HSBO, KST, and SDL theories were combined to favour the growth of floc forming organisms when the substrate concentration is high and to favour the growth of free-filamentous organisms when the substrate concentration is low. The combination of theories resulted in changing the K S values for floc-forming organisms and free-filamentous organisms. However, these K S values can also be interpreted as apparent mass transfer parameters that describe the diffusional resistance. For example, for the case of S S uptake, the S S first needs to diffuse inside the floc to be consumed by floc-forming organisms. Conversely, freefilamentous organisms will only consume S S directly. Therefore, the apparent K Sf is higher than the apparent K Sfil to account for the diffusional resistance of S S going into the floc. Moreover, for the case of S S,H uptake, the S S,H first needs to diffuse outside the flocs to be consumed by free-filamentous organisms. Conversely, floc-forming organisms will just consume S S,H directly. Therefore, the apparent K Hf is lower than the apparent K Hfil to account for the diffusional resistance of S S,H going out of the floc. On the contrary, the μ max for free-filamentous bacteria and floc-forming bacteria was kept the same so none of them is favoured to grow faster and therefore the growth rate is only dependant on the substrate concentration. The approach of changing the K S values and keeping μ max constant was the same approach used in the AEROFIL model developed by Kappeler & Gujer [4]. It can be concluded that the combination of the three theories was effective in distinguishing between floc-forming organisms and free-filamentous organisms based on the substrate uptake. This is because bulking is assumed to occur due to differences in morphology according to the SDL, and differences in kinetics according to the KST. Nevertheless, the driving force is the same, which is low substrate concentrations [6,15].
The incorporation of FBT in the filamentous model was done by adding the FF factor that represents the fraction of filamentous bacteria that are needed inside the floc. Cenens et al. and Lou & Reyes [8,17] incorporated the FBT by defining a parameter called α, which is defined as the rate of incorporation of filamentous bacteria into flocs. One of the limitations of that model is that it does not take into account the differences in kinetics between free filaments and filaments incorporated into the flocs. However, the approach used in this paper takes into account the differences between the free filaments and the filaments incorporated in the flocs, since the incorporated filaments are considered part of the floc-forming organisms. These incorporated filaments will have the same kinetics as the non-filamentous bacteria. Nevertheless, the incorporated filaments are added to the free filaments to calculate the fil/nfil ratio and therefore assess the filamentous score. The FF used was a constant average value that was obtained from the microscopic pictures shown in Fig. 2. However, when the FF is plotted against each microscopic picture (Fig. 6), the FF increases as the filamentous score increases. Therefore, to improve the accuracy of the model, FF can be defined as a function rather than a constant value.

Effect of an aerobic selector to control filamentous bulking sludge
When an aerobic selector was added to the system, the growth of non-filaments over filaments was stimulated. From Fig. 5, it is seen that the higher the number of compartments in a selector, the lower the fil/ nfil and the filamentous score. This is because the more the compartments, the more the effect of plug flow, so the higher the gradient of S S and X S in the selector. Therefore, non-filamentous bacteria concentration increases more than the filamentous bacteria concentration as their growth is favoured by a higher substrate concentration (caused by a higher gradient), while filamentous growth is favoured by low substrate concentration [6]. Besides, the filamentous score is less than 3 for the selectors with 2 or more compartments. According to Jenkins et al. [19], filamentous organisms are dominant and likely responsible for solidliquid separation problems, when the filamentous score is 4 or higher. However, when the filamentous score is 3 or lower, it means that filamentous organisms are present but not sufficient to account for separation problems. Therefore, it is better to have a selector with 2 or more compartments to make sure that filamentous bulking will not occur at the Fuhais WWTP. Furthermore, according to Henze et al. [12], it is suggested that the number of compartments in an aerobic selector should not be less than 3. Also, the selector volume should not be more than 10% of the volume of the aeration tanks. Therefore, from these analyses, it is suggested to have an aerobic selector with 3 compartments to ensure that filamentous bulking will not occur at the Fuhais WWTP.   . 6. FF ratio plotted against each microscopic picture from Table 4.
The equalization tank at the Fuhais WWTP has a volume of 500 m 3 that is 7.8% of the total volume of the aeration tanks (6400 m 3 ). The equalization tank has a length of 14 m, a width of 6 m, and a depth of 6 m. The equalization tank at the Fuhais WWTP can be changed to an aerobic selector with 3 compartments to avoid filamentous bulking. As seen from Table 6, there is a higher concentration gradient of S S in the selector than without it, which favours the growth of floc-forming bacteria over free-filamentous bacteria. This is due to the effect of the parameter K S in the model. When K sf is high (8 gCOD⋅m −3 ) in the case of floc-forming organisms, the growth rate of flocs is favoured at high substrate concentrations (Plug flow reactor). On the other hand, when K sfil is low (1 gCOD⋅m −3 ) like is the case of free-filamentous organisms, the growth rate is favoured at low substrate concentration (mixed flow reactor). The selector simulates a plug-flow regime, therefore, favouring the growth of floc-forming bacteria [13]. It can be concluded from Fig. 5, that a plant with an aerobic selector can withstand steep changes in influent better than a plant without a selector and this is consistent with the literature [24]. This is because the filamentous score changed as the influent COD load changed (simulations "Minimum COD" and "Maximum COD") when there was not a selector. However, when a selector was added, the change in the filamentous score is negligible as the influent COD changes. Nevertheless, going back to the Fuhais WWTP plant case, the filamentous score of a selector with 3 compartments did not change with very low or very high COD loads in the influent. This analysis strongly supports the previously drawn conclusion to add a selector consisting of 3 compartments, before the aeration tanks at the Fuhais WWTP, to help preventing filamentous bulking.

Conclusions
1. The ASM1 model was modified by splitting the heterotrophic organisms into free-filamentous organisms (X Ffil ) and floc-forming organisms (X Floc ), and the soluble substrate to soluble substrate from the influent (S S ) and soluble substrate produced from hydrolysis inside the flocs (S S,H ). This change facilitated the differentiation between free-filamentous organisms and floc-forming organisms in the filamentous model.
2. The combination of the HSBO, KST, SDL, and FBT theories was effective in distinguishing between the substrate uptake by freefilamentous organisms and floc-forming organisms. 3. It was possible to predict the outcome of filamentous bulking, using the filamentous model, by converting the concentration of filamentous and non-filamentous organisms inside the reactor to a filamentous score. Filamentous bulking would occur if the filamentous score is higher than 3. 4. Adding a selector changed the hydraulic behaviour from a completely mixed mode to a plug flow mode. Therefore, creating a substrate gradient, stimulated the floc-forming organisms to outcompete the free-filamentous organisms. 5. The filamentous score predicted by the filamentous model was 4.2, which is in line with the observations at the Fuhais WWTP, showing that the plant is suffering from filamentous bulking. 6. Adding a selector with 3 compartments to the Fuhais WWTP decreased the filamentous score to 1.5, which indicates that no sludge bulking is expected.

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.

Acknowledgments
This work was financially supported by the Education, Audiovisual and Culture Executive Agency of the European Commission (Erasmus Mundus Specific Grant Agreement nr 2017-1957/001-001-EMJMD) and the Dutch Ministry of Foreign Affairs (DUPC2/SCARCE project). Lobna Amin gratefully acknowledges the support given by Dr. Naser Almanaseer and Eng. Mohammad Jadallah of Al Balqa Applied University and Eng. Yazan Ziadat of the Miyahuna company for the information related to the Fuhais WWTP.

Annex A.
The following pictures shows how the QGIS software was used to calculate the area of free filaments, filaments incorporated inside the flocs, and the flocs. For figure (a), the purple colour is the area corresponding to the free-filaments, the dark pink colour corresponds to the area of the filaments that are incorporated inside the floc-formers, and the light rose colour corresponds to the area of the floc-formers (excluding the incorporated filaments). For figure (b), the brown colour is the area corresponding to the free-filaments, the yellow colour corresponds to the area of the filaments that are incorporated inside the floc-formers, and the green colour corresponds to the area of the floc-formers (excluding the incorporated filaments). For figure (c), the green colour is the area corresponding to the free-filaments, the yellow colour corresponds to the area of the filaments that are incorporated inside the floc-formers, and the purple colour corresponds to the area of the floc-formers (excluding the incorporated filaments). For figure (d), the purple colour is the area corresponding to the free-filaments, the green colour corresponds to the area of the filaments that are incorporated inside the floc-formers, and the pink colour corresponds to the area of the floc-formers (excluding the incorporated filaments). b Obtained from Marais & Ekama [25].

Annex D.
The manual calculations used were based on the steady state system equations presented by Henze et al. [12] and are shown in this appendix. Tables D-1 and D-2 describe the symbols used in the calculations shown in Table D-3.