## Abstract

A dynamic simulation model has been developed and validated for the 1.4 million p.e. capacity Budapest Central Wastewater Treatment Plant to support intensification, process development and risk assessment. By the integration of both the biological and physico-chemical processes the technological design of separated units becomes possible as well as the exploration of the connections within the system. The calibration of the model parameters for an operating treatment plant is the key requirement for the proper application of dynamic simulation tool to optimize operational and maintenance conditions and specify the potential development areas. We have done a one-year period of validation which included sensitivity analysis and the simulation of time intervals in the same way as in the calibration process. At the same time we investigated the suitability of the simulation system for real-time operation optimization. As conclusion we ascertained that due to the computational power necessity of a properly detailed model, it is not applicable for real-time operation optimization, nevertheless it is suitable for the detection of the system reactions for long-term changes of the influent load. This means that a properly functioning model is applicable for indicating the development directions.

## INTRODUCTION

The mathematical modelling of biological processes applied in wastewater treatment systems allows a detailed design of the operating parameters and achievable effluent quality including the prediction of the system reaction for extreme situations. The simulation of wastewater treatment processes is an accepted tool in engineering practice for treatment plant design, development, operation, control and for research purposes. A model is a simplified representation of reality, designed to help us understand the processes that are taking place in the facility. A wide variety of modelling approaches and software possibilities are available for both research and practical applications.

Wastewater treatment plants are highly complex systems that incorporate a large number of biological, physico-chemical and biochemical processes. These processes are dynamic due to large variations in influent wastewater flow rate and composition. The dynamic nature of these processes causes the adaptive behavior of the involved mixed culture microorganisms, which is reflected in time-varying reaction parameters thereby creating a non-linear and unsteady system. The number of built-in reactions and species may be very large and the models are essential to describe all the complicated interactions between these participants. By the integration of both the biological and physico-chemical participants and reactions, the technological design of separated units becomes possible as well as the exploration of the connections within the system.

The first step of wastewater treatment plant model building is defining the purpose of the model application (design, reconstruction, control, development, or research). This is followed by the model selection. The next step is determining the hydraulic parameters of the whole plant or specific units (e.g. hydraulics of the aerated tanks or secondary settling tanks). The physical description is followed by the characterization of the influent wastewater and the biomass. At all these steps it is extremely important to find the appropriate level of detail to avoid errors resulting from excessive simplifications. After the data is collected, the next and final step of model building is the calibration of the model parameters. With the calibrated parameters the simulation of the different scenarios can be performed (e.g. optimization of the operation, process development) (Jeppsson 1996; Serdarevic & Dzubur 2016).

### Sumo©

Sumo is a simulation tool developed by Dynamita, Inc. It is a powerful, open process source, multipurpose simulation environment developed for environmental models, particularly municipal and industrial wastewater treatment plant modelling. A wide range of BNR plant configurations can be simulated in Sumo. Sumo models are written in an Excel based open process source code language called SumoSlang™ (Sumo Simulation Language). Sumo can simulate traditional biokinetic models dynamically or in steady-state, mixed equilibrium-kinetic models and direct algebraic models depending on the simulation mode. Sumo is supplied with internally researched and developed whole plant models as well as focus models (e.g. with focus on the fate of nitrogen and GHG). The seven most widely known published models are also included in the Sumo Museum for N and P removal.

Dynamic modeling is based on a differential equation system which contains the processes that effect the change of state variables. For describing this differential equation system in wastewater treatment modeling the Peterson matrix is used which incorporates the connections in a well-read format. The assembled equation system rarely has an analytical solution, but due to the development of computer technology, the numerical solution of these systems by solving algorithms became effective, fast and easy. The core element of Sumo is a compiler that converts the matrix assembled by researchers, engineers or developers to a binary code that can be easily solved by computer.

In terms of software methodology the SumoSlang based models are responsible for the descriptions of the processes. The SumoSlang based files describing the operational units contain the physical and technological parameters as well as the mass balance calculations for each unit. Sumo is prepared for the modeling of several widely used operational unit processes from conventional activated sludge technology to biofilm systems, including detailed descriptions of processes taking place in settlers and digesters.

### Budapest central wastewater treatment plant

