on time discretizations for the simulation of the settling ... · on time discretizations for the...

4
9th IWA Symposium on Systems Analysis and Integrated Assessment 1417 June 2015, Gold Coast, Australia On time discretizations for the simulation of the settling-compression process Bürger, R.* and Diehl, S.** * CI 2 MA and Departamento de Ingeniería Matemática, Facultad de Ciencias Físicas y Matemáticas, Universidad de Concepción, Casilla 160-C, Concepción, Chile. E-mail: [email protected] ** Centre for Mathematical Sciences, Lund University, P.O. Box 118, 22100 Lund, Sweden. E-mail: [email protected] Keywords: secondary settling tank; clarifer; benchmark simulation; Bürger-Diehl simulation model; efficiency; time integration Summary of key findings The simulation model for secondary settling tanks by Bürger et al. (2013) was introduced mainly to resolve spatial discretization problems when both hindered settling and the phenomena of compression and dispersion are included. Straightforward time integration unfortunately means long computational times. The next step in the development is to introduce and investigate time-integration methods for more efficient simulations, but where other aspects such as implementation complexity and robustness are equally considered. The key findings in this work are partly a new time-discretization method, which will be introduced at the conference, and partly its comparison with other specially-tailored and standard methods. Several advantages and disadvantages for each method are given. One conclusion is that the new method (LI) is easier to implement than another one (SI), but less efficient (based so far only on batch sedimentation tests). Background and relevance Benchmark simulations of entire wastewater treatment plants (WWTPs) are today performed with one-dimensional simulation models of the secondary settling tank (SST). In the model by Bürger et al. (2011, 2013), the physical phenomena of hindered settling, volumetric bulk flows, compression of the biomass at high concentrations and dispersion of the suspension near the feed inlet can be included in a flexible way. Each phenomenon is associated with a separate user-chosen constitutive function with its model parameters, and can be activated or de-activated at the user’s discretion. Bürger et al. (2012, 2013) demonstrated that simulation results are reliable with respect to the underlying physical principles and can be obtained with an accuracy chosen by the user. For simulations of entire WWTPs over long time periods, it is important to keep the numerical errors small. This requires a fine resolution in both space (many layers in the settler) and time (short time steps), which implies long computational times. Conversely, fast computations are obtained with a low resolution in space and time at the cost of poor accuracy. In scientific computing, the numerical error measures the distance of a numerical solution to the exact solution or reference solution (obtained by a very fine discretization) of the problem at hand. The efficiency of a numerical method is assessed by relating the numerical errors to the computational (central processing unit; CPU) time necessary to obtain the numerical solution. It is then said that one numerical method is more efficient than another one if it allows to obtain a numerical solution with a determined numerical error in less CPU time, or equivalently, a given budget of CPU time allows one to obtain a more accurate numerical solution by the first method than by the second. The simulation model by Bürger et al. (2013) is based on a method-of-lines formulation of an underlying nonlinear partial differential equation (PDE). This means a system of time-dependent ordinary differential equations (ODEs), one for each layer of the settler. Simulations of PDEs are stable and reliable if a so-called CFL condition is satisfied. This gives a maximal time step Δt for each given layer thickness Δ. There is a qualitative difference in the numerical treatment depending on whether only hindered settling and bulk flows are considered or, if in addition, compression or dispersion is included. For clarity of presentation, we limit ourselves here to batch sedimentation in a

Upload: others

