Modeling of Wastewater Treatment Processes in Membrane Bioreactors Compared to Conventional Activated Sludge Systems

Membrane techniques constitute an interesting alternative to conventional activated sludge systems (CAS). In membrane bioreactors (MBR), the biomass separated on membranes is retained independently of sludge sedimentation properties. As a consequence, a high biomass concentration as well as low food to microorganisms ratio can be obtained. Moreover, the development of a characteristic activated sludge population is stimulated by the specific conditions prevailing in MBRs. In the study, the operation and treatment efficiency of the MBR and CAS processes were examined and compared. Simulation was performed with the use of GPS-X software. The effluent quality obtained for the MBR system was either better or comparable to that of CAS. The most significant difference concerned the elimination of total suspended solids, which amounted to 99.8% in the MBR. Regarding nutrients, a low concentration of total phosphorus in the effluent from CAS and MBR was obtained (0.67 gP m?3 and 0.50 gP m?3, respectively). Greater differences were achieved in the case of total nitrogen. Although almost complete nitrification took place in both systems, a lower concentration of nitrate in the effluent from MBR in comparison to CAS, i.e., 11.2 gN m?3 and 14.1 gN m?3, respectively, allowed us to obtain a higher removal of total nitrogen (80.8% and 76.1%, respectively). Record Type: Published Article Submitted To: LAPSE (Living Archive for Process Systems Engineering) Citation (overall record, always the latest version): LAPSE:2019.0858 Citation (this specific file, latest version): LAPSE:2019.0858-1 Citation (this specific file, this version): LAPSE:2019.0858-1v1 DOI of Published Version: https://doi.org/10.3390/pr7050285 License: Creative Commons Attribution 4.0 International (CC BY 4.0) Powered by TCPDF (www.tcpdf.org)