The treatment plant examined uses conventional activated sludge technology combined with thermophilic anaerobic digestion for sludge treatment. The total capacity of the treatment plant is 350,000 m^{3}/d.

Water treatment was modelled with primary treatment consisting of six parallel screens operating from the built eight and eight parallel Sedipac 3D™ units (Suez's Degrémont) for the removal of large solids, sand, oils and grease. Sedipac 3D™ units combine grit removal, grease removal and lamellar settling into one single work using separate dedicated areas. The biological water treatment was distributed over fourteen parallel lines of the built eighteen. Each biological treatment line consists of an anaerobic channel for biological phosphorus removal and a carousel aeration tank for carbon and nitrogen removal. The carousel tank works with intermittent aeration and sludge recirculation from the longitudinal settling tank where the addition of ferric chloride induces chemical phosphorus precipitation. At average influent compositions both biological and chemical phosphorus removal is required to meet the effluent discharge goals. The hydraulic retention time of the biological treatment is about 0.65 days. Sludge treatment was modelled as two gravity thickeners from the built three, thickening the primary sludge from 3 to 5% dry matter content, and five mechanical belt thickeners from the built six, thickening the excess sludge from 0.5 to 5% dry matter content. After thickening the two types of sludge are mixed and fed to three parallel thermophilic digesters with ferric chloride dosage. The digesters are operated at 55 °C with 13–15 days of hydraulic retention time. The digested sludge was dewatered in two parallel centrifuges from the built three with further ferric chloride dosage. The centrate is treated in two parallel DEMON^{®} (DEMON GmbH) reactors. In these reactors the two process steps of deammonification are involved: the partial nitritation of ammonia and the subsequent anaerobic oxidation of residual ammonia by nitrite to nitrogen gas. The treated centrate is partially directed to the Sedipac 3D™ units.

The aim of this work was to develop and validate a dynamic simulation model which can support intensification, process development, risk assessment and risk mitigation decisions. It consisted of the following steps: model building, data collection, calibration of the model parameters by the simulation of separate time intervals and finally model validation by the simulation of a contiguous one-year period.

## MATERIALS AND METHODS

As biological mechanisms are time reactions, the application of dynamic simulations is crucial for describing the rate of state variables changes. Dynamic simulations are based on differential equation systems which describe the biological processes. These equation systems rarely have analytical solution, therefore Sumo and all other available tools handle the question of equilibrium by numerically solving the differential equation system. The equilibrium of these biological mechanisms may take months, which means that in systems including continuous input parameter changes, the computational power necessity is large and the numerical solving can be accomplished in many steps, by small time intervals. For preserving the applicability of the model increasing the speed of the calculations is required. This is achievable by applying reasonable model simplifications. By applying the following simplifications system layouts were created which can simulate the whole treatment plant or its bottleneck units individually with various levels of detail:

- 1.
Determining the state variables which describe the influent wastewater composition.

This is the most influential factor in the outcome of the simulation. The conventionally measured parameters (such as COD, BOD

_{5}, NH_{3}-N) provide an appropriate basis for the input data determination, but proper determination is needed for the fractions required by the model (e.g. dissolved, colloidal and suspended COD). These fractions are the state variables that constitute the model. Through the contexts of processes these state variables determine the rate coefficients of biological mechanisms, thereby the direction of biological system changes and the biomass composition, which determines the quality parameters of the effluent water. - 2.
Presuming the spatial homogeneity of the biological reactors.

The difference caused by the spatial concentration unevenness is negligible compared to the difference caused by the uncertainty of the input data. The inhomogeneity can be determined by detailed flow models. The computational power requirement of these flow models is comparable to the biological processes and the added value of them is negligible.

- 3.
Grouping the hundreds or even thousands of different microbial species based on 6–12 dominant biological functions.

- 4.
Parallel description of biochemical and physico-chemical reactions according to the possibilities of parameter determination.

The functional grouping of biomass composition and the paralleling of processes helps the perspicuity of the model and determines the effect of microbial processes by the required accuracy. Deeper detailing involves the further breakdown of functions and state variables (whether microbial composition). This determines the accuracy of prediction through the experimental measurement of rate determining process parameters.

- 5.
Simplification of the hydraulic and phase separation processes.

Hydraulic simplification means the merging of parallelisms, such as the fourteen operating biological treatment line or parallel operating equipment. In the case of phase separation a simplification that significantly affects the speed of simulation is to ignore the biological processes at the separation unit calculation. This means that the particulate fractions are directed to the separation unit where the only influencing factor is the physical separation efficiency of the specific unit. In the calculations the biological processes are not took into account. In this case the biological processes that are taking place in the sludge layer can be monitored by the insertion of a dedicated reactor unit that simulates the sludge blanket. There are layered settling models that describe both the settling rate and the microbiological processes accurately, but when implementating these the computational power multiplies.

For the simulation of the whole treatment plant and its bottleneck units, different layouts were prepared that use different Sumo models. There are three layouts which simulate the whole treatment plant using one, three and seven biological lines representing the fourteen parallel operating lines. In addition there are layouts for the investigation of the most complex and the most problem causing units, such as the digesters or the gravity thickeners. For the digesters a possible development direction is to increase the capacity of the equipment by changing the influent loads or the operating parameters. For the gravity thickeners an important aspect is to handle the sludge floating problems caused by the production of hydrogen sulphide. Besides the bottleneck technology units a useful application of the model is to investigate the temporality of aeration membrane regeneration. The appearance of a difference between the simulation results and the measurement data, that can only fixed by changing the value of the standard oxygen transfer efficiency (SOTE, an efficiency factor of aeration) in the model, can predict the need for regeneration of the aeration membranes.

Three different Sumo models were used for these simulations. The Sumo1 model contains the description of the nutrient removal processes including the biological carbon, nitrogen, and phosphorus removal, and chemical phosphorus precipitation. It describes the mechanisms of COD removal, hydrolysis, fermentation, one-step nitrification, denitrification, anoxic methylotrophic mechanisms, biological phosphorus removal, two-population anaerobic digestion, temperature sensitivity, precipitation and chemical phosphorus removal. Sumo1 contains 58 state variables and 49 equations. The software calculates all the related equations at the input and output point of each unit and in the case of complex (layered or biofilm) units on internal calculation points as well. The Sumo2 model contains the same processes as Sumo1 extended with two-step nitrification. In terms of state variables this means the addition of nitrite and the related microorganism group. Thus, Sumo2 contains 61 state variables and 59 equations. The application of the Sumo2 model is required for simulating the DEMON^{®} units where anammox mechanisms are taking place. Sumo2S is also suitable for focusing on the sulphur reactions is the sludge treatment technology. Due to the sludge flotation caused by the hydrogen sulphide production, sulphur reactions are bottleneck mechanism of the gravity thickening process. Sumo2S is a Sumo2 model extended with the description of the sulphur related mechanisms. In terms of state variables, it means five different sulphur compounds and three additional microorganisms group related to these processes. Thus, it contains 70 state variables and 80 equations.

For every Sumo model there is the possibility to choose whether the system takes into account pH in the calculations or not. All the equations in the differential equation system contains a pH factor. If pH is to be ignored the value of this factor is one, so pH does not affect the reactions. However, when pH is to be taken into consideration this factor has a value different from one, and every equation calculates with the effect of pH. It is an important aspect of model selection and setting because including the influence of pH decreases the speed of calculation significantly.

### Calibration

The calibration of the model parameters for an operating treatment plant is the key requirement for the proper application of dynamic simulation tool to optimize operational and maintenance conditions and specify the potential development areas. The calibration included the simulation of investigated time intervals when a wide range of data and operational information was used such as the plant influent, operational conditions and the effluents of each unit to get properly calibrated parameter set. As first step of calibration a measurement plan was prepared focusing on those parameters which change during the operation of the treatment plant and which are related to the change of the influent load. Measurements were performed on those intermediate points where effective comparisons are possible during the simulations. According to this, sampling and composition analysis were performed on typical points of the waterline and determinant points of the sludge treatment line. By using these measurement results the capacity of the treatment plant can be simulated with proper accuracy.

As a next step tracer tests were designed to determine the hydraulic behaviour of the influent wastewater flow. After primary treatment the influent wastewater is distributed gravitationally between the fourteen biological lines. The flow distribution among the operating biological lines is not known and flow measurement devices are not installed. However, the aeration control of the biological systems is based on the concentration of ammonia, which makes it possible to determine the flow distribution rates based on the oxygen consumption of the individual lines. This is a simplified solution for replacing tracer tests.

After the data collection phase, simulations were run to investigate separate time periods. For these time periods a wide range of data was available, including the measurement results of the plant influent, effluent and specific intermediate points, as well as operational conditions and parameters. By comparing the simulation results with the measured intermediate and effluent compositions, the parameter set of the built model was properly calibrated. For the calibration both the models that describe the whole plant and the models that describe the bottleneck units were used. Due to the detailed description of the plant using models of varying depth all the operational parameters can be determined with sufficient accuracy.

### Validation

The last step of model evaluation is the validation. It consists of testing the model with independent data sets (data sets not used for model calibration). This step involves checking that the model responses generated during the model analysis agree with that from the true process. A one-year period of validation that included sensitivity analysis and the simulation of time intervals in the same way as in the calibration process was performed. At the same time the suitability of the simulation system for real-time operation optimization was investigated.

## RESULTS

Several different models were built for modelling the Budapest Central Wastewater Treatment Plant. Some of these contain the whole treatment plant, merging the fourteen operating biological lines and some focus on different parts of the technology, such as the digesters and the gravity thickeners. For modelling the whole plant the following layouts were prepared:

- one biological treatment line representing all the 14 operating lines,

- three biological treatment lines representing a low-load, a middle-load and a high-load line,

- seven biological treatment lines representing seven selectable lines, or due to the symmetry of the treatment plant it can represent the half of the biological treatment,

- one biological treatment line representing all the 14 operating lines and a detailed, layered thickener unit for gravity thickening,

- one biological treatment line representing all the 14 operating lines and a thermal hydrolysis unit before the digester.

The one and three biological treatment line models are shown in Figure 1(a) and 1(b). Since in these models the sludge treatment units are combined, these models focus on the biological water treatment and on the entire plant operation.

In each case the parallel operating equipment of the primary treatment and the sludge treatment are merged, so in the model there is one unit for each type of equipment. For detailed investigations there are models focusing on the bottleneck units of the technology: the digesters (individually and combined with thermal hydrolysis units) and the gravity thickeners. Figure 2 represents the detailed digester simulation model that contains three parallel digester units with separately adjustable parameters such as temperature, or retention time. This model also includes thermophilic hydrolysis pretreatment units for long-term development investigation.

Each layout can be simulated with different models (Sumo1, Sumo2 and Sumo2S) and by considering the pH or not. These layout-model combinations provide many opportunities to examine the treatment plant operation.

The aim of the simplifications is to reduce the complexity of the models. This is necessary to increase the speed of calculation which is connected to the *system size*. The system size means the number of integrated state variables in case of a specific model, thus, it increases with the number of integrated units. The three main factors influencing the speed of calculation are the system size, the number of considered processes and equations, and thus the chosen model (Sumo1, Sumo2, Sumo2S), and the consideration of pH calculation. Figure 3 contains the system sizes of the different applied layouts and models.

Besides the mentioned three factors the initial values of state variables also affect the speed of calculation, aka *specific simulation time*. The specific simulation time is the time requirement of a specified interval simulation, e.g. the time requirement of a one day simulation. The initial values of state variables are not the same as the values at the state of equilibrium. Thus, to be able to calculate, the step size of simulation is decreased by the solver algorithm. During the simulation it is represented by an initial transient interval and by the increase of specific simulation time. The length of this transient interval is determined by the difference between the initial and the steady-state values of state variables. When the system reaches the steady state the algorithm can calculate with bigger step size that increases the speed of calculation. The specific simulation time of different full plant simulation are shown in Table 1. It is also important to note that it is possible to set dynamic input data in Sumo. With dynamic input data the system can never reach the steady state which results in small step size and slow simulation speed.

Model structure | Applied model | pH calculation | System size | Simulation time of first 125 days (transient interval) second/day | Simulation time of 25 days second/day |
---|---|---|---|---|---|

One biological treatment line | Sumo1 | off | 1,216 | 3.6 | 2.9 |

On | 9.7 | 8.3 | |||

Sumo2 | off | 1,523 | 8.4 | 6.3 | |

On | 21.5 | 14.8 | |||

Sumo2S | off | 1,748 | 34.7 | 33.9 | |

On | 73.1 | 46.4 | |||

One biological treatment line with layered thickener | Sumo2S | off | 2,369 | 11.9 | 10.0 |

On | 20.9 | 13.5 | |||

One biological treatment line with thermal hydrolysis units | Sumo2S | off | 1,748 | 39.2 | 34.5 |

On | 74.8 | 54.0 | |||

Three biological treatment lines | Sumo1 | off | 2,724 | 7.6 | 8.0 |

On | 12.3 | 19.0 |

Model structure | Applied model | pH calculation | System size | Simulation time of first 125 days (transient interval) second/day | Simulation time of 25 days second/day |
---|---|---|---|---|---|

One biological treatment line | Sumo1 | off | 1,216 | 3.6 | 2.9 |

On | 9.7 | 8.3 | |||

Sumo2 | off | 1,523 | 8.4 | 6.3 | |

On | 21.5 | 14.8 | |||

Sumo2S | off | 1,748 | 34.7 | 33.9 | |

On | 73.1 | 46.4 | |||

One biological treatment line with layered thickener | Sumo2S | off | 2,369 | 11.9 | 10.0 |

On | 20.9 | 13.5 | |||

One biological treatment line with thermal hydrolysis units | Sumo2S | off | 1,748 | 39.2 | 34.5 |

On | 74.8 | 54.0 | |||

Three biological treatment lines | Sumo1 | off | 2,724 | 7.6 | 8.0 |

On | 12.3 | 19.0 |

Due to the characteristics of the calculation algorithm and the model structure the simulation requires only one processor core. This means that on multi-core processor computers two or more simulations can run at the same time. The simulation time values shown in Table 1 are related to simultaneous simulations on a computer with the following system features: Intel(R) Core(TM) i7-3632QM CPU 2.20 GHz processor, 6.00 GB installed RAM, Windows10 Home operation system and with Sumo Version 16-build143. In case of longer simulations the limitation of hardware system also has to be considered. When running parallel simulations the processor can be overloaded which can results in CPU speed throttling and therefore smaller simulation speed than expected. This effect can be seen in Table 1 at some models where the specific simulation time is bigger in steady-state than in transient.

The specific simulation time values in Table 1 represent the previously mentioned connection between the transient and steady-state simulation speed (except in some cases where the CPU speed throttling affected is). These results show that by the increase of system size the specific simulation time increase as well. There is a clearly visible connection between the system complexity (the applied model and the calculation of pH) and the specific simulation time: as the complexity of system increase the specific simulation time increase as well. Since the simulation speed depends on many factors, the prediction of specific simulation time based on the system size is not possible.

When modelling it is important to find the proper level of simplification where only a reasonable amount of information is lost. In this example there are different levels of detail that make it possible to investigate the whole plant and its bottleneck units individually.

## CONCLUSION

In conclusion we ascertained that due to the computational power necessity of a properly detailed model, it is not applicable for real-time operation optimization. However, it is suitable for the investigation of the key elements of the treatment system and for the detection of the system reactions for long-term changes of the influent load. Therefore the model is appropriate for indicating the development directions.

Due to the various detailed models the effect of the influent load changes can be investigated from several aspects of the treatment technology. Furthermore, applying the models that were built makes it possible to investigate several intensification possibilities in the facility, such as:

- 1.
Detection of the treatment system reactions for long-term changes in the influent load and composition.

- 2.
Intensification of the gravity thickener operation. The intensification possibility of the existing equipment and the feasible methods can be determined.

- 3.
Detection of the anaerobic digester system reactions for the increase of suspended solid load and for changes of the input composition. The limit of the capacity increasing can be investigated in case of operating the existing equipment.

- 4.
Effect of a thermal hydrolyzation unit integration in the digestion process.

- 5.
Indication of efficiency degradation of the most important technology units, e.g. optimization of aeration membrane regeneration.

## REFERENCES

*Modeling Aspects of Wastewater Treatment Processes*.

*Doctoral Thesis*