Post on 17-Apr-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

  • 9th  IWA  Symposium  on  Systems  Analysis  and  Integrated  Assessment  14-‐17  June  2015,  Gold  Coast,  Australia     On time discretizations for the simulation of the settling-compression process Bürger, R.* and Diehl, S.** * CI2MA and Departamento de Ingeniería Matemática, Facultad de Ciencias Físicas y Matemáticas, Universidad de Concepción, Casilla 160-C, Concepción, Chile. E-mail: [email protected] ** Centre for Mathematical Sciences, Lund University, P.O. Box 118, 22100 Lund, Sweden. E-mail: [email protected] Keywords: secondary settling tank; clarifer; benchmark simulation; Bürger-Diehl simulation model; efficiency; time integration Summary of key findings

    The simulation model for secondary settling tanks by Bürger et al. (2013) was introduced mainly to resolve spatial discretization problems when both hindered settling and the phenomena of compression and dispersion are included. Straightforward time integration unfortunately means long computational times. The next step in the development is to introduce and investigate time-integration methods for more efficient simulations, but where other aspects such as implementation complexity and robustness are equally considered. The key findings in this work are partly a new time-discretization method, which will be introduced at the conference, and partly its comparison with other specially-tailored and standard methods. Several advantages and disadvantages for each method are given. One conclusion is that the new method (LI) is easier to implement than another one (SI), but less efficient (based so far only on batch sedimentation tests). Background and relevance

    Benchmark simulations of entire wastewater treatment plants (WWTPs) are today performed with one-dimensional simulation models of the secondary settling tank (SST). In the model by Bürger et al. (2011, 2013), the physical phenomena of hindered settling, volumetric bulk flows, compression of the biomass at high concentrations and dispersion of the suspension near the feed inlet can be included in a flexible way. Each phenomenon is associated with a separate user-chosen constitutive function with its model parameters, and can be activated or de-activated at the user’s discretion. Bürger et al. (2012, 2013) demonstrated that simulation results are reliable with respect to the underlying physical principles and can be obtained with an accuracy chosen by the user. For simulations of entire WWTPs over long time periods, it is important to keep the numerical errors small. This requires a fine resolution in both space (many layers in the settler) and time (short time steps), which implies long computational times. Conversely, fast computations are obtained with a low resolution in space and time at the cost of poor accuracy. In scientific computing, the numerical error measures the distance of a numerical solution to the exact solution or reference solution (obtained by a very fine discretization) of the problem at hand. The efficiency of a numerical method is assessed by relating the numerical errors to the computational (central processing unit; CPU) time necessary to obtain the numerical solution. It is then said that one numerical method is more efficient than another one if it allows to obtain a numerical solution with a determined numerical error in less CPU time, or equivalently, a given budget of CPU time allows one to obtain a more accurate numerical solution by the first method than by the second. The simulation model by Bürger et al. (2013) is based on a method-of-lines formulation of an underlying nonlinear partial differential equation (PDE). This means a system of time-dependent ordinary differential equations (ODEs), one for each layer of the settler. Simulations of PDEs are stable and reliable if a so-called CFL condition is satisfied. This gives a maximal time step Δt for each given layer thickness Δ𝑧. There is a qualitative difference in the numerical treatment depending on whether only hindered settling and bulk flows are considered or, if in addition, compression or dispersion is included. For clarity of presentation, we limit ourselves here to batch sedimentation in a

  • 9th  IWA  Symposium  on  Systems  Analysis  and  Integrated  Assessment  14-‐17  June  2015,  Gold  Coast,  Australia    vessel with a constant cross-sectional area, and for which the depth 𝑧 is measured from the suspension surface downwards. The model equation is

    𝜕𝐶𝜕𝑡

    = −𝜕𝑓(𝐶)𝜕𝑧

    +𝜕𝜕𝑧

    𝑑(𝐶)𝜕𝐶𝜕𝑧

    , 0 < 𝑧 < 1 m, 𝑡 > 0, where the flux function 𝑓(𝐶) = 𝐶𝑣!"(𝐶) contains the hindered settling velocity function 𝑣!"(𝐶) (the Vesilind function is used) and the compression function 𝑑(𝐶) is zero for concentrations 𝐶 below a critical concentration 𝐶! = 6 kg/m! and positive for larger 𝐶 (chosen as a straight-line relationship with slope 0.5 m!/s!). Methods

    Although any time discretization method could be used for the method-of-lines formulation by Bürger et al. (2013), there is nothing to gain by applying a standard ODE solver of higher formal order of accuracy than one, e.g. a Runge-Kutta method. On the contrary, this will only cause longer computational times producing the same error as the explicit Euler time-stepping method (Diehl et al., 2014). The time-integration methods compared herein are the following, where 𝑘!, 𝑘! are constants that depend on the choice of the functions 𝑓 and 𝑑:

    • The explicit Euler method is used for all simulations in Bürger et al. (2011, 2012, 2013). The CFL condition is Δ𝑡 ≤ 𝑘!(Δ𝑧)!. It is easy to implement since concentrations at time 𝑡!!! = 𝑡! + Δ𝑡 are explicit functions of the known ones at the previous time 𝑡!.

    • The semi-implicit (SI) method is described in detail in (Diehl et al., 2014). The CFL condition is Δ𝑡 ≤ 𝑘!Δ𝑧. The method requires that for each time step, a nonlinear system of algebraic equations is solved iteratively, for example, by the Newton-Raphson method.

    • The new linearly implicit (LI) method will be presented at the conference. The ideas come from Berger et al. (1979) and mean shortly described that the evolution from time 𝑡! to 𝑡!!! is obtained in a particular splitting way by calculation of the contribution from the compression term and the flux term of the PDE separately. The CFL condition is Δ𝑡 ≤ 𝑘!Δ𝑧. At every time step a linear system of equations is solved.

    • The standard solver ode15s in Matlab is an implicit multi-step method of variable order with step-size control. Of several standard ODE solvers investigated by Diehl et al. (2014) this was the second most efficient one (after method SI) in the investigations for both stand-alone settler simulations and benchmark simulations for the entire activated sludge process.

    The investigated methods are used for the simulation of a batch settling test with an initial concentration of 5 kg/m! during 1.5 hours, which means that almost steady state has been reached. The error of a simulated concentration 𝐶! with 𝑁 layers is calculated by comparing with a reference solution 𝐶!"# obtained by Euler’s method and 𝑁 = 2430 layers (Δ𝑧 = 1  m/2430 ≈ 0.41 mm). The relative 𝐿! error is calculated as

    |! !

    !

    !.! !

    !𝐶!(z, t) − 𝐶!"#(𝑧, 𝑡)| d𝑧 d𝑡/ 𝐶!"#

    ! !

    !

    !.! !

    !(𝑧, 𝑡) d𝑧 d𝑡  .

    Figure 1 shows the reference solution (left), and displays the efficiencies (right) of the time discretizations expressed by the relative error versus CPU time for various values of 𝑁. The CPU times are obtained with a computer with CPU Intel Core i7-4790, 8 MB, 3.6 GHz.

  • 9th  IWA  Symposium  on  Systems  Analysis  and  Integrated  Assessment  14-‐17  June  2015,  Gold  Coast,  Australia    Results and Discussion

    Figure 1. Left: Reference solution 𝐶!"#(𝑧, 𝑡) for the settling of a suspension with initial concentration 5 kg/m

    3, obtained by the explicit Euler method with 𝑁 = 2430 (plotted with 100  x  100 grid points). Right: Efficiencies of the investigated methods expressed by the relative L1 error at the simulated time 1.5 h versus computational time (CPU time). For accurate simulation results Δ𝑧 should be chosen small, wherefore the CFL condition implies that the explicit Euler method requires much smaller time steps than the other two methods. On the other hand, method SI needs more computations at every time step and requires the evaluation of the Jacobian matrix of the nonlinear algebraic system or equations. However, even when this system is solved by the Newton-Raphson method, method SI has turned out to be more efficient than explicit Euler. To reduce the implementation complexity and to remove the necessity to solve numerically a system of nonlinear algebraic equations, method LI can be used instead. The advantage of solving a linear system only in each iteration, which also means an easier implementation, is paid by the price of a larger numerical error. From Figure 1 (right) one can directly conclude that method SI is the most efficient, whereas Euler and standard solvers like ode15s are less efficient. When evaluated on a batch settling test, the following advantages (+) and disadvantages (−) can be concluded:

    • Explicit Euler: + Implementation easy. + Convergence proof exists (numerical approximate solutions converge to the PDE

    solution as Δ𝑧 → 0) by Bürger et al. (2015). Robust method. − Not efficient.

    • Semi-implicit (SI) method:

    − Implementation more complex than Euler and LI. − At each time step, a nonlinear system of algebraic equations is solved e.g. by Newton-

    Raphson iterations. There is no guarantee that these converge although no problems experienced so far by the authors. Tolerance parameter has to be set by the user.

    + Under the assumption that the Newton-Raphson iterations finds a solution each time point, convergence of the numerical method is proved for batch sedimentation by Bürger et al. (2006).

    + Most efficient of the investigated methods.

    • Linear-implicit (LI) method: + Implementation easy. The ingredient in addition to the Euler method is basically that a

    linear system of equations is solved at each time step. ± Convergence proof in preparation. Robust method. ± Second most efficient for 𝑁 ≈ 100 for batch sedimentation. The efficiency can be

  • 9th  IWA  Symposium  on  Systems  Analysis  and  Integrated  Assessment  14-‐17  June  2015,  Gold  Coast,  Australia    

    adjusted to some extent by a parameter. Fastest method for a given 𝑁 ≥ 30, but least accurate.

    • Matlab’s ode15s:

    − Implementation most complex of the investigated methods. − Well-established robust ODE solver for stiff problems, but not developed for solutions

    containing discontinuities. − Least efficient of the investigated methods.

    References A. E. Berger, H. Brezis, and J. C. W. Rogers. (1979). A numerical method for solving the problem 𝑢! − Δ𝑓(𝑢) = 0. RAIRO Anal. Numér., 130 (4):297–312.

    R. Bürger, K. H. Karlsen, and J. D. Towers. (2005). A model of continuous sedimentation of flocculated suspensions in clarifier-thickener units. SIAM J. Appl. Math., 65:882–940.

    R. Bürger, A. Coronel, and M. Sepúlveda. (2006). A semi-implicit monotone difference scheme for an initial-boundary value problem of a strongly degenerate parabolic equation modeling sedimentation-consolidation processes. Math. Comp., 750 (253):91–112.

    R. Bürger, S. Diehl, S. Farås, and I. Nopens. (2012). On reliable and unreliable numerical methods for the simulation of secondary settling tanks in wastewater treatment. Computers & Chemical Eng., 41:93–105.

    R. Bürger, S. Diehl, and I. Nopens. (2011). A consistent modelling methodology for secondary settling tanks in wastewater treatment. Water Res., 450 (6):2247–2260.

    R. Bürger, S. Diehl, S. Farås, I. Nopens, and E. Torfs. (2013). A consistent modelling methodology for secondary settling tanks: A reliable numerical method. Water Sci. Tech., 680 (1):192–208.

    S. Diehl, S. Farås, and G. Mauritsson. (2014) Fast reliable simulations of secondary settling tanks in wastewater treatment with semi-implicit time discretization. Submitted.