Introduction
Municipal wastewater is usually treated by a process that includes primary sedimentation and an activated sludge method based on a treatment system comprising of an aeration tank (bioreactor) followed by a secondary clarifier.The efficiency of this process mainly depends on the condition of the activated sludge and the appropriate operation of the secondary clarifier [1].Wastewater treatment plants temporarily or permanently face difficulties regarding maintaining the required sludge age, dealing with a decrease in nitrification efficiency, sludge swelling, its flotation, a decrease in the effectiveness of sewage sludge thickening, and dewatering.Furthermore, an increase in the amount of wastewater and seasonal irregularity due to the development of tourist infrastructure as well as the expansion of the sewage system can cause overloading of wastewater treatment plants [2].Additionally, with the implementation of more stringent quality requirements for wastewater discharged to receivers, conventional activated sludge process (CAS)-with its limitations-is often insufficient at removing some contaminants, thus, modernization or expansion of the system becomes necessary.On the other hand, efficient wastewater treatment without the above-mentioned problems occurring in classical systems is possible in membrane bioreactors (MBR) [1,3].
In MBR technology, the separation of solids is conducted without the need of secondary sedimentation in clarifiers.Instead, this process is performed by a membrane capable of retaining the particulate phase within the reactor and allowing the clarified effluent to be discharged to the receiver or be reused [4].Due to an effective membrane pore size of <0.1 µm, which is considerably smaller than pathogenic viruses, bacteria, and protozoa, MBRs produce clarified and largely disinfected permeate of high quality [5] with the reported removal of COD, BOD, and total suspended solids (TSS) of 95%, 98%, and 99%, respectively [6].In CAS, an appropriately long hydraulic retention time (HRT) is required for the growth of the flocs (mixed liquor solid particles) to a sufficient size (>50 µm) to allow their efficient separation by sedimentation.In an MBR, the particles only need to be larger than the pore size of the membrane, which ensures direct control over the solids retention time (SRT) and HRT [5].The long SRT in the MBR improves the conditions for the development of slowly growing bacteria capable of removing hardly biodegradable compounds such as pesticides, hormones, or pharmaceuticals [2,7].Moreover, it allows operating at higher concentrations of mixed liquor suspended solids (MLSS), which enables a reduction in the required reactor size [5,6].
A thorough understanding as well as optimization of MBR, which is a relatively complex system, is difficult and time-consuming.An alternative resides in mathematical modeling [8].Modeling enables the development of the basis of the designed processes and upscales them from the laboratory scale to a full-scale system.Moreover, it can be used for analyzing the performance and effectiveness of the process under various operating conditions, thus shortening it and minimizing costs [9].The MBR model is a tool for teaching, design assistance, research, process optimization, and troubleshooting at full-scale treatment plants.Models can be used to predict the system response to the appearance of disturbances as well as visualize the effects of configuration changes on the system performance without actually interfering with the system.Nowadays, mathematical modeling of MBR is considered to be an inherent part of the process of designing and managing real objects [10][11][12].
Activated sludge models (ASM) have been developed and applied to describe wastewater treatment processes under typical operating conditions [8,13,14].Due to the fact that MBRs are based on the activated sludge process, ASM models have been transferred to simulate kinetics in such systems, assuming that necessary adaptations are provided [13].Under typical MBR conditions (high SRT, increased MLSS), the model needs changes in oxygen transfer and uptake, while due to a different microbiological composition, the model requires careful calibration of stoichiometric and kinetic parameters [15].Furthermore, the formation and degradation kinetics of the main MBR foulants like soluble microbial products (SMPs) and extracellular polymeric substances (EPS) have been investigated using the ASM models [16].
In addition to biological models that simulate biological organic degradation, another approach to MBR modeling focuses on physical models, which mainly deal with membrane resistance variations due to fouling [17,18].However, the complexity of the fouling phenomenon, the lack of agreement on a specific fouling indicator, and the impact of biological processes increase the difficulty of modeling the filtration process.Thus, integrated (hybrid) models have been proposed for a comprehensive description of the MBR process, which combine biomass kinetic models with membrane fouling models [16][17][18][19][20][21][22][23].The latter enable better modeling of the involved processes as they take into account not only the physical, but the biological phenomena, and the interactions between them [17].
Nowadays, many modeling problems are solved by computer programs dedicated to specific engineering tasks.For this purpose, industry-specific support software including special simulation programs, so-called dedicated simulators, is used increasingly often [24].One such wastewater treatment simulation software packages is GPS-X, which was developed by Hydromantis Environmental Software Solutions from Canada.The program enables modeling advanced technological schemes and conducting both steady-state and dynamic simulations.The MBR model implemented in GPS-X calculates the removal of solids by means of membrane using a mass balance and the solids capture rate [25].
In recent years, several studies have compared the MBR process to the CAS with respect to the same influent wastewater.Gao et al. [26] found that a submerged MBR had smaller particles of sediment, contained more nitrifiers, and was characterized by more effective and stable nitrification than a reference CAS system.Jiang et al. [27] reported that MBR biomass demonstrated a greater affinity for oxygen, which was related to smaller sludge flocs compared with CAS.Gonzalez et al. [28] obtained a higher removal efficiency of COD, TSS, and NH 4 -N concentration as well as various surfactants in MBR in comparison to the CAS system, regardless of the quality of the wastewater influent.Bertanza et al. [29] applied a holistic assessment procedure for comparing the technical, social, administrative, economic, and environmental impacts of MBR and CAS processes.
Taking into account the differences in MBR and CAS systems, various modeling approaches can be employed.More modeling studies for alternative MBR systems allow important relationships to be noticed and may contribute to standardization guidelines for MBR modeling.The aim of this study was to examine and compare the operation and treatment efficiency of the MBR and CAS processes.Simulations were carried out using GPS-X software.

Materials and Methods
For comparison purposes two different processes were used in the study: a membrane bioreactor (MBR) and a conventional, four-stage biological nutrient removal activated sludge (CAS).Figure 1 presents a schematic diagram of the analyzed systems.In both cases, activated sludge model no.2d (ASM2d) was used as the biological model.The parameter values pertaining to the physical and operational properties were assessed to maximize the effectiveness of the systems.The recycle streams, both external and internal, exhibited typical values for such processes.The CAS system is comprised of 10 reactors in series (total volume of 11,000 m 3 ) as well as a circular secondary clarifier (with the volume of 2925 m 3 ).The settled activated sludge is returned from the clarifier to the predenitrification chamber by means of external recirculation (100%).On the other hand, mixed liquor is returned from the aerobic into the anoxic zone as well as from the anoxic to anaerobic zone at 200% and 300%, respectively, because of the two internal recirculation streams.The volume of the anaerobic chamber, anoxic chambers, and aerobic chambers was established at 800 m 3 , 1000 m 3 , and 1300 m 3 , respectively.Fine bubble aeration with diffusers was used to introduce air into the aerobic zone.A constant level of 2 mg dm −3 for the dissolved oxygen was maintained automatically by means of a DO controller.
In the case of the settler, the one-dimensional non-reactive model was chosen with only vertical flow taken into account and no biological reactions included.In the model, ten equal layers were specified (one of which is a feed layer) and a mass balance was carried out for each layer, thus obtaining the solids profile.As for the solids flux, both gravity settling and a bulk movement of the liquid were considered.The modeled clarifier had a height of 4.5 m (0.45 m for the layer) with the In order to conduct the simulation and due to the convenience in obtaining and interpreting data, two separate models of wastewater treatment systems with distinct layouts were created by means of GPS-X software (v7.0.1, Hydromantis Environmental Software Solutions, Inc., Hamilton, ON, Canada).The predefined processes implemented in the software were used to build individual models.In the case of the membrane bioreactor, a plug-flow version of the MBR process was employed by combining biokinetic activated sludge and membrane resistance models.The CAS model was comprised of a plug-flow tank reactor followed by a circular secondary clarifier.Additionally, in both models, wastewater influent and effluent objects were used to characterize the input and to obtain the output data, respectively.Prior to building the models, the individual processes were linked with the use of appropriate connection points and the streams were uniquely labelled.In GPS-X, a binary executable code is generated in several steps where the layout content is translated into Advanced Continuous Simulation Language (ACSL) and then converted to a FORTRAN executable program.The models were numerically solved with the use of the Runge-Kutta-Fehlberg method.The time interval of 15 min was used in the simulation.
The parameter values pertaining to the physical and operational properties were assessed to maximize the effectiveness of the systems.The recycle streams, both external and internal, exhibited typical values for such processes.The CAS system is comprised of 10 reactors in series (total volume of 11,000 m 3 ) as well as a circular secondary clarifier (with the volume of 2925 m 3 ).The settled activated sludge is returned from the clarifier to the predenitrification chamber by means of external recirculation (100%).On the other hand, mixed liquor is returned from the aerobic into the anoxic zone as well as from the anoxic to anaerobic zone at 200% and 300%, respectively, because of the two internal recirculation streams.The volume of the anaerobic chamber, anoxic chambers, and aerobic chambers was established at 800 m 3 , 1000 m 3 , and 1300 m 3 , respectively.Fine bubble aeration with diffusers was used to introduce air into the aerobic zone.A constant level of 2 mg dm −3 for the dissolved oxygen was maintained automatically by means of a DO controller.
In the case of the settler, the one-dimensional non-reactive model was chosen with only vertical flow taken into account and no biological reactions included.In the model, ten equal layers were specified (one of which is a feed layer) and a mass balance was carried out for each layer, thus obtaining the solids profile.As for the solids flux, both gravity settling and a bulk movement of the liquid were considered.The modeled clarifier had a height of 4.5 m (0.45 m for the layer) with the seventh layer as the feed layer.
The MBR system included 10 reactors in series with the total volume of 4525 m 3 , which was less than in the case of the CAS system, and a solids separation filter located in the last reactor.This system also comprised two internal recirculation streams (250% and 150%, respectively), which were separated in order to enhance the removal of phosphorus and aid in the even distribution of mixed liquor.
The MBR model in GPS-X software consisted of the following components: hydraulic, biological, aeration, and membrane filtration model, and utilized the submerged membrane configuration [25].In the last MBR chamber, additional aeration was provided due to the increased concentration of the suspension.The method of introducing air perpendicular to the membrane surface (cross-flow aeration) was chosen.In the aerobic zones, the concentration of the dissolved oxygen was kept approximately at the level of 2 mg dm −3 .Like the CAS model, the aeration was provided as fine-bubble with the introduction of air into the system by means of diffusers.
The average daily flow rate of wastewater in the influent to each system was assumed at the level of 9800 m 3 d −1 .The characterization of influent was conducted with the use of the internal program tool based on COD fractions.The same values of influent parameters were used as input data for both modeled systems.The selected operational conditions of the analyzed systems are presented in Table 1.In turn, the basic parameters of wastewater in the inflow of the system, together with some characteristic stoichiometric coefficients, are listed in Table 2.In Table 2, nitrate and nitrite nitrogen are included together, since in the ASM2d model, no separate variables for the two nitrogen forms are provided and nitrification is assumed to take place in one step.

Results and Discussion
In this paper, the results of the steady-state simulations were included, assuming immutability of the inflow parameters in time.The operation of MBR was performed in simplified mode, i.e., the parameters related to physical aspects of the filtration such as transmembrane pressure or filter resistance were neglected.
In the model, three different metabolic groups of microorganisms were distinguished: heterotrophic, autotrophic, and polyphosphate accumulating organisms (PAOs).The concentration of biomass in both systems varied depending on the reactor, however, greater values were obtained in the MBR process.The achieved values for heterotrophs, autotrophs, and PAOs amounted on average to 2400, 125, and 1050 gCOD m −3 , respectively.In the CAS process, the observed concentrations of microorganisms were lower (particularly in the case of heterotrophs and autotrophs) and amounted on average to 880, 60, and 775 gCOD m −3 , respectively.
In Figure 2, the profiles of four selected parameters measured in individual tanks in both systems are compared.In turn, the effluent concentrations together with the removal efficiency of characteristic parameters are presented in Table 3.The results obtained for the CAS as well as the MBR system were mostly satisfying.However, the effluent quality in the MBR system was either better or comparable to the CAS.The removal level for suspended solids was 99.8%, which was the most notable difference.In turn, as far as the soluble substances are concerned, no significant differences were observed.Similar beneficial effects, i.e., 100% removal of TSS, were obtained in real objects, even if adverse conditions occurred (e.g., low temperature) [30,31].The effectiveness of TSS removal depends to a large extent on the membrane type used and the size of its pores.In real wastewater treatment plants, a similarly high removal efficiency of COD (>92%), NH 4 -N (>99%) [31], and BOD 5 (>99.5%)[30] can be achieved.The higher effectiveness of removing COD in the MBR compared to the CAS process could be the result of the TSS retention as well as the retention of polysaccharides and proteins in the supernatant [32].
objects, even if adverse conditions occurred (e.g., low temperature) [30,31].The effectiveness of TSS removal depends to a large extent on the membrane type used and the size of its pores.In real wastewater treatment plants, a similarly high removal efficiency of COD (>92%), NH4-N (>99%) [31], and BOD5 (>99.5%)[30] can be achieved.The higher effectiveness of removing COD in the MBR compared to the CAS process could be the result of the TSS retention as well as the retention of polysaccharides and proteins in the supernatant [32].Taking into account the total phosphorus removal efficiency, it was noticed that in the MBR, the process occurred slightly more efficiently than in the CAS process.The achieved removal efficiency was 95.9% in the CAS and 96.9% in the MBR system.Analyzing the concentration of orthophosphate in individual chambers, which is shown in Figure 2d, at the beginning of the reactors, a significant  Taking into account the total phosphorus removal efficiency, it was noticed that in the MBR, the process occurred slightly more efficiently than in the CAS process.The achieved removal efficiency was 95.9% in the CAS and 96.9% in the MBR system.Analyzing the concentration of orthophosphate in individual chambers, which is shown in Figure 2d, at the beginning of the reactors, a significant difference between the MBR and CAS could be seen.In the CAS, a more than three times higher concentration of PO 4 -P in the first reactor resulted from a different system configuration.The external recycle stream with nitrate was directed to the second reactor, thus no denitrification occurred in the first reactor and the orthophosphate could be released.This process is favored by the presence of volatile fatty acids, which are taken up by PAOs and stored as polyhydroxyalkanoates (PHA).In the case of MBR, in the first reactor, the influent stream containing orthophosphate is mixed with the internal recycle II with no PO 4 -P present.Additionally, as nitrate is directed by the recycle stream, denitrification with volatile fatty acids occurs, and the release of orthophosphate is limited.In turn, under aerobic conditions, as an uptake of orthophosphate carried out by PAOs takes place, the concentration of PO 4 -P gradually decreases.Generally, in the MBR process, due to the lack of a secondary clarifier in the system, which results in different characteristics of recirculation streams and different ranges of operational parameters, it is difficult to create a typical anaerobic zone for biological dephosphatation.Very often in real systems, chemical precipitation is also used [33,34] frequently for the elimination of residual phosphorus after bio-P-removal [35].The introduction of alternating aerobic and anoxic conditions by intermittent aeration methods provides better control as far as the maintenance of the conditions encouraging biological P-removal is concerned [35].Daigger et al. [36] concluded that intensive mixing at the inlet into the anaerobic and anoxic zones and controlling recirculation to maintain the appropriate MLSS distribution were very important for effective biological dephosphatation.
Comparing the effectiveness of both systems in the area of removing nitrogen compounds in the process of nitrification and denitrification, in the case of CAS, the efficiency of TN removal was achieved at 76.1%, while in the case of MBR, it was 80.8%.The differences mainly resulted from a lower concentration of nitrate at the effluent of MBR while the ammonia was almost completely oxidized in both systems.As is widely-known, the volumetric ratio of anoxic and aerobic zones as well as the internal recycling rate dramatically affect the nitrifying and denitrifying processes in MBR [37,38].Ding et al. [38] reported that TN removal could be improved with the increase of the internal recycle rate and the optimal conditions for TN removal were at an internal recycle ratio of 400%.Furthermore, in the afore-mentioned paper, the authors stated that MBR could exhibit better removal efficiency of NH 4 -N and TN when the volumetric ratio of aerobic and anoxic zones was around 1. In this study, the volume of anoxic zone in MBR was set at 2400 m 3 and the aerobic zone at 2125 m 3 with the volume ratio of 1:13.
Suitable conditions for nitrification can also be ensured by providing an appropriate amount of air is introduced into the nitrification zone.In the MBR, direct aeration was used (no automatic controllers) and the determination of the appropriate amount of air was carried out experimentally, as shown in Figure 3.
volatile fatty acids, which are taken up by PAOs and stored as polyhydroxyalkanoates (PHA).In the case of MBR, in the first reactor, the influent stream containing orthophosphate is mixed with the internal recycle II with no PO4-P present.Additionally, as nitrate is directed by the recycle stream, denitrification with volatile fatty acids occurs, and the release of orthophosphate is limited.In turn, under aerobic conditions, as an uptake of orthophosphate carried out by PAOs takes place, the concentration of PO4-P gradually decreases.Generally, in the MBR process, due to the lack of a secondary clarifier in the system, which results in different characteristics of recirculation streams and different ranges of operational parameters, it is difficult to create a typical anaerobic zone for biological dephosphatation.Very often in real systems, chemical precipitation is also used [33,34] frequently for the elimination of residual phosphorus after bio-P-removal [35].The introduction of alternating aerobic and anoxic conditions by intermittent aeration methods provides better control as far as the maintenance of the conditions encouraging biological P-removal is concerned [35].Daigger et al. [36] concluded that intensive mixing at the inlet into the anaerobic and anoxic zones and controlling recirculation to maintain the appropriate MLSS distribution were very important for effective biological dephosphatation.
Comparing the effectiveness of both systems in the area of removing nitrogen compounds in the process of nitrification and denitrification, in the case of CAS, the efficiency of TN removal was achieved at 76.1%, while in the case of MBR, it was 80.8%.The differences mainly resulted from a lower concentration of nitrate at the effluent of MBR while the ammonia was almost completely oxidized in both systems.As is widely-known, the volumetric ratio of anoxic and aerobic zones as well as the internal recycling rate dramatically affect the nitrifying and denitrifying processes in MBR [37,38].Ding et al. [38] reported that TN removal could be improved with the increase of the internal recycle rate and the optimal conditions for TN removal were at an internal recycle ratio of 400%.Furthermore, in the afore-mentioned paper, the authors stated that MBR could exhibit better removal efficiency of NH4-N and TN when the volumetric ratio of aerobic and anoxic zones was around 1. In this study, the volume of anoxic zone in MBR was set at 2400 m 3 and the aerobic zone at 2125 m 3 with the volume ratio of 1:13.
Suitable conditions for nitrification can also be ensured by providing an appropriate amount of air is introduced into the nitrification zone.In the MBR, direct aeration was used (no automatic controllers) and the determination of the appropriate amount of air was carried out experimentally, as shown in Figure 3.  Increasing the amount of oxygen fed into the system improves the nitrification process, which is illustrated by the dropping concentration of ammonia nitrogen in the outflow.At the same time, since the aerobic zone is located just before the secondary settler, the amount of nitrate and nitrite increases, which, in turn, adversely affects the phosphorus removal efficiency due to the use of a large degree of internal recirculation.The total amount of air supplied to the MBR system designed to meet biological needs was set at 138,000 m 3 d −1 .For comparison, the total air flow supplied into the aeration zone in CAS reached up to 151,000 m 3 d −1 .The aeration process generates significant operating costs and when considering only this parameter, MBR technology may look favorable.However, when other air demands are included, for example, cross-flow aeration, the situation is very different.In general, the MBR process is recognized as more energy consuming when compared to the CAS [29,39], even when the lower sludge production is taken into account (see Table 1).On the other hand, when considering the energy consumption of the entire wastewater treatment plant, the difference is not so significant.Furthermore, to ensure effluent quality comparable to MBR, additional processes such as filtration and disinfection of wastewater need to be provided, thus raising the overall costs [29].
Oxygen diffusion depends on the conditions prevailing in the MBR.Germain and Stephenson [40] noticed that increasing airflow led to a higher concentration of oxygen, resulting in a more efficient mixing intensity and inducing floc breakup, so that particles of various sizes were formed.Additionally, oxygen transfer decreased exponentially with increasing solids concentration.The mixed liquor suspended solids (MLSS) is considered to be a crucial operational parameter in MBR technology [41].Figure 4 shows the concentration of MLSS in the modeled CAS and MBR systems.
increases, which, in turn, adversely affects the phosphorus removal efficiency due to the use of a large degree of internal recirculation.The total amount of air supplied to the MBR system designed to meet biological needs was set at 138,000 m 3 d −1 .For comparison, the total air flow supplied into the aeration zone in CAS reached up to 151,000 m 3 d −1 .The aeration process generates significant operating costs and when considering only this parameter, MBR technology may look favorable.However, when other air demands are included, for example, cross-flow aeration, the situation is very different.In general, the MBR process is recognized as more energy consuming when compared to the CAS [29,39], even when the lower sludge production is taken into account (see Table 1).On the other hand, when considering the energy consumption of the entire wastewater treatment plant, the difference is not so significant.Furthermore, to ensure effluent quality comparable to MBR, additional processes such as filtration and disinfection of wastewater need to be provided, thus raising the overall costs [29].
Oxygen diffusion depends on the conditions prevailing in the MBR.Germain and Stephenson [40] noticed that increasing airflow led to a higher concentration of oxygen, resulting in a more efficient mixing intensity and inducing floc breakup, so that particles of various sizes were formed.Additionally, oxygen transfer decreased exponentially with increasing solids concentration.The mixed liquor suspended solids (MLSS) is considered to be a crucial operational parameter in MBR technology [41].Figure 4 shows the concentration of MLSS in the modeled CAS and MBR systems.A characteristic feature of MBR technology that distinguishes it from conventional systems is the capability to maintain a higher concentration of MLSS.In both systems, different levels of MLSS throughout the reactors were observed, mainly due to alternative configurations of the recycle streams.The lowest value of MLSS was noticed at the beginning of the MBR and amounted to approximately to 6000 g m −3 , which is on average twice as high of that in the CAS system.In turn, the highest concentration reaching up to 10,000 g m −3 occurred in the last reactor where the filter was located, while in the CAS, the highest value of MLSS slightly exceeded 4000 g m −3 .The observed effect was in line with that reported by Ren et al. [42], who noticed a low level of microbial metabolism as a consequence of low COD removal in cases when MLSS was under the threshold value of 6000 g m −3 .According to Yang et al. [43], the MLSS of 8820 g m −3 was optimal for decreasing the reversible membrane fouling.The concentration of MLSS affects sludge viscosity, floc size, and oxygen diffusion.Insel et al. [44] suggested that MBR systems that operated at a higher MLSS concentration were characterized by much smaller flocs (30-40 µm) when compared to CAS plants with average A characteristic feature of MBR technology that distinguishes it from conventional systems is the capability to maintain a higher concentration of MLSS.In both systems, different levels of MLSS throughout the reactors were observed, mainly due to alternative configurations of the recycle streams.The lowest value of MLSS was noticed at the beginning of the MBR and amounted to approximately to 6000 g m −3 , which is on average twice as high of that in the CAS system.In turn, the highest concentration reaching up to 10,000 g m −3 occurred in the last reactor where the filter was located, while in the CAS, the highest value of MLSS slightly exceeded 4000 g m −3 .The observed effect was in line with that reported by Ren et al. [42], who noticed a low level of microbial metabolism as a consequence of low COD removal in cases when MLSS was under the threshold value of 6000 g m −3 .According to Yang et al. [43], the MLSS of 8820 g m −3 was optimal for decreasing the reversible membrane fouling.The concentration of MLSS affects sludge viscosity, floc size, and oxygen diffusion.Insel et al. [44] suggested that MBR systems that operated at a higher MLSS concentration were characterized by much smaller flocs (30-40 µm) when compared to CAS plants with average flocs of 300 µm.However, Sarioglu et al. [45] reported that elevated MLSS concentration resulted in higher sludge viscosity by favoring poor diffusional conditions.

Conclusions
Defining optimal ranges of operational parameters for effective wastewater treatment is greatly facilitated by using computer simulations.Modeling the operation of two different biological wastewater treatment systems showed several discrepancies in treatment efficiency.In both cases, results indicating a high quality of effluent were obtained.However, in MBRs, it is possible to achieve the highly efficient removal of contaminants by using smaller reaction zones with a simultaneous high concentration of MLSS.The results were also heavily influenced by the lack of a secondary settler and thus external recirculation.
As expected, the greatest difference pertained to the suspended solids removal where TSS in MBR was eliminated at the very high rate of 99.8%.The employed membrane module also influenced the elimination of the particulate fraction of organic matter, which increased the total COD and BOD 5 removal.In terms of nutrients, in the case of nitrogen, almost complete nitrification was achieved in both systems (with an ammonia removal efficiency of 98.3% in CAS and 98.2% in MBR), whereas the lower concentration of nitrate in the effluent from MBR (11.2 gN m −3 compared to 14.1 gN m −3 ) contributed to a higher degree of total nitrogen removal (80.8% in MBR and 76.1% in CAS).As far as phosphorus is concerned, despite a different system configuration, the obtained results for total phosphorus in the effluent (0.67 gP m −3 in CAS and 0.50 gP m −3 in MBR) indicate that the biological dephosphatation proceeded with high efficiency in both cases; nevertheless, again, a slight advantage in favor of MBR was achieved.

