Re-coding of UCTPHO and UCTOLD in Visual Basic for Applications

Master Thesis

2016

Permanent link to this Item
Authors
Supervisors
Journal Title
Link to Journal
Journal ISSN
Volume Title
Publisher
Publisher

University of Cape Town

License
Series
Abstract
UCTOLD, IAWPRC and UCTPHO are activated sludge system diurnal simulation software programs written and compiled in TurboPascal 3.1 by the Water Research Group at the University of Cape Town in the late 1980s and early 1990s. IAWPRC is identical to International Water Association (IWA) Activated sludge Model No 1 (ASM1, Henze et al., 1987) and UCTOLD is an earlier variation of ASM1 that makes no material difference to simulation results when each are run with their default parameters – the difference is explained by Dold and Marais (1985). Details on the use of UCTOLD and IAWPRC was published by Dold et al. (1991) and this guide remains essential reading for the responsible use of the recoded UCTOLD and UCTPHO presented in this thesis. In the early 1990s, when the kinetics of phosphorus accumulating organisms (PAO) were sufficiently well understood, biological excess P removal (BEPR) was added to UCTOLD to yield UCTPHO. This software has the same look and feel as UCTOLD/IAWPRC and so a guide for it was never published. Details of the BEPR research that was codified into it are given by Wentzel et al. (1991) and Clayton et al. (1991). Later, much of the Wentzel BEPR model was integrated into ASM1 to form ASM2 (Henze et al., 1995). So UCTPHO and ASM2 differ in the same way as UCTOLD and ASM1/IAWPRC differ, essentially only in the fate of the product of the hydrolysis of slowly biodegradable particulate organics (BPO) – in ASM1/2, this product enters the bulk liquid as readily biodegradable soluble organics (BSO) with the ordinary heterotrophic organisms (OHO) utilizing only BSO, whereas in UCTOLD/UCTPHO the BPO product is utilized directly by the OHO and so does not enter the bulk liquid (Dold and Marais, 1985). One aspect is very important to note about the models embedded in these codes – UCTOLD and ASM1 are only for biological N removal systems and UCTPHO and ASM2 are only for biological N and P removal systems. One cannot simulate a N and P removal system with UCTOLD (or ASM1) and one cannot simulate a N removal system only with UCTPHO (or ASM2). The kinetics of denitrification in UCTOLD/ASM1 and UCTPHO/ASM2 are not the same - the details of the differences are explained by Clayton et al. (1991). For two decades up to around 2010, UCTOLD and UCTPHO provided free activated sludge system simulation tools to consultants, municipalities and operators to predict the performance of the activated sludge systems of wastewater treatment plants. Therefore smaller consultancies had the software available for use without requiring expensive commercial software for the modelling of household/municipal wastewater. With the advancement of computer hardware and Windows operating systems over two decades, the UCTOLD and UCTPHO software (not the models coded within them) grew outdated and gradually lost functionality. Then when 64 bit processor personal computers (PC) became available, the old compiled TurboPascal 3.1 software could no longer be run – they can still run on 32 bit processor WinXP PCs. Re-coding the software was therefore required if the continued use of the software were to be ensured. This recoding into Excel/VBA was undertaken in this thesis. Some considerable effort also went into the improvement of the user interface. The new interface allows quick input and configuration of the biological reactors of the activated sludge system, and the recycle streams. Several challenges presented themselves during the recoding stage of the project, most notable of which were the data management structures and the calculation time minimisation. Also, significant time was also spent on simulations to determine the effects of the integration parameters on calculation time, and to determine how to minimise the calculation time. After struggling with these challenges for some months, the recoded programs started to present results similar to the original TurboPascal compiled code, about a year after commencement with the project. This Beta version has the same functionality that the original Turbo Pascal versions had including Adjustment of the Wastage Pattern and Graphical Display of Diurnal Results. The calculation of activated sludge ISS concentration was added as an option by including the influent OHO and PAO ISS to determine reactor TSS concentration for N and N&P removal systems using results from Ekama and Wentzel (2004). So, instead of having to enter an activated sludge VSS/TSS ratio, the option to calculate it from entered influent VSS and TSS data can now be selected to calculate the reactor TSS concentration.
Description

Reference:

Collections