Figure 2 .
Figure 2. Concentration of selected parameters through individual tanks in the CAS and MBR systems.(a) Ammonia, (b) Nitrate and nitrite, (c) Volatile fatty acids, (d) Orthophosphate.

Figure 2 .
Figure 2. Concentration of selected parameters through individual tanks in the CAS and MBR systems.(a) Ammonia, (b) Nitrate and nitrite, (c) Volatile fatty acids, (d) Orthophosphate.

Figure 3 .
Figure 3. Influence of the amount of air introduced into the nitrification chambers of the MBR system on the concentration of orthophosphate, nitrate and nitrite, and ammonia nitrogen in the outflow.

Figure 3 .
Figure 3. Influence of the amount of air introduced into the nitrification chambers of the MBR system on the concentration of orthophosphate, nitrate and nitrite, and ammonia nitrogen in the outflow.

Figure 4 .
Figure 4.The MLSS concentration in the CAS and MBR.

Figure 4 .
Figure 4.The MLSS concentration in the CAS and MBR.

Table 1 .
Selected operational conditions of CAS and MBR systems.

Table 2 .
Composition of wastewater entering CAS and MBR systems.

Table 3 .
Comparison of effluent parameters in the modeled systems.

Table 3 .
Comparison of effluent parameters in the modeled